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
In [1]: import math | |
In [2]: #given coordinates of the two corners | |
...: point_A = (-17.524, 61.000, 19.521) | |
...: point_B = (8.568, 61.000, -24.552) | |
In [3]: # Calculate the dimensions of the rectangle | |
...: length_x = abs(point_B[0] - point_A[0]) | |
...: length_z = abs(point_B[2] - point_A[2]) |
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
9036908-dirty | |
esp32-arduino-lib-builder | |
06:09:28 | |
Mar 26 2021 | |
v3.3.5-1-g85c43024c | |
AppCtrl | |
/littlefs | |
/.sys | |
V3.2.17EN | |
Booting... |
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
javascript:(function(){var script = document.createElement('script');script.src = "https://code.jquery.com/jquery-latest.min.js";document.getElementsByTagName('head')[0].appendChild(script);console.log("jQuery injected");})() |
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
from collections.abc import Callable | |
from functools import wraps | |
class typed[T, U]: | |
""" | |
A decorator class that enforces type checking for callable objects. | |
This class takes in a callable and ensures that the arguments passed to the callable | |
match the specified types. It returns the callable with the same type signature, but |
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
def get_excel_column_letter(col_idx: int) -> str: | |
letter = "" | |
while col_idx > 0: | |
col_idx, remainder = divmod(col_idx - 1, 26) | |
letter: str = chr(65 + remainder) + letter | |
return letter | |
# EX: | |
# >>> get_excel_column_letter(49) | |
# 'AW' |
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 asyncio | |
import json | |
import logging | |
from typing import NoReturn | |
import websockets | |
import websockets.exceptions | |
from colorama import Fore, init | |
init(autoreset=True) |
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
class StateMachine: | |
def __init__(self, value: int) -> None: | |
self.value: int = value | |
self.state = "START" | |
self.byte_list: list[int] = [] | |
def run(self) -> bytes: | |
while self.state != "END": | |
self.transition() | |
return bytes(self.byte_list[::-1]) |
I hereby claim:
- I am codebyaidan on github.
- I am codebyaidan (https://keybase.io/codebyaidan) on keybase.
- I have a public key whose fingerprint is 52F2 5B80 BC0F 597C A204 851A FABF 7402 790A 0641
To claim this, I am signing this object:
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
$semiColon = ';' | |
$pathArray = $env:PATH -split $semiColon | |
$uniquePathArray = $pathArray | Select-Object -Unique | |
$newPath = ($uniquePathArray -join $semiColon) | |
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::User) | |
# Verify changes using $env:PATH -split $semiColon | ForEach-Object { $_ } |
NewerOlder