Skip to content

Instantly share code, notes, and snippets.

@AALEKH
AALEKH / format_symbols.txt
Last active May 30, 2022 12:42
Format Symbols
%d: Int
%f: float, double
%c: character
%s: string
%ld: long int
%e: Used to express small numbers in terms of exponentials
%lf: double
@AALEKH
AALEKH / escape_sequences.sh
Created May 28, 2022 22:40
escape sequences in C
\a Write a <bell> character.
\b Write a <backspace> character.
\f Write a <form-feed> character.
\n Write a <new-line> character.
\r Write a <carriage return> character.
\t Write a <tab> character.
\v Write a <vertical tab> character.
\´ Write a <single quote> character.
\\ Write a backslash character.
\num Write a byte whose value is the 1-, 2-, or 3-digit octal number num. Multibyte characters can be constructed using multiple \num sequences.
@AALEKH
AALEKH / remember.m
Created August 19, 2020 19:35
Remember Octave
>>A = [1 2; 3 5]
A =
1 2
3 5
>>sum(A, 1)
ans =
4 7
@AALEKH
AALEKH / label2mat.m
Created August 10, 2020 19:45 — forked from hunan-rostomyan/label2mat.m
One Hot Encoder/Decoder in Octave/Matlab
function mat = label2mat(label, size)
if ~exist('size', 'var') || isempty(size)
size = 10;
end
if label > size
error('Label (%d) should be < size (%d).', label, size);
end
octave:12> a = [1 2;3 4]
a =
1 2
3 4
octave:13> a(:,1)
ans =
1
@AALEKH
AALEKH / Some_Advice.txt
Created May 31, 2020 07:23
Hope this helps
Since you seem to be well versed in Optimization algorithms and Machine Learning, you should consider participating in
ongoing Conference Competitions/Workshops for ex Gecco has several competitions running right now:
https://gecco-2020.sigevo.org/index.html/Competitions; in addition there are many Upcoming competitions and workshops in
ECCV(and many other conferences too, check out list of conferences in this brilliant space: https://aideadlin.es):
https://eccv2020.eu/workshops/ working on such problems can provide you an unique exposure(that even some internship might
not cover), plus there is always doors open for open source project contributions at many organization which to be honest
is bed rock of many your prospective internship that you might be targetting, a great post to summarize this point is
shared by our senior Vaidik sir here: https://www.linkedin.com/posts/vaidik_interns-internship-internshipprogram-activity-6660997288166600704-7Bqs/ .
Don't feel stuck with conventional paths that have
@AALEKH
AALEKH / latency.markdown
Created November 14, 2019 02:39 — 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

@AALEKH
AALEKH / csv_starter.py
Created October 28, 2018 14:38
Starter code for most of the csv data
f = open("enter_file_name", 'r')
data = f.read()
rows = data.split('\n')
weather_data = []
for row in rows:
sp_row = row.split(',')
weather_data.append(sp_row)
We can't make this file beautiful and searchable because it's too large.
RowNumber,CustomerId,Surname,CreditScore,Geography,Gender,Age,Tenure,Balance,NumOfProducts,HasCrCard,IsActiveMember,EstimatedSalary,Exited
1,15634602,Hargrave,619,France,Female,42,2,0,1,1,1,101348.88,1
2,15647311,Hill,608,Spain,Female,41,1,83807.86,1,0,1,112542.58,0
3,15619304,Onio,502,France,Female,42,8,159660.8,3,1,0,113931.57,1
4,15701354,Boni,699,France,Female,39,1,0,2,0,0,93826.63,0
5,15737888,Mitchell,850,Spain,Female,43,2,125510.82,1,1,1,79084.1,0
6,15574012,Chu,645,Spain,Male,44,8,113755.78,2,1,0,149756.71,1
7,15592531,Bartlett,822,France,Male,50,7,0,2,1,1,10062.8,0
8,15656148,Obinna,376,Germany,Female,29,4,115046.74,4,1,0,119346.88,1
9,15792365,He,501,France,Male,44,4,142051.07,2,0,1,74940.5,0
@AALEKH
AALEKH / game-theory-books.markdown
Created August 7, 2018 00:32 — forked from matthewmccullough/game-theory-books.markdown
Game Theory Book list by Matthew McCullough

Economics & Software Development - Book List

The following books are ordered in descending order of Matthew's preference.

by Avinash K. Dixit

Recommended by Ted Neward. A different perspective and writing style from the other volumes listed.

“I am hard pressed to think of another book that can match the combination of practical insights and reading enjoyment.”—Steven Levitt