Skip to content

Instantly share code, notes, and snippets.

View sverhoeven's full-sized avatar

Stefan Verhoeven sverhoeven

View GitHub Profile
@sverhoeven
sverhoeven / __init__.py
Created August 14, 2023 12:51
Gist to see how mkdocstring inherits types from superclass attribute
class Vehicle:
"""A vehicle class
Attributes:
weight: The weight of the vehicle
"""
weight: float = 0.0
def __init__(self, weight: float) -> None:
@sverhoeven
sverhoeven / README.md
Last active March 16, 2023 06:58
Backup of images of my orgnizations on Docker Hub
@sverhoeven
sverhoeven / README.md
Created June 24, 2014 10:23
azure ad as idp + simplesamlphp as sp

Create sp in simplesamlphp

  1. Add SP to authsources.php

     'default-sp' => array(
             'saml:SP',
             'entityID' => 'https://svwiki.cloudapp.net',
             'discoURL' => NULL,
             'privatekey' => 'saml.pem',
    

'certificate' => 'saml.crt',

@sverhoeven
sverhoeven / requirements.txt
Created March 28, 2017 14:50
List webhooks of all repos in a GitHub organization
github3.py==1.0.0a4
click==6.7

Phenocam

https://phenocam.nau.edu/

Using API might need login.

Install

# Dependencies from supplemental_code/3_Figures/PS3_figures.Rmd
@sverhoeven
sverhoeven / README.md
Last active October 24, 2022 14:39
Octave with netcdf on linux
"""
Requires haddock3, fcc and pyyaml
```shell
python3 util/generate_haddock3_catalog.py > haddock3_catalog.yml
```
"""
import argparse
import importlib
@sverhoeven
sverhoeven / README.md
Created December 3, 2020 12:40
Dependency license checker report
@sverhoeven
sverhoeven / render.js
Last active October 7, 2020 12:34
run-cpp-on-web: react
ReactDOM.render(
<Heading/>,
document.getElementById('container')
);
@sverhoeven
sverhoeven / newtonraphson.cpp
Last active October 7, 2020 12:09
run-cpp-on-web: vega
#include "newtonraphson.hpp"
#include "problem.hpp"
#include <cmath>
// Define the constructor method of NewtonRaphson instances
NewtonRaphson::NewtonRaphson(float tolerance_in) : tolerance(tolerance_in) {}
// Define the 'solve' method of NewtonRaphson instances
float NewtonRaphson::solve(float initial_guess) {
float x = initial_guess;