Skip to content

Instantly share code, notes, and snippets.


Biranchi biranchi2018

  • Bangalore, India
View GitHub Profile
biranchi2018 /
Created Jun 5, 2021
Async await in Python
from asyncio import run
async def sum():
total = 0
for i in range(0,10):
print(f'i : {i}')
total += i
return total
biranchi2018 /
Last active Jun 5, 2021
Download a file using Python
import requests
url = ''
r = requests.get(url, allow_redirects=True)
with open('facebook.ico', 'wb') as f:
biranchi2018 /
Last active Aug 21, 2019
NLP - Calculating Bigram Tokens
import nltk'punkt')
import itertools
text = "today is 'Nayan's birthday. she loves ice cream. she is also fond of cream cake. we will celebrate her birthday with ice cream cake"
sentences = nltk.sent_tokenize(text)
words = [nltk.word_tokenize(sent) for sent in sentences]
View Tensorflow Object Detection API
Tensorflow Object Detection API :
biranchi2018 / LabelImg.txt
Created Dec 1, 2018
Steps for Installing LabelImg
View LabelImg.txt
Steps for Installing LabelImg :
Step 1.
git clone
Step 2.
sudo pip3 install pyqt5 lxml
Step 3.
from imutils import face_utils
import dlib
import cv2
import time
# initialize dlib's face detector (HOG-based) and then create
# the facial landmark predictor
cap = cv2.VideoCapture(0)
biranchi2018 /
Created Dec 21, 2017 — forked from davej/
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at
@requirements: Python 2.5+, Tweepy (
biranchi2018 /
Created May 12, 2017 — forked from astanin/
OpenCV example. Show webcam image and detect face.
#!/usr/bin/env python2
OpenCV example. Show webcam image and detect face.
import cv2
TRAINSET = "/usr/share/OpenCV/lbpcascades/lbpcascade_frontalface.xml"
biranchi2018 /
Created Apr 16, 2017 — forked from cbednarski/
Webcam capture for python - Pops up a preview from your webcam and snaps a picture when you press 'q'
import cv2
# Windows dependencies
# - Python 2.7.6:
# - OpenCV:
# - Numpy -- get numpy from here because the official builds don't support x64:
# Mac Dependencies
# - brew install python
biranchi2018 / luhn.js
Created Sep 21, 2016 — forked from ShirtlessKirk/luhn.js
Luhn validation algorithm
View luhn.js
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author ShirtlessKirk. Copyright (c) 2012.
* @license WTFPL (
var luhnChk = (function (arr) {
return function (ccNum) {
len = ccNum.length,
bit = 1,