This file contains 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
#by Anton Lozhkov | |
#pip install conllu tqdm | |
from conllu import parse_incr | |
from tqdm.auto import tqdm | |
import unicodedata | |
def count_roots(tokenlist): | |
return sum(1 for tok in tokenlist if tok['deprel'] == 'root') |
This file contains 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
[tool.poetry] | |
name = "myproject" | |
version = "1.0" | |
description = "" | |
authors = ["Yuri Baburov <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "*" | |
django = "<1.5" | |
psycopg2 = "^2.7" |
This file contains 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
import numpy | |
import matplotlib.pyplot as plt | |
from sklearn.decomposition import PCA | |
def pca(data): | |
return PCA(n_components = 4).fit(data).transform(data) | |
a = numpy.zeros((100,12,12), dtype=numpy.float32) | |
for i in xrange(10): | |
for j in xrange(10): |
This file contains 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
import time | |
import tarantool | |
import msgpack | |
server = tarantool.connect("localhost", 3301) | |
demo = server.space('example') | |
requests = 50000 | |
def run_test(space, value): |
This file contains 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
Начну с описания противоречий, которые вынуждают применять определённые решения. | |
Придуманная мной год назад структура файлов и каталогов не подходит. | |
http://docs.google.com/Doc?id=dfb6ztc2_87cmw6bpfx | |
Потому что хеши не решают проблемы, потому что не учитываются | |
Но обо всём поподробнее: | |
R1 В разных базах данных поддерживается разный набор свойств. | |
E: В базе postgresql есть имя sequence, а в mysql его нет. | |
E: В базе sqlite нет reference, а posgresql и mysql есть. | |
=> хеши будут специфичные для базы данных | |
=> подписывать миграции хешами нельзя. |
This file contains 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
Начну с описания противоречий, которые вынуждают применять определённые решения. | |
Придуманная мной год назад структура файлов и каталогов не подходит. | |
http://docs.google.com/Doc?id=dfb6ztc2_87cmw6bpfx | |
Потому что хеши не решают проблемы, потому что не учитываются | |
Но обо всём поподробнее: | |
R1 В разных базах данных поддерживается разный набор свойств. | |
E: В базе postgresql есть имя sequence, а в mysql его нет. | |
E: В базе sqlite нет reference, а posgresql и mysql есть. | |
=> хеши будут специфичные для базы данных | |
=> подписывать миграции хешами нельзя. |
This file contains 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
#!/bin/bash | |
cd ~/.wine/drive_c/Program\ Files/2gis/3.0/ | |
LC_ALL=ru_RU.KOI8-R | |
LANG=ru_RU.UTF-8 | |
wine grym.exe |
This file contains 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
class BlogApp(Controller): | |
urls = { # will be deduced automatically | |
/ -> show list of users and blogs | |
/create/blog/ -> add a blog | |
/create/user/ -> add an user | |
/blog/:name/ -> connects to a blog page | |
/user/:name/ -> connects to an user page | |
} | |
ancestors = [ # these two controllers are subobjects |
NewerOlder