Skip to content

Instantly share code, notes, and snippets.

View ajsya's full-sized avatar
:atom:
Inactive

ajsya

:atom:
Inactive
View GitHub Profile
@ajsya
ajsya / Factors.py
Created March 1, 2025 21:03
Python script for Ti-84 Plus Ce Python Edition that finds factors of most numbers somewhat slowly
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:
@ajsya
ajsya / email.py
Created June 8, 2023 01:52
Google Bard Wrote This
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')
@ajsya
ajsya / minutes-to-hours.py
Created February 10, 2023 02:01
Simple Python minutes to hours converter
mintutes = int(input("enter minutes"))
minutes1 = minutes%60
hours = minutes - minutes1
house /= 60
hours = int(hours)
print(str(hours) + "h" + str(minutes1))
@ajsya
ajsya / keep_alive.py
Last active May 15, 2025 06:34
24/7 repl.it hosting script
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)
@ajsya
ajsya / bot.py
Last active May 5, 2021 02:38
Discord Bot Template
# 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')
@ajsya
ajsya / cheatsheet.txt
Created February 18, 2021 05:47
Discord Text Formatting Cheat Sheet
# Discord Text Formatting Cheat Sheet
_Italic_ / *Italic*
**Bold**
__Underline__
~~Strikethrough~~
||Spoiler||