Skip to content

Instantly share code, notes, and snippets.

View shohei's full-sized avatar

Shohei Aoki shohei

View GitHub Profile
@shohei
shohei / load_firmware.py
Created April 12, 2019 08:14
Firmware update script
from pynq.overlays.base import BaseOverlay
base = BaseOverlay("/home/xilinx/pynq/overlays/base/pynquino.bit")
from pynq.lib.arduino import Arduino_Zsprinter
arduino = Arduino_Zsprinter(base.ARDUINO)
@shohei
shohei / livetest.py
Created March 1, 2019 15:57
pocketsphinx
#!/usr/bin/python
from os import environ, path
from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *
MODELDIR = "../../../model"
DATADIR = "../../../test/data"

$ python app.py [filename]

@shohei
shohei / top.v
Last active July 30, 2018 08:07
PYNQ double UART
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: Xilinx Inc
// Design Name: PYNQ
// Module Name: top
// Project Name: PYNQ
// Target Devices: ZC7020
// Tool Versions: 2016.1
// Description:
//////////////////////////////////////////////////////////////////////////////////
; G-Code generated by Simplify3D(R) Version 4.0.0
; May 17, 2018 at 3:29:12 PM
; Settings Summary
; processName,Process1
; applyToModels,20mm_cube
; profileName,SeeMeCNC Orion
; profileVersion,2016-07-21 15:53:25
; baseProfile,
; printMaterial,ABS
; printQuality,Medium
; G-Code generated by Simplify3D(R) Version 4.0.0
; May 15, 2018 at 10:37:30 PM
; Settings Summary
; processName,Eris_Process
; applyToModels,20mm_cube
; profileName,Eris
; profileVersion,2016-10-27 12:54:19
; baseProfile,SeeMeCNC Orion (modified)
; printMaterial,PLA
; printQuality,Medium
@shohei
shohei / leonardo_keyboard.ino
Created April 27, 2018 08:43
Video record server using Intel NUC kit
#include "Keyboard.h"
#define Button1 9
#define LEDpin 2
int state = HIGH;
void setup() {
Keyboard.begin();
pinMode(Button1, INPUT_PULLUP);
@shohei
shohei / UI_test.ipynb
Created April 13, 2018 00:29
UI_test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shohei
shohei / gcode_to_csv.py
Last active April 5, 2018 03:45
Gcode to CSV converter
import re
g0pattern = r"^G0.*"
g1pattern = r"^G1.*"
g0re = re.compile(g0pattern)
g1re = re.compile(g1pattern)
Xpattern = r".*X[-\.\d]+"
Ypattern = r".*Y[-\.\d]+"
Zpattern = r".*Z[-\.\d]+"
Xre = re.compile(Xpattern)
################################################################
# This is a generated script based on design: streams_example
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################
namespace eval _tcl {