Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name MusicNerd Auto-Play, Button Selector, and Next
// @namespace http://tampermonkey.net/
// @version 2.1
// @description Auto-click play button, number-key-based select song, auto press next musicnerd.io
// @author archonic
// @match https://musicnerd.io/quiz/*
// @grant none
// ==/UserScript==
@Archonic944
Archonic944 / look_and_say.py
Created February 13, 2024 16:56
The look and say sequence, implemented in Python.
# Type a number and hit enter for that number's look-and-say product.
# Press enter without entering a number to get the next step after the previous product.
def look_and_say(num):
prev_val = None
occurrence = 0
new_seq = ""
for i in map(int, str(num)):
if i == prev_val:
occurrence += 1
elif prev_val is None:
@Archonic944
Archonic944 / gist:856c1d63cd4bfdfe1294db6cb178caa2
Created January 9, 2024 01:54
A pasting utility that I made for my science project
from openpyxl import Workbook, load_workbook
from pathlib import Path
import csv
from openpyxl.utils import get_column_letter
downloads_path = str(Path.home() / "Downloads")
src_block_path = downloads_path + "/closed_3.xlsx"
src_cells_start = "N1"
src_cells_end = "X5"
@Archonic944
Archonic944 / ParseUtility.java
Created December 21, 2023 17:07
A utility that allows you to parse space-separated, multi-line values from a Scanner as a table.
import java.util.Arrays;
import java.util.Scanner;
public class ParseUtility {
static String[] asArray(String line){
return line.split(" ");
}
static int[] asIntArray(String line){
return asIntArray(asArray(line));