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
from random import randint | |
def tabuada(): | |
s = f"{randint(1,9)} * {randint(1,9)}" | |
print(s.replace('*', 'x')) | |
return int(input('Resposta: ')) == eval(s) | |
record = 0 | |
while(tabuada()): | |
record += 1 |
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
"""DXF Ruler Generator. | |
This module generates DXF files for laser cutting and engraving custom sized | |
rulers, which can be easily manufactured at the nearest FabLab. | |
Example | |
------- | |
Generate a 7cm ruler: | |
$ python -m dxf_ruler_generator 7 |
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
import os | |
from subprocess import call | |
from flask import Flask, render_template, send_from_directory | |
app = Flask(__name__) | |
app.route('/') | |
def index(): | |
return render_template('index.html') |
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
def tabuada(): | |
equacao = f'2 * 3' | |
print(equacao.replace('*', 'x')) | |
return int(input('Resposta: ')) == eval(equacao) | |
acertos = 0 | |
while(tabuada()): | |
acertos += 1 | |
print(f'Acertos: {acertos}') |
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
from random import randint | |
def tabuada(): | |
equacao = f'{randint(1,9)} * {randint(1,9)}' | |
print(equacao.replace('*', 'x')) | |
return int(input('Resposta: ')) == eval(equacao) | |
acertos = 0 | |
while(tabuada()): | |
acertos += 1 |
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
""" | |
Counting sort implementation. | |
This module implements the counting_sort function. | |
>>> counting_sort([1, 4, 1, 2, 7, 5, 2]) | |
[1, 1, 2, 2, 4, 5, 7] | |
""" | |
def counting_sort(l: list) -> list: |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.2; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract MyToken is ERC20, Ownable { | |
constructor() ERC20("Pao de queijo", "PDQ") { | |
_mint(0x39d77B055155262e6856b1c41996bDD1b860B64A, 817 * 10 ** decimals()); | |
} |