Skip to content

Instantly share code, notes, and snippets.

import importlib
def check_module(module_name):
try:
importlib.import_module(module_name)
print(f"{module_name} is installed.")
except ImportError:
print(f"{module_name} is NOT installed.")
ml_modules = ["numpy", "pandas", "scikit-learn", "tensorflow", "keras", "pytorch", "matplotlib", "seaborn"]
@corazza
corazza / linecount.sh
Created May 17, 2019 18:28
simple linecount bash function
# filename extension (without the dot) as argument
linecount() {
find . -name "*.$1" | xargs wc -l | sort
}