Skip to content

Instantly share code, notes, and snippets.

@chrisaycock
chrisaycock / faq.md
Last active May 13, 2026 18:20
FAQ for Aspiring Quants

See also the list of quantitative trading firms.

Getting Started

How do I become a quant?

You will become a quant by getting a job as a quant.

I know that’s kind of redundant and not particularly useful, but it’s the only approach.

@chrisaycock
chrisaycock / pcap_udp.cpp
Last active May 24, 2025 13:27
Example for accessing UDP packets in a pcap file
// answer to https://quant.stackexchange.com/q/55088/35
// compile with c++ pcap_udp.cpp -lpcap
#include <iostream>
#include <pcap/pcap.h>
#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 8, 2026 14:09
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@zaius
zaius / background.sh
Created January 16, 2011 23:29
How to redirect a running process output to a file and log out
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@robbywalker
robbywalker / v1_level3.py
Created October 21, 2010 23:05
David Koblas's one-liner for GPCv1 Level 3
from itertools import combinations, chain
nums = tuple([int(v) for v in "3 4 9 14 15 19 28 37 47 50 54 56 59 61 70 73 78 81 92 95 97 99".split(' ') if v.strip()])
print sum([1 for v in chain(*[combinations(nums, r) for r in range(3, len(nums))]) if sum(v[0:-1]) == v[-1]])