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
#!/bin/bash | |
API_KEY="$1" | |
FILE_PATH="$2" | |
MODEL_NAME="whisper-1" | |
curl -X POST "https://api.openai.com/v1/audio/transcriptions" \ | |
-H "Authorization: Bearer $API_KEY" \ | |
-H "Content-Type: multipart/form-data" \ | |
-F "file=@$FILE_PATH" \ |
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
// HOW TO USE | |
// ---------- | |
// | |
// Setup: | |
// mkdir random-rgb; cd random-rgb; npm init -y; npm i canvas; mkdir imgs; | |
// Then place this file (random-rgb.js) into random-rgb folder (as created above), run: | |
// node random-rgb.js | |
// | |
// Configuring: | |
// |
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
function swap(A, i, j) { | |
var tmp = A[i]; | |
A[i] = A[j]; | |
A[j] = tmp; | |
} | |
function selectionSort(A, n) { | |
let i = 0 | |
while (i < n) { | |
let m = i |