Skip to content

Instantly share code, notes, and snippets.

@rajgauttam
rajgauttam / OrderFlow.ipynb
Created March 9, 2023 20:26 — forked from sebjai/OrderFlow.ipynb
Optimal trading with order-flow and short-term alpha
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajgauttam
rajgauttam / non_equi_inner_join_in_pandas.py
Created October 17, 2020 19:24 — forked from Nikolay-Lysenko/non_equi_inner_join_in_pandas.py
How to join two DataFrames on conditions that can be other than exact match?
"""
Implementation of non-equi inner join in `pandas`.
Non-equi join is a join with conditions other than exact match.
For example, values from a column of a left `DataFrame` must be higher
than values from a column of a right `DataFrame` and lower than values
from another column of the right `DataFrame`.
@author: Nikolay Lysenko
"""
@rajgauttam
rajgauttam / MemoryAllocationHFT.cpp
Created June 10, 2020 20:35 — forked from silahian/MemoryAllocationHFT.cpp
Pre allocated vs dynamic arrays performance for low latency / high frequency trading systems
// Example program
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
// ***********************************
// This is for measuring CPU clocks
#if defined(__i386__)
static __inline__ unsigned long long rdtsc(void)
@rajgauttam
rajgauttam / gpg_test.py
Created May 6, 2019 22:04 — forked from ryantuck/gpg_test.py
working example of using gnupg in python
# install:
# pip3 install python-gnupg
# note - gpg needs to be installed first:
# brew install gpg
# apt install gpg
# you may need to also:
# export GPG_TTY=$(tty)
@rajgauttam
rajgauttam / Application.java
Created March 22, 2019 11:44 — forked from serac/Application.java
Configuring RestTemplate for Client TLS in a Spring Boot Application
/*
* See LICENSE for licensing and NOTICE for copyright.
*/
package edu.vt.middleware.app;
import java.io.File;
import java.security.*;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
@rajgauttam
rajgauttam / oreilly-freebooks.sh
Created September 19, 2018 10:53 — forked from nikAizuddin/oreilly-freebooks.sh
This UNIX Shell script will download most O'Reilly free pdf books about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps from http://www.oreilly.com/programming/free/.
#!/bin/sh
################################################################################
## This UNIX Shell script will download most O'Reilly free pdf books
## about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps
## from http://www.oreilly.com/programming/free/.
## There are a few books that are non-free, so I don't list them here.
##
## --- How to RUN? ---
## $ sh -e oreilly-freebooks.sh
@rajgauttam
rajgauttam / CC150 8.2 callCenter.java
Created April 5, 2018 17:51 — forked from blindchaser/CC150 8.2 callCenter.java
8.2 Imagine you have a call center with three levels of employees: respondent, manager, and director. An incoming telephone call must be first allocated to a respondent who is free. If the respondent can't handle the call, he or she must escalate the call to a manager. If the manager is not free or not able to handle it, then the call should be …
/* Title: CC150 8.2 callCenter
* Time: 20140115
* Creator: blindchaser
* Time Complexity:
* Space Complexity:
* 优空间解法
* 优时间解法:
* 心得: 可以跑
*
*