<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2013-11-25

@author: <NAME>
'''

import os
import shelve

# This is the shelve file where our OAuth arguments persist between executions
store = {}
store_file = '.credStore.db'
store_path = os.path.expanduser('~') + '/' + store_file


def close_store():
    """ Remove the 'shelve' daemon from memory.
"""
    if store :
        store.close()

def make_store():
    """ Create a 'shelve' repository.
"""
    global store
    store = shelve.open(store_path, writeback = True)
    return store
    
def reopen_store():
    close_store()
    return make_store()

def drop_store():
    os.remove(store_path)


<commit_msg>Close permissions to shelve to only the user.  On branch master  Your branch is ahead of 'origin/master' by 1 commit.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2013-11-25

@author: <NAME>
'''

import os
import stat
import shelve

# This is the shelve file where our OAuth arguments persist between executions
store = {}
store_file = '.credStore.db'
store_path = os.path.expanduser('~') + '/' + store_file


def close_store():
    """ Remove the 'shelve' daemon from memory.
"""
    if store :
        store.close()

def make_store():
    """ Create a 'shelve' repository.
"""
    global store
    store = shelve.open(store_path, writeback = True)
    os.chmod(store_path, stat.S_IRUSR | stat.S_IWUSR)
    return store
    
def reopen_store():
    close_store()
    return make_store()

def drop_store():
    os.remove(store_path)



{'fraction_non_alphanumeric': 0.13350449293966624, 'fraction_numerical': 0.012195121951219513, 'mean_word_length': 3.3066298342541436, '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': '6386358', 'n_tokens_mistral': 540, 'n_tokens_neox': 515, 'n_words': 152}