Simple overview of use/purpose.
An in-depth paragraph about your project and overview of use.
#sklearn.metrics has a mean_squared_error function. The RMSE is just the square root of whatever it returns. | |
#source:https://intellipaat.com/community/1269/is-there-a-library-function-for-root-mean-square-error-rmse-in-python | |
from sklearn.metrics import mean_squared_error | |
from math import sqrt | |
rms = sqrt(mean_squared_error(y_actual, y_predicted)) |
env=~/.ssh/agent.env | |
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } | |
agent_start () { | |
(umask 077; ssh-agent >| "$env") | |
. "$env" >| /dev/null ; } | |
agent_load_env |
If you reset --hard, it will make your local code and local history be just like it was at that commit: <commit hash> | |
git reset --hard <commit hash> |
And if you reset --soft, it will move your HEAD to where they were , but leave your local files etc. the same: | |
git reset --soft <commit hash> |
//Outer loop | |
for (int i = 0; i < nums.length; i++ ) { | |
//inner loop | |
for(int j = i + 1; j < nums.length; j++){ | |
int temp = 0; | |
if(nums[j] < nums[i]) { | |
//checking elements | |
temp = nums[i]; | |
nums[i] = nums[j]; |
class Solution { | |
public boolean searchMatrix(int[][] matrix, int target) { | |
boolean found = false; | |
outer:for(int[] array : matrix) | |
{ | |
for(int item : array){ | |
if(item == target){ | |
found = true; |
int intSample = 1; | |
BigDecimal.valueOf((double)intSample); |
//This is how a ternary operator works: | |
//<condition to check> ? <what happens if the condition is true> : <what happens | |
//if the condition is false>; | |
//Credit Union System example with evaluating fees. | |
function getFee(isMember: boolean): string { | |
return (isMember ? '$2.00' : '$10.00'); | |
} |
static getDateTime(): string { | |
const today = new Date(); | |
const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate(); | |
const time = today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds(); | |
const dateTime = date + ' ' + time; | |
return dateTime; | |
} |