This file contains hidden or 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
| [package] | |
| edition = "2018" | |
| name = "hello_world" | |
| version = "0.1.0" | |
| [lib] | |
| crate-type = ["staticlib"] | |
| name = "hello_world" | |
| [dependencies] |
This file contains hidden or 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
| import time | |
| import adafruit_ble | |
| from adafruit_ble import BLERadio | |
| from adafruit_ble.advertising import Advertisement | |
| from adafruit_ble.advertising.standard import ProvideServicesAdvertisement | |
| from adafruit_ble.services.standard.device_info import DeviceInfoService | |
| # from adafruit_ble.services.standard.hid import HIDService | |
| from adafruit_circuitplayground import cp |
This file contains hidden or 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 | |
| # All credit for figuring out these incantations goes to https://utcc.utoronto.ca/~cks/space/blog/linux/CgroupsForMemoryLimiting | |
| # | |
| # Script to run a command in a v1 cgroup limiting CPU and memory. | |
| # Use as `./confine.sh command <other args>`. | |
| # This is tested on Ubuntu Bionic. | |
| # You will need to install the `cgroup-tools` package from `apt` first. | |
| # Remember to tweak the limits based on your machine. | |
| # `sudo` is required to create the cgroup, but the build itself is run as a normal user. |
This file contains hidden or 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
| { | |
| inputStream: { | |
| name: "Live", | |
| type: "LiveStream", | |
| constraints: { | |
| width: {min:640}, | |
| height: {min:480}, | |
| facingMode: "environment", | |
| aspectRatio: {min:1,max:2}, | |
| }, |
This file contains hidden or 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
| #lang racket/base | |
| (define kont #f) | |
| (define my-prompt (make-continuation-prompt-tag)) | |
| (begin | |
| (call-with-continuation-prompt | |
| (λ () | |
| (printf "Before everything~n") | |
| (printf "The call current/composable returned ~v~n" | |
| (call/cc |
OlderNewer