Skip to content

Instantly share code, notes, and snippets.

@bartier
bartier / cool_test.py
Created July 28, 2021 00:28
Average of integers + recursion
def average_integers(filename, recursion=False):
integers_count = 0
with open(filename.strip(), 'r') as reader:
lines = reader.readlines()
sum = 0
for line in lines:
try:
sum += int(line)
integers_count = integers_count + 1
@bartier
bartier / gup.sh
Last active January 18, 2020 23:49
[Group User Permissions] - Shell Script #linux
#!/bin/sh
opcoes_principal()
{
printf "######## GUP 1.0 ######## by @bartier\n\n"
printf "1 - Grupo\n"
printf "2 - Usuário\n"
printf "3 - Permissão de acesso\n"
printf "4 - Sair\n"
}