Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block nmz787

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nmz787 /
Created Dec 29, 2019
work in progress MKS 901P vacuum transducer sensor library and command-line program.
usage: [-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
nmz787 /
Last active Jan 3, 2020
PBM image viewer for gigapixel files - CTRL O to open a file, press enter in the text boxes to update screen
__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
# -*- 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 *
nmz787 /
Last active Feb 1, 2019
image 2 FIB and FIB 2 image - requires openCV, wxPython, PIL, numpy
""" image 2 FIB and FIB 2 image
Usage: fromstr <str> [--video] [--out=<out_file_path>] tostr <image> [--out=<out_file_path>] [--stretch] [--invert]
# from __future__ import print_function
import traceback
import sys
import math
nmz787 /
Last active Sep 14, 2018
test rounded edge.stl brlcad-python-tcl
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]
parse and print the characters stored in the HEX ROM associated with the MAX1000 POV LED TEXT demo
.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)
nmz787 /
Last active Jul 26, 2018
Converts a CSV with columns [Type, Duration, Name, Description] into Gnome Planner format (which can generate a Gantt chart).
usage: <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
nmz787 /
Last active May 24, 2019
micropython mock library - for checking syntax of your MicroPython from Linux
class _board(object):
def __getattr__(self, *args, **kwargs):
return 1
from pyb import Pin as Pin
from pyb import I2C as I2C
from stm import mem32, mem16, mem8
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
nmz787 /
Last active Mar 10, 2017
tables and a function to print a CSV-style register dump, on an STM32 MCU running MicroPython. Just import and call the dump function, then copy the serial output from your terminal
import dump_regs
import re
import stm
# basically this, with some deletions (FLASH, DBGMCU):
# {m for m in dir(stm) if '_' not in m}
You can’t perform that action at this time.