Skip to content

Instantly share code, notes, and snippets.

View pbexe's full-sized avatar

Miles Budden pbexe

View GitHub Profile
@pbexe
pbexe / print.py
Last active October 30, 2015 23:04
Print
from pprint import pprint
def print():
pprint("False")
@pbexe
pbexe / n.p
Last active October 31, 2015 17:41
[Code golf] Odd or even
Iq%Q2Z"Even")E"Odd
@pbexe
pbexe / t.p
Last active October 31, 2015 17:39
[Code golf] Greater than or less than 10
>QT
@pbexe
pbexe / a.p
Last active October 31, 2015 17:37
[Code golf] All odd numbers from 1 to 1000000
FZr0^10 2Iq%Z2 1Z)
@pbexe
pbexe / s.p
Created November 1, 2015 13:00
[Code golf] Sort all characters in an input string into alphabetical order
Sw
@pbexe
pbexe / f.p
Created November 4, 2015 11:31
[Code golf] Fibonacci numbers
J0K1VUQ=kJ=JK=K+kKJ
@pbexe
pbexe / index.html
Created November 26, 2015 18:23 — forked from maxkfranz/index.html
cose demo
<!DOCTYPE>
<html>
<head>
<title>cose demo</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
@pbexe
pbexe / index.html
Created November 26, 2015 19:07
Graph theory test
<!DOCTYPE>
<html>
<head>
<title>Graph theory test</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
@pbexe
pbexe / chunker.py
Created December 12, 2015 16:07
An example of NLP chunking in python
import nltk
def prepareForNLP(text):
sentences = nltk.sent_tokenize(text)
sentences = [nltk.word_tokenize(sent) for sent in sentences]
sentences = [nltk.pos_tag(sent) for sent in sentences]
return sentences
def chunk(sentence):
chunkToExtract = """
@pbexe
pbexe / index.html
Last active February 3, 2016 16:26
Node Graph Test
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<!--Import Google Icon Font-->
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Compiled and minified CSS -->