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 collections import deque | |
def chess_to_tuple(chess_position): | |
"Converts chess position (eg., 'a1') to tuple (eg., (1, 1))" | |
first = ord(chess_position[0]) - ord('a') + 1 | |
second = int(chess_position[1]) | |
return (first , second) | |
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 itertools import product, tee | |
template = ('D','D') | |
max_operations = 4 | |
pairwise = lambda iterable: (lambda x: [next(x[1], None), zip(*x)])(tee(iterable))[-1] | |
REVERSED_TILES = set(map((lambda x: tuple(reversed(x))), BASIC_TILES)) | |
[ | |
answer | |
for i in range(1, max_operations + 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
import uncompyle6 | |
import types | |
def change_bytecode(code, sub=False): | |
if not isinstance(code, types.CodeType): | |
return code | |
if sub: | |
# 0 LOAD_CONST 1 (0) | |
# 2 RETURN_VALUE | |
co_code = b'd\x01S\x00' |
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 ast | |
import astor | |
class Hitchhiker(ast.NodeTransformer): | |
def visit_FunctionDef(self, node): | |
node.body = [ast.parse('return 42')] | |
return node | |
expr=''' | |
def resposta(): |
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
fo trol motzplnet hi | |
s="iet"cut=2lns=[]frxi ag(on) | |
o ,lte neueaes: lnsi%lnlns]apn(etro " | |
rn("ji(hi.rmieal(ie))rmietosipr i_ogs,can | |
drio | |
on | |
ie [ o nrnecut]fri etri nmrt() | |
ie[ e(ie).pedlte r")pit".oncanfo_trbelns) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
- Abra o link https://www.facebook.com/proflucianopaez/posts/947138555381442
- Se estiver em navegação privativa, clique em "comentários" para abrir a lista inicial de comentários
- Inicie o console (F12 no firefox)
- Copie e cole o seguinte código no console:
function conta_sim_e_nao() {
var comments = document.getElementsByClassName("UFICommentBody");
var outros = [];
var cont_sim = 0, cont_nao = 0;
for (var i=0; i < comments.length; i++) {
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 sys | |
import argparse | |
from getpass import getpass | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
def navigate(card_number, user_name, passkey): | |
try: | |
browser = webdriver.Firefox() |