Skip to content

Instantly share code, notes, and snippets.

View SergioSV96's full-sized avatar
😁
Looking for some challenges!

Sergio Sánchez Vallés SergioSV96

😁
Looking for some challenges!
View GitHub Profile
@SergioSV96
SergioSV96 / next_tv_show_episode.py
Created May 15, 2020 12:47
Next TV Show episode
import json
import requests
def get_show_id(title: str):
response = requests.get(f"https://www.episodate.com/api/search?q={title}&page=1")
json_data = json.loads(response.text)
if len(json_data["tv_shows"]) == 0:
exit("Not found")
@SergioSV96
SergioSV96 / hyperion_mi_led.py
Last active December 4, 2023 13:01
A Hyperion UDP listener for Xiaomi Mi LED Smart Bulb bulbs! Just "pip install yeelight" and run with "python3 hyperion_mi_led.py PORT NAME"
import time
import yeelight
import sys
import socket
import colorsys
import argparse
from yeelight import BulbException
@SergioSV96
SergioSV96 / hyperion_lifx.py
Last active December 18, 2023 21:30
A Hyperion UDP listener for LIFX bulbs! Just "pip install lifxlan --user" and run with "python3 hyperion_lifx.py PORT NAME"
import sys
import socket
import colorsys
import argparse
from lifxlan import LifxLAN
def search_lifx_bulb(name, lifx):
"""
Returns the LIFX device for the selected bulb name