Skip to content

Instantly share code, notes, and snippets.

View rahul1906's full-sized avatar

Rahul Ravishankar rahul1906

View GitHub Profile
@rahul1906
rahul1906 / length_calculator.py
Created April 15, 2020 21:07
Playlist length calculator from subtitle files
from glob import glob
files = glob('*lang_en*') # change the regex condition here
playlist_seconds = 0
for file in files :
with open(file, 'r') as f:
sub_title = f.read()
h, m, s = sub_title.strip().split('-->')[-1].split(',')[0].strip().split(':')
@rahul1906
rahul1906 / scraper_aieb.py
Last active April 15, 2020 21:08
scraper to get title and description of all the books in the website : http://www.allitebooks.org/
from bs4 import BeautifulSoup as bs
import requests
from tqdm import tqdm, tqdm_notebook as tqdn
import pandas as pd
title_list = []
summary_list = []
end_page_no = 833 # change the end page no to the updated value in website
@rahul1906
rahul1906 / scraper_mlm.py
Last active September 9, 2019 19:14
scraping metadata of machine learning mastery blogs
from bs4 import BeautifulSoup as bs
import requests
from tqdm import tqdm
import pandas as pd
count = 0
total_list = []
for i in tqdm(list(range(1,70))[::-1]):
#print(i)
url = "https://machinelearningmastery.com/blog/page/{}".format(i)
@rahul1906
rahul1906 / script.sh
Last active February 1, 2018 09:03
building leptonica and tesseract4.0 from source
git clone <leptonica latest git url>
cd leptonica
./autoreconf
./autobuild
./configure
make -j
sudo make install
## install all the packages and tools mentioned in the docs
git clone <tesseract url>
@rahul1906
rahul1906 / add_intellij_launcer
Created November 13, 2017 09:47 — forked from rob-murray/add_intellij_launcer
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@rahul1906
rahul1906 / gist:e02a8349879a0224375cbb9e55723488
Created November 8, 2017 18:25 — forked from tedivm/gist:4fe620bfca5afd89004e
Ubuntu CUDA Installation Instructions

Ubuntu Cuda Install Instructions

Upgrade System

apt-get update 
apt-get dist-upgrade
reboot
@rahul1906
rahul1906 / Ebook_websites.txt
Last active October 5, 2017 10:52
Websites to download free ebooks.
http://www.allitebooks.com/
it-ebooks.info
www.it-ebooks.com
http://www.freetechbooks.com/packt-free-ebooks-b81.html
https://github.com/fffaraz/free-tech-ebooks-from-packtpub