Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
<a href="http://foursquare.com" rel="nofollow">foursquare</a> | |
<a href="http://instagram.com" rel="nofollow">Instagram</a> |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/bin/bash | |
sandbox="$(mktemp -d)" | |
hasstdin=false | |
if [ ! -t 0 ]; then | |
cat <&0 > "$sandbox/stdin.txt" | |
hasstdin=true | |
fi |
from subprocess import Popen, PIPE, STDOUT | |
import subprocess | |
import math, sys | |
from time import sleep | |
from os import path, access, W_OK, R_OK, F_OK | |
def cut(movie, start, clip): | |
subprocess.Popen(["ffmpeg", #Calls ffmpeg program | |
"-ss",str(start), #Begining of recording, must be string | |
"-t", '30', #How long to record clip for, must be a string |
A Dashing widget for displaying the number of visitors to your website over a specified timeframe, as reported by Google Analytics
These versions of runtime.s
works by simulating the break region that is not present in either operating system. The region that it initially allocates is 4MB in size and can be increased by modifying the brk_region_size
value. In case where it does run out of memory, it will jump to __exception
and consequently terminate the process.
runtime.s
for Mac OS X does not have any library dependencies.
# i claim no copyright on this code and place it in the public domain. | |
# do whatever you want with this code... | |
import argparse | |
parser = argparse.ArgumentParser(description='show differences of two views') | |
o = parser.add_argument | |
o('files', type=str, help='files to process', nargs='+') | |
#o('-b', '--boolarg', action='store_true', help="") | |
#o('-s', '--strarg', help="") | |
args = parser.parse_args() |
PEP-8 is a set of Python style recommendations. pep8
is a module that checks your .py
file for violations. To make your Travis-CI build fail if you have any violations, you could add these lines to your .travis.yml
:
before_install:
- pip install pep8
script:
# Run pep8 on all .py files in all subfolders
# (I ignore "E402: module level import not at top of file"
# because of use case sys.path.append('..'); import <module>)
import Ember from 'ember'; | |
import moduleForAcceptance from '../helpers/module-for-acceptance'; | |
import sinon from 'sinon'; | |
const { Test } = Ember; | |
moduleForAcceptance('Acceptance | error', { | |
beforeEach() { | |
this.sandbox = sinon.sandbox.create(); |
def sliding_window(data, size, stepsize=1, padded=False, axis=-1, copy=True): | |
""" | |
Calculate a sliding window over a signal | |
Parameters | |
---------- | |
data : numpy array | |
The array to be slided over. | |
size : int | |
The sliding window size |