Characteristics | Sub-Characteristics | Definition |
---|---|---|
Functional suitability | Functional Completeness | degree to which the set of functions covers all the specified tasks and user objectives. |
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
import numpy as np | |
import scipy as sp | |
import scipy.optimize as opt | |
# Generate linear regression | |
a = 3 | |
b = 2 | |
n = 1000 | |
np.random.seed(42) | |
X = np.random.normal(loc=0, scale=4, size=(n,1)) |
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
function make_clicks() { | |
var x = document.evaluate( | |
"//div[@role='button' and contains(@id,'SmartShape_') and @class='cp-frameset']", | |
document, | |
null, | |
XPathResult.FIRST_ORDERED_NODE_TYPE, | |
null | |
).singleNodeValue; | |
if (x) { | |
x.click(); |
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
# Source: @kastnerkyle | |
import numpy as np | |
import torch | |
import random | |
import os | |
default_seed=4142 | |
print("Setting all possible default seeds based on {}".format(default_seed)) | |
# try to get deterministic runs |
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
import os | |
import gzip | |
import pickle | |
import dbm | |
import hashlib | |
MYDIR = "." # dir to save files | |
def memoize(dbmfile=os.path.join(MYDIR, "memoize.db"), compress=True): | |
"help save time and bandwidth on heavy functions" |
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
""" | |
Reverse dependencies for homebrew | |
Homebrew gives the package dependencies with `brew deps --installed` which each line of output | |
is `package: dependencies`. It is easy to see which package depends on nothing but difficult to | |
tell if nothing depends on it. Output of this script reversed it. For example, if we want to tell | |
which package can be uninstalled without breaking anything else in homebrew (i.e., output of | |
`brew leaves`), we can get the list with | |
python brewrdeps.py | grep ': $' |
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
"""Convert a function into a command line program automatically based on type hints and docstrings | |
""" | |
import argparse | |
import cmath | |
import math | |
import typing | |
from docstring_parser import parse |
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 python | |
""" | |
Python Daemon template from | |
https://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ | |
""" | |
import atexit | |
import os | |
import sys | |
import time |
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
"""Read an Excel file -> Write a Python script that will use OpenPyXL to reproduce the Excel file | |
""" | |
import inspect | |
import copy | |
from typing import List | |
import openpyxl | |
imported = {"styles": set()} |
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
import argparse | |
import tkinter as tk | |
import PIL.Image | |
import PIL.ImageTk | |
class ImageBrowser: | |
"""Image browser using tkinter, two images are displayed sid-eby-side, with | |
aspect ratio preserved, and allows to navigate using left/right arrow keys |