Skip to content

Instantly share code, notes, and snippets.

{
"apiVersion":"argoproj.io/v1alpha1",
"kind":"Workflow",
"metadata": {
"namespace": "sdparray1",
"name": "product-controller-1111"
},
"spec":{
"entrypoint":"product-controller",
"serviceAccountName":"workflow",
@cchristelis
cchristelis / gist:09f5bf6a63f244175eeb
Last active August 29, 2015 14:27 — forked from timlinux/gist:3bbabf96779906d746ff
Setup procedure for a new Fedora workstation
#!/bin/bash
##########################################################
# Updated 3 July 2015 to use dnf and tweaks for Fedora 22
##########################################################
# Change below to whichever host is running apt cacher
# setup apt-cacher - do this after lxc docker as ssl sources are not configured for cacher by me
dnf install -y apt-cacher-ng
systemctl start apt-cacher-ng.service
def run:
impact = self.calculate_impact(...) # IF base run
report = self.generate_report(impact) # report mixin work
@cchristelis
cchristelis / gist:c126d24986dc8e9df786
Created March 13, 2015 13:40
Count Features in area of interest
from qgis.utils import iface
from osgeo import gdal
from qgis.core import QgsFeatureRequest
# Get the layer
layers = iface.legendInterface().layers()
vector_layer = layers[0]
# Get the current extents
from qgis.utils import iface
from osgeo import gdal
def world2Pixel(geoMatrix, x, y):
"""
from: http://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html
Uses a gdal geomatrix (gdal.GetGeoTransform()) to calculate
the pixel location of a geospatial coordinate
"""
ulX = geoMatrix[0]