Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env ruby
require 'aws/s3'
include AWS::S3
# set these ENVs for connection
id = ENV['AMAZON_ACCESS_KEY_ID']
key = ENV['AMAZON_SECRET_ACCESS_KEY']
Base.establish_connection!(access_key_id: id, secret_access_key: key)
@jrsa
jrsa / CMakeCache.make
Last active August 8, 2016 00:45
cmake state for compiling dlib's python binding
# This is the CMakeCache file.
# For build in directory: /Users/jrsa/Desktop/dlibpybuild
# It was generated by CMake: /opt/homebrew-cask/Caskroom/cmake/3.3.2/CMake.app/Contents/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt
index f947e03..ad0420b 100644
--- a/dlib/CMakeLists.txt
+++ b/dlib/CMakeLists.txt
@@ -457,7 +457,7 @@ if (NOT TARGET dlib)
# Note that we add __STRICT_ANSI__ to avoid freaking out nvcc with gcc specific
# magic in the standard C++ header files (since nvcc uses gcc headers on
# linux).
- list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES")
+ list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES")
@jrsa
jrsa / CMakeCache.txt
Last active August 8, 2016 00:18
opencv3 python3
# This is the CMakeCache file.
# For build in directory: /Users/jrsa/Desktop/cvbuild
# It was generated by CMake: /opt/homebrew-cask/Caskroom/cmake/3.3.2/CMake.app/Contents/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
@jrsa
jrsa / stft.py
Created September 26, 2016 19:18
#!/usr/bin/env python3
"""stft.py
Provides stft, a Short-Time Fourier Transform function.
Author: James Anderson
Email: jrsa@jrsa.co
Date: 09/24/2016
CalArts MTEC-480/680
class DelayLine {
44100 => int n;
float buffer[n];
int pointer;
fun float tap(int i) {
pointer - i => int index;
if(index < 0) {
index + n => index;
}
#version 330 core
in vec4 pos;
out vec4 color;
uniform vec2 dims;
uniform float width;
//uniform float amp;
uniform float scaleCoef;
int t = 69;
void setup() {
for (int i = 0; i < 8; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
t++;
// adapted from https://github.com/4ms/PEG-v1
#define SPI_PIN PINB
#define SPI_PORT PORTB
#define SPI_DDR DDRB
#define SPI_MOSI PB3
#define SPI_MISO PB4
#define SPI_SCLK PB5
#define DAC_CS_PORT PORTB
@jrsa
jrsa / oscbank.ck
Created May 15, 2017 22:19
simple chuck patch providing a bank of oscillators, and iteratively controlling them over time. divided into compositional sections
// how many oscillators will there be?
30 => int bankWidth;
TriOsc sines[bankWidth];
// adjust gain of bank to avoid clipping
0.1 / bankWidth => float oscGain;
// rest of dsp chain
LPF f => Pan2 p => dac;
10000.0 => f.freq;