Skip to content

Instantly share code, notes, and snippets.

View tariquesani's full-sized avatar

Dr. Tarique Sani tariquesani

View GitHub Profile
@tariquesani
tariquesani / copy_curated.py
Created March 29, 2026 03:26
Script to copy verified and false positive audio from BirdNET-Go
from __future__ import annotations
import shutil
import sqlite3
from pathlib import Path
from typing import TypedDict
# ===== User-editable paths =====
DB_PATH = r"./birdnet.db" # Path and name of your birdnet.db
CLIPS_ROOT = r"./clips" # Path where your clips get recorded
@tariquesani
tariquesani / gpx-tool.html
Created June 2, 2025 07:08
Crop and change time in GPX files. Just open in browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GPX Crop & Time Tool</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
@tariquesani
tariquesani / WiFi-QR-Code-Generator.html
Created May 25, 2025 01:23
A handy WiFi QR Code Generator. Just open in browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Wi-Fi QR Code Generator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap 5 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
@tariquesani
tariquesani / json.lua
Created March 25, 2025 07:13 — forked from tylerneylon/json.lua
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@tariquesani
tariquesani / fetch_strava_activities.py
Created January 11, 2025 06:20
A python script that uses stravalib and bottle to first authenticate and then fetch strava activities into a json file. Uses bottle to run a local webserver instead of flask
import json
import os
import signal
from time import time
from datetime import datetime
from threading import Thread
from stravalib.client import Client
from bottle import Bottle, request, run
from dotenv import load_dotenv
import webbrowser

Keybase proof

I hereby claim:

  • I am tariquesani on github.
  • I am tariquesani (https://keybase.io/tariquesani) on keybase.
  • I have a public key ASAVmcBqc3-h15UgX6kWGuquaK4NJ3lbOnrkf3y8LK2HPwo

To claim this, I am signing this object:

@tariquesani
tariquesani / myinstapy.py
Created December 13, 2018 10:11
A wee bit complex InstaPy script.
import random
import traceback
import sys
import requests
from instapy import InstaPy
from instapy.util import smart_run
from tendo import singleton
bot = singleton.SingleInstance() # will sys.exit(-1) if other instance is running
@tariquesani
tariquesani / index.html
Last active November 6, 2018 03:50
Sort Values for life coaching!
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style>
@tariquesani
tariquesani / bash_aliases.sh
Created March 21, 2018 05:49 — forked from Fuxy22/bash_aliases.sh
Bash Script functions to Manage /etc/hosts file for adding/removing hostnames.
# remove specified host from /etc/hosts
function removehost() {
if [[ "$1" ]]
then
HOSTNAME=$1
if [ -n "$(grep $HOSTNAME /etc/hosts)" ]
then
echo "$HOSTNAME Found in your /etc/hosts, Removing now...";
sudo sed -i".bak" "/$HOSTNAME/d" /etc/hosts
@tariquesani
tariquesani / resizeimages
Last active August 2, 2016 06:30
QnD bash script to resize images for Lektor content
#!/bin/bash
echo "Started watching (Press CRTL+C to quit) "
while true; do
inotifywait -q -e moved_to -r ./content |
while read path action file; do
echo "The file '$file' appeared in directory '$path' via '$action'"
if [ $file == 'contents.lr' ]
then