Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
| from distutils.core import setup, Extension | |
| import numpy | |
| import os | |
| os.environ['CC'] = 'g++'; | |
| setup(name='matt_simple_test', version='1.0', ext_modules =[Extension('_simple', | |
| ['simple.cc', 'simple.i'], include_dirs = [numpy.get_include(),'.'])]) |
| # standard compile options for the c++ executable | |
| FLAGS = -fPIC | |
| # the python interface through swig | |
| PYTHONI = -I/usr/include/python2.6/ | |
| PYTHONL = -Xlinker -export-dynamic | |
| # default super-target | |
| all: | |
| g++ -fPIC -c kitty.cc -o kitty.o |
This script has been adapted from a post on LA Times
| #!/usr/bin/env python | |
| # Trivial GARCH implementation in python | |
| # | |
| # From Peter Tessin's http://www.petertessin.com/TimeSeries.pdf | |
| # |
| # Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
| # Make sure you have IMAP enabled in your gmail settings. | |
| # Right now it won't download same file name twice even if their contents are different. | |
| import email | |
| import getpass, imaplib | |
| import os | |
| import sys | |
| detach_dir = '.' |
| """Chirp z-Transform. | |
| As described in | |
| Rabiner, L.R., R.W. Schafer and C.M. Rader. | |
| The Chirp z-Transform Algorithm. | |
| IEEE Transactions on Audio and Electroacoustics, AU-17(2):86--92, 1969 | |
| """ | |
| import numpy as np |
| [ | |
| // Modified Sublime-REPL keybindings for an "R-friendly" set of shortcuts. | |
| // Copy and paste this text into the Key Bindings - User (under Preferences menu). | |
| // For more information, see http://tomschenkjr.net/2012/05/17/using-sublime-text-2-for-r/ | |
| // Executes a selection of text in REPL, latter only displays code and does not execute | |
| { "keys": ["ctrl+shift+r"], "command": "repl_transfer_current", "args": {"scope": "selection"}}, | |
| { "keys": ["ctrl+shift+r", "r"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}}, | |
| // Executes the entire file (build) in REPL, latter only displays code and does not execute |
| Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
| (if you aren't using version 9.1.5, change line 6 with the correct version) | |
| 1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| 2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
| 3. brew update | |
| 4. brew upgrade postgresql | |
| 5. initdb /usr/local/var/postgres -E utf8 | |
| 6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
| 7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |