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
"if you're unsure, every setting is avalable in the help menu | |
"just type :help (setting) to check what every setting does | |
set mouse=a "mouse controls | |
set shiftwidth=3 "number of spaces per tab | |
set tabstop=3 | |
set expandtab "spaces instead of tabs | |
set smarttab | |
set ai "automatically indent line when pushing enter set si "smart indent | |
"set lbr "automatic line break | |
"set tw=94 |
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
############################################### | |
## Filename: Makefile | |
## Author: Daniel Guenther | |
## Date: 2018-01-31 | |
## Purpose: To quickly create and run test cases for a small program | |
############################################### | |
program=gcl -f lab3.cl | |
testdir=Tests |
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
// example program which throws a class exception | |
#include <iostream> | |
using namespace std; | |
// my error class | |
class WrongFormat{ | |
public: | |
string what(){ | |
return string("Wrong Format!"); | |
} |
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
# builds a roadmap of Vancouver, coloured by road suffix | |
# most of the code taken from github.com/erdavis1/RoadColors | |
# install the packages, you only need to do this once. | |
install.packages(c('sf', 'foreign', 'tidyverse', 'lwgeom')) | |
# load in the necessary libraries | |
library(sf) | |
library(foreign) | |
library(tidyverse) |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import cv2 | |
def getFaceCrop(image): | |
# get image classifier | |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) | |
image_copy = np.copy(image) | |
gray_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) | |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') |
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
// ==UserScript== | |
// @name YouTube Persistent Live Chat | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Try to keep youtube livestream chat in "live chat" or "live chat replay" mode | |
// @include https://www.youtube.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== |
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
#!/bin/bash | |
function printUsage() { | |
echo "usage: bash $0 -i <inurl> -ss <starttime> -t <duration> -o <outfile>" | |
echo ' other args are passed directly to youtube-dl; eg, -r 40K' | |
} | |
if [ "$#" -eq 0 ]; then | |
printUsage | |
exit |
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
(function getURLTime() { | |
const params = (new URL(document.location)).searchParams | |
if(params.has('v')) { | |
const v = params.get('v'); | |
const ytplayer = document.getElementById("movie_player"); | |
const t = Math.round(ytplayer.getCurrentTime()) | |
const newUrl = `https://youtu.be/${v}?t=${t}`; | |
return newUrl; | |
} | |
return document.location; |
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
# note: zlib-flate is part of the 'qpdf' package | |
tail -c +2 factoriostring.txt | base64 -d | zlib-flate -uncompress |
OlderNewer