Skip to content

Instantly share code, notes, and snippets.

@programus
programus / README-cdx.md
Last active October 15, 2020 06:59
Extended windows cd command

CDX Command - CD eXtension batch file

This is a batch file could help you change working directory easier especially you need to change many directories very often like me.

Features

  • Save histroy of all navigated directories
  • No duplicated directories in histroy
  • Name history directories
  • Jump into any directory in histroy by index or name
  • Quich jump into previous directory
  • Maintain history list
@tylerchilds
tylerchilds / piplay_raspberry_pi_3_setup.md
Last active December 18, 2018 12:29
PiPlay Raspberry Pi 3 Setup

PiPlay Raspberry Pi 3 Setup

Let me first preface this guide with the fact that I had zero experience with raspberry pi before tonight. I'm comfortable in the command line and I've played with linux as an enthusiastic dabbler.

If you follow this guide, you should be able to go from fresh raspberry pi to running roms on piplay. Also, only use roms that you've legally obtained. I used Robot Bowl available for free, for non-commercial use at mamedev.org.

  1. Install raspbian to your sd card using a different computer than your pi

  2. plug in the pi your username/password will be pi/raspberry

@nathantsoi
nathantsoi / stm32f429-disco.cfg
Created April 19, 2016 05:26
openocd config file for stm32f429-disco board
# openocd -f stm32f429-disco.cfg -c "program FILE_NAME.elf verify reset exit"
# for: http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090
interface hla
hla_layout stlink
hla_device_desc "ST-LINK/V2"
# stm32f429 discovery 0483:374b
hla_vid_pid 0x0483 0x374b
@postspectacular
postspectacular / blinky.S
Created December 12, 2015 23:44
ARM blink example (ASM only)
.syntax unified
.cpu cortex-m4
.thumb
// configuration values for STM32F4x
// see: http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf
#define AHB1PERIPH_BASE 0x40020000
#define RCC_BASE AHB1PERIPH_BASE + 0x3800
#define RCC_AHB1_ENR RCC_BASE + 0x30
@saliksyed
saliksyed / autoencoder.py
Created November 18, 2015 03:30
Tensorflow Auto-Encoder Implementation
""" Deep Auto-Encoder implementation
An auto-encoder works as follows:
Data of dimension k is reduced to a lower dimension j using a matrix multiplication:
softmax(W*x + b) = x'
where W is matrix from R^k --> R^j
A reconstruction matrix W' maps back from R^j --> R^k
@hussius
hussius / ae_toy_example.py
Last active June 28, 2019 17:12
Toy example of single-layer autoencoder in TensorFlow
import tensorflow as tf
import numpy as np
import math
#import pandas as pd
#import sys
input = np.array([[2.0, 1.0, 1.0, 2.0],
[-2.0, 1.0, -1.0, 2.0],
[0.0, 1.0, 0.0, 2.0],
[0.0, -1.0, 0.0, -2.0],
@BobBurns
BobBurns / blinky.s
Created July 31, 2015 16:45
blink led on stm32 L1 Discovery with ARM assembly
@ lets try to blink an LED on the discovery stm32 L1 board
@ uses LED on PB7
@ how to compile and flash:
@ arm-none-eabi-as -mcpu=cortex-m3 blinky.s -o blinky.o
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o blinky.elf blinky.o
@ arm-none-eabi-objcopy -O binary blinky.elf blinky.bin
@ then from st-link (https://github.com/texane/stlink)
@ ./st-flash write ../first_arm/blinky.bin 0x08000000
.thumb
@devoncrouse
devoncrouse / clean_audio.sh
Created May 7, 2013 17:02
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@suapapa
suapapa / dependencies.sh
Created May 10, 2012 03:13
Visualize dependencies of binaries and libraries on Linux
#!/bin/bash
# Original script came from;
# http://domseichter.blogspot.com/2008/02/visualize-dependencies-of-binaries-and.html
# Written by Dominik Seichter and added patch from pfree
# analyze a given file on its
# dependecies using ldd and write
# the results to a given temporary file
#