This file contains 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
{{/* | |
Returns given number of random Hex characters. | |
In practice, it generates up to 100 randAlphaNum strings | |
that are filtered from non-hex characters and augmented | |
to the resulting string that is finally trimmed down. | |
*/}} | |
{{- define "jupyterhub.randHex" -}} | |
{{- $result := "" }} | |
{{- range $i := until 100 }} |
This file contains 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
start_over='true' | |
while start_over == 'true': | |
print('Mata in') | |
principle=int(input('Startsumma:')) | |
rate=float(input('Förmodad ränta per år:')) | |
time=int(input('Sparhorisont (antal år):')) | |
real_rate = rate * 0.01 | |
a = 0 |
This file contains 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
""" | |
This is a basic script that prints shares of CPU/Memory for machines of | |
different size. The script reads a list of nodes specifications, then prints | |
node share choices based on how much memory is required. | |
The mem_guarantee specification is calculated for each node by first subtracting | |
4 GB of memory for each node. This is to ensure that all nodes retain ~4 GB of | |
memory. | |
""" |
This file contains 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
""" | |
Check for orphan single-user pods | |
Compares JupyterHub API list of running servers | |
to list of running pods in kubernetes | |
in order to identify discrepancies | |
see https://github.com/jupyterhub/kubespawner/pull/742 | |
""" |
This file contains 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
# This is a JupyterHub Helm chart (z2jh) configuration file that: | |
# | |
# - injects a Python script to /tmp/cleanup-orphaned-pods.py via hub.extraFiles | |
# - defines a managed JupyterHub service to run the Python script with | |
# permissions ask the JupyterHub REST API about what users' servers are active | |
# | |
# It was developed to help cleanup user server pods that could end up orphaned | |
# by JupyterHub using KubeSpawner 5.0-6.0 or the z2jh versioned 3.0. For more | |
# information, visit this forum post: | |
# https://discourse.jupyter.org/t/how-to-cleanup-orphaned-user-pods-after-bug-in-z2jh-3-0-and-kubespawner-6-0/21677 |
OlderNewer