See also https://minrk-nbconvert.readthedocs.io/en/stable/usage.html
jupyter nbconvert --to pdf notebook.ipynbSee also https://minrk-nbconvert.readthedocs.io/en/stable/usage.html
jupyter nbconvert --to pdf notebook.ipynb| \begin{figure}[ht] | |
| \centering | |
| \includegraphics[width=0.9\textwidth]{figure5_model_comparison_summary.pdf} | |
| \caption{Comprehensive model comparison...} | |
| \end{figure} |
| curl -sL https://github.com/owner/repo/archive/refs/tags/vX.X.X.tar.gz | openssl sha256 |
| #' Convert formula-based model function to matrix interface | |
| #' | |
| #' @param fit_func Function accepting formula and data | |
| #' @param predict_func Optional prediction function | |
| #' @param intercept Include intercept in formula (default TRUE) | |
| #' @return List with fit and predict methods | |
| formula_to_matrix <- function(fit_func, predict_func = NULL, intercept = TRUE) { | |
| fit_wrapper <- function(X, y, ...) { | |
| # Input validation |
| # Run Bayesian optimization minimizing rmse | |
| remotes::install_github("thierrymoudiki/bayesianrvfl") | |
| > head(bayesianrvfl::bayes_opt) | |
| # function (objective, lower, upper, type_acq = c("ei", "ucb"), | |
| # nb_init = 10L, nb_iter = 90L, kappa = 1.96, method = c("standard", | |
| # "direct_online", "polyak_online"), surrogate_model = c("rvfl", | |
| # "matern52", "rvfl_emcee", "rf"), optim_surr = c("GCV", |
| from sklearn.utils import all_estimators | |
| from tqdm import tqdm | |
| # Get all scikit-learn regressors | |
| estimators = all_estimators(type_filter='regressor') | |
| for name, RegressorClass in tqdm(estimators): | |
| if name in ['MultiOutputRegressor', 'MultiOutputClassifier', 'StackingRegressor', 'StackingClassifier', |
| library(doSNOW) | |
| library(tcltk) | |
| cl <- makeSOCKcluster(2) | |
| registerDoSNOW(cl) | |
| pb <- txtProgressBar(max=100, style=3) | |
| progress <- function(n) setTxtProgressBar(pb, n) | |
| opts <- list(progress=progress) | |
| r <- foreach(i=1:100, .options.snow=opts) %dopar% { |
| #!/bin/bash | |
| # first, install jq: on macOS, brew install jq | |
| wget https://raw.githubusercontent.com/Techtonique/datasets/refs/heads/main/tabular/survival/gbsg2_2.csv | |
| # === CONFIG === | |
| JSON_FILE="survival_curves.json" | |
| CSV_FILE="survival_curves.csv" | |
| PLOT_FILE="survival_plot.png" |
| #!/bin/bash | |
| # === CONFIG === | |
| OUTPUT_JSON="sims.json" | |
| OUTPUT_CSV="sims.csv" | |
| OUTPUT_IMAGE="plot.png" | |
| # === 1. Prompt for Bearer token === | |
| read -p "Enter your Bearer token: " AUTH_TOKEN |
| .PHONY: clean getwd initialize help render-rnw render-rmd setwd | |
| .DEFAULT_GOAL := help | |
| define BROWSER_PYSCRIPT | |
| import os, webbrowser, sys | |
| from urllib.request import pathname2url | |
| # The input is expected to be the full HTML filename | |
| filename = sys.argv[1] | |
| filepath = os.path.abspath(os.path.join(filename)) |