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
/// Enables ITM | |
/// | |
/// If swo_enable is true, then the SWO output pin will be enabled | |
fn low_level_itm(dbgmcu: &stm32::DBGMCU, swo_enable: bool) { | |
// ARMv7-M DEMCR: Set TRCENA. Enables DWT and ITM units | |
unsafe { *(0xE000_EDFC as *mut u32) |= 1 << 24 }; | |
// Ensure debug blocks are clocked before interacting with them | |
dbgmcu.cr.modify(|_, w| { | |
w.d1dbgcken() |
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/env python3 | |
""" | |
# STM32H7 SWO Output Solution | |
Author: Brian Khuu 2020 | |
Main Copy: https://gist.github.com/mofosyne/178ad947fdff0f357eb0e03a42bcef5c | |
This generates codes that enables SWO output for STM32H7 and was tested on NUCLEO-H743ZI2. | |
This is required because stm32h7 changed the registers that OpenOCD expects for SWO output. | |
Best to use 400Mhz, tried lower... but had issue with getting stable uart output |
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
"""Does utterance segmentation and speech recognition on an mp3 stream | |
(like from broadcastify...) | |
Requires that ffmpeg be installed, and a Microsoft cognitive speech | |
services API key | |
(see https://azure.microsoft.com/en-us/try/cognitive-services/?api=speech-services). | |
""" | |
import audioop | |
import collections |
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 node:8 | |
WORKDIR / | |
RUN git clone https://github.com/wolfcw/libfaketime.git | |
WORKDIR /libfaketime/src | |
RUN make install | |
WORKDIR /usr/src/app | |
COPY package.json ./ |
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
#!/bin/bash | |
# | |
# Originally for September 2016 rpi jessie image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |
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
#!/bin/sh | |
# Convert a raw binary image into an ELF file suitable for loading into a disassembler | |
cat > raw$$.ld <<EOF | |
SECTIONS | |
{ | |
EOF | |
echo " . = $3;" >> raw$$.ld |
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
#!/bin/sh | |
# This program gets the battery info from PMU | |
# Voltage and current charging/discharging | |
# | |
# Nota : temperature can be more than real because of self heating | |
####################################################################### | |
# Copyright (c) 2014 by RzBo, Bellesserre, France | |
# | |
# Permission is granted to use the source code within this | |
# file in whole or in part for any use, personal or commercial, |
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
brew update | |
brew install pyqt geos spatialindex | |
easy_install pip | |
pip install virtualenv | |
cd Development/Others\'/ | |
mkdir FlatCAM | |
cd FlatCAM | |
virtualenv env | |
source env/bin/activate |
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/env python | |
"""Display radar.weather.gov images on APA102c LEDs via /dev/SpiDev""" | |
# stdlib | |
import argparse | |
import colorsys | |
import datetime | |
import cStringIO as StringIO | |
import os.path | |
import sys |
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
#include <SDKDDKVer.h> | |
#include <Windows.h> | |
#pragma warning(disable:4819) | |
#pragma warning(disable:4996) | |
// for OpenCV2 | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/objdetect/objdetect.hpp" | |
#include "opencv2/gpu/gpu.hpp" |
NewerOlder