Skip to content

Instantly share code, notes, and snippets.

View bergkvist's full-sized avatar

Tobias Bergkvist bergkvist

  • Software Engineer @ Ulvetanna
  • Oslo, Norway
View GitHub Profile
@paulmillr
paulmillr / BLS_Signature.md
Last active March 2, 2024 14:44
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.

@carlolars
carlolars / gitkraken-wsl-bash.bat
Last active February 10, 2023 21:08
Use bash from WSL as sh.exe for GitKraken (5.0.4) for Windows
@echo off
REM Make sure that the path to the script is correct!
@bash -l -c "~/bin/gitkraken-wsl-bash.sh %*"
@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active March 15, 2024 00:21
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
@prokls
prokls / pysha2 sha2 sha256.py
Last active July 8, 2023 21:29
Pure python3 implementation of SHA256 based on @thomdixon's pysha2
#!/usr/bin/python3
__base__ = 'https://github.com/thomdixon/pysha2/blob/master/sha2/sha256.py'
__author__ = 'Lukas Prokop'
__license__ = 'MIT'
import copy
import struct
import binascii
@GaelVaroquaux
GaelVaroquaux / 00README.rst
Last active September 15, 2023 03:58
Copy-less bindings of C-generated arrays with Cython

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy