Skip to content

Instantly share code, notes, and snippets.

View tedmiston's full-sized avatar
🗺️
Remote

Taylor D. Edmiston tedmiston

🗺️
Remote
View GitHub Profile
@tedmiston
tedmiston / wordle.py
Created January 29, 2022 04:55
wordle
import random
import urllib.request
WORD_LENGTH = 5
MAX_GUESSES = 5
WORD_LIST = 'https://raw.githubusercontent.com/tabatkins/wordle-list/main/words'
FORFEIT = 'forfeit'
response = urllib.request.urlopen(WORD_LIST)
content = response.read().decode('utf-8')
@tedmiston
tedmiston / GenerateMITLicense.py
Last active May 9, 2018 05:02
Fetch GitHub's MIT license template, populating this year and your name
"""
Fetch GitHub's MIT license template, populating this year and your name.
"""
import getpass
import pwd
from datetime import date
import requests
@tedmiston
tedmiston / keybase.md
Created January 25, 2018 07:05
keybase.md

Keybase proof

I hereby claim:

  • I am tedmiston on github.
  • I am tedmiston (https://keybase.io/tedmiston) on keybase.
  • I have a public key ASDcS_0ErBLjbjPfvkCIwRXWIuHJaUCvFhvs1JZ7qltKzAo

To claim this, I am signing this object:

aes128
aes256
all
allowoverwrite
analyse
analyze
and
any
array
as
@tedmiston
tedmiston / _.ipynb
Created July 24, 2017 03:17
massive destruct-ion
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tedmiston
tedmiston / astro_metal_name_stylizer.py
Created June 28, 2017 16:18
astro-metal name stylizer
#!/usr/bin/env python3
"""
A style-izer / PascalCase-r / opinionated capitalizer for the docs site.
Capitalize the names of companies, services, etc as used on various generated
list pages on the Astronomer docs site <https://docs.astronomer.io/>, such as
Sources, Destinations, Transforms, Clickstream Collectors, and Clickstream
Connectors.
@tedmiston
tedmiston / ordinal.py
Last active April 4, 2017 18:55
Generate all ordinal days for a given year.
"""
Generate ordinal days for a given year.
January 1st, January 2nd, January 3rd ... December 31st.
"""
import calendar
import datetime
def suffix(day):
@tedmiston
tedmiston / join_plus.py
Created April 4, 2016 03:09
Concatenate a list of items with more advanced separator control
def join_plus(items, separator, final_separator=None, pair_separator=None):
"""Concatenate a list of items with more advanced separator control.
Example 1 - You have a list of names = [Tom, Jeff, Sally] and want them
combined as a string. There are a few possible desired outputs:
(1-1) Tom, Jeff, Sally # join_plus(names, ', ')
(1-2) Tom, Jeff, and Sally # join_plus(names, ', ', final_separator=', and ')
Example 2 - Same but with two names = [Tom, Jeff]. This creates a third
@tedmiston
tedmiston / cream.ipynb
Last active June 10, 2016 03:03
High-yield checking analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tedmiston
tedmiston / profile.sh
Created November 13, 2015 16:41
Python profiling
python -m cProfile -s tottime foo.py