Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| import machine, neopixel, time | |
| from machine import Pin, ADC | |
| np = neopixel.NeoPixel(Pin(2), 200) | |
| adcpin = machine.ADC(26) | |
| while True: | |
| num_of_leds = None | |
| for i in range(len(np)): | |
| onvalue = 0 |
| import os | |
| import time | |
| import shutil | |
| import argparse | |
| # Create the argument parser | |
| parser = argparse.ArgumentParser(description='Pico Firmware Flasher') | |
| parser.add_argument('uf2_file_path', metavar='UF2_FILE', type=str, help='Path to the UF2 file') | |
| parser.add_argument('-d', '--drive_letter', type=str, default='D:', help='Drive letter of the Pico (default: D:)') |
| import os | |
| import time | |
| import shutil | |
| import subprocess | |
| import signal | |
| import sys | |
| import argparse | |
| #If the applescript stops working or you don't want the function, set enableapplescript to False | |
| enableapplescript = True |
A minimal table to compare the Espressif's MCU families. The reported specifications are referred to the SoC, not to the modules (silver shield).
| ESP8266 | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C6 | |
|---|---|---|---|---|---|---|
| Announcement Date | 2014, August | 2016, September |
| # Based on Waveshare's epd5in65f.py demo. Copyright notice at end. | |
| import sys | |
| import os | |
| picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic') | |
| libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') | |
| if os.path.exists(libdir): | |
| sys.path.append(libdir) |
| **Interesting/widely used implementations of pathfinding algorithms. | |
| ========================================================================== | |
| A* Ruby https://github.com/georgian-se/shortest-path | |
| A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla | |
| A* Unity https://arongranberg.com/astar/front | |
| NBA* JS https://github.com/anvaka/ngraph.path | |
| NBA* Java https://github.com/coderodde/GraphSearchPal | |
| NBA* Java https://github.com/coderodde/FunkyPathfinding | |
| NBA* (Parallel) C++ https://github.com/janhsimon/PNBAStar |
This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.
It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.
Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2
The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and
| #!/bin/bash | |
| # Installs latest release of hub on Linux | |
| # Echo, halt on errors, halt on uninitialized ENV variables. (https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/) | |
| set -euxo pipefail | |
| # Hub doesn't have a way to install the latest version using `apt` yet, so I wrote this as a hacky substitute. | |
| # This will be unnecessary when this issue is resolved: https://github.com/github/hub/issues/718#issuecomment-65824284 | |
| # Linux options include: |