Skip to content

Instantly share code, notes, and snippets.

View makesomelayouts's full-sized avatar
💨
Frontending & Neoviming

makesomelayouts

💨
Frontending & Neoviming
View GitHub Profile
@makesomelayouts
makesomelayouts / file manipulation in python.txt
Last active November 6, 2025 06:21
file manipulation in python
options:
r=read,
w=write (change old data to new data),
rb/wb=read/write-binaryy (for binary files),
a=append(add new data to old data).
@makesomelayouts
makesomelayouts / folder_content.py
Last active February 2, 2023 21:41
prints what is contained in the folder
import os
def main():
i = 0
source_dir = input('folder path: ')
with os.scandir(source_dir) as entries:
for entry in entries:
i += 1
print(f'{i} :: {entry.name}')
import smtplib
from email.mime.text import MIMEText
from passwords import EMAIL, EMAIL_APP_PASSWORD
def send_email(message):
sender = EMAIL
recipient = EMAIL
password = EMAIL_APP_PASSWORD