Skip to content

Instantly share code, notes, and snippets.

View obviyus's full-sized avatar
🦕

Ayaan Zaidi obviyus

🦕
View GitHub Profile
@obviyus
obviyus / pilane.py
Last active March 15, 2025 16:39
A script that sends an Android device's back camera video feed into a v4l2 sink and processes the image using YOLOv11 to check for airplanes.
# /// script
# requires-python = "==3.12.8"
# dependencies = [
# "opencv-python",
# "numpy",
# "ultralytics",
# "aiohttp",
# "aiofiles",
# "python-dotenv"
# ]
@obviyus
obviyus / f1.py
Created September 26, 2021 08:28
F1 Event Notifications for Telegram and IRC
import pickle
from collections import namedtuple
from datetime import datetime, timezone
import os.path
import pydle
import requests
from telegram import ParseMode
from telegram.ext import (Defaults, Updater)
@obviyus
obviyus / json2md.py
Created April 19, 2021 09:54
A Python script to covert exported Journey JSON files to Markdown
import json
import os
from datetime import datetime
from shutil import copyfile
json_files = [json_file for json_file in os.listdir(
'.') if json_file.endswith('json')]
for each_file in json_files:
with open(each_file) as json_file:
# Command provided:
# walnut convert dump.json --graft "/path/to/readout-stfb.yaml:readout-stfb.host-{{ it }}" --workflow-name grafted
name: grafted
defaults:
roc_ctp_emulator_enabled: "true"
stfb_enabled: "true"
roles:
- name: host-{{ it }}
for:
@obviyus
obviyus / lyrics-fetcher.py
Created November 3, 2019 11:57
Simple CLI Lyrics Fetcher building in Python using bs4
import requests, bs4, sys
# remove spacing, adding lowercase to match Azlyrics url format
artist=input("artist: ").replace(" ","")
song=input("song: ").replace(" ","")
# url format: www.azlyrics.com/lyrics/<artist>/<song>.html
url='http://www.azlyrics.com/lyrics/%s/%s.html' % (artist,song)
@obviyus
obviyus / maze.py
Created September 18, 2019 13:41
random maze generation
import numpy as np
import random
def buildMaze (n):
emptyMaze = [[0 for x in range(n)] for y in range(n)]
for i in range(int(n/1.15)):
col = random.randrange(0, n, 1)
for j in range(int(n/1.15)):
row = random.randrange(0, n, 1)
if emptyMaze[col][row] == 0:
@obviyus
obviyus / FielbotOrganize.bat
Last active May 31, 2017 11:42
A filebot script to automatically gather necessary data for downloaded media
TIMEOUT 30
filebot -script fn:amc --def music=n --conflict auto --def subtitles=en --def artwork=y --def extras=y --def gmail=your_gmail_id:your_gmail_password --def reportError=y --def clean=y --def movieFormat="Path_to_your_movies_folder/{n} ({y})/{n} ({y})" seriesFormat="Path_to_your_TV_folder/{n}/Season {s}/{n} - {s00e00} - {t}" --action move -non-strict "Path_where_downloads_are_kept"
pause