driver@localhost:/var/lib$ sudo fdisk -l
Disk /dev/sda: 31.5 GB, 31515377664 bytes
255 heads, 63 sectors/track, 3831 cylinders, total 61553472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from IPython.core.magic import Magics, magics_class, line_magic | |
import asyncio | |
from concurrent.futures import Future | |
# Credits goes to https://gist.github.com/chrisseto/8f7289497f40ad442a30#gistcomment-1701177 | |
@magics_class | |
class AsyncMagics(Magics): | |
@line_magic | |
def await(self, line): |
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
# Requirements: an existing and running k8s cluster | |
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash | |
helm init | |
# taken from http://docs.ceph.com/docs/master/start/kube-helm/ | |
helm serve & | |
# wait for helm serve to be ready |
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
# Comment line 9 in /etc/systemd/system/kubelet.service.d/10-kubeadm.conf | |
[Service] | |
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" | |
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true" | |
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" | |
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local" | |
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt" | |
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0" | |
# Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=systemd" | |
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki" |
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
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
STATICFILES_STORAGE = 'path.to.storage.S3StaticStorage' | |
THUMBNAIL_DEFAULT_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
AWS_ACCESS_KEY_ID = 'YOUR KEY' | |
AWS_SECRET_ACCESS_KEY = 'YOUR KEY' | |
AWS_STORAGE_BUCKET_NAME = 'media.YOURSITE.com' | |
AWS_STATIC_BUCKET_NAME = 'static.YOURSITE.com' | |
AWS_S3_CUSTOM_DOMAIN = AWS_STORAGE_BUCKET_NAME | |
AWS_STATIC_CUSTOM_DOMAIN = AWS_STATIC_BUCKET_NAME | |
STATIC_URL = 'http://%s/' % AWS_STATIC_BUCKET_NAME |
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 | |
''' | |
A #microtutorial to show how to use asyncio and some other stdlib-tools, | |
https://pugetsoundpython.slack.com/archives/C03LJKBPJ/p1530204386000485 | |
Invoke with, | |
`python nhuntwalker-asyncio.py -m on` | |
`python nhuntwalker-asyncio.py -m awe` | |
`python nhuntwalker-asyncio.py` |
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 | |
import tensorflow as tf | |
import numpy as np | |
from numpy import genfromtxt | |
# Build Example Data is CSV format, but use Iris data | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split | |
import sklearn | |
def buildDataFromIris(): |
OlderNewer