This file contains 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
#!/usr/bin/env python | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from sys import argv | |
def print_puzzle(number): | |
driver = webdriver.Firefox() | |
driver.get('https://www.puzzle-loop.com/specfic.php') | |
size_dropdown = driver.find_element_by_name('size') |
This file contains 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
# Programa para calcular la esperanza de ganancia de países en un | |
# combate del TEG. | |
import sys | |
def generar_tirada(dados=1, anteriores=None, caras=6): | |
if not anteriores: | |
return [1] * dados |
This file contains 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
#! /usr/bin/env python3 | |
import os | |
# Change the SQUEAK_PATH if squeak is located elsewhere. | |
script_file_dir = os.path.dirname(os.path.abspath(__file__)) | |
SQUEAK_PATH = '{}/../cogspur/squeak'.format(script_file_dir) | |
def get_image_filenames(): |
This file contains 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
enum class TipoPiso { Compacto, Poroso }; | |
class LunarRover { | |
Brazo brazo; | |
Sensor sensor; | |
public: | |
void Excavar(TipoPiso tipoPiso) const { | |
if (tipoPiso == TipoPiso::Compacto) { |
This file contains 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
#!/usr/bin/env python | |
import i3ipc | |
# Create the Connection object that can be used to send commands and subscribe | |
# to events. | |
i3 = i3ipc.Connection() | |
def on_window_focus(self, e): | |
focused = i3.get_tree().find_focused() |
This file contains 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
#!/usr/bin/env python | |
import i3ipc | |
# Create the Connection object that can be used to send commands and subscribe | |
# to events. | |
i3 = i3ipc.Connection() | |
def change_titles(windows): | |
if len(windows) > 1: |