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 PIL import Image, ImageDraw, ImageFont | |
import PIL.features | |
# ! brew install libraqm | |
print('libraqm:', PIL.features.check('raqm')) | |
size = (320, 16) | |
""" | |
FORMAT = "RGB" |
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
diff --git a/bootloader/F4/Inc/main.h b/bootloader/F4/Inc/main.h | |
index a095644..e57185f 100644 | |
--- a/bootloader/F4/Inc/main.h | |
+++ b/bootloader/F4/Inc/main.h | |
@@ -95,11 +95,11 @@ | |
-#define BOOT_1_PIN GPIO_PIN_15 //DIYMROE STM32F407VGT board (Button PD15, LED PE0) | |
-#define BOOT_1_PORT GPIOD |
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 PIL import Image, ImageDraw, ImageFont, ImageFilter | |
im = Image.open("./blue30.png") | |
POS = (1, 4) | |
X = POS[0] * 80 | |
Y = POS[1] * 80 | |
im1 = im.crop((X, Y, X + 30, Y + 30)) |
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
use embedded_hal::blocking::delay::DelayMs; | |
use embedded_hal::blocking::i2c::{Write, WriteRead}; | |
// BMP085 default address. | |
const BMP085_I2CADDR: u8 = 0x77; | |
// Operating Modes | |
pub const BMP085_ULTRALOWPOWER: u8 = 0; | |
pub const BMP085_STANDARD: u8 = 1; | |
pub const BMP085_HIGHRES: u8 = 2; |
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
// nrx, nfx, no, nb | |
// clkr, clkf, clkod, bwad | |
#[allow(warnings)] | |
fn calculate_pll_register_value(freq_in: u32, freq_out: u32) -> Option<(u8, u8, u8, u8)> { | |
/* constants */ | |
const vco_min: f64 = 3.5e+08; | |
const vco_max: f64 = 1.75e+09; | |
const ref_min: f64 = 1.36719e+07; | |
const ref_max: f64 = 1.75e+09; | |
const nr_min: i32 = 1; |
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
use core::fmt::{self, Write}; | |
use core::str; | |
fn main() { | |
// For LCD 160 / 8 = 20 chars | |
let mut buf = [0u8; 20]; | |
let mut buf = ByteMutWriter::new(&mut buf[..]); | |
buf.clear(); | |
write!(&mut buf, "Hello {}!", "Rust").unwrap(); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Trezor Test</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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
# The Java-Tron Configuration File | |
log.level = { | |
root = "INFO" # TRACE;DEBUG;INFO;WARN;ERROR | |
} | |
## The Chain | |
net { | |
# option: [ mainnet | testnet ] |
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
// Store.sol | |
pragma solidity >0.5.9; | |
contract Store { | |
uint256 internal value; | |
// 5247 energy | |
function reset() external { | |
value = 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
Import-Module 'C:\Users\mono\Repos\vcpkg\scripts\posh-vcpkg' | |
Set-PSReadLineOption -EditMode Emacs | |
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete | |
# Environment variables | |
$Env:Path = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" | |
# $Env:Path += ";C:\Windows\System32\WindowsPowerShell\v1.0\" |