Skip to content

Instantly share code, notes, and snippets.

@vizsumit
vizsumit / LoraConfig.json
Last active March 8, 2025 11:22
settings for Kohya_ss LoRA Training
{
"LoRA_type": "Standard",
"adaptive_noise_scale": 0,
"additional_parameters": "",
"block_alphas": "",
"block_dims": "",
"block_lr_zero_threshold": "",
"bucket_no_upscale": true,
"bucket_reso_steps": 64,
"cache_latents": true,
@jinschoi
jinschoi / bitstream-from-sub.py
Created April 17, 2022 18:00
Python script to clean up and recover an OOK bitstream from a Flipper RAW .sub file.
#!/usr/bin/env python
# Find the raw bitstring from a captured Flipper RAW .sub file.
# Must provide the bitlength in ms, and the allowable error which can be tolerated.
import re
import sys
import math
filename = sys.argv[1]
@jinschoi
jinschoi / create_sub.py
Last active February 16, 2025 14:31
Python script to generate Flipper RAW .sub files from OOK bitstreams
#!/usr/bin/env python3
from typing import Iterable, Union, Any
# freq: frequency in Hz
# zerolen: length of space bit in μs
# onelen: length of mark bit in μs
# repeats: number of times to repeat sequence
# pause: time to wait in μs between sequences
# bits: string of ones and zeros to represent sequence
@JosephHewitt
JosephHewitt / ccparse.py
Created January 21, 2022 16:39
Parse rtl_433 and send CurrentCost power readings to IoTPlotter
import sys
import time
import json
try:
import requests
except:
print("\n\nPlease install Python-requests, this command will work on many systems: 'pip install requests'\n\n")
raise
#Run this script like so: rtl_433 -F json | python3 ccparse.py
@efernandesng
efernandesng / reset_teamviewer.sh
Last active December 16, 2024 07:23
Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#!/bin/bash
##
# Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#
# Tested on Arch linux
##
CONFIG_FILE=/opt/teamviewer/config/global.conf
@howCodeORG
howCodeORG / key-generator.py
Created May 22, 2018 01:28
howCode's simple key generation script in Python.
import random
class Key:
def __init__(self, key=''):
if key == '':
self.key= self.generate()
else:
self.key = key.lower()
@philipjewell
philipjewell / photobucket_bulk_download.md
Last active March 29, 2023 00:23
Download all your photobucket images in bulk via CLI

backstory

On Jul 4, 2017 theverge.com posted an article about photobucket (silently) no longer allowing their users to source their images on 3rd party websites for free, thus leaving websites all over the web broken displaying the following image in replace:

Me being one of those individual, I attempted to go into my photobucket account and download my content as I now have my own hosting I am able to store those images on; however, the only ways to bulk download (on desktop) is by downloading albums through their interface. Doing so, gave me the following error message: "Hmmm. Something didn't click. Want to give it another shot? Try again now."

Doing this serveral times, in different browsers (chrome, firefox and safari), after disabling all my addons and extensions (including ad blockers), it still didn't work.

At this point, doing anything on their website w

@Prof9
Prof9 / scrape.js
Last active June 21, 2022 01:17
Quick-n-dirty Photobucket scraper
// Quick-n-dirty Photobucket scraper
// Dumps one page of photos on Photobucket at a time.
// You'll have to do the folder management yourself.
// Hey, it beats saving everything one by one!
//
// Before you use it:
// Change the 3 on line 39 to the number of digits in the server number of your Photobucket album.
// (You know... the XXX numbers in the url http://sXXX.photobucket.com)
//
// How to use:
// De Bruijn pattern generator.
// Jeffrey Crowell
#include "debruijn.h"
char* peda_charset =
"A%sB$nC-(D;)Ea0Fb1Gc2Hd3Ie4Jf5Kg6Lh7Mi8Nj9OkPlQmRnSoTpUqVrWsXtYuZvwxyz";
// Generate a De Bruijn sequence. Code interpreted from wikipedia.
void db(int t, int p, int n, int maxlen, int k, int* a, char* sequence,