Skip to content

Instantly share code, notes, and snippets.

View diegoceccarelli's full-sized avatar
💭
coding

Diego diegoceccarelli

💭
coding
View GitHub Profile
typefun=(
("string",str),
("int",int),
("float",float)
)
def get_parser(pattern, separator=','):
names, types = zip(*(map(lambda x: x.split(":"), pattern.split(","))))
return lambda csv: dict(zip(names, map(lambda x: x[0](x[1]),zip(map(lambda x: dict(typefun)[x],types),csv.split(separator)))))
#!/usr/bin/python
import fileinput
stop=["a","a's","able","about","above","according","accordingly","across","actually","after","afterwards","again","against","ain't","albeit","all","allow","allows","almost","alone","along","already","also","although","always","am","among","amongst","an","and","another","any","anybody","anyhow","anyone","anything","anyway","anyways","anywhere","apart","appear","appreciate","appropriate","are","aren't","around","as","aside","ask","asking","associated","at","available","away","awfully","b","be","became","because","become","becomes","becoming","been","before","beforehand","behind","being","believe","below","beside","besides","best","better","between","beyond","both","brief","but","by","c","c'mon","c's","came","can","can't","cannot","cant","cause","causes","certain","certainly","changes","clearly","co","com","come","comes","concerning","consequently","consider","considering","contain","containing","contains","corresponding","could","couldn't","course","currently","d","definitel
@diegoceccarelli
diegoceccarelli / Makefile
Last active August 29, 2015 13:57
Thesis makefile
LATEX_MAIN=thesis
LATEX=pdflatex
build: $(LATEX_MAIN).tex clean
$(LATEX) $(LATEX_MAIN).tex
bibtex $(LATEX_MAIN)
$(LATEX) $(LATEX_MAIN).tex
$(LATEX) $(LATEX_MAIN).tex
./wlog.sh
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code