<commit_before>#!/bin/bash

# Bash strict mode
set -euo pipefail
IFS=$'\n\t'

LIST='/tmp/pip3_list.txt'

general_packages(){
	pip3 list | awk '{ print $1 }' | sed -e 's/-//g' -e 's/youtubedl/youtube-dl/g' -e '/^\s*$/d' | tail -n +2 > "$LIST"
}

pip3_upgrade(){
	while read -r package; do
		sudo -H pip3 install "$package" --upgrade
	done < "$LIST" || return 1
}

if [[ -z "$LIST" ]] ; then
	rm "$LIST"
fi

general_packages && pip3_upgrade<commit_msg>	modified:   pip3_upgrade.sh<commit_after>#!/usr/bin/env bash

# Bash strict mode
set -euo pipefail
IFS=$'\n\t'

LIST='/tmp/pip3_list.txt'

general_packages(){
	pip3 list | awk '{ print $1 }' | sed -e 's/-//g' -e 's/youtubedl/youtube-dl/g' -e '/^\s*$/d' | tail -n +2 > "$LIST"
}

pip3_upgrade(){
	while read -r package; do
		sudo -H pip3 install "$package" --upgrade
	done < "$LIST" || return 1
}

if [[ -z "$LIST" ]] ; then
	rm "$LIST"
fi

general_packages && pip3_upgrade
{'fraction_non_alphanumeric': 0.20693391115926327, 'fraction_numerical': 0.018418201516793065, 'mean_word_length': 3.238532110091743, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '604406', 'n_tokens_mistral': 416, 'n_tokens_neox': 388, 'n_words': 104}