This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'uri' | |
require 'nokogiri' | |
Example = Struct.new(:text, :source) | |
def ruscorpora(word) | |
uri = URI('http://search.ruscorpora.ru/download-xml.xml') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[11pt]{letter} | |
\usepackage[a4paper,landscape]{geometry} | |
\usepackage{polyglossia} | |
\setmainlanguage[babelshorthands=true]{russian} | |
\setotherlanguage{english} | |
\defaultfontfeatures{Ligatures=TeX,Mapping=tex-text} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: clean lister latex view | |
clean: | |
latexmk -C -pdf | |
rm -f source.tex | |
lister: | |
./lister.rb | |
latex: | |
latexmk -pdf -pdflatex="xelatex %O %S" listing | |
view: | |
xdg-open listing.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
=begin | |
http://ai.stanford.edu/~chuongdo/papers/em_tutorial.pdf | |
http://stats.stackexchange.com/questions/72774/numerical-example-to-understand-expectation-maximization | |
http://math.stackexchange.com/questions/25111/how-does-expectation-maximization-work | |
http://math.stackexchange.com/questions/81004/how-does-expectation-maximization-work-in-coin-flipping-problem | |
http://www.youtube.com/watch?v=7e65vXZEv5Q | |
=end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
import org.gephi.data.attributes.api.AttributeController | |
import org.gephi.graph.api.GraphController | |
import org.gephi.io.importer.api.EdgeDefault | |
import org.gephi.io.importer.api.ImportController | |
import org.gephi.io.processor.plugin.DefaultProcessor | |
import org.gephi.project.api.ProjectController | |
import org.gephi.statistics.plugin.Degree | |
import org.openide.util.Lookup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rubygems' | |
require 'nokogiri' | |
require 'csv' | |
Dir.mkdir 'opencorpora' unless File.directory? 'opencorpora' | |
buf, flag = '', false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# This program is free software. It comes without any warranty, to | |
# the extent permitted by applicable law. You can redistribute it | |
# and/or modify it under the terms of the Do What The Fuck You Want | |
# To Public License, Version 2, as published by Sam Hocevar. See | |
# http://sam.zoy.org/wtfpl/COPYING for more details. | |
import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# Processor of Link Grammar for Russian output. | |
# | |
class LinkParser::Lexer | |
# This exception raises when link grammar is invalid and Lexer | |
# is unable to understand the output. | |
# | |
class InvalidLinkGrammar < RuntimeError | |
attr_reader :input |
NewerOlder