Skip to content

Instantly share code, notes, and snippets.

View nicktimko's full-sized avatar

Nick Timkovich nicktimko

View GitHub Profile
@nicktimko
nicktimko / app.py
Created February 16, 2018 02:12
py 101 feb 15
from __future__ import unicode_literals
import sys
import statistics
from prompt_toolkit import prompt, AbortAction
from prompt_toolkit.history import InMemoryHistory
from prompt_toolkit.contrib.completers import WordCompleter
import meetup.api
def get_names():
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nicktimko
nicktimko / XvX.ipynb
Last active January 20, 2018 01:56
This or That?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nicktimko
nicktimko / DaBeazStrings.ipynb
Created November 7, 2017 22:18
Python String Tutorial
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
commit e951eec402172028c7dfa4354f5664af2eb73203
Author: Nick Timkovich <npt@uchicago.edu>
Date: Fri Aug 4 12:33:29 2017 -0500
Use specified phrases in lieu of 'Used' for limit summary
diff --git a/horizon/templates/horizon/common/_limit_summary.html b/horizon/templates/horizon/common/_limit_summary.html
index b58ba8b4c..251d98b6b 100644
--- a/horizon/templates/horizon/common/_limit_summary.html
+++ b/horizon/templates/horizon/common/_limit_summary.html
@nicktimko
nicktimko / override_guard.ipynb
Last active November 25, 2016 19:43
Override Checking
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nicktimko
nicktimko / mycnf.py
Created November 11, 2016 19:29
MySQL/MariaDB Python configuration reader
from __future__ import print_function, unicode_literals
import os
import codecs
import glob
import logging
import stat
CP_MODERN = True
try:
import configparser
@nicktimko
nicktimko / chipy_dojo.py
Created October 21, 2016 01:13
ChipyDojo
import cmd
import textwrap
from collections import Counter
dungeon = {
(2, 1): 'hat',
(2, 2): 'goblin',
(2, 4): 'machete',
}
no_opponent = "The Goblin isn't available"
@nicktimko
nicktimko / rejected-ideas.py
Created September 30, 2016 22:33
Rejected Ideas
# maybe they'll be used, one day...
class ArrayAutoAllocator(object):
def __init__(self, n_columns, fill_val=-1, chunk_size=PREALLOC_ROWS, dtype=None):
self.n_columns = n_columns + 1 # for the index
self.fill_val = fill_val
self.chunk_size = chunk_size
self.dtype = dtype
self.chunks = {}
@nicktimko
nicktimko / summon_zalgo.ipynb
Created June 15, 2016 22:32
Lazy XML parsing with regex :(
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.