This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"organizations:ListHandshakesForOrganization", | |
"organizations:InviteAccountToOrganization", | |
"organizations:CancelHandshake", |
This file contains 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 <stdio.h> | |
int main() | |
{ | |
int n, i, num_zeros = 0, num_neg = 0, num_pos = 0, a[100]; | |
printf("Please enter value of N:"); | |
scanf("%d", &n); | |
if(n<=0) | |
{ |
This file contains 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 <stdio.h> | |
#include <limits.h> // Used for INT_MIN | |
int main() | |
{ | |
int n, i, max = INT_MIN, a[100]; | |
double avg = 0.0; | |
printf("Please enter value of N:"); | |
scanf("%d", &n); |
This file contains 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
data = importdata('breastCancer.csv',','); | |
[n,m] = size(data); | |
epsilon = 1e-1; | |
%x(1:n,1:m-1) = 0; | |
y(1:n,1:1) = 0; | |
a = 0.1; | |
%t(1:n,1:1) = 0; |
This file contains 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
data = importdata('breastCancer.csv',','); | |
[n,m] = size(data); | |
x(1:n,1:m-1) = 0; | |
y(1:n,1:1) = 0; | |
t(1:n,1:1) = 0; | |
w_old = zeros(1,m-1); | |
t(:,1) = data(:,1); |
This file contains 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
import csv | |
import random | |
import math | |
import numpy as np | |
from sklearn import cross_validation | |
from sklearn.cross_validation import train_test_split | |
from sklearn.metrics import mean_squared_error, accuracy_score | |
class NaiveBayes: | |
This file contains 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
import numpy as np | |
data=np.random.normal(5, 2**0.5, 1000) | |
split_data=np.split(data,10) | |
means=[] | |
variances=[] | |
for sd in split_data: | |
means.append(np.mean(sd)) |
This file contains 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
import numpy as np | |
from sklearn.cross_validation import train_test_split | |
from sklearn import linear_model | |
from sklearn.metrics import mean_squared_error, accuracy_score | |
import math | |
gammas=[0.001, 0.01, 0.1, 1, 10, 100, 1000] | |
avalues=[0.1, 0.5, 1, 2, 10] |
This file contains 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
import numpy as np | |
from sklearn.cross_validation import train_test_split | |
from sklearn import linear_model | |
from sklearn.metrics import mean_squared_error, accuracy_score | |
data=np.genfromtxt('housing.txt') | |
b=data[:,0] | |
a=data[:,1:] | |
a_train, a_test, b_train, b_test = train_test_split(a, b, test_size=0.40, random_state=42) |
This file contains 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
x=imread('Picture.jpg'); | |
y=rgb2gray(x) ; | |
z=histeq(y); | |
t=im2bw(z); | |
u=double(t); | |
[a b]=size(u); | |
for i=1:a | |
c=1; | |
for j=1:b | |
if u(i,j)==1 |