Skip to content

Instantly share code, notes, and snippets.


Ahmad Alhour aalhour

View GitHub Profile
justanotherdot / Dockerfile.bite_sized_networking
Last active May 20, 2022
A Dockerfile with (almost) all the tools mentioned in Bite Size Networking by Julia Evans
View Dockerfile.bite_sized_networking
# N.B. The only tool missing here that is mentioned in the document is `zenmap`
# purely because this image is intended to be run via a CLI and `zenmap` is a GUI
# to `nmap` i.e. one can play around with the tools by running:
# $ docker build --name bite_size_networking:latest .
# $ docker run --rm -d --name bsn_test bite_size_networking:latest
# $ docker exec -it bsn_test bash
# Alternatively, one can change the `ENTRYPOINT` to `["bash"]` and run:
View stackify.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ambivalentno /
Created Nov 17, 2017
pytest-asyncio aiohttp client testing with fake server
import asyncio
import pathlib
import socket
import ssl
import pytest
import aiohttp
from aiohttp import web
from aiohttp.resolver import DefaultResolver
seglberg /
Last active Aug 30, 2022
gRPC Servicer with Asyncio (Python 3.6+)
import asyncio
from concurrent import futures
import functools
import inspect
import threading
from grpc import _server
def _loop_mgr(loop: asyncio.AbstractEventLoop):
__author__ = "Nicolas Seriot"
__date__ = "2017-05-24"
import png
(* Good morning everyone, I'm currently learning ocaml for one of my CS class and needed to implement
an avl tree using ocaml. I thought that it would be interesting to go a step further and try
to verify the balance property of the avl tree using the type system. Here's the resulting code
annotated for people new to the ideas of type level programming :)
(* the property we are going to try to verify is that at each node of our tree, the height difference between
the left and the right sub-trees is at most of 1. *)

FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

import asyncio
import datetime
import random
async def display_date(num, loop):
end_time = loop.time() + 50.0
while True:
print("Loop: {} Time: {}".format(num,
if (loop.time() + 1.0) >= end_time:
jm3 /
Last active Dec 27, 2021
Cognitive Bias Codex