git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/usr/bin/python2 | |
# Copyright (C) 2016 Sixten Bergman | |
# License WTFPL | |
# | |
# This program is free software. It comes without any warranty, to the extent | |
# permitted by applicable law. | |
# You can redistribute it and/or modify it under the terms of the Do What The | |
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
// Galaxy collisions | |
Star[] Stars; | |
PVector[] galp; | |
PVector[] galv; | |
color[] galcol, galcol2; | |
boolean paused = false; | |
int side = 100; // border around Stars' initial positions | |
int Startot = 300; // number of Stars | |
int obsize = 10; // size of Stars |
import math | |
class Welford(object): | |
""" Implements Welford's algorithm for computing a running mean | |
and standard deviation as described at: | |
http://www.johndcook.com/standard_deviation.html | |
can take single values or iterables | |
Properties: | |
mean - returns the mean |
/* | |
* NAME | |
* | |
* statistics-distributions.js - JavaScript library for calculating | |
* critical values and upper probabilities of common statistical | |
* distributions | |
* | |
* SYNOPSIS | |
* | |
* |
#!/usr/bin/env python | |
# Haversine formula example in Python | |
# Author: Wayne Dyck | |
import math | |
def distance(origin, destination): | |
lat1, lon1 = origin | |
lat2, lon2 = destination |
import requests | |
API_KEY = 'YOUR_API_KEY' | |
BASE_URL = 'http://social.repustate.com/%(api_key)s/%(call)s.json' | |
# Create a new data source. | |
kwargs = {'api_key':API_KEY, 'call':'add-datasource'} | |
response = requests.post(BASE_URL % kwargs, {'name':'Rob Ford', 'language':'en', 'niche':'general'}) | |
datasource_id = response.json()['datasource_id'] |
// Depends on `through` | |
// | |
// $ npm install through | |
// | |
// Usage: | |
// | |
// $ echo 'hello' | node stdin-and-fs-stream.js | |
// $ echo 'hello' > tmp && node stdin-and-fs-stream.js tmp | |
// | |
var fs = require('fs'), |
// Part of https://github.com/chris-rock/node-crypto-examples | |
// Nodejs encryption of buffers | |
var crypto = require('crypto'), | |
algorithm = 'aes-256-ctr', | |
password = 'd6F3Efeq'; | |
var fs = require('fs'); | |
var zlib = require('zlib'); |