Генерация Latex-файлов на Python дико тормозит, как это можно исправить?
Их довольно много (суммарный размер BIB 85+ МБ, и ещё почти 100 BST).
для каждого генерирую теховский файл и затем из него PDF с помощью такого башевского скрипта:
$ ip='1.1.1.1';echo '{"chat_id":"12122","text":$ip}'
{"chat_id":"12122","text":$ip}
$ ip='1.1.1.1';echo "{\"chat_id\":\"12122\",\"text\":\"$ip\"}"
{"chat_id":"12122","text":"1.1.1.1"}
getent passwd | awk -F: '{print $1}' | sort -n | awk '{print NR" - "$1}'
#!/usr/bin/env bash
chmod +x /path/to/run.sh
~/.bash_aliases
строку alias run='/path/to/run.sh'
#!/usr/bin/env bash
while IFS= read -r -d '' file; do
file_name=$(basename "$file" | cut -d "." -f 1)
target_dir="/config/rec/$file_name"
mkdir -p "$target_dir"
cp "$file" "$target_dir"
rclone copy "$target_dir" cloud: --max-age 12h --create-empty-src-dirs -P --transfers=1 --checkers=1;
done < <(find "$DIR" -name "*.mp4" -print0)
rclone
я не пользуюсь, так что сами проверьте эту часть. #!/usr/bin/env bash
value=$1
if [ "$value" = "one" ]; then
echo "one!"
else
echo "not one!"
fi
#!/usr/bin/env bash
# To run this script you need to install https://rclone.org/ first
# Use current date and time for future backup folder name
TIMESTAMP=$(date +"%F_%T")
# Declare the directory where the temporary backup files will be stored
BACKUP_DIR="/user/backup/$TIMESTAMP"
# State the username for your MySQL / MariaDB instace that can access the neccessary databases
MYSQL_USER="user"
# Point this script to mysql executable file
MYSQL=/usr/bin/mysql
# State the password to the username above
# Be aware that using plain password is unsecure
MYSQL_PASSWORD="password"
# Point this script to mysqldump executable file
MYSQLDUMP=/usr/bin/mysqldump
# Declare the name of the remote that will be used as a remote storage
REMOTE="cloud"
# Create the temporary backup directory in case it doesn't exist
mkdir -p "$BACKUP_DIR"
# Get the list of all databases in your local MySQL / MariaDB instance
databases=$($MYSQL --user=$MYSQL_USER -p$MYSQL_PASSWORD -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema)")
# Start a cycle
for db in $databases; do
# Echo the starting notice
echo -e "===\nStarted working with the $db."
# Use mysqldump to create and actual backup of your database
$MYSQLDUMP --user=$MYSQL_USER -p$MYSQL_PASSWORD --databases "$db" | gzip > "$BACKUP_DIR/$db.sql.gz"
# Use rclone to upload files to the remote backup server
rclone copy "$BACKUP_DIR/$db.sql.gz" $REMOTE:$BACKUP_DIR
# Echo the result
echo -e "===\nFinished backup process for $db. Check your remote folder or watch for errors."
done
~/.my.cnf
вместо впендюривания в скрипт имени пользователя, пароля и т.д. Почему так проичсходит.
Anaconda3-2020.11-Linux-x86_64.sh
, с .sh
в качестве расширения.script.sh /path/to/out.mp4
, а в script.sh
вот так:#!/usr/bin/env bash
ffmpeg -i "$1" -s 600x338 -an -c:a copy resize-nosound.mp4
$ a="test";echo "$a";echo '$a'
test
$a