<commit_before>def init():
    if 'apppath' not in globals():
        import os
        global apppath, contact_names, nodePort
        apppath = os.environ['APPPATH']
        try:
            nodePort = os.environ['NODEPORT']
        except:
            print 'using default nodePort 9042'
            nodePort = 9042

        try:
            contact_names = os.environ['CONTACT_NAMES'].split(",")
        except:
            print 'using default contact point localhost'
            contact_names = ['localhost']
    if 'cluster' not in globals():
        global cluster, session
        from cassandra.cluster import Cluster
        print 'CREATING GLOBAL SESSION'
        cluster = Cluster(contact_points=contact_names, port=nodePort)
        session = cluster.connect()
        session.execute(
            'CREATE TABLE IF NOT EXISTS hecuba.blocks (blockid text, block_classname text,storageobj_classname text, tkns list<bigint>, ' +
            'entry_point text , port int, ksp text , tab text , dict_name text , obj_type text, PRIMARY KEY(blockid))')<commit_msg>changed settings for easier testing<commit_after>def init():
    if 'apppath' not in globals():
        import os
        global apppath, contact_names, nodePort
        try:
            apppath = os.environ['APPPATH']
        except KeyError:
            apppath = os.getcwd()
    try:
        nodePort = os.environ['NODEPORT']
    except KeyError:
        print 'using default nodePort 9042'
        nodePort = 9042

    try:
        contact_names = os.environ['CONTACT_NAMES'].split(",")
    except KeyError:
        print 'using default contact point localhost'
        contact_names = ['localhost']
    if 'cluster' not in globals():
        global cluster, session
        if 'TESTING' in os.environ:
            class clusterMock: pass
            class sessionMock: pass
            cluster = clusterMock()
            session = sessionMock()
        else:
            from cassandra.cluster import Cluster
            print 'CREATING GLOBAL SESSION'
            cluster = Cluster(contact_points=contact_names, port=nodePort)
            session = cluster.connect()
            session.execute(
                "CREATE KEYSPACE IF NOT EXISTS hecuba WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3 }")
            session.execute(
                'CREATE TABLE IF NOT EXISTS hecuba.blocks (blockid text, block_classname text,storageobj_classname text, tkns list<bigint>, ' +
                'entry_point text , port int, ksp text , tab text , dict_name text , obj_type text, PRIMARY KEY(blockid))')

    import logging
    logging.basicConfig()
{'fraction_non_alphanumeric': 0.08654572940287227, 'fraction_numerical': 0.006424792139077854, 'mean_word_length': 2.288198757763975, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4074690', 'n_tokens_mistral': 730, 'n_tokens_neox': 704, 'n_words': 215}