Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
### Keybase proof | |
I hereby claim: | |
* I am pfeyz on github. | |
* I am pfeyz (https://keybase.io/pfeyz) on keybase. | |
* I have a public key whose fingerprint is B83B 4D16 799C 3DD5 DB31 AF7C D84C 25FF 6148 862E | |
To claim this, I am signing this object: |
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
""" | |
$ python bulk-send.py emails.txt passes/*.pdf # dry run | |
Logging into smtp.gmail.com:587 as firstname.lastname | |
(Not actually sending anything. Use -s to actually send the emails.) | |
1.pdf -> a@gmail.com | |
2.pdf -> b@gmail.com | |
3.pdf -> c@gmail.com | |
... | |
$ python bulk-send.py -s emails.txt passes/*.pdf # send for real |
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
""" | |
usage: Send a unique attachment to every email in a list. | |
$ python bulk-send.py emails.txt passes/*.pdf # dry run | |
Logging into smtp.gmail.com:587 as paul.feitzinger | |
(Not actually sending anything) | |
1.pdf -> a@gmail.com | |
2.pdf -> b@gmail.com | |
3.pdf -> c@gmail.com | |
... |
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 glob | |
import os | |
import re | |
import sys | |
import warnings | |
from preprocessing import MorParser | |
from analysis.scripts.analyze_tagset import analyze | |
from analysis.scripts.sanitize_stats_files import main as sanitizer | |
def cmoney(filename, speaker, corpname, period_num): |
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
<script language="JavaScript"> | |
function decode_letter(encoded_letter, salt, total_words, word_index){ | |
return String.fromCharCode(parseInt(encoded_letter) + salt - total_words + word_index); | |
} | |
function encode_letter(letter, salt, total_words, word_index){ | |
return String.charCodeAt(letter) - salt + total_words - word_index; | |
} | |
function encode_words(words, salt){ |
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 sys | |
from mwapi import LearnersDictionary | |
if __name__ == "__main__": | |
query = " ".join(sys.argv[1:]) | |
key = "YOUR-PERSONAL-API-KEY-FROM-MW" | |
learners = LearnersDictionary(key) | |
for entry in learners.lookup(query): | |
for ipa in entry.pronunciations: |
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
// How often the stopwatch is actually updated | |
Stopwatch.interval_ms = 200; | |
function Stopwatch(time_offset, ratio_to_realtime, display_increment_ms, display_function) { | |
this.start_time = (new Date()).getTime(); | |
if(time_offset) { | |
this.start_time -= time_offset; | |
} | |
this.now_time = this.start_time; |