Skip to content

Instantly share code, notes, and snippets.

View Ma5onic's full-sized avatar
🎧
Remixing

Ma5onic

🎧
Remixing
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
@Ma5onic
Ma5onic / ipynb_2_py.py
Created March 3, 2023 16:12
Simple Python script that converts Python notebook files (.ipynb) to Python scripts (.py)
import os
import sys
import json
def ipynb_to_py(ipynb_file_path):
# Open the ipynb file and load its contents as JSON
with open(ipynb_file_path, 'r') as f:
nb = json.load(f)
# Create a new .py file with the same name as the ipynb file
@Ma5onic
Ma5onic / bank2qb.py
Last active May 16, 2023 00:36
script to help users format their CSV transactions for quickbooks
import csv
import re
import datetime
from collections import defaultdict
# Ask user for input
input_file = input("Enter the input file name (including .csv extension): ")
output_file_base = input("Enter the base of the output file name (without extension): ")
account_type_header = input("Enter the header for the account type column: ")
date_header = input("Enter the header for the date column: ")
@Ma5onic
Ma5onic / generating-synth-patches-with-ai.md
Created February 25, 2024 01:07 — forked from 0xdevalias/generating-synth-patches-with-ai.md
Some notes on generating software synthesizer patches with AI