Skip to content

Instantly share code, notes, and snippets.

View tomlin7's full-sized avatar
🌐
uni

billy tomlin7

🌐
uni
View GitHub Profile
import math, random
import numpy as np
import tkinter as tk
vertices = [
(100, 100, 100),
(100, 100, -100),
(100, -100, 100),
(100, -100, -100),
(-100, 100, 100),
import math
import numpy as np
import tkinter as tk
vertices = [
(100, 100, 100),
(100, 100, -100),
(100, -100, 100),
(100, -100, -100),
(-100, 100, 100),
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 billyeatcookies
import json
from colorama import Fore, Back, init, Style
init(autoreset=True)
@tomlin7
tomlin7 / MegaGreeter.rb
Created January 26, 2021 05:02
A greeting class for understanding basics of ruby.
class MegaGreeter
attr_accessor :names
# Create the object
def initialize(names = 'world')
@names = names
end
# say hi to everybody
def say_hi
@tomlin7
tomlin7 / sqlite-create-and-insert.py
Created December 26, 2020 07:16
Create an sqlite database & table and insert data to it
import sqlite3
db = sqlite3.connect('scores.db')
c = db.cursor()
c.execute('''CREATE TABLE stocks
(date text, trans text, symbol text, qty real, price real)''')
c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)")
@tomlin7
tomlin7 / pagination.py
Created December 21, 2020 17:08
a custom discord.py pagination class
import asyncio
import logging
import typing as t
from contextlib import suppress
import discord
from discord.abc import User
from discord.ext.commands import Context, Paginator
from bot import constants
@tomlin7
tomlin7 / poll.py
Last active September 8, 2022 05:38
Poll Command Discord.py
import discord
from discord.ext import commands
class QuickPoll(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True)
async def poll(self, ctx, question, *options: str):