Skip to content

Instantly share code, notes, and snippets.

@sammchardy
sammchardy / binance-depth-cache-notes.txt
Last active September 25, 2022 10:36
Binance Depth Cache Notes
Ninj0r admin, [Oct 20, 2017, 9:18:55 AM]:
It's a three step process:
1) Start listening to the stream and buffering the messages
2) Get a depth snapshot
3) replay the buffered messages and the live messges.
Depth updates have two variables, u and U
U is the initial updateId, and u is the final updateId. There can be multiple updates "compressed" into a single update that comes out via the web socket stream.
@akshaychawla
akshaychawla / funky_lambda.py
Created November 22, 2017 05:44
Lambda layer with multiple inputs in Keras.
import numpy as np
from keras.models import Model
from keras.layers import Dense, Activation, Lambda, Input
import keras.backend as K
from keras.utils import to_categorical
# Model definition
def foo(ip):
a = ip[1]
x = ip[0]
@zhanwenchen
zhanwenchen / Install NVIDIA Driver and CUDA.md
Last active March 13, 2024 23:42 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active January 7, 2026 16:05
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix