Skip to content

Instantly share code, notes, and snippets.

View rodrigo-x's full-sized avatar
👻

Rodrigo_ rodrigo-x

👻
View GitHub Profile
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tkinter as tk
import webbrowser as driver
# Criar a janela "root"
root = tk.Tk()
# SnakeCase
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!')
@rodrigo-x
rodrigo-x / programacaotv.sh
Last active March 3, 2021 18:16
programação da TV
#!/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"
@rodrigo-x
rodrigo-x / pysimplegui.py
Created February 15, 2021 04:51
PySimpleGui Example..
#!/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?")],
@rodrigo-x
rodrigo-x / bashIA.sh
Last active February 11, 2021 08:41
Exemplo pra ti <3
#!/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
@rodrigo-x
rodrigo-x / dataclass.py
Created February 5, 2021 09:45
Dataclass example
from typing import Dict
from dataclasses import dataclass
@dataclass()
class Carros:
nome: str
modelo: str
distancia_percorrida: str
kml: int
valor: int
@rodrigo-x
rodrigo-x / consumeapiwithtk.py
Last active March 27, 2021 06:26
Consome API com TK
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Consome a API de Cotação do Dólar
"""
import tkinter as tk
import json
import requests
@rodrigo-x
rodrigo-x / requirement_python.txt
Last active January 23, 2021 07:02
Getting youtube subscriptions auto.
# install python requirement libs
# shell$> sudo pip install -r requirement_python.txt
webbrowser
tkinter
@rodrigo-x
rodrigo-x / shutdown.py
Last active February 4, 2021 20:22
Logout and Shutdown
#!/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")