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
https://news.ycombinator.com/item?id=26746537 | |
godmode2019 3 hours ago [–] | |
I think everyone was a txt file on their computer filled with FFmpeg commands. | |
Care to share yours? | |
stevens37 0 minutes ago [–] |
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 streams, std/base64, std/strformat | |
type | |
WavFile* = object | |
data*: seq[uint8] | |
size*: int | |
freq*: int | |
bits*: int | |
channels*: int |
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
# OTFFT library | |
# http://wwwa.pikara.ne.jp/okojisan/otfft-en/optimization1.html | |
# This is +20-50% improvement | |
const thetaLutSize = 2048 | |
const thetaLut = static: | |
var arr: array[thetaLutSize, Complex[float]] | |
let step = 2.0*PI/float(thetaLutSize) | |
for k, v in mpairs(arr): | |
v = complex(cos(step * float(k)), -sin(step * float(k))) |
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 bpy | |
from pathlib import Path | |
#selo = bpy.context.selected_objects | |
#assert len(selo) > 0, "Need to select the camera root" | |
#mroot = selo[0] | |
#assert mroot.name == "mvgRoot" | |
mroot = bpy.data.objects['mvgRoot'] | |
image_folder = Path("D:\\art\\photo\\2022.6\\16") |
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
@echo %* | |
@echo off | |
magick %* input.jpg | |
F:\apps\esrgan\realesrgan-ncnn-vulkan.exe -i input.jpg -o esr_output.jpg -n realesrgan-x4plus | |
magick esr_output.jpg -scale 50%% esr\\%~n1.jpg | |
del input.jpg | |
del esr_output.jpg |
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 numpy as np | |
import mathutils as mu | |
import bmesh | |
import bpy | |
ndir = "F:\ml\motion-diffusion-model\save\humanml_trans_enc_512\samples_humanml_trans_enc_512_000200000_seed10\\results.npy" | |
data = np.load(ndir, allow_pickle=True) | |
motions = data[()]['motion'] |
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 tkinter as tk | |
from tkinter import ttk | |
from subprocess import run | |
win = tk.Tk() | |
win.geometry("600x140") | |
# YDL = "youtube-dl.exe" | |
YDL = "yt-dlp.exe" | |
FOLDER = "D:\\swap\\downloads\\ydl" |
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
# For Windows add following to nim.cfg (in user/.choosenim/toolchains/nim-x.y.z/config/) | |
# Line ~159: gcc.path = r"C:\tools\msys64\mingw64\bin" | |
import os, math | |
import nordaudio | |
const | |
# SAMPLE_RATE = 44100 | |
SAMPLE_RATE = 8000 | |
FRAMES_PER_BUFFER = 64 |
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 std/macros | |
macro makeVar(arg: varargs[untyped]): untyped = | |
result = newStmtList() | |
for a in arg: | |
result.add newVarStmt(a, a) | |
# echo result.treeRepr | |
macro lazyVar(arg: untyped): untyped = | |
var statements = newStmtList() |
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
@echo off | |
setlocal enabledelayedexpansion | |
rem Set the directory containing your MP3 files | |
set mp3_dir=%1 | |
set "mp3_dir=!mp3_dir:"=!" | |
rem Loop through each MP3 file in the directory | |
for %%i in ("%mp3_dir%\*.mp3") do ( |