Skip to content

Instantly share code, notes, and snippets.

View colonelpanic8's full-sized avatar

Ivan Malison colonelpanic8

  • San Francisco, CA
View GitHub Profile
┌────────┬───────────────────────────────────────────────────────────────────────────────────────────┬┐
│ name │ email │lines│
├────────┼───────────────────────────────────────────────────────────────────────────────────────────┼┤
│Ivan M… │ IvanMalison@gmail.com │46 129│
│ │ File: poetry.lock │4553│
│ │ File: railbird/debug/frame_decorators.py │2176│
│ │ File: railbird/entrypoints.py │1365│
│ │ File: railbird/shot_parsing/feature_detection/path_segmentation.py │1232│
│ │ File: railbird/console.py │981│
│ │ File: tests/co
import math
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.widgets import Button, Slider
def find_angle_of_vector_that_comes_within(distance, point, direction="left"):
x_p, y_p = point
def find_angle_of_vector_that_comes_within(distance, point, direction="left"):
x_p, y_p = point
if x_p != 0:
theta_min = np.arctan2(y_p, x_p)
else:
theta_min = np.pi / 2 if y_p > 0 else -np.pi / 2
# Now, we need to adjust theta_min to achieve the exact specified distance
# The current minimum distance is the perpendicular distance from (x_p, y_p)
import enum
class SlashType(enum.Enum):
FORWARD = enum.auto()
BACKWARD = enum.auto()
def count_regions_in_slashes_grid(slashes_grid: list[list[SlashType]]):
pass
import enum
class SlashType(enum.Enum):
FORWARD = enum.auto()
BACKWARD = enum.auto()
def count_regions_in_slashes_grid(slashes_grid: list[list[SlashType]]):
pass
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
KEYCHAIN_PASSWORD=$MATCH_KEYCHAIN_PASSWORD
SYSTEM_KEYCHAIN=/Library/Keychains/System.keychain
AUTHORISATION=(-T /usr/bin/security -T /usr/bin/codesign -T /usr/bin/xcodebuild)
# Re-create System Keychain
echo "Re-Creating System Keychain"
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
KEYCAHIN_PASSWORD=$MATCH_KEYCHAIN_PASSWORD
SYSTEM_KEYCHAIN=/Library/Keychains/System.keychain
AUTHORISATION=(-T /usr/bin/security -T /usr/bin/codesign -T /usr/bin/xcodebuild)
# Re-create System Keychain
echo "Re-Creating System Keychain"
infinite_slope = object()
from collections import defaultdict
def slope_intercept(p1, p2):
run = p2[0] - p1[0]
rise = p2[1] - p2[1]
if run == 0:
slope = infinite_slope()
scale-y = "1.0 - v-timing + initial-x-offset";
scale-x = "1.0 - v-timing";
offset-x = "v-timing * (window-width / 2)";
offset-y = "v-timing * (window-height / 2)";
class StructLogCloudLoggingHandler(google_logging_v2.handlers.CloudLoggingHandler):
_allowed_types = (dict, list, bool, str, int, float)
_max_depth = 3
def _make_suitable_for_pb_conversion(self, dict_value, depth=0):
if depth > self._max_depth:
return
for key in list(dict_value.keys()):
value = dict_value[key]
if isinstance(value, tuple):