π§βπ»
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
echo "TEST-1 Google" | |
foo=$(ping -c 100 google.com | grep rtt) | |
echo "FOO: $foo" | |
echo $foo | awk -F' = ' '{print $2}' | awk -F'/' '{print "RTT Stats: \nMin: " $1 "\nAverage: " $2 "\nMaximum: " $3 "\nMdev: "$4}' | |
echo "RESULT : Poor Internet" & | |
avg=$(echo $foo | awk -F' = ' '{print $2}' | awk -F'/' '{print $2}') | |
echo "AVG: $avg" |
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 <iostream> | |
#include <string> | |
using namespace std; | |
class Number; | |
class Integer; | |
class Rational; | |
class Number | |
{ |
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 <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
using namespace cv; | |
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 <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
using namespace cv; | |
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
# Load the raw training data and replace missing values with NA | |
training.data.raw <- read.csv('train.csv',header=T,na.strings=c("")) | |
# Output the number of missing values for each column | |
sapply(training.data.raw,function(x) sum(is.na(x))) | |
# Quick check for how many different values for each feature | |
sapply(training.data.raw, function(x) length(unique(x))) | |
# A visual way to check for missing data |
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
#-------------------Retrieving and Cleaning Data-------------- | |
data = read.csv("filter.csv",header=T, na.strings=c("")) | |
sapply(data, function(x) sum(is.na(x))) | |
data = subset(data,select=c(2,3,5,6,7,8,10,12)) | |
data$Age[is.na(data$Age)] = mean(data$Age, na.rm = T) | |
#is.factor(data$Sex) | |
#is.factor(data$Embarked) | |
data = data[!is.na(data$Embarked),] | |
rownames(data) = NULL | |
trainData = data[1:800,] |
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
https://search-siddtest-xcno5mgnsqidqwrzg2js25i5ge.us-west-2.es.amazonaws.com/_plugin/kibana/#/visualize/ | |
create?type=histogram&indexPattern=plivoredshift&_g=()&_a=( | |
filters:!(), | |
linked:!f, | |
query:( | |
query_string: | |
(analyze_wildcard:!t,query:'*')),vis: | |
(aggs:!((id:'1',params:(),schema:metric,type:count), | |
(id:'3',params:(field:cloud_rate,order:desc,orderBy:'1',size:5), |
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
#!/usr/bin/env python | |
""" | |
author: [email protected] | |
version: 0.0.1 | |
Reads the buy details from a csv file (coins.csv) and calculates the wallets profit | |
Uses Koinex API tracker | |
csv format | |
Coin,Date,Quantity,BuyPrice,Cost |
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
MAX = 999999999 | |
def get_min(a, b, c, index): | |
if a <=b and a <=c: | |
return a, index -1 | |
if b <=a and b <= c: | |
return b, index // 2 | |
if c <= a and c <= b: | |
return c, index // 3 |
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
class SudokuSolver: | |
# Initializing required variables and validate board | |
def __init__(self, board, boardSize=9, boxSize=3): | |
self.boardSize = boardSize | |
self.boxSize = boxSize | |
self.board = board | |
self.__validateBoard__() | |
# Validate if the board is of the proper format else throw an exception | |
def __validateBoard__(self): |
OlderNewer