Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Radvan tjvr

View GitHub Profile
@tjvr
tjvr / s2.py
Last active Aug 29, 2015 — forked from corihudson/s2.py
View s2.py
from __future__ import division
from myro import *
import blockext
from blockext import *
@command("stop both motors")
@tjvr
tjvr / __init__.py
Created Apr 10, 2015
Lately: an Earley parser in Python 3
View __init__.py
import itertools
import regex
# Lexer results
class Token:
def __init__(self, kind, value=None):
self.kind = kind
@tjvr
tjvr / thingsinboxes.ml
Last active Aug 29, 2015
Things in boxes
View thingsinboxes.ml
fun boxes = [0, 0, 0, 0];;
fun allcons x [] = []
| allcons x (l :: ll) =
(x :: l) :: (allcons x ll) ;;
fun arrange 0 l = [l]
| arrange n [] = []
| arrange n (x::l) =
(arrange (n-1) ((x+1) :: l)) @ (allcons x (arrange n l));;
View reverse speech.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjvr
tjvr / gist:0cccd5f8d97770f784bf
Created May 10, 2015
kurt-define-block.ipynb
View gist:0cccd5f8d97770f784bf
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
@tjvr
tjvr / details.txt
Last active Aug 29, 2015
No comment
View details.txt
?|..| imports standard library
---------------------------------------------------------
% zero
?… import library named …
…$… define export named string … with value …
can't export digit as logical value
@tjvr
tjvr / chocpi.ipynb
Last active Oct 31, 2015
chocpi.ipynb
View chocpi.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjvr
tjvr / reasons.md
Last active Feb 17, 2016
National Rail Enquiries Data
View reasons.md

Late Running Reasons

  • 100: This train has been cancelled because of a broken down train
  • 101: This train has been cancelled because of a delay on a previous journey
  • 102: This train has been cancelled because of a derailed train
  • 104: This train has been cancelled because of a fire at a station
  • 105: This train has been cancelled because of a fire at a station earlier
  • 106: This train has been cancelled because of a landslip
  • 107: This train has been cancelled because of a line-side fire
@tjvr
tjvr / redirect.py
Created Jun 21, 2016
s2forums mitmproxy
View redirect.py
import os
from mitmproxy.models import HTTPResponse, decoded
from mitmproxy.script import concurrent
from netlib.http import Headers
target = 'scratch.mit.edu'
target_cdn = 'cdn.scratch.mit.edu'
@tjvr
tjvr / blocks.ipynb
Last active Nov 3, 2016
all the workarounds
View blocks.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.