Skip to content

Instantly share code, notes, and snippets.

@bmontana
bmontana / slideshow.html
Created Apr 26, 2018
Slideshow template for Kiosk Project
View slideshow.html
{% load static %}
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" type="text/css" href="{% static 'kiosk/slideshow.css' %}"/>
{% comment %}
<script type="text/javascript" src="{% static 'kiosk/scripts/exitshow.js' %}"></script>
<script type="text/javascript" src="{% static 'kiosk/scripts/slideshow.js' %}"></script>
{% load js %}
<script language="JavaScript">
<!--
function slideshow() {
@bmontana
bmontana / slideshow.css
Created Apr 26, 2018
Slideshow CSS for Kiosk Project
View slideshow.css
#frame {
border-collapse: collapse;
border-style: none;
border-width: 0;
width: 100%;
height: 100vh;
}
.frame-top {
height: 10vh;
background-color: #005395;
@bmontana
bmontana / views.py
Created Apr 26, 2018
Views for Kiosk Project
View views.py
from django.http import Http404
from django.shortcuts import render
from .models import Calendar
from icalevents.icalevents import events
from datetime import datetime, timedelta, date
from pytz import utc, timezone
import os
import json
@bmontana
bmontana / U12_Ex01_DicePoker_U12_Ex01_HelpScreen.py
Last active Apr 23, 2018
Dice Poker Game with splash screen, help, and high score features
View U12_Ex01_DicePoker_U12_Ex01_HelpScreen.py
# U12_Ex01_HelpScreen.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 18 Apr 2018
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 1
@bmontana
bmontana / U11_Ex19_Set.py
Created Mar 23, 2018
Classical set class with the following methods: addElement, deleteElement, member, intersection, union, & subtract.
View U11_Ex19_Set.py
# U11_Ex19_Set.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 22 Mar 2018
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 19
@bmontana
bmontana / U11_Ex07_InnerProd.py
Created Mar 21, 2018
Computes the inner product of two arrays (lists). The lists must be the same length as each other. The inner product is the sum of the products of elements with matching indices from each array.
View U11_Ex07_InnerProd.py
# U11_Ex07_InnerProd.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 20 Mar 2018
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 7
@bmontana
bmontana / U11_Ex05_ListOperations.py
Created Mar 20, 2018
Algorithms and code for these Python List operations: myList.count(), x in myList, myList.index(), myList.reverse(), myList.sort()
View U11_Ex05_ListOperations.py
# U11_Ex05_ListOperations.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 20 Mar 2018
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 5
View students.dat
Adams, Henry 127 228
Computewell, Susan 100 400
DibbleBit, Denny 18 41.5
Jones, Jim 48.5 155
Smith, Frank 37 125.33
@bmontana
bmontana / gpa.py
Created Mar 1, 2018
Program to find student with highest GPA
View gpa.py
# gpa.py
# Program to find student with highest GPA
class Student:
def __init__(self, name, hours, qpoints):
self.name = name
self.hours = float(hours)
self.qpoints = float(qpoints)
@bmontana
bmontana / roller.py
Created Feb 28, 2018
Graphics program to roll a pair of dice. Uses custom widgets Button and DieView.
View roller.py
# roller.py
# Graphics program to roll a pair of dice. Uses custom widgets
# Button and DieView.
from random import randrange
from graphics import GraphWin, Point
from button import Button
from dieview import DieView