Skip to content

Instantly share code, notes, and snippets.

@steveruizok
steveruizok / README.md
Last active February 10, 2022 12:34
Add undo/redo JSON patches to mobx-utils deepObserve method.
@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()

Elon Musk's suspension reversals

The tables below show notable Twitter suspension reversals for each day since Elon Musk took over as owner and CEO.

All dates indicate when the suspension or reversal was detected, and the actual suspension or reversal may have been earlier. For most English-language accounts with large followings, this lag will generally not be longer than a few hours, but for accounts that have a small number of followers or that are outside the networks we are tracking, the difference can be larger, and in some cases an account on the list may have had its suspension reversed before 27 October 2022. These dates will get more precise as we refine the report.

Because of these limitations, this report should be considered a starting point for investigation, not a definitive list of suspension reversals.

@SuddenDevelopment
SuddenDevelopment / gizmo_button.py
Created December 21, 2022 12:35
Display a 2d button gizmo in the 3dview window for an addon UI
from bpy.types import (
GizmoGroup
)
import bpy
bl_info = {
"name": "POC buttons",
"description": "POC 2D BUTTON script refactored from GP Animator Desk addon",
"author": "Anthony Aragues, P.Świda",
"version": (0, 0, 1),
"blender": (3, 4, 0),