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
client_id = r'<Client ID>' | |
client_secret = r'<Client Secret>' | |
redirect_uri = 'https://localhost:5000/authorized' | |
scope = ['https://www.googleapis.com/auth/userinfo.email', | |
'https://www.googleapis.com/auth/userinfo.profile', | |
'https://www.google.com/m8/feeds', | |
'https://mail.google.com/' | |
] | |
from requests_oauthlib import OAuth2Session | |
import requests |
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
// https://github.com/nltk/nltk | |
$: dollar | |
$ -$ --$ A$ C$ HK$ M$ NZ$ S$ U.S.$ US$ | |
'': closing quotation mark | |
' '' | |
(: opening parenthesis | |
( [ { | |
): closing parenthesis | |
) ] } |
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
from apscheduler.scheduler import Scheduler | |
from datetime import datetime, timedelta | |
sched = Scheduler() | |
def eat(): | |
print("I'm eating a sandwich") | |
from flask import Flask | |
app = Flask(__name__) | |
app.config['DEBUG'] = True |
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
// | |
// ViewController+Swizzle.h | |
// TryingOutStuff | |
// | |
#import "ViewController.h" | |
@interface ViewController (Swizzle) | |
@end |
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
function f1() { | |
xmlhttp = new XMLHttpRequest(); | |
xmlhttp.open("POST","/api/v1/endpoint",true); | |
xmlhttp.setRequestHeader("Content-Type","application/json"); | |
xmlhttp.send(JSON.stringify({"text":"Classify this!"})); | |
console.log("" + xmlhttp.responseText); | |
} | |
function get() { | |
xmlhttp = new XMLHttpRequest(); |
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 ruby | |
# Program to download emails through imap. | |
#Uses Gmail's imap extensions to download all emails of a label. | |
require "rubygems" | |
require "bundler/setup" | |
require "mailman" | |
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 | |
mongoimport --db myDB --collection myCollection --file myJSONFile.json | |
//Export | |
mongoexport --db myDB --collection myCollection --out myJSONFile.json |