duplicates = multiple editions
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
/* BASICS */ | |
.CodeMirror { | |
/* Set height, width, borders, and global font properties here */ | |
font-family: monospace; | |
height: 300px; | |
} | |
.CodeMirror-scroll { | |
/* Set scrolling behaviour here */ | |
overflow: auto; |
import math | |
def total_cost(amount): | |
return int(math.ceil(amount + 0.5 + 0.01 * amount)) | |
def reduce_balance(balance, amount): | |
if amount < balance: | |
balance -= total_cost(amount) | |
return balance |
function build_hierarchy(list, key, tuple_func) { | |
var direct_hierarchy = list | |
.map(tuple_func) | |
.reduce(function(obj, tuple) { | |
tuple[0] in obj ? obj[tuple[0]].push(tuple[1]) : obj[tuple[0]] = [tuple[1]]; | |
return obj; | |
}, {}); | |
var hierarchy = Object.keys(direct_hierarchy) | |
.reduce(function(obj, type) { |
PSH 0 | |
PSH 1 | |
LOOP: SUM 2 | |
OUT | |
DUP | |
JMP EO_CHECK | |
EO_CONT: OUT | |
POP | |
SSZ | |
PSH 20 |
[submodule "running_programs"] | |
path = running_programs | |
url = https://gist.github.com/6554497.git | |
[submodule "chrome_status"] | |
path = chrome_status | |
url = https://gist.github.com/6525572.git | |
[submodule "frontApp"] | |
path = frontApp | |
url = https://gist.github.com/6522769.git |
tell application "System Events" | |
set programs to get name of every process whose background only is false and name is not "Finder" | |
set AppleScript's text item delimiters to {","} | |
programs as string | |
end tell |
tell application "System Events" | |
set chromeRunning to (length of (get name of every process whose name is "Google Chrome") is greater than 0) | |
set chromeInFocus to ((name of first application process whose frontmost is true) is "Google Chrome") | |
set activeURL to "" | |
set numTabs to 0 | |
if chromeRunning then | |
tell application "Google Chrome" | |
set normalWindows to (windows whose mode is not "incognito") |
#!/bin/sh | |
# computer activity data collection for http://jehiah.cz/one-two/ | |
# initially by Jehiah Czebotar. Modified by Joseph Adams | |
FILE="data/misc/activity_log/`date +%Y%m%d`.log" | |
FRONT_APP="data/misc/cron/frontApp/frontApp.applescript" | |
function log_activity() | |
{ | |
local UTC=`date "+%s,%Z"` |
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
) | |
type Turn struct { | |
Stack []string `json:"stack"` | |
Hand []string `json:"hand"` |