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
var map = function () { | |
this.structure.keywords.keyword.forEach( | |
function (z) { | |
emit(z.name, {count_sum: z.count, count: 1}); | |
} | |
); | |
} | |
var reduce = function (key, values) { | |
var total = 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
import hashlib | |
import optparse | |
import os | |
def get_hash_data(file, type): | |
if type == "md5": | |
output = hashlib.md5() | |
elif type == "sha1": | |
output = hashlib.sha1() | |
elif type == "sha256": |
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
__description__ = 'Convert VT format to a user-friendly format' | |
__author__ = 'Brandon Dixon' | |
__version__ = '1.0' | |
__date__ = '2011/03/21' | |
import simplejson as json | |
import urllib | |
import urllib2 | |
import hashlib |
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 | |
__description__ = 'Get the MDL list and search a blob' | |
__author__ = 'Brandon Dixon' | |
__version__ = '1.0' | |
__date__ = '2011/19/01' | |
import optparse | |
import os |
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 pymongo | |
import json | |
from pymongo import Connection | |
def connect_to_mongo(host, port, database, collection): | |
connection = Connection(host, port) | |
db = connection[database] | |
collection = db[collection] | |
return collection |
NewerOlder