JSFiddle - React, Tailwind, and code Playground
by schantanu
HTML
<p>
Test
</p>
JavaScript
/* test01.py
import json
import os
import re
import time
import warnings
import webbrowser
from datetime import date, datetime
import cx_Oracle
import dask.dataframe as da
import numpy as np
import pandas as pd
import sqlalchemy as sa
from dateutil import relativedelta
# Ignore Pandas warning
warnings.filterwarnings('ignore')
# Variables
DIALECT = "oracle"
DRIVER = "cx_oracle"
HOST = ""
PORT = 1521
SERVICE = ""
DRIVE_URL = ""
# Set Oracle Driver directory path
path_oracle_old = r"C:\DevTools\Oracle Instant Client 18.5\instantclient_18_5"
path_oracle_new = r"C:\Oracle\instantclient_19_3"
if os.path.exists(path_oracle_old):
LIB_DIR = path_oracle_old
elif os.path.exists(path_oracle_new):
LIB_DIR = path_oracle_new
else:
print("Oracle Driver directory is missing. Please reach out to Script Developer for resolution.")
SQL_DATA = """
SELECT *
FROM network_rw.bomfc_dpv_detail_hist
WHERE TRUNC(validity_date) = (SELECT TRUNC(MAX(validity_date)) FROM network_rw.bomfc_dpv_detail_hist)
"""
def get_credentials():
"""Get credentials from User"""
try:
if 'credentials.json' not in os.listdir():
print("""\n
Oracle SQL Credentials are required to run this Python Script. The Credentials
are the same Username and Password required to access Oracle SP1 Database. Please
type in the credentials to proceed.
NOTE: In case the Credentials are needed to be re-entered, simply delete the
credentials.json file that is created in the current folder.
""")
username = input("Username: ").strip().lower()
password = input("Password: ").strip()
f = open("credentials.json","w")
f.write(f'{{"username":"{username}","password":"{password}"}}')
f = open('credentials.json')
data = json.load(f)
username, password = data['username'], data['password']
return username, password
except Exception as e:
print(e)
os.system("pause")
def...