Skip to content

Instantly share code, notes, and snippets.

View scottlingran's full-sized avatar

Scott Lingran scottlingran

  • Melbourne, Australia
View GitHub Profile
function cdf(x, mean, variance) {
return 0.5 * (1 + erf((x - mean) / (Math.sqrt(2 * variance))));
}
function erf(x) {
// save the sign of x
var sign = (x >= 0) ? 1 : -1;
x = Math.abs(x);
// constants
ffmpeg -i Untitled.mov -r 30 -f gif - | gifsicle --optimize=3 > Untitled.gif
import numpy
import six
from modelfile import model
# Inputs
positive = []
negative = []
# add weights for each word, if not already present;
# default to 1.0 for positive and -1.0 for negative words
AALS.co
ABBS.co
ABYE.co
ACYL.co
ADAW.co
ADZE.co
AERY.co
AESC.co
AGLU.co
AGLY.co
require 'json'
require 'time'
require 'csv'
file = File.open("messages.json").read
messages = JSON.parse(file)
# consolidate
require 'nokogiri'
require 'time'
require 'json'
module Parser
extend self
def message(el)
raise "Requires Nokogiri::XML::Element" if el.class != Nokogiri::XML::Element
### Keybase proof
I hereby claim:
* I am locksley on github.
* I am scottli (https://keybase.io/scottli) on keybase.
* I have a public key whose fingerprint is 4B9E 5CA6 E95F 1F90 8716 7817 C525 F672 8D53 8B5B
To claim this, I am signing this object:
var client = require("client")
client.on("navdata", function(data) {
if (condition === true) {
FlightController.doCoolStuff(data)
} else {
FlightController.reset()
}
})
var person = {
firstName: "JSON",
lastName: "Lim"
};
OP_TRUE OP_TRUE
0200000079b6420b5e18501910e0e614251a49e5575a31ed18f1fc910db15276000000001a66b7f27f61b7658ddb54da0ce03cdc4ac8df9d46e906fb8df77f1446f55ad80c622851ffff001d97a10d6d OP_TRUE
OP_FALSE 3045022100c6e988d2ed821b7adae89a1f2dee7eb8af1bf2c65f9b915f0290a4ee913f6b1502201ef9a7e663b3b88ebddbc0c822e8ea2ba4d22ed082fca0729d510096f72bf69401 OP_DUP OP_TRUE
3045022100df62ca8f5381fb07a529e22e401231d2be162c1b8b95d2e4453c2c2042974afa02200a624efcdaf7e5e35849a8934e8603163f43aecc5335f402eeaaf38e7355014501 OP_TRUE
304402204ab6fc7289edf86ae784451031b3364eca8c7980eff5c016c8ff2e8c33e9837b02200cad39ad1d266ed00ee4bcd052d1d50ddb15b75d39ae23bb69383469b3ceffeb01 03bb52138972c48a132fc1f637858c5189607dd0f7fe40c4f20f6ad65f2d389ba4 OP_TRUE