Skip to content

Instantly share code, notes, and snippets.

View Koukyosyumei's full-sized avatar

Hideaki Takahashi Koukyosyumei

View GitHub Profile
@alexotsu
alexotsu / sumLargerThanTen.circom
Created December 31, 2024 05:27
Simple ZK Circuit
// run on https://zkrepl.dev/
pragma circom 2.1.6;
include "circomlib/poseidon.circom";
template SumLargerThanTen() {
signal input a;
signal output b;
@RareSkills
RareSkills / md5.circom
Last active January 7, 2025 19:15
md5 hash in Circom
include "circomlib/bitify.circom";
include "circomlib/gates.circom";
// CalculateTotal and QuinSelector taken from
// https://github.com/darkforest-eth/circuits/tree/master/perlin
template CalculateTotal(n) {
signal input in[n];
signal output out;
signal sums[n];
@josephawallace
josephawallace / isequal.circom
Last active January 7, 2025 19:17
IsEqual Circom Component (IAP)
pragma circom 2.1.6;
template IsEqual () {
signal input in[2];
signal output out;
signal tmp;
tmp <-- in[0] == in[1] ? 1 : 0;
out <== tmp;
@RareSkills
RareSkills / Sort.circom
Created July 4, 2024 06:34
Underconstrained sort algorithm
pragma circom 2.1.8;
include "./node_modules/circomlib/circuits/multiplexer.circom";
include "./node_modules/circomlib/circuits/comparators.circom";
// checks if the second array is a
// permutation of the first based on
// the advice
template ForceIsPermutation(n) {
signal input in1[n];
signal input in2[n];

Open this in zkREPL →

This file can be included into other zkREPLs with include "gist:4149b97a72b4f51714620ecfaaf139fc";

@stefanbschneider
stefanbschneider / networking_datasets.md
Last active July 12, 2025 01:43
List of datasets related to networking. Useful for data-driven evaluation or machine learning approaches. Feel free to comment with updates.
@oscarknagg
oscarknagg / projected_gradient_descent.py
Last active November 25, 2023 03:52
Gist for projected gradient descent adversarial attack using PyTorch
import torch
def projected_gradient_descent(model, x, y, loss_fn, num_steps, step_size, step_norm, eps, eps_norm,
clamp=(0,1), y_target=None):
"""Performs the projected gradient descent attack on a batch of images."""
x_adv = x.clone().detach().requires_grad_(True).to(x.device)
targeted = y_target is not None
num_channels = x.shape[1]
for i in range(num_steps):
@mono0926
mono0926 / commit_message_example.md
Last active June 6, 2025 05:12
[転載] gitにおけるコミットログ/メッセージ例文集100
@icchy
icchy / README.md
Last active May 16, 2025 04:11
pwntools使い方 まとめ

pwntoolsの便利そうな機能まとめ

公式リファレンス: pwntools

install

最新版を降らせる
pip install "git+https://github.com/Gallopsled/pwntools#egg=pwntools"

template