This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A really stupid python template language inspired by coffeekup, markaby. | |
Do not use this code, it will ruin your day. A byproduct of insomnia. | |
TL;DR | |
----- | |
This module defines a template language that allows us to do: | |
d = Doc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# HCI memory structure - core interface | |
# | |
# | |
## Objects as structures | |
namespace java fr.sciencespo.medialab.hci.memorystructure.domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
# #Natural Language Processing in Python | |
# #Assignment #2 | |
# Exercises: 4, 8, 12, 13, 18, 25, 26 (Chapter 2) | |
# Your Turn: Pages 44, 55 | |
from __future__ import division | |
from PA1 import count_initial_indent, strip_initial_indent, write_doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <sys/types.h> | |
#include <GL/glut.h> | |
#include "FrameXform.h" | |
#include "WaveFrontOBJ.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from copy import copy | |
def ancesters(child, parents): | |
""" | |
when given a child and a child->parent dict, returns all child's ancesters | |
from youngest to oldest | |
""" | |
yield child | |
while parents.get(child): | |
child = parents.get(child) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collection.mutable.HashSet | |
import collection.mutable.Queue | |
import collection.mutable.ArraySeq | |
import scala.io.Source | |
import java.io.File | |
case class Container(capacity: Int, filled: Int) { | |
// overload + and - methods | |
def +(toAdd: Int) = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
#author : Patrick Browne | |
from time import time | |
from random import randint | |
class Heap(list): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Sequence Diagram in Github | |
// @version 0.1 | |
// @description Use https://github.com/bramp/js-sequence-diagrams to put sequence diagrams in Github | |
// @match https://github.com/*/*/issues/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.2.1/lodash.min.js | |
// @run-at document-end | |
// example in Github Issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import pprint | |
import requests | |
TRIMMABLE_HEADERS = [ | |
'Accept', | |
'Host', | |
'Origin', | |
'Accept-Encoding', | |
'Accept-Language', |
OlderNewer