Skip to content

Instantly share code, notes, and snippets.

@shushiej
shushiej / pafy_jre_yt.py
Last active December 5, 2020 04:24
Extracting JRE YouTube data
import pandas as pd
import pafy
# Method to get the total minutes from the Duration Column
def convert_to_min(x):
splits = str(x).split(":")
if len(splits) == 3:
hr = int(splits[0]) * 60
total = hr + int(splits[1])
else:
@shushiej
shushiej / sketch.js
Last active December 2, 2019 17:32
P5.js QuadPlot Sketch
const colors = {
TAKEDOWN_DEF: "#561689",
TAKEDOWN_ACC: "#1876fb",
STRIKING_ACC: "#FE4902",
STRIKING_DEF: "#F7a52D",
}
function setup() {
size(1500, 1500)
}
@shushiej
shushiej / README.md
Last active January 3, 2016 13:09
Image Reader from Directory for Dashing

Description

This widget is used to display a collection of images from a directory. This is used for your sinatra based dashing application.

Usage

For this widget to work, copy `image.rb` to your `/jobs` folder. copy `image.coffee` `image.html`, and `image.scss` to your `widgets/image` folder.