Skip to content

Instantly share code, notes, and snippets.

@michimani
michimani / delete_messages.py
Last active April 18, 2022 07:56
Delete old slack messages at a specific channel.
"""Delete old Slack messages at specific channel."""
from datetime import datetime
from time import sleep
import json
import re
import sys
import urllib.parse
import urllib.request
DELETE_URL = "https://slack.com/api/chat.delete"
@HaydenFaulkner
HaydenFaulkner / video_to_frames.py
Last active March 19, 2024 16:37
Fast frame extraction from videos using Python and OpenCV
from concurrent.futures import ProcessPoolExecutor, as_completed
import cv2
import multiprocessing
import os
import sys
def print_progress(iteration, total, prefix='', suffix='', decimals=3, bar_length=100):
"""
Call in a loop to create standard out progress bar
@ksasao
ksasao / boot.py
Created December 27, 2019 08:11
実行中のデバイスが M5StickV か UnitV かを調べる
from machine import I2C
i2c = I2C(I2C.I2C0, freq=100000, scl=28, sda=29)
devices = i2c.scan()
if len(devices)==0:
print("UnitV")
else:
print("StickV")