Skip to content

Instantly share code, notes, and snippets.

View P1n3appl3's full-sized avatar
🍍
🍍

Julia Ryan P1n3appl3

🍍
🍍
View GitHub Profile
@P1n3appl3
P1n3appl3 / Cargo.toml
Last active December 29, 2023 07:17
pi-pico screen latency tester
[package]
name = "pi-pico-keyboard"
version = "0.1.0"
edition = "2021"
[dependencies]
usb-device = "0.2"
usbd-hid = "0.6"
critical-section = "1"
cortex-m = "0.7"
@P1n3appl3
P1n3appl3 / idot.sh
Created November 10, 2022 22:12
bazel graphviz terminal pretty printer
#!/bin/sh
# example usage:
# fx bazel cquery "allpaths(//build/bazel/examples/hello_rust:pkg.component, //build/bazel/examples/hello_rust:src/main.rs)" --output=graph | idot
font=mono
fgcolor=gray87 # closest to #DDDDDD which kitty's default foreground
dot -Tsvg -Nstyle=rounded -Gbgcolor=black -Ncolor=$fgcolor -Nfontcolor=$fgcolor \
{
"message": "casting integer literal to `u64` is unnecessary",
"code": {
"code": "clippy::unnecessary_cast",
"explanation": null
},
"level": "warning",
"spans": [
{
"file_name": "../../src/connectivity/bluetooth/lib/fuchsia-bluetooth/src/inspect.rs",
use evdev::{self, EventType, InputEventKind};
use mio::unix::SourceFd;
use mio::{Events, Interest, Poll, Token};
use std::io;
use std::os::unix::io::AsRawFd;
fn main() -> io::Result<()> {
let devices = evdev::enumerate().collect::<Vec<_>>();
// for d in devices {
// println!(
#!/usr/bin/env python
from __future__ import annotations
from bs4 import BeautifulSoup
from dataclasses import dataclass
from datetime import timedelta, datetime, time
import matplotlib.pyplot as plt
from pathlib import Path
import pickle
import requests

Keybase proof

I hereby claim:

  • I am p1n3appl3 on github.
  • I am p1neapple (https://keybase.io/p1neapple) on keybase.
  • I have a public key whose fingerprint is 576B 6E83 97D4 6334 8DE9 C6B4 9409 3348 D32D D171

To claim this, I am signing this object:

#include <Servo.h>
#include <stdio.h>
#define DEBUG true
int PIN_LEFT_MOTOR = PB_6;
int PIN_RIGHT_MOTOR = PB_7;
int PIN_LINE_SENSOR[8] = { PD_0, PD_1, PD_2, PD_3, PE_1, PE_2, PE_3, PB_4 };
// int PIN_TRIG_LEFT = PC_6;
// int PIN_ECHO_LEFT = PC_7;
@P1n3appl3
P1n3appl3 / riddle.py
Last active July 6, 2018 00:28
Run it without reading it and see if you can solve the relation between the numbers
# Run with python 2 and try to guess the relationsihp between the numbers
def stringify(num):
result = ""
if num == 0:
return "zero"
if num < 0:
result += "negative "
num = -num
english = ("", "one", "two", "three", "four", "five", "six", "seven",
@P1n3appl3
P1n3appl3 / apistuff.py
Last active November 11, 2017 05:58
Youtube comment scraper
import httplib2
import sys
import urllib2
import xml.etree.ElementTree as ET
# 1. To get all of this set up, you need python 2.7 and pip
# 2. Run "pip install --upgrade google-api-python-client" to get the dependencies
# 3. Go to console.cloud.google.com and create a new project
# 4. Go to API's and Services, and generate an OAuth client ID. Download the json
# it gives you and place it in the same folder as this script. Make sure to name