Skip to content

Instantly share code, notes, and snippets.

@wa5znu
wa5znu / two-vars.py
Last active February 3, 2023 22:26
import tkinter as tk
import requests
import json
import time
class App:
def __init__(self, master):
self.frame = tk.Frame (master)
self.frame.pack()
self.variable_a = tk.StringVar()
@wa5znu
wa5znu / cq-circuit-py.py
Created February 20, 2022 23:30
test Adafruit CircuitPython 6.0.0 on 2020-11-16; Seeeduino XIAO with samd21g18
import time
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
SPEED=0.05
def dah():
led.value = False
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
error() {
local parent_lineno="$1"
local message="$2"
local code="${3:-1}"
if [[ -n "$message" ]] ; then
echo -e "\n\n`date -u --rfc-3339=seconds|sed -e's/\+00:00/Z/'` [ERROR] $0:${parent_lineno}:${message}; exiting with status ${code}\n\n"
else