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
<ruleset name="Custom Rules" | |
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> | |
<description> | |
Design ruleset without loose pacakge coupling | |
</description> | |
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
#include <vector> | |
#include <algorithm> | |
#include <iostream> | |
// Write your code here | |
int binary_search(const std::vector<int> &a, int e) | |
{ | |
int l = 0; | |
int r = a.size() - 1; | |
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
# Title: Tennis Draw Parser | |
# Author: Nathan Esau | |
library(XML) | |
options(warn = -1) # suppress warnings | |
# Get all draws for current year | |
url = "https://www.atpworldtour.com/en/scores/results-archive?year=2017" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
OBJS = main.o matrix.o matrix_ops.o survival_models.o UL.o | |
CC = g++ -std=c++11 | |
DEBUG = -g | |
LFLAGS = -Wall $(DEBUG) | |
CFLAGS = -Wall -c $(DEBUG) | |
main: $(OBJS) | |
$(CC) $(OBJS) $(LFLAGS) -o main | |
main.o: main.cpp survival_models.cpp UL.cpp |
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
library(XML) | |
# parses boxscores from hockey-reference.com. | |
# Note program may take several hours to run. | |
# change wd to folder where data should be stored | |
# change months and year variables to date range preferred | |
setwd("~/Desktop/Hockey") | |
months <- c("03", "04", "10", "11", "12") | |
days <- as.character(seq(1,31)) | |
for(i in 1:31) if(nchar(days[i])==1) days[i] = paste0("0",days[i]) |
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
Description='eduroam' | |
Interface='wlp3s0' | |
Connection='wireless' | |
IP='dhcp' | |
ESSID='eduroam' | |
Security='wpa-configsection' | |
WPAConfigSection=( | |
'ssid="eduroam"' | |
'key_mgmt=WPA-EAP' | |
'eap=PEAP' |
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
% exam2.cls | |
% | |
% A LaTeX2e document class for preparing exams. | |
%% exam.cls | |
%% Copyright (c) 1994, 1997, 2000, 2004, 2008, 2011, 2015 Philip S. Hirschhorn | |
% | |
% This work may be distributed and/or modified under the | |
% conditions of the LaTeX Project Public License, either version 1.3 | |
% of this license or (at your option) any later version. |
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
# produce plots and CSV files with looping rather than pasting repeated commands | |
library(moments) | |
setwd("~/Documents/TBP_Plan_1/FR_before_adj/") | |
# Load data files | |
load("Study1a_M_F0_100_vf1_FR_before_adj.RData") | |
load("Study1b_M_F0_100_vf1_FR_before_adj.RData") | |
load("Study2b_M_F0_100_vf1_FR_before_adj_1000scen.RData") | |
load("Study3b_M_F0_100_vf1_FR_before_adj_1000scen.RData") |
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
# in progress | |
import random | |
class card: | |
def __init__(self, num, suit): | |
self.num = num # card num | |
self.suit = suit # card suit | |
self.value = self.points() | |
def rank(card): |