This widget is used to display a collection of images from a directory. This is used for your sinatra based dashing application.
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.
This file contains hidden or 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 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: |
This file contains hidden or 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
const colors = { | |
TAKEDOWN_DEF: "#561689", | |
TAKEDOWN_ACC: "#1876fb", | |
STRIKING_ACC: "#FE4902", | |
STRIKING_DEF: "#F7a52D", | |
} | |
function setup() { | |
size(1500, 1500) | |
} |