Skip to content

Instantly share code, notes, and snippets.

@pinkerltm
pinkerltm / group_subscriber_sup.erl
Last active March 2, 2020 08:58
brod group subscriber supervisor
-module(group_subscriber_sup).
-author("jzornig").
-behaviour(supervisor).
-define(SERVER, ?MODULE).
-define(BROKER, "localhost").
-define(BROKERPORT,9092).
-define(TOPIC,<<"test">>).
-define(CHILD_SPECS,
[
@pinkerltm
pinkerltm / ResNet50_BO.py
Created May 29, 2019 08:18
My approach on using Ax/BoTorch to optimize a CNN for Traffic Sign classification
#######################################################
## this code was used in a Jupyter notebook
## therefore some jupyter specific lines are commented out
#%matplotlib inline
#%config InlineBackend.figure_format = 'retina'
import matplotlib.pyplot as plt
import numpy as np
import torch
@pinkerltm
pinkerltm / bucardo
Created February 21, 2019 15:44 — forked from revis0r/bucardo
Bucardo init script, place in /etc/init.d/
#!/bin/bash
### BEGIN INIT INFO
# Provides: bucardo
# Required-Start: $remote_fs $syslog postgresql-9.3
# Should-Start: postgresql-9.3
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Manage bucardo
# Description: Start, stop, restart bucardo
@pinkerltm
pinkerltm / README.md
Created August 21, 2018 07:02 — forked from clhenrick/README.md
PostgreSQL & PostGIS cheatsheet (a work in progress)
@pinkerltm
pinkerltm / turbodbc_spike.py
Last active February 6, 2018 10:12
A spike test on using turbodbc to bulk insert geometry data into SQL Server as Well known Text (WKT)
from turbodbc import connect, make_options, Error
## Provide connection details here
host = ''
database = ''
user = ''
password = ''
options = make_options(prefer_unicode=True)
connection = connect(connection_string='DRIVER={};SERVER={};DATABASE={};UID={};PWD={}'.format('{SQL Server}', host,database,user,password), turbodbc_options=options)
@pinkerltm
pinkerltm / execute_many_geometries.py
Created January 31, 2018 15:26
This is a testcase to show how to insert a couple of rows with spatial geometry content over pyodbc executemany to sqlserver. Unfortunately this is failing if you pass more than one tuple at a time.
import pyodbc
## Provide connection details here
host = ''
database = ''
user = ''
password = ''
connection = pyodbc.connect('DRIVER={};SERVER={};DATABASE={};UID={};PWD={}'.format('{SQL Server}', host,database,user,password))
cursor = connection.cursor()