This gist provides the learning-python3.ipynb notebook file, which can be viewed and edited in a Jupyter Notebook server to learn Python 3.
Once you load the notebook file to your local jupyter server, you can edit any
This gist provides the learning-python3.ipynb notebook file, which can be viewed and edited in a Jupyter Notebook server to learn Python 3.
Once you load the notebook file to your local jupyter server, you can edit any
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: whoareyou-deployment | |
| namespace: default | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: | |
| app: whoareyou |
| // imports a couple of java tasks | |
| apply plugin: "java" | |
| // List available tasks in the shell | |
| > gradle tasks | |
| // A Closure that configures the sourceSets Task | |
| // Sets the main folder as Source folder (where the compiler is looking up the .java files) | |
| sourceSets { | |
| main.java.srcDir "src/main" |
| version: '2' | |
| services: | |
| agency: | |
| image: arangodb/arangodb | |
| environment: | |
| - ARANGO_ROOT_PASSWORD=openSesame | |
| command: --server.jwt-secret=openSesameJWT --database.password openSesame --server.endpoint tcp://0.0.0.0:5001 --agency.activate true --agency.size 1 --agency.supervision true | |
| coordinator: | |
| image: arangodb/arangodb |
| # Install virtualbox | |
| sudo apt install virtualbox | |
| # Install Kubectl | |
| curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin | |
| # Install Minikube | |
| curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.14.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ | |
| # Launch Minikube | |
| minikube start |
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
| Name | Description | Exceptions |
|---|---|---|
| Avoid async void | Prefer async Task methods over async void methods | Event handlers |
| Async all the way | Don't mix blocking and async code | Console main method |
| Configure context | Use ConfigureAwait(false) when you can |
Methods that require context |
| import cv2 | |
| import sys | |
| import os | |
| class FaceCropper(object): | |
| CASCADE_PATH = "data/haarcascades/haarcascade_frontalface_default.xml" | |
| def __init__(self): | |
| self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH) |