I hereby claim:
- I am ehmo on github.
- I am turek (https://keybase.io/turek) on keybase.
- I have a public key whose fingerprint is 97D9 5F5C 45AF 0D22 AF72 8CA8 6D15 F112 A4FE 9431
To claim this, I am signing this object:
| def NewTorIP(): | |
| s = socket.socket() | |
| s.connect(('localhost', 9051)) | |
| s.send("AUTHENTICATE\r\n") | |
| r = s.recv(1024) | |
| if r.startswith('250'): | |
| s.send("signal NEWNYM\r\n") | |
| r = s.recv(1024) | |
| if r.startswith('250'): | |
| return True |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import random | |
| import time | |
| n = 10000000 | |
| t0 = time.time() | |
| l = range(n) |
I hereby claim:
To claim this, I am signing this object:
| >>> import locale | |
| >>> locale.setlocale(locale.LC_ALL, 'en_US') | |
| 'en_US' | |
| >>> = locale.format("%d", 123456789, grouping=True) | |
| 123,456,789 | |
| >>> locale.setlocale(locale.LC_ALL, 'sk_SK') | |
| 'sk_SK' | |
| >>> locale.format("%d", 123456789, grouping=True) | |
| 123 456 789 |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| // Integer power: compute a**b using binary powering algorithm |
| script = webpage.xpath( | |
| "//script[re:match(text(), 'params')]", | |
| namespaces={ | |
| "re": "http://exslt.org/regular-expressions" | |
| } | |
| )[0].text |
| # Fast fibonacci function in pure SQL | |
| # Tested on Postgresql 9.5 | |
| CREATE OR REPLACE FUNCTION _fib ( | |
| n integer, a bigint, b bigint | |
| ) RETURNS bigint AS $$ | |
| BEGIN | |
| IF n < 1 THEN | |
| RETURN b; | |
| END IF; |
| -- Super fast quasi fibonacci function for postgresql | |
| -- Returns rounded big integer | |
| CREATE OR REPLACE FUNCTION fib ( | |
| n integer | |
| ) RETURNS bigint AS $$ | |
| BEGIN | |
| IF n > 91 THEN | |
| RAISE EXCEPTION 'Bigint overflow past fib(91) [%]', n; | |
| END IF; |
| // define constants for bytesize | |
| type ByteSize float64 | |
| const ( | |
| _ = iota | |
| KB ByteSize = 1 << (10 * iota) | |
| MB | |
| GB | |
| TB |
| CREATE OR REPLACE FUNCTION citus_run_on_3_colocated_placements(table_name1 regclass, | |
| table_name2 regclass, | |
| table_name3 regclass, | |
| command text, | |
| parallel bool default true, | |
| OUT nodename text, | |
| OUT nodeport int, | |
| OUT shardid1 bigint, | |
| OUT shardid2 bigint, | |
| OUT shardid3 bigint, |