Skip to content

Instantly share code, notes, and snippets.

View sunny-g's full-sized avatar

Sunny Gonnabathula sunny-g

View GitHub Profile
@WolfwithSword
WolfwithSword / external_spool.yaml
Last active April 26, 2024 05:57
Bambu X1C + NodeRed HomeAssistant YAML Snippet
type: picture-elements
view_layout:
column: 1
elements:
- type: custom:config-template-card
entities:
- sensor.{HA_PRINTER_DEVICE_NAME}_vt_tray
element:
type: state-icon
entity: sensor.{HA_PRINTER_DEVICE_NAME}_vt_tray
@binji
binji / notes.md
Created November 25, 2022 05:14
Compiling LLVM/Clang for Wasm notes
  • How to Cross Compile LLVM: https://llvm.org/docs/HowToCrossCompileLLVM.html
  • Building LLVM with CMake: https://llvm.org/docs/CMake.html
  • Hints from wasi-sdk Makefile: https://github.com/CraneStation/wasi-sdk/blob/master/Makefile
  • Try compiling natively (needed for llvm-tblgen and clang-tblgen)
    • cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;WebAssembly" -DLLVM_ENABLE_PROJECTS="lld;clang" ../llvm
  • Try building LLVM with WASI:
  • cmake -G Ninja -DCMAKE_AR=”/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-ar” -DCMAKE_RANLIB=”/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-ranlib” -DCMAKE_C_COMPILER="/usr/local/google/home/binji/dev/wasi-sdk-5.0/opt/wasi-sdk/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/google/home/binji/dev/wasi-sdk-5.0/opt/wasi-sdk/bin/clang++" -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/usr/local/google/home/binji/dev/wasi-clang -DLLVM_TABLEGEN=/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-tblgen -DCLANG_TABLEGEN=/
@primus852
primus852 / cuda_11.7_installation_on_Ubuntu_22.04
Last active February 10, 2025 12:11 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@moyix
moyix / codegen_gptj_convert.py
Created July 22, 2022 19:33
Convert a SalesForce CodeGen model's weights to plain GPT-J
#!/usr/bin/env python
import argparse
import torch
from transformers import GPTJForCausalLM, GPTJConfig
# Note: these need the git version of Transformers as of 7/22/2022
from transformers import CodeGenTokenizer, CodeGenForCausalLM
from transformers import CODEGEN_PRETRAINED_MODEL_ARCHIVE_LIST
parser = argparse.ArgumentParser('Convert SalesForce CodeGen model to GPT-J')
@RangerMauve
RangerMauve / hyperbee-indexed.md
Last active April 6, 2024 13:33
Hyperbee Indexed DB

Hyperbee Indexed DB

Purpose:

Hyperbee is super useful for storing data and searching for data using it's ordered key search. When you set up your keyspace just right, you can query a small subset of a large database and quickly load what you need without having to download the entire dataset or traverse it.

This module seeks to make it easier to set up these indexes for JSON data and to make it easy to query large datasets.

How it works

We’ve been saying for a long time that we need “something like a CAP theorum for IPLD.” By this, I mean that we need a way to talk about the design tradeoffs that are made when designing data structures in IPLD.

This is going to end up looking a lot different than the CAP theorem but the end goal is to have something that provides us a blueprint for how to discuss the performance tradeoffs of different data structure designs.

Anyway, here’s my attempt at a first draft. It’s incomplete but I need some feedback in order to iterate on it and turn it into a proper PR.


@warpfork
warpfork / codecs-and-completeness.md
Last active October 2, 2024 22:08
IPLD: Codecs and Completeness

Codecs and Completeness

IPLD has a very all-embracing approach to compatibility: many systems have some sort of bridge to IPLD. As a result, it's very important to understand which of those bridges are "complete", and which contain limitations; and for those that have limitations, what those limitations are. Most of this appears in the Codec layer: because Codecs are responsible for how data is serialized, they encompass almost all of the compatibility efforts in bridging IPLD systems to each other and to other systems.

We define "completeness" in terms of the [[Data Model]] (and split it into two concepts):

@angerman
angerman / nixos-on-rockpi4.org
Created May 28, 2020 13:53
NixOS on RockPi4

Installing NixOS on the RockPi4 (B)

The general plan is to build an sd-image-aarch64 from nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix flash it to the eMMC and have the system come up, similar to how this “just works” for raspberry-pis.

The RockPi 4 is a RockChip RK3399 based board, build by radxa with the same formfactor as a rasperry Pi. One noticable difference is that the Rock Pi’s cpu is at the bottom to better allow for the

@paulmillr
paulmillr / BLS_Signature.md
Last active February 12, 2025 15:27
BLS Signature for Busy People

BLS Signature for Busy People

Summary

  • BLS stands for

    • Barreto-Lynn-Scott: BLS12, a Pairing Friendly Elliptic Curve.
    • Boneh-Lynn-Shacham: A Signature Scheme.
  • Signature Aggregation

  • It is possible to verify n aggregate signatures on the same message with just 2 pairings instead of n+1.

@bus710
bus710 / README.md
Last active January 1, 2025 22:26
Building rust native library to be used by flutter/android

Building rust native library to be used by flutter/android

This short doc shows how to build rust to be used by flutter/android app.
Inspired by hyousef's work but added some details for the workflow.



References

Docs: