Skip to content

Instantly share code, notes, and snippets.

View outsmartin's full-sized avatar

Martin Schneider outsmartin

View GitHub Profile
stagepush() {
local current_branch=`git rev-parse --abbrev-ref HEAD`
git checkout staging
git pull
git merge $current_branch -m 'Merged into staging'
class JobSearch
class << self
def create_index
Tire.index self.to_s.downcase do
delete
create mappings: {
job: {
properties: {
id: { type: 'string', index: 'not_analyzed', include_in_all: false},
package org.elasticsearch.index.similarity;
import org.apache.lucene.search.similarities.TFIDFSimilarity;
import org.apache.lucene.index.FieldInvertState;
import org.apache.lucene.util.BytesRef;
/**
* Custom similarity class
*
* @author tanguy
#include <opencv.hpp>
int main ()
{
// Open the file.
cv::Mat image;
image = cv::imread("Img01.jpg");
if (!image.data)
{
printf("Error: Couldn't open the image file.\n");
return 1;
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<fragment
android:id="@+id/searchparamsFragment"
android:name="android.support.v4.app.ListFragment"
android:layout_width="0dp"