Skip to content

Instantly share code, notes, and snippets.

View zero-shubham's full-sized avatar

Shubham Biswas zero-shubham

View GitHub Profile
@zero-shubham
zero-shubham / recursive_dir_size
Created July 30, 2019 12:07
This recursive function written in python3 returns the total size of a directory.
import os
def recursive_dir_size(path):
size = 0
for x in os.listdir(path):
if not os.path.isdir(os.path.join(path,x)):
size += os.stat(os.path.join(path,x)).st_size
else:
size += recursive_dir_size(os.path.join(path,x))
@zero-shubham
zero-shubham / pipenv_cheat_sheet.md
Created June 24, 2019 02:36 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell