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
# See this article for discussion: http://blog.askesis.pl/post/2019/02/django-admin-inline.html | |
from django.contrib.admin.checks import BaseModelAdminChecks | |
from django.contrib.admin.models import LogEntry | |
from django.contrib.contenttypes.admin import GenericStackedInline | |
class ModelAdminLog(GenericStackedInline): | |
model = LogEntry | |
# All fields are read-only, obviously |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: simple-ingress | |
annotations: | |
kubernetes.io/ingress.global-static-ip-name: "example-public-ip-name" | |
ingress.gcp.kubernetes.io/pre-shared-cert: "start-example-com" | |
spec: | |
rules: | |
- host: example.example.com |
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
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: scraper-cron-uk | |
spec: | |
schedule: "0 3 * * *" | |
concurrencyPolicy: Forbid | |
jobTemplate: | |
spec: | |
backoffLimit: 3 |
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
gcloud beta container --project "your-project" clusters create "tutorial-medium" \ | |
--zone "europe-west1-b" --no-enable-basic-auth --cluster-version "1.11.5-gke.5" \ | |
--machine-type "n1-standard-2" --image-type "COS" --disk-type "pd-standard" \ | |
--disk-size "100" \ | |
--scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "1" --enable-stackdriver-kubernetes --enable-ip-alias --network "projects/logicai-cloud/global/networks/default" --subnetwork "projects/logicai-cloud/regions/europe-west1/subnetworks/default" --default-max-pods-per-node "110" \ | |
--addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --maintenance-window "02:00" |
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
#!/usr/bin/env python | |
from __future__ import unicode_literals, print_function | |
import os, sys, logging, re, codecs | |
logging.basicConfig(level=logging.ERROR) | |
MIN_COMMIT_LENGTH = 15 |
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
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <codecell> | |
import numpy as np | |
import requests | |
import svgwrite | |
from svgwrite import mm | |
from IPython.display import SVG |
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
{ | |
"metadata": { | |
"name": "matplotlib-text-in-corner" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |