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
// original at https://github.com/BelaPlatform/Bela/blob/master/examples/04-Audio/delay/render.cpp | |
// this version is modified to use an FSR to (haphazardly) control delay time and feedback. | |
/* | |
____ _____ _ _ | |
| __ )| ____| | / \ | |
| _ \| _| | | / _ \ | |
| |_) | |___| |___ / ___ \ | |
|____/|_____|_____/_/ \_\ |
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
def some_really_long_function_name(long_arg: str, even_longer_arg: int) -> | |
str: | |
"""a silly example""" | |
return long_arg + str(even_longer_arg) |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
struct VarType<T> { | |
let name: String | |
let val: T | |
} |
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
pi@raspberrypi:~ $ ls -la | |
total 28 | |
drwxr-xr-x 3 pi pi 4096 Apr 16 15:31 . | |
drwxr-xr-x 3 root root 4096 Mar 18 08:09 .. | |
-rw------- 1 pi pi 677 Apr 16 16:06 .bash_history | |
-rw-r--r-- 1 pi pi 220 Mar 18 08:09 .bash_logout | |
-rw-r--r-- 1 pi pi 3512 Mar 18 08:09 .bashrc | |
-rw-r--r-- 1 pi pi 675 Mar 18 08:09 .profile | |
drwx------ 2 pi pi 4096 Apr 16 15:31 .ssh | |
pi@raspberrypi:~ $ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf |
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
root@raspberrypi:/home/pi# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf | |
Successfully initialized wpa_supplicant | |
ctrl_iface exists and seems to be in use - cannot override it | |
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore | |
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=netdev'. | |
You may have another wpa_supplicant process already running or the file was | |
left by an unclean termination of wpa_supplicant in which case you will need | |
to manually remove this file before starting wpa_supplicant again. | |
root@raspberrypi:/home/pi# pgrep wpa_supp |
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
class BarContoller | |
def update | |
# ... | |
SomeExternalModule::SomeClassInTheModule.my_method | |
# kaboom: | |
# NoMethodError (undefined method `my_method' for #<Class:0x007fd3964eb468>): | |
end | |
end |
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
(lldb) po self.internalVirtualDestinations | |
<__NSArrayM 0x144669170>( | |
<MIKMIDIDestinationEndpoint: 0x144642130> Network Session 1, | |
<MIKMIDIDestinationEndpoint: 0x144692bd0> Grain Science | |
) | |
(lldb) po deviceManager.virtualDestinations as! NSArray | |
"2 values" | |
{ |
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
/* This is the swift code used to generate the following python dict list */ | |
func someTouchHandler(theTouch: UITouch) { | |
let rawPressure = theTouch.valueForKey("_pressure") as! CGFloat | |
let force = theTouch.force | |
print("Force: \(force)\t\tRaw pressure: \(rawPressure)") | |
} |
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
strides = { | |
181: 3.0, | |
187: 2.0, | |
201: 2.0, | |
210: 2.0, | |
215: 2.0, | |
216: 2.0, | |
242: 2.0, | |
248: 2.0, | |
251: 2.0, |
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
strides = { | |
1: 3.0, | |
3: 7.0, | |
4: 7.0, | |
134: 2.0, | |
149: 2.0, | |
154: 2.0, | |
157: 2.0, | |
165: 2.0, | |
180: 2.0, |
NewerOlder