Skip to content

Instantly share code, notes, and snippets.

View alwye's full-sized avatar
🏴

Alex alwye

🏴
View GitHub Profile
@nvbn
nvbn / app.py
Last active March 11, 2023 13:16
Sound lights with spotify, esp8266 and neopixel strip
from __future__ import annotations
import array
import asyncio
from bisect import bisect_left
from dataclasses import dataclass
import logging
import os
import socket
import time
@vi3k6i5
vi3k6i5 / flashtext_regex_timing_keyword_replace.py
Last active May 28, 2023 19:54
Benchmarking timing performance Keyword Replace between regex and flashtext
#!/bin/python
from flashtext.keyword import KeywordProcessor
import random
import string
import re
import time
def get_word_of_length(str_length):
# generate a random word of given length