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
class Automata { | |
constructor() { | |
this.sentence = false; | |
} | |
run() { | |
while (true) { | |
console.log(`This sentence is ${this.sentence}.`); | |
if (this.sentence === false) { | |
this.sentence = true; |
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
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 |
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
ffmpeg -i Untitled.mov -r 30 -f gif - | gifsicle --optimize=3 > Untitled.gif |
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
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 |
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
AALS.co | |
ABBS.co | |
ABYE.co | |
ACYL.co | |
ADAW.co | |
ADZE.co | |
AERY.co | |
AESC.co | |
AGLU.co | |
AGLY.co |
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
require 'json' | |
require 'time' | |
require 'csv' | |
file = File.open("messages.json").read | |
messages = JSON.parse(file) | |
# consolidate | |
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
require 'nokogiri' | |
require 'time' | |
require 'json' | |
module Parser | |
extend self | |
def message(el) | |
raise "Requires Nokogiri::XML::Element" if el.class != Nokogiri::XML::Element |
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
### 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: |
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
var client = require("client") | |
client.on("navdata", function(data) { | |
if (condition === true) { | |
FlightController.doCoolStuff(data) | |
} else { | |
FlightController.reset() | |
} | |
}) |
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
var person = { | |
firstName: "JSON", | |
lastName: "Lim" | |
}; |
NewerOlder