Skip to content

Instantly share code, notes, and snippets.

View mmpataki's full-sized avatar

Madhusoodan Pataki mmpataki

View GitHub Profile
@mmpataki
mmpataki / novpn.py
Last active August 27, 2020 10:28
FB term
import signal
import subprocess
from fbchat import Client
from fbchat.models import *
user = "F1_user_email"
passwd = "F1_user_password"
recvFrom = "F2_user_id"
client = None
@mmpataki
mmpataki / MyAgent.java
Last active August 27, 2020 10:28
Blog: JVM agents and JIT
package com.mmp.jvmtiperf;
import javax.crypto.spec.*;
import java.lang.instrument.Instrumentation;
import java.security.spec.*;
import java.util.Base64;
import javax.crypto.*;
public class MyAgent {
@daniel-sc
daniel-sc / Item.java
Created October 2, 2014 13:31
Java toString() Parser - creates object/instance from toString() output (-string)
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;
@jboner
jboner / latency.txt
Last active April 18, 2024 17:18
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