This file contains 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
# ball physics code for generic 2D domain | |
# the functions inside() and normal() encode the shape of the ennvironment | |
import simplegui | |
import random | |
import math | |
# Canvas size | |
width = 600 | |
height = 400 |
This file contains 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
# Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil' | |
# within Pythonista as part of installation. It will also overwrite files in directories | |
# named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check | |
# that you have not created any Folders with these names before running this script as | |
# any files inside them will be irretrievably lost. | |
import os | |
import urllib2 | |
import tarfile | |
import shutil | |
import traceback |
This file contains 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
#!/usr/bin/env python | |
# 2014-01-31 | |
# this is a python game that I will start from scratch | |
# it is based on a penalty shoot out, but it could be modified | |
# to be a wwe game for Max!!!!! | |
print "You are about to take part in a penalty shoot out." | |
print "You step up to the spot and place the ball." | |
print "The keeper is looking at you and then smiles!!!" | |
print "Which of the following do you do?" |
This file contains 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
#!/usr/bin/env python | |
# 2014-02-12 | |
# this is a python game that I will start from scratch | |
# it is based on a WWE match | |
# most of the ideas will be a conversion of ex32_football.py | |
# TODO: add the six functions for the options. | |
from sys import exit | |
This file contains 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
#!/usr/bin/python | |
import os | |
import io | |
import sys | |
import shutil | |
import re | |
import string | |
from datetime import date, datetime, time |
This file contains 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
No boost binaries for MSVC 2012 available, so... | |
Delete all other Python versions other than Python 2.7 (not sure if necessary...) | |
Unzip Boost 1.49.0 to C:\Boost\boost_1_49_0 | |
cd into it | |
bootstrap # to create bjam | |
bjam.exe --with-regex --with-python --with-date_time --with-thread link=shared toolset=msvc-11.0 release install -j4 | |
bjam.exe --with-thread --with-date_time toolset=msvc-11.0 release stage -j4 # Then copy from C:\Boost\boost_1_49_0\stage\lib |
This file contains 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
#!/usr/bin/python | |
# encoding: utf-8 | |
""" | |
here is the docstring | |
""" | |
__author__ = 'Ernest' | |
import pygame | |
import sys | |
from pygame.locals import * |
This file contains 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
#!/usr/bin/python | |
# encoding: utf-8 | |
""" | |
Output the structure and other information on a chemical that is entered in line 9 of the code. | |
""" | |
__author__ = 'Ernest' | |
from cinfony import webel | |
mol = webel.readstring("name", "Oestradiol") | |
print "The molecular weight is %.1f" % mol.molwt |
This file contains 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
import math | |
__author__ = 'Ernest' | |
__project__ = "MySimplePythonApplication" | |
class Solver: | |
def demo(self): | |
while True: | |
a = int(input("a ")) | |
b = int(input("b ")) |
This file contains 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
#!/usr/bin/python | |
# encoding: utf-8 | |
""" | |
here is the docstring | |
""" | |
__author__ = 'Ernest' | |
import pygame | |
import sys | |
from pygame.locals import * |
OlderNewer