Skip to content

Instantly share code, notes, and snippets.

View hbisneto's full-sized avatar
💭
Drinking Coffee ☕

Heitor Bardemaker A. Bisneto hbisneto

💭
Drinking Coffee ☕
View GitHub Profile
@hbisneto
hbisneto / SupermarketList.py
Last active January 20, 2023 17:24
Explains how a variable works and why we must implement variables with static values to insert values later or when needed
## Supermercado
Produtos = ["Toddy", "Carro", "Nescau", "Cachorro", "Arroz", "Feijão"]
Sacola = []
QtdItensSacola = 0
Descarte = []
QtdDescarte = 0
for ItemSupermercado in Produtos:
@hbisneto
hbisneto / Hello_World.py
Created May 7, 2022 04:38
Simple Hello World in Python
print("Hello World!")
@hbisneto
hbisneto / dependencies.py
Created November 12, 2022 22:13
Execute Terminal actions using Python
import subprocess
print("=" * 80)
print("Verificando pacotes necessários:")
print("=" * 80)
output = subprocess.getoutput("pip install requests")
print(output)
print("=" * 80)
print()
@hbisneto
hbisneto / WHILE_Indent.c
Last active November 26, 2022 18:26
Arquivos de C para comparação. O objetivo é a organização do programa.
// Exemplo da estrutura DO WHILE com o WHILE iniciando na linha de baixo
#include <iostream>
using namespace std;
int main() {
// Definição da variável local
int i = 0;
// Inicio da estrutura DO WHILE
@hbisneto
hbisneto / Donut.py
Last active July 23, 2024 01:29
Donut Animation
import numpy as np
screen_size = 40
theta_spacing = 0.07
phi_spacing = 0.02
illumination = np.fromiter(".,-~:;=!*#$@", dtype="<U1")
A = 1
B = 1
R1 = 1
@hbisneto
hbisneto / Desconto.py
Created January 31, 2023 20:06
Sample application using basics Python structures.
EngineKey = True
while EngineKey == True:
print()
print('=' * 80)
print(">> QUANTIDADE DE ITENS <<")
print('=' * 80)
ItensQtd = int(input("[!]: Quantos itens serão somados: "))
Soma = 0
count = 0
@hbisneto
hbisneto / CalculatorAI.py
Created July 6, 2023 23:44
Calculator with history of calculations. This code was generated via Artificial Intelligence
class Calculator:
def __init__(self):
self.history = []
def add(self, x, y):
result = x + y
self.history.append(f"{x} + {y} = {result}")
return result
def subtract(self, x, y):
@hbisneto
hbisneto / WCFileSize.cs
Last active July 8, 2023 04:19
Get File Size in MB (C#)
using (WebClient client = new WebClient())
{
client.OpenRead(url);
string headerContentLength = client.ResponseHeaders["Content-Length"];
if (!string.IsNullOrEmpty(headerContentLength))
{
long fileSizeInBytes = Convert.ToInt64(headerContentLength);
double fileSizeInMegabytes = fileSizeInBytes / 1024.0 / 1024.0;
}
}
@hbisneto
hbisneto / apple_icon.svg
Created July 31, 2023 02:11
MacInfo: Brand New MacInfo App Icon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbisneto
hbisneto / AssocArray.php
Last active September 1, 2023 17:04
AssocArray.php
<?php
$arrayAssociativo = array(
"nome" => "João",
"idade" => 30,
"cidade" => "São Paulo"
);
$json = json_encode($arrayAssociativo);
?>