Skip to content

Instantly share code, notes, and snippets.

View ChaiBapchya's full-sized avatar
💭
Back to Work

Chaitanya Prakash Bapat ChaiBapchya

💭
Back to Work
View GitHub Profile
@ChaiBapchya
ChaiBapchya / restaurant_finder.py
Last active March 17, 2023 18:05
Find restaurants near the given partial post code just-eat API
import requests
MIN_AVERAGE_RATING = 4.5
MIN_RATING_COUNT = 100
MAX_DELIVERY_ETA_MINS_UPPER = 45
TARGET_CUISINE = 'pizza'
class InvalidPostcodeException(Exception):
pass
@ChaiBapchya
ChaiBapchya / team_selection.md
Last active August 31, 2021 07:42
Team Conundrum
Dimension Team A Team B
Product roadmap Well-defined In pipeline
Responsibility Well-defined TBD
Manager Easy to talk to Good to talk to
Current direct reports 5 11
Projected direct reports 8 20 / 10
Tech stack Hack [heavy], Python [little] Python [heavy], Hack [2nd]
Novelty of problem space Yes Yes
Thought leadership Well-defined In pipeline
@ChaiBapchya
ChaiBapchya / launcher.py
Last active May 10, 2021 17:55
Sagemaker + Huggingface + TF + HVD
import sagemaker
from sagemaker.huggingface import HuggingFace
# hyperparameters, which are passed into the training job
hyperparameters={
'epochs': 1,
'train_batch_size': 2,
'model_name':'bert-large-uncased-whole-word-masking'
}
role = sagemaker.get_execution_role()
@ChaiBapchya
ChaiBapchya / hyperparameters.md
Created May 6, 2021 20:29
Huggingface-Bert-large hyperparams
Key Value
do_eval FALSE
epochs 3
model_dir s3://sagemaker-us-east-1/1-CG3S-2021-04-28-21-07-57-708/model
model_name_or_path bert-large-uncased-whole-word-masking
@ChaiBapchya
ChaiBapchya / itertools_vs_for.py
Created April 11, 2021 09:48
itertools vs for loop speed test
import timeit
print('------------For loop timeit-------------')
testcode='''
a=[]
for i in range(1,1000):
a.append(i)
'''
print(timeit.timeit(stmt=testcode))
print('------------itertool timeit-------------')
@ChaiBapchya
ChaiBapchya / ldd_libmxnet.md
Created August 24, 2020 02:41
ldd for libmxnet.so
$ldd libmxnet.so
    linux-vdso.so.1 =>  (0x00007ffe29090000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f313c64a000)
    libcudart.so.10.1 => /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudart.so.10.1 (0x00007f313c3ce000)
    libcublas.so.10 => /usr/lib/x86_64-linux-gnu/libcublas.so.10 (0x00007f3138633000)
    libcurand.so.10 => /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcurand.so.10 (0x00007f31345d2000)
    libcusolver.so.10 => /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcusolver.so.10 (0x00007f3129ac7000)
    libiomp5.so => /usr/local/lib/libiomp5.so (0x00007f31296eb000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f31294ce000)
@ChaiBapchya
ChaiBapchya / mxnet_link.md
Created August 24, 2020 02:03
Link line for libmxnet.so
@ChaiBapchya
ChaiBapchya / static_build_time_dependencies.md
Created August 24, 2020 02:01
MXNet's static build time dependencies
Downloading https://files.pythonhosted.org/packages/71/81/00184643e5a10a456b4118fc12c96780823adb8ed974eb2289f29703b29b/pypandoc-1.4.tar.gz
Downloading https://files.pythonhosted.org/packages/9f/01/5b09c48dff3a1724c72a9bb77c78def27602a2cbd941b0e118796f22394c/awscli-1.16.303-py2.py3-none-any.whl (2.5MB)
Downloading https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Downloading https://files.pythonhosted.org/packages/d1/0d/2fafa55aa26c3469b2ed32f08c1284d68b20d34d6173fa3a45c14f694dc9/botocore-1.13.39-py2.py3-none-any.whl (5.8MB)
Downloading https://files.pythonhosted.org/packages/16/8a/1fc3dba0c4923c2a76e1ff0d52b305c44606da63f718d14d3231e21c51b0/s3transfer-0.2.1-py2.py3-none-any.whl (70kB)
Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)
Downloading https://files.pythonhosted.org/packages/e1/ae/baedc9cb175552e95f3395c43055a6a5
$ aws configure
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [None]:us-west-2
Default output format [None]:json
@ChaiBapchya
ChaiBapchya / awscli_configure.md
Created August 24, 2020 01:39
Configure awscli
# Assuming you have access to herring repo & dlc container
# Configure awscli2: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

# verify
aws --version