<commit_before>from Lib.CPyCurl import *
from Lib.CPyMongo import *
from Lib.CPyFile import *
from Lib.CPyXmlParser import *
from Lib.CPyEquipment import CPyEquipment
from Lib.CPyLXmlParser import *


def equipment_test():
    eq = CPyEquipment("172.16.4.")
    eq.test()

def mongo_test(j_data):
    db = CPyMongo("test", None, None)
    # data = db.find('test', {'Id': 3})
    # data = db.find_one('test', None)
    # data = db.distinct('test', "Name", None)
    db.save("books", j_data, True)


def curl_test():
    # curl = Curl("http://pythonprogramming.net", {'s': 'basic', 'submit': 'search'})
    # curl = CPyCurl("https://raw.githubusercontent.com/cnits/cnit/master/books.xml", None)
    curl = CPyCurl("http://ccicore.devhost/silverpeak/runin_smart/latest/latest.php?serial=001BBC122B2A", None)
    return curl.do_request(None)


def file_test():
    path = "files/book_info.txt"<commit_msg>update code<commit_after>from Lib.CPyCurl import *
from Lib.CPyMongo import *
from Lib.CPyFile import *
from Lib.CPyXmlParser import *
from Lib.CPyEquipment import CPyEquipment
from Lib.CPyLXmlParser import *


def equipment_test():
    eq = CPyEquipment("172.16.4.")
    eq.test()

def mongo_test(j_data):
    db = CPyMongo("test", None, None)
    # data = db.find('test', {'Id': 3})
    # data = db.find_one('test', None)
    # data = db.distinct('test', "Name", None)
    db.save("books", j_data, True)


def curl_test():
    # curl = Curl("http://pythonprogramming.net", {'s': 'basic', 'submit': 'search'})
    # curl = CPyCurl("https://raw.githubusercontent.com/cnits/cnit/master/books.xml", None)
    curl = CPyCurl("http://ccicore.devhost/silverpeak/runin_smart/latest/latest.php", {
        'serial': '001BBC122B2A'
    })
    return curl.do_request(None)


def file_test():
    path = "files/book_info.txt"
{'fraction_non_alphanumeric': 0.16685022026431717, 'fraction_numerical': 0.015418502202643172, 'mean_word_length': 3.978082191780822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2900081', 'n_tokens_mistral': 704, 'n_tokens_neox': 669, 'n_words': 129}