Skip to content

Instantly share code, notes, and snippets.

View iambrj's full-sized avatar

Bharathi Ramana Joshi iambrj

View GitHub Profile
@iambrj
iambrj / rb.cpp
Created July 31, 2018 16:06
red black tree implementation in c++
#ifndef _RED_BLACK_ //protection from multiple inclusion
#define _RED_BLACK_
struct NODE
{
int key;
int color; //black = 0 and red = 1
NODE* p; //pointer to parent
NODE* r; //pointer to right child
NODE* l; //pointer to left child
};
@iambrj
iambrj / latency.txt
Created December 12, 2018 07:23 — 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
-> Smart body posture recognition & Guiding system
-> Effectively writing YARA rules to detect malwares
-> Drone Doctors
-> Real Time Mapping of Epidemic Spread
-> Hospital Finder - v
-> Proactive Disaster Detection
-> Crowd sourcing of diseases and pests information
-> drone based medical facility - v/
-> Driver Alertness Detection - x
-> Parking spot indicator in vicinity - /
1
2
3
4
5
6
7
8
9
10
<script>
(function() {
var cx = '004894546815994369900:h5v1h2qo0gg';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
@iambrj
iambrj / config
Created July 11, 2019 06:51
config for i3wm ubuntu
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
This file has been truncated, but you can view the full file.
14.139.82.6 - - [27/Jun/2019:08:14:28 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
14.139.82.6 - - [27/Jun/2019:08:14:28 +0000] "GET /favicon.ico HTTP/1.1" 404 152 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
14.139.82.6 - - [27/Jun/2019:08:15:22 +0000] "GET / HTTP/1.1" 301 61 "-" "curl/7.58.0"
::1 - - [27/Jun/2019:08:22:12 +0000] "\x16\x03\x01\x00\xCF\x01\x00\x00\xCB\x03\x03\xA6i\xE4j\xB4\x05\xC5\xC8x \xFD\x0C\x06>|&\xC3;\xD81\x03\x84u\x0E\xD60\xC0\xD9\xA4\xFF7<\x00\x008\xC0,\xC00\x00\x9F\xCC\xA9\xCC\xA8\xCC\xAA\xC0+\xC0/\x00\x9E\xC0$\xC0(\x00k\xC0#\xC0'\x00g\xC0" 400 182 "-" "-"
141.101.77.188 - - [27/Jun/2019:08:26:42 +0000] "GET / HTTP/1.1" 301 110 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
141.101.77.188 - - [27/Jun/2019:08:26:43 +0000] "GET / HTTP/1.1" 301 110 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
141.101.77.188 -
* Given a file, print the nth line
* Given a file with "Roll marks" for all students, print in descending order of
marks
* Remove comments from a file with a c program
* Given a file with a list of namess, print names with particular character and
count of all such names
* In the marks file, mask attendance - replace low attendance with L
@iambrj
iambrj / vim-mnemonics.md
Last active March 16, 2023 23:29
Mnemonics for remembering Vim's keybindings