Skip to content

Instantly share code, notes, and snippets.

View xmoiduts's full-sized avatar

xmoiduts

View GitHub Profile
@SharzyL
SharzyL / crawl.py
Last active June 6, 2021 03:47
Telegram Relation Graph
# requirements: telethon, networkx, python-pysocks[asyncio], pygraphviz, tqdm
from telethon.client import TelegramClient
from telethon.tl.types import User as TgUser, Channel as TgChannel, Chat as TgChat
import telethon
import asyncio
import networkx as nx
from tqdm import tqdm
import pickle
@fherbine
fherbine / asynchronous_s3.py
Last active October 20, 2023 11:30
Download/upload asynchronously files from/to S3 bucket
import os
import queue
import threading
import time
import boto3
class AsynchronousS3:
"""Download/Upload asynchronously files from/to AWS S3 bucket.
@nevercast
nevercast / pixels.py
Last active November 20, 2022 17:34
Simple MicroPython ESP32 RMT NeoPixel / WS2812B driver.
# Copyright public licence and also I don't care.
# 2020 Josh "NeverCast" Lloyd.
from micropython import const
from esp32 import RMT
# The peripheral clock is 80MHz or 12.5 nanoseconds per clock.
# The smallest precision of timing requried for neopixels is
# 0.35us, but I've decided to go with 0.05 microseconds or
# 50 nanoseconds. 50 nanoseconds = 12.5 * 4 clocks.
# By dividing the 80MHz clock by 4 we get a clock every 50 nanoseconds.