Skip to content

Instantly share code, notes, and snippets.

View Birch-san's full-sized avatar

Birch-san

View GitHub Profile
{
"diffusion_out":[
"model.diffusion_model.output_blocks.6.0.in_layers.0.bias",
"model.diffusion_model.output_blocks.6.0.in_layers.0.weight",
"model.diffusion_model.output_blocks.6.0.out_layers.0.bias",
"model.diffusion_model.output_blocks.6.0.out_layers.0.weight",
"model.diffusion_model.output_blocks.7.0.in_layers.0.bias",
"model.diffusion_model.output_blocks.7.0.in_layers.0.weight",
"model.diffusion_model.output_blocks.7.0.out_layers.0.bias",
"model.diffusion_model.output_blocks.7.0.out_layers.0.weight",
@shirakaba
shirakaba / nix.md
Last active February 3, 2023 19:54
Setting up Nix and Home Manager on a new M1 Mac (circa Dec 2021)

Background

I have a brand new M1 MacBook Pro. I have a long list of complaints with homebrew, so I want to try Nix as my package manager instead, along with Home Manager to control my setup on a per-user basis. Once I've set this all up, theoretically, I should be able to reuse the same configuration on any other Macs I own.

What is Nix?

A reproducible, declarative package manager.

More info:

@matt-peters
matt-peters / pytorch_tensorflow.py
Created June 15, 2020 18:02
Pytorch + tensorflow running together in the same computational graph
"""
An example of running both pytorch and tensorflow in the same network,
while pasing weights and gradients between the two.
In this example, we run a simple 2-layer feed-forward network,
with the first layer size (5, 2) and the second (2, 3).
The code contains an implementation of forward/backward passes with
three versions:
* tensorflow only
* pytorch only
@HiImJulien
HiImJulien / clang_windows_cross.cmake
Created March 21, 2020 18:45
Toolchain file to cross-compile from clang (WSL-Ubuntu) to Windows.
# Cross toolchain configuration for using clang-cl.
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_VERSION 10.0)
set(CMAKE_SYSTEM_PROCESSOR AMD64)
set(CMAKE_C_COMPILER "/usr/bin/clang-cl-9")
set(CMAKE_CXX_COMPILER "/usr/bin/clang-cl-9")
set(CMAKE_LINKER "/usr/bin/lld-link-9")
@nickcernis
nickcernis / readme.md
Last active March 7, 2024 01:43
Exclude node_modules and .git from Backblaze backups on Mac

Exclude node_modules and .git from Backblaze backups on Mac

  1. Edit the file at /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml.
  2. Add these rules inside the bzexclusions tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
@pjv
pjv / update_ungoogled_chromium_extensions.sh
Created June 7, 2017 12:35
get latest version of installed ungoogled chromium extensions
#!/usr/bin/env bash
# dependencies:
# https://www.npmjs.com/package/chrome-web-store-item-property-cli
# https://stedolan.github.io/jq/
# curl
# configure these:
EXTENSIONS_DIR="/path/to/Chromium/Profile/Extensions" ## e.g. on macos ~/Library/Application Support/Chromium/Profile 1/Extensions
DOWNLOAD_DIR="/path/to/where/you/want/latest/extensions"