Skip to content

Instantly share code, notes, and snippets.

View amckinley's full-sized avatar

Austin McKinley amckinley

View GitHub Profile
from __future__ import print_function
from os.path import basename
import math
import sys
import numpy as np
# FIXME: look into decimal type
[Ben]
LogLevel=1
FilePrinting=false
ConsolePrinting=true
ScreenPrinting=false
[Bob]
LogLevel=1
FilePrinting=false
ConsolePrinting=true
ScreenPrinting=false
npm ERR! Error: No compatible version found: uglify-js@'^2.4.19'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.1.0","1.1.1","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6",
"1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","2.2.0","2.2.1","2.2.2","2.2.3","2.2.4","2.2.5","2.3.0","2.3.1","2.3.2","2.3.3","2.3.4","2.3.5","2.3.6","1.3.5","2.4.0","2.4.1","2.4.2","2
.4.3","2.4.4","2.4.5","2.4.6","2.4.7","2.4.8","2.4.9","2.4.10","2.4.11","2.4.12","2.4.13","2.4.14","2.4.15","2.4.16","2.4.17","2.4.18","2.4.19","2.4.20","2.4.21","2.4.22","2.4.23
"]
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:684:10)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:606:10
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR! at Object.oncomplete (fs.js:107:15)
def fibsy(n, i, g, s):
if n > 0 and g == 0:
n -= 1
print 0
return fibsy(n, i, 1, s)
elif n > 0 and s == True:
n -= 1
print 1
return fibsy(n, 1, g, False)
elif n > 0:
def fib(n):
if n == 0:
return 0, 0
if n == 1:
return 1, 0
a, a_cnt = fib(n-1)
b, b_cnt = fib(n-2)
return a + b, (a_cnt + b_cnt + 2)
{
"pools" : {
"sessions-pool" : {
"servers" : [
<snip>
]
},
"wildcard-pool": {
"servers" : [
FAILURE 1439925502.912394 1540 [AsyncMcClient] [other] [mcrouter] network/AsyncMcClientImpl.cpp:570] Error: "Error parsing message 'VALUE account_rep_change_23424742 0 22\r\n0\000\007q\021\005reset\nU\323\222\?\r\n\000\000\000\000\000\000END\r\nVALUE Model_Account_22479213 0 28\r\nModel_Account_22479213_20031\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\n' at character 62!", client state: UP, remote endpoint: imgur-cache.tumysy.0002.use1.cache.amazonaws.com:11211:TCP:ascii, number of requests sent through this client: 10636, McClientRequestContextQueue info: Currently have 0 timedout initializers, 0 requests in replied queue, 10 requests in pending reply queue, 0 requests in write queue and 8 requests in pending queue, the first alive request is: OperationT is N8facebook8memcache11McOperationILi5EEE, RequestT is N8facebook8memcache9McRequestE, serialized data was: "get account_rep_change_23424742\r\n"
"libmcrouter.mcrouter.11211": {"async_spool":"/var/spool/mcrouter","asynclog_disable":"0"
def cool_method(a):
a.append(42)
def main():
a = [1,2,3]
cool_method(a)
print a
if __name__ == '__main__':
main()
ubuntu@ip-10-150-95-71:~/deploy$ dig housewinsor.com @ns-1714.awsdns-22.co.uk
; <<>> DiG 9.9.5-3-Ubuntu <<>> housewinsor.com @ns-1714.awsdns-22.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52384
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
>>> foo = bytearray(5)
>>> foo[0] = 100
>>> foo[0] = 500
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: byte must be in range(0, 256)
>>> foo[0]
100
>>> chr(foo[0])
'd'