This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sebastian Raschka 09/24/2022 | |
# Create a new conda environment and packages | |
# conda create -n whisper python=3.9 | |
# conda activate whisper | |
# conda install mlxtend -c conda-forge | |
# Install ffmpeg | |
# macOS & homebrew | |
# brew install ffmpeg | |
# Ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initial approximation of parameters | |
Qs = range(0, 2) | |
qs = range(0, 3) | |
Ps = range(0, 3) | |
ps = range(0, 3) | |
D=1 | |
d=1 | |
parameters = product(ps, qs, Ps, Qs) | |
parameters_list = list(parameters) | |
len(parameters_list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on job classification on jobstreet.com | |
job_classification = [ | |
"accounting/finance", | |
"admin/human resources", | |
"sales/marketing", | |
"arts/media/communications", | |
"services", | |
"hotel/restaurant", | |
"education/training", | |
"computer/IT", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_skills_context(resume): | |
response = openai.Completion.create( | |
engine="davinci", | |
prompt="""This is a resume parser that extracts skills context from resume. | |
resume: {resume1} | |
parsed_contextual_skills: {extract1} | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resume_1 = """ | |
QUALIFICATIONS | |
Highly motivated, customer focused professional with extensive experience in key client development and | |
retention. Skilled in creating and growing solid customer relationships, needs analysis, and account activity | |
tracking. | |
EXPERIENCE | |
EXPERIAN CORP 1998-2007 | |
Account Manager – Costa Mesa / Sacramento, CA 2002-2007 | |
Primary customer contact for the nation's largest collector and provider of real estate focused public record data. | |
Industries serviced: Lending, Title, Investor and Government. Territory – AL, LA, MS, OK, TX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def call_openapi(title, desc): | |
response = openai.Completion.create( | |
engine="davinci", | |
prompt="""This is a job specialization classifier | |
Job title: Account Executive | |
Job description: Handle full set of accounts.\n | |
Familiar with Income Tax filing.\n | |
Maintain daily cash flow and reporting.\n | |
Prepare monthly and annual financial reports.\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def call_openapi(question): | |
response = openai.Completion.create( | |
engine="davinci", | |
prompt=""" | |
This is a banking expert. | |
Q: What is interest rate? | |
A: The interest rate is the amount a lender charges for the use of assets expressed as a percentage of the principal. | |
Q: What is PD? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta | |
num_window = 10 | |
def last_day_of_month(any_day): | |
next_month = any_day.replace(day=28) + timedelta(days=4) # this will never fail | |
return next_month - timedelta(days=next_month.day) | |
with mlflow.start_run(run_name='sarima_backtest'): | |
t1 = pd.to_datetime('2017-01-31') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import mlflow | |
import mlflow.sklearn | |
# Set the experiment name to an experiment | |
mlflow.set_experiment("/Shared/experiments/cryptocurrency/analysis-forecasting-1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for param in parameters_list: | |
# start mlflow run | |
with mlflow.start_run(run_name='arima_param'): | |
# log parameters | |
mlflow.log_param('param-qs', param[0]) | |
mlflow.log_param('param-ps', param[1]) | |
try: | |
model = SARIMAX(btc_month.close_box, order=(param[0], d, param[1])).fit(disp=-1) |
NewerOlder