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 requests | |
import bs4 | |
import pickle | |
import os | |
import json | |
import time | |
import random | |
PINBOARD_URL = 'https://pinboard.in' | |
PINBOARD_USER = 'YOUR_PINBOARD_USERNAME' |
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
# After you've got a list of words from sorting/filter the generated CSV | |
# copy and paste this into a running Python REPL and keep re-running the | |
# last line with each word you want to interrogate through the concordance | |
from nltk.corpus.reader.markdown import MarkdownCorpusReader | |
from nltk.text import TextCollection | |
corpus = MarkdownCorpusReader('<YOUR COMBINED MARKDOWN TWEETS FOLDER>', r'.*\.md') | |
text = TextCollection(corpus) |
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 board | |
import touchio | |
import storage | |
import usb_cdc | |
import usb_midi | |
import usb_hid | |
# Neo Trinkey | |
touch1 = touchio.TouchIn(board.TOUCH1) | |
touch2 = touchio.TouchIn(board.TOUCH2) |
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 pimoroni import BREAKOUT_GARDEN_I2C_PINS | |
from pimoroni_i2c import PimoroniI2C | |
import breakout_scd41 | |
from machine import Pin, SPI | |
import sh1107 # https://github.com/peter-l5/SH1107 | |
import random | |
MESSAGE = '0000' | |
co2 = 0 |
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
# Quick script to convert Adafruit GFX font into binary file. | |
# Author: Tony DiCola | |
# License: MIT (https://opensource.org/licenses/MIT) | |
# Taken from glcdfont.c from Adafruit GFX Arduino library. | |
FONT = bytes(( | |
0x00, 0x00, | |
0x00, 0x00, | |
0x00, 0x00, | |
0x00, 0x00, | |
0x00, 0x00, |
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
# https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/plasma_stick/co2.py | |
# https://docs.micropython.org/en/latest/library/rp2.html#rp2.bootsel_button | |
# https://github.com/pimoroni/phew/blob/v0.0.3/phew/__init__.py | |
import time | |
import plasma | |
from plasma import plasma_stick | |
from machine import Pin | |
import breakout_scd41 as scd | |
from pimoroni_i2c import PimoroniI2C |
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
# https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/tufty2040/main.py | |
# https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/tufty2040/pride_badge.py | |
# https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/breakout_scd41/scd41_demo.py | |
from picographics import PicoGraphics, DISPLAY_TUFTY_2040, PEN_RGB332 | |
import time, math, random, gc | |
from pimoroni import Button, BREAKOUT_GARDEN_I2C_PINS | |
import breakout_scd41 | |
from pimoroni_i2c import PimoroniI2C |
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 board | |
import digitalio | |
import storage | |
import usb_cdc | |
import usb_midi | |
import usb_hid | |
# QT2040 Trinkey | |
button = digitalio.DigitalInOut(board.BUTTON) | |
button.switch_to_input(digitalio.Pull.UP) |
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
# SPDX-FileCopyrightText: 2021 Carter Nelson for Adafruit Industries | |
# SPDX-License-Identifier: MIT | |
import time | |
import board | |
import adafruit_scd4x | |
import neopixel | |
import adafruit_24lc32 | |
## https://github.com/Neradoc/circuitpython-st25dv |
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
# sudo apt install python3-pip pkg-config libdbus-1-dev libglib2.0-dev | |
# sudo pip3 install nxbt | |
# sudo pip3 install jinja2==3.0.3 itsdangerous==2.0.1 Werkzeug==2.0.2 eventlet==0.33.0 dnspython==2.2.1 | |
import pyjoystick.sdl2 | |
import nxbt | |
import gpiozero | |
import sys | |
button3 = gpiozero.Button(24, pull_up=False) |
NewerOlder