openpgp4fpr:8C636735134A149B2A2473B60C343378BB768F5F
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find /proc/ -maxdepth 2 -name oom_score -exec bash -c 'pid=$(cut -d '/' -f 3 <<< $1) ; echo -n "$pid " ; cat /proc/$pid/oom_score | tr "\n" " " ; head -n 1 /proc/$pid/cmdline | tr "\000" " " ; echo' func {} \; 2> /dev/null | sort -k2nr -k1nr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Python multiprocessing return value and timeout example | |
""" | |
from __future__ import print_function | |
import argparse | |
import sys | |
import multiprocessing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# https://www.modmypi.com/raspberry-pi/breakout-boards/modmypi/modmypi-piot-relay-board | |
from __future__ import print_function, unicode_literals | |
import sys | |
import RPi.GPIO as GPIO | |
import time |