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
| { | |
| "ac": "Ascension Island", | |
| "ad": "Andorra", | |
| "ae": "United Arab Emirates", | |
| "af": "Afghanistan", | |
| "ag": "Antigua and Barbuda", | |
| "ai": "Anguilla", | |
| "al": "Albania", | |
| "am": "Armenia", | |
| "ao": "Angola", |
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
| Animals & Pet Supplies | |
| Apparel & Accessories | |
| Arts & Entertainment | |
| Baby & Toddler | |
| Business & Industrial | |
| Cameras & Optics | |
| Electronics | |
| Food, Beverages & Tobacco | |
| Furniture | |
| Hardware |
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
| /* | |
| * ESP32 HTTP OTA Update Example | |
| * This sketch demonstrates how to check for and download firmware updates | |
| * from an HTTP server. | |
| */ | |
| #include <WiFi.h> | |
| #include <HTTPClient.h> | |
| #include <HTTPUpdate.h> |
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
| # Usage: | |
| # load_env(path = ".env") | |
| # API_KEY = os.getenv('API_KEY', 'some-secret') | |
| import os | |
| def load_env(path: str) -> None: | |
| """ | |
| Function for loading .env file for secret API keys etc. and write them to the global enviroment | |
| I have the .env file located in the top ws dir, but could be anywhere. Gets rid of dotenv dependency |
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 argparse | |
| import open3d as o3d | |
| # Convert mesh file to .ply point clouds | |
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description='Process some integers.') | |
| parser.add_argument('--input_path', type=str, help='Path of the file to convert, output will be in the same dir if no output is given') | |
| parser.add_argument('--ouput_path', type=str, help='Path of where to save the file') | |
| parser.add_argument('--n_points', type=int, default=100_000, help='How many points the ply file should contain') |
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 torch | |
| def count_parameters(model): | |
| """ | |
| Nice to have helper function stolen from: | |
| https://discuss.pytorch.org/t/how-do-i-check-the-number-of-parameters-of-a-model/4325/9 | |
| """ | |
| return sum(p.numel() for p in model.parameters() if p.requires_grad) |
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
| """ | |
| -- Use example in ROS2 terminal: | |
| self.get_logger().info(f"X: {plot_bipolar(self.kf.x[3])}, Y: {plot_bipolar(self.kf.x[4])}, Z: {plot_bipolar(self.kf.x[5])}") | |
| -- Output: | |
| [INFO] [1740172663.636000550]: X: |..........|@.........|, Y: |..........|..........|, Z: |..........|..........| | |
| [INFO] [1740172663.685122760]: X: |..........|@@........|, Y: |..........|@.........|, Z: |..........|..........| | |
| [INFO] [1740172663.735189229]: X: |..........|@@........|, Y: |..........|@.........|, Z: |..........|@.........| | |
| [INFO] [1740172663.785187161]: X: |..........|@.........|, Y: |..........|@@........|, Z: |..........|@@........| | |
| [INFO] [1740172663.836043554]: X: |..........|..........|, Y: |..........|@@........|, Z: |..........|@@........| |
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 os | |
| import argparse | |
| import numpy as np | |
| import open3d as o3d | |
| # Just a basic dummy material | |
| material_contentes = """ | |
| newmtl material_0 | |
| Ka 0.40000000 0.40000000 0.40000000 |
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 os | |
| import sys | |
| from contextlib import contextmanager | |
| import cv2 | |
| @contextmanager | |
| def quiet(): | |
| """ | |
| Temporarily redirect stdout and stderr to devnull to suppress OpenCV's warnings. |
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 argparse | |
| import open3d as o3d | |
| # Convert .stl models to .ply point clouds | |
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description='Process some integers.') | |
| parser.add_argument('--file', type=str, help='Path of the file to convert, output will be in the same dir named *.ply') | |
| parser.add_argument('--n_points', type=int, default=10000, help='How many points the ply file should contain') | |
| parser.add_argument('--draw_output', type=bool, default=False, help='Should the resulting file be shown in plot') |
NewerOlder