<commit_before>#!/usr/bin/env python
# encoding: utf-8

import sys, os

def main():
    #print 'Cleaning...'
    cwd = os.path.abspath(os.path.dirname(__file__))
    
    try:
        from map import *
    except Exception, e:
        return False
    
    for bundle in BUNDLE_MAP:
        bundle_path = BUNDLE_MAP[bundle]['path']
        bundle_hash = BUNDLE_MAP[bundle]['hash']
        bundle_type = BUNDLE_MAP[bundle]['type']
        rm_string = 'git rm %s/../../mediaroot/%s%s_min_%s.%s' % (cwd, bundle_path, bundle,bundle_hash,bundle_type)

        try:
            #print rm_string
            os.system(rm_string)   
            #print 'Removed %s' % bundle
        except Exception, e:
            print 'Could not remove the %s bundle' % bundle
            pass
    
    try:
        rm_map_string = 'git rm %s/map.py*' % cwd
        #print rm_map_string
        os.system(rm_map_string)
    except Exception, e:
        print 'Could not remove the map'
        pass

    return True

if __name__ == '__main__':
	main()<commit_msg>Updated the cleaner script with static import<commit_after>#!/usr/bin/env python
# encoding: utf-8

import sys, os

from map import BUNDLE_MAP

def main():
    #print 'Cleaning...'
    cwd = os.path.abspath(os.path.dirname(__file__))
    '''
    try:
        from map import *
    except Exception, e:
        return False
    '''
    
    for bundle in BUNDLE_MAP:
        bundle_path = BUNDLE_MAP[bundle]['path']
        bundle_hash = BUNDLE_MAP[bundle]['hash']
        bundle_type = BUNDLE_MAP[bundle]['type']
        rm_string = 'git rm %s/../../mediaroot/%s%s_min_%s.%s' % (cwd, bundle_path, bundle,bundle_hash,bundle_type)
        
        try:
            #print rm_string
            os.system(rm_string)   
            #print 'Removed %s' % bundle
        except Exception, e:
            print 'Could not remove the %s bundle' % bundle
            pass
    
    try:
        rm_map_string = 'git rm %s/map.py' % cwd
        #print rm_map_string
        os.system(rm_map_string)
    except Exception, e:
        print 'Could not remove the map'
        pass
        
    try:
        rm_map_pyc_string = 'rm %s/map.pyc' % cwd
        os.system(rm_map_pyc_string)
    except Exception, e:
        pass

    return True

if __name__ == '__main__':
	main()
{'fraction_non_alphanumeric': 0.11202778983933999, 'fraction_numerical': 0.0008684324793747286, 'mean_word_length': 2.0275952693823918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4536644', 'n_tokens_mistral': 769, 'n_tokens_neox': 769, 'n_words': 187}