sudo systemctl disable --now snapd
wget https://ca.us.mirror.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
mount -t tmpfs -o size=1500M none /mnt
cd /mnt
tar -xf ~/ArchLinuxARM-aarch64-latest.tar.gz
cp /etc/resolv.conf etc
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
| """Quirk for Aqara Presence Sensor FP310 (lumi.sensor_occupy.acn1).""" | |
| from __future__ import annotations | |
| from typing import Final | |
| from zhaquirks.xiaomi import XiaomiAqaraE1Cluster | |
| from zigpy import types as t | |
| from zigpy.quirks.v2 import QuirkBuilder, ReportingConfig | |
| from zigpy.quirks.v2.homeassistant import ( |
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
| esphome: | |
| name: presence | |
| friendly_name: "Presence Sensor" | |
| platformio_options: | |
| platform: https://github.com/platformio/platform-espressif32/archive/refs/tags/v6.9.0.zip | |
| board_build.f_cpu: 160000000L | |
| board_build.f_flash: 80000000L | |
| board_build.flash_size: 4MB | |
| build_flags: "-DBOARD_HAS_PSRAM" | |
| board_build.arduino.memory_type: qio_opi |
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
| dd if=/dev/zero of=alpine-rootfs.ext4 bs=1M count=100 | |
| mkfs.ext4 alpine-rootfs.ext4 | |
| mkdir /tmp/alpine-rootfs | |
| mount alpine-rootfs.ext4 /tmp/alpine-rootfs | |
| docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
| docker run -it --name armv7alpine --net=host -v /tmp/alpine-rootfs:/extrootfs arm32v7/alpine | |
| # In docker container | |
| apk update | |
| apk add openrc |
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 tensorflow as tf | |
| from tensorflow import keras | |
| from tensorflow.keras import layers | |
| cluster_resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu='local') | |
| tf.tpu.experimental.initialize_tpu_system(cluster_resolver) | |
| strategy = tf.distribute.TPUStrategy(cluster_resolver) | |
| def parse_imagenet_example(example, image_size): | |
| # Read example |
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 | |
| # Copyright 2020 encombhat<bhat@encom.eu.org> | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |