| // ==UserScript== | |
| // @name Tinder Deblur | |
| // @namespace Violentmonkey Scripts | |
| // @match https://tinder.com/* | |
| // @grant none | |
| // @version 1.4 | |
| // @author Tajnymag | |
| // @downloadURL https://raw.githubusercontent.com/tajnymag/tinder-deblur/main/tinder.user.js | |
| // @description Simple script using the official Tinder API to get clean photos of the users who liked you | |
| // ==/UserScript== |
Тестовое задание можно выполнить на любом веб-фреймворке (django/flask/pyramid/falcon/aiohttp/sanic) и прислать нам ссылку на репозиторий, либо архив с вашим кодом и документацией по нему. Имейте в виду, что выбранных вами библиотек может не быть на компьютере проверяющего, поэтому укажите все зависимости в отдельном файле (requirements/Pipfile). Если вы достаточно хорошо знакомы с Docker, то можете написать docker-compose конфиг и упаковать приложение в контейнер, где все необходимое уже будет установлено, а ваш код собран и готов к запуску. Это идеальный вариант.
После проверки задания мы обязательно сообщим вам о нашем решении.
| from aiohttp import web | |
| async def handle(request): | |
| response = web.StreamResponse( | |
| status=200, | |
| reason='OK', | |
| headers={'Content-Type': 'text/plain'}, | |
| ) | |
| await response.prepare(request) |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
| """Example to cancel a set of asyncio coroutines (futures), | |
| using one coroutine to signal the event loop to stop. | |
| """ | |
| import asyncio | |
| import logging | |
| from datetime import datetime | |
| from concurrent.futures import CancelledError |
| from django.core.management.commands.shell import Command as ShellCommand | |
| import os | |
| class Command(ShellCommand): | |
| shells = ShellCommand.shells.append('ptpython') | |
| def ptpython(self): | |
| try: | |
| # old ptpython |