This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import couchdb | |
view = { | |
"_id": "_design/seeds", | |
"fulltext": { | |
"by_seed": { | |
"index": """function(doc) { | |
if (doc.seeds) { | |
var d = new Document(); | |
for (var i=0; i<doc.seeds.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@docker-blr:~# mtr -w --report apt.dockerproject.org | |
Start: Mon Aug 1 02:22:19 2016 | |
HOST: docker-blr Loss% Snt Last Avg Best Wrst StDev | |
1.|-- 139.59.16.253 0.0% 10 2.1 2.3 1.8 2.8 0.0 | |
2.|-- 138.197.249.14 0.0% 10 0.3 0.3 0.2 0.3 0.0 | |
3.|-- 124.124.67.154 0.0% 10 2.0 7.1 1.6 53.7 16.4 | |
4.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0 | |
5.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0 | |
6.|-- 220.227.64.209 0.0% 10 12.1 13.0 12.0 21.2 2.8 | |
7.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've noticed that on digital ocean droplets, the second download is way faster than the first one. Does it mean digital ocean diverting all the traffic in the droplets via a caching proxy? | |
****** | |
anand@docker0:/tmp$ wget https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.10.0-0~jessie_amd64.deb | |
--2016-07-28 14:35:51-- https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.10.0-0~jessie_amd64.deb | |
Resolving apt.dockerproject.org (apt.dockerproject.org)... 54.192.151.51 | |
Connecting to apt.dockerproject.org (apt.dockerproject.org)|54.192.151.51|:443... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 8552538 (8.2M) [application/vnd.debian.binary-package] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search(array, sum, expected, head, tail) | |
if head > tail | |
return false | |
elsif sum == expected | |
return [head, tail] | |
else | |
return (search(array, sum - array[head], expected, head+1, tail) or search(array, sum - array[tail], expected, head, tail-1)) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Program to reproduce a bug that appears when used with Python 3. | |
How to reproduce: | |
1. Run the dev server | |
$ python unibug.py | |
http://0.0.0.0:8080/ | |
2. Open the following URL in your browser. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BSNL | |
# Primary DNS Server: 218.248.245.1 | |
# Secondary DNS Server: 218.248.255.141 | |
# | |
# In this case the secondary DNS server looks unhealthy. | |
# Taking too long to respond or failing to respond. | |
$ time dig @218.248.255.141 archive.org | |
; <<>> DiG 9.6-ESV-R4-P3 <<>> @218.248.255.141 archive.org |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notes from Advanced Python Workshop by Anand Chitipothu conducted on Nov 14-16, 2013 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.