Skip to content

Instantly share code, notes, and snippets.

View greglinch's full-sized avatar

Greg Linch greglinch

View GitHub Profile
@digitaljhelms
digitaljhelms / gist:4287848
Last active April 19, 2025 04:48
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@ryanpitts
ryanpitts / fuzzyboyle.py
Created November 21, 2012 18:20
A Python script using FuzzyWuzzy to find the recent @andymboyle tweet that most resembles random mashing on a keyboard.
#!/usr/bin/python
import random
import string
import twitter
from fuzzywuzzy import process
api = twitter.Api()
recent_tweets = api.GetUserTimeline('andymboyle')
tweet_list = [tweet.text for tweet in recent_tweets]
// The narrator leaks globals but we cannot know if he intends this; we are
// forced to trust him. There is no going back.
stairs =
this['stairs'] ||
{};
stairs['0'] = [],
stairs['1'] = [
0
],
stairs['2'] = [ 0, 1
@panuta
panuta / gist:3075882
Last active May 7, 2024 13:33
How to setup Django server with virtualenv on Ubuntu Server 12.04

Fix locale problem

Open file /etc/default/locale to add or change LC_ALL to the following

LC_ALL="en_US.UTF-8"

Then logout and login again.

Install necessary packages

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@japerk
japerk / nltk_tokenize_tag_chunk.rst
Created February 25, 2012 16:36
NLTK Tokenization, Tagging, Chunking, Treebank

Sentence Tokenization

>>> from nltk import tokenize
>>> para = "Hello. My name is Jacob. Today you'll be learning NLTK."
>>> sents = tokenize.sent_tokenize(para)
>>> sents
['Hello.', 'My name is Jacob.', "Today you'll be learning NLTK."]
@eyeseast
eyeseast / gist:1519647
Created December 25, 2011 19:37
Christmas afternoon on a new laptop...
Successfully installed django django-celery django-debug-toolbar django-filebrowser django-flatblocks django-grappelli django-haystack django-memcache-status django-model-utils django-redis-cache django-smuggler django-tastypie BeautifulSoup docutils fabric feedparser geopy johnny-cache kombu mimeparse PIL psycopg2 pysolr python-memcached redis sorl-thumbnail south typogrify python-dateutil python-wordpress boto django-storages python-nameparser django-boundaryservice django-disqus django-picklefield celery python-digest ssh anyjson amqplib smartypants pycrypto
Cleaning up...
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@HarlanH
HarlanH / DSDC-Titles.R
Created September 26, 2011 12:44
Data Science DC Titles Visualization
# Data Science DC Titles Visualization
# Here's how this will work. In a main loop, a parameterized visualization function
# is called every N seconds. Each function gets the source spreadsheet fresh, and
# generates a visual.
# aspects of this code borrowed from Drew Conway:
# https://raw.github.com/drewconway/ZIA/master/R/better_word_cloud/better_word_cloud.R
library(plyr)
@palewire
palewire / dorling.py
Created September 20, 2011 08:26
Takes a GeoDjango queryset and creates a cartogram of circles based on the Dorling algorithm.
import math
from django.contrib.gis.geos import Point
class Cartogram(object):
"""
Takes a GeoDjango queryset and creates a cartogram of circles based on
the Dorling algorithm.
User must provide a queryset and strings pointing to the data attribute