<commit_before># -*- coding: utf-8 -*-
import json
import requests
import time
import os

# ---- sort user info from bash script section  -------
# Get user provided information from bash script and parse it


apic_ip = os.environ['APIC_IP']
apic_username = os.environ['APIC_USERNAME']
apic_password = os.environ['APIC_PASSWORD']

def connect_apic(apic_ip):
    # -- connect to APIC section  --
    # Generate base login URl
    # (myapic_ip variable defined by user via bash script)
    base_url = 'http://' + apic_ip + '/api/'
    return base_url


def login_apic(base_url, apic_username, apic_password):
    # Generate credentials structure
    name_pwd = {'aaaUser': {'attributes': {'name': apic_username, 'pwd': <PASSWORD>}}}
    json_credentials = json.dumps(name_pwd)

    # Generate login url
    login_url = base_url + 'aaaLogin.json'<commit_msg>Changed:<commit_after># -*- coding: utf-8 -*-
import requests
import json
import os
import time


# ---- sort user info from bash script section  -------
# Get user provided information from bash script and parse it


apic_ip = os.environ['APIC_IP']
apic_username = os.environ['APIC_USERNAME']
apic_password = os.environ['APIC_PASSWORD']

def connect_apic(apic_ip):
    # -- connect to APIC section  --
    # Generate base login URl
    # (myapic_ip variable defined by user via bash script)
    base_url = 'http://' + apic_ip + '/api/'
    return base_url


def login_apic(base_url, apic_username, apic_password):
    # Generate credentials structure
    name_pwd = {'aaaUser': {'attributes': {'name': apic_username, 'pwd': <PASSWORD>}}}
    json_credentials = json.dumps(name_pwd)

    # Generate login url
    login_url = base_url + 'aaaLogin.json'
{'fraction_non_alphanumeric': 0.12368112543962485, 'fraction_numerical': 0.0011723329425556857, 'mean_word_length': 3.7154696132596685, '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': '7632585', 'n_tokens_mistral': 569, 'n_tokens_neox': 553, 'n_words': 159}