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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
import time, random | |
def browser(url, width=1920, height=1080, script='', fullpage=False): | |
img = f'img-{random.randint(10000, 99999)}' | |
d = DesiredCapabilities.CHROME | |
d['loggingPrefs'] = { 'browser':'ALL' } | |
# options |
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
# -*- coding: utf-8 -*- | |
# AIOGRAM | |
import aiogram.utils.markdown as md | |
from aiogram import Bot, Dispatcher, types, filters | |
from aiogram.contrib.fsm_storage.memory import MemoryStorage | |
from aiogram.dispatcher import FSMContext | |
from aiogram.dispatcher.filters import Text | |
from aiogram.dispatcher.filters.state import State, StatesGroup | |
from aiogram.types import ParseMode, reply_keyboard |
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
# -*- coding: utf-8 -*- | |
# AIOGRAM | |
import aiogram.utils.markdown as md | |
from aiogram import Bot, Dispatcher, types, filters | |
from aiogram.contrib.fsm_storage.memory import MemoryStorage | |
from aiogram.dispatcher import FSMContext | |
from aiogram.dispatcher.filters import Text | |
from aiogram.dispatcher.filters.state import State, StatesGroup | |
from aiogram.types import ParseMode, reply_keyboard |
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 type="text/javascript"> | |
let answer = parseInt(Math.random() * 100); | |
function readInt(){ | |
let number = document.getElementById("userAnswer").value; | |
return parseInt(number); | |
} | |
function write(text){ | |
document.querySelector("#output").innerHTML = text; | |
} | |
function hide(id){ |
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
# -*- coding: utf-8 -*- | |
# импорт модулей библиотеки aiogram | |
from aiogram import Bot, types | |
from aiogram.dispatcher import Dispatcher | |
from aiogram.utils import executor | |
import string | |
# token бота |
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
# -*- coding: utf-8 -*- | |
# импорт модулей библиотеки aiogram | |
from aiogram import Bot, types | |
from aiogram.dispatcher import Dispatcher | |
from aiogram.utils import executor | |
# token бота | |
bot_token = '<token>' |
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
# -*- coding: utf-8 -*- | |
# импорт модулей библиотеки aiogram | |
from aiogram import Bot, types | |
from aiogram.dispatcher import Dispatcher | |
from aiogram.utils import executor | |
# token бота | |
bot_token = '<token>' |
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
# -*- coding: utf-8 -*- | |
# импорт модулей библиотеки aiogram | |
from aiogram import Bot, types | |
from aiogram.dispatcher import Dispatcher | |
from aiogram.utils import executor | |
# token бота | |
bot_token = '<token>' |
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
let dropArea = document.getElementById("drop-area"); | |
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { | |
dropArea.addEventListener(eventName, preventDefaults, false) | |
document.body.addEventListener(eventName, preventDefaults, false) | |
}); | |
['dragenter', 'dragover'].forEach(eventName => { | |
dropArea.addEventListener(eventName, highlight, false) | |
}); |
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
#drop-area { | |
border: 2px dashed #ccc; | |
border-radius: 20px; | |
width: 480px; | |
font-family: sans-serif; | |
margin: 10px auto; | |
padding: 20px; | |
} | |
#drop-area.highlight { | |
border-color: rgb(172, 172, 172); |
NewerOlder