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
from subprocess import Popen, PIPE | |
from pathlib import Path | |
bitrate = "256k" #imperceptible quality | |
track_num = "1" #gets vocal track for my .usm's. Change as needed. | |
#-apply_phase_inv 0 for vocal tracks because they are mono. Set to 1 for stereo/surround | |
ffmeg_conv_cmd = ["-map", f"a:{track_num}?", "-c:a", "libopus", "-b:a", bitrate, | |
"-application", "audio", "-apply_phase_inv", "0"] | |
for file in (f for f in Path.cwd().iterdir() if f.is_file() and not f.is_symlink() |
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
import sys | |
class BankersAlg: | |
def __init__(self, available, maximum): | |
self.NUMBER_OF_CUSTOMERS:int = 5 | |
self.NUMBER_OF_RESOURCES:int = 4 | |
# the available amount of each resource */ | |
self.available:list[int] = [0,0,0,0] | |
self.available = available[:] |
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
#Config for silent git setup for user | |
#https://github.com/git-for-windows/git/wiki/Silent-or-Unattended-Installation | |
#https://jrsoftware.org/ishelp/index.php?topic=setupcmdline | |
$gitSetupExe = "Git-2.41.0.3-64-bit.exe" | |
#Dir="expand:{userpf}\Git" installs to users AppData/Local/Programs/Git folder | |
#EditorOption=VisualStudioCode uses vscode for git text/review | |
#UseCredentialManager=Enabled uses git credential manager. | |
#Users have to login to commit/push code to most online repos. |
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
#Sets up a Microsoft SQL Server 2022 instance in Ubuntu | |
#https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver16&pivots=cs1-bash | |
docker pull mcr.microsoft.com/mssql/server:2022-latest | |
docker run | |
-e “ACCEPT_EULA=y” \ | |
—hostname=mssql2022 \ | |
—user-mysql \ | |
—name=mssql2022 \ |
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
<?php | |
$conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname); | |
if ($conn->connect_error) { | |
die($conn->connect_error); | |
} | |
$pstmt = $conn->prepare( | |
"UPDATE table |
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
$ErrorActionPreference = "Stop" | |
#Match version to zip downloaded | |
$eclipseVersion = "2022-12" | |
#zip archive from https://www.eclipse.org/downloads/packages/release/2022-12/r/eclipse-ide-java-developers | |
$eclipseSrcZip = "./eclipse-java-$eclipseVersion-R-win32-x86_64.zip" | |
#Extract zip to users eclipse/java-2022-12 folder, same as GUI installer | |
$eclipseDestinationFolder = "~/eclipse/java-$eclipseVersion" | |
#path for shortcut to eclipse | |
$eclipseShortcutPath = "$Home\Desktop\Eclipse IDE for Java Developers - $eclipseVersion.lnk" |
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
/* | |
Read a .zip archive of multiple files, decompress and write to filesystem. | |
*/ | |
'use strict'; | |
const fs = require('fs'); | |
const JSZip = require('jszip'); | |
async function example() { | |
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
/* Multiplication of two matrixes with simple iterative algorithm | |
* References: https://en.wikipedia.org/wiki/Matrix_multiplication_algorithm | |
* | |
* @author Shelby Engels | |
*/ | |
public class MatrixMultiplication { | |
/** |