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 env = process.env; | |
var cfg = { | |
foo: env.FOO_QUEUE || 'foo', | |
pattern: env.BIND_QUEUE_PATTERN, | |
amqpUrl: env.RABBIT_MQ_URL | |
}; | |
cfg.channel = { | |
// Channel method to invoke |
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
// Cassini projection | |
// just a transverse equirectangular projection | |
// implemented from wikipedia description | |
d2r = Math.PI / 180; | |
return Math.asin(Math.sin(x * d2r) * Math.cos(y * d2r)); |
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 sys,random | |
''' | |
USAGE | |
Let's say you want to read The Oxford Companion to Lulz, which has 819 pages. You would create a file with one line, "1:819", and save it as lulz.txt. Then you would run: | |
python bookmark.py lulz.txt | |
This would return a random page that you haven't yet read. Let's say it was 42. You then read from 42 to 50. You record this fact by running: |
NewerOlder