This file contains hidden or 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 random | |
# Values given in table 3 | |
# In the format [car, transit, taxi] | |
given_mode_choice_probabilities = [ | |
[0.75, 0.23, 0.02], | |
[0.93, 0.06, 0.01], | |
[0.21, 0.41, 0.38], | |
[0.09, 0.24, 0.67], | |
[0.66, 0.13, 0.21], |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/** | |
* First, compile the program using clang or gcc | |
* Then, run the program using: ./hw2_better <value of N> <number of runs> <print? T/F=1/0> | |
* Output is in the file 'out.data', with each run on its own line | |
* --- | |
* Example run: ./hw2_better 20 1 1 will run the program once with N=20, printing out the | |
* contents of the handshake array (how many times each pair of students shook hands) | |
* | |
* Example output: | |
* 0 1 2 3 4 |
This file contains hidden or 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
// Change these as you see fit | |
const BLOCKID = "#block-7c7d6afc1405682f08c2"; // block ID of Squarespace block, found via Inspect Element | |
const TEXT = ["text 1", "text 2", "text 3"]; | |
const DELAY = 1000; // in milliseconds | |
let currentIndex = 0; | |
function textChanger() { | |
console.log("fire"); |
This file contains hidden or 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 "CheckValidity.h" | |
#include <iostream> | |
using namespace std; | |
int main() { | |
vector<int> hand = {1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 6}; | |
string validHand = (isValidHand(hand)) ? "true" : "false"; | |
cout << "Hand is valid: " << validHand << endl; |
This file contains hidden or 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
addEventListener('fetch', event => { | |
const request = event.request; | |
let url = new URL(request.url); | |
console.log(request.url); | |
console.log(url); | |
if (url.protocol == "http:") | |
url.host = 'dragonfruit.tk:8080'; | |
else if (url.protocol == "https:") |
This file contains hidden or 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
/* Copyright 2020 minghao912 | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or 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
/* "Brink" by Valerio Lyndon | |
* Version 1.5.0 | |
* | |
* = TABLE OF CONTENTS = | |
* | |
! IMPORTS | |
* | |
! VARIABLES | |
@ User | |
@ Internal |
This file contains hidden or 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
/* Copyright 2020 minghao912 | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
NewerOlder