Skip to content

Instantly share code, notes, and snippets.

View vivekjoshy's full-sized avatar

Vivek Joshy vivekjoshy

View GitHub Profile
@vivekjoshy
vivekjoshy / MVCE_main.py
Last active March 4, 2022 15:55
Thread Based PyQt5 Python Console
import sys
import time
from code import InteractiveConsole
from PyQt5 import uic
from PyQt5.QtCore import pyqtSlot, QThread, QObject, pyqtSignal, QTimer
from PyQt5.QtGui import QTextOption, QTextCursor
from PyQt5.QtWidgets import QApplication
__author__ = "daegontaven"
import sys
import time
import PyQt5.QtCore
import PyQt5.QtWidgets
app = PyQt5.QtWidgets.QApplication(sys.argv)
text = PyQt5.QtWidgets.QTextEdit()
@vivekjoshy
vivekjoshy / error_handler.py
Created March 24, 2018 21:46 — forked from EvieePy/error_handler.py
Simple Error Handling for ext.commands - discord.py
import traceback
import sys
from discord.ext import commands
import discord
"""
If you are not using this inside a cog, add the event decorator e.g:
@bot.event
async def on_command_error(ctx, error)
@vivekjoshy
vivekjoshy / discord-ban-bot.py
Last active May 2, 2024 12:15
Script to ban members of a discord servers.
#!/usr/bin/python
"""
# WARNING!
# DO not use this script for malicious purposes!
# Author: daegontaven - taven#0001
# License: Public Domain
# README
# I have resigned from using discord indefinitely to pursue schoolwork.
# As such I will not be maintaining this script anymore.
@vivekjoshy
vivekjoshy / gcp-specs.log
Created January 18, 2019 02:15
GCP Instance Specifications
wiki-debug
description: Computer
product: Google Compute Engine
vendor: Google
serial: GoogleCloud-808A9ACA519E93147E70C3753FB65C86
width: 64 bits
capabilities: smbios-2.4 dmi-2.4 smp vsyscall32
configuration: boot=normal uuid=808A9ACA-519E-9314-7E70-C3753FB65C86
*-core
description: Motherboard
@vivekjoshy
vivekjoshy / vagrant-values.log
Created January 18, 2019 02:23
Output of `vagrant config --list`
git_user Your git/Gerrit username
Enter 'anonymous' for anonymous access, leave blank to manage it yourself
Current value: taven
vagrant_ram Amount of RAM (in MB) allocated to the guest VM
Specify 'auto' to automatically allocate 1/4 of your system's memory
Current value: 1536 (default)
vagrant_cores CPU cores allocated to the guest VM
All of your host system's cores are allocated by default.
@vivekjoshy
vivekjoshy / install-output.md
Last active February 2, 2019 01:02
Install output for pipenv bug report as seen in https://github.com/pypa/pipenv/issues/3497
Installing dependencies from Pipfile.lock (cbf103)…
Installing 'aiohttp'
$ ['/home/meredith/.local/share/virtualenvs/Orator-jO5XcFKu/bin/pip', 'install', '--verbose', '--upgrade', '--no-deps', '-r', '/tmp/pipenv-4f6wyya9-requirements/pipenv-nkxmmovu-requirement.txt', '-i', 'https://pypi.org/simple', '--require-hashes']
Installing 'async-timeout'
$ ['/home/meredith/.local/share/virtualenvs/Orator-jO5XcFKu/bin/pip', 'install', '--verbose', '--upgrade', '--no-deps', '-r', '/tmp/pipenv-4f6wyya9-requirements/pipenv-94x7sqjj-requirement.txt', '-i', 'https://pypi.org/simple', '--require-hashes']
Installing 'cffi'
$ ['/home/meredith/.local/share/virtualenvs/Orator-jO5XcFKu/bin/pip', 'install', '--verbose', '--upgrade', '--no-deps', '-r', '/tmp/pipenv-4f6wyya9-requirements/pipenv-q3umrtx0-requirement.txt', '-i', 'https://pypi.org/simple', '--require-hashes']
Installing 'chardet'
$ ['/home/meredith/.local/share/virtualenvs/Orator-jO5XcFKu/bin/pip', 'install', '--verbose', '--upgrade', '--no-deps', '-r', '/tmp/pipen
@vivekjoshy
vivekjoshy / config.py
Created February 18, 2019 13:13
VerboseLogs created by daegontaven - https://repl.it/@daegontaven/VerboseLogs
LOG_FORMAT = "%(asctime)s %(name)-18s %(levelname)-8s %(message)s"
DATE_FORMAT = "[%Y-%m-%d %H:%M:%S %z]"
MAIN_FIELD_STYLES = {
'asctime': {
'color': 'green'
},
'levelname': {
'color': 'black',
'bold': True
import sys
import time
from PyQt5.QtWidgets import (QApplication, QDialog,
QProgressBar, QPushButton)
TIME_LIMIT = 100
class Actions(QDialog):
"""
import sys
import time
from PyQt5.QtCore import QThread, pyqtSignal
from PyQt5.QtWidgets import (QApplication, QDialog,
QProgressBar, QPushButton)
TIME_LIMIT = 100
class External(QThread):