Skip to content

Instantly share code, notes, and snippets.

View Aareon's full-sized avatar
💭
Looking for work!

Aareon Sullivan Aareon

💭
Looking for work!
  • Amazon Ops Tech IT
  • Mississippi
  • 03:40 (UTC -06:00)
View GitHub Profile
#region DatabaseTable Definitions
"""
-- Table: "Saber".dm_tracker
-- DROP TABLE "Saber".dm_tracker;
CREATE TABLE "Saber".dm_tracker
(
dm_user_id text COLLATE pg_catalog."default",
dm_saber_message_id text COLLATE pg_catalog."default",
@Aareon
Aareon / backup.py
Created January 21, 2018 23:33
An example of the sqlite3 `backup.db` schema in SQLAlchemy
"""
Example of SQLAlchemy managing databases.
Safe, Pythonic, verbose.
Using SQLAlchemy would be a massive improvement to the stability, portability, and productivity of the project and
codebase as a whole.
"""
from sqlalchemy import create_engine, ForeignKey
from sqlalchemy import Column, Integer, String, Numeric, BigInteger
// Copyright (c) 2012-2013 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Modified for CPUminer by Lucas Jones
#include "miner.h"
#if defined(__arm__) || defined(_MSC_VER)
#ifndef NOASM
import os
import platform
import re
import sqlite3
import tarfile
import webbrowser
from ast import literal_eval
from base64 import b64decode, b64encode
from csv import QUOTE_MINIMAL, writer
from datetime import datetime
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools, set a download
mirror, or use an alternate download directory, you can do so by supplying
@Aareon
Aareon / main.py
Last active July 3, 2018 19:52
PyPad main.py
import json
import sys
from time import time
from PyQt5 import Qt
from PyQt5.QtCore import QRect, QRegExp, Qt
from PyQt5.QtGui import (QColor, QFont, QIcon, QPainter, QPalette,
QSyntaxHighlighter, QTextCharFormat)
from PyQt5.QtWidgets import (QAction, QApplication, QDialog, QFileDialog,
QHBoxLayout, QMainWindow, QPlainTextEdit,
from string import ascii_lowercase, digits
def slow_type(text, length=145):
count = 0
for char in text:
if count == length:
next_char = text[count+1].lower()
if next_char not in ascii_lowercase and next_char not in digits:
sys.stdout.write('\n')
class Player:
def __init__(self):
self.some_attr = 'this is an attribute'
def some_character_function():
anna = Player()
anna.name = 'Anna'
anna.description = 'Some girl'
return anna
import json
import re
import os
from pathlib import Path
own_path = os.path.join(
os.path.dirname(os.path.realpath(__file__))
)
@Aareon
Aareon / testout.py
Last active September 30, 2018 02:42
from sys import stdout
def out(*args, end='\n\r'):
for arg in args:
stdout.write(f'{arg}{end}')
if __name__ == '__main__':
out('hi')