This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| # Minikube addons | |
| https://github.com/kubernetes/minikube/blob/master/docs/addons.md | |
| #start minikube | |
| minikube start --vm-driver hyperv --hyperv-virtual-switch "VMVirtualSwitch" --memory 12288 --cpus 4 | |
| #or | |
| minikube start --vm-driver="hyperv" --hyperv-virtual-switch="VMVirtualSwitch" --v=7 --alsologtostderr | |
| # minikube Patch Enviornemnt for Helm |
Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.
We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.
False
'managed': Falsepython manage.py test, tell Django to set "managed" to True
True during tests:| """ Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
| import numpy as np | |
| import cPickle as pickle | |
| import gym | |
| # hyperparameters | |
| H = 200 # number of hidden layer neurons | |
| batch_size = 10 # every how many episodes to do a param update? | |
| learning_rate = 1e-4 | |
| gamma = 0.99 # discount factor for reward |
| """ | |
| Select database based on URL variable | |
| Inspired by this Django snipped: | |
| https://djangosnippets.org/snippets/2037/ | |
| It's assumed that any view in the system with a cfg keyword argument passed to | |
| it from the urlconf may be routed to a separate database. for example: |
| from fabric.api import * | |
| from fabric.context_managers import cd | |
| from fabric.operations import local as lrun, sudo | |
| from fabric.contrib.files import sed | |
| from fabric.utils import warn | |
| from local_fabfile import root, prod, lh, SERVER_IP | |
| def virtualenv(command, run_directory=''): | |
| if run_directory == '': |