- GitHub Staff
- in/peckjon
- @peckjon
- @peckjon
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 | |
client = Algorithmia.client("your_api_key") | |
algo_input = { | |
"action": "translate", | |
"text": "Me gustan los aguacates" | |
} | |
translated_text = client.algo("translation/GoogleTranslate/0.1.1").pipe(algo_input).result["translation"] |
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 | |
remote_url = 'data://.my/collection/training_data.json' | |
local_dataset = '/path/to/my/training_dataset.json' | |
client = Algorithmia.client('YOUR_API_KEY_HERE') | |
client.file(remote_url).putFile(local_dataset) |
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 | |
api_key = "YOUR_API_KEY" | |
client = Algorithmia.client(api_key) |
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
<html> | |
<head> | |
<script src="https://algorithmia.com/v1/clients/js/algorithmia-0.2.0.js" type="text/javascript"></script> | |
<script src="content-aware-resize.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<h3>Image:</h3> | |
<input type="text" size="80" id="img_url" value="https://upload.wikimedia.org/wikipedia/commons/f/f7/Hickory_Golfer.jpg" /> | |
<h3>Automatically resize:</h3> | |
<input type="submit" value="Thumbnail 150x150" onclick="resize(150,150,'thumb')" /> <a download="thumb.png" id="thumb"></a><br/> |
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
input = { | |
"input_file":"data://media/videos/lounge_demo.mp4", | |
"output_file":"data://.algo/temp/detected_objects.json", | |
"algorithm":"algo://LgoBE/CarMakeandModelRecognition/0.3.4", | |
"advanced_input":{"$SINGLE_INPUT"} | |
} | |
result = client.algo('media/VideoMetadataExtraction?timeout=3000').pipe(input).result |
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": "seattle seahawks", | |
"numTweets": "1000", | |
"auth": { | |
"app_key": "YOUR_TWITTER_APP_KEY", | |
"app_secret": "YOUR_TWITTER_APP_SECRET", | |
"oauth_token": "YOUR_TWITTER_OAUTH_TOKEN", | |
"oauth_token_secret": "YOUR_TWITTER_OAUTH_TOKEN_SECRET" |
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 = "//blog.algorithmia.com/predictive-algorithms-track-real-time-health-trends/" | |
client = Algorithmia.client('YOUR API KEY') | |
algo = client.algo('web/AnalyzeURL/0.2.14') | |
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 os | |
import sys | |
# Set the maximum number of words per file | |
max_words = 3900 | |
# Set the pattern to split on | |
pattern = "00;" | |
# Get the input file name from the command line arguments |
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
// run this in browser console at https://global.americanexpress.com/offers/eligible (or use Tampermonkey) | |
var amexOfferButtons = [] | |
var amexOfferClicker = function(index) { | |
if(index < amexOfferButtons.length) { | |
console.log("Clicking offer button "+index+" of "+amexOfferButtons.length); | |
amexOfferButtons[index].click(); | |
setTimeout(function(){ amexOfferClicker(index+1) }, 500); | |
} |
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
// paste into browser console at https://www.joinhoney.com/droplist to remove ALL Droplisted items | |
var script = document.createElement('script'); | |
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
setTimeout(() => { | |
$('img[alt="Remove this item from your Droplist"]').each(function(){this.click()}); | |
$('button[aria-label="Remove item"]').each(function(){this.click()}); | |
$('div[id="HoneyDropList:index-moreButton"]').click(); | |
}, 2000); |
OlderNewer