Skip to content

Instantly share code, notes, and snippets.

package main
import (
"example/newmath"
"fmt"
)
func main() {
fmt.Printf("Hello World. Sqrt(2) = %v\n", newmath.Sqrt(2))
@pmembrey
pmembrey / Validation.py
Created March 7, 2013 03:47
Validation script from the QSTK. Adding here for easy download in the Computational Investing Part 1 class.
'''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on February, 9, 2013
@author: Sourabh Bajaj
@contact: sourabhbajaj@gatech.edu
@pmembrey
pmembrey / output.txt
Last active December 14, 2015 12:48
Installing a specific version of pandas on OSX.
$ sudo easy_install pip
$ sudo pip install pandas==0.7.3
$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> pandas.__version__
'0.7.3'
>>>
@pmembrey
pmembrey / qstk-fedora-install.sh
Last active December 14, 2015 12:48
Quick script to install the Quant Toolkit on Fedora 18. It's adapted from the Ubuntu installation script that comes with the package. I completed tutorial one on the wiki without any problems so it appears to work. There's no error checking and your mileage may vary... Note: I've installed pandas directly with yum, but pip-python seems to instal…
#!/bin/bash
#Copyright (c) 2013, Peter Membrey <peter@membrey.hk>
#All rights reserved.
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
#conditions are met:
@pmembrey
pmembrey / gist:3963286
Created October 27, 2012 07:13
Installing Erlang on RHEL
yum groupinstall 'Development Tools'
yum install ncurses-devel openssl-devel
wget http://www.erlang.org/download/otp_src_R15B02.tar.gz
tar -zxvf otp_src_R15B02.tar.gz
cd otp_src_R15B02
./configure --prefix=/opt/otpr15b02
make
make install
@pmembrey
pmembrey / install_squeak.sh
Created October 20, 2012 16:36
Install Squeak on Raspberry Pi (from jstout on the Raspberry Pi forums)
echo "Fetching sources for Squeak..."
wget -r -O SqueakV41.sources.gz http://ftp.squeak.org/4.1/SqueakV41.sources.gz
echo "(g)Unzipping sources.."
gunzip -f SqueakV41.sources.gz
echo "Fetching image and changes..."
wget -r -O Squeak-4.3-All-in-One.zip http://ftp.squeak.org/4.3/Squeak-4.3-All-in-One.zip
echo "Unzippping image and changes files..."
unzip -j -o Squeak-4.3-All-in-One.zip "Squeak-4.3-All-in-One.app/Contents/Resources/Squeak4.3.*"
echo "Moving sources, image, and changes files to Squeak directory..."
sudo mv SqueakV41.sources /usr/share/squeak
@pmembrey
pmembrey / uppercaser2.asm
Created August 15, 2012 16:31
First assembly project
SECTION .bss ; Section containing uninitialized data
BUFFLEN equ 1024 ; Length of buffer
Buff: resb BUFFLEN ; Text buffer itself
SECTION .data
SECTION .Text
global _start
@pmembrey
pmembrey / blackscholes.erl
Created April 2, 2012 00:33
Black Scholes in Erlang
% Simple Black Scholes implementation for Erlang
% Author: Peter Membrey
% Date: 5th March 2012
% Based on Python version by Andy Smith at:
% http://www.espenhaug.com/black_scholes.html
%
-module(blackscholes).
-compile(export_all).