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
| #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", |
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 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 |
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
| // 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 |
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 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 |
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
| """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 |
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 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, |
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 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') |
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
| 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 |
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 json | |
| import re | |
| import os | |
| from pathlib import Path | |
| own_path = os.path.join( | |
| os.path.dirname(os.path.realpath(__file__)) | |
| ) |
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 sys import stdout | |
| def out(*args, end='\n\r'): | |
| for arg in args: | |
| stdout.write(f'{arg}{end}') | |
| if __name__ == '__main__': | |
| out('hi') |