Skip to content

Instantly share code, notes, and snippets.

View danielfreitasce's full-sized avatar

Daniel Freitas danielfreitasce

View GitHub Profile
@danielfreitasce
danielfreitasce / strings2.py
Created April 19, 2025 21:43
[Python 2.0] - Exercícios de final de módulo - 06
"""
Dada uma string com uma única letra e uma outra string qualquer, responda quantas vezes a letra está presente na outra string. Exemplos:Exemplos
“a”; “abacaxi”: 3
“c”; “bola”: 0
“u”; “”: 0
Ainda considerando uma string com uma única letra e uma outra string qualquer, responda com uma lista de índices indicando as posições em que a letra está presente.Exemplos:
"""
letra = input("Digite a primeira letra: ").strip()
palavra = input("Digite uma palavra: ").strip()
@danielfreitasce
danielfreitasce / isTriangule.py
Created April 23, 2025 20:07
Python do Jeito Certo 2.0 - Exercício função
def isTriangule(lado1, lado2, lado3):
if lado1 + lado2 > lado3 and lado1 + lado3 > lado2 and lado2 + lado3 > lado1:
return True
else:
return False
lados = []
for i in range(1, 4):
try:
@danielfreitasce
danielfreitasce / organizer.py
Last active May 18, 2025 22:13
Organizador de arquivos
import os
def main():
print(f"Organizando arquivos na pasta {os.path.abspath('.')}...")
files_list = os.listdir('.')
print("Obtendo tipos de arquivo.")
extensions = set()
for file_name in files_list:
if os.path.isfile(file_name):
@danielfreitasce
danielfreitasce / BackgroundLogo.md
Created June 30, 2025 18:28
Background Logo - Gnome Shell Extension

Since the Background Logo extension has not been updated for the latest versions of GNOME Shell at Gnome Extension Store, you can download the extension directly from https://pagure.io/background-logo-extension/releases and install it manually.

To do this, follow these steps after downloading the files:

How to Install a GNOME Shell Extension with meson.build

This guide explains how to compile and install a GNOME Shell extension that uses the Meson build system. The presence of a meson.build file indicates that the extension needs to be built and installed into the system, rather than just being placed in your user's local extensions folder.

1. Prerequisites: Install Necessary Tools