Skip to content

Instantly share code, notes, and snippets.

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

Tim Hopper tdhopper

©️
𝔀𝓸𝓻𝓴𝓲𝓷𝓰 𝓱𝓪𝓻𝓭
View GitHub Profile
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Tim Hopper <>"]
[tool.poetry.dependencies]
python = "3.6"
[tool.poetry.dev-dependencies]
from io import BytesIO
def render_altair(chart):
b = BytesIO()
chart.save(b, scale_factor=2.0, format='png', webdriver='firefox')
b.seek(0)
return b.read()
import ast
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

I’m worried about the present state of programming. Programmers now are supposed to mostly just use libraries. Programmers aren’t allowed to do their own thing from scratch anymore. They’re supposed to have reusable code that somebody else has written. There’s a bunch of things on the menu and you choose from these when you put them together. Where’s the fun in that? Where’s the beauty of that?

It’s very hard, [but] we have to figure out a way that we can make programming interesting for the next generation of programmers, that it’s not going to be just a matter of reading a manual and plugging in the parameters in the right order to get stuff.

@tdhopper
tdhopper / fizz.py
Last active March 21, 2019 15:08
FizzBuzz on the Event Loop in Python 3.7
#!/usr/bin/env python
import sys
import asyncio
from typing import List
async def sleepprint(i: int, s: str, end=" "):
await asyncio.sleep(i / 30)

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@tdhopper
tdhopper / mycommands.sty
Created February 10, 2018 13:11
latex customizations from grad school
\usepackage{amsmath,amssymb, amsfonts, amsthm}
\usepackage{setspace, framed, pdfsync,tocloft}
\usepackage[colorinlistoftodos, textwidth=4cm, shadow]{todonotes}
\usepackage{color} \onehalfspacing
\newcommand{\unfinished}{
\begin{MyBox}
\listoftodos
\end{MyBox}\pagecolor{mydarkgray}\color{mylightgray}}
@tdhopper
tdhopper / Vagrantfile
Last active January 1, 2018 09:35 — forked from malev/Vagrantfile
Vagrantfile: AWS Linux with miniconda3 installed
Vagrant.configure("2") do |config|
config.vm.box = "mvbcoding/awslinux"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", inline: <<-SHELL
sudo yum update -q -y
su - vagrant
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b -p /home/vagrant/miniconda
echo 'export PATH="/home/vagrant/miniconda/bin:$PATH"' >> /home/vagrant/.bashrc
@tdhopper
tdhopper / IldaGibbs.java
Created April 7, 2015 18:46
Code from "'Infinite LDA' – Implementing the HDP with minimum code complexity".
/*
* (C) Copyright 2005-2011, Gregor Heinrich (gregor :: arbylon : net) \
* (This file is part of the knowceans-ilda experimental software package
*/
/*
* knowceans-ilda is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option)
* any later version.