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
from celery import shared_task | |
from selenium import webdriver | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
from django.core.mail import send_mail | |
from django.conf import settings | |
TESLA_URL = 'https://www.tesla.com/en_CA/inventory/new/my?TRIM=LRAWD&PAINT=BLACK&ADL_OPTS=TOWING&arrangeby=plh&zip=h4r0j1&range=200' |
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
''' | |
>centris-property-checker.py< | |
@Author: Maxwell Mowbray | |
@Email: [email protected] | |
@Date: February 2021 | |
@Description: | |
This script will periodically check a Centris personal link for new properties. | |
When a new property appears, the user is notified with a popup. |
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
''' | |
Maxwell Mowbray 2020 | |
This simple program traverses an acyclic, weighted, and directed graph of flights across Canada. | |
It finds all of the valid paths from the source to the destination city, and prints all the hops and the total time. | |
''' | |
# edge |
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
''' | |
>tesla-inventory-price-scraper.py< | |
@Author: Maxwell Mowbray | |
@Email: [email protected] | |
@Date: April 2020 | |
@Description: | |
This script scrapes Tesla's car inventory website and alerts the user if a car under a certain price appears. | |
It can easily be adapted to do other things with the results, such as alert you when a specific car with a specific trim/color/wheel size appears in inventory. |
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
public class FizzBuzz { | |
public static void main(String[] args) { | |
String output; | |
for(int i = 1; i <= 100; i++){ | |
if(i % 3 == 0 || i % 5 == 0){ | |
output = ""; |
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
//put this just before the 'break;' of switch 'case MotionEventActions.Down:' in MapView | |
float u = (_lastTouchX-_translateX)/(_map.CurrentFloor.Image.IntrinsicWidth*_scaleFactor) + 0.50f; | |
float v = (_lastTouchY-_translateY)/(_map.CurrentFloor.Image.IntrinsicHeight*_scaleFactor) + 0.50f; | |
Log.Wtf("map_press", String.Format("Map Touched: (u,v):({0},{1}", u, v)); |
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
<rdf:RDF | |
xmlns = "http://www.example.com/university#" | |
xml:base = "http://www.example.com/university#" | |
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:xsd = "http://www.w3.org/2001/XMLSchema#" | |
> | |
<!-- RDF Schema (Domain Model) --> |
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
int image_width = 4; | |
int image_height = 5; | |
for (int y = 0; y < image_height - 1; y++) { | |
for (int x = 0; x < image_width - 1; x++) { | |
System.out.println("(" + ((y * image_width) + x) + "," + ((y * image_width) + x + 1) + "," + (x + ((y+1) * image_width)) + ")"); //top triangle indices | |
System.out.println("(" + ((y * image_width) + x + 1) + "," + (x + 1 + ((y+1) * image_width)) + "," + (x + ((y+1) * image_width)) + ")"); //bottom triangle indices | |
} |
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
// This method accepts a list of strings, where each string is a path (eg. "home/user/max/pic.png") | |
// and creates a hierarchical XML tree out of them | |
using System.Collections.Generic; | |
using System.Xml.Linq; | |
using System.Linq; | |
public string GetTreeViewXml(List<string> paths) | |
{ | |
XDocument doc = new XDocument(new XElement("ul")); |
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
// -------------------------------------------------------------------------------------------------------- | |
// Recursion249.java | |
// Written by: Maxwell Mowbray | |
// For COMP 249 Section PP - Tutorial PB - Winter 2014. | |
// These are the questions from the COMP 249 final which dealt with recursion | |
// -------------------------------------------------------------------------------------------------------- | |
public class Recursion249 | |
{ | |
public static int count = 0; |