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
name = input("Type your Name [At least 4 Characters]: ") | |
while len(name) <= 2: | |
name = input("Your name needs to have at least 4 characters, please type your name again: ") | |
age = int(input("Type here your age: ")) | |
while age < 0 or age > 150: | |
age = int(input("Your age needs to be between 0 and 150 years: ")) | |
salary = float(input("Type here the value of your salary in USD: ")) | |
while salary <= 0: |
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
cedulas = { | |
"moeda":[100, 50, 20, 10, 5, 2, 1, 0.5, 0.25, 0.10, 0.05, 0.01], | |
"tipo":["nota","nota","nota","nota","nota","nota","moeda","moeda","moeda","moeda","moeda"], | |
} | |
troco = {} | |
valor = float(input("Valor: ")) | |
for cedula in cedulas["moeda"]: | |
c = valor // cedula | |
valor = valor % cedula |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/gdamore/tcell" | |
) |
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 datetime import datetime | |
from colorconsole import terminal | |
from time import sleep | |
segundos = 5 | |
screen = terminal.get_terminal(conEmu=False) | |
try: | |
screen.enable_unbuffered_input_mode() | |
print(f"Digite algo para continuar ou em {segundos} s ativará sozinho") |
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 | |
import re | |
import boto3 | |
import json | |
from bs4 import BeautifulSoup | |
from lxml import etree | |
from functools import lru_cache |
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
# Requires Python +3.6 | |
# pip install bs4 boto3 lxml | |
from bs4 import BeautifulSoup | |
from lxml import etree | |
FILE = "omegat - Copy.xlf" | |
SRC_LANG = "PT-BR" | |
DST_LANG = "FR-BE" |
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
/* | |
* @author: Kos Ivantsov | |
* @date: 2014-01-16 | |
* @version: 0.6 | |
* Original source: https://libretraduko.wordpress.com/2014/01/16/convert-omegat-project-to-xliff-for-other-cat-tools/ | |
* Changed by: Nilo Menezes based on comments found at: https://groups.yahoo.com/neo/groups/OmegaT/conversations/messages/36979?guccounter=1&guce_referrer=aHR0cHM6Ly93d3cucHJvei5jb20vZm9ydW0vb21lZ2F0X3N1cHBvcnQvMjk1Njk3LXNjcmlwdGluZ19lcnJvcl93cml0ZV9ub3Rlc2dyb292eS5odG1sP3ByaW50PTE&guce_referrer_sig=AQAAACDZGXME9vTwjAuMHaM7j3K0FEPwQrvNY_LsWUBToTf6SFPwBzx9MSTH7iqrgsLmAtpPdtImfYEwM3fBuxiPBQcHakGJ87H1xbk_9UWYO0KrQeQXjQD0IsaR-0t6vXk6VPJJS2d6Ln_fgRptS2qozN9VM34PzhQZM51-jYSsdbrM | |
*/ | |
/* set to true to write a settings file for Okapi Rainbow that can be | |
* used to convert the XLF file produced by this script, to TMX |
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
#include <stdio.h> | |
#include <stdio.h> | |
#include <utf8proc.h> | |
#include <string.h> | |
// 012345678911 | |
char borda_simples[] = {u8"┌─┐│ │└─┘abc"}; | |
// 03691112222 | |
// 2581234 |
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
extern crate epoll; | |
extern crate libc; | |
extern crate termion; | |
use std::io; | |
use std::io::{Read, Write}; | |
use std::os::unix::io::AsRawFd; | |
use termion::raw::IntoRawMode; | |
/// Waits for a key press timeout milisseconds |
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 requests | |
import sys | |
# Pegue sua chave aqui: http://openweathermap.org | |
CHAVE = "SUA_CHAVE_AQUI" | |
URL = "http://api.openweathermap.org/data/2.5/weather" | |
CIDADE = "Manaus" | |
PAIS = "br" |
NewerOlder