Skip to content

Instantly share code, notes, and snippets.

View SaswatPadhi's full-sized avatar
🧑‍💻

Saswat Padhi SaswatPadhi

🧑‍💻
View GitHub Profile
@SaswatPadhi
SaswatPadhi / test.py
Created September 13, 2019 18:42
stackoverflow.com#57928364
# Comparing solutions for: https://stackoverflow.com/questions/57928364/pandas-and-tuple-check/57928434#57928434
import random
import string
import pandas as pd
def rnd_str(l):
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(l))
# https://stackoverflow.com/a/56844986/554436
def test(s):
d = {"foo": "foo", "bar": "bar"}
return d.get(s)
if __name__ == '__main__':
from dis import dis
from timeit import timeit

Keybase proof

I hereby claim:

  • I am saswatpadhi on github.
  • I am padhi (https://keybase.io/padhi) on keybase.
  • I have a public key ASCi4tm76_M91c7M0N2a2x_ye5uYFrO7O6jOZpVenHjjFQo

To claim this, I am signing this object:

@SaswatPadhi
SaswatPadhi / data.txt
Created March 21, 2017 07:01
Attachment: Incorrect Column Pattern Profile
1898
1900
1877
1875
1877
1870
?
1870
1877
1859
@SaswatPadhi
SaswatPadhi / polyglot.pl.php.py.rb.cpp
Created June 5, 2012 03:33 — forked from wakhub/polyglot.pl.php.py.rb
PHP + Perl + Python + Ruby + C + C++ - polyglot
#/*<?php eval('echo "PHP Code\n";'); __halt_compiler();?> */
#include <stdio.h> /*
print ((("b" + "0" == 0) and eval('"Perl Code\n"')) or (0 and "Ruby Code\n" or "Python Code"));
__DATA__ = 1
"""""
__END__