Skip to content

Instantly share code, notes, and snippets.

View Alvant's full-sized avatar

Vasiliy Alekseev Alvant

View GitHub Profile
@maxfischer2781
maxfischer2781 / async_read.py
Last active April 30, 2024 06:40
example implementation for an async event loop
import time
import select
import socket
class AsyncSleep:
"""Event and action to sleep ``until`` a point in time"""
def __init__(self, until):
self.until = until
@DanielSWolf
DanielSWolf / Program.cs
Last active May 2, 2024 18:33
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);