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
#!/usr/bin/python | |
""" | |
Usage: | |
python bir.py <duns_number> | |
""" | |
import sys | |
import requests | |
import traceback |
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
suds==0.4 | |
wsgiref==0.1.2 |
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
#!/usr/bin/env python | |
import sys | |
import json | |
CHUNK_SIZE = 500 | |
def chunks(l, n): | |
""" Yield successive n-sized chunks from array l | |
""" |
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
convert Sreeni3.png -resize 600x400 -gravity Center -crop 400x400+0+0 +repage sreeni.jpg |
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
214567885 | |
247933872 | |
302150912 | |
362241452 | |
362328580 | |
362528379 | |
364744867 | |
481794956 | |
654502665 | |
754683795 |
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
# Load a MongoDB collection with test data | |
## Let's load some sample data in mongo | |
curl -s 'http://www.json-generator.com/j/cdQGOkHUoi?indent=4' | mongoimport --db playpen --collection people --jsonArray | |
mongo playpen | |
## Create facets based on this [walkthru](http://blog.mongodb.org/post/59757486344/faceted-search-with-mongodb) | |
db.people.ensureIndex({"facets3.age" : 1}) |
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
[ | |
{ | |
"picture": "http://placehold.it/32x32", | |
"about": "Do do reprehenderit quis ipsum sit esse quis occaecat culpa enim excepteur. Consectetur deserunt pariatur laboris mollit eiusmod nulla exercitation nulla et aute aliqua commodo. Laboris irure ut cupidatat qui. Ut ut adipisicing cupidatat nisi sunt ipsum reprehenderit ullamco eiusmod incididunt sunt ullamco veniam tempor. Commodo reprehenderit tempor amet incididunt ea ea deserunt minim ex aliqua consectetur.\r\n", | |
"balance": "$1,651.00", | |
"name": "Hardy Davis", | |
"randomArrayItem": "cherry", | |
"phone": "+1 (881) 441-2106", | |
"gender": "male", | |
"age": 24, |
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
[ | |
["Days", "Orders", "Items ", "AOV", "Average Item/Order"], | |
["14-Dec-13", 45, 90, 45, 2], | |
["15-Dec-13", 15, 40, 23, 2.5] | |
] |
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 enum(**enums): | |
return type('Enum', (), enums) | |
WORDS = enum(PARTIAL = 1, SANDBOX = 2, SCRAMBLED = 4, LEGACY = 8, PRODUCTION = 16, TRUNCATED = 32) | |
envs = { | |
'http://api.dnbdirectapps.com/dev/' : WORDS.SANDBOX + WORDS.PARTIAL + WORDS.SCRAMBLED + WORDS.TRUNCATED, | |
'http://dnbdirect-sandbox.dnb.com/' : WORDS.SANDBOX + WORDS.SCRAMBLED + WORDS.LEGACY, | |
'http://dnbdirect-api.dnb.com/' : WORDS.PRODUCTION, | |
} |
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
// run this in your console… | |
(function(){ | |
var nc = (new Date()).valueOf(); | |
jQuery('style').each(function() { | |
var c = this.innerHTML; | |
if (c.indexOf('@import')!==-1) | |
this.innerHTML = c.replace('.css?', '.css?' + nc ); | |
}); | |
})(); |