Skip to content

Instantly share code, notes, and snippets.

View dipongkor's full-sized avatar
🎯
Focusing

Atish Kumar Dipongkor dipongkor

🎯
Focusing
View GitHub Profile
@dipongkor
dipongkor / split.py
Created December 5, 2020 06:34 — forked from kelvintaywl/split.py
Python Script to split CSV files into smaller files based on number of lines
import csv
import sys
import os
# example usage: python split.py example.csv 200
# above command would split the `example.csv` into smaller CSV files of 200 rows each (with header included)
# if example.csv has 401 rows for instance, this creates 3 files in same directory:
# - `example_1.csv` (row 1 - 200)
# - `example_2.csv` (row 201 - 400)
# - `example_3.csv` (row 401)
@dipongkor
dipongkor / 65 ML BOOKS.py
Created April 28, 2020 12:12
Python script for downloading free 65 Machine Learning e-book from Springer
import requests
import re
from bs4 import BeautifulSoup
from clint.textui import progress
# Url of the article
article_url = "https://towardsdatascience.com/springer-has-released-65-machine-learning-and-data-books-for-free-961f8181f189"
html_request = requests.get(article_url)
beautifulSoup = BeautifulSoup(html_request.content, "html.parser")