Skip to content

Instantly share code, notes, and snippets.

@zarzen
zarzen / logistic_sgd_notes.py
Created Mar 25, 2015
Theano教程阅读——随机梯度的逻辑回归代码
View logistic_sgd_notes.py
# -*- 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
zarzen / basic.org
Created Jul 10, 2015
Emacs Learning
View basic.org

Under Terminal

multi term

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

@zarzen
zarzen / cmd.org
Last active Nov 20, 2015
windows cmd tips
View cmd.org
View SementicSegmentation.org

resource

http://cs.nyu.edu/~ccouprie/code.html

cpp implementation

https://github.com/cvjena/cn24

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.

http://ivrl.epfl.ch/research/superpixels

这个是用来取super pixel的

http://www.codeproject.com/Articles/751744/Image-Segmentation-using-Unsupervised-Watershed-Al

@zarzen
zarzen / tools_list.org
Last active Dec 14, 2015
Tools List for Productive and Interesting
View tools_list.org
@zarzen
zarzen / create_git_repo.org
Last active Sep 3, 2021
Create a Git repo base on windows shared folder
View create_git_repo.org

Reference

http://elegantcode.com/2011/06/18/git-on-windows-creating-a-network-shared-central-repository/

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
zarzen / convert2camel.org
Created Nov 4, 2015
convert dropwizard application to camel restlet application
View convert2camel.org

最近的工作是把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
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',