Proposition: If
If we want to show that the product of two continuous functions is continuous, we need the following lemma:
Lemma: If
function counter(times, callback) { | |
var ct = 0; | |
return function() { | |
ct++; | |
if (ct === times) | |
callback(); | |
}; | |
}; | |
// register a counter function |
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) { |
Proposition: If
If we want to show that the product of two continuous functions is continuous, we need the following lemma:
Lemma: If
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 + ",");', |
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)) |
import requests | |
import os | |
twilio_sid = os.environ['TWILIO_SID'] | |
twilio_auth = os.environ['TWILIO_AUTH'] | |
twilio_url = 'https://api.twilio.com/2010-04-01/Accounts/%(twilio_sid)s/SMS/Messages.json' % locals() | |
weather_url = 'http://api.openweathermap.org/data/2.5/weather' | |
weather_params = {'q': 'montreal'} | |
r = requests.get(weather_url, params=weather_params) |
Table of contents
Fun problems (rendered at http://mathb.in/18258)
Find
Find
Let
Let
\documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format | |
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. | |
\geometry{letterpaper} % ... or a4paper or a5paper or ... | |
%\geometry{landscape} % Activate for for rotated page geometry | |
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent | |
\usepackage{graphicx} % Use pdf, png, jpg, or eps with pdflatex; use eps in DVI mode | |
% TeX will automatically convert eps --> pdf in pdflatex | |
\usepackage{amssymb} | |
\usepackage{amsmath} | |
\usepackage{epigraph} |