Skip to content

Instantly share code, notes, and snippets.

View theotheo's full-sized avatar
🌴
On vacation

theotheo

🌴
On vacation
View GitHub Profile
@theotheo
theotheo / Imprecity_ru.ipynb
Last active February 1, 2019 09:17
Imprecity.ru
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theotheo
theotheo / create.sql
Created January 21, 2019 14:37
corpus
CREATE TABLE author (
id INTEGER NOT NULL,
last VARCHAR,
first VARCHAR,
middle VARCHAR,
sex VARCHAR(1),
birth_year INTEGER,
death_year INTEGER,
PRIMARY KEY (id),
CONSTRAINT sex CHECK (sex IN ('M', 'F'))
@theotheo
theotheo / main.cpp
Created January 10, 2019 14:35
Reorder matrix
#include <iostream>
int main()
{
int n = 5;
int aa[5][5];
int a[5][5] = {
{0, 1, 1, 1, 1},
{1, 1, 0, 1, 1},
{1, 0, 1, 1, 1},
def extract_ref(sel):
refs = []
for bibl in sel.xpath("//tei:biblStruct[@xml:id]"):
ref = {}
ref['title'] = bibl.xpath('./tei:analytic/tei:title/text()').get()
ref['date'] = bibl.xpath('./tei:monogr/tei:imprint/tei:date/@when').get()
ref['persons'] = []
for pers in bibl.xpath('./tei:monogr/tei:author'):
@theotheo
theotheo / data
Created December 18, 2018 23:50
arctic_ru 25 topics
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.04955554 0.0 0.0 0.0 0.6993066 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.25113785 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.54299694 0.123020165 0.0 0.0 0.0 0.0 0.33398297 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.38885128 0.0 0.0 0.0 0.0 0.07866551 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5324832 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6601967 0.26808214 0.0 0.0 0.0 0.0 0.07172108 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.015733162 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.03239116 0.27915755 0.0 0.0 0.0 0.0 0.6574591 0.0 0.0 0.0 0.0 0.015259074 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.10875621 0.0 0.0 0.0 0.0 0.865403 0.0 0.0 0.02584082 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5731553 0.0 0.0 0.0 0.0 0.0 0.42684478 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.6168834 0.0 0.0 0.0 0.0 0.32411313 0.0 0.0 0.0 0
@theotheo
theotheo / data
Created December 18, 2018 23:41
arctic_ru 25 topics
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.04955554 0.0 0.0 0.0 0.6993066 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.25113785 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.54299694 0.123020165 0.0 0.0 0.0 0.0 0.33398297 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.38885128 0.0 0.0 0.0 0.0 0.07866551 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5324832 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6601967 0.26808214 0.0 0.0 0.0 0.0 0.07172108 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.015733162 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.03239116 0.27915755 0.0 0.0 0.0 0.0 0.6574591 0.0 0.0 0.0 0.0 0.015259074 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.10875621 0.0 0.0 0.0 0.0 0.865403 0.0 0.0 0.02584082 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5731553 0.0 0.0 0.0 0.0 0.0 0.42684478 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.6168834 0.0 0.0 0.0 0.0 0.32411313 0.0 0.0 0.0 0
@theotheo
theotheo / data
Created December 18, 2018 23:36
arctic_ru 25 topics
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.04955554 0.0 0.0 0.0 0.6993066 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.25113785 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.54299694 0.123020165 0.0 0.0 0.0 0.0 0.33398297 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.38885128 0.0 0.0 0.0 0.0 0.07866551 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5324832 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6601967 0.26808214 0.0 0.0 0.0 0.0 0.07172108 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.015733162 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.03239116 0.27915755 0.0 0.0 0.0 0.0 0.6574591 0.0 0.0 0.0 0.0 0.015259074 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.10875621 0.0 0.0 0.0 0.0 0.865403 0.0 0.0 0.02584082 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5731553 0.0 0.0 0.0 0.0 0.0 0.42684478 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.6168834 0.0 0.0 0.0 0.0 0.32411313 0.0 0.0 0.0 0
@theotheo
theotheo / data
Created December 18, 2018 23:34
arctic_ru tfidf
tfidf.tsv
@theotheo
theotheo / data
Created December 18, 2018 23:34
arctic_ru 25 topics
theta.tsv
@theotheo
theotheo / data
Created December 18, 2018 23:27
arctic_ru tfidf
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.04955554 0.0 0.0 0.0 0.6993066 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.25113785 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.54299694 0.123020165 0.0 0.0 0.0 0.0 0.33398297 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.38885128 0.0 0.0 0.0 0.0 0.07866551 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5324831999999999 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6601967 0.26808214 0.0 0.0 0.0 0.0 0.07172108 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.015733162 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.03239116 0.27915755 0.0 0.0 0.0 0.0 0.6574591 0.0 0.0 0.0 0.0 0.015259074 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.10875621 0.0 0.0 0.0 0.0 0.865403 0.0 0.0 0.02584082 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5731553 0.0 0.0 0.0 0.0 0.0 0.42684478 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.6168834 0.0 0.0 0.0 0.0 0.32411313 0.0