This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this script in the end of your .(ba|z)shrc file | |
# checks if it's a new day | |
if [[ ! -e /tmp/$(date +"%Y%m%d").sem ]] | |
then | |
touch /tmp/$(date +"%Y%m%d").sem | |
if (dialog --title "update packages" --yesno "Let's update our pacman packages?(yay command)" 6 30) | |
then | |
clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by my friend Alfinete | |
from pydub import AudioSegment | |
from pydub.silence import split_on_silence | |
audio = AudioSegment.from_mp3('in.mp3') # or from_<your-audio-extension> | |
threshold = -60 # audio threshold in dB to trim audio, i've set this manually :P | |
# split when audio is silent | |
nonsilent_parts = split_on_silence(audio, silence_thresh=-60) |