Skip to content

Instantly share code, notes, and snippets.

View mwufi's full-sized avatar
🗾
sf

CZ Tang mwufi

🗾
sf
View GitHub Profile
@kindgracekind
kindgracekind / README.md
Last active October 4, 2024 19:16
Multiple pseudonymous accounts with Semaphore

Multiple Pseudonymous Accounts with Zero-Knowledge Proofs

As AI gets better at imitating humans, proof of personhood schemes are becoming increasingly important. These systems set out to accomplish the following goals:

  • Verify that a given user is a human
  • Verify that a given user is unique

The latter goal, in particular, can have drawbacks. For example, users are unable to create multiple pseudonymous accounts, which may be a desired feature in something like a microblogging platform.

In order to solve this problem, we can use Semaphore's external nullifiers to allow up to N pseudonymous accounts while ensuring accounts cannot be linked to each other. This is in contrast to the typical use of external nullifiers, in which a single app uses a single nullifier to prevent duplicate signups.

@vallesmarinerisapp
vallesmarinerisapp / prompt_generator.py
Created November 8, 2023 02:20
cosmictrip.space prompt generator with GPT-4 for generating DALL-E 3 space images
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.jobstores.base import JobLookupError
from app import write_log
from models import Prompt, Image
import random
from flask import Flask
import openai
import models
from datetime import datetime
import requests
@LostKobrakai
LostKobrakai / form_live.ex
Last active April 16, 2025 10:08
Phoenix LiveView form with nested embeds and add/delete buttons
defmodule NestedWeb.FormLive do
use NestedWeb, :live_view
require Logger
defmodule Form do
use Ecto.Schema
import Ecto.Changeset
embedded_schema do
field :name, :string
@j-bullard
j-bullard / App.tsx
Created July 4, 2021 07:15
Headless UI with React Hook Forms
import "./styles.css";
import { Person } from "./types";
import { Listbox } from "./listbox/listbox";
import { useForm } from "react-hook-form";
const people: Person[] = [
{ id: 1, name: "Durward Reynolds", unavailable: false },
{ id: 2, name: "Kenton Towne", unavailable: false },
{ id: 3, name: "Therese Wunsch", unavailable: false },
{ id: 4, name: "Benedict Kessler", unavailable: true },