Skip to content

Instantly share code, notes, and snippets.

View katychuang's full-sized avatar

Dr. Kat katychuang

View GitHub Profile
@katychuang
katychuang / read_tweets.py
Created September 24, 2012 02:09 — forked from pvieytes/read_tweets.py
Parsing Twitter's user time with Python
import Tweet
import simplejson
import urllib2
def read_tweets(user, num_tweets):
tweets = []
url = "http://api.twitter.com/1/statuses/user_timeline.json?\
screen_name=%s&count=%s&include_rts=true" % (user, num_tweets)
file = urllib2.urlopen(url)
@katychuang
katychuang / LineChart-Flotr2.js
Last active December 10, 2015 01:18
line chart made with Flotr2.js library
/* Flotr2 line chart with data points and labels */
(function basic_bars(container, horizontal) {
var
horizontal = (horizontal ? true : false), // Show horizontal bars
d1 = [[0, 18.9],[1, 20.2],[2, 18.1],[3, 20.4],[4, 16.7], [5, 14.6]], // data series
point; // Data point variable declaration
// Draw the graph
Flotr.draw(
@katychuang
katychuang / rename.py
Created April 24, 2013 18:48
Rename images in a directory
"""
Title: Batch Image File Renaming
Author: Kat Chuang @katychuang
Copied from http://stackoverflow.com/questions/9835243/python-rename-multiple-image-files
"""
import os
# Create a list of files from the current directory who's last 4 characters
# as lowercase are either '.jpg'

Python Number Conversion Chart

From To Expression
@katychuang
katychuang / 2013-10-09-NYCPyLadies-Workshop.md
Last active December 24, 2015 15:29
Files for PyLadies Intro to Python 1: Setting up development environment

Getting Started with Python

NYC PyLadies

RSVP at the event page

Agenda for the evening:

  • (Few mins) Introductions around the group and possibly breaking into smaller groups, of 6-8 each.
  • (15-20mins) Attendees will install python (see links below in download links file)
@katychuang
katychuang / 2013-10-24-NYHaskell-GettingStartedWithHaskell.md
Last active December 25, 2015 00:49
Files for Getting Started with Haskell

Event page

Tentative Agenda for the evening:

  • Introductions around the group
  • Segment 1: Installations. Break into smaller groups based on OS.
  • Segment 2: Projects. Select one of 3 tracks

Please bring:

  • wifi enabled laptop
@katychuang
katychuang / 2013-10-23-Intro-to-Git.md
Last active December 25, 2015 05:59
Notes for Intro to Git/Github

NYC Pyladies Workshop

Intro to Git/Github

October 23, 2013 7-9pm RSVP

##Agenda

  • General Announcements

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname