This file contains hidden or 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
| #Luke's Ultimate Prompt | |
| #displays shortened time, username, shortened absolute path, git branch status colored red if dirty, colored smiley face indicating return code of previous command | |
| #also includes a colored mortal kombat PS2 for those long commands. | |
| #Written by Luke Hospadaruk with lots of help from the internet | |
| find_git_branch() { | |
| # Based on: http://stackoverflow.com/a/13003854/170413 | |
| local branch | |
| if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null); then | |
| if [[ "$branch" == "HEAD" ]]; then | |
| echo -n ' detached*' |
This file contains hidden or 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 print_function | |
| import re, sys | |
| from nltk import ngrams, tokenize, download | |
| from argparse import ArgumentParser | |
| """ | |
| #USAGE: | |
| #This python file illustrates the techniques that Data For Research (http://dfr.jstor.org/) uses to tokenize raw text and generate n-grams | |
| #DFR uses the NLTK 'punkt' tokenizer which needs to be downloaded separately from the nltk package. |
This file contains hidden or 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 print_function | |
| import sys, time | |
| from collections import deque | |
| import curses, traceback | |
| ''' | |
| Simple counter script | |
| Originally used for counting pickup windings for an electric violin pickup. | |
| Of course it would work well for any pickup winding activity. |
NewerOlder