Skip to content

Instantly share code, notes, and snippets.

@hariharan-uno
hariharan-uno / mazesolver.go
Last active January 3, 2016 01:59
Maze solver in Go
package main
import (
"fmt"
"strconv"
"strings"
)
type Maze struct {
x [5][5]int
@hariharan-uno
hariharan-uno / Installation
Created November 10, 2013 16:13
Elastic Search with MySQL
First extract Elastic Search from tarball. (Make sure you are running the latest java version)
Then cd into the folder and type:
bin/plugin -install river-jdbc -url http://bit.ly/1iovWV9
Get the latest version of the JDBC river for elastic search from https://github.com/jprante/elasticsearch-river-jdbc ( or from the url above)
Download a JDBC driver jar from your vendor's site (here MySQL) and put the jar into the folder of the plugin $ES_HOME/plugins/river-jdbc.
For MySQL, the JDBC driver can be obtained from http://dev.mysql.com/downloads/connector/j/
import unittest
from pyramid import testing
from paste.deploy.loadwsgi import appconfig
from webtest import TestApp
from mock import Mock
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from app.db import Session