This file contains hidden or 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 time as tm | |
spams = {} | |
msgs = 4 # Messages in | |
max = 5 # Seconds | |
ban = 300 # Seconds | |
def is_spam(user_id): | |
try: | |
usr = spams[user_id] | |
usr["messages"] += 1 |
This file contains hidden or 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
MIT License | |
Copyright (c) 2020 | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
This file contains hidden or 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
https://d.flashscore.com/x/feed/ul_4_2 | |
SA÷4¬~AA÷GMR89zCC¬AL÷{"1":[{"TVI":229,"BU":"http:\/\/www.tv3sport.dk\/","BN":"TV3 Sport (Den)"},{"TVI":527,"BU":"https:\/\/online.adservicemedia.dk\/cgi-bin\/click.pl?pid=18630&cid=4255&productGroup=sport","BN":"Viaplay (Den)"},{"TVI":528,"BU":"https:\/\/online.adservicemedia.dk\/cgi-bin\/click.pl?pid=18632&cid=4056&productGroup=sport","BN":"Viaplay (Fin)"},{"TVI":529,"BU":"https:\/\/online.adservicemedia.dk\/cgi-bin\/click.pl?pid=18629&cid=4256&productGroup=sport","BN":"Viaplay (Nor)"},{"TVI":526,"BU":"https:\/\/online.adservicemedia.dk\/cgi-bin\/click.pl?pid=18631&cid=4254&productGroup=sport","BN":"Viaplay (Swe)"},{"TVI":633,"BU":"https:\/\/www.viasat.fi","BN":"Viasat Hockey (Fin)"},{"TVI":247,"BU":"http:\/\/www.viasat.se","BN":"Viasat Hockey (Swe)"},{"TVI":631,"BU":"https:\/\/www.viasat.fi","BN":"Viasat Urheilu"},{"TVI":568,"BU":"https:\/\/tv.nova.cz\/program","BN":"Nova Sport 2 (Cze)"}],"2":[{"BU":"\/bookmaker\/16\/?from=live-streaming&sport=4","IU":"\/res\/image\/d |
This file contains hidden or 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
docker ps --size --format 'table{{.Names}}\t {{.Size}} \t{{.Image}}' | |
docker build -t name:latest . | |
docker volume create vssd | |
docker run --rm -d -v vssd:/usr/src/data --name parsercsgo --network=mynet pythoncsgo:latest | |
docker run --name csgowebapp -p 8010:5000 --mount type=volume,source=vssd,destination=/home/app/data,readonly csgoweb:latest |
This file contains hidden or 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
var all = document.querySelectorAll(".downloadButton.qweqwe"); | |
var all = document.querySelectorAll(".audio_row__inner"); | |
for (var i = 0; i < 10; i++) { | |
var res = all[i].querySelector("._audio_row__duration").innerHTML; | |
if (res.length === 4) | |
{ | |
var btn = all[i].querySelector(".downloadButton.qweqwe"); | |
btn.click(); |
This file contains hidden or 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or 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
<p>{loadposition yandex}</p>\n<script type="text/javascript">\n\t // Map appearance\n\t var mmsi="\1";\n\t var imo="\2";\n\t var show_track=tue;\n</script>\n<li>IMO/MMSI (идентификационный номер станции): \2 / \1</li> |
This file contains hidden or 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 | |
import time | |
def getChar(): | |
# figure out which function to use once, and store it in _func | |
if "_func" not in getChar.__dict__: | |
try: | |
# for Windows-based systems | |
import msvcrt # If successful, we are on Windows | |
getChar._func=msvcrt.getch |
This file contains hidden or 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
from bs4 import BeautifulSoup | |
html = ''' | |
<div class="price-v2 " data-sell-price-w-vat="29.10"> | |
<div class="price"> | |
<sub>€</sub> | |
29 | |
<sup>10</sup> | |
</div> | |
</div> | |
''' |
This file contains hidden or 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
Правила чата https://t.me/py_prog | PyProg | |
1. Условия действия правил чата | |
1.1 Пользователи, заходя в чат, принимают на себя добровольные обязательства беспрекословно соблюдать нижеперечисленные правила. | |
1.2 Незнание правил не освобождает от ответственности за их нарушения, убедительно рекомендуем с ними ознакомиться. | |
2. В чате разрешается | |
2.1 Общаться, общаться и ещё раз общаться, а также совершать любые другие действия не нарушающие п3. |