Skip to content

Instantly share code, notes, and snippets.

@bmontana
bmontana / slideshow.html
Created April 26, 2018 15:42
Slideshow template for Kiosk Project
{% 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 April 26, 2018 15:42
Slideshow CSS for Kiosk Project
#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 April 26, 2018 15:41
Views for Kiosk Project
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 April 23, 2018 13:34
Dice Poker Game with splash screen, help, and high score features
# 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 March 23, 2018 23:31
Classical set class with the following methods: addElement, deleteElement, member, intersection, union, & subtract.
# 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 March 21, 2018 02:20
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.
# 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 March 20, 2018 21:54
Algorithms and code for these Python List operations: myList.count(), x in myList, myList.index(), myList.reverse(), myList.sort()
# 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
@bmontana
bmontana / students.dat
Created March 1, 2018 14:39
Data for gpa.py
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 March 1, 2018 14:31
Program to find student with highest GPA
# 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 February 28, 2018 13:39
Graphics program to roll a pair of dice. Uses custom widgets Button and DieView.
# 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