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

Intro To Programming: With Python

Wednesday July 29, 2015

@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 / 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
#------------------------------------------------------------------------------
-- LUA SYNTAX (WIP)
-- PRINTING
-- Print a string
print("Hello World")
-- Print multiple strings
print("Hello","World")
-- Join/Concatenate two strings (gives errors if not strings)
# WIP
# By the Tutorial Doctor
# CLASSES
#------------------------------------------------------------
class Element:
count = 0
def __init__(self):
self.tag = 'p'
self.id = "elementID"
self.html = "<%s id=\"%s\"></%s>"%(self.id,self.tag,self.tag)
@TutorialDoctor
TutorialDoctor / GDscript.gd
Last active October 26, 2015 11:33
Syntax of the Godotscript language
extends Node2D
# Godot Script Syntax
# By the Tutorial Doctor
# Fri Oct 2 23:58:22 EDT 2015
#-----------------------------------------------------------
# VARIABLES | DATA TYPES |
#-----------------------------------------------------------
# String
var name = "Tutorial Dcotor"
#-----------------------------
# Godot Code Snippets (2D) |
# By the Tutorial Doctor |
# Fri Sep 18 13:14:07 EDT 2015|
#-----------------------------
# MAKE AN OBJECT FOLLOW THE MOUSE
func followMouse(x):
var mouse_position = get_viewport().get_mouse_pos()
@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'