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
import argparse | |
# See also Python boilerplates: | |
# https://www.python-boilerplate.com/py2+executable+argparse+logging | |
# https://gist.github.com/ssokolow/151572 | |
parser = argparse.ArgumentParser(description="Description") | |
parser.add_argument('--output','-o', help='Output file', default='out.csv') | |
# with type information: | |
parser.add_argument("-b", "--bits", help="bits", type=int, default=16) |
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
import logging | |
from logging import debug, info, warning, error | |
logging.basicConfig(format="%(lineno)d:%(levelname)s: %(message)s", level=logging.DEBUG) | |
# example use: | |
warning("Protocol problem: %s", "connection reset") |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include "filter.h" | |
/* | |
* Infinite Impulse Response (IIR) filter | |
* Also defines some other structures | |
* - arrays of double (allocation, release). Functions are defined for easier interface with SWIG | |
* - circular buffers |