Skip to content

Instantly share code, notes, and snippets.

@s-mage
s-mage / analyze.rb
Last active December 19, 2015 08:29
mraztem -- bad copy of mystem with ruby and sqlite.
#!/usr/bin/env ruby
# encoding: utf-8
require 'sequel'
require 'msgpack'
require 'benchmark'
require 'ruby-prof'
require 'logger'
def analyze(word)
@s-mage
s-mage / video2mathcad.cpp
Created March 12, 2013 15:43
Pornodance with openCV and mathcad possibility tu create user DLL. I don't know, how to compile it in windows.
#include "MCADINCL.H"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
// Reading frame and convert it into MathCad matrix(complexarray).
//
LRESULT video2MathCad(COMPLEXARRAY * const result, const char * path_to_video,
const int frame_number)
{
CvCapture* capture = cvCreateFileCapture(path_to_video);
@s-mage
s-mage / db_create.rb
Last active October 11, 2015 22:58
Scrzy classifier. Looks bad, works bad, I need to remake it.
#encoding: utf-8
require 'sequel'
def create_model
DB = Sequel.sqlite('aw.db')
DB.create_table(:authors) do
#creating table of authors
primary_key :id, type: Integer, index: true
String :name, unique: true