Skip to content

Instantly share code, notes, and snippets.

View honzakral's full-sized avatar

Honza Král honzakral

View GitHub Profile
"""
This is a simple benchmark that tests the performance of several
locking implementations. Each example implements a connection
pool that provides `get_connection()` to retrieve a connection
from the pool and `release()` to return a connection back to the
pool.
The `test()` function creates an instance of `pool_class` and
creates `num_threads` `threading.Thread` instances that simply call
`pool.get_connection()` and `pool.release()` repeatedly until
# -*- coding: cp1250 -*-
class Halda():
"""halda - dokumentace
TYP 1A na vrcholu nejmenší hodnota, prosté položky
TYP 1B na vrcholu nejmenší hodnota, strukturované položky
TYP 2A na vrcholu největší hodnota, prosté položky
TYP 2B na vrcholu největší hodnota, strukturované položky
"""
### 0 Konstrukční procedury
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "\"ruby\" OR \"rubi\" OR \"rubz\"",
"default_operator": "or"
}
}
],