Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Run pyflakes on all changed .py files before commit. | |
| # | |
| # By David Warde-Farley, Feb 28, 2013 -- released under the 3-clause BSD license. | |
| # | |
| # To use, run this file from the script .git/hooks/pre-commit | |
| FILES=`git diff --staged --name-status |grep '\.py$' |grep '^[AM]' |sed -e's/^[AM]\s\+//'` | |
| ROOT=`git rev-parse --show-toplevel` | |
| NUM_BAD_FILES=0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Making R read data faster by precomputing the column | |
| # data types | |
| sample <- read.table("data.txt", nrows = 100) | |
| types <- sapply(sample, classes) | |
| allData <- read.table("data.txt", colClasses = classes) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # if you can, just use wget | |
| # wget -np -r remote_url | |
| import re | |
| import os | |
| import urllib2 | |
| import urlparse | |
| import pycurl | |
| from lxml import html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings, | |
| and don't need to be repeated here. Anything listed here will take precedence, however. | |
| */ | |
| [ | |
| { "keys": ["super+shift+n"], "command": "new_window" }, | |
| { "keys": ["super+shift+w"], "command": "close_window" }, | |
| { "keys": ["super+o"], "command": "prompt_open" }, | |
| { "keys": ["super+shift+t"], "command": "reopen_last_file" }, | |
| { "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id='presentation_mode'> | |
| <style> | |
| .pmode{ display: none !important } | |
| </style> | |
| <script> | |
| grp=0; | |
| pmode = function(){ | |
| init() | |
| cells = $('.cell') |