This file contains 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 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 sys | |
complete = False | |
print('Ctrl+C / Ctrl+D to quit at anytime') | |
def bmi(): | |
try: | |
measurement_type = input('(I)mperial or (M)etric?: ') |
This file contains 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 requests | |
get_this = requests.get('https://api.coinmarketcap.com/v1/ticker/?convert=USD&limit=2000') | |
all_dict = {} | |
for each in get_this.json(): | |
ticker = each['symbol'] | |
all_dict[ticker] = {} | |
all_dict[ticker]['rank'] = each['rank'] | |
all_dict[ticker]['price'] = each['price_usd'] |
This file contains 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 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 requests | |
import sys | |
import time | |
try: | |
print('CTRL + D or CTRL + C will close the program at any time.') | |
stock_names_input = input('Stock names separated by \',\' (AAPL, GOOG, TSLA): ') | |
stock_prices_input = input('Stock prices you bought in at separated by \',\' (100.00, 23.31, 493.84): ') |
This file contains 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 requests | |
nu_get = [] | |
print('- Downloading https://adaway.org/hosts.txt') | |
one_get = requests.get('https://adaway.org/hosts.txt') | |
print('- Done\n') | |
print('- Downloading https://hosts-file.net/ad_servers.txt') | |
two_get = requests.get('https://hosts-file.net/ad_servers.txt') |
This file contains 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 | |
picked_num = random.randint(1, 10) | |
counter = 5 | |
def guess_game(counter, picked_num): | |
while counter: | |
try: | |
number = int(input("Please choose a number between 1 and 10: ")) |
This file contains 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 java.io.*; | |
import java.util.*; | |
import com.opencsv.CSVReader ; | |
import com.opencsv.CSVWriter ; | |
import java.net.*; | |
import javax.swing.filechooser.FileFilter; | |
import javax.swing.filechooser.FileNameExtensionFilter; | |
import javax.swing.JFileChooser; | |
import javax.swing.JOptionPane; |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
import csv | |
import Tkinter | |
import tkFileDialog | |
import sys | |
def calc_hours_shift(a_shift): |
This file contains 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 string | |
characters = string.digits + string.ascii_letters | |
random_selection = lambda: [random.choice(characters) for x in range(16)] | |
random_join = ''.join(random_selection()) | |
final_list = [] | |
counter = 1 | |
for each in random_join: |