Skip to content

Instantly share code, notes, and snippets.

View meetchandan's full-sized avatar
🎯

Chandan Bhattad meetchandan

🎯
View GitHub Profile
Workflow struct {
   Root      Statement
}
// Statement is the building block of DSL workflow. 
// A Statement can be a simple ActivityInvocation or it
// could be a Sequence or Parallel.
Statement struct {
   Activity *ActivityInvocation
   Sequence *Sequence
   Parallel *Parallel
@meetchandan
meetchandan / latency.markdown
Created February 28, 2021 17:02 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>all_dubai</name>
<Style id="poly-000000-1200-77-nodesc-normal">
<LineStyle>
<color>ff000000</color>
<width>1.2</width>
</LineStyle>
<PolyStyle>
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Untitled layer</name>
<Style id="poly-000000-1200-77-nodesc-normal">
<LineStyle>
<color>ff000000</color>
<width>1.2</width>
</LineStyle>
<PolyStyle>
import requests
from decimal import Decimal
'''
Few points:
1. MP would only tell the total amount to refund, it would not do any
calculations of how much is already refunded etc etc
2. MP would not talk to temporal directly(?)
3. Didn't feel the need to use signals,
{
"totalSteps": 4,
"stepLengths": [
15,
30,
40,
15
],
"position": 2,
"estimateStatus": "Delayed",
explain
SELECT * from
offer.offer o FORCE INDEX (sku) WHERE
(id_partner=14371 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=35073 AND sku='N11201409A' AND id_catalog=1) OR (id_partner=27063 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=17493 AND sku='N11074839A' AND id_catalog=1) OR (id_partner=35255 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=891 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=21400 AND sku='N11075084A' AND id_catalog=1) OR (id_partner=14289 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=36817 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=887 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=31865 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=27810 AND sku='N11201409A' AND id_catalog=1) OR (id_partner=36018 AND sku='N11074839A' AND id_catalog=1) OR (id_partner=29082 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=36878 AND sku='N11075084A' AND id_catalog=1) OR (id_partner=13362 AND sku='N11201258A' AND id_catalog=1) OR (id_
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>DS polygons</name>
<Style id="poly-000000-2000-76-nodesc-normal">
<LineStyle>
<color>ff000000</color>
<width>2</width>
</LineStyle>
<PolyStyle>
@meetchandan
meetchandan / latency.txt
Created August 6, 2021 08:26 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
{
"fee_desc" : {
"title" : "How fees work",
"line_items": [
{
"title": "Small order Fee",
"icon": "image_url",
"desc": "..."
},
{