Sometimes the Python Polars library upgrades.
The following are some codebase migrations I've used.
- Find+Replace:
pl.Utf8 -> pl.String
pip install micropython-rp2-rpi_pico-stubs to install Python type checking helpers.import machine package.Main guide: https://etoast.net/posts/agilent_repair/
Repairing the power supply is not very feasible.
| import numpy as np | |
| import pandas as pd | |
| import polars as pl | |
| import time | |
| from memory_profiler import memory_usage | |
| # Array shapes to test | |
| shapes = [ | |
| (10_000, 10), | |
| (10_000, 200), |
| """ | |
| Related to https://github.com/pydata/xarray/issues/10135 | |
| Result (in VS Code debugger): | |
| Shape | NumPy → Polars | NumPy → Pandas → Polars | |
| ----------------------------------------------------------------- | |
| 10,000 x 10 | 0.003997 s | 0.033097 s | |
| 10,000 x 200 | 0.002424 s | 0.050915 s | |
| 100,000 x 10 | 0.000278 s | 0.021541 s |
| #include <Arduino.h> | |
| #include <U8x8lib.h> | |
| #include "DHT.h" | |
| #define DHTPIN 0 // what pin we're connected to | |
| // Uncomment whatever type you're using! | |
| // #define DHTTYPE DHT11 // DHT 11 | |
| #define DHTTYPE DHT22 // DHT 22 (AM2302) | |
| //#define DHTTYPE DHT21 // DHT 21 (AM2301) |