Skip to content

Instantly share code, notes, and snippets.

View foxy4096's full-sized avatar
🛠️
I may be slow to respond

Adzy foxy4096

🛠️
I may be slow to respond
View GitHub Profile

Hi! 👋

I'm Aditya
I love Python and Django

For enquiries, reach out @foxy4096 or over on Website.

Stay awesome!

@foxy4096
foxy4096 / DatabaseWrapper.php
Last active March 27, 2024 11:07
✨ A simple database wrapper 📦
<?php
$GLOBALS['conn'] = $dbconn; // Replace it with your own `mysqli_connect` :)
function db_query($sql, $params = array(), $single = true)
{
$stmt = mysqli_prepare($GLOBALS['conn'], $sql);
if (!$stmt) {
// Handle SQL query preparation error
return null;
}
@foxy4096
foxy4096 / main.css
Last active December 12, 2023 11:40
Snippets
@import url("https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css");
.emojione {
width: 30px;
padding-left: 6px;
display: inline-flex;
vertical-align: text-top;
}
.tabbed-set {
@foxy4096
foxy4096 / Pointy.py
Created September 23, 2023 16:29
Misc
import math
class Point:
"""Represents a point in 2D space."""
def __init__(self, x, y):
"""
Initialize a Point object with x and y coordinates.
Args:
@foxy4096
foxy4096 / List.md
Created September 16, 2023 13:13
This is my list of websites
 - https://foxy4096.is-a.dev
 - https://foxy4096.is-a.dev/JohnBakery
 - https://vitary.pythonanywhere.com
 - https://yt-discovr.netlify.app
It is F12
Please remember

Keybase proof

I hereby claim:

  • I am foxy4096 on github.
  • I am foxy4096 (https://keybase.io/foxy4096) on keybase.
  • I have a public key whose fingerprint is 0681 3491 57DC E2F7 ED32 674D 0769 499D 1D72 74EE

To claim this, I am signing this object:

@foxy4096
foxy4096 / mention.py
Last active September 16, 2023 13:18
A template tag to convert @username to a link also God please help me with this abomination
from django import template
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User
from django.urls import reverse_lazy
register = template.Library()
@register.filter(name='mention', is_safe=True)
@stringfilter
from os import name
import requests
from requests import get
import pandas as pd
from bs4 import BeautifulSoup
import numpy as np
header = {"Accept-Language": "en-us, en;q=0.5"}
url = "https://www.imdb.com/search/title/?groups=top_1000&ref_=adv_prv"
@foxy4096
foxy4096 / Person.py
Created December 25, 2020 06:39
A simple class for Person
import datetime
year = int(str(datetime.datetime.today())[0:4])
class Person:
def __init__(self, name, gender, dob):
self.name = name # Aditya
self.gender = gender # Male
self.dob = dob # 01/02/2005