Skip to content

Instantly share code, notes, and snippets.

View abhishek-Kumar009's full-sized avatar
🎯
Focusing

Abhishek abhishek-Kumar009

🎯
Focusing
View GitHub Profile
plt.scatter(X[:, 0], X[:, 1], marker = "x")
plt.xlabel('Latency(ms)')
plt.ylabel('Throughput(mb/s)')
dataset = sio.loadmat('anomalyData.mat')
X = dataset['X']
Xval = dataset['Xval']
yval = dataset['yval']
import numpy as np
import matplotlib.pyplot as plt
import scipy.io as sio
import math
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def multivariateGaussian(X, mu, sigma2):
n = np.size(sigma2, 1)
m = np.size(sigma2, 0)
#print(m,n)
if n == 1 or m == 1:
# print('Yes!')
sigma2 = np.diag(sigma2[0, :])
#print(sigma2)
X = X - mu
@abhishek-Kumar009
abhishek-Kumar009 / UncleJohny
Created May 31, 2018 21:57
Uncle Johny problem of codeChef
import java.util.Scanner;
public class uncleJohny {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt(); // Number of test Cases
int i, j, l;