<commit_before>usr/bin/python3.2

'''Getting the module'''
import os
from os import listdir
from os.path import isfile, join

# Subprocess doesnt currently work
from subprocess import call

check = 0

while(check != 1):
        directory = input("Enter the full (absolute) path of the directory: ")
        if os.path.isdir(directory):        #check if directory exists
                fileLst = []
                recur = input("Would you like to recursively look through the path? (y) (n): ")
                if recur == "y":
                        check = 1
                        #Recursive function
                        fileLst = os.system('find ' + directory + ' -type f')
                        # fileLst = call("find /root/ -type f") # this currently doesnt work
                        for validFile in fileLst:
                        	# Using file like the below example to test on Linux
                        	os.system("file " + validFile)
                elif recur == "n":
                        check = 1
                        for fileName in listdir(directory):        #Find all the file at current directory
                                tmpPath = join(directory,fileName)        #add the filename to the full path
                                if isfile(tmpPath):
                                        fileLst.append(tmpPath)
                                        
                        if len(fileLst) == 0:
                                print ("Current path have no files")
                        else:   
                                for validFile in fileLst:
                                        os.system("file " + validFile)
                                        # Using the above for testing on Linux, we would be using mdls normally
         else:
                        print("Not a valid option")
        else:
                print("Not a valid path")<commit_msg>Fix  Recursion<commit_after>#!usr/bin/python3.3

'''Getting the module'''
import os
from os import listdir
from os.path import isfile, join

check = 0

while(check != 1):
    directory = input("Enter the full (absolute) path of the directory: ")
    if os.path.isdir(directory):    #check if directory exists
        fileLst = []
        recur = input("Would you like to recursively look through the path? (y) (n): ")
        if recur == "y":
            check = 1
            for dirName, subdirlist, fileName in os.walk(directory): #Walking through the directory and store full path
                for name in fileName:
                    fileLst = dirName + "/" + name
        elif recur == "n":
            check = 1
            for fileName in listdir(directory): #Find all the file at current directory
                tmpPath = join(directory,fileName)  #add the filename to the full path
                if isfile(tmpPath):
                    fileLst.append(tmpPath)
                    if len(fileLst) == 0:
                        print ("Current path have no files")
                    else:   
                        for validFile in fileLst:
                            os.system("file " + validFile)
                        # Using the above for testing on Linux, we would be using mdls normally
        else:
            print("Not a valid option")
    else:
        print("Not a valid path")
{'fraction_non_alphanumeric': 0.07639304973037747, 'fraction_numerical': 0.004194128220491312, 'mean_word_length': 1.2995867768595042, 'pattern_counts': {'":': 4, '<': 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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '705136', 'n_tokens_mistral': 803, 'n_tokens_neox': 763, 'n_words': 299}