Generates a dependency graph for a list of installed python packages in the form of a dot file for graphviz.
python dependency-graph.py installed_package_name ... | dot -Tpng -o dependencies.png
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
if (!require("pacman")) install.packages("pacman") | |
pacman::p_load(dplyr, tidyr, wakefield) | |
set.seed(10) | |
dat <- r_data_frame(n = 10000, | |
race, | |
age, | |
sex | |
) |
import sys, marshal, functools, subprocess | |
child_script = """ | |
import marshal, sys, types; | |
fn, args, kwargs = marshal.load(sys.stdin) | |
marshal.dump( | |
types.FunctionType(fn, globals())(*args, **kwargs), | |
sys.stdout) | |
""" |
Celery worker blocks on rate limited task | |
========================================= | |
by github.com/miraculixx | |
Problem: | |
If a worker has a rate_limit active on some task, and that task | |
arrives (is received) more often than the rate limit interval, all | |
worker processes will block on these task instances and stop | |
consuming other tasks as soon as the prefetch count has maxed out |