Skip to content

Instantly share code, notes, and snippets.


Zhen Zhang zarzen

View GitHub Profile
zarzen /
Created Mar 25, 2015
# -*- coding: utf-8 -*-
This tutorial introduces logistic regression using Theano and stochastic
gradient descent.
Logistic regression is a probabilistic, linear classifier. It is parametrized
by a weight matrix :math:`W` and a bias vector :math:`b`. Classification is
done by projecting data points onto a set of hyperplanes, the distance to
which is used to determine a class membership probability.
zarzen /
Created Jul 10, 2015
Emacs Learning

Under Terminal

multi term

multi term环境下利用`C-z`来进入evil-mode,这样就可以通过evil-mode的光标移动来查看历史

zarzen /
Last active Nov 20, 2015
windows cmd tips


cpp implementation

CN24 is a complete semantic segmentation framework using fully convolutional networks. It supports a wide variety of platforms (Linux, Mac OS X and Windows) and libraries (OpenCL, Intel MKL, AMD ACML…) while providing dependency-free reference implementations. The software is developed in the Computer Vision Group at the University of Jena.

这个是用来取super pixel的

zarzen /
Last active Dec 14, 2015
Tools List for Productive and Interesting
zarzen /
Last active Jul 20, 2022
Create a Git repo base on windows shared folder


Step 1: Go to the remote shared folder

using `pushd` command

pushd \\remoteServer\git\Share\Folder\Path

Step 2: Create a folder to store repository

zarzen /
Created Nov 4, 2015
convert dropwizard application to camel restlet application

最近的工作是把dropwizard的一个提供restful API的程序转化成能够在jboss-fuse中运行的,利用camel restful DSL提供restful API的 程序。一开始没什么思路,不过后来想想就把dropwizard start application的那部分去掉,而jersey提供的那些restful API注解去掉, 用camel搞个route指向对应的logic bean就可以了。 不过其中把新的,去掉了dropwizard包装的程序运行在fuse中需要把,程序依赖的包安装到fuse容器中,并且需要能够被引用的到。也就是 安装进去的bundle需要export对应的包,给别的java程序使用。安装jdbi的bundle的时候出现了问题。这个jar并不是一个osgi-bundle的, 没有定义需要export的packages。我手动改了MF文件也没用。后来被告知放到deploy目录下去。然而我把那个改了MF的jar放到那儿并没有被 自动安装到fuse中。另一没有修改的,在第二天的时候是成功的安装了上去。而且export了所有的packages。这个可能是deploy的特别的地方。 但是既然这样可以,那么fuse必然提供了一种机制,可以在MF文件之外指定需要export的packages。

zarzen / login.js
Created Dec 22, 2015
passport local strategy
View login.js
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
module.exports = (function () {}(
return {
configureApp : function (app){
passport.use(new LocalStrategy(function (username, password, done) {
process.nextTick(function() {
done(null, {
userName: 'admin',