Skip to content

Instantly share code, notes, and snippets.

View rvodden's full-sized avatar

Richard Vodden rvodden

View GitHub Profile
@rvodden
rvodden / callback
Created November 3, 2023 11:22
Event Loop Based
import fcw
import camera
import time
import distances
import default_values
def doLaneDepartureWarning():
dashcam.beep(volume.MEDIUM)
dashcam.screen.flash(RED)
@rvodden
rvodden / main.py
Created June 23, 2023 06:36
Dexro Python Discord
import tkinter as tk
from tkinter import messagebox
class MyGUI:
def __init__(self):
self.root = tk.Tk()
self.check_state = tk.IntVar()
Activation Code 2G2b5QUsWGYzsHTVqIWq
Activation ID b8035237-0c6a-4c54-ae73-795227cfb870
@rvodden
rvodden / Poetry Run Log
Created November 5, 2022 12:55
Poetry Hanging on 304 from pypi
> poetry -vvv update --no-plugins
Loading configuration file /home/rvodden/.config/pypoetry/config.toml
Loading configuration file /home/rvodden/.config/pypoetry/auth.toml
Using virtualenv: /home/rvodden/.pyenv/versions/3.10.5/envs/pysketcher
Project environment contains an empty path in sys_path, ignoring.
Updating dependencies
Resolving dependencies...
1: fact: pysketcher is 0.0.10
1: derived: pysketcher
1: fact: pysketcher depends on numpy (^1.19.5)
2022-06-18T10:58:55.793+0100 [INFO] Terraform version: 1.2.3
2022-06-18T10:58:55.794+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.0.0
2022-06-18T10:58:55.794+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.12.0
2022-06-18T10:58:55.794+0100 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-06-18T10:58:55.794+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-06-18T10:58:55.794+0100 [DEBUG] using github.com/zclconf/go-cty v1.10.0
2022-06-18T10:58:55.794+0100 [INFO] Go runtime version: go1.18.1
2022-06-18T10:58:55.794+0100 [INFO] CLI args: []string{"terraform", "plan"}
2022-06-18T10:58:55.794+0100 [DEBUG] Attempting to open CLI config file: /home/rvodden/.terraformrc
2022-06-18T10:58:55.794+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
@rvodden
rvodden / main.c
Created May 29, 2022 13:05
PWM Fan Controller
#include <avr/io.h>
#include <avr/interrupt.h>
// initialize pwm
void pwm_init() {
/*set prescaler to /8
fast PWM modde
enable PB1
diable PB0
*/
Start-Transcript -Path c:\windows\temp\install-aws-pv-drivers.log
Push-Location -Path c:\windows\temp
# Install PV Drivers
Invoke-WebRequest https://s3.amazonaws.com/ec2-windows-drivers-downloads/AWSPV/Latest/AWSPVDriver.zip -Output AWSPVDriver.zip
Extract-Archive AWSPVDriver.zip
Push-Location AWSPVDriver
Invoke-Expression .\install.ps1 -NoReboot
Pop-Location
@rvodden
rvodden / main.py
Last active September 17, 2021 11:51
PySketcher Geometric Solver Recap of Part 2
from abc import ABC, abstractmethod
class Constraint(ABC):
"""Used to restrict that value of a ```ConstrainedValue```."""
@abstractmethod
def validate_object(self, instance):
"""Validates that `instance` is suitable. Raises `InvalidConstraintException` if not"""
raise NotImplementedError("`validate_object` must be implemented explicitly.")
@rvodden
rvodden / main.py
Created September 16, 2021 15:47
PySketcher Geometric Solver Recap of Part 1
from abc import ABC
class Constraint(ABC):
"""Used to restrict that value of a ```ConstrainedValue```."""
pass
class FixedValueConstraint(Constraint):
def __init__(self, value):
self._value = value
@rvodden
rvodden / gist:dc841928d8c24ef28026395a88ff63d3
Last active March 31, 2021 14:46
Multi Y-Axis Ploy in React-Vis
import {
XYPlot,
XAxis,
YAxis,
HorizontalGridLines,
VerticalBarSeries,
LabelSeries,
MarkSeries,
makeWidthFlexible } from 'react-vis';