Skip to content

Instantly share code, notes, and snippets.

Justin Gage gagejustins

View GitHub Profile
@gagejustins
gagejustins / followers.py
Last active Apr 5, 2018
Code for Twitter algorithm spotlight
View followers.py
import Algorithmia
input = {
"username": "elonmusk",
"auth": {
"app_key": "xxxxxxxxxx",
"app_secret": "xxxxxxxxxx",
"oauth_token": "xxxxxxxxxx",
"oauth_token_secret": "xxxxxxxxxx"
}
@gagejustins
gagejustins / call.py
Last active Mar 23, 2018
Code for sentiment analysis with Twitter demo
View call.py
#Define your API Key from Algorithmia
apikey = 'YOUR_API_KEY'
#Initialize the Algorithmia client
client = Algorithmia.client(apikey)
#Create an instance of the RetrieveTweetsWithKeyword algorithm
algo = client.algo('diego/RetrieveTweetsWithKeyword/0.1.2')
#Call the algorithm for both of our keywords and store the results
@gagejustins
gagejustins / call.py
Last active Nov 9, 2019
Code for my tutorial on CNNs in Pytorch
View call.py
CNN = SimpleCNN()
trainNet(CNN, batch_size=32, n_epochs=5, learning_rate=0.001)
You can’t perform that action at this time.