This file contains hidden or 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
| import argparse | |
| import pathlib | |
| import dataclasses | |
| import subprocess | |
| import shutil | |
| import platform | |
| import os | |
| import sys | |
| SCRIPT_NAME = "Atmos Audio Decoder" |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <time.h> | |
| #define A1 "add %0, %0, #1\n\t" | |
| #define A10 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 | |
| #define A100 A10 A10 A10 A10 A10 A10 A10 A10 A10 A10 | |
| #define A1000 A100 A100 A100 A100 A100 A100 A100 A100 A100 A100 | |
| double get_time() { |
This file contains hidden or 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
| /* | |
| * Internal representation: | |
| * - `negative` : sign bit | |
| * - `exponent` : unbiased exponent in [-126 .. 127] for finite values, | |
| * and 128 for NaN/Inf (special marker) | |
| * - `mantissa` : 24-bit mantissa in [0 .. 2^24) | |
| * - normal: mantissa in [2^23 .. 2^24) (hidden bit present) | |
| * - subnormal mantissa in [0 .. 2^23) | |
| * - zero: mantissa = 0 | |
| */ |
This file contains hidden or 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
| #include <algorithm> | |
| #include <array> | |
| #include <cstdint> | |
| #include <cstdio> | |
| #include <cstring> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <limits> | |
| #include <numeric> | |
| #include <queue> |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # --- Argument Parsing --- | |
| BUILD_PYTHON_FLAG=false | |
| PLUGIN_TYPE="all" # Default to building all plugins | |
| while [[ $# -gt 0 ]]; do | |
| case $1 in | |
| --build-python) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # checck if pidof exists | |
| PIDOF="$(which pidof)" | |
| # and if not - install it | |
| (test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof | |
| # find app in default paths | |
| CO_PWD=~/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS |
This file contains hidden or 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
| # export COVER=/path/to/cover | |
| # organizes wav + vtt to flac(embedded lrc & cover) + lrc | |
| for wav in *.wav; do [ -f "$wav" ] && ffmpeg -i "$wav" -compression_level 12 "${wav%.wav}.flac" -y && rm "$wav"; done && for vtt in *.vtt; do [ -f "$vtt" ] && lrc="${vtt%.vtt}.lrc" && echo -e "[ti:]\n[ar:]\n[al:]\n[by:]\n[00:00.00]" > "$lrc" && grep -n "^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]" "$vtt" | while IFS=: read -r ln line; do start=$(echo "$line" | awk '{print $1}') && h=$(echo "$start" | cut -d: -f1) && m=$(echo "$start" | cut -d: -f2) && s=$(echo "$start" | cut -d: -f3 | cut -d. -f1) && ms=$(echo "$start" | cut -d: -f3 | cut -d. -f2 | cut -c1-2) && tm=$((10#$h*60+10#$m)) && txt=$(sed -n "$((ln+1))p" "$vtt") && printf "[%02d:%02d.%s]%s\n" "$tm" "$s" "$ms" "$txt" >> "$lrc"; done && rm "$vtt"; done && for flac in *.flac; do [ -f "$flac" ] && metaflac --import-picture-from="$COVER" "$flac" && lrc="${flac%.flac}.lrc" && [ -f "$lrc" ] && metaflac --set-tag="LYRICS=$(cat "$lrc" | tr '\n' '|' | sed 's/|/\\n/g')" "$flac"; done |
This file contains hidden or 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
| #include <iostream> | |
| #include <vector> | |
| #include <set> | |
| #include <string> | |
| #include <sstream> | |
| #include <arpa/inet.h> | |
| #include <cstdint> | |
| #include <iomanip> | |
| #include <regex> |