Skip to content

Instantly share code, notes, and snippets.

View alyssadev's full-sized avatar

Aly Smith alyssadev

View GitHub Profile
@alyssadev
alyssadev / romdl.py
Last active April 21, 2020 00:52
A rom downloader for the no-intro rom collection on internet archive
# pip3 install curses-menu xmltodict requests bs4
# supports openemu automatic import on macos
# python 3.7 yo
from cursesmenu import CursesMenu
from cursesmenu.items import SubmenuItem, FunctionItem
import requests
import xmltodict
from bs4 import BeautifulSoup as Soup
from sys import stderr
import os
@alyssadev
alyssadev / lawtechie-story-links.py
Last active June 8, 2020 18:03
A script to parse lawtechie's post history and show, for each story that is linked to in another story, which stories link to it. Used for collecting multiple parts together. Does not show story singletons. More parsing work to do in the future
#!/usr/bin/env python3
from requests import get
from json import load,dump,dumps
from collections import defaultdict
from markdown import markdown
from lxml import etree
from time import sleep
html = False
url = "https://www.reddit.com/search.json"
@alyssadev
alyssadev / qlocktwo.py
Last active July 20, 2020 02:36
a rough python mockup implementation of the qlocktwo clock
from datetime import datetime
from textwrap import wrap
hour = ["twelve", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven"]
letters = "ITLISASAMPMACQUARTERDCTWENTYFIVEXHALFSTENFTOPASTERUNINEONESIXTHREEFOURFIVETWOEIGHTELEVENSEVENTWELVETENSEOCLOCK" # 110 letters
def get_led_matrix():
out = "0" * len(letters)
time = get_time_in_words()
for word in time.split():
#!/usr/bin/env python3
# pip3 install google_cloud_storage google_cloud_speech srt
from google.cloud import speech, storage
from sys import stderr
from time import sleep
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("filename")
parser.add_argument("-w", "--word_time", action="store_true", help="enable_word_time_offsets")
{"200": [["200", "Australian National University", "ACT", -35.28, 149.12]],
"221": [["221", "Barton", "ACT", -35.2, 149.1]],
"800": [["800", "Darwin", "NT", -12.8, 130.96]],
"801": [["801", "Darwin", "NT", -12.8, 130.96]],
"804": [["804", "Parap", "NT", -12.43, 130.84]],
"810": [["810", "Alawa", "NT", -12.38, 130.88], ["810", "Brinkin", "NT", -12.38, 130.88], ["810", "Casuarina", "NT", -12.38, 130.88], ["810", "Coconut Grove", "NT", -12.38, 130.88], ["810", "Jingili", "NT", -12.38, 130.88], ["810", "Lee Point", "NT", -12.38, 130.88], ["810", "Lyons", "NT", -12.38, 130.88], ["810", "Millner", "NT", -12.38, 130.88], ["810", "Moil", "NT", -12.38, 130.88], ["810", "Muirhead", "NT", -12.38, 130.88], ["810", "Nakara", "NT", -12.38, 130.88], ["810", "Nightcliff", "NT", -12.38, 130.88], ["810", "Rapid Creek", "NT", -12.38, 130.88], ["810", "Tiwi", "NT", -12.38, 130.88], ["810", "Wagaman", "NT", -12.38, 130.88], ["810", "Wanguri", "NT", -12.38, 130.88]],
"811": [["811", "Casuarina", "NT", -12.38, 130.85]],
"812": [["8
@alyssadev
alyssadev / emojimashup.json
Last active December 13, 2020 16:59
a list containing twitter image urls and description of contents. from @emojimashupbot
[
[
"EnM5k0mWMAM624F",
"\ud83d\ude44 rolling-eyes + \ud83d\ude0d hearts-eyes"
],
[
"EnMr17sXEAwaQL8",
"\ud83d\ude08 demon-smiling + \ud83c\udf1d full-moon + \ud83d\udd76\ufe0f sunglasses"
],
[
@alyssadev
alyssadev / mega-droplet.json
Last active November 26, 2020 15:54
A Packer build file that produces an ubuntu 20.04 droplet with megacmd and rclone set up
{
"variables": {
"MEGA_EMAIL": "{{env `MEGA_EMAIL`}}",
"MEGA_PASSW": "{{env `MEGA_PASSW`}}",
"MEGA_ENC_PASSW": "{{env `MEGA_ENC_PASSW`}}"
},
"builders": [
{
"type": "digitalocean",
"image": "ubuntu-20-04-x64",

Keybase proof

I hereby claim:

  • I am alyssadev on github.
  • I am alyssile (https://keybase.io/alyssile) on keybase.
  • I have a public key ASDYE6IEDimoS6zIf75FYbpGXxG0l-iZAT3cZu-FL14wXwo

To claim this, I am signing this object:

@alyssadev
alyssadev / videolp.py
Created January 8, 2021 21:10
A script I made a long time ago, generates a video for a music file using cover art if available and including track information
#!/usr/bin/env python3
# A script to generate videos for MP3s
from moviepy.editor import *
import numpy as np
from PIL import Image
from glob import glob
from mutagen.mp3 import MP3
from io import BytesIO
#points
@alyssadev
alyssadev / digitalocean-torrentdl.sh
Last active January 28, 2021 12:43
Provisions a droplet on DigitalOcean to download a given torrent file, then reupload to a given rclone remote
#!/bin/bash
# Provisions a droplet on DigitalOcean to download a given torrent file, then reupload to a given rclone remote
# Prints estimated USD cost of transaction when complete
# uses your user's rclone.conf, so set up the remote locally and make sure it works
# torrentdl.sh https://releases.ubuntu.com/20.04/ubuntu-20.04.1-live-server-amd64.iso.torrent b2:my-linux-isos/ubuntu/
# Default values
IMAGE="ubuntu-20-04-x64"
REGION="sgp1" # overridden by ping check
HOSTNAME="torrent-dl"