Skip to content

Instantly share code, notes, and snippets.

View loguntsov's full-sized avatar
💭
open for offers

Sergey Loguntsov loguntsov

💭
open for offers
  • Russia, Saint-Petersburg
View GitHub Profile
module(simplification).
-compile([export_all]).
zeroA({add,E,{num,0}}) -> E;
zeroA({add,{num,0},E}) -> E;
zeroA(E) -> E.
mulO({mul,E,{num,1}}) -> E;
mulO({mul,{num,1},E}) -> E;
mulO(E) -> E.
-module(merge).
-compile(export_all).
a(N) -> fun() -> [N|a(N+2)] end.
b(N) -> fun() -> [N|b(N+3)] end.
merge({A,B}) ->
[An|AFunc] = A(),
[Bn|BFunc] = B(),
@loguntsov
loguntsov / stab.py
Last active January 23, 2018 19:43
Stabilization of white paper inside image. It will reduce perspective distortion also. For all questions pls write me on email: loguntsov@gmail.com
import cv, cv2, numpy as np
import sys, math as m
import glob, os
def get_new(old):
new = np.ones(old.shape, np.uint8)
cv2.bitwise_not(new,new)
return new
def remove(contour, n):

Язык построения отчетов

ТЕКСТ ВЫДЕЛЕННЫЙ КУРСИВОМ НЕ ЯВЛЯЕТСЯ РЕАЛИЗОВАННЫМ В ДАННОЙ ВЕРСИИ. БУДЕТ РЕАЛИЗАЦИЯ В ДАЛЬНЕЙШЕМ (ЕСЛИ НЕОБХОДИМО)

Предназначен для разработки запросов к трекеру для построения отчетов в различных разрезах.

Пример правил:

// ОТЧЕТ ПО ГРУППЕ "Фактор потери веса"
/*
/* description: Parses end executes mathematical expressions with strings. */
/* lexical grammar */
%lex
%options case-insensitive
%%
\/\/(.*)\n /* 'COMMENT' */
\/\*(.|\n)*?\*\/ /* 'COMMENT' */
/* description: Parses end executes mathematical expressions with strings. */
/* lexical grammar */
%lex
%options case-insensitive
%%
\/\/(.*)\n /* 'COMMENT' */
\/\*(.|\n)*?\*\/ /* 'COMMENT' */

AI WEB

This application provides HTTP way for interaction with other parts of system. For this time it uses websocket connection to utilize real-time events what happens in system. Websocket protocol

All interaction going via websocket and uses JSON-like messages. The common structure of input command:

{ cmd : 'some_command', params_for_command }

The common struсture of response:

defmodule Exporter do
require Logger
def filter(file_from, file_to) do
{ :ok, ets } = :ets.file2tab(file_from)
{ :ok, ets2 } = :ets.file2tab(file_from)
try do
:ets.delete_all_objects ets2
codes = [
:"RqCharMoveStart", :"RqCharMove", :"RqCharMoveStop"
]
-module(huify).
-export([huify/1]).
-define(cl_vowels(),
[$а, $е, $ё, $и, $о, $у, $ы, $э, $ю, $я]).
-define(cl_consonants(),
[$б, $в, $г, $д, $ж, $з, $к, $л, $м, $н, $п, $р, $с, $т, $ф, $х, $ц, $ч,
$ш, $щ]).
-define(cl_etc(),
%% -*- coding: utf-8 -*-
%% @private
%% Automatically generated, do not edit
%% Generated by gpb_compile version 4.14.2
-module(test_pb).
-export([encode_msg/1, encode_msg/2, encode_msg/3]).
-export([decode_msg/2, decode_msg/3]).
-export([merge_msgs/2, merge_msgs/3, merge_msgs/4]).
-export([verify_msg/1, verify_msg/2, verify_msg/3]).