Skip to content

🐍 Python hacks that improves your workflow, productivity and helps you write smarter code

Notifications You must be signed in to change notification settings

rebase-energy/data-science-tips-and-hacks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Data Science Tips and Tricks πŸ“ˆ

This page contains a collection of small, helpful Python tricks and tips designed to streamline your Python workflow, improve your productivity, and help you write smarter code.

πŸ“– Table of Contents


πŸ’‘ Tips and Hacks

Warning when pip install in base

Add this script to your shell configuration file, e.g. ~/.bashrc or ~/.zshrc. To check which shell you are using run echo $SHELL.

pip() {
    if [[ -z "$VIRTUAL_ENV" ]]; then
        echo "WARNING: You are not in a virtual environment. Do you want to proceed? (yes/no)"
        read -r answer
        if [[ "$answer" != "yes" ]]; then
            echo "Aborting pip command."
            return 1
        fi
    fi
    command pip "$@"
}

Print folder tree structure in terminal

The terminal command tree lets you list the contents of a folder as a tree-like structure. The command to run is tree path/to/folder.

Instructions to install treeon Linux or MacOS (already pre-installed on Windows):

sudo apt-get install tree # On Linux
brew install tree # On MacOS (with homebrew)

Happy hacking! πŸ’»

About

🐍 Python hacks that improves your workflow, productivity and helps you write smarter code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published