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 find_duplicates(check_list): | |
occurrences = set() | |
new_list = [] | |
for i in check_list: | |
if i in occurrences: | |
new_list.append(i) | |
return new_list |
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
""" | |
Required libraries: | |
- selenium | |
- pandas | |
- openpyxl | |
""" | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from datetime import date |
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 print_result(func): | |
def decorated_func(a, b): | |
return f"o resultado é {func(a, b)}" | |
return decorated_func | |
@print_result | |
def soma(a, b): | |
return a + b | |
@print_result |
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 ppm(): | |
REQUIRED_PH = 5.9 | |
solution_volume = int(input('Type solution volume (0-20): ')) | |
desired_solution_volume = int(input('Type desired volume (0-20):')) | |
required_volume = desired_solution_volume - solution_volume | |
print(f"Required volume is {required_volume} liters") | |
current_ppm = int(input('Type current ppm: ')) |
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
{% if messages %} | |
{% for message in messages %} | |
<div class="alert alert-{{ message.tags }} alert-dismissible text-center" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<strong>{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}Error{% else %}{{ message.tags|title }}{% endif %}!</strong> {{ message }} | |
</div> | |
{% endfor %} | |
{% endif %} |
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
273999,873977,873978,873979,873980,873981,989911,1151875,1151906,1151907,1151909,1151911,1154286,1154289,1154290,1154291,1154293,1154294,1157694,1161159,1161160,1161174,1161175,1161176,1161179,1161187,1161197,1161201,1161210,1161222,1161252,1161254,1161258,1161264,1161265,1161276,1161284,1161297,1161302,1161332,1161333,1161343,1177341,1177343,1185408,1185450,1185454,1185455,1204236,1206064,1216822,1217288,1217880,1217906,1219905,1219906,1219907,1219908,1219911,1224861,1224875,1225203,1225204,1225205,1225207,1225208,1225211,1225212,1225214,1225215,1225216,1225217,1225219,1225220,1225222,1225224,1225225,1225227,1225232,1225233,1225234,1225237,1225238,1225240,1225243,1225244,1225245,1225246,1225250,1225251,1225254,1225255,1225256,1225257,1225258,1225260,1225261,1225267,1225268,1225270,1225272,1225298,1225299,1225300,1225301,1225302,1225303,1225306,1225307,1225311,1225312,1225318,1225319,1225320,1225325,1225326,1225327,1225328,1225329,1225331,1225332,1225333,1225334,1225336,1225337,1225338,1225339,1225340,1225341 |
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 pytest | |
import aiohttp | |
from aiohttp import web | |
def create_magic_app(): | |
app = web.Application() | |
return app | |
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 asyncio | |
import pathlib | |
import socket | |
import ssl | |
import pytest | |
import aiohttp | |
from aiohttp import web | |
from aiohttp.resolver import DefaultResolver |
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 random | |
from ansi.colour import fg, bg | |
PEDRA = 0 | |
TESOURA = 1 | |
PAPEL = 2 | |
WINNERS_LOOSERS = {PEDRA: TESOURA, TESOURA: PAPEL, PAPEL: PEDRA} | |
LABELS = { | |
TESOURA: 'Tesoura', | |
PEDRA: 'Pedra', |
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
# Git alias (tested on zsh) | |
alias gpull="git pull origin \`git branch --show-current\`" | |
alias gpush="git push origin \`git branch --show-current\`" | |
alias gcomm="git commit -v" | |
alias glogp="git log -p" | |
alias glogs="git log --stat" |
NewerOlder