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
#!/usr/bin/env python | |
""" | |
This command line utility enables you to easily create presigned | |
urls for uploading files. This can be usdeful for running on | |
remote machines without risking to copy over your credentials. | |
Filip Dobrovolny <[email protected]> 2020 | |
""" | |
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
epoll_pwait(3, [{EPOLLIN, {u32=21, u64=21}}], 1024, 1000, NULL, 8) = 1 | |
accept4(21, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = 22 | |
mprotect(0x9e021c04000, 503808, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021c84000, 503808, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021e84000, 503808, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021f04000, 503808, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021f84000, 503808, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021e04000, 86016, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021d84000, 86016, PROT_READ|PROT_WRITE) = 0 | |
mprotect(0x9e021d04000, 86016, PROT_READ|PROT_WRITE) = 0 |
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
<Match Id="21489630" Name="Liverpool - Tottenham" MatchDate="2019-06-01T21:00:00" HasLiveMatch="false" HasVideoStream="false"> | |
<Teams> | |
<Team Id="4324" Name="Liverpool"/> | |
<Team Id="115375" Name="Tottenham"/> | |
</Teams> | |
<Bets> | |
<Bet Id="21489630" Info="307" TypeId="1" Name="Zápas" Note="finále / Madrid"> | |
<Odds Id="68525071" Name="1">1.98</Odds> | |
<Odds Id="68525072" Name="0">3.6</Odds> | |
<Odds Id="68525073" Name="2">4.05</Odds> |
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
"""Pass multiple parametrs into Django filter. | |
Inspired by http://stackoverflow.com/a/24402622/2629036. | |
By this filters you can chain as many variables into parametrs as you like. | |
You can even make different lengths for one filter. | |
WARNING: You have to apply n_chain_end filter at the end of the n_chains. | |
Thanks to this the intial var can also be tupple. |
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 re | |
from django import template | |
from django.conf import settings | |
register = template.Library() | |
ALLOWABLE_VALUES = ("CONSTANT_NAME_1", "CONSTANT_NAME_2", "template_\w*") | |