Skip to content

Instantly share code, notes, and snippets.

View thewh1teagle's full-sized avatar
💭
coding

thewh1teagle

💭
coding
  • localhost
  • The martian
View GitHub Profile
import { remember } from "@epic-web/remember";
import mysql from "mysql2/promise";
import "./config";
import { Player } from "./types";
import { nomrmalizeNumber } from "./utils";
var conn: mysql.Connection;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|  Action                                                                                                                                                               |  Mean duration (s)    |  Num calls            |  Total time (s)       |  Percentage %         |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|  Total                                                                                                                                                                |  -                    |  14775             
[package]
name = "present"
version = "0.0.0"
description = "A Tauri App"
authors = ["you"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
PS D:\kebo\clients\present> bunx tauri dev -- -vv
    Running BeforeDevCommand (`bun run dev`)
$ vite

  VITE v5.3.1  ready in 328 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose
    Info Watching D:\kebo\clients\present\src-tauri for changes...
desktop git:(main) ✗ bunx tauri dev
    Running BeforeDevCommand (`bun run dev`)
$ vite

  VITE v5.4.2  ready in 220 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: use --host to expose
@thewh1teagle
thewh1teagle / main.cpp
Created August 27, 2024 18:25
C++ gui mode attach to console and redirect standard output
#include <iostream>
#include <cstdio>
#include <windows.h>
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
// Attach to the parent console
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
// Redirect stdout and stderr to the console
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
fn write_input_data<T, U>(input: &[T], writer: &WavWriterHandle, resampler: &mut SincFixedIn<f64>)
where
T: Sample,
U: Sample + hound::Sample + FromSample<T>,
{
// Convert input to f64
let samples: Vec<f64> = input
.iter()
.map(|&s| U::from_sample(s).to_float_sample().to_sample())
.collect();
@thewh1teagle
thewh1teagle / README.md
Created August 23, 2024 16:00
Build llama.cpp
cmake -B build . -DGGML_VULKAN=ON -DBUILD_SHARED_LIBS=OFF -DGGML_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release
CMAKE_BUILD_PARALLEL_LEVEL=16 cmake --build build --target llama-cli --config Release
@thewh1teagle
thewh1teagle / readme.md
Last active August 19, 2024 21:25
Build whisper with vulkan
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
git checkout fe36c90
wget.exe https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.26/OpenBLAS-0.3.26-x64.zip
$env:VULKAN_SDK = "C:\VulkanSDK\1.3.290.0"
$env:OPENBLAS_PATH = "$pwd/openblas"
$env:GGML_OPENBLAS = "1"
cmake -B build -DBUILD_SHARED_LIBS=OFF -DGGML_VULKAN=ON -DGGML_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DGGML_STATIC=ON
cmake --build build --target main --config Release