Last active
April 5, 2018 13:35
-
-
Save gagejustins/7561854e1b3d5b5759285d064b10ffd8 to your computer and use it in GitHub Desktop.
Code for Twitter algorithm spotlight
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 Algorithmia | |
input = { | |
"username": "elonmusk", | |
"auth": { | |
"app_key": "xxxxxxxxxx", | |
"app_secret": "xxxxxxxxxx", | |
"oauth_token": "xxxxxxxxxx", | |
"oauth_token_secret": "xxxxxxxxxx" | |
} | |
} | |
client = Algorithmia.client('YOUR_API_KEY') | |
algo = client.algo('twitter/RetrieveTwitterFollowers/0.1.0') | |
print(algo.pipe(input)) |
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 Algorithmia | |
input = { | |
"username": "elonmusk", | |
"auth": { | |
"app_key": "xxxxxxxxxx", | |
"app_secret": "xxxxxxxxxx", | |
"oauth_token": "xxxxxxxxxx", | |
"oauth_token_secret": "xxxxxxxxxx" | |
} | |
} | |
client = Algorithmia.client('YOUR_API_KEY') | |
algo = client.algo('twitter/RetrieveTwitterFriends/0.1.1') | |
print(algo.pipe(input)) |
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 Algorithmia | |
input = { | |
"query": "tesla", | |
"numTweets": "10", | |
"auth": { | |
"app_key": "xxxxxxxxxx", | |
"app_secret": "xxxxxxxxxx", | |
"oauth_token": "xxxxxxxxxx", | |
"oauth_token_secret": "xxxxxxxxxx" | |
} | |
} | |
client = Algorithmia.client('YOUR_API_KEY') | |
algo = client.algo('twitter/RetrieveTweetsWithKeyword/0.1.5') | |
print(algo.pipe(input)) |
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 Algorithmia | |
input = {"INPUT": "something interesting"} | |
client = Algorithmia.client('YOUR_API_KEY') | |
algo = client.algo('OUR_ALGORITHM') | |
print(algo.pipe(input)) |
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 Algorithmia | |
input = { | |
"username": "elonmusk", | |
"numTweets": "10", | |
"auth": { | |
"app_key": "xxxxxxxxxx", | |
"app_secret": "xxxxxxxxxx", | |
"oauth_token": "xxxxxxxxxx", | |
"oauth_token_secret": "xxxxxxxxxx" | |
} | |
} | |
client = Algorithmia.client('YOUR_API_KEY') | |
algo = client.algo('twitter/RetrieveTweetsWithUser/0.1.0') | |
print(algo.pipe(input)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment