Skip to content

Instantly share code, notes, and snippets.

View TutorialDoctor's full-sized avatar

RaphaelSmith TutorialDoctor

View GitHub Profile
@TutorialDoctor
TutorialDoctor / Menu Starter.py
Last active August 29, 2015 14:25
Menu Starter.py
import ui
from sound import *
# For Pythonista on IOS
# Adding menu elements is now simple. In the UI section, add a custom view.
# Inside of the custom view, add a button
# Create a variable for the view under 'Create Views' following the format
# Add that variable to the menus list
# Add a switch to the main view with a toggle action
@TutorialDoctor
TutorialDoctor / PythonSyntax.py
Last active December 26, 2018 16:47
Python Syntax
# -*- coding: utf -*-
intro = '''Remove tripple quotes around the sections to run the code therein\n'''
__version__ = "0.2"
__py_version__ = "2.7x"
print "Version: "+__version__+'\nPython: '+__py_version__+'\n'
print intro
def title1(name=''):
print '\n' + name.upper() + ':'
print '-'*65

Intro To Programming: With Python

Wednesday July 29, 2015

@TutorialDoctor
TutorialDoctor / PythonRecommendedReading.md
Last active April 25, 2016 01:22
Python Recommended Reading
@TutorialDoctor
TutorialDoctor / SiteStarter.py
Last active February 2, 2017 04:49
Automatically generates simple HTML, CSS, Javascript, and Python files for a website template.
# coding: utf-8
# Place this file in any directory and run it.
# An HTML, CSS, Javascript, and Python file will be generated in the directory.
# Double click the html file to test it in a browser.
# That's it (Edit as you will)
WRITE= 'w'
READ= 'r'
@TutorialDoctor
TutorialDoctor / pycommand.py
Last active September 9, 2015 23:36
This is the start of a simple custom command line python script
# By the Tutorial Doctor
# Mon Aug 24 19:45:19 EDT 2015
# This is the start of a simple custom command line python script
import random
import datetime
import editor
import os
#------------------------------------------------------------------------------
@TutorialDoctor
TutorialDoctor / trafficLight.py
Created August 25, 2015 00:38
The beginning of a simple traffic light program
# Traffic Light
# By the Tutorial Doctor
# THE CLASS
#--------------------------------------------------
class TrafficLight():
GREEN = [1,0,0]
YELLOW = [0,1,0]
RED = [0,0,1]
@TutorialDoctor
TutorialDoctor / fuzzypy.py
Created September 1, 2015 19:34
A Fuzzy Logic Experiment with Python
# Fuzzy Logic experiment (WIP)
# By the Tutorial Doctor
# Objects are not always in one of two states (true or false), but rather in several states at one time.
#(val-min)/(max-min)
#---------------------------------------------------------------------------
#VARIABLES
#------------------------------------------------------------------------------
cold =(1,213)
@TutorialDoctor
TutorialDoctor / Chatbot.py
Last active January 13, 2021 22:25
The start of an AI chatbot in Python
#coding: utf-8
# AI Command
# By the Tutorial Doctor
# Wednesday September 02, 2015 (age relative to this)
# Only add valid commands to the memory
# a single command can trigger several functions
#------------------------------------------------------------------------------
class AI(object):
pass
#------------------------------------------------------------------------------
@TutorialDoctor
TutorialDoctor / procedural_level_generation.py
Created September 3, 2015 22:23
Using Python to model procedural level generation
# -*- coding: utf -*-
# add to soft dev/examples
# By the Tutorial Doctor
# Sep 2, 2015
# Procedural Level Generation
#--------------------------------------------------
# THE CODE