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
#irkutsk OR #twirkutsk OR #irkru OR #Иркутск -HeepUriah -kareetc64 -BEM_Irkutsk -OWS633 -OWS337 -OWS334 -SimonDeMonfor -naidikvartiru -deSAD -myvotefactor -Dezirtir -RomanovPP -Ostaked -2Vitel -er_Irkutsk -avtonom_org -OWS557 -vumatin -optimumirk -inkadoru -er_Irkutsk -UDACHA_MARKET -deloirk -RRABBOTTA -BystroZaim -IrkutskDate -tvoemoehelp -irkutskyoutube -irk_fan_shop |
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
requests.put('http://localhost:9200/site/', data=json.dumps({ | |
'settings': { | |
'analysis': { | |
'analyzer': { | |
'ru': { | |
'type': 'custom', | |
'tokenizer': 'standard', | |
"filter": ['lowercase', 'russian_morphology', 'english_morphology', 'ru_stopwords'], | |
}, | |
}, |
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
database=> SELECT COUNT(*) FROM auth_user; | |
count | |
------- | |
1076 | |
(1 row) | |
database=> EXPLAIN SELECT COUNT(*) FROM auth_user WHERE is_staff = False; | |
QUERY PLAN | |
------------------------------------------------------------------- | |
Aggregate (cost=26.80..26.81 rows=1 width=0) |
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
mysql> SELECT COUNT(*) FROM auth_user; | |
+----------+ | |
| COUNT(*) | | |
+----------+ | |
| 48158 | | |
+----------+ | |
1 row in set (0.00 sec) | |
mysql> EXPLAIN SELECT COUNT(*) FROM auth_user WHERE is_staff = 1; | |
+----+-------------+-----------+------+---------------+------+---------+------+-------+-------------+ |
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
from __future__ import print_function | |
import sys | |
import timeit | |
l = list(range(10)) | |
t = tuple(l) | |
def func(obj): | |
r = list(range(1000)) | |
for i in r: |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Page Rank CSV sorter | |
Usage: | |
pr_sort.py /path/to/csv-file.csv [/path/to/output-file.csv] | |
Output filename is not required, and if not supplied, output goes to the stdout. | |
""" |
NewerOlder