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
""" | |
Settings for root logger. | |
Log messages will be printed to console and also to log file (rotated, with | |
specified size). All log messages from used libraries will be also handled. | |
Three approaches for defining logging settings are used: | |
1. using logging classes directly (py25+, py30+) | |
2. using fileConfig (py26+, py30+) | |
3. using dictConfig (py27+, py32+) | |
Choose any variant as you like, but keep in mind python versions, that |
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
# Divide list into chunks containing n element | |
def divide_chunks(l, n_elements): | |
for i in range(0, len(l), n_elements): | |
yield l[i:i + n_elements] | |
if __name__ == "__main__": | |
n = [1,2,3,4,5,6,7,8,9,10,12,13,14,15] | |
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 asyncio | |
import random | |
q = asyncio.Queue() | |
async def producer(num): | |
while True: | |
await q.put(num + random.random()) | |
await asyncio.sleep(random.random()) |
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
{"lastUpload":"2021-05-03T08:38:29.605Z","extensionVersion":"v3.4.3"} |
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
REMOVE CONTENT-LENGTH -- | |
POST -- | |
HTML SRC -- | |
<div class="row featurette"> | |
<div class="col-md-12"> | |
<h2 class="featurette-heading">Plugin Upload.<span class="text-muted"> Admins Only!</span></h2> | |
<p class="lead">Upload new plugins to include on this status page using the upload form below.</p> | |
<form action="addon-upload.php" method="POST" enctype="multipart/form-data"> | |
<input type="file" name="addon" /> |