Skip to content

Instantly share code, notes, and snippets.

View dsblank's full-sized avatar
☄️
Head of Research, Comet.ml

Douglas Blank dsblank

☄️
Head of Research, Comet.ml
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dsblank
dsblank / WorkingMorseCode.ipynb
Created March 8, 2018 15:44
Working code for Morse Code decoder
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dsblank
dsblank / gist:b864fc7cf5072b52542ee17a3b95374d
Last active May 19, 2017 04:55
Computational Storytelling
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
@dsblank
dsblank / Test.ipynb
Created May 19, 2017 01:07
Testing 1 2 3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dsblank
dsblank / func_ast.py
Created February 13, 2016 16:43
Demonstration of using Python AST to represent WHERE clause in Gramps
from meta.asttools import Visitor
from meta.decompiler import _ast, decompile_func
class ParseFilter(Visitor):
def visitName(self, node):
return node.id
def visitNum(self, node):
return node.n
@dsblank
dsblank / setup.py
Created November 12, 2014 14:10
setup.py for installing into a IPython system folder
from distutils.command.install import install
from distutils.core import setup
import os.path
import json
import sys
kernel_json = {
"argv": [sys.executable,
"-m", "calico_scheme_kernel",
"-f", "{connection_file}"],
@dsblank
dsblank / process_kernel.py
Last active August 29, 2015 14:09
Abstract class for subprocess-based kernels
from metakernel import MetaKernel
from pexpect import replwrap, EOF
import signal
from subprocess import check_output
import re
__version__ = '0.0'
version_pat = re.compile(r'version (\d+(\.\d+)+)')
@dsblank
dsblank / splitParts.py
Created November 8, 2014 15:36
Some code to split a Unix-like command-line
def splitParts(text, stack):
# OOP, needed to protect raw-objects
if debug: print("splitParts:", text, stack)
try:
length = len(text)
except:
return [text]
retval = []
i = 0
current = makeAnnotatedString("")
@dsblank
dsblank / calcinpython.ipynb
Created October 22, 2014 15:56
Scheme in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.