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
SinOsc osc => Gain g => ADSR e => dac => WvOut w => blackhole; | |
.5 => g.gain; | |
("dings.wav", IO.INT24) => w.wavFilename; | |
// Note frequencies from ARINC 715-3, section 3.4 | |
// https://aviation.stackexchange.com/a/32459/82793 | |
587 => int highNote; | |
494 => int lowNote; | |
// Envelope settings |
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
import requests | |
JSON_URL = "https://build.betaflight.com/api/options/4.5.0-zulu" | |
def get_gates_options() -> tuple: | |
data = requests.get(JSON_URL, timeout=2).json() | |
gates = [] | |
options = [] |
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
{ | |
"configurations": [ | |
{ | |
"name": "Linux", | |
"includePath": [ | |
"/usr/lib/gcc/avr/5.4.0/include/**", | |
"/usr/lib/gcc/avr/5.4.0/include-fixed/**", | |
"/usr/lib/gcc/arm-none-eabi/10.3.1/include/**", | |
"/usr/lib/gcc/arm-none-eabi/10.3.1/include-fixed/**", | |
"/usr/lib/avr/include/**", |
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
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-01-29 at 10:18:59 UTC | |
bed_temperature = 50 | |
bridge_fan_speed = 100 | |
compatible_printers = | |
compatible_printers_condition = nozzle_diameter[0]>0.35 and printer_model!="MK2SMM" and printer_model!="MINI" and num_extruders==1 && ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material) | |
compatible_prints = | |
compatible_prints_condition = | |
cooling = 1 | |
disable_fan_first_layers = 5 | |
end_filament_gcode = "; Filament-specific end gcode" |
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
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-01-29 at 06:27:08 UTC | |
avoid_crossing_perimeters = 1 | |
avoid_crossing_perimeters_max_detour = 0 | |
bottom_fill_pattern = monotonic | |
bottom_solid_layers = 5 | |
bottom_solid_min_thickness = 0.5 | |
bridge_acceleration = 1000 | |
bridge_angle = 0 | |
bridge_flow_ratio = 1 | |
bridge_speed = 35 |
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
M104 S0; Set Hot-end to 0C (off) | |
M140 S0; Set bed to 0C (off) | |
G91; Relative positioning | |
G0 Z50; Move +50 units on Z | |
G1 Y180 F9000; Feed the bed forward making removal easy | |
M84; Disable motors | |
M106 S0; Disable fan |
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
long rand(int min, int max) { | |
long result; | |
for (int i = 0; i < analogRead(A0); i++) | |
{ | |
randomSeed(analogRead(A0)); | |
result = random(min, max); | |
} | |
return result; | |
} |
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
import androidx.lifecycle.Lifecycle.State | |
import androidx.lifecycle.LifecycleOwner | |
import androidx.lifecycle.LifecycleRegistry | |
/** | |
* @author Károly Kiripolszky <[email protected]> | |
*/ | |
class TestLifecycleOwner(state: State = State.STARTED) : LifecycleOwner { | |
private val lifecycle = LifecycleRegistry(this) |
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
import kotlinx.coroutines.CoroutineDispatcher | |
import kotlinx.coroutines.Runnable | |
import kotlin.coroutines.CoroutineContext | |
/** | |
* @author Károly Kiripolszky <[email protected]> | |
*/ | |
class TestCoroutineDispatcher : CoroutineDispatcher() { | |
override fun dispatch(context: CoroutineContext, block: Runnable) { | |
block.run() |
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
from . import logging | |
from .logging import log | |
def main(args): | |
# set up logging from the arguments | |
logging.init(args) | |
log.info("hello world!") | |
if __name__ == "__main__": |
NewerOlder