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
__version__ = (2, 0, 0) | |
# meta developer: @cofob | |
# requires: git+https://github.com/MarshalX/yandex-music-api@dev eyed3 | |
# meta desc: Module for downloading music from Yandex Music | |
import logging | |
import os | |
import eyed3 |
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 requests | |
from urllib import urlencode | |
token = 'AQAA...' | |
ids = ( | |
(554433, 'site1.ru'), | |
(334455, 'site2.ru'), | |
(443356, 'site3.ru'), | |
) |
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 requests | |
token = 'ya29.Gl1...' | |
res = requests.get('https://www.googleapis.com/adsense/v1.4/reports', | |
params={ | |
'startDate': '2018-02-01', | |
'endDate': '2018-02-28', | |
'currency': 'RUB', | |
'dimension': ['DOMAIN_NAME','MONTH'], |
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 requests | |
from urllib import urlencode | |
token = 'AQAA...' | |
params = ( | |
('oauth_token', token), | |
('period', '365days'), | |
('lang', 'ru'), | |
('level', 'advnet_context_on_site'), |
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 re | |
import pytest | |
def cut_by_re(s): | |
return re.sub(r'\([^)]*$', '', s) | |
def cut_by_state(s): | |
final = '' |
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
# coding: utf8 | |
# https://github.com/python-telegram-bot/python-telegram-bot | |
from telegram.ext import Updater, MessageHandler, CommandHandler, Filters, Job | |
import datetime | |
import logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) | |
log = logging.getLogger(__name__) |
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 fabric.api import * | |
from fabric.contrib.files import exists, append, upload_template, sed | |
config = """ | |
server { | |
listen 80; | |
server_name localhost; | |
location /phpmyadmin { | |
root /var/www/; |