<jupyter_start><jupyter_text>Example of Setting Up Connection with BaseXhttps://{NEU login}@dsg.xmldb-dev.northeastern.edu/basex/webdav/psc/mhs/jqa/ .*xml BaseXClient<jupyter_code>import sys, os, getpass
from BaseXClient import BaseXClient
import pandas as pd
import numpy as np

from functions_xml_ET_parse import *


"""
Declare global variables.
"""
# Declare regex to simplify file paths below
regex = re.compile(r'.*/\d{4}/(.*)')

# Declare document level of file. Requires root starting point ('.').
doc_as_xpath = './/ns:div/[@type="entry"]'


"""
Main
"""
if __name__ == "__main__":
    if len(sys.argv) != 1:
        print ('Expected command: basex-template.py')
        exit(-1)
        
    usr_login = input("User Login: ")
    usr_pw = <PASSWORD>.<PASSWORD>pass('Password: ')
    
    session = BaseXClient.Session('dsg.xmldb-dev.northeastern.edu/basex/webdav/psc/mhs/jqa/', 
                                  1984, usr_login, usr_pw)
    
    print (session.info())
    
    if session:
        session.close()<jupyter_output><empty_output><jupyter_text>MySQL<jupyter_code>import sys, os, mysql.connector
from sqlalchemy.orm import mapper, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
import sqlalchemy as db
import pandas as pd
import numpy as np

from xml_ET_parse_functions import *


"""
Declare global variables.
"""
# Declare regex to simplify file paths below
regex = re.compile(r'.*/\d{4}/(.*)')

# Declare document level of file. Requires root starting point ('.').
doc_as_xpath = './/ns:div/[@type="entry"]'


"""
Main
"""
if __name__ == "__main__":
    if len(sys.argv) != 3:
        print ('Expected command: basex-template.py <login> <pw>')
        exit(-1)
    
    engine = db.create_engine(f'mysql+mysqlconnector://{sys.argv[1]}:{sys.argv[2]}<EMAIL>/basex/webdav/psc/mhs/jqa/')
    
    inspection = db.inspect(engine)
    db_list = inspection.get_schema_names()

    print (db_list)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14387391967463142, 'fraction_numerical': 0.006100660904931368, 'mean_word_length': 3.5981308411214954, 'pattern_counts': {'":': 2, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '313873', 'license': 'MIT', 'n_tokens_mistral': 711, 'n_tokens_neox': 688, 'n_words': 150, 'path': 'Jupyter_Notebooks/Scripts/.ipynb_checkpoints/BaseX-Template-checkpoint.ipynb', 'repo_name': 'NEU-Libraries/dsg-mhs', 'size': '1981'}