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 selenium import webdriver | |
from selenium.webdriver.common.by import By | |
import constants | |
import elements | |
def get_driver(): | |
return webdriver.Chrome() |
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
def safe_urljoin(*uris) -> str: | |
""" | |
Joins the URIs carefully considering the prefixes and trailing slashes. | |
The trailing slash for the end URI is handled separately. | |
>>> safe_urljoin("https://px.com/", "adunits/", "/both/", "/left") | |
>>> 'https://px.com/adunits/both/left' | |
>>> safe_urljoin("https://px.com/", "adunits/", "/both/", "right/") | |
>>> 'https://px.com/adunits/both/right/' |
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
doc = 'The quick brown fox jumps over the lazy dog. The quick brown fox over the lazy dog. The quick brown fox jumps over the lazy dog.' | |
cur_pos = -1 | |
end_pos = 0 | |
distance = 2 | |
tracked_words = [] | |
start_pos = 0 | |
search_words = ['quick', 'fox', 'over'] | |
highlights = [] |
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
/* | |
Disclaimer: This is only used for educational purpose only and does not promote or encourage any illegal activies | |
*/ | |
const markCourseCompleted = true; | |
var selectorExpr = `ul li input[type=checkbox]:${completeCourse?'not(:checked)':'checked'}`; | |
// first find right side sections container | |
var sectionsContainer = document.querySelector('[data-purpose="curriculum-section-container"]') |
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
INDICES = [ | |
"documents_index", | |
"england_geographies" | |
] | |
SRC_HOST = 'src_host' | |
SRC_PORT = 9200 | |
DEST_HOST = 'dest_host' |
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
def deprecated(msg=None): | |
def wrapped(func): | |
def inner(*args, **kwargs): | |
import warnings; | |
warnings.simplefilter('always', DeprecationWarning) | |
warnings.warn( | |
msg or '%s() is deprecated' % func.__name__, | |
category=DeprecationWarning | |
) | |
warnings.simplefilter('default', DeprecationWarning) |
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
function loadenv() { | |
if [ -f .env ]; | |
then | |
source .env | |
fi | |
} | |
loadenv | |
function cd() { |
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
0. START | |
1. Traverse the CmdTree node from the root CALL process_node(CmdTree.root) | |
2. START process_node: | |
If the CmdNode is not a leaf node then | |
2.1. Process all the child nodes of the current node first. CALL process_node(node) | |
2.2. After processing all child CmdNode. Set current node visibility | |
If all the childs are removed then | |
node.visible = False | |
Else | |
node.visible = True |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema | |
http://clish.sourceforge.net/XMLSchema/clish.xsd"> | |
<COMMAND name="network show" | |
help="Show currently added devices"> | |
<ACTION>network show</ACTION> | |
</COMMAND> |
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", | |
"created_on": "2021-06-28T17:29:37.714428", | |
"module": { | |
"name": "network", | |
"source_file": "network.xml", | |
"commands": [ | |
{ | |
"cmd": "network show", | |
"meta": { |
NewerOlder