Proposition: If
If we want to show that the product of two continuous functions is continuous, we need the following lemma:
Lemma: If
from random import randint | |
def run(goal, runs): | |
total = 0 | |
for x in xrange(runs): | |
sequence = [] | |
for i in xrange(3): | |
sequence.append(randint(0,1)) | |
while sequence[-3:] != goal: | |
sequence.append(randint(0,1)) |
var quote = String.fromCharCode(39); | |
var source = [ | |
'var quote = String.fromCharCode(39);', | |
'var source = [', | |
' ', | |
'];', | |
'console.log(source[0]);', | |
'console.log(source[1]);', | |
'source.forEach(function(line) {', | |
' console.log(source[2] + quote + line + quote + ",");', |
Proposition: If
If we want to show that the product of two continuous functions is continuous, we need the following lemma:
Lemma: If
var _ = require('underscore'); | |
var freqVector = function(word, letters) { | |
var freq = _.groupBy(word.split(''), function(l) {return l;}); | |
return _.map(letters, function(l) { | |
return freq[l] ? freq[l].length : 0; | |
}); | |
}; | |
var dot = function(v1, v2) { |
function counter(times, callback) { | |
var ct = 0; | |
return function() { | |
ct++; | |
if (ct === times) | |
callback(); | |
}; | |
}; | |
// register a counter function |