=IF(SUMPRODUCT(--(B1={1,11,21,31}))>0,1,
IF(SUMPRODUCT(--(B1={2,22,32,12}))>0,2,
IF(SUMPRODUCT(--(B1={3,13,23,33}))>0,3,
IF(SUMPRODUCT(--(B1={4,14,24,34}))>0,4,
IF(SUMPRODUCT(--(B1={5,15,25,35}))>0,5,
IF(SUMPRODUCT(--(B1={6,16,26,36}))>0,6,
IF(SUMPRODUCT(--(B1={7,17,27,37}))>0,7,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
This script returns documents from the BrightPlanet REST API. Input is a text file with a list of queries. | |
Output is a CSV file with your desired fields for each document. Default time period is everything until present. | |
Requires 'requests' module. To install via cmd, enter: python -m pip install requests | |
""" | |
import requests | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import csv | |
input_file = r'YOUR_FULL_FILEPATH_HERE' | |
var_scheduled = "RECURRING" | |
var_initial_delay = 1.0 # float | |
var_time_between_scheduled_events = 12.0 # float | |
var_max_depth = 1 | |
var_depth_external = 0 | |
var_max_docsize = -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import pyperclip | |
import re | |
from list_clipboard_manipulations import list_to_clipboard | |
delete_counter = 0 | |
good_list = list() | |
sort_alpha = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
infile = r'C:\Users\Account\PythonFiles\generic_infile.txt' # full path to any file inside quotes | |
# Harvest Event Variables | |
api_key = "123abc" # STRING - 1 API key per Harvest API schema | |
searchable_items_per_event = 100 # INT - max queries OR max screenNames | |
name_of_event = "NewYork_Politics" # STRING - Program will pre-pend "TW_" and add "_#" to the end | |
filterQuery = None # STRING - ex: "nuclear AND (war OR energy)" | |
event_tags = ["source_Politics", "New York"] # LIST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "string", | |
"harvestEventType": "TWITTER", | |
"scheduleType": "ONCE", | |
"name": "TW_APItest_manual_2", | |
"twitterHarvestParameters": { | |
"screenNames": [ | |
"deadspin", "pfrumors" | |
], |
- Sorting segments within a stacked bar chart: http://kb.tableau.com/articles/howto/sorting-segments-within-stacked-bars-by-value
- Pareto 2-part area chart: http://www.vizwiz.com/2016/08/tableau-tip-tuesday-how-to-create-two.html
- Doughnut charts: http://www.evolytics.com/blog/tableau-201-how-to-make-donut-charts/
- Hex maps: http://sirvizalot.blogspot.com/2015/11/hex-tile-maps-in-tableau.html
- Tile maps: http://www.bfongdata.com/2015/11/periodic-table-map.html
- Small multiple-tile maps: http://sirvizalot.blogspot.com/2016/05/how-to-small-multiple-tile-map-in.html
- Date Functions:
- 7 Tips for writing better Python: https://www.youtube.com/watch?v=VBokjWj_cEA
- TIMESTAMPS
- enumerate()
- zip()
- Swapping values
- Checking key in dictionary
- for ... else
NewerOlder