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
n = int(input("Factors of what? ")) | |
print("Finding all factors of {0}...".format(n)) | |
w = n | |
while w != 0: | |
x = int(n/w) | |
if x == n/w: | |
if x == 1: |
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 smtplib | |
def send_email(sender, recipient, subject, message): | |
# Create a secure SMTP connection | |
smtp = smtplib.SMTP('smtp.gmail.com', 587) | |
smtp.ehlo() | |
smtp.starttls() | |
# Login with your email and password | |
smtp.login(sender, 'Your Password') |
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
mintutes = int(input("enter minutes")) | |
minutes1 = minutes%60 | |
hours = minutes - minutes1 | |
house /= 60 | |
hours = int(hours) | |
print(str(hours) + "h" + str(minutes1)) |
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 flask import Flask | |
from threading import Thread | |
app = Flask('') | |
@app.route('/') | |
def home(): | |
return "I'm alive" | |
def run(): | |
app.run(host='0.0.0.0',port=8080) | |
def keep_alive(): | |
t = Thread(target=run) |
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
# Example Bot Template by SharkBaitBilly | |
import discord | |
from discord.ext import commands | |
bot = commands.Bot(command_prefix='.') | |
@bot.event | |
async def on_ready(): | |
print('Logged in as') |
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
# Discord Text Formatting Cheat Sheet | |
_Italic_ / *Italic* | |
**Bold** | |
__Underline__ | |
~~Strikethrough~~ | |
||Spoiler|| |