I hereby claim:
- I am xamox on github.
- I am xamox (https://keybase.io/xamox) on keybase.
- I have a public key ASCNCyQflmLq7t15MAqOI6F6N59VFxVOfLVO4KaOzGQWogo
To claim this, I am signing this object:
class AutoVivification(dict): | |
""" | |
Implementation of perl's autovivification feature. | |
>>> a = AutoVivification() | |
>>> a[1][2][3] = 4 | |
>>> a[1][3][3] = 5 | |
>>> a[1][2]['test'] = 6 | |
>>> print a | |
>>> {1: {2: {'test': 6, 3: 4}, 3: {3: 5}}} |
from SimpleCV import * | |
cam = Camera() | |
while True: | |
img = cam.getImage().flipHorizontal() | |
dist = img.colorDistance(Color.BLACK).dilate(2) | |
segmented = dist.stretch(200,255) | |
blobs = segmented.findBlobs() | |
if blobs: | |
circles = blobs.filter([b.isCircle(0.2) for b in blobs]) |
#!/usr/bin/env python | |
import elasticsearch | |
import elasticsearch.helpers | |
elasticSource = elasticsearch.Elasticsearch([{"host": "localhost", "port": 9200}]) | |
elasticDestination = elasticsearch.Elasticsearch([{"host": "localhost", "port": 9200}]) | |
# Setup source and destinations connection to Elasticsearch. Could have been different clusters | |
# Delete index so we know it doesn't exist. | |
elasticDestination.indices.delete(index="index_destination", ignore=[400, 404]) | |
# Create index with nothing in it. | |
elasticDestination.indices.create(index="index_source", ignore=[400, 404]) |
I hereby claim:
To claim this, I am signing this object:
Yo dawg, I heard you like port-fowards so I'm going to port-forward your port-forward. | |
Say you want to test something like maybe run something in minikube locally but connect to something running in the kube cluster. | |
Do your kube port foward | |
kubectl --context k8s-uw1-gcp port-forward prometheus-prometheus-server-7b6f9d99f8-m4vt6 9090 | |
On your host system | |
socat -v TCP-LISTEN:9091,fork TCP:127.0.0.1:9090 |
Say you want to test something like maybe run something in minikube locally but connect to something running in the kube cluster.
Do your kube port foward
kubectl --context k8s-uw1-gcp port-forward prometheus-prometheus-server-7b6f9d99f8-m4vt6 9090
''' | |
This is how to track a white ball example using SimpleCV | |
The parameters may need to be adjusted to match the RGB color | |
of your object. | |
The demo video can be found at: | |
http://www.youtube.com/watch?v=jihxqg3kr-g | |
''' | |
print __doc__ |
''' | |
Tested with: | |
Mongo 3.0.12 | |
pymongo 3.3.0 | |
Elasticsearch 2.1.2 | |
Kibana 4.3.3 | |
elasticsearch python 2.1.0 | |
''' |
This guide was originally taken from: https://gist.github.com/mattiaslundberg/8620837 and updated to markdown as well as adding desktop and wireless setup
Download the archiso image from https://www.archlinux.org/ Use etcher to create USB drive: https://etcher.io/