- Install Raspberry Pi OS image and "Raspberry Pi Imager" software from https://www.raspberrypi.org/software/
- Flash OS image via Raspberry Pi Imager
- Open E:\config.txt (assuming E:\ is the drive the image was flashed on to)
- Add
enable_uart=1
under the[all]
section (the section is most likely at the end of file) - Add
dtoverlay=disable-bt
under the[all]
section - Insert SD card in Raspberry Pi
- Connect to device via serial line at speed=115200
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 image::*; | |
use image::imageops::FilterType; | |
use std::result::Result; | |
// Takes a byte array of skin data and returns the face layer encoded in a given | |
// standard image format. The `width` and `height` here are the widths and heights | |
// of the output image (not the input skin). | |
fn skin_to_image_data(bytes: &Vec<u8>, width: u32, height: u32, format: ImageFormat) -> Result<Vec<u8>, &'static str>{ | |
let blocks = skin_get_block_length(bytes.len())?; |
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 math | |
''' | |
Divides the sample into two clusters - left and right, where the left cluster | |
contains all values > mean(sample) and the right cluster contains all other | |
values. | |
The cluster with most number of values wins! Returns the winning cluster's mean. | |
If the cluster's max deviation from mean (i.e., min(cluster) - mean(sample)) is |
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
<?php | |
declare(strict_types=1); | |
final class Node{ | |
public static function buildTree(int $size, ?Node $node = null) : self{ | |
$node ??= new Node(); | |
$node->entries[0] = new Node(); | |
$node->entries[1] = new Node(); |
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
<?php | |
declare(strict_types=1); | |
/** | |
* @name InventoryTransactionEventTest | |
* @main muqsit\testing\InventoryTransactionEventTest | |
* @api 4.0.0 | |
* @version 0.0.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
<?php | |
declare(strict_types=1); | |
final class Player{ | |
/** @var int */ | |
public $id; | |
/** @var bool */ |
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
<?php | |
declare(strict_types=1); | |
$db = $argv[1]; | |
$host = $argv[2]; | |
$user = $argv[3]; | |
$pwd = $argv[4]; | |
$mysql = new mysqli($host, $user, $pwd, $db); |
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
{ | |
"3:2": "243:0", | |
"29:2": "29:3", | |
"29:3": "29:2", | |
"29:4": "29:5", | |
"29:5": "29:4", | |
"31:0": "32:0", | |
"33:2": "33:3", | |
"33:3": "33:2", | |
"33:4": "33:5", |