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 hashlib import sha256 | |
def get_sha256_hash(text): | |
text_bytes = text.encode('utf-8') | |
text_hash = sha256(text_bytes) | |
return text_hash.hexdigest() | |
password_1 = 'hunter2' | |
password_2 = 'hunter2' |
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
# This works fine | |
print("hey " + "you!") | |
# This causes an error because "hey" is a string and 1 is an integer | |
print("hey " + 1) | |
foo = "hey " + 1 # This is an error too | |
print(foo) | |
# This works fine - the argument is an integer |
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
def say_hello(): | |
print("Hello") | |
def say_bye(): | |
print("Bye") | |
def say_sup(): | |
print("Sup?") | |
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 __future__ import print_function # Ignore this | |
# Example 1 - Function with argument | |
def say_hello(name): | |
# Prints 'Hello {name}!' to the screen | |
print("Hello {}!".format(name)) | |
# We 'invoke' / 'call' a function using the ()s | |
say_hello('Nick') |
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
""" | |
Test GUI | |
""" | |
from Tkinter import * | |
import os | |
import subprocess | |
def main(): | |
""" starts up GUI """ |
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
""" | |
Python Script Manager | |
allows user to select a python (.py) script from directory and run it. | |
the script may be selected from a list and run in a command window or opened using a text editor | |
user can navigate folders in ROOT_DIRECTORY | |
TO DO: | |
add 'troubleshoot' to open python intepreter in a separate cmd window |
NewerOlder