Skip to content

Instantly share code, notes, and snippets.

View AlexanderFabisch's full-sized avatar

Alexander Fabisch AlexanderFabisch

View GitHub Profile
@AlexanderFabisch
AlexanderFabisch / README.md
Last active May 24, 2018 13:32
[InFuse] intermediate log format / minimal example

msgpack Logs

This is an example of how to create an InFuse-compatible intermediate log file in the msgpack format.

Setup

Install msgpack: run install.sh.

Compile Example

@AlexanderFabisch
AlexanderFabisch / README.md
Created December 16, 2017 17:24
Running XMind on Ubuntu 14.04

Running XMind on Ubuntu 14.04

# You can use Docker to run current XMind versions on Ubuntu 14.04
xhost local:root
sudo docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v path/to/xmind:/xmind --privileged ubuntu:16.04

# in the docker container:
apt-get update
apt-get install default-jre
@AlexanderFabisch
AlexanderFabisch / generate.py
Created August 3, 2017 09:03
pix2pix image generation
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")
@AlexanderFabisch
AlexanderFabisch / deep_learning_installation.md
Last active November 26, 2020 08:51
Caffe installation for Ubuntu 14.04
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})
@AlexanderFabisch
AlexanderFabisch / tricks.md
Last active August 29, 2015 14:05
Python tricks

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
@AlexanderFabisch
AlexanderFabisch / t-SNE.ipynb
Last active April 1, 2020 13:34
t-SNE in sklearn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.