Skip to content

Instantly share code, notes, and snippets.

View jmfrank63's full-sized avatar
🕴️
improving my rust skills

Johannes Maria Frank jmfrank63

🕴️
improving my rust skills
View GitHub Profile
@jmfrank63
jmfrank63 / utime2str.py
Last active August 14, 2018 13:22
Unixtime to printable string
import datetime
utime = '1534256362'
strdate = datetime.datetime.fromtimestamp(
int(utime)
).strftime('%Y-%m-%d %H:%M:%S')
print(strdate)
@jmfrank63
jmfrank63 / adeque.py
Created August 6, 2018 15:05
Async deque in python
# -*- coding: utf-8 -*-
class AsyncDeque(deque):
def __init__(self, elements):
super().__init__(elements)
def __aiter__(self):
return self
async def __anext__(self):
if not self:
raise StopAsyncIteration