Skip to content

Latest commit

 

History

History
83 lines (60 loc) · 1.87 KB

README.md

File metadata and controls

83 lines (60 loc) · 1.87 KB

Dunzo: sound alert for scripts

Terminal Demo Jupyter Notebook Demo

What is it?

Dunzo is "a slang word for done/finished". dunzo is a simple tool that plays sound. You can use a default sound that comes with the package or provide your own. It is useful to be alerted when your machine learning model finishes training or when your pipeline finishes running.

Installation

pip install dunzo

Upgrade

pip install --upgrade dunzo

Usage

In Python

from dunzo import done 
done()
# or 
done(sound="dog")

In Terminal:

done
# or 
done dog 

However, to make the above work you have to follow a few steps. If you know how to bypass this, please tell me.

# find your python path  
which python # it would look like the following 
#$ /Users/<your_user_name>/opt/anaconda3/bin/python

# If so, your done command will live here: '/Users/<your_user_name>/opt/anaconda3/bin/done'
# You want to add it in your zshrc or bash_profile to setup an alias.  
open .zshrc # or equivalent 
# add the following line to .zshrc to create an alias   
alias done='/Users/<your_user_name>/opt/anaconda3/bin/done'
# restart terminal or source it 
source .zshrc
# run the command 
done # should output something like below:   
#$ Finished @ (Date) 2022-04-04 (Time) 06:18:59 PM PDT! Played flute sound

Development

# update your version 
poetry version <add_package_version> 
poetry publish --build

Adding development packages

poetry add --dev <your package>

List of available sounds effect

  • Uplifting flute notification: flute
  • Retro game notification: game
  • Dog barking twice: dog