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 pandas as pd | |
from google.oauth2 import service_account | |
# Прописываем адрес к файлу с данными по сервисному аккаунту и получаем credentials для доступа к данным | |
credentials = service_account.Credentials.from_service_account_file( | |
'my-bq-project-225910-6e534ba48078.json') | |
# Формируем запрос и получаем количество вопросов с тегом "pandas", сгруппированные по дате создания | |
query = ''' | |
SELECT DATE(creation_date) as date, COUNT(id) as questions |
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
pip install pandas-gbq | |
conda install pandas-gbq -c conda-forge |
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
<meta name="robots" content="noindex, nofollow"/> |
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
<a href="https://www.aviasales.ru/?marker=XXXXXX.short">авиабилеты</a> |
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
<script> | |
window.location.href = "https://www.aviasales.ru/?marker=XXXXXX.short"; | |
</script> |
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
<script src="https://gist.github.com/seonews-ru/4908b43ac569673be5f3cc4113d69264.js"></script> |
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
$links = parse_ini_file('shortlinks.ini'); | |
if(isset($_GET['l']) && array_key_exists($_GET['l'], $links)){ | |
header('Location: ' . $links[$_GET['l']]); | |
} else{ | |
header('HTTP/1.0 404 Not Found'); | |
echo 'Unknown link.'; | |
} |
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
<script src="https://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
ymaps.ready(function(){ | |
var geolocation = ymaps.geolocation; |
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
urls = [z.rstrip() for z in open('C:\\Users\\iburmistrov\\Documents\\Texts_Analyze\\url_list.txt')] | |
for url in urls: | |
try: | |
response = requests.get(url, timeout=None) | |
except: | |
continue | |
soup = BeautifulSoup(response.content, "html.parser") | |
for pp in soup.select("p"): | |
print(pp.text) |
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
sys.stdout.close() | |
sys.stdout = open("C:\\Users\\UserName\\Documents\\out.txt", "w", encoding="utf-8") |