Skip to content

Instantly share code, notes, and snippets.

View anujkhare's full-sized avatar

Anuj Khare anujkhare

View GitHub Profile
@anujkhare
anujkhare / clone_all.sh
Created December 16, 2018 06:29
Clone all the repositories listed in a text file given as input: useful when setting up a dev env with a lot of repos!
echo "If your SSH key has a passphrase, you might need to enter it each time. Consider using ssh-agent or removing the passphrase";
while read p; do
echo "$p";
git clone "$p";
done < $1
@anujkhare
anujkhare / clone_all.sh
Created December 16, 2018 06:29
Clone all the repositories listed in a text file given as input: useful when setting up a dev env with a lot of repos!
echo "If your SSH key has a passphrase, you might need to enter it each time. Consider using ssh-agent or removing the passphrase";
while read p; do
echo "$p";
git clone "$p";
done < $1
class Foo():
def __init__(self):
self.foo1 = 1
self.foo2 = 2
self.foo3 = 3
self.foo4 = 4
self.foo5 = 5
self.str_to_attr = {
@anujkhare
anujkhare / racket_label.py
Created December 14, 2016 16:39
Convert ImageNet style annotations to the form required for Darknet-YOLO. Based on voc_label.py script.
import xml.etree.ElementTree as ET
# import pickle
import os
from os import listdir, getcwd
from os.path import join
classes = ["tennis racket"]
def convert(size, box):
@anujkhare
anujkhare / coco.ipynb
Created December 14, 2016 16:35
To download all the images of the class "tennis racket".
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.