The original C file is cblas_example1.c
$cinterop -def liblapack.def -o build/c_interop/liblapack
$kotlinc-native lapack.kt -library build/c_interop/liblapack
$./program.kexe
11.0
14.0
# Project Policy | |
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices. | |
# 1. Introduction | |
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities. | |
## 1.1 Actors |
# Required packages: | |
# pip install SpeechRecognition mlx-whisper pyaudio | |
# Note: This script requires Apple Silicon Mac for MLX Whisper | |
import speech_recognition as sr | |
import numpy as np | |
import mlx_whisper | |
r = sr.Recognizer() | |
mic = sr.Microphone(sample_rate=16000) |
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory | |
git clone https://github.com/myshell-ai/OpenVoice | |
cd OpenVoice | |
git clone https://huggingface.co/myshell-ai/OpenVoice | |
cp -r OpenVoice/* . | |
pip install whisper pynput pyaudio | |
""" | |
from openai import OpenAI | |
import time |
# Clone llama.cpp | |
git clone https://github.com/ggerganov/llama.cpp.git | |
cd llama.cpp | |
# Build it | |
make clean | |
LLAMA_METAL=1 make | |
# Download model | |
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin |
gg_replace() { | |
if [[ "$#" -lt "2" ]]; then | |
echo " | |
Usage: | |
$0 term replacement file_mask | |
Example: | |
$0 cappuchino cappuccino '*.html' | |
"; | |
else |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
The original C file is cblas_example1.c
$cinterop -def liblapack.def -o build/c_interop/liblapack
$kotlinc-native lapack.kt -library build/c_interop/liblapack
$./program.kexe
11.0
14.0
-- adapted from https://medium.com/@goldrydigital/hex-grid-algorithm-for-postgis-4ac45f61d093 | |
-- usage: select * FROM hexbin(numeric, geometry) | |
-- cover a table with something like: | |
-- select row_number() over () id, geom | |
-- from hexbin(5280, st_transform(st_setsrid(st_expand(ST_EstimatedExtent('table', 'geom'), 0.1), 4269), 2255)); | |
CREATE OR REPLACE FUNCTION hexbin (height numeric, minx numeric, miny numeric, maxx numeric, maxy numeric, srid integer) | |
RETURNS TABLE (geom geometry(polygon)) | |
AS $$ |
""" | |
Train a neural network to implement the discrete Fourier transform | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.models import Sequential | |
N = 32 | |
batch = 10000 |
function struct2csv(s,fn) | |
% STRUCT2CSV(s,fn) | |
% | |
% Output a structure to a comma delimited file with column headers | |
% | |
% s : any structure composed of one or more matrices and cell arrays | |
% fn : file name | |
% | |
% Given s: | |
% |