Skip to content

Instantly share code, notes, and snippets.

View mimoo's full-sized avatar
🦀
求同存异

David Wong mimoo

🦀
求同存异
View GitHub Profile
@mimoo
mimoo / checks.rs
Created March 5, 2025 17:34
protostar
use super::acc_prover::PowersOfBeta;
use crate::equations::{Exp, Variable};
use std::{collections::HashMap, sync::Arc};
/// A check in protostar.
/// We assume that it is given in a list of homogeneous polynomials,
/// starting at degree 0 and strictly increasing by 1.
#[derive(Clone)]
pub enum Check<F, V> {
/// Either a list of homogeneous polynomials from deg0 strictly increasing,
@mimoo
mimoo / privacy-pools-ceremony_attestation.log
Created February 28, 2025 04:31
Attestation for Privacy Pools Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm mimoo-1316043 and I have contributed to the Privacy Pools Ceremony.
The following are my contribution signatures:
Circuit # 1 (withdraw)
Contributor # 436
Contribution Hash: 33e198db c6abcfda 6f23973a bc2f731f
c2e3918a dc67f371 444d85dd 82c11e0c
fcf9c33a 6b97e20d 3165594e 7b787423
0795fb73 5b5ed0af c82cb5a0 0b988823
@mimoo
mimoo / what_is_it.md
Created February 27, 2025 02:58
openAI API

Chat completion API is not JSON parsable

I'm trying to address two problems here:

  • how do you extend the messages with an assistant's answers?
  • what is the format of the messages

Format of messages

Let's answer the second question first. The format given by the playground, using the /v1 API, is to have a content object:

@mimoo
mimoo / aptos-keyless-jan25-iteration_attestation.log
Created January 29, 2025 00:11
Attestation for aptos-keyless-jan25-iteration MPC Phase 2 Trusted Setup ceremony
Hey, I'm mimoo-1316043 and I have contributed to the aptos-keyless-jan25-iteration MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (main)
Contributor # 21
Contribution Hash: 32e63097 038d186a f662af15 d40dba11
364db47a 7c629b09 47c96326 ee76aeeb
0b912a34 b8a2d818 4b756a04 da4e889a
00b1e7a0 afd4c305 6c2e20bb fb88dc3f
@mimoo
mimoo / whoop_rem.py
Created January 11, 2025 03:00
Parse your whoop data to analyze your REM sleep
import argparse
import pandas as pd
from typing import Optional
from pydantic import BaseModel, field_validator, ValidationError
from datetime import datetime
# Define the Pydantic model for sleep data
class SleepData(BaseModel):
cycle_start_time: datetime | None
@mimoo
mimoo / recs.md
Created December 31, 2024 23:34
The recommendation list

Humor

  • all the Bo Burnham standups + inside, some of it is genius and it's hard to categorize it as humor. Inside is a masterpiece that has nothing to do with his other stand ups.

Gaming

  • The Last of Us: Part 1
  • Hunt Showdown

Movies

@mimoo
mimoo / json_serde.md
Created October 24, 2024 19:30
serializing json with non-string keys in a map
/*! `python` grammar compiled for Highlight.js 11.10.0 */
var hljsGrammar=(()=>{"use strict";return e=>{
const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],t={
$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,
built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super"
@mimoo
mimoo / tax_nyc.md
Last active September 12, 2024 21:15
paying tax in new york, the website doesn't work? try that

Paying taxes on https://www.tax.ny.gov/? You get some error message?

This is normal.

There website is shit.

You just need to clear your cookies, which you can by clicking on the button in the address bar.

@mimoo
mimoo / gist:57636f99f0cc507b3e84b1cc63b27344
Last active August 15, 2024 15:18
Beware about blossomup

I'm currently stuck trying to recover money from them. Do not pay for anything on blossomup.co as they will then continuously charge your accounts