Skip to content

Instantly share code, notes, and snippets.

View joetechem's full-sized avatar
💭
Focusing on Cloud Arch responsibilities

joe joetechem

💭
Focusing on Cloud Arch responsibilities
View GitHub Profile
@joetechem
joetechem / temp_converter_gui.py
Last active April 5, 2018 17:41
Simple temperature converter (celsius to fahrenheit), with a GUI, using graphics.py by John Zelle
"""
Simple temperature converter (celsius to fahrenheit), with a GUI.
Adapted from graphics.py by John Zelle (https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/assignments/graphics.py)
"""
# Make sure to place this file in the same place as graphics.py (from the above source)
from graphics import *
def main():
win = GraphWin("Celsius Converter", 400, 500)
win.setCoords(0.0, 0.0, 3.0, 4.0)
@joetechem
joetechem / README.md
Created January 28, 2018 22:54 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@joetechem
joetechem / my_first_turtle.md
Last active January 28, 2018 21:33
python, turtle, loops, functions, parameters, arguments, encapsulation, generalization

Quick Intro to Turtle Graphics with Python

Author: Joe

01/26/2018

Objectives:

  • Turtle Graphics Module
  • Recognizing Patterns
  • Python Loops
@joetechem
joetechem / basic_calculator.py
Last active January 17, 2018 21:05
representing a basic calculator using python
"""
A calculator program that tells the computer to ask a user for two numbers to calculate, then returns the answer
from the user's input. Python automatically considers what the user types in as a string.
This text and the text above is surrounded by 3 double quotes, which makes it a "docstring".
Docstrings are one way to convey what is happening in a program, or what is supposed to happen, they do not have a program "do" anything.
"""
# Any line that starts with a pound sign (#) is known as a comment, Python knows to ignore comments.
# Comments are useful for explaining what you are doing in a program to yourself or someone else who might
"""
Object Oriented Programming (Thanksgiving Giving style)
We start defining classes with Animals.
We can define that parent of the class, Animals, as well as the parent of that class.
However, to save time we start at Animals. Starting here; instead of
directly at the turkey class, should help keep in mind we can define everything
under the sun using OOP is we wanted to. Again, we will save time!
"""
@joetechem
joetechem / calculator_turtle_params.py
Last active October 24, 2017 17:29
turtle calculator with generalization
import turtle
def calc(number1, number2, operation, text_color, bg_color):
if operation == "+":
answer = number1 + number2
elif operation == "-":
answer = number1 - number2
elif operation == "*":
answer = number1 * number2
@joetechem
joetechem / calculator_simple_turtle.py
Created October 24, 2017 17:15
Writes the answer when a simple calculator program is run
import turtle
number1 = int(raw_input("Give me a number: "))
number2 = int(raw_input("Give me another number: "))
operation = raw_input("Give me an operator:" )
if operation == '+':
a = number1 + number2
elif operation == '-':
@joetechem
joetechem / ANODE_ACTIONS.py
Last active August 20, 2017 17:16
Items in a Python dictionary containing daily positive challenges
ANODE_ACTIONS = {
"Hold the door open for someone today.": "Hold the door open for someone today.",
"Give someone a compliment.": "Give someone a compliment.",
"Get your body moving. Do some form of exercise!": "Get your body moving. Whatever you are able to do just get moving! From jumping jacks to yard work. Whatever you decide, Exercising can help offset depression, anxiety, and stress.",
"Listen to or read a positive or uplifting message": "Listen or read a positive message, or has uplifting content. The variety of subject matter, the better.",
"Eat some veggies today!": "Eat a serving of at least two veggies today.",
"Thank a person that has helped you.": "Think about how a person has helped you in some way. This could either be a friend, family member, colleague, teacher, or even a pet. And go ahead and thank them. This can go a long way in making another feel good.",
"Take a cold shower!": "Take a cold shower. Yes. Cold. Studies show, taking a cold shower can increase oxygen
import RPi.GPIO as GPIO
DEBUG = 1
GPIO.setmode(GPIO.BCM)
GREEN_LED = 4
RED_LED = 5
BLUE_LED = 26
@joetechem
joetechem / fav_color.py
Last active May 16, 2017 15:35
A simple I/O python program with a while loop.
"""
A simple program asking a user to guess the "computer's" favorite color.
The favorite color of the computer is set in a variable, favColor.
The computer checks the user's input to match the favColor variable.
If it is any color other than the computer's favorite color, the loop continues.
Otherwise, the loop is ended when the flag is set to False (or, the user enters the
exact string equal to the favColor variable.
This will be a given program that students in Game Design will execute. Once executed, they
will be prompted with a challenge to create their own program which models the concepts in