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 tkinter as tk | |
from tkinter import ttk | |
from ttkthemes import ThemedTk | |
# Crio a janela e acrescento o tema radiance | |
root = ThemedTk(theme = 'radiance') | |
""" | |
Função que brinca com a lógica vinda das Checkbuttons | |
O .get() pega o que vem do tk.IntVar() e compara |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import tkinter as tk | |
import webbrowser as driver | |
# Criar a janela "root" | |
root = tk.Tk() | |
# SnakeCase |
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 tkinter import ttk | |
from ttkthemes import ThemedTk | |
# Crio a janela e acrescento o tema Ubuntu | |
root = ThemedTk(theme = 'ubuntu') | |
# Crio o button já estilizado.. | |
ttk.Button(root, text = 'Quit', command = root.destroy).pack(padx = '40', pady = '60') | |
root.title('Teste de tema!') |
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
#!/usr/bin/env bash | |
clear | |
echo -e "\n\t Programação atual de um canal de TV" | |
echo -e "\n\t Obs: Globo = GRD, CNN, MTV, HBO\n" | |
read -p " Digite um canal com 3 letras: " canal | |
verificarResp() { | |
if [ -z "$canal" ]; then | |
clear | |
echo -e "\n\tDigite um canal.\n" |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import PySimpleGUI as sg | |
import pyttsx3 | |
ENGINE = pyttsx3.init() | |
sg.theme('LightGreen') | |
layout = [ [sg.Text("Qual é o seu nome?")], |
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
#!/usr/bin/env bash | |
## Example of IA on bash. | |
clear | |
echo -e "\n Olá aqui é a máquina! Vamos nos conhecer?" | |
echo -e "\n Se Sim, digite: 1" | |
echo -e "\n Ou pressione [Enter] no teclado para sair \n" | |
read -r answer |
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 typing import Dict | |
from dataclasses import dataclass | |
@dataclass() | |
class Carros: | |
nome: str | |
modelo: str | |
distancia_percorrida: str | |
kml: int | |
valor: int |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Consome a API de Cotação do Dólar | |
""" | |
import tkinter as tk | |
import json | |
import requests |
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
# install python requirement libs | |
# shell$> sudo pip install -r requirement_python.txt | |
webbrowser | |
tkinter |
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
#!/usr/bin/env python3 | |
import os | |
import gi | |
gi.require_version("Gtk", "3.0") | |
from gi.repository import Gtk | |
class Shutdown(Gtk.Window): | |
def __init__(self): | |
Gtk.Window.__init__(self, title="Desligar o PC") |