Collecting examples that break or do not break.
Next step is refactoring the broken bq example into the https requests example using the same http lib that bq does.
need to get to the root of why SSLErrors
are thrown
Collecting examples that break or do not break.
Next step is refactoring the broken bq example into the https requests example using the same http lib that bq does.
need to get to the root of why SSLErrors
are thrown
which?
$ which which
/usr/bin/which
$ which $(!!)
which $(which which)
/usr/bin/which
$ which $(!!)
which $(which $(which which))
/usr/bin/which
export AWS_CREDENTIAL_FILE=/Users/deanc/.aws_credential_file | |
export AWS_SECRET_ACCESS_KEY=$(cat $AWS_CREDENTIAL_FILE | grep -i secret | cut -d "=" -f 2) | |
export AWS_ACCESS_KEY_ID=$(cat $AWS_CREDENTIAL_FILE | grep -i access | cut -d "=" -f 2) |
def fib(n): | |
if n in (0,1): | |
return n | |
else: | |
return fib(n-1) + fib(n-2) | |
def memoize(n): | |
cache = {} | |
def helper(x): | |
if x not in cache: |
import time | |
bound,mem = 1000000,{} | |
def collatz(n): | |
if n==1: return [1] | |
else: return [n] + collatz(n/2 if (n%2==0) else 3*n+1) if (n>1) else [1] | |
def collatzCount_recursive_memoized(n): | |
if n not in mem: mem[n]= 1 + collatzCount_recursive_memoized(n/2 if (n%2==0) else 3*n+1) if (n>1) else 1 | |
return mem[n] |
import time | |
import itertools | |
import hashlib | |
def regular_for_loop(bound): | |
_md5 = hashlib.md5() | |
for i in itertools.repeat("foo", bound): | |
_md5.update(i) | |
import math | |
def isAbundant(n,f): #make this run fast | |
div = f(n) | |
return True if sum(div)>n else False | |
def factors_for_loop_plus_operator(n): | |
# bug, feed this a perfect square and the square root | |
# will be counted twice | |
div = [1] |
from time import time | |
def test(iterable): | |
start = time() | |
for i in range(scale): | |
if i in iterable: | |
a = 90.0 + 6000 | |
return time()-start | |
def aggregate(count,f,a): |
from time import time | |
from math import sqrt | |
def disproves(n): | |
i=2 | |
while i*i*2<n: | |
diff = n-i*i*2 | |
if not any(diff%j==0 for j in xrange(3,int(sqrt(diff))+1,2)) :return False | |
i+=1 | |
return True | |
n=3 |
Tynt = window.Tynt || []; | |
if (typeof Tynt.TIL == "undefined") { | |
(function() { | |
var Ja = function() { | |
var h = document, | |
l = h.body, | |
p = h.documentElement, | |
aa = eval("/*@cc_on!@*/false"), | |
ba = function(a, b) { |