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/python | |
""" | |
ATTRIBUTION: | |
procnetdev.py by cnelson is in the Public Domain and licensed under CC0 1.0 Universal | |
(source & full license: https://gist.github.com/cnelson/1658752) | |
""" | |
from datetime import datetime |
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
""" | |
Description: In this script, I plot the benchmark result of lambda compared | |
to itemgetter in the operator package. We sort a list of tuple (which has two | |
elements) to benchmark. The list element number ranges from 100 to 1000000. | |
""" | |
# import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
colors = ["#e6194b", |