This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
OlderNewer