This file contains 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 urllib2 | |
import json | |
opener = urllib2.build_opener() | |
# An object to collect the results | |
result = {'episodes':[]} | |
# Iterate from 1 to 31 | |
for i in range(1, 32): |
This file contains 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
/** | |
* Adds two (or more) vectors. | |
* | |
* @function add | |
* @param {Array|Object} vector1 The first vector | |
* @param {Array|Object} vector2 The second vector | |
* @param {Array|Object} [vector3] The third vector, ... | |
* @return {Object} The resulting vector | |
*/ | |
function add(v1, v2) { |
This file contains 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 map(val, low1, high1, low2, high2) { | |
return (val - low1) / (high1 - low1) * (high2 - low2) + low2; | |
} |
NewerOlder