Skip to content

Instantly share code, notes, and snippets.

@lijon
lijon / ocd_sampler.py
Last active June 3, 2023 06:46
STM32 profiler using openocd
#!/usr/bin/python3
# original https://gist.github.com/ynsta/7df418cb27b908391f86, adapted for python3
# run openocd (0.9.0) with :
# $ openocd -f stlink-v2-1.cfg -f stm32f4x.cfg &> /dev/null"
# then run
# $ python2 sampler.py path_to_myelf_with_symbols
import sys
@ynsta
ynsta / sampler.py
Last active June 8, 2023 15:33
Statistic profiling on stm32f4 with openocd by dwt_pcsr sampling
#!/usr/bin/python2
# run openocd (0.9.0) with :
# $ openocd -f stlink-v2-1.cfg -f stm32f4x.cfg &> /dev/null"
# then run
# $ python2 sampler.py path_to_myelf_with_symbols
import sys
import time
import telnetlib
@yusugomori
yusugomori / SdA.cpp
Last active June 28, 2022 00:59
Stacked Denoising Autoencoders (C++)
/*
* SdA.cpp (Stacked Denoising Autoencoders)
*
* @author yusugomori (http://yusugomori.com)
* @usage $ g++ SdA.cpp
*
*/
#include <iostream>
#include <math.h>