Skip to content

Instantly share code, notes, and snippets.

@luca-drf
luca-drf / broker.cpp
Last active March 25, 2021 11:52
Simple load balancer using ZeroMQ
#include "zhelpers.hpp"
#include <queue>
int main(int argc, char *argv[])
{
// Prepare our context and sockets
zmq::context_t context(1);
zmq::socket_t frontend(context, ZMQ_ROUTER);
zmq::socket_t backend(context, ZMQ_ROUTER);
@luca-drf
luca-drf / README.md
Last active June 19, 2017 23:30
Sierpinski Triangle Explorer

Sierpinski Triangle Explorer

Requirements

  • Python 2.7
  • pytest
  • PyGObject
@luca-drf
luca-drf / git_log.bash
Created May 1, 2019 09:35
Better git log
git log --decorate --abbrev-commit --graph --pretty=format:"%C(yellow)%h%Creset%C(cyan)%C(bold)%d%Creset %C(cyan)(%cr)%Creset %C(green)%cn%Creset %s"
@luca-drf
luca-drf / gist:36c06ec5f889fa99a87451797bfdc877
Created April 9, 2020 12:43 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@luca-drf
luca-drf / test_integration_smtp.py
Created March 25, 2021 12:37
pytest fixtures for SMTP and subprocess
import asyncio
from email.message import EmailMessage
from email.parser import BytesParser as EmailParser
from email.policy import default as default_policy
from queue import Queue, Empty
from smtplib import SMTP as SMTPClient
from typing import NamedTuple, List, Tuple
from aiosmtpd.controller import Controller as SMTPController
import pytest
@luca-drf
luca-drf / production-app-requirements.txt
Last active April 20, 2021 14:18
Python Production Apps Requirements
git+git://github.com/Ensembl/ensembl-prodinf-legacy-core@master#egg=ensembl_prodinf
amqp==2.6.1
appdirs==1.4.0
billiard==3.6.3.0
Bootstrap-Flask==1.2.0
celery==4.4.6
certifi==2020.4.5.2
chardet==3.0.4
click==7.0
dominate==2.4.0
@luca-drf
luca-drf / build-uamqp-arm-wheel.sh
Last active April 4, 2024 07:43
Build uamqp arm64 manylinux wheel
#!/bin/bash
set -e -u -x
# Usage:
# docker run --rm -e PYVER="cp39-cp39" -e UAMQP_TAG="v.1.6.3" -v $(pwd):/io quay.io/pypa/manylinux2014_aarch64:latest /io/build-uamqp-arm-wheel.sh
PYBIN="/opt/python/$PYVER/bin"
WORKDIR="/var/uamqp"
TESTDIR="/var/uamqp_test"