Skip to content

Instantly share code, notes, and snippets.

@jkuruzovich
jkuruzovich / code.md
Last active December 8, 2020 19:59
Useful panel code
def generate_lag(dframe, by, target, periods):
    #print("Generating laged values for", target)
    for num in range(1, periods+1):
        dframe[target+'_lag'+str(num)]=dframe.groupby(by)[target].shift(num)
        dframe[target+'_lag'+str(num)].fillna(0, inplace=True)
    return dframe
    
@jkuruzovich
jkuruzovich / Savefunction.py
Last active October 27, 2020 16:28
This will loop through a set of data files, creating samples of each file.
# This will loop through a set of data files, creating samples of each file.
import os, sys, importlib, glob
import numpy as np
from pathlib import Path
import pandas as pd
sys.path.append(os.path.join(Path.cwd().parent, 'modules'))
import mongoparser as mp
importlib.reload(mp)
@jkuruzovich
jkuruzovich / final_spring_2020.md
Last active May 6, 2020 13:04
Final Exam Spring 2020

Final Exam - Intoduction to Machine Learning Applications.

You are not allowed to collaborate with anyone on part 1 or 2. Other than that it is "open internet".

Part 1.

Part 1 consists of 20 multiple choice questions taken on the LMS. Once you begin you will have 1 hour to finish the exam.

Part 2

@jkuruzovich
jkuruzovich / xmb.ipynb
Created March 4, 2020 20:26
xmb.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkuruzovich
jkuruzovich / fall2019final.md
Last active December 18, 2019 17:11
Fall 2019 Final

Final Exam - Intoduction to Machine Learning Applications.

Part 2.

You are not allowed to collaborate with anyone on part 2.

This is the starter notebook.

It is important for you to spend time understanding the mistakes from the homework.

For the midterm, please add the following code to a cell to run and debug any errors:

import os
files = "https://www.dropbox.com/s/fa7sp3r1enbk8xy/midterm.zip"
!pip install git+https://github.com/data-8/Gofer-Grader && wget $files && unzip -o midterm.zip
from client.api.notebook import Notebook
@jkuruzovich
jkuruzovich / x.ipynb
Created October 17, 2019 18:35
x.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkuruzovich
jkuruzovich / rendering-openai-gym-in-colaboratory.ipynb
Created June 24, 2019 15:15
Rendering OpenAi Gym in Colaboratory.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Topic Link
Revisiting Titanic with Ludwig Open In Colab
Revisiting Titanic with FastAI Open In Colab
FastAI - Pets Open In Colab
AutoML with TPOT [Open In Colab](https://cola