usar range(len(a)) ao invés de enumerate | |
---|---|
Com smell | Sem smell |
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.firefox.options import Options as FirefoxOptions | |
options = FirefoxOptions() | |
options = webdriver.FirefoxOptions() | |
options.set_capability('browserName', 'firefox') | |
options.set_capability('browserVersion', '117.0') # | |
#options.set_capability('selenoid:options', {'enableVideo': True}) # Faz com que a execução seja gravada em ~/.aerokube/selenoid/video | |
options.set_capability('selenoid:options', {'enableVNC': True}) # Permite ver o webdriver em tempo real pela web-ui |
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 ssl | |
from time import sleep | |
from selenium import webdriver | |
from selenium.webdriver import firefox | |
ssl._create_default_https_context = ssl._create_unverified_context | |
class SeleniumConnector(): | |
driver = None |
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
# i3 config file (v4) | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
# Set mod key (Mod1=<Alt>, Mod4=<Super>) | |
set $mod Mod4 | |
# set default desktop layout (default is tiling) | |
# workspace_layout tabbed <stacking|tabbed> | |
# Configure border style <normal|1pixel|pixel xx|none|pixel> |
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
format | values | |
---|---|---|
single | ['true'] | |
single | ['1'] | |
single | ['500'] | |
single | ['4'] | |
single | ['18'] | |
single | ['true'] | |
ranged | ['(30,)'] | |
ranged | ['(87,)'] | |
ranged | ['(64,)'] |
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 | |
def bulk_replace(text:str, mappings:str) -> str: | |
regex = re.compile('|'.join(mappings.keys())) | |
return re.sub(regex, lambda x: mappings[x.group()], text) | |
if __name__ == '__main__': | |
mappings = { | |
'quick':'slow', | |
'fox':'dog', |
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
pair | open_time | high | gain | |
---|---|---|---|---|
DOGEBRL | 2021-10-22T00:30:00Z | 1.391 | 0.0 | |
DOGEBRL | 2021-10-22T01:00:00Z | 1.399 | 0.01 | |
DOGEBRL | 2021-10-22T01:30:00Z | 1.397 | -0.0 | |
DOGEBRL | 2021-10-22T02:00:00Z | 1.397 | 0.0 | |
DOGEBRL | 2021-10-22T02:30:00Z | 1.395 | -0.0 | |
DOGEBRL | 2021-10-22T03:00:00Z | 1.393 | -0.0 | |
DOGEBRL | 2021-10-22T03:30:00Z | 1.395 | 0.0 | |
DOGEBRL | 2021-10-22T04:00:00Z | 1.394 | -0.0 | |
DOGEBRL | 2021-10-22T04:30:00Z | 1.4 | 0.0 |
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 pathlib import Path | |
def get_commit(repo_path): | |
git_folder = Path(repo_path,'.git') | |
head_name = Path(git_folder, 'HEAD').read_text().split('\n')[0].split(' ')[-1] | |
head_ref = Path(git_folder,head_name) | |
commit = head_ref.read_text().replace('\n','') | |
return commit | |
if __name__ == '__main__': |
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
repo | categ | flag | ||
---|---|---|---|---|
0 | donnemartin/system-design-primer | education | ||
1 | TheAlgorithms/Python | education | ||
2 | jackfrued/Python-100-Days | education | ||
3 | ytdl-org/youtube-dl | web | ||
4 | nvbn/thefuck | shell | ||
5 | django/django | development | ||
6 | keras-team/keras | ML | ||
7 | httpie/httpie | development | ||
8 | ansible/ansible | development |
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.0 | ||
---|---|---|
0.847 | ||
0.901 | ||
0.113 | ||
0.781 | ||
0.944 | ||
0.225 | ||
0.705 | ||
0.976 | ||
0.333 |
NewerOlder