Skip to content

Instantly share code, notes, and snippets.

View peasant98's full-sized avatar

Matt Strong peasant98

View GitHub Profile
@peasant98
peasant98 / secondScreen.html
Created May 9, 2018 17:50
Second screen of CU Boulder court reservation system app
<!DOCTYPE html>
{% load static %} <!-- New line -->
<html lang="en" dir="ltr">
<head>
<title>Court Reservation</title>
<script language = "javascript">
function showReserved(num)
{
from reserveScreen.models import Court
from courts1.models import Loaded_Team,Team,Player
import time
def assigner():
@peasant98
peasant98 / test.cs
Created June 21, 2018 20:47
OCR code for backend of app screen
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Plugin.Media;
using Plugin.Media.Abstractions;
using Microsoft.ProjectOxford.Vision;
using Microsoft.ProjectOxford.Vision.Contract;
#!/bin/python3
import os
import sys
import math
#
# Complete the divisors function below.
#
def divisors(n):
if(n%2==1):
global arr
arr = []
def actualCheck(root):
if root != None:
actualCheck(root.left)
arr.append(root.data)
actualCheck(root.right)
return arr
#!/bin/python3
import os
import sys
def equalStacks(h1, h2, h3):
r1 = list(reversed(h1))
r2 = list(reversed(h2))
def cubeAnalysis(cubeList):
indexMin = cubeList.index(min(cubeList))
# index of the lowest cube
first = cubeList[0:indexMin]
second = cubeList[indexMin:]
# breaking up into two separate subarrays ( image a sloped valley)
firstSort = sorted(first)
# reversing and sorting the first array
reversedFirst = firstSort[::-1]
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the isBalanced function below.
def isBalanced(s):
def textEditor(arr):
word = ""
oneTwosStack = []
for i in arr:
if(i[0] == '1'):
toApp = str(i[2:])
word+=toApp
oneTwosStack.append((1, toApp))
# adding in items
elif(i[0] == '2'):
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the climbingLeaderboard function below.
def climbingLeaderboard(scores, alice):