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 rds_config | |
import mysql.connector | |
import csv | |
connection = None | |
# create connection to MySQL database | |
try: | |
connection = mysql.connector.connect(user=rds_config.db_username, |
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 psycopg2 | |
from psycopg2 import extras | |
# ? might import this upstream in utils if I add the distinct function | |
# have to think about this and the dependency relationships | |
import pandas as pd | |
from database.db import local_dbc | |
from utils import get_distinct_artist_id | |
import spotipy | |
from spotipy.oauth2 import SpotifyClientCredentials |
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
library(baseballr) | |
library(tidyr) | |
#standings_on_date_bref("2015-08-01","NL East", from = FALSE) | |
getwd() | |
setwd('/Users/jpurrutia/Desktop/rfdb/tables') | |
df = read.csv('id_vector.csv') |
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 flask import Flask, request, render_template, redirect, url_for | |
from form import CoefficientsForm | |
from utils import calculate_roots, save_to_db | |
app = Flask(__name__) | |
app.config['SECRET_KEY'] = '123' | |
@app.route('/', methods=['GET', 'POST']) | |
def calculate(): | |
form = CoefficientsForm() |