Skip to content

Instantly share code, notes, and snippets.

View rava-dosa's full-sized avatar

Apoorva Kumar rava-dosa

View GitHub Profile
@rava-dosa
rava-dosa / latency.txt
Created March 23, 2019 05:34 — 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
@rava-dosa
rava-dosa / scheduler.cpp
Created January 28, 2019 16:57 — forked from craigjb/scheduler.cpp
Task/Job Scheduler Implementation
/// This is not written to compile. I just copied everything into one file to make viewing easy
/// Here is a sample usage (task definitions and implementations omitted)
int main()
{
TaskScheduler scheduler;
MyTaskA taskA;
MyTaskB taskB;
BOOL running = true
@rava-dosa
rava-dosa / input.json
Created July 12, 2018 14:00
jquery - Populate List with JSON using jQuery
{
"Shoe": [
{
"Women": [
{
"Sandals": [
{
"Slide": [
{
"id": "1",
@rava-dosa
rava-dosa / README.md
Created December 19, 2017 08:20 — forked from rogerallen/README.md
Ubuntu Anaconda Deep Learning

Setting up for Deep Learning on Ubuntu 14.04

Saving this so I can find it later & potentially help others. This sets up the latest as of 10/7/2017

  • Python
  • Keras
  • Tensorflow
  • PyTorch

Assumes Anaconda3 is installed. Here is mine:

@rava-dosa
rava-dosa / README.md
Created December 13, 2017 10:12 — forked from mrtns/README.md
Data Streaming Reading List
  • The Dataflow Model: A Practical Approach to Balancing Correctness, Latency, and Cost in Massive-Scale, Unbounded, Out-of-Order Data Processing
    By Google (Akidau et al)
    In Proceedings of the VLDB Endowment, Vol. 8, No. 12
    August 2015
    http://www.vldb.org/pvldb/vol8/p1792-Akidau.pdf

  • MillWheel: Fault-Tolerant Stream Processing at Internet Scale
    By Google (Akidau et al)

/*
A Minimal Capture Program
This program opens an audio interface for capture, configures it for
stereo, 16 bit, 44.1kHz, interleaved conventional read/write
access. Then its reads a chunk of random data from it, and exits. It
isn't meant to be a real program.
From on Paul David's tutorial : http://equalarea.com/paul/alsa-audio.html
@rava-dosa
rava-dosa / install.md
Created December 2, 2017 13:50 — forked from martijnvandijk/install.md
Installing Sublime Text 2 in linux without root access
@rava-dosa
rava-dosa / docker
Created December 2, 2017 03:17 — forked from joselo/docker
Docker Useful Commands
# Remove unused images
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
# Remove dangling images
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
# Ejecutar bash dentro de un servicio docker
$ docker-compose exec <service id> bash
@rava-dosa
rava-dosa / client.cpp
Created November 9, 2017 17:28 — forked from SteveRuben/client.cpp
Multiple streaming in c++ using opencv; OpenCV video streaming over TCP/IP
/**
* OpenCV video streaming over TCP/IP
* Client: Receives video from server and display it
* by Steve Tuenkam
*/
#include "opencv2/opencv.hpp"
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>