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
""" | |
Software para listar o tamanho de todos os softwares instalados | |
com o gerenciador de pacotes apt | |
""" | |
import subprocess | |
from json import dump | |
pacotes = subprocess.run(["dpkg", "-l"], capture_output=True) | |
lista_pacotes = [] | |
for pacote in pacotes.stdout.decode("utf-8").split("\n")[5:]: |
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 matplotlib.pyplot as plt | |
import numpy as np | |
def frequencia(eventos): | |
freq_dados = [] | |
for dist, number in eventos: | |
dist = float(dist) | |
for _ in range(int(number)): | |
freq_dados.append(dist) | |
return freq_dados |
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 sh import lp, lpstat, lpoptions, lpq | |
class APICups: | |
self.cupsOptions = { | |
"media" : ["Size of the paper", ["Letter", 'Legal ', 'A4 ', 'COM10 ', 'DL ', 'Transparency ', 'Upper ', 'Lower', 'MultiPurpose','LargeCapacity', "Custom.WIDTHxLENGTH"]], | |
"orientation" : ["Orientation of printing", | |
["landscape", "portrait", | |
["orientation-requested", | |
["Reverse Landscape", 5, "Reverse Portrait", 6]]]], |
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
(function() { | |
var timeSeconds = 0; | |
var timestampDivList = document.querySelectorAll("style-scope ytd-thumbnail-overlay-time-status-renderer"); | |
for(var i = 0; i < timestampDivList.length; i++) { | |
var timestampDiv = timestampDivList[i]; |
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
""" | |
Nome: Laplace_Det | |
Função: Encontrar o determinante de matrizes utilizando o método de Laplace | |
Autor: Állan Rocha | |
Data: 9/8/2017 | |
""" | |
def laplace_method(smatriz): | |
""" | |
Função que resolve matrizes usando o método de Laplace |
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 random | |
color = 7 | |
pre_code = "\033[1;3" | |
end_code = "\033[0m" | |
number = int(input("{}{}mDigite um número legal! : {}".format(pre_code, random.randint(0,color), end_code))) | |
for i in range(11): | |
n_spaces = len(str(number * 10)) + 1 - len(str(number * i)) |
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
## Doc ## | |
Descrição | |
O trabalho a ser desenvolvido é um jogo conhecido como NIM. Este jogo proveniente da China, disputado por dois jogadores consiste em: | |
-- Um número impar de palitos, sendo n >= 5 e n < 40, dispostos em uma fila; | |
-- Cada jogador retira, em sua vez, um determinado número de palitos, delimitado em mínimo e máximo pelo jogadores (sendo n >= 1 e <= 4) | |
-- Perde o jogador que retirar o último palito |