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:
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 |
""" | |
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 |
I hereby claim:
To claim this, I am signing this object:
""" | |
telnet_echo.py by @TimelessP | |
https://gist.github.com/TimelessP/5abce3c64c4b671d79121d1e459aecb3 | |
Run using: | |
`twistd -ny telnet_echo.py` | |
""" | |
from twisted.application.internet import TCPServer | |
from twisted.application.service import Application | |
from twisted.conch.telnet import TelnetProtocol, TelnetTransport | |
from twisted.internet.protocol import ServerFactory |
import math | |
def calculate_new_coordinate(ship_coordinate, ship_heading, ship_speed, time_elapsed_seconds, heading_hold=False, | |
depth_metres=0): | |
""" | |
Calculates the new coordinates of the ship (lat, long), given the current heading, speed in knots, | |
and the time elapsed in seconds. A spherical Earth model is used, with no tides. | |
:param ship_coordinate: (lat, long) in range -90 <= lat <= 90, -180 <= long <= 180. | |
:param ship_heading: heading in degrees in range 0 <= heading <= 360. |
#!/usr/bin/env python3 | |
""" | |
editquill - a super-minimal, line-mode, sandboxed text editor utility | |
created by @TimelessP, 2022-02-05 | |
MIT licence | |
https://gist.github.com/TimelessP/c6b0c20b314f6213ced329286fa6d4bf | |
""" | |
import copy | |
import datetime |
// myGetRoll(), myGetPitch(), myGetBearing(), mySetHorizonTexture() | |
// by Timeless Prototype | |
// Helps with attitude indicator (artificial horizon) display on a prim, plus a few other functions you will probably want for any flying vehicle instruments. | |
// Created 2009-12-01 | |
// Please give credit to Timeless Prototype in documentation when using anything from this script. | |
key craftKey = NULL_KEY; | |
// Returns the roll relative to the horizon (0.0), ranging from 90.0 (right wing down) to -90.0 (left wing down). Assumes frame of reference is East-facing at zero rotation. | |
float myGetRoll(rotation rot) |
import time | |
import fastapi | |
from fastapi.responses import HTMLResponse | |
import logging | |
import uvicorn | |
from fastapi_utils.tasks import repeat_every | |
# requirements.txt: | |
# fastapi~=0.65.1 | |
# uvicorn~=0.13.4 |