Skip to content

Instantly share code, notes, and snippets.

View pippim's full-sized avatar

pippim.com pippim

View GitHub Profile
@jcoutch
jcoutch / bt_light_control.sh
Created March 12, 2022 05:03
Bluetooth Light Strip Control
#!/bin/bash
# Based on information found at the following URLs:
# https://stackoverflow.com/questions/46169415/understanding-hsl-to-rgb-color-space-conversion-algorithm
# https://community.home-assistant.io/t/controlling-a-bluetooth-led-strip-with-ha/286029/5
# Parameters:
# bt_light_control.sh MAC_ADDRESS STATE PARAMETERS
#
# Turn on: bt_light_control.sh 00:00:00:00:00:00 on
@davidcairuz
davidcairuz / youtube_playlist_time.py
Last active November 13, 2023 15:22
Script that scrolls through all of a YouTube playlist and calculates it's total duration. I'm still learning Python so all of your suggestions will be very appreciated.
from bs4 import BeautifulSoup as soup #used to beautifie the html code
import datetime as dt #sum the video's duration time
from selenium import webdriver #open webdriver for specific browser
from selenium.webdriver.common.keys import Keys #for necessary browser action
import time #used for sleep function
#line 63 must be modified for different languages
#line 35 must be modified for different url
times = []