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 gym | |
| class Environment(gym.env): | |
| state = {} | |
| def __init__(self): | |
| self.state['motivation'] = -1 | |
| self.state['glucose'] = 60 | |
| self.state['went_to_gym'] = 0 | |
| self.state['age_in_years'] = 31 |
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 scipy | |
| import numpy as np | |
| def bootstrap_ci(xs, conf=.95, n=9999, seed=0): | |
| """ | |
| Computes a confidence interval of the mean for a given input of scalar values xs, a confidence level (defaults to .95), | |
| a number of iterations (defaults to 9999). | |
| Uses a fixed random seed for reproducibility. | |
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 matplotlib.pyplot as plt | |
| import numpy as np | |
| from typing import cast, Callable | |
| from numpy.typing import ArrayLike, NDArray | |
| from sklearn.model_selection import train_test_split | |
| from sklearn.naive_bayes import GaussianNB | |
| from sklearn.utils.validation import column_or_1d, check_array | |
| import seaborn as sns | |
| from mapie.classification import MapieClassifier | |
| from mapie.metrics import ( |
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 | |
| stopping=0 | |
| function promptRemovePackage { | |
| package=$1 | |
| # TODO: print man page extract (name/synopsis only) | |
| read -p "Recursively remove $1? (y/n/q) " myvar | |
| case "$myvar" in | |
| y|Y ) |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <sys/wait.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <signal.h> | |
| /* Required nr of command line arguments*/ | |
| #define REQ_ARGS 2 |