Skip to content

Instantly share code, notes, and snippets.

from itertools import chain, imap, groupby
from operator import itemgetter
empty = object()
def lookup_merge_strategy(tv, path):
# FIXME: Implement
pass
#!/bin/sh
PROJECT=thockin-dev
ZONE=us-central1-b
K8S_MIG=kubernetes-minion-group
# Assume I have 2 kubernetes services running, svc1 and svc1. Both are type
# NodePort with ports defined below. I want to expose them as hostnames
# defined below.
SVC1_NODE_PORT=30001
import time
import re
import os
import requests
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
from cookielib import LWPCookieJar
import ConfigParser
from base64 import b64encode
from django.db import models
# http://www.djangosnippets.org/snippets/562/#c673
# https://gist.github.com/fission6/2587518
class QuerySetManager(models.Manager):
# http://docs.djangoproject.com/en/dev/topics/db/managers/#using-managers-for-related-object-access
# Only works for OneToOne relations...:
# https://code.djangoproject.com/ticket/14891
use_for_related_fields = True