Skip to content

Instantly share code, notes, and snippets.

View benrudolph's full-sized avatar
💭
🤸‍♂️

Ben Rudolph benrudolph

💭
🤸‍♂️
View GitHub Profile
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@proteusvacuum
proteusvacuum / mock_brownbag.py
Created October 28, 2015 17:09
Python mocks brownbag
# coding: utf-8
from mock import MagicMock, call, patch
# “mock is a library for testing in Python. It allows you to replace parts of
# your system under test with mock objects and make assertions about how they
# have been used.”
thing = MagicMock(name='thing', return_value=100)
print thing()
@skyl
skyl / gist:ea2ab1c62a547e381411
Created May 16, 2014 05:15
Virtualenv/pip on Jython2.7b2
OSX - 10.8.5
❯ virtualenv-2.7 --version
1.11.5
❯ ./jython/dist/bin/jython
Jython 2.7b2+ (default:f6f7196d27a5, May 15 2014, 20:10:22)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_55
Type "help", "copyright", "credits" or "license" for more information.
>>>
@dannyroberts
dannyroberts / git-aliases.sh
Last active December 16, 2015 20:10
My git-related shortcuts
source /usr/local/git/contrib/completion/git-completion.bash
alias g="git"; __git_complete g _git
alias l="git status"
alias d="git diff"; __git_complete d _git_diff
alias ds="git diff --cached"
alias m="git commit -m "
alias am="git commit -am "
alias a="git add "
alias o-="git checkout --"
alias o="git checkout"; __git_complete o _git_checkout
@dimo414
dimo414 / cat.py
Created June 26, 2012 04:54
Fast File Concatenation in Python
'''
Tests different methods of concatenating files in Python.
'''
from __future__ import print_function
import json,os,shutil,subprocess
import util
def verify(file,expected):
count = 0