duplicates = multiple editions
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
| import Data.Function (on) | |
| import Data.List (sort, sortBy, groupBy, nub) | |
| import Data.List.Utils (replace) | |
| import Data.Ord (comparing) | |
| import Data.Either (rights) | |
| import Control.Monad (liftM) | |
| import System.Environment (getArgs) | |
| import Text.Parsec.Error (ParseError) |
| # maybe.py - a Pythonic implementation of the Maybe monad | |
| # Copyright (C) 2014. Senko Rasic <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # |
| public class AccessBenchmark { | |
| private final long N = 1000000000; | |
| private static final int M = 1; | |
| private LocalClass instanceVar; | |
| private class LocalClass { | |
| public void someFunc() {} | |
| } |
| 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"` |