Skip to content

Instantly share code, notes, and snippets.

View nasa03's full-sized avatar
❄️
allow me to break the ice

アキラ nasa03

❄️
allow me to break the ice
View GitHub Profile
@nasa03
nasa03 / tmdb_agent.py
Created April 1, 2025 18:28 — forked from OpenDGPS/tmdb_agent.py
Simple MCP server to query themoviedb
from typing import Any
import httpx
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("tmdb_agent")
async def make_tmdb_request(url: str) -> dict[str, Any] | None:
"""Make a request to the TMDB API with proper error handling."""
headers = {
"accept": "application/json",
@nasa03
nasa03 / code_review.sh
Created January 6, 2025 14:24 — forked from alwin-augustin-dev/code_review.sh
Automated code review using local LLMs
#!/bin/bash
# Define variables
REPO_PATH=""
PR_NUMBER=""
OLLAMA_API_URL="http://localhost:11434/api/generate"
OUTPUT_FILE="code_review_output.md"
MODEL="llama3.1:8b"
MAX_CONTEXT_LINES=20000

20 million digits of pi in under a minute with Julia

I recently discovered a relatively obscure algorithm for calculating the digits of pi: https://en.wikipedia.org/wiki/Gauss–Legendre_algorithm. Well, at least obscure compared to Chudnovsky's. Wikipedia notes that it is "memory-intensive" but is it really? Let's compare to the MPFR pi function:

function gauss_legendre(prec)
    setprecision(BigFloat, prec, base=10)
    GC.enable(false)
@nasa03
nasa03 / implementing_fft.md
Created January 6, 2025 14:18 — forked from VictorTaelin/implementing_fft.md
Implementing complex numbers and FFT with just datatypes (no floats)

Implementing complex numbers and FFT with just datatypes (no floats)

In this article, I'll explain why implementing numbers with just algebraic datatypes is desirable. I'll then talk about common implementations of FFT (Fast Fourier Transform) and why they hide inherent inefficiencies. I'll then show how to implement integers and complex numbers with just algebraic datatypes, in a way that is extremely simple and elegant. I'll conclude by deriving a pure functional implementation of complex FFT with just datatypes, no floats.

📢 TLDR

Series of small and big use cases that you can implement internally across operations of your company as we did. There is an illustrative demo, screenshots of actual prompts and outputs, and explanation of why to go multi-agent followed by the vision for building an autonomous company. If you want to build something useful in this area together or have feedback to share, would love to get in touch.

You can give a try to the tool we built for non-techcnial users to create multi-agent automations https://wrkdn.com/signup

Thanks to all companies and individuals who contributed their cases!

@nasa03
nasa03 / txt2mp3.sh
Created August 24, 2021 20:00 — forked from ivanistheone/txt2mp3.sh
This script converts a plain text file, e.g. article.txt into a mp3 audiobook using the MacOS text-to-speech accessibility command-line tool `say`. Adjust the `VOICE` and `RATE` parameters to customize to your liking. Note this requires running on MacOS.
#!/usr/bin/env bash
set -e
# This script converts any text file into a mp3 audiobook using the MacOS
# text-to-speech accessibility command-line tool `say`.
# Adjust the `VOICE` and `RATE` parameters to customize to your liking:
VOICE="Alex"
RATE="295" # pretty fast
if [ $# -eq 0 ]; then