Skip to content

Instantly share code, notes, and snippets.

@TimelessP
TimelessP / lmsfim.py
Created March 4, 2025 20:12
lmsfim.py - using LM Studio tools calling and fimputerr computer emulator
import lmstudio as lms
import time
import random
import math
# https://github.com/TimelessP/fimputerr
from fimputerr import run_fimputerr_code # Import unchanged Fimputerr interpreter
# ----------------- Utility Functions -----------------
def get_time() -> str:
@TimelessP
TimelessP / lmstool.py
Created March 4, 2025 19:50
LMStudio tool calling using act()
import lmstudio as lms
import time
import random
import math
# ----------------- Functions for LLM to Call -----------------
def get_time() -> str:
"""Returns the current time."""
return time.strftime("%Y-%m-%d %H:%M:%S")
@TimelessP
TimelessP / lc.py
Created February 13, 2025 20:11
larking about
from lark import Lark
COBOL_GRAMMAR = r"""
// Lark grammar for COBOL DIVISIONS with USING/RETURNING in PROCEDURE DIVISION
?start: divisions
divisions: division+
// A division consists of a header followed by a body.
"""
Production-Ready COBOL Parser using Lark (Extended Coverage, PIC Fix, and Additional Test Cases)
===================================================================================================
This parser covers a broad subset of COBOL, including:
• Standard divisions: IDENTIFICATION, ENVIRONMENT, DATA, PROCEDURE.
• DATA DIVISION: supports data items at levels 01, 05, and 77; condition entries (level 88);
and an optional REDEFINES clause.
• PROCEDURE DIVISION: supports MOVE, DISPLAY, IF–THEN–ELSE (including nested IFs), PERFORM, ACCEPT,
@TimelessP
TimelessP / lan-peer-comms.html
Last active November 10, 2024 09:49
A lightweight web app that enables peer-to-peer messaging over a local network without requiring an internet connection or a dedicated server. Utilizing WebRTC, the app ensures secure, direct communication between devices on the same LAN. Perfect for offline environments, this app allows users to exchange text messages effortlessly by manually s…
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LAN Peer Communication</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
@TimelessP
TimelessP / finalbearingchallenge.py
Last active October 20, 2024 16:44
Final Bearing challenge
#!/usr/bin/env python3
"""
"Final Bearing" is AI reasoning, mathematics and geometry challenge created by Timeless Prototype (@TimelessP on X) - a citizen scientist under a pseudonym.
Challenge Author: @TimelessP (on X)
Challenge Date: 2024-09-19 22:07:32
Challenge Description: (see the prompt example below)
Gist URL: https://gist.github.com/TimelessP/f1124f7c1556d0b614c4871757287885
@TimelessP
TimelessP / chat.lua
Last active January 12, 2025 13:42
NeoVim localhost chat
-- chat.lua - Neovim chat script using Lua.
local uv = vim.loop
local server = nil
local clients = {}
local client_socket = nil
local server_started = false
local chat_buffer = nil -- Buffer variable to store the chat buffer
local reconnect_attempts = 0
local max_reconnect_attempts = 5
@TimelessP
TimelessP / asynchello.py
Created November 26, 2023 12:05
FastAPI, terminal input, background task, all in one...
import asyncio
import os
import signal
import sys
import time
from fastapi import FastAPI
from aioconsole import ainput
from threading import Thread, Event
import uvicorn
@TimelessP
TimelessP / main.py
Last active January 22, 2023 20:30
A replit db example
"""
https://replit.com/@TimelessP/Replit-db-experiment#main.py
https://gist.github.com/TimelessP/72f4efa1e5b523df526ff9cf3c7de4da
"""
from replit import db
from dataclasses import dataclass
import bcrypt
import getpass
import re
import datetime

Keybase proof

I hereby claim:

  • I am TimelessP on github.
  • I am timelessp (https://keybase.io/timelessp) on keybase.
  • I have a public key whose fingerprint is 8242 8A57 CFA7 B9BD 3FDC 7BA0 7516 5F7D 53AC 145F

To claim this, I am signing this object: