# Path: dgitcore/plugins/instrumentation.py
# class InstrumentationBase(object):
#     """
#     Pre-computed patterns
#     """
#     def __init__(self, name, version, description, supported=[]):
#         self.enable = 'y'
#         self.name = name
#         self.version = version
#         self.description = description
#         self.support = supported + [name]
#         self.initialize()
# 
#     def initialize(self):
#         return
# 
#     def config(self, what='get', params=None):
#         return
# 
# Path: dgitcore/config.py
# def get_config():
#     if config is None:
#         init()
#     return config


import os, sys
import mimetypes
from dgitcore.plugins.instrumentation import InstrumentationBase
from dgitcore.config import get_config
from hashlib import sha1
from messytables import (CSVTableSet, type_guess, headers_guess,
                         offset_processor, DateType, StringType,
                         DecimalType, IntegerType,
                         DateUtilType, BoolType,
                         rowset_as_jts, headers_and_typed_as_jts)
#!/usr/bin/env python




def compute_sha1(filename):

    h = sha1()
    fd = open(filename)
    while True:
        buf = fd.read(0x1000000)
        if buf in [None, ""]:
            break
        h.update(buf.encode('utf-8'))

# Path: dgitcore/plugins/instrumentation.py
# class InstrumentationBase(object):
#     """
#     Pre-computed patterns
#     """
#     def __init__(self, name, version, description, supported=[]):
#         self.enable = 'y'
#         self.name = name
#         self.version = version
#         self.description = description
#         self.support = supported + [name]
#         self.initialize()
# 
#     def initialize(self):
#         return
# 
#     def config(self, what='get', params=None):
#         return
# 
# Path: dgitcore/config.py
# def get_config():
#     if config is None:
#         init()
#     return config


# Path: dgitcore/contrib/instrumentations/content.py
import os, sys
import mimetypes
from dgitcore.plugins.instrumentation import InstrumentationBase
from dgitcore.config import get_config
from hashlib import sha1
from messytables import (CSVTableSet, type_guess, headers_guess,
                         offset_processor, DateType, StringType,
                         DecimalType, IntegerType,
                         DateUtilType, BoolType,
                         rowset_as_jts, headers_and_typed_as_jts)

#!/usr/bin/env python




def compute_sha1(filename):

    h = sha1()
    fd = open(filename)
    while True:
        buf = fd.read(0x1000000)
        if buf in [None, ""]:
            break
        h.update(buf.encode('utf-8'))

    return h.hexdigest()