Skip to content

Instantly share code, notes, and snippets.

View hornc's full-sized avatar
๐Ÿ‡บ๐Ÿ‡ฆ
๐Œ€๐Œ„๐Œ…

Charles Horn hornc

๐Ÿ‡บ๐Ÿ‡ฆ
๐Œ€๐Œ„๐Œ…
View GitHub Profile
@balasankarc
balasankarc / odftest
Last active January 29, 2024 17:19
Basic stuff with odfpy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from odf.opendocument import OpenDocumentText
from odf.style import (Style, TextProperties, ParagraphProperties,
ListLevelProperties, TabStop, TabStops)
from odf.text import (H, P, List, ListItem, ListStyle, ListLevelStyleNumber,
ListLevelStyleBullet)
from odf import teletype
; Retro-Halo by Eddy Fries - [email protected]
processor 6502
include vcs.h
org $F000
; Compile switches
NTSC = 0
PAL = 1
PAL60 = 2
@hornc
hornc / move_editions.py
Last active January 31, 2023 01:34
Move OL editions to correct Work
from olclient.openlibrary import OpenLibrary
ol = OpenLibrary()
def move_editions(editions, master):
"""Sets a list of <editions> to a new master work ID using the Open Library Client.
Copies across extra author data from editions to master, if not already present.
Example:
move_editions(['OL8306567M','OL16682544M'], 'OL4005510W')
"""
@hornc
hornc / isbnregions.sh
Created November 30, 2021 01:42
Takes an input list of ISBN13s and counts how many belong to each of the possible regional agencies.
#!/bin/bash
# Takes an input file argument (a sorted list of ISBN13s)
# and counts how many ISBNs are present belonging to each
# regional agency as listed in the official
# ISBN export_rangemessage.xml data.
wget -nc https://www.isbn-international.org/export_rangemessage.xml
while read prefix agency; do
@Hans5958
Hans5958 / rb-cachebuster.py
Last active October 13, 2025 00:17
Roblox Cache Buster: Simple script to convert Roblox cache files on `%temp%/Roblox/http` folder to normal, openable files (if valid). Run the script inside `%temp%/Roblox/http`.
from genericpath import isfile
import puremagic, io, os
os.makedirs('cachebuster', exist_ok=True)
for file_name in os.listdir('.'):
if not os.path.isfile(file_name):
continue
# print(file_name)
@hornc
hornc / csv2tsv.py
Last active September 25, 2025 03:56
#!/usr/bin/env python3
import argparse
import csv
ABOUT = """
Convert .csv (Comma Separated Value) file to .tsv (Tab Separated Value) file.
Output to STDOUT. (redirect to a file or another process)
"""