Skip to content

Instantly share code, notes, and snippets.

@prnthh
prnthh / index.js
Created January 26, 2025 16:41
RemoteThink - Remote Function Calling using Llama Tool Use
const http = require('http');
const bonjour = require('bonjour')();
const crypto = require('crypto');
const os = require('os');
// Service Discovery and HTTP Server implementation
class ServiceDiscovery {
constructor() {
this.instances = new Map();
this.server = null;
@prnthh
prnthh / serve.py
Created February 11, 2023 19:30
Local echo server to test headers and nginx.
# USAGE: python3 serve.py <PORT>
#!/usr/bin/env python3
from http.server import SimpleHTTPRequestHandler
from socketserver import TCPServer
import logging
import sys
@prnthh
prnthh / experiment.sh
Created January 20, 2019 08:39
Script to run Game of Life on MPI
#!/bin/bash
testvalues=( 4 8 16 32 64 128 256 512 1024 2048 )
echo
echo "Conway's Game of Life Parallel Simulation"
echo "========================================="
echo
echo "========================================="
#for single threaded
echo "Linear Execution Time"
echo
@prnthh
prnthh / .bashrc
Created October 30, 2017 22:27
inotifywait macro for restarting a process when a file change is detected
rerun(){
while inotifywait -e create,delete,modify .;
do
kill %% //kills the last background process
$@ & //spawns new process in background
done;
}