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
from sklearn.datasets import make_circles | |
from sklearn.datasets import make_blobs | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import make_moons,make_circles,make_classification | |
def load_dataset(dataset): | |
if dataset=='moons': | |
X,Y = make_moons(n_samples=500,noise=0.2,random_state=1) |
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
def check(file1,file2): | |
with open(file1) as f: | |
data1 = f.read() | |
with open(file2) as f: | |
data2 = f.read() | |
words1 = data1.split() | |
words2 = data2.split() | |
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
Apna Time Aayega | |
Uth ja apni raakh se | |
Tu udd ja ab talaash mein | |
Parwaaz dekh parwane ki | |
Aasman bhi sar uthayega | |
Aayega apna time aayega | |
Mere jaisa shaana lala | |
Tujhe na mil payega | |
Yeh shabdon ka jwala |
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> | |
using namespace std; | |
int a[1000]; | |
int BIT[1000]={0}; | |
// Cumulative Sum Query BIT | |
void update(int idx ,int val,int n){ | |
while (idx <= n){ |
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> | |
using namespace std; | |
int main(){ | |
float p = 1; | |
//p denotes prob of 2 ppl having different birthday | |
// same bday = 1 - p |
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<cstdio> | |
#include<deque> | |
using namespace std; | |
int a[1000001]; | |
int main(){ | |
int n,k,i; | |
scanf("%d",&n); | |
for(i=0;i<n;i++) | |
{ |
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<queue> | |
#include<vector> | |
#include<functional> | |
#include<cstring> | |
using namespace std; | |
//To Compare Integers | |
class myComparison{ | |
public: |
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> | |
using namespace std; | |
bool isSafe(int board[][20],int n,int x,int y){ | |
for(int i=0;i<n;i++){ | |
if(board[i][y]==1){ | |
return false; | |
} | |
} |
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<ctime> | |
#define DONE (1<<n)-1 | |
using namespace std; | |
int ans =0; | |
void solve(int row,int ld,int rd,int n){ | |
if(row==DONE){ ans++;return;} |
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<bitset> | |
#include<ctime> | |
using namespace std; | |
bitset<30> col,d1,d2; | |
void solve(int r,int n,int &ans){ | |
if(r==n){ ans++; return;} |
NewerOlder