Skip to content

Instantly share code, notes, and snippets.

View austin362667's full-sized avatar

Austin Liu austin362667

View GitHub Profile
@austin362667
austin362667 / playground.rs
Created June 12, 2024 05:41 — forked from rust-play/playground.rs
Code shared from the Rust Playground
// WARNING: THIS CODE IS A HACKY PROTOTYPE FOR TOY PURPOSES ONLY.
// CHOOSING TO COPY THIS CODE INTO YOUR RUST PROGRAM IS WILDLY UNSOUND.
//
// ping me (davidhewitt) on the PyO3 issue tracker and we can figure out
// how to do this safely.
use std::collections::{HashMap, hash_map::Iter as MapIter};
// pyclass 1
pub struct Class {
@emmatyping
emmatyping / example.rs
Last active October 18, 2024 02:58
Example using pickling in pyo3
#![feature(arbitrary_self_types)]
use pyo3::prelude::*;
use pyo3::pyclass::PyClassShell;
use pyo3::types::{PyBytes, PyTuple};
use pyo3::ToPyObject;
use bincode::{deserialize, serialize};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
@sebjai
sebjai / short_term_alpha.ipynb
Last active November 21, 2025 19:00
Market Making in Short-Term Alpha (Chapter 10.4.2 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, Penalva, published by Cambridge University Press)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!