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
#!/usr/bin/env python3 | |
import json | |
import requests | |
import sys | |
band = None | |
user = None | |
counter = 0 | |
input_stripped = input('Input a band (or hit enter for user): ').strip() |
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 string | |
def encrypt(the_input): | |
start = 1 | |
encrypted = [] | |
one_e = str.maketrans( | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?!. '", | |
"74IKSQ'VR5LDBZ6J.N1GW?ETO8P UA023F9!MXHYC") |
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
#!/usr/bin/env python3 | |
# While systemd has the prefixes set in the following way: | |
# en = ethernet | |
# wl = wlan | |
# ww = wwan | |
# There are still instances where an interface won't have these. | |
# Which, is why I made this script. | |
import os | |
ethernet_interfaces = [] |
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
#!/usr/bin/env python3 | |
import os | |
ethernet_interfaces = [] | |
wireless_interfaces = [] | |
def get_interfaces(): | |
interfaces = os.listdir('/sys/class/net') | |
return interfaces |
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 subprocess | |
import time | |
while True: | |
time.sleep(1) | |
a = subprocess.check_output('xprintidle') | |
a = round(int(a.decode().strip()), -3) | |
print('Seconds idle: {0}'.format(int(a / 1000))) |
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 collections | |
import pyautogui | |
import pyscreeze | |
import sys | |
def MousePosition(): | |
"""This function is meant to be run from the command line. It will | |
automatically display the location and RGB of the mouse cursor.""" | |
print('Press Ctrl-C to quit.') | |
try: |
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 collections | |
import pyautogui | |
import pyscreeze | |
import sys | |
def MousePosition(): | |
"""This function is meant to be run from the command line. It will | |
automatically display the location and RGB of the mouse cursor.""" | |
print('Press Ctrl-C to quit.') | |
try: |
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 email | |
import collections | |
import imaplib | |
mail = imaplib.IMAP4_SSL('imap.gmail.com') | |
mail.login('[email protected]', 'PASSWORD') | |
mail.list() | |
mail.select('inbox') | |
from_dict = collections.Counter() |
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 random | |
import sys | |
BLACKJACK = 21 | |
ACE_IS_ELEVEN = 10 | |
ACE_IS_ONE = 11 | |
EXITS = ['e', 'x', 'q', 'exit', 'quit', 'escape', 'leave'] | |
cards = {'๐พ': 10, '๐ฝ': 10, '๐ป': 10, '๐บ': 10, '๐น': 9, '๐ธ': 8, '๐ท': 7, | |
'๐ถ': 6, '๐ต': 5, '๐ด': 4, '๐ณ': 3, '๐ฒ': 2, '๐ฑ': 'A', '๐': 10, |
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 subprocess | |
import time | |
dnd_time = {'start': {'hour': 17, 'minute': 00}, 'end': {'hour': 8, 'minute': 00}} | |
sleep_time = 30 | |
def get_dnd_status(): | |
enabled = None | |
status = subprocess.check_output(['gsettings', 'get', 'org.gnome.desktop.notifications', 'show-banners']).strip().decode() |