Skip to content

Instantly share code, notes, and snippets.

View sidd607's full-sized avatar
πŸ§‘β€πŸ’»

Siddartha Sekhar Padhi sidd607

πŸ§‘β€πŸ’»
View GitHub Profile
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"
#include <iostream>
#include <string>
using namespace std;
class Number;
class Integer;
class Rational;
class Number
{
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <vector>
using namespace std;
using namespace cv;
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <vector>
using namespace std;
using namespace cv;
@sidd607
sidd607 / logistic_regression.R
Created March 29, 2016 17:23 — forked from mick001/logistic_regression.R
Logistic regression tutorial code. Full article available at http://datascienceplus.com/perform-logistic-regression-in-r/
# 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
#-------------------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,]
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),
@sidd607
sidd607 / price_tracker.py
Last active February 27, 2019 09:19
Tracks the profit/loss of cryptco currencies through koinex ticker API
#!/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
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
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):