This is an example of how to create an InFuse-compatible intermediate log file in the msgpack format.
Install msgpack: run install.sh.
import os | |
import argparse | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser(description='Train model') | |
parser.add_argument('patch_size', type=int, nargs=2, action="store", help="Patch size for D") | |
parser.add_argument('--backend', type=str, default="theano", help="theano or tensorflow") | |
parser.add_argument('--generator', type=str, default="upsampling", help="upsampling or deconv") |
cmake_minimum_required(VERSION 2.8.3) | |
project(kdl_parser_test) | |
find_package(urdfdom_headers REQUIRED) | |
include_directories(include ${urdfdom_headers_INCLUDE_DIRS}) | |
find_package(urdfdom REQUIRED) | |
include_directories(include ${urdfdom_INCLUDE_DIRS}) | |
link_directories(${urdfdom_LIBRARY_DIRS}) |
You should rather take a look at this blog post.
Generate a 2D grid of shape (n_samples, 2)
np.vstack(map(np.ravel, np.meshgrid(x, y))).T
Cycle over line styles (source)
import matplotlib.pyplot as plt
from itertools import cycle
lines = ["-", "--", "-.", ":"]
linecycler = cycle(lines)
import sys | |
import json | |
import requests | |
def get_suggestions(contains): | |
r = requests.get("http://reiseauskunft.bahn.de/bin/ajax-getstop.exe/dn?start=1&tpl=sls&REQ0JourneyStopsB=12&REQ0JourneyStopsS0A=1&getstop=1&noSession=yes&iER=yes&S=%s?&js=true" % contains) | |
res = json.loads(r.text[8:-22]) | |
suggestions = res["suggestions"] | |
return suggestions |