This file contains 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
""" | |
wiktionary audio vidio flasher (like automated flashcards). | |
An app that gets words from wiktionary, | |
and if there is an associated audio clip, | |
displays the word on-screen in a Tkinter GUI, | |
and plays the audio pronunciations available. | |
Change the seed_word_name variable as you desire. | |
target audience: babies, language learning |
This file contains 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
""" | |
usage: csvToGnomePlanner.py <input path> <output path> <start YYYYMMDD> | |
Converts a CSV with columns [Type, Duration, Name, Description] into Gnome Planner format (which can generate a Gantt chart). | |
where Column Definitions are: | |
Type : 'Subtask' or anything else (normal Task is implied) | |
Duration : '<number> <unit>' where units are [day, week, month] | |
NOTE: Tasks which have Subtasks CANNOT have duration... they derive this from the Subtasks | |
Name : text | |
Description : text |
This file contains 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
""" | |
parse and print the characters stored in the HEX ROM associated with the MAX1000 POV LED TEXT demo | |
(here: https://github.com/vpecanins/max1000-tutorial/tree/master/demo02_led_text) | |
.hex format is: | |
First character (:) = Start of a record | |
Next two characters = Record length (in this example, 10h) | |
Next four characters = Load address (in this example, 0080h) |
This file contains 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 python_brlcad_tcl.brlcad_tcl import * | |
class rounded_cube(BrlCadModel): | |
def __init__(self, brl_db): | |
super(rounded_cube, self). __init__(brl_db) | |
self.center_name = None | |
self.edge = 10 | |
c1 = [0, 0, 0] | |
c2 = [self.edge, self.edge, self.edge] |
This file contains 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/python | |
""" image 2 FIB and FIB 2 image | |
Usage: | |
convert_fib_str.py fromstr <str> [--video] [--out=<out_file_path>] | |
convert_fib_str.py tostr <image> [--out=<out_file_path>] [--stretch] [--invert] | |
""" | |
# from __future__ import print_function | |
import traceback | |
import sys | |
import math |
This file contains 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 pyb | |
from pyb import Timer | |
# timer 2 will be created with a frequency of 10 kHz | |
tim=pyb.Timer(4,freq=10000); | |
# attach the timer to the LED GPIO, turning the brightness OFF to begin | |
tchannel = tim.channel(3, Timer.PWM, pin=pyb.Pin.board.JP32, pulse_width_percent=0) | |
# setup comm channel, for debug prints | |
# uart = pyb.UART(2, 9600) # init with given baudrate |
This file contains 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 pyb | |
from pyb import Timer | |
import micropython | |
import stm | |
#john's sript actual pulse width 181 us, 448 us period (pulse to pulse) | |
# Use with pyb.freq(96000000) and prescaler=11 for .25 usec timer ticks. | |
xfmr_pulse_period = 1570 # (= usec * 4) Same as toggle_half_cycle duration. | |
xfmr_pulse_w = 332 # (= usec * 4) |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Convert a dir of image files to a GDS file, all packed in together | |
""" | |
import os | |
import cv2 | |
import sys | |
import math | |
from gdsCAD import * |
This file contains 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
""" | |
usage: mks_901p.py [-h] [--find_baud] [--baud BAUD] [-unit] serial_port | |
positional arguments: | |
serial_port the Windows COM port or path to a linux serial port | |
optional arguments: | |
-h, --help show this help message and exit | |
--find_baud tries to access the sensor over all supported baud rates, | |
prints which is successful |
This file contains 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
__license__ = """ | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public License as | |
published by the Free Software Foundation; either version 2.1 of the | |
License, or (at your option) any later version. | |
As a special exception, the copyright holders of this library | |
hereby recind Section 3 of the GNU Lesser General Public License. This | |
means that you MAY NOT apply the terms of the ordinary GNU General | |
Public License instead of this License to any given copy of the |