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 collections | |
import datetime | |
import logging | |
from goblin import properties | |
logger = logging.getLogger(__name__) | |
CARD_MAPPING = {'Cardinality.single': 'Cardinality.SINGLE', |
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
#!/bin/bash | |
wget https://snap.stanford.edu/data/email-Enron.txt.gz | |
gunzip email-Enron.txt.gz | |
bin/gremlin.sh #and then :load enron.groovy |
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
library(tidyverse) | |
library(stringr) | |
# read in the transcript | |
# I simply copied the text from the page at | |
# https://www.washingtonpost.com/news/the-fix/wp/2016/09/26/the-first-trump-clinton-presidential-debate-transcript-annotated/ | |
# and popped it into a txt file | |
xx <- scan("first_debate_2016.txt", "character") |
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 requests_jwt | |
import json | |
# email and password auth through postgrest | |
resp = requests.post('http://localhost:3000/rpc/login', json={"email": "you@yours.com", "pass": "dog"}) | |
print resp # <Response [200]> | |
# JWT token-based auth through postgrest using the returned token from above | |
auth = requests_jwt.JWTAuth(json.loads(resp.text)['token']) |
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
#==========================================================# | |
# Visualizing Facebook networks with friend photos # | |
# Katya Ognyanova, www.kateto.net, @ognyanova # | |
#==========================================================# | |
# Find more details at http://bit.ly/fbgephi | |
#==========================================================# | |
#### Collect the data using the RFacebook package #### |
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
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
NewerOlder