Skip to content

Instantly share code, notes, and snippets.

View jgwerner's full-sized avatar
🙃

Greg Werner jgwerner

🙃
View GitHub Profile
@jgwerner
jgwerner / nvidia_docker_install.sh
Last active March 7, 2023 05:55
Nvidia docker installation script
# based in large part from https://raw.githubusercontent.com/khwilson/nvidia-docker-aws/master/nvidia.sh
#!/bin/bash
set -x
set -e
# Update and upgrade
echo "--"
echo "-- Running ubuntu updates and Ugrade"
@jgwerner
jgwerner / jupyter_notebook_config.py
Created May 19, 2017 03:05
Jupyter Notebook config enabled for IFrames.
from jupyter_core.paths import jupyter_data_dir
import subprocess
import os
import errno
import stat
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
@jgwerner
jgwerner / datascience_workflow.md
Created June 20, 2017 17:26
Standard data science workflow

Data Science Workflow

Define the Problem

  • What is the problem? Provide formal and informal definitions.
  • Why does the problem need to be solved? Motivation, benefits, how it will be used.
  • How would I solve the problem? Describe how the problem would be solved manually to flush domain knowledge.

Prepare Data

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Based in large part from https://github.com/canha/golang-tools-install-script
#!/bin/bash
set -e
VERSION="1.9"
print_help() {
echo "Usage: bash goinstall.sh OPTION"
echo -e "\nOPTIONS:"
@jgwerner
jgwerner / gist:d2436c3006d11c1953a0ab894691d041
Created November 6, 2019 11:40
Alternative to docker images purge to remove dangling images.
# remove docker images by line in text file
# alternative to `docker images purge`
!/bin/bash
images_file=dangling_images.txt
list_dangling_images () {
docker images --filter dangling=true | while read IMAGE_ID; do
>> $images_file
done
@jgwerner
jgwerner / add_graders.py
Last active January 6, 2021 01:06
add-graders
"""
Creates the shared grader notebook list by looping through a course array and then calls the
grader-setup-service microservice to create the grader notebook for the course if it doesn't exist.
All courses are created as deployments. To fetch a list of grader deployments that should be reflected
then run:
```
kubectl get deployment -n <namespace>
```

IllumiDesk Accessibility Conformance Report

Revised Section 508 Edition

VPAT

Version 2.4 (Revised) – January 2021

Name of Product:

@jgwerner
jgwerner / kc.yaml
Created February 12, 2021 22:27
Keycloak custom helm config
hostAliases: []
commonLabels: {}
commonAnnotations: {}
clusterDomain: cluster.local
extraDeploy: []
image:
registry: docker.io
repository: illumidesk/keycloak
tag: latest
## Specify a imagePullPolicy
@jgwerner
jgwerner / kecloak_saml_poc.md
Last active February 8, 2022 11:15
Keycloak + JupyterHub + SAML v2.0 PoC

Keycloak + JupyterHub + ingress-nginx + AWS NLB

Overview

We have successfully set up a working version of Keycloak with Kubernetes (we are using AWS EKS) with JupyterHub using the [ingress-nginx)(https://github.com/kubernetes/ingress-nginx) as a reverse proxy. Keycloak is set up with JupyterHub as a standard OIDC client (confidential) and the JupyterHub successfully redirects to the Keycloak page that prompts the user to login. (For FYI this configuration is set up with the GenericOAuthenticator).

The Keyclaok Identity Provider has been tested with multiple third-party SAML IdP's, such as Okta and Auth0. The Keycloak broker successfully connects with the IdP and the user is prompted to add their credentials. After succussfully authenticating, however, the Keycloak service returns:

14:39:41,946 WARN  [org.keycloak.events] (default task-60) type=IDENTITY_PROVIDER_RESPONSE_ERROR