Skip to content

Instantly share code, notes, and snippets.

View abhishekgahlot's full-sized avatar
🏠
Working from home

Abhishek Gahlot abhishekgahlot

🏠
Working from home
View GitHub Profile
@abhishekgahlot
abhishekgahlot / README.md
Created July 26, 2022 06:55 — forked from andrewodri/README.md
Create and Validate an ACM Certificate

This script performs the following actions:

  1. Creates a TLS certificate in ACM
  2. Upserts a validation CNAME record in Route 53
  3. Waits for the validation CNAME record to complete/update
  4. Waits for the certificate to validate and issue
  5. Outputs a description of the certificate

This obviously assumes that your domain's DNS is hosted on Route 53. It also uses the AWS credentials and region for the environment it is executed in.

https://web.archive.org/web/20110219163448/http://howtohft.wordpress.com/2011/02/15/how-to-build-a-fast-limit-order-book/

The response to my first few posts has been much larger than I’d imagined and I’d like to thank everyone for the encouragement.

If you’re interested in building a trading system I recommend first reading my previous post on general ideas to keep in mind.

My first really technical post will be on how to build a limit order book, probably the single most important component of a trading system. Because the data structure chosen to represent the limit order book will be the primary source of market information for trading models, it is important to make it both absolutely correct and extremely fast.

To give some idea of the data volumes, the Nasdaq TotalView ITCH feed, which is every event in every instrument traded on the Nasdaq, can have data rates of 20+ gigabytes/day with spikes of 3 megabytes/second or more. The individual messages average about 20 bytes each so this means handling

did:muport:QmTVQLbREKGnA9Zpb7SFP1Mwd7e2ayUZvSVfW5SmHcXu3K
@abhishekgahlot
abhishekgahlot / GoMgoSample-1.go
Created September 28, 2018 17:16 — forked from 345161974/GoMgoSample-1.go
Sample Go and MGO example
type (
// BuoyCondition contains information for an individual station.
BuoyCondition struct {
WindSpeed float64 `bson:"wind_speed_milehour"`
WindDirection int `bson:"wind_direction_degnorth"`
WindGust float64 `bson:"gust_wind_speed_milehour"`
}
// BuoyLocation contains the buoy's location.
BuoyLocation struct {
@abhishekgahlot
abhishekgahlot / test1
Created September 11, 2018 19:57
teee
aaa
#!/usr/bin/python
import os
pair = 'BTCUSDT'
initialDays = 200 * 24 * 60
initialCandle = 5
@abhishekgahlot
abhishekgahlot / Common-Currency.json
Created September 1, 2018 23:38 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@abhishekgahlot
abhishekgahlot / stdc++.h
Created June 26, 2017 16:02 — forked from velicast/stdc++.h
Linux GCC 4.8.0 /bits/stdc++.h header definition.
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
# Get answers for a question but sort by activity
# Sort by whichever is greatest among: timestamp for the answer, timestamp for latest comment, last time an edit was made on the answer
{
var (id: q1) {
Has.Answer {
answerTs as Timestamp
# ~Post points to a post history
~Post {
@abhishekgahlot
abhishekgahlot / CAP-Theorem
Created May 7, 2017 21:37 — forked from rponte/CAP-Theorem
CAP - Consistency, Availability and Partition-Tolerant
CAP - Consistency, Availability and Partition-Tolerant
The CAP principle states that in distributed computing when it comes
to consistency (C), availability (A) and partition (P)
resilience/tolerance you can have only two of the three.
I was recently introduced to this principle and find it rather
insightful. Basically you can't have your cake and eat it too,
otherwise (computing) life would be too easy.