Skip to content

Instantly share code, notes, and snippets.

@harshityadav95
harshityadav95 / shell
Created April 28, 2020 20:29
installing Latest Version of Node.js on Ubuntu 20.04 LTS
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt install nodejs
@harshityadav95
harshityadav95 / script.py
Last active January 15, 2024 09:34
Archived : Initialise CUDA environment on Google Colab
!apt-get --purge remove cuda nvidia* libnvidia-*
!dpkg -l | grep cuda- | awk '{print $2}' | xargs -n1 dpkg --purge
!apt-get remove cuda-*
!apt autoremove
!apt-get update
!wget https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb
!dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb
!apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub
!apt-get update
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
print('My rank is ',rank)
@harshityadav95
harshityadav95 / bgp.c
Created August 6, 2019 13:06
Border Gateway Code
#include <stdio.h>
#include <conio.h>
int main()
{
int n;
int i, j, k;
int a[10][10], b[10][10];
printf("\n Enter the number of nodes:");
scanf("%d", &n);
for (i = 0; i < n; i++)
@harshityadav95
harshityadav95 / Code.cpp
Created May 5, 2019 00:00
Student Management System
// Tuapin System Student Management System
#include <iostream>
#include <string.h>
using namespace std;
const int m = 50;
class student
{
private:
int student_id;
string student_name;
@harshityadav95
harshityadav95 / Index.txt
Created October 19, 2018 07:32
RBR Algorithm and Data Structure and Interview Video Index
##################
Time and Space Analysis
#################
Time complexity Analysis of iterative programs
Video :Time analysis of recursive program
Video :Comparing various functions to analyse time comple...
Video : Masters theorem
@harshityadav95
harshityadav95 / Code.c
Created October 13, 2018 16:16
Merge Sort
#include <stdio.h>
void mergeSort(int [], int, int, int);
void partition(int [],int, int);
int main()
{
int list[50];
int i, size;
class MultithreadingDemo extends Thread{
public void run(){
System.out.println("My thread is in running state.");
}
public static void main(String args[]){
MultithreadingDemo obj=new MultithreadingDemo();
obj.start();
}
}
@harshityadav95
harshityadav95 / app.log
Created June 11, 2018 12:11
Multiple MultiLine Log File
=-=-=-=-=-=-=-=-
Timestamp: Friday, May 11, 2018 7:45:26 AM
Message: DeadUser
Category: ErrorLogging
Priority: -1
EventId: 1
Severity: Information
Title:
Machine: SERVER117
Application Domain: abc.exe
@harshityadav95
harshityadav95 / filebeat.log
Last active June 7, 2018 09:37
Log File of Running File Beat as Service
2018-06-07T13:28:35.061+0530 INFO instance/beat.go:468 Home path: [C:\Program Files (x86)\ELK\filebeat] Config path: [C:\Program Files (x86)\ELK\filebeat] Data path: [C:\Program Files (x86)\ELK\filebeat\data] Logs path: [C:\Program Files (x86)\ELK\filebeat\logs]
2018-06-07T13:28:35.070+0530 INFO instance/beat.go:475 Beat UUID: 4f256bbb-e649-4518-a5ae-63f0e7b349c3
2018-06-07T13:28:35.070+0530 INFO instance/beat.go:213 Setup Beat: filebeat; Version: 6.2.4
2018-06-07T13:28:35.071+0530 INFO elasticsearch/client.go:145 Elasticsearch url: http://localhost:9200
2018-06-07T13:28:35.071+0530 INFO pipeline/module.go:76 Beat name: HarshitWin10
2018-06-07T13:28:35.072+0530 WARN [cfgwarn] instance/beat.go:283 DEPRECATED: -configtest flag has been deprecated, use configtest subcommand Will be removed in version: 6.0
2018-06-07T13:28:35.072+0530 INFO [monitoring] log/log.go:97 Starting metrics logging every 30s
2018-06-07T13:28:35.192+0530 INFO [monitoring] log/log.go:132 Total non-zero metrics {"monitoring": {"metrics": {"