Skip to content

Instantly share code, notes, and snippets.

View vnkdj5's full-sized avatar
πŸ‘¨β€πŸ’»
Improving Skills

Vaibhav Kumbhar vnkdj5

πŸ‘¨β€πŸ’»
Improving Skills
View GitHub Profile
@vnkdj5
vnkdj5 / matVecMul.cu
Created July 1, 2019 12:57
Matrix-Vector Multiplication parallel program in CUDA
#include<iostream>
#include<cstdlib>
#include<cmath>
#include<time.h>
using namespace std;
__global__ void matrixVectorMultiplication(int *a, int *b, int *c, int n)
{
int row=threadIdx.x+blockDim.x*blockIdx.x;
@vnkdj5
vnkdj5 / matrixMulCUDA.cu
Created July 1, 2019 12:53
Multiply two N Γ— N arrays using n 2 processors program using CUDA
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
//Matrix multiplication Cuda
__global__ void matrixMultiplication(int *a, int *b, int *c, int n)
{
int row=threadIdx.y+blockDim.y*blockIdx.y;
int col=threadIdx.x+blockDim.x*blockIdx.x;
@vnkdj5
vnkdj5 / vectorAddition.cu
Created July 1, 2019 12:52
Vector additon cuda program
#include<iostream>
#include<cstdlib>
using namespace std;
//VectorAdd parallel function
__global__ void vectorAdd(int *a, int *b, int *result, int n)
{
int tid=threadIdx.x+blockIdx.x*blockDim.x;
if(tid<n)
@vnkdj5
vnkdj5 / sentence.l
Created May 3, 2019 06:51
YACC specifications to implement syntax analysis phase of compiler to recognize simple and compound sentences given in input file.
%{
#include "y.tab.h" //Contains Token Definiation
%}
%%
[\t ] ; //IGNORE WHITE SPACES
am|is|are|have|has|can|will|shall|eat|sing|go|goes { printf("VERB\t==>%s\n",yytext);return VERB;}
very|simply|gently { printf("VERB\t==>%s\n",yytext);return(ADVERB); }
and|or|also|so|but|if|then {printf("CONJUNCTION\t==>%s\n",yytext);return (CONJUNCTION);}
fast|good|honest {printf("ADJECTIVE\t==>%s\n",yytext);return (ADJECTIVE);}
I|he|she|we|they|you|this {printf("PRONOUN\t==>%s\n",yytext);return (PRONOUN);}
@vnkdj5
vnkdj5 / input.txt
Created May 3, 2019 06:38
Input file for SPOS B4
int a,b,c,d=10;
%{
#include <stdio.h>
#include "y.tab.h"
%}
DIGIT [0-9]
REAL {DIGIT}+[.]{DIGIT}*
LETTER [A-Za-z]
ASSIGN =
@vnkdj5
vnkdj5 / input
Created May 2, 2019 16:15
Word Count Program using Lex
vaibhav kumbhar
3434
PICT
@vnkdj5
vnkdj5 / dependancies.py
Created April 17, 2019 15:31
HIndi POS Tagging dependancies
import nltk
nltk.download('indian')
nltk.download('punkt')
@vnkdj5
vnkdj5 / AES.java
Created April 6, 2019 18:44
Advanced Encyption Standard Client Server Implementation in Java
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Base64;
import javax.crypto.*;
import sklearn
import numpy as np
import pandas as pd
buy = pd.read_csv('buys.csv')
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier