Skip to content

Instantly share code, notes, and snippets.

View bwaldvogel's full-sized avatar

Benedikt Waldvogel bwaldvogel

View GitHub Profile
MongoDB shell version: 1.6.5
connecting to: 192.168.236.120:27017/admin
> db.runCommand("connPoolStats")
{
"hosts" : {
"192.168.236.120:27217,192.168.236.121:27217,192.168.236.123:27217" : {
"available" : 1,
"created" : 1
}
},
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
@bwaldvogel
bwaldvogel / server 1
Created March 17, 2011 18:13
mongodb config server logfiles
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
@bwaldvogel
bwaldvogel / config.log
Created May 10, 2011 13:24
assertion failure in mongo configd v1.8.1
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 / gist:1007776
Created June 4, 2011 10:12
mongodb 1.8.1 crash
We couldn’t find that file to show.
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 / update_hyperopt_db.py
Last active December 18, 2015 23:18
Script to update hyperopt jobs database for adding a new hyperparameter. See https://github.com/jaberg/hyperopt/issues/136
#!/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__":
@bwaldvogel
bwaldvogel / bh1750.py
Last active January 8, 2017 15:25 — forked from oskar456/bh1750.py
BH1750 python library
#!/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 / BeanSerializerFactoryWithGlobalIncludeDefaults.java
Created August 27, 2018 15:25
Workaround for Jackson’s global inclusion behaviour change in 2.8.3
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 / fill_depth.py
Created October 8, 2013 22:13
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/
#!/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