Skip to content

Instantly share code, notes, and snippets.

View generall's full-sized avatar
📡

Andrey Vasnetsov generall

📡
View GitHub Profile
// 3 -> 1 CC
//Найти последний символ
2q1->2q1R
1q1->1q1R
0q1->0q1R
Bq1->Bq2L // Нашли последний символ, встали на него и начинаем вычитание
//Вычесть 1 из троичного числа
2q2->1q3R // Прибавление 1 к единичному числу
@generall
generall / load_from_mystem.cpp
Last active August 29, 2015 13:57
load from mystem
void CCorpus::loadWithMystem(const std::string& fname)
{
std::system(("./mystem -e UTF-8 -n -l -i -w " + fname + " > " + fname + ".m").c_str());
std::ifstream from_mystem((fname + ".m").c_str());
std::string line;
std::string temp;
while (std::getline(from_mystem, line))
{
@generall
generall / .zshrc
Last active August 29, 2015 14:19
My .zshrc
# загружаем дефолтный профиль оболочки
source /etc/profile
#
# тут немного всякой хери, смысл которой я сам не особо понимаю
#
# Use hard limits, except for a smaller stack and no core dumps
unlimit
limit stack 8192
@generall
generall / Makefile
Last active October 16, 2015 11:50
Latex + biblatex + biber sublime compilation
# You want latexmk to *always* run, because make does not have all the info.
# Also, include non-file targets in .PHONY so they are run regardless of any
# file of the given name existing.
FNAME = ref
.PHONY: $(FNAME).pdf all no_bible clean
# The first rule in a Makefile is the one executed by default ("make"). It
@generall
generall / readme.md
Last active January 19, 2016 15:35
python VS ruby in examples

##python vs ruby

###Выборка элементов из массива

ruby

arr[n..m]
@generall
generall / .vimrc
Last active February 6, 2016 20:56
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required

Keybase proof

I hereby claim:

  • I am generall on github.
  • I am generall (https://keybase.io/generall) on keybase.
  • I have a public key whose fingerprint is 5890 9DD1 1207 59ED 61EE 49E6 020F A930 F691 939C

To claim this, I am signing this object:

@generall
generall / init-scala.sh
Last active August 13, 2016 09:44 — forked from maciej/init-scala.sh
Bootstrap a Scala project (with SBT + IDEA)
#!/bin/bash
PROJECT_NAME="$1"
SCALA_VERSION="2.11.8"
SCALATEST_VERSION="3.0.0"
mkdir $PROJECT_NAME
cd $PROJECT_NAME
cat > build.sbt << EOF
# Common analizer interface
class TSemanticAnaliser
def analise_text(text)
# returns double
end
def learn(array_of_texts)
@generall
generall / twitter_bot
Created January 15, 2017 11:53
Twitter-bot
Twitter bot for automated detection and re-twitting influential thematic posts.
===
Assume that thematic = `programming`
##Stage 1
* Prepare examples of programmer's twitter accounts and other ones for representativity
* Create graph of twitter accounts which seems to contain programmers thematic
* Starting from small amount of truly programmer's accounts collect all of it's followers and following accounts
* Add in queue post perspective ones based on