Skip to content

Instantly share code, notes, and snippets.

Blotter File Format - v7

The Blotter File Format, successor to the format known as ".tung files", is a system for storing the components and wires of a Logic World world. It is used for both full world saves as well as partial worlds (the data structure used by Subassemblies), but there are slight differences between the two.

File types

  • World files:
    • Represent a full, playable world space
    • May have zero or more root components at different positions/rotations in the world
  • Use .logicworld file extension
@younesbelkada
younesbelkada / shard_weights.py
Last active July 6, 2024 15:31
A script to shard any model on the Hugging Face format
import torch
import os
import json
import argparse
parser = argparse.ArgumentParser(description='Sharding Hugging Face models')
parser.add_argument('--sharding_factor', default=4, type=int, help='Sharding factor - aka how many shards to create')
parser.add_argument('--source_model_path', default="t5-v1_1-xl", type=str, help='Relative path to the source model folder')
parser.add_argument('--sharded_model_path', default="t5-v1_1-xl-sharded", type=str, help='Relative path to the target sharded model folder')
args = parser.parse_args()
@wjdp
wjdp / gitmirror.py
Created January 31, 2023 21:51
Simple script to maintain a local copy of your GitHub repos
#!/usr/bin/env python3
import requests
from requests.auth import HTTPBasicAuth
import click
from tqdm import tqdm
from pathlib import Path
import os.path
import subprocess
from glob import glob