Skip to content

Instantly share code, notes, and snippets.

View dsludwig's full-sized avatar

Derek Ludwig dsludwig

View GitHub Profile
@dsludwig
dsludwig / keybase.md
Created November 16, 2018 17:51
keybase.md

Keybase proof

I hereby claim:

  • I am dsludwig on github.
  • I am dsludwig (https://keybase.io/dsludwig) on keybase.
  • I have a public key ASCt0Q7AC9DUiqfMOCIYJ0RSipOtwZUupaVZ-H-Xop1P8Qo

To claim this, I am signing this object:

@dsludwig
dsludwig / config.yaml
Last active September 19, 2018 21:10
Create resource quota and priority class
customPodHook: |
import sys
from kubernetes import client
from kubernetes.client.rest import ApiException
from kubespawner.clients import shared_client
from tornado import gen
@gen.coroutine
def modify_pod_hook(spawner, pod):
@dsludwig
dsludwig / permissive.py
Created November 26, 2015 23:15
Schematics with relaxed validation
from schematics import types
from schematics import models
from schematics import exceptions
class PermissiveType(object):
def to_native(self, value, context=None):
try:
return super(PermissiveType, self).to_native(value, context)
except exceptions.BaseError:
return value