Skip to content

Instantly share code, notes, and snippets.

include <iostream>
#include <vector>
#include <range/v3/range_for.hpp>
#include <range/v3/utility/functional.hpp>
#include <range/v3/view/iota.hpp>
#include <range/v3/view/join.hpp>
#include <range/v3/view/transform.hpp>
using T = int;
@jw3
jw3 / Artifact
Last active February 15, 2018 13:46
artifacts
// Tagging interface for types that are Artifacts
struct Artifact {}
typedef shared_ptr<Artifact> ArtifactPtr;
@jw3
jw3 / fix_includes.sh
Created April 12, 2018 22:45 — forked from Canta/fix_includes.sh
Fix include/include_tasks with tags for ansible v2.5
#!/bin/bash
# This dirty script is supposed to run on your ansible directory.
# It could obviously be done better, but it's just a single use script, so I don't really care.
# Worked fine with bash 4.2
# Anyway, check its syntax (at least the first line, the one setting the RESULT var), and use with caution.
# The script implements what's suggested here:
# http://docs.ansible.com/ansible/2.5/porting_guides/porting_guide_2.5.html#dynamic-includes-and-attribute-inheritance
jq -r '.dependencies | map(.lib_paths[]) | join(":")' conanbuildinfo.json
Lathe
- http://www.grizzly.com/products/10-x-22-VS-Lathe-with-2-Axis-DRO/G0752Z
- impacted by tariffs, ~$500 increase
Mill
- http://www.grizzly.com/products/Mill-Drill-with-Stand-and-DRO/G0759
- no tariff increase, taiwan machine
Horizontal saw
- http://www.grizzly.com/products/4-x-6-Metal-Cutting-Bandsaw/G0622
,---.
,.'-. \
( ( ,'"""""-.
`,X `.
/` ` `._
( , ,_\
| ,---.,'o `.
| / o \ )
\ ,. ( .____,
\| \ \____,' \
@jw3
jw3 / googlenet.py
Created January 5, 2019 18:35 — forked from joelouismarino/googlenet.py
GoogLeNet in Keras
from scipy.misc import imread, imresize
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation
from keras.models import Model
from keras.regularizers import l2
from keras.optimizers import SGD
from googlenet_custom_layers import PoolHelper,LRN
def create_googlenet(weights_path=None):
# This is the config to install Kubeflow on an existing k8s cluster.
# If the cluster already has istio, comment out the istio install part below.
apiVersion: kfdef.apps.kubeflow.org/v1alpha1
kind: KfDef
metadata:
name: kubeflow_app
namespace: kubeflow
spec:
repos:
@jw3
jw3 / .geotiff_headers.md
Created June 2, 2020 16:21 — forked from perrygeo/.geotiff_headers.md
Parsing geotiff headers

Optimized determination of Geotiff bounds

This is functional but is merely a workaround until we get vsis3 - you can try out preliminary vsis3 support with GDAL 2.1 and rasterio 0.32a1

Goal: Based on the GeoTiff and TIFF specs, manually parse out tags to allow for the most IO-efficient reading of georeferencing information.

It works almost the same as rio info --bounds but gives a json array, and it's fast

$ time rio info --bounds R4C1.tif

153.984375 24.2578125 154.072265625 24.345703125

@jw3
jw3 / __main__.py
Created February 11, 2021 19:40
example trust gui
import sys
import gi
from fapolicy_analyzer.app import System
# from https://python-gtk-3-tutorial.readthedocs.io/en/latest/builder.html
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk