Skip to content

Instantly share code, notes, and snippets.

@joetechem
joetechem / temp_converter_gui.py
Last active Apr 5, 2018
Simple temperature converter (celsius to fahrenheit), with a GUI, using graphics.py by John Zelle
View temp_converter_gui.py
"""
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 Jan 28, 2018 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


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 Jan 28, 2018
python, turtle, loops, functions, parameters, arguments, encapsulation, generalization
View my_first_turtle.md

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 Jan 17, 2018
representing a basic calculator using python
View basic_calculator.py
"""
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
View gist:b30ab0aeff77f36eb0df6fed5dd596f6
"""
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 Oct 24, 2017
turtle calculator with generalization
View calculator_turtle_params.py
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 Oct 24, 2017
Writes the answer when a simple calculator program is run
View calculator_simple_turtle.py
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 Aug 20, 2017
Items in a Python dictionary containing daily positive challenges
View ANODE_ACTIONS.py
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
View gist:4ced486f0958e7ce85c67c9eeb29f730
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
A simple I/O python program with a while loop.
View fav_color.py
"""
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
You can’t perform that action at this time.