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
# Designed for Kobo highlights and notes. | |
# Step 1: Copy Kobo annotations TXT file from the Kobo to your Mac | |
# Step 2: cd into this directory | |
# Step 3: Rename the TXT file to `input.txt` | |
# Step 4: Run `python3 parser.py` | |
# Step 5: See `output.txt` for the results | |
def parse_txt_file(input_file, output_file): | |
with open(input_file, "r") as file: |
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 requests | |
import math | |
limit = 90 | |
fields = "id,image_id,title,artist_id,medium_display" | |
url = f"https://api.artic.edu/api/v1/artworks/search?limit={limit}&fields={fields}" | |
headers = {"user-agent": "test-app/[email protected]"} | |
searchQuery = { |
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
# A random design based on Kōhei Sugiura's stamps for the 1972 Olympics | |
# https://commons.wikimedia.org/wiki/File:Stamps_of_Germany_(BRD),_Olympiade_1972,_Blockausgabe_1971,_Markenblock.jpg | |
from machine import Pin, SPI | |
import framebuf | |
import utime | |
import random | |
import math | |
# Display resolution |
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
# A basic example of showing how many days of the year have passed | |
# Forked from Waveshare's Pico ePaper-5.83py | |
from machine import Pin, SPI | |
import framebuf | |
import utime | |
# Display resolution | |
EPD_WIDTH = 648 |
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
# Forked from Waveshare's Pico_ePaper-5.83.py file | |
# Resources: | |
# - Turning PNG, JPEG etc images into byte array format: https://diyusthad.com/image2cpp | |
# - Making that byte array format exactly what the frame buffer wants: https://forums.pimoroni.com/t/pico-and-ssd1306-bounce-your-own-icons-tutorial/16548 | |
# - Understanding how frame buffer formats work: https://blog.miguelgrinberg.com/post/micropython-and-the-internet-of-things-part-vi-working-with-a-screen | |
# Waveshare stuff | |
from machine import Pin, SPI | |
import framebuf |
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
# A more complex local network web server from your Raspberry Pi Pico W | |
# Provides a template for: | |
# - Connecting to a local network | |
# - Controlling the Pi's sensors (LED and temperature) from the webpage | |
# - Making network requests and passing that JSON data | |
import network # Handles connecting to Wi-Fi | |
import urequests # Handles making and servicing network requests | |
from time import sleep | |
from picozero import pico_led |
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
# This function builds your prompt. It is called below | |
function prompt { | |
# Define some local colors | |
local RED="\[\033[0;31m\]" # This syntax is some weird bash color thing I never | |
local LIGHT_RED="\[\033[1;31m\]" # really understood | |
local CHAR="danny" | |
# ♥ ☆ ♪ - Keeping some cool ASCII Characters for reference | |
# Here is where we actually export the PS1 Variable which stores the text for your prompt | |
export PS1="\[\e]2;\u@\h\a[\[\e[37;44;1m\]\t\[\e[0m\]]$RED\$(parse_git_branch) \[\e[32m\]\W\[\e[0m\]\n\[\e[0;31m\]$CHAR \[\e[0m\]" |
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
/* 1. Open Safari > Preferences... > Advanced */ | |
/* 2. Drop this style sheet into the 'style sheet:' section */ | |
/* 3. Refresh any Trello tabs you might have open */ | |
#classic-body { | |
background: #2b2b2c !important; | |
} | |
.board-header-btn { | |
color: #ffffff !important; |