Skip to content

Instantly share code, notes, and snippets.

# vim:encoding=utf-8:ts=2:sw=2:expandtab
from AppStruct.Util import *
from AppStruct.Web.Util import *
import AppStruct
import AppStruct.Util
import AppStruct.Web.Util
import FileStruct
@appcove
appcove / loop.py
Last active December 18, 2015 21:24
for x in range(-400,400,100):
for y in range(-400,400,100):
box(x,y,80,45)
SIZE_X = 20
SIZE_Y = 20
TOP_Z = 0.750
CUTTER_DIAMETER = 0.750
#This is just some misc setup stuff
from decimal import Decimal
def drange(start, stop, step):
value = Decimal(start)
@appcove
appcove / cursor-move.py
Created August 16, 2020 04:00
A simple example of using ANSI escapes to move around the screen and draw
import sys
import tty
import termios
import os
s = os.get_terminal_size()
ROWS = s.lines
COLS = s.columns
print('\n'*ROWS)