#include:
#include <linux/moduleparam.h>
# generated from catkin/cmake/template/pkgConfig.cmake.in | |
# append elements to a list and remove existing duplicates from the list | |
# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig | |
# self contained | |
macro(_list_append_deduplicate listname) | |
if(NOT "${ARGN}" STREQUAL "") | |
if(${listname}) | |
list(REMOVE_ITEM ${listname} ${ARGN}) | |
endif() |
from sqlalchemy.ext.declarative import declarative_base | |
#from sqlalchemy import * | |
#from sqlalchemy.orm import * | |
# Pro entity v podadresari. Podaresar *musi* obsahovat prazdny soubor __init__.py ! | |
#from entity.User import User | |
''' | |
Zavislosti: | |
# apt-get install python-sqlalchemy |
"set UTF-8 encoding | |
set enc=utf-8 | |
set fenc=utf-8 | |
set termencoding=utf-8 | |
" disable vi compatibility (emulation of old bugs) | |
set nocompatible | |
" use indentation of previous line | |
set autoindent | |
" use intelligent indentation for C | |
set smartindent |
"""adapted from https://github.com/OlavHN/bnlstm to store separate population statistics per state""" | |
import tensorflow as tf, numpy as np | |
RNNCell = tf.nn.rnn_cell.RNNCell | |
class BNLSTMCell(RNNCell): | |
'''Batch normalized LSTM as described in arxiv.org/abs/1603.09025''' | |
def __init__(self, num_units, is_training_tensor, max_bn_steps, initial_scale=0.1, activation=tf.tanh, decay=0.95): | |
""" | |
* max bn steps is the maximum number of steps for which to store separate population stats | |
""" |
import numpy as np | |
from scipy.ndimage.interpolation import map_coordinates | |
from scipy.ndimage.filters import gaussian_filter | |
def elastic_transform(image, alpha, sigma, random_state=None): | |
"""Elastic deformation of images as described in [Simard2003]_. | |
.. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for | |
Convolutional Neural Networks applied to Visual Document Analysis", in | |
Proc. of the International Conference on Document Analysis and | |
Recognition, 2003. |
7 | |
2 | |
1 | |
0 | |
4 | |
1 | |
4 | |
9 | |
5 | |
9 |
#!/usr/bin/env python | |
#coding=utf8 | |
########################################################################################## | |
import os | |
import logging | |
import logging.handlers | |
import traceback | |
from flask import Flask | |
from flask.ext.restful import reqparse, abort, Api, Resource | |
from flask import request |
########################################################################################## | |
import os | |
import sys | |
import json | |
import unittest | |
import pprint | |
import httplib | |
import urllib | |
import datetime | |
import random |