+
+ {% endfor %}
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/django_projects/todo/todo_app/templates/todo_app/update.html b/Code/eric/django_projects/todo/todo_app/templates/todo_app/update.html
new file mode 100644
index 00000000..c6c6fcf8
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_app/templates/todo_app/update.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ Update
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/django_projects/todo/todo_app/tests.py b/Code/eric/django_projects/todo/todo_app/tests.py
new file mode 100644
index 00000000..7ce503c2
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_app/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/Code/eric/django_projects/todo/todo_app/urls.py b/Code/eric/django_projects/todo/todo_app/urls.py
new file mode 100644
index 00000000..476dd071
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_app/urls.py
@@ -0,0 +1,8 @@
+from django.urls import path
+from .import views
+
+urlpatterns = [
+ path('', views.index, name='index'),
+ path('update/', views.updateTask, name='update'),
+ path('delete/', views.deleteTask, name='delete'),
+]
\ No newline at end of file
diff --git a/Code/eric/django_projects/todo/todo_app/views.py b/Code/eric/django_projects/todo/todo_app/views.py
new file mode 100644
index 00000000..d393334e
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_app/views.py
@@ -0,0 +1,44 @@
+from django.shortcuts import render, redirect
+
+from todo_app.forms import TaskForm
+from .models import *
+
+# Create your views here.
+def index(request):
+
+ tasks = Task.objects.all()
+ form = TaskForm()
+
+ if request.method =='POST':
+ form = TaskForm(request.POST)
+ if form.is_valid():
+ form.save()
+ return redirect('/')
+
+ context = {'tasks': tasks, 'form':form}
+
+ return render(request, 'todo_app/index.html', context)
+
+def updateTask(request, pk):
+ task = Task.objects.get(id=pk)
+ form = TaskForm(instance=task)
+
+ context = {'form': form}
+
+ if request.method == 'POST':
+ form = TaskForm(request.POST, instance=task)
+ if form.is_valid():
+ form.save()
+ return redirect('/')
+ return render(request, 'todo_app/update.html', context )
+
+def deleteTask(request, pk):
+ item = Task.objects.get(id=pk)
+
+ if request.method == 'POST':
+ item.delete()
+ return redirect('/')
+
+ context = {'item': item}
+
+ return render(request, 'todo_app/delete.html', context)
\ No newline at end of file
diff --git a/Code/eric/django_projects/todo/todo_proj/__init__.py b/Code/eric/django_projects/todo/todo_proj/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/Code/eric/django_projects/todo/todo_proj/asgi.py b/Code/eric/django_projects/todo/todo_proj/asgi.py
new file mode 100644
index 00000000..0a358a99
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_proj/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for todo_proj project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo_proj.settings')
+
+application = get_asgi_application()
diff --git a/Code/eric/django_projects/todo/todo_proj/settings.py b/Code/eric/django_projects/todo/todo_proj/settings.py
new file mode 100644
index 00000000..26174604
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_proj/settings.py
@@ -0,0 +1,127 @@
+"""
+Django settings for todo_proj project.
+
+Generated by 'django-admin startproject' using Django 3.2.12.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/3.2/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/3.2/ref/settings/
+"""
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-58)w7vmldg%y6l1-ewg)!fnj8wss!gsus@)aro93ue__4zw=b+'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+
+ 'todo_app',
+]
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'todo_proj.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
+WSGI_APPLICATION = 'todo_proj.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': BASE_DIR / 'db.sqlite3',
+ }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
+
+AUTH_PASSWORD_VALIDATORS = [
+ {
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/3.2/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'America/New_York'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/3.2/howto/static-files/
+
+STATIC_URL = '/static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
diff --git a/Code/eric/django_projects/todo/todo_proj/urls.py b/Code/eric/django_projects/todo/todo_proj/urls.py
new file mode 100644
index 00000000..6cff3a66
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_proj/urls.py
@@ -0,0 +1,22 @@
+"""todo_proj URL Configuration
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/3.2/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path, include
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path('', include('todo_app.urls'))
+]
diff --git a/Code/eric/django_projects/todo/todo_proj/wsgi.py b/Code/eric/django_projects/todo/todo_proj/wsgi.py
new file mode 100644
index 00000000..d87e4976
--- /dev/null
+++ b/Code/eric/django_projects/todo/todo_proj/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for todo_proj project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo_proj.settings')
+
+application = get_wsgi_application()
diff --git a/Code/eric/html/labs/lab_5/index.html b/Code/eric/html/labs/lab_5/index.html
new file mode 100644
index 00000000..b06fdb1c
--- /dev/null
+++ b/Code/eric/html/labs/lab_5/index.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+ Super Caliente Burritos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/html/labs/lab_6/app.py b/Code/eric/html/labs/lab_6/app.py
new file mode 100644
index 00000000..7afbdc5e
--- /dev/null
+++ b/Code/eric/html/labs/lab_6/app.py
@@ -0,0 +1,51 @@
+from crypt import methods
+from unittest import result
+from flask import Flask, render_template, request
+
+app = Flask(__name__)
+
+# route items to the index
+@app.route('/')
+def index():
+ return render_template('index.html')
+
+#route the actual application
+@app.route('/converter', methods = ['POST'])
+def convertor():
+ result = request.form
+
+ user = result['measure_in']
+
+ conversion_in = {
+ 'ft' : .3048,
+ 'mi' : 1609.34,
+ 'm' : 1,
+ 'km' : 1000
+}
+
+conversion_out = {
+ 'ft' : 1/.3048,
+ 'mi' : 1/1609.34,
+ 'm' : 1,
+ 'km' : 1/1000
+}
+
+#build input
+distance=input("what is the distance? ")
+distance=int(distance)
+
+unit_in=input("what are the input units? choose ft, mi, km: ")
+unit_out=input("what are the output units? choose ft, mi, km: ")
+
+#enter sausage maker
+if unit_in in conversion_in and unit_out in conversion_out:
+ converted_to_meters = conversion_in[unit_in]
+ distance_in_meters = converted_to_meters * distance
+ meters_out = conversion_out[unit_out]
+ final_conversion = meters_out * distance_in_meters
+ print(f"{distance}{unit_in} is {round(final_conversion,4)}{unit_out}")
+
+else:
+ print("unit not recognized")
+
+ return render_template('results.html', user=user)
\ No newline at end of file
diff --git a/Code/eric/html/labs/lab_6/templates/index.html b/Code/eric/html/labs/lab_6/templates/index.html
new file mode 100644
index 00000000..ee705387
--- /dev/null
+++ b/Code/eric/html/labs/lab_6/templates/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Unit Converter
+
+
+
Unit Converter
+
+
+
\ No newline at end of file
diff --git a/Code/eric/html/labs/lab_6/templates/results.html b/Code/eric/html/labs/lab_6/templates/results.html
new file mode 100644
index 00000000..e69de29b
diff --git a/Code/eric/js/APIS/app.js b/Code/eric/js/APIS/app.js
new file mode 100644
index 00000000..dcda3069
--- /dev/null
+++ b/Code/eric/js/APIS/app.js
@@ -0,0 +1,62 @@
+console.log("start of code")
+
+const shuffleBtn = document.querySelector("#shuffle-btn")
+const dealBtn = document.querySelector("#deal-btn")
+let deckID = null
+let hands = {
+ dealer: [],
+ player: []
+}
+
+// getCards is a function. leave the () off so it is activated by the click
+shuffleBtn.addEventListener("click", getCards)
+
+dealBtn.addEventListener("click", dealCards)
+
+// this returns a promise causing the app to run out of order and require the .then
+// fetch("https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=1")
+// .then(function(data) {
+// return data.json()
+// }
+// ).then(function(data){
+// console.log(data)
+// })
+
+// async forces the app to go line by line instead of spinning off other threads
+async function getCards() {
+ // await tells the code to hold on until there is a return from the fetch
+ const response = await fetch("https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=1")
+ const data = await response.json()
+ console.log(data)
+ deckID = data.deck_id
+}
+
+async function dealCards(){
+ // the `${}` acts like an f string in python
+ const url = `https://deckofcardsapi.com/api/deck/${deckID}/draw/?count=4`
+ const response = await fetch(url)
+ const data = await response.json()
+
+ hands.dealer = data.cards.splice(0,2)
+ hands.player = data.cards
+ showcards()
+ showcards(true)
+ // console.log(data)
+}
+
+function showcards(dealer = false){
+ const hand = dealer ? hands.dealer : hands.player
+ const selector = dealer ? "#dealer" : "#player"
+ const handContainer = document.querySelector(selector)
+ handContainer.innerHTML = ""
+ for (card of hand){
+ const cardImg = document.createElement('img')
+ cardImg.src = card.image
+ handContainer.append(cardImg)
+ }
+}
+
+
+
+
+console.log("end of code")
\ No newline at end of file
diff --git a/Code/eric/js/APIS/index.html b/Code/eric/js/APIS/index.html
new file mode 100644
index 00000000..bbb6a709
--- /dev/null
+++ b/Code/eric/js/APIS/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ Cards
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/js/redo/app.js b/Code/eric/js/redo/app.js
new file mode 100644
index 00000000..89a2bd8c
--- /dev/null
+++ b/Code/eric/js/redo/app.js
@@ -0,0 +1,61 @@
+// JavaScript redo lab of ROT13 cypher
+
+// Accept input
+let user_string = prompt("Please enter a message: ")
+
+// Make it all lower case
+user_string = user_string.toLowerCase()
+
+// Dictionary
+/*
+let letter_values = {
+ y : 'a',
+ o : 'd',
+ d : 'o',
+ a : 'y'
+}
+*/
+let letter_values = {
+ 'a' : 'n',
+ 'b' : 'o',
+ 'c' : 'p',
+ 'd' : 'q',
+ 'e' : 'r',
+ 'f' : 's',
+ 'g' : 't',
+ 'h' : 'u',
+ 'i' : 'v',
+ 'j' : 'w',
+ 'k' : 'x',
+ 'l' : 'y',
+ 'm' : 'z',
+ 'n' : 'a',
+ 'o' : 'b',
+ 'p' : 'c',
+ 'q' : 'd',
+ 'r' : 'e',
+ 's' : 'f',
+ 't' : 'g',
+ 'u' : 'h',
+ 'v' : 'i',
+ 'w' : 'j',
+ 'x' : 'k',
+ 'y' : 'l',
+ 'z' : 'm'
+}
+// console.log(letter_values)
+// set null variable
+let coded_word = ""
+// Meat Grinder
+function rot13(input) {
+ for (letter of input){
+ // console.log(letter, letter_values[letter])
+ coded_word += letter_values[letter]
+ }
+ return coded_word
+}
+
+let finished = rot13(user_string)
+alert(finished)
+// console.log(coded_word)
+// console.log("string")
\ No newline at end of file
diff --git a/Code/eric/js/redo/index.html b/Code/eric/js/redo/index.html
new file mode 100644
index 00000000..32a7f203
--- /dev/null
+++ b/Code/eric/js/redo/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ ReDo
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/js/todo_list/app.js b/Code/eric/js/todo_list/app.js
new file mode 100644
index 00000000..f51a25d1
--- /dev/null
+++ b/Code/eric/js/todo_list/app.js
@@ -0,0 +1,50 @@
+// add items to a list
+// be able to remove items
+// mark the items as completed and have the text strikethrough
+
+// global variables
+const inputTodo = document.querySelector('#input')
+const inputAdd = document.querySelector('#add')
+const inputList = document.querySelector('#list')
+
+inputAdd.addEventListener('click', addTask)
+
+// task function
+function addTask(){
+ const textTodo = inputTodo.value
+ const addedTask = document.createElement('li')
+ const buttonSpan = document.createElement('span')
+ buttonSpan.textContent = textTodo
+ addedTask.append(buttonSpan)
+ inputList.appendChild(addedTask)
+ inputTodo.value = ''
+
+ // complete button with strikethrough
+ const completeButton = document.createElement('button')
+ completeButton.textContent = 'Complete'
+ addedTask.append(completeButton)
+
+ // remove button that makes it disappear
+ const removeButton = document.createElement('button')
+ removeButton.textContent = 'Remove'
+ addedTask.append(removeButton)
+ removeButton.addEventListener('click', function(){
+ inputList.removeChild(removeButton.parentElement)
+ })
+
+ completeButton.addEventListener('click', function(){
+ const buttonParent = completeButton.parentElement
+ const buttonSpan = buttonParent.querySelector('span')
+
+ // create a function to determine if the text is complete
+ if(buttonSpan.style.textDecoration === 'line-through'){
+ buttonSpan.style.textDecoration = 'none'
+ }
+
+ else{
+ buttonSpan.style.textDecoration = 'line-through'
+ inputList.removeChild(buttonParent)
+ inputList.append(buttonParent)
+ }
+ })
+}
\ No newline at end of file
diff --git a/Code/eric/js/todo_list/index.html b/Code/eric/js/todo_list/index.html
new file mode 100644
index 00000000..a338646e
--- /dev/null
+++ b/Code/eric/js/todo_list/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ To Do
+
+
+
+
+
To Do List
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/js/vue_redo/index.html b/Code/eric/js/vue_redo/index.html
new file mode 100644
index 00000000..505159f3
--- /dev/null
+++ b/Code/eric/js/vue_redo/index.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+ Vue ReDo
+
+
+
+
+
+
+
Rock, Paper, Scissors
+
+
+
+
+
+
+
+
Computer chose {{computerSelect}}. The winner is {{result}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/js/vue_redo/test.html b/Code/eric/js/vue_redo/test.html
new file mode 100644
index 00000000..1131a2bc
--- /dev/null
+++ b/Code/eric/js/vue_redo/test.html
@@ -0,0 +1,106 @@
+
+
+
+
+
Rock Paper Scissors
+
+
+
+
+
ScoreBoard
+
+
+
You
+
{{player_score}}
+
+
+
+
+
Opponent
+
{{opponent_score}}
+
+
+
+
+
+
Press on your chosen image and then press PLAYGAME!
+
+
+
+
+
You chose: {{player_choice}}
+
+
+
+
+
+
+
+
Opponents choice: {{opponent_choice}}
+
+
+ {{ winner }}
+
+
+
+
+
\ No newline at end of file
diff --git a/Code/eric/js/vue_todo/index.html b/Code/eric/js/vue_todo/index.html
new file mode 100644
index 00000000..4a38cec7
--- /dev/null
+++ b/Code/eric/js/vue_todo/index.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+