This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="color-scheme" content="dark light" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>chrono-node & Date Test</title> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.js"></script> | |
<style> | |
* { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WIP script that auto-adds videos to a discogs release | |
// TODO: "full album" mode | |
// TODO: try multiple approaches (with and without artist/album title) | |
/* | |
x=[...document.querySelectorAll("[data-track-position]")] | |
.map(e => e.querySelector("td:nth-child(3) span").textContent).join("\n") | |
console.log(x) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const XLSX = require("xlsx"); // 0.18.5 | |
const workbook = XLSX.readFile("foo.xlsx"); | |
const sheetName = workbook.SheetNames[0]; | |
const worksheet = workbook.Sheets[sheetName]; | |
const data = XLSX.utils.sheet_to_json(worksheet, { defval: "" }); | |
console.log(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script> | |
const nav = `<a href="/">Home</a> | | |
<a href="/about">About</a> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="description" content="HyperFormula Playground" /> | |
<meta name="color-scheme" content="dark light" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>HyperFormula Playground</title> | |
<link rel="icon" href="https://fav.farm/⚡" /> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hyperformula.full.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var results = []; | |
for (let pg =1;pg < 50_000; pg++) { | |
var res = await fetch(`https://www.kanopy.com/kapi/search/videos?sort=popular&rfp=exclude&domainId=2290&isKids=false&page=${pg}&perPage=40`, { | |
"credentials": "include", | |
"headers": { | |
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0", | |
"Accept": "application/json, text/plain, */*", | |
"Accept-Language": "en-US,en;q=0.5", | |
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVpZCI6IjMzMDU3NjkiLCJpZGVudGl0eV9pZCI6IjE3OTMxMDI2OCIsInZpc2l0b3JfaWQiOiIxNzQzOTExNDcwNTk5MDE5MjI1Iiwic2Vzc2lvbl9pZCI6IjE3NDUxODkxOTI0MjQwNTE3NzIiLCJjb25uZWN0aW9uX2lkIjoiMTc0NTE4OTE5MjQyNDA1MTc3MiIsImt1aV91c2VyIjoxLCJyb2xlcyI6WyJjb21Vc2VyIl19LCJpYXQiOjE3NDUxODkxOTIsImV4cCI6MjA2MDU0OTE5MiwiaXNzIjoia2FwaSJ9.dS0SQ32ZF5Vezr2Ha3GCvgFZ5tbzraAjIvRm_5LFCTI", | |
"X-Version": "web/prod/5.3.0/2025-03-24-13-06-01", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
from os import environ | |
from openai import OpenAI # 1.12.0 | |
instructions = input("What should I draw? ") | |
prompt = ( | |
"Generate valid Python turtle code to draw the following input:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="color-scheme" content="dark light"> | |
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 16 16'><text x='0' y='14'>🎸</text></svg>" /> | |
<title>Guitar Tuner</title> | |
<style> | |
body { | |
font-family: sans-serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Record Mic to WAV</title> | |
</head> | |
<body> | |
<button id="record">Record Mic</button> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
soup = BeautifulSoup("<p>hello</p><p>World</p>") | |
print("\n".join([x.text for x in soup.select("p")])) |
NewerOlder