cs-shirt.txt is from the UIUC CS shirt. The binary digits are shaped to form a big I. The cs-shirt.py translates the shirt into text.
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
// almost d3-style graph | |
var graph = {"nodes" : [ | |
{"name":"somenode"}, | |
{"name":"somenewnode"} | |
], | |
"links":[ | |
{"source":"somenode", "target":"somenewnode"} | |
] | |
}; |
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
<html> | |
<head> | |
<title>Put stuff here</title> | |
</head> | |
<body> | |
<h2>This is my block/gist!</h2> | |
<div id="putstuffhere"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> | |
<script> |
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 sys | |
if len(sys.argv) != 2: | |
print "Usage: python nospaces.py <inputfile>" | |
exit() | |
infile = sys.argv[1] | |
print "Removing the spaces from " + infile + "..." |
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
package edu.illinois.cs.cogcomp.tutorial; | |
import edu.illinois.cs.cogcomp.lbjava.learn.Lexicon; | |
import edu.illinois.cs.cogcomp.lbjava.learn.SparseNetworkLearner; | |
import java.io.ByteArrayOutputStream; | |
import java.io.PrintStream; | |
import java.util.*; | |
import java.util.stream.Stream; |
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
#!/bin/sh | |
for f in *.xml.gz; do | |
if [ $f == "English.xml.gz" ] ; then | |
continue; | |
fi | |
python makeplaintext.py $f English.xml.gz; | |
done |
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/python | |
from bs4 import BeautifulSoup | |
# use url: http://unicode.org/iso15924/iso15924-codes.html | |
with open("iso15924list.html") as f: | |
html_doc = f.read() | |
soup = BeautifulSoup(html_doc, 'html.parser') |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib as mpl | |
import matplotlib.patches as patches | |
mpl.rcParams['font.family'] = "Times New Roman" | |
#mpl.rcParams['font.size'] = "11" | |
mpl.rc('pdf', fonttype=42) | |
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 numpy as np | |
import math | |
import sys | |
np.set_printoptions(linewidth=400) | |
def EditDistance(s, t): | |
# For all i and j, d[i,j] will hold the Levenshtein distance between | |
# the first i characters of s and the first j characters of t. | |
# Note that d has (m+1) x(n+1) values. |
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 __future__ import division | |
import numpy as np | |
Q = [[3, -1], [-1, 3]] | |
b = [1,0] | |
x = [1,1] | |
d = [] | |
r = [] |
OlderNewer