This file contains hidden or 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
| #!/bin/bash | |
| main() | |
| { | |
| local opt_a= | |
| local opt_b= | |
| local opt_c= | |
| local args= | |
| getargs "$@" | |
| if [ -n "$opt_a" ]; then echo "opt_a [$opt_a]"; fi |
This file contains hidden or 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
| #!/bin/bash | |
| main() | |
| { | |
| echo "PID: $$" | |
| for s in SIGHUP SIGINT SIGQUIT SIGTERM EXIT; do | |
| if [ SIGTERM = $s ]; then | |
| trap "echo '$s is caught'; exit" $s | |
| else | |
| trap "echo '$s is caught'" $s | |
| fi |
This file contains hidden or 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 python3 | |
| # -*- vim: set fileencoding=utf-8 ff=unix: -*- | |
| from random import randint | |
| import argparse, asyncio | |
| async def wait4me(semaphore, taskno): | |
| async with semaphore: | |
| waittime = randint(1, 10) | |
| await asyncio.sleep(waittime) |
This file contains hidden or 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 python3 | |
| # -*- vim: set fileencoding=utf-8 ff=unix noet sw=4 ts=4 tw=0: -*- | |
| import argparse, csv, re, sys | |
| from functools import cmp_to_key | |
| from itertools import groupby | |
| from statistics import mean, median, mode, stdev | |
| AGG = [ | |
| # int |
OlderNewer