Skip to content

Instantly share code, notes, and snippets.

View MinhKMA's full-sized avatar
💭
open, open more, open forever

Nguyễn Văn Minh MinhKMA

💭
open, open more, open forever
View GitHub Profile
@MinhKMA
MinhKMA / imap-search
Created March 13, 2019 08:26 — forked from martinrusev/imap-search
IMAP Search criteria
@MinhKMA
MinhKMA / ecc.py
Created August 20, 2018 03:38 — forked from bellbind/ecc.py
[python]basics of elliptic curve cryptography
# Basics of Elliptic Curve Cryptography implementation on Python
import collections
def inv(n, q):
"""div on PN modulo a/b mod q as a * inv(b, q) mod q
>>> assert n * inv(n, q) % q == 1
"""
for i in range(q):
if (n * i) % q == 1:
@MinhKMA
MinhKMA / asyncio-ping-output-3-hosts
Created April 25, 2018 03:45 — forked from namnh68/asyncio-ping-output-3-hosts
Simple python asyncio fake ping script
(ping-Qi9wEmSd) ➜ ping python ping.py
---> 0.000 s: Ping host #000
---> 0.000 s: Ping host #001
---> 0.000 s: Ping host #002
<--- 0.369 s: Pinged host #000 in 0.363 s
<--- 0.625 s: Pinged host #002 in 0.624 s
<--- 0.826 s: Pinged host #001 in 0.822 s
---> 2.006 s: Ping host #001
<--- 2.917 s: Pinged host #001 in 0.906 s
---> 3.004 s: Ping host #000