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
(() => { | |
const MAX_DELETIONS = 20; | |
const delayBetweenDeletions = 5000; | |
const retryDelay = 1000; | |
const maxRetries = 6; | |
const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
const findButtonByText = (text) => | |
[...document.querySelectorAll('button')] |
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
<!-- [[[cog | |
import cog | |
def cog_outl_fenced(item): | |
cog.outl(f"```python\n{item}\n```") | |
def fenced_exec(code, inter="which prints"): | |
cog_outl_fenced(code.strip()) | |
cog.outl() | |
cog.outl(inter) | |
cog.outl() |
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
<!-- [[[cog | |
import cog | |
_print = print # save print | |
def print(item): | |
cog.outl("```python\n{}\n```".format(repr(item))) | |
exec("\n".join(''' | |
--> | |
```python | |
print(1+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
This is a markdown file with some cog wrapped Python code... | |
<!-- [[[cog | |
# your actual code goes here: | |
code = """ | |
def f(): | |
return "cog is awesome" | |
result = f() | |
""" |