- Чем SQL отличается от NoSQL
- Что такое транзакции?
- Какие типы транзакций бывают?
- Что такое WAL? Как поднимается и восстанавливается база данных после падения?
- Что такое sharding?
- Почему все не используют MongoDb?
- Что такое BigData?
- Что такое CAP?
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
if full: | |
message = BotMessage.objects.get(type='order_message') | |
buttons = message.buttons.all() | |
updated_buttons = { | |
buttons.get('res_good'): dict( | |
type='res_good', | |
price=good_office.pk, | |
item="{}-{}-{}".format(good_office.pk, | |
good_office.branch_office.pk | |
or "", |
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
{'data': {'__schema': {'queryType': {'name': 'Query'}, 'mutationType': {'name': 'Mutation'}, 'subscriptionType': None, 'types': [{'kind': 'OBJECT', 'name': 'Query', 'description': None, 'fields': [{'name': 'User', 'description': None, 'args': [], 'type': {'kind': 'OBJECT', 'name': 'UserType', 'ofType': None}, 'isDeprecated': False, 'deprecationReason': None}, {'name': 'allUser', 'description': None, 'args': [], 'type': {'kind': 'LIST', 'name': None, 'ofType': {'kind': 'OBJECT', 'name': 'UserType', 'ofType': None}}, 'isDeprecated': False, 'deprecationReason': None}], 'inputFields': None, 'interfaces': [], 'enumValues': None, 'possibleTypes': None}, {'kind': 'OBJECT', 'name': 'UserType', 'description': None, 'fields': [{'name': 'firstName', 'description': None, 'args': [], 'type': {'kind': 'SCALAR', 'name': 'String', 'ofType': None}, 'isDeprecated': False, 'deprecationReason': None}, {'name': 'lastName', 'description': None, 'args': [], 'type': {'kind': 'SCALAR', 'name': 'String', 'ofType': None}, 'isDeprecated |
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
{ | |
'data': { | |
'__schema': { | |
'queryType': { | |
'name': 'Query' | |
}, | |
'mutationType': { | |
'name': 'Mutation' | |
}, | |
'subscriptionType': None, |
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
{ | |
'data':{ | |
'__schema':{ | |
'types':[ | |
{ | |
'name':'Query', | |
'fields':[ | |
{ | |
'name':'User' | |
}, |
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 'os' | |
func readFileId(names=[], mode): | |
_ = '' | |
id = -1 | |
for n in names: | |
with os.open(n, 'w') as f: | |
_ += f.read() | |
f.close() | |
print 'default: ' + id + ', actual: ' + _ |
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
^C2018-12-26 12:39:48,288 - root - ERROR - | |
Traceback (most recent call last): | |
File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run | |
return loop.run_until_complete(main) | |
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 560, in run_until_complete | |
self.run_forever() | |
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 528, in run_forever | |
self._run_once() | |
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1728, in _run_once | |
event_list = self._selector.select(timeout) |
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
web_1 | 2018-12-26 14:02:42,287 - asyncio - ERROR - Task was destroyed but it is pending! | |
web_1 | source_traceback: Object created at (most recent call last): | |
web_1 | File "/usr/local/bin/gunicorn", line 11, in <module> | |
web_1 | sys.exit(run()) | |
web_1 | File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run | |
web_1 | WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() | |
web_1 | File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run | |
web_1 | super(Application, self).run() | |
web_1 | File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run | |
web_1 | Arbiter(self).run() |
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
# Тестовое задание для Python-разработчика | |
##Задание: | |
Даны 2 json файла:post.json, в котором находится список постов. | |
```json | |
{ | |
"posts": | |
[ |
OlderNewer