Skip to content

Instantly share code, notes, and snippets.

View katychuang's full-sized avatar

Dr. Kat katychuang

View GitHub Profile
@katychuang
katychuang / osx10.9_ghc7.6.md
Created February 18, 2014 18:26
Installing & Building GHC with OSX Mavericks GHC

Were you trigger happy with the installation of OSX Mavericks? Here are quick steps to bring your haskell back. Tips referenced from cartazio:

  1. Make sure you have xcode 5 cli tools for OSX Mavericks installed. Go to that link, download and install.

  2. Get the proper gcc version. Open up your terminal and type brew install apple-gcc42 and then followed by brew link apple-gcc42. Test things out with a fresh new terminal window and type which gcc-4.2. Note that you may have to update brew update. (you may have to uninstall or brew update, or brew link apple-gcc42)

$ brew install apple-gcc42
==> Downloading http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg
@katychuang
katychuang / README.md
Last active August 29, 2015 13:57
The New York City Haskell Hackathon

The first Hac NYC, a Haskell hackathon/get-together will be held April 4-6 in New York City.

You must officially register with [the registration form][1] to attend.

Official information can be found on the [wiki page][2].


@katychuang
katychuang / README.md
Last active August 29, 2015 13:58
Installing GHC from binary (OSX/Linux)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
#boroughs {
stroke: grey;
stroke-width: 2px;
fill: #C4CAC5;
}
</style>
@katychuang
katychuang / participation.md
Last active August 29, 2015 14:02
organizer notes for data mascara

Data Mascara: NYC Python's data themed office hours, Monday evenings 7-9pm

###Speakers:

Chatting about basic skills is useful, or even best practices would be really interesting everyone attending. You can talk about a project you've worked on or pick a theme from the list of themes.

###Volunteers:

It doesn't matter what level of Python you have, we welcome everyone's help. From setting up and cleaning up for events, to finding speakers and interesting topics - more folks help things go smoother. If you would like to share your expertise in Python, stop by to help answer questions!

@katychuang
katychuang / List.md
Last active August 29, 2015 14:04
Haskell Ethnography Ideas

I'm new to Haskell and have been asked to document my experience of learning this language, as it'd be valuable to the community. I will be using a research method from Anthropology, called Ethnography. The outcome of this ethnography is field notes.

What are field notes?

Field notes refer to transcribed notes or the written account derived from data collected during observations and interviews. There are many styles of field notes, but all field notes generally consist of two parts: descriptive in which the observer attempts to capture a word-picture of the setting, actions and conversations; and reflective in which the observer records thoughts, ideas, questions and concerns based on the observations and interviews.

To make best use of time (and not make this a full time gig), I'm asking the Haskell Community for ideas on where I should focus my attention, or "case studies". Feel free to comment below or tweet me [@katychuang](http://twitter.com/katychua

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Generated with d3-generator.com -->
<html>
<head>
<title>Bar Chart</title>
<meta http-equiv="X-UA-Compatible" content="IE=9">
</head>
<body>
<div id="chart"></div>
<script src="http://d3js.org/d3.v2.min.js"></script>
@katychuang
katychuang / Install-Nix.md
Last active August 29, 2015 14:14
nix installation on OSX 10.10 with ghc 7.8 and Cabal-1.22

To install nix on OSX10.10, I first followed this [nixos.org wiki guide][1] shared by @boothead, and then found [this guide][3] on setting up a haskell environment with nix. See config.nix file below. I made one change from the tutorial, which is to change ghc783 to ghc784 (line 13).

After creating the file ~/.nixpkgs/config.nix, I skipped the ghc76 stuff and went straight to nix-env -i env-ghc78. It took a bit more than 2 hrs on an 8gb ram MBA for everything to build and link. The end result says

building path(s) ‘/nix/store/6rcj8chl2vim4mry5k7w8gs7nxifxixc-user-environment’
created 51 symlinks in user environment

Then finally: load-env-ghc78 loaded up a shell from which I could ghci

@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(