Skip to content

Instantly share code, notes, and snippets.

@stephenLee
stephenLee / semaphore-binary-merkle-root-fix_attestation.log
Created August 14, 2025 16:08
Attestation for Semaphore Binary Merkle Root Fix MPC Phase 2 Trusted Setup ceremony
Hey, I'm stephenLee-1144508 and I have contributed to the Semaphore Binary Merkle Root Fix MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphore-1)
Contributor # 563
Contribution Hash: d886c054 5c8337c3 22a67d42 eea214a8
abf3f5c1 fb02e898 c1aac8d5 d0573c76
9c660670 b702b150 9cdc1e5d 86819d81
f990ec81 c18e5ee3 c3eb5651 de300c3e

A Few Useful Things to Know about Machine Learning

The paper presents some key lessons and "folk wisdom" that machine learning researchers and practitioners have learnt from experience and which are hard to find in textbooks.

1. Learning = Representation + Evaluation + Optimization

All machine learning algorithms have three components:

  • Representation for a learner is the set if classifiers/functions that can be possibly learnt. This set is called hypothesis space. If a function is not in hypothesis space, it can not be learnt.
  • Evaluation function tells how good the machine learning model is.
  • Optimisation is the method to search for the most optimal learning model.
@stephenLee
stephenLee / rank_metrics.py
Created September 6, 2016 14:35 — forked from bwhite/rank_metrics.py
Ranking Metrics
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
@stephenLee
stephenLee / useful_pandas_snippets.py
Created October 26, 2015 09:16 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]
"""
leverage work of briancappello and quantopian team
(especcially twiecki, eddie, and fawce)
"""
import pandas as pd
from zipline.gens.utils import hash_args
from zipline.sources.data_source import DataSource
import datetime
import csv
import numpy as np
  1. General Background and Overview

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@stephenLee
stephenLee / trends.py
Last active August 29, 2015 14:06 — forked from tlmaloney/trends.py
  1. General Background and Overview