Skip to content

Instantly share code, notes, and snippets.

View JohnStuartRutledge's full-sized avatar

John Rutledge JohnStuartRutledge

View GitHub Profile

Keybase proof

I hereby claim:

  • I am johnstuartrutledge on github.
  • I am johnrutledge (https://keybase.io/johnrutledge) on keybase.
  • I have a public key ASAvvmTBlRjEWjZkDx4eG5EhTG0_dPcZPkLh0NGGUjt9Cgo

To claim this, I am signing this object:

@JohnStuartRutledge
JohnStuartRutledge / nlp_roadmap.md
Last active September 28, 2020 19:55
tech roadmap plan/requirements for NLP Pipeline

NLP-ETL PIPELINE REQUIREMENTS

3 Primary Goals

  1. aggregate/tag all useful language learning educational material on the web
  2. create enough output JSON docs to:
    • offer pre-made high quality content on any topic
    • serve as a raw data for training generative ML models
  3. minimize editorial review step as much as possible
@JohnStuartRutledge
JohnStuartRutledge / golf.csv
Created October 7, 2018 18:10
Golf Genome
pos word freq is_keyword
VERB hit 316505 0
VERB win 163781 0
VERB happen 66395 0
VERB shoot 66105 1
VERB miss 59375 0
VERB finish 38319 0
VERB guess 36326 0
VERB change 34978 0
VERB watch 34848 0
@JohnStuartRutledge
JohnStuartRutledge / nba.csv
Created October 7, 2018 18:06
NBA Genome
pos word freq is_keyword
VERB shoot 25459 1
VERB happen 24725 0
VERB lose 19558 0
VERB watch 19244 0
VERB run 15381 0
VERB score 15267 0
VERB beat 14579 1
VERB hit 14095 0
VERB stay 13645 0
@JohnStuartRutledge
JohnStuartRutledge / nfl.csv
Created October 7, 2018 17:54
NFL Genome
pos word freq is_keyword
VERB play 46089 0
VERB win 15076 0
VERB feel 13274 0
VERB run 12253 1
VERB happen 7409 0
VERB watch 6378 0
VERB change 4862 0
VERB understand 4458 0
VERB throw 4434 1
@JohnStuartRutledge
JohnStuartRutledge / owl.csv
Last active July 20, 2018 18:22
Overwatch Genome
pos word freq is_keyword
VERB play 86514 0
VERB kill 22264 1
VERB mean 21558 0
VERB look 20111 0
VERB feel 19698 0
VERB work 17655 0
VERB come 16599 0
VERB lose 15635 1
VERB win 15284 1
@JohnStuartRutledge
JohnStuartRutledge / mlb.csv
Last active July 20, 2018 17:08
mlb genome
pos word freq is_keyword
VERB play 50808 1
VERB feel 29178 0
VERB win 26113 0
VERB look 24600 0
VERB pitch 24093 0
VERB hit 23734 0
VERB mean 19342 0
VERB start 18708 0
VERB throw 18025 0
@JohnStuartRutledge
JohnStuartRutledge / FC_email_variables.md
Created September 19, 2017 21:05
Email Variables for Fluent City

Fluent City Emails

Below is a list of variables that can be used in the SendGrid Email templates.

COURSE

field name example value
course__id 1
course__code C-ND1-DDX-TUWESA-02/28/2017-2139
course__template_name Spanish 1
course__cancelled False
import requests
from bs4 import BeautifulSoup
headers = {
'host': '...etc',
'user-agent': 'Mozilla... etc',
}
url = 'https://global.sitesafety.trendmicro.com/result.php'
cookies = {'some_cookie_name': 'example cookie value'}

Django Idioms

General Tips

  • put methods that apply to a single instance of a Model on the model class itself
  • put methods meant to query against a Models entire table that models corresponding managers.py file.
  • if a models.py file gets too long to manage then create a models directory and place an __init__ file in it.
  • try to avoid using signals, but if you must then put them in a signals.py file