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
#include <stdio.h> | |
#include "hardware/clocks.h" | |
#include "hardware/pio.h" | |
#include "hardware/timer.h" | |
#include "main.pio.h" | |
#include "pico/stdlib.h" | |
#define START_PIN 10 | |
#define ROW_PINS 4 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 openai | |
import pygments | |
from pygments import highlight | |
from pygments.formatters import TerminalFormatter | |
from pygments.lexers import get_lexer_by_name | |
def colored(r, g, b, text): | |
return f"\033[38;2;{r};{g};{b}m{text}\033[0m" |
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
@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 ( |
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 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 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 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 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 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 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") |
NewerOlder