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 unittest | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.support import expected_conditions | |
from selenium.common.exceptions import TimeoutException | |
def wait_for_alert(driver): |
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
<h1>Pure CSS Ticker (No-JS)</h1> | |
<h2>A smooth horizontal news like ticker using CSS transform on infinite loop</h2> | |
<div class="ticker-wrap"> | |
<div class="ticker"> | |
<div class="ticker__item"><img src="http://ichef-1.bbci.co.uk/news/235/cpsprodpb/16663/production/_92374719_mediaitem92374348.jpg" width="100" > Letterpress chambray brunch.</div> | |
<div class="ticker__item"><img src="http://ichef-1.bbci.co.uk/news/235/cpsprodpb/16663/production/_92374719_mediaitem92374348.jpg" width="100" > Vice mlkshk crucifix beard chillwave meditation hoodie asymmetrical Helvetica.</div> | |
<div class="ticker__item"><img src="http://ichef-1.bbci.co.uk/news/235/cpsprodpb/16663/production/_92374719_mediaitem92374348.jpg" width="100" > Ugh PBR&B kale chips Echo Park.</div> | |
<div class="ticker__item"><img src="http://ichef-1.bbci.co.uk/news/235/cpsprodpb/16663/production/_92374719_mediaitem92374348.jpg" width="100" > Gluten-free mumblecore chambray mixtape food truck. </div> | |
<div class="ticker__item">Authentic bitters seitan pu |
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
'''Fizzbuzz game written using all of the clarity and power of regular expressions. | |
N.B. the regex uses VERBOSE mode to maximise readability. | |
''' | |
import re | |
PAT = '''^(?: | |
(?P<_FizzBuzz> | |
([0369]*0)| | |
(([147]|[0369]*[147])([0369]|[258][0369]*[147])*(5|([258][0369]*0)))| | |
(([258]|[0369]*[258]|([147]|[0369]*[147])([0369]|[258][0369]*[147])*([147]|[258][0369]*[258])) | |
([0369]|[147][0369]*[258]|([258]|[147][0369]*[147])([0369]|[258][0369]*[147])* |
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 __future__ import annotations | |
import asyncio | |
import time | |
from functools import partial | |
from itertools import count | |
from typing import Callable, AsyncGenerator | |
OUTPUT: list[int | str] = [] |