Skip to content

Instantly share code, notes, and snippets.

View tdhopper's full-sized avatar
©️
𝔀𝓸𝓻𝓴𝓲𝓷𝓰 𝓱𝓪𝓻𝓭

Tim Hopper tdhopper

©️
𝔀𝓸𝓻𝓴𝓲𝓷𝓰 𝓱𝓪𝓻𝓭
View GitHub Profile
@tdhopper
tdhopper / gist:d6758294096f6e6d6e2b
Last active August 29, 2015 14:17
Greasemonkey/Tampermonkey script to remove distractions from Twitter.
// ==UserScript==
// @name Distraction-free Twitter
// @description Remove Discover button and side menus
// @namespace https://github.com/tdhopper
// @match https://twitter.com/*
// @version 0.1
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

Why I'm quitting Simple:

  • Difficulty in reconciling with YNAB (due to limited transaction export options).
  • Routine delay in release of monthly statements.
  • Lack of functionality to see when/if a check was cashed.
  • Lack of Apple Pay support.

What I'm really going to miss about Simple:

  • Push notifications on transactions.

Springfield, April 1, 1838.

Dear Madam : —

Without apologizing for being egotistical, I shall make the history of sb much of my life as has elapsed since I saw you the subject of this letter. And, by the way, I now discover that, in order to give a full and intelligible account of the things I have done and suffered since I saw you, I shall necessarily have to relate some that happened before.

@tdhopper
tdhopper / gist:af61c5b5c0e701820005
Created January 5, 2015 16:25
ag ignores files in a directory called 'lib'
tdhopper@~/temp $ echo "hello" > file1.txt
tdhopper@~/temp $ mkdir lib
tdhopper@~/temp $ cp file1.txt lib/file2.txt
tdhopper@~/temp $ mkdir dir2
tdhopper@~/temp $ cp file1.txt dir2/file3.txt
tdhopper@~/temp $ ag hello
dir2/file3.txt
1:hello
file1.txt

Cornelius Lanczosm, H. Eves Mathematical Circles Squared

Most of the arts, as painting, sculpture, and music, have emotional appeal to the general public. This is because these arts can be experienced by some one or more of our senses. Such is not true of the art of mathematics; this art can be appreciated only by mathematicians, and to become a mathematician requires a long period of intensive training. The community of mathematicians is similar to an imaginary community of musical composers whose only satisfaction is obtained by the interchange among themselves of the musical scores they compose.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tdhopper
tdhopper / weight.py
Created December 7, 2014 02:10
Generates smoothed weight changed statistics using exponentially-weighted moving average.
import dateutil
import pandas as pd
import random
from os.path import expanduser, join
home = expanduser("~")
with open(join(home, "Dropbox/Text Notes/Weight.txt"), "r") as f:
lines = f.readlines()
@tdhopper
tdhopper / Pythonify List.py
Created November 25, 2014 14:21
Turn whitespace delimited list on clipboard into a Python list object.
#!/usr/bin/env python
import os, json
import subprocess
def get_clipboard():
p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE)
retcode = p.wait()
data = p.stdout.read()
return data
#!/usr/local/bin/python3
zip_code = '27560'
api_url = 'http://5dayweather.org/api.php?city=%s' % zip_code
from urllib.request import urlopen
import json
response = urlopen(api_url).read()
d = json.loads(response.decode('utf8'))
library(ggplot2)
set.seed(10)
data = rnorm(100)
ggplot(data.frame(data=data), aes(x=data))+
geom_histogram(fill="#4F81BD", binwidth=.5)+
theme(panel.background = element_rect(fill = "transparent",colour = NA),
panel.grid.minor = element_blank(),
panel.grid.major = element_line(colour="#CDCDCD",size=0.25),