Skip to content

Instantly share code, notes, and snippets.

View Bojne's full-sized avatar

Aaron (Yueh-Han) Huang Bojne

View GitHub Profile
@Bojne
Bojne / index.html
Created May 24, 2021 00:46
Netlify Demo HTML FIle
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/blocks.css/dist/blocks.min.css" />
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌈</text></svg>">
<title>簡單,可愛的一個網站</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/blocks.css/dist/blocks.min.css" />
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌈</text></svg>">
<title>簡單,可愛的一個網站</title>
</head>
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.
library("dplyr")
library("ggplot2")
RawData <- read.csv("https://tinyurl.com/yb4phxx8") # read in the Multilateral Development Institution Data
# {Step 0} Explore the data
names(RawData) # dimensions of the data set
dim(RawData) # quick look at the data structure
# {Step 1} Preprocess the data
df <- data.frame(Father = runif(200, min=150, max=190),
Mother = runif(200, min=140, max=180),
N = 10 * rnorm(200),
Kid = round(mother_h * 0.4 + father_h * 0.6 + noise,2))
print (df)
@Bojne
Bojne / prob.py
Last active October 29, 2018 10:00
“In raquetball, a player continues to serve as long as she is winning; a point is scored only when a player is serving and wins the volley. The first player to win 21 points wins the game. Assume that you serve first and have probability .6 of winning a volley when you serve and probability .5 when your opponent serves. Estimate, by simulation, …
import numpy as np
# Parameters - First game and winning prob.
initial = np.array([0.6,0.4]) #first game
prob_matrix = np.array([[0.6,0.4],[0.5,0.5]])
# Calculate the n product of a vector and prob_matrix
def multiple_dot(vector, n):
if (n == 0):
#include <iostream>
#include <string>
using namespace std;
class Instructor{
public:
Instructor();
Instructor(string faculty, string title, string name, char gendar);
#include<iostream>
using namespace std;
int* create2DArray(int rows,int columus){
int *int_p;
int_p = new int[rows*columus];
return int_p;
}
@Bojne
Bojne / CH08EX02.cpp
Last active November 23, 2017 13:04
#include <iostream>
#include <string>
using namespace std;
string user_input;
string regis_year, campus, course, faculty;
void display(string regis_year,string campus,string course, string faculty);
int main(){
cout << "Please enter your registration number below and press enrer.\n";