Skip to content

Instantly share code, notes, and snippets.

@Sitwon
Sitwon / Dockerfile
Last active July 17, 2022 19:34 — forked from haxwithaxe/latency-sensor.py
A quick and dirty no install latency sensor.
FROM python:3
WORKDIR /usr/src/latency-sensor
# COPY requirements.txt ./
# RUN pip install --no-cache-dir -r requirements.txt
COPY . .
ENTRYPOINT [ "bash", "./entrypoint.sh" ]
@Sitwon
Sitwon / format_table.py
Last active November 3, 2016 23:23 — forked from pinkie1378/format_table.py
Several different ways to format a table.
from __future__ import print_function
from itertools import starmap
def format_table(table, delim='|'):
"""
:param list table: 2D list, with inner lists of strings as rows.
:param str delim: Used to define table cell borders.
:return list: Containing formatted string elements representing each row,
ready to be written to a file.