<commit_before>from genTrueInvs import realgraph
from getBaseName import getBaseName

import os
import argparse
import glob
from math import ceil

def runInvariants(grDir, lccDir, toDir, start, stop):
  '''
  grDir - Full path of dir with graphs
  lccDir - Full path of dir with largest connected components
  '''

  files = glob.glob(os.path.join(grDir,'*'))
  for n, G_fn in enumerate (files[start:stop]):
    #realgraph(G_fn, getLccfn(G_fn), toDir, roiRootName = None)
    print "n = %d, G_fn = %s " % (n, G_fn)
  
  print "\n\n*Sucessfull Invariants run*\n\n"
  
def getLccfn(G_fn):
  '''<commit_msg>Minot<commit_after>from genTrueInvs import realgraph
from getBaseName import getBaseName

import os
import argparse
import glob
from math import ceil

def runInvariants(grDir, lccDir, toDir, start, stop):
  '''
  grDir - Full path of dir with graphs
  lccDir - Full path of dir with largest connected components
  '''

  files = glob.glob(os.path.join(grDir,'*'))
  for n, G_fn in enumerate (files[start:stop]):
    realgraph(G_fn, getLccfn(G_fn), toDir, roiRootName = None)
    #print "n = %d, G_fn = %s " % (n, G_fn)
  
  print "\n\n*Sucessfull Invariants run*\n\n"
  
def getLccfn(G_fn):
  '''
{'fraction_non_alphanumeric': 0.11833333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 4.067510548523207, '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': '6800927', 'n_tokens_mistral': 450, 'n_tokens_neox': 443, 'n_words': 132}