Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
open for offers

Sergey Loguntsov loguntsov

💭
open for offers
  • Russia, Saint-Petersburg
View GitHub Profile
View test_pb.erl
%% -*- 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]).
View huify.erl
-module(huify).
-export([huify/1]).
-define(cl_vowels(),
[, , , , , , , , , ]).
-define(cl_consonants(),
[, , , , , , , , , , $п, , , , , , , ,
, ]).
-define(cl_etc(),
View exporter.ex
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"
]
View readme.md

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:

View gist:e258a6112e966f98a7329f0325732a66
/* description: Parses end executes mathematical expressions with strings. */
/* lexical grammar */
%lex
%options case-insensitive
%%
\/\/(.*)\n /* 'COMMENT' */
\/\*(.|\n)*?\*\/ /* 'COMMENT' */
View gist:83b2276b7a855a7648a812e61e1c5a6e
/* description: Parses end executes mathematical expressions with strings. */
/* lexical grammar */
%lex
%options case-insensitive
%%
\/\/(.*)\n /* 'COMMENT' */
\/\*(.|\n)*?\*\/ /* 'COMMENT' */
View gist:e63c18ddbdc75937b3522ff2bb7c048c

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

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

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

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

// ОТЧЕТ ПО ГРУППЕ "Фактор потери веса"
/*
@loguntsov
loguntsov / stab.py
Last active Jan 23, 2018
Stabilization of white paper inside image. It will reduce perspective distortion also. For all questions pls write me on email: loguntsov@gmail.com
View stab.py
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):
View merge.erl
-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(),
View gist:da467cc9ad5da9f32ff7
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.