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
ALLOWED_HOSTS = ['*'] | |
AUTH_PASSWORD_VALIDATORS = [{'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'}, {'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'}, {'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'}, {'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'}] | |
BASE_DIR = PosixPath('/app') ### | |
CONCURRENCY_AUTO_CREATE_TRIGGERS = True ### | |
CONCURRENCY_CALLBACK = 'concurrency.views.callback' ### | |
CONCURRENCY_ENABLED = True ### | |
CONCURRENCY_FIELD_SIGNER = 'concurrency.forms.VersionFieldSigner' ### | |
CONCURRENCY_HANDLER409 = 'concurrency.views.conflict' ### | |
CONCURRENCY_MANUAL_TRIGGERS = False ### | |
CONCURRENCY_POLICY = 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
2022-10-31 06:26:42,289 ERROR [Timer-Driven Process Thread-9] o.a.nifi.processors.standard.ExecuteSQL ExecuteSQL[id=184880c5-0184-1000-2f62-2cc2fb99ff55] Failed to process session due to java.lang.AbstractMethodError; Processor Administratively Yielded for 1 sec: java.lang.AbstractMethodError | |
java.lang.AbstractMethodError: null | |
at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833) | |
at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:897) | |
at org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:270) | |
at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:630) | |
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:118) | |
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:665) | |
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.jav |
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
CREATE OR REPLACE PROCEDURE CREATE_TABLE_TRANSFORMED_DATA() | |
LANGUAGE 'plpgsql' | |
AS $$ | |
CREATE TABLE IF NOT EXISTS public.transformed_data | |
( | |
value_timestamp timestamp without time zone NOT NULL, | |
CONSTRAINT transformed_data_pkey PRIMARY KEY (value_timestamp) | |
); | |
DECLARE names ARRAY; |
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
version: '3.4' | |
services: | |
postgres: | |
env_file: .env | |
container_name: 'postgres_database' | |
image: postgres:12.3 | |
shm_size: '256m' | |
volumes: | |
- db_data:/var/lib/postgresql/data |
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
#-*- coding: utf-8 -*- | |
import copy | |
import json | |
import monotonic | |
class MyEncoder(json.JSONEncoder): | |
def default(self, obj): | |
return obj.__dict__ |
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
user nginx; | |
worker_processes 2; | |
events { | |
worker_connections 4096; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
client_max_body_size 100m; |
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
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_FT_DELETED' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_METRICS' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' | |
2022-08-13 08:11:14 1 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' |
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
def parsing_one_group(url: str) -> Dict[str, list[str]]: | |
''' | |
Парсинг одной группы по букве. | |
Возвращает список животных в словаре | |
{"А": "Аардоникс"} | |
''' | |
page = requests.get(url).text | |
soup = BeautifulSoup(page, 'lxml') | |
group = soup.find(id='mw-pages').find('div', class_='mw-category-group') | |
letter = group.find('h3').text |
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
def nace_childs(data, parent=''): | |
return list(filter(lambda x: x['Parent'] == parent, data)) | |
def nace_code_tree(data, parent='', max_level=4): | |
nodes = nace_childs(data, parent) | |
for node in nodes: | |
if node['Level'] < max_level: | |
childs = nace_code_tree(data, node['Code'], max_level) | |
else: |
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
[ | |
{ | |
"Level": 1, | |
"Code": "A", | |
"Parent": "", | |
"Description": "PRODUCTS OF AGRICULTURE, FORESTRY AND FISHING" | |
}, | |
{ | |
"Level": 2, | |
"Code": "1", |
NewerOlder