Skip to content

Instantly share code, notes, and snippets.

View prateek27's full-sized avatar

Prateek Narang prateek27

View GitHub Profile
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)
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()
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
#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){
#include<iostream>
using namespace std;
int main(){
float p = 1;
//p denotes prob of 2 ppl having different birthday
// same bday = 1 - p
#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++)
{
#include<iostream>
#include<queue>
#include<vector>
#include<functional>
#include<cstring>
using namespace std;
//To Compare Integers
class myComparison{
public:
#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;
}
}
#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;}
#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;}