Skip to content

Instantly share code, notes, and snippets.

Benedikt Waldvogel bwaldvogel

Block or report user

Report or block bwaldvogel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bwaldvogel
bwaldvogel / BeanSerializerFactoryWithGlobalIncludeDefaults.java
Created Aug 27, 2018
Workaround for Jackson’s global inclusion behaviour change in 2.8.3
View BeanSerializerFactoryWithGlobalIncludeDefaults.java
import java.lang.reflect.Field;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.cfg.PackageVersion;
import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig;
import com.fasterxml.jackson.databind.ser.BeanSerializerFactory;
import com.fasterxml.jackson.databind.ser.PropertyBuilder;
import com.fasterxml.jackson.databind.ser.SerializerFactory;
@bwaldvogel
bwaldvogel / bh1750.py
Last active Jan 8, 2017 — forked from oskar456/bh1750.py
BH1750 python library
View bh1750.py
#!/usr/bin/env python2
# vim: expandtab ts=4 sw=4
# Inspired by http://www.raspberrypi-spy.co.uk/2015/03/bh1750fvi-i2c-digital-light-intensity-sensor/
import smbus
import time
class BH1750():
""" Implement BH1750 communication. """
@bwaldvogel
bwaldvogel / fill_depth.py
Created Oct 8, 2013
Depth filling for RGB-D images as proposed by [1] which is based on [2]. [1]: http://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html [2]: www.cs.huji.ac.il/~yweiss/Colorization/
View fill_depth.py
#!/usr/bin/env python -O
# vim: set fileencoding=utf-8 :
# Quick and dirty Python port of fill_depth_colorization.m
# from http://cs.nyu.edu/~silberman/code/toolbox_nyu_depth_v2.zip
from __future__ import print_function
import numpy as np
from itertools import product
import scipy.stats
@bwaldvogel
bwaldvogel / update_hyperopt_db.py
Last active Dec 18, 2015
Script to update hyperopt jobs database for adding a new hyperparameter. See https://github.com/jaberg/hyperopt/issues/136
View update_hyperopt_db.py
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
from __future__ import division, absolute_import, print_function
import sys
from pymongo import MongoClient
if __name__ == "__main__":
View MultipleIDQueryTest.java
import java.util.ArrayList;
import java.util.List;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import com.mongodb.Mongo;
@bwaldvogel
bwaldvogel / SimpleOrQuery.java
Created Sep 15, 2011
simple or query with mongodb java driver
View SimpleOrQuery.java
import java.util.ArrayList;
import java.util.List;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBObject;
import com.mongodb.Mongo;
public class SimpleOrQuery {
@bwaldvogel
bwaldvogel / gist:1007776
Created Jun 4, 2011
mongodb 1.8.1 crash
We couldn’t find that file to show.
@bwaldvogel
bwaldvogel / config.log
Created May 10, 2011
assertion failure in mongo configd v1.8.1
View config.log
Tue May 10 13:58:21 [conn5] CMD fsync: sync:1 lock:0
Tue May 10 13:58:21 [conn5] fsync from getlasterror
Tue May 10 13:58:21 [conn5] CMD fsync: sync:1 lock:0
Tue May 10 13:58:21 [conn5] fsync from getlasterror
Tue May 10 13:58:22 [conn1] CMD fsync: sync:1 lock:0
Tue May 10 13:58:22 [conn1] fsync from getlasterror
Tue May 10 13:58:22 [conn1] CMD fsync: sync:1 lock:0
Tue May 10 13:58:22 [conn1] fsync from getlasterror
Tue May 10 13:58:22 [snapshotthread] Assertion failure _newer._created > _older._created db/stats/snapshots.cpp 39
0x54e8de 0x55f971 0x5f6dbb 0x5f825d 0x542deb 0x5446a4 0x8b6a40 0x7f213d25365d 0x7f213c848e1d
@bwaldvogel
bwaldvogel / server 1
Created Mar 17, 2011
mongodb config server logfiles
View server 1
Thu Mar 17 19:03:41 [snapshotthread] cpu: elapsed:4000 writelock: 0%
Thu Mar 17 19:03:45 [snapshotthread] cpu: elapsed:4000 writelock: 0%
Thu Mar 17 19:03:48 [conn47] CMD fsync: sync:1 lock:0
Thu Mar 17 19:03:48 [conn47] fsync from getlasterror
Thu Mar 17 19:03:48 [conn47] CMD fsync: sync:1 lock:0
Thu Mar 17 19:03:48 [conn47] fsync from getlasterror
Thu Mar 17 19:03:49 [snapshotthread] cpu: elapsed:4000 writelock: 0%
Thu Mar 17 19:03:50 [conn47] CMD fsync: sync:1 lock:0
Thu Mar 17 19:03:50 [conn47] fsync from getlasterror
Thu Mar 17 19:03:50 [conn49] CMD fsync: sync:1 lock:0
View mongos.log
Thu Mar 17 18:16:53 [mongosMain] connection accepted from 192.168.246.51:37862 #28
Thu Mar 17 18:16:53 [mongosMain] connection accepted from 192.168.246.51:37863 #29
Thu Mar 17 18:16:53 BackgroundJob starting:
Thu Mar 17 18:16:53 [conn29] setShardVersion rs1 rs1/192.168.246.120,192.168.246.121 de.sku { setShardVersion: "de.sku", configdb: "192.168.246.120:27217,192.168.246.121:27217,192.168.246.123:27217", version: Timestamp 159000|0, serverID: ObjectId('4d824134e15129f1e5e5ab01'), shard: "rs1", shardHost: "rs1/192.168.246.120,192.168.246.121" } 0xb5d7c0
Thu Mar 17 18:16:53 [conn29] setShardVersion success!
Thu Mar 17 18:16:53 BackgroundJob starting:
Thu Mar 17 18:16:53 [conn29] setShardVersion rs2 rs2/192.168.246.122,192.168.246.123 de.sku { setShardVersion: "de.sku", configdb: "192.168.246.120:27217,192.168.246.121:27217,192.168.246.123:27217", version: Timestamp 159000|3, serverID: ObjectId('4d824134e15129f1e5e5ab01'), shard: "rs2", shardHost: "rs2/192.168.246.122,192.168.246.123" } 0
You can’t perform that action at this time.