Skip to content

Instantly share code, notes, and snippets.

View codewithrajranjan's full-sized avatar
💭
Teaching Mode On

Raj Ranjan codewithrajranjan

💭
Teaching Mode On
View GitHub Profile
@codewithrajranjan
codewithrajranjan / vim-8-configure-command-with-python-3-support
Last active August 22, 2022 05:55
How to configure VIM with Python3 Support
./configure --with-features=huge \
--enable-multibyte \
--enable-python3interp=yes \
--with-python3-config-dir=/usr/bin/python3-config \
--enable-gui=gtk2 \
--enable-cscope \
--enable-fail-if-missing \
--prefix=/usr/local
@codewithrajranjan
codewithrajranjan / VIM Settings
Created August 17, 2018 20:40
This is the the .vimrc setting to configure vim
"###############################################################################
" Genreal settings
"###############################################################################
set backspace=2
syntax on
set autoindent
set shiftwidth=4
set softtabstop=4
set expandtab
set number
@codewithrajranjan
codewithrajranjan / Tern-server-configuration-for-nodejs
Created August 18, 2018 17:40
This is the tern js configuration for nodejs which is needed for YouCompleteMe Plugin
{
"plugins": {
"node": {}
}
}
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
class Edge {
int src;
int dest;
public Edge(int src,int dest) {
this.src = src;
@codewithrajranjan
codewithrajranjan / You are given a list of data with following attributes start time, Rest Api name or service name, end time. You need to find maximum parallelism that got achieved. Example – {{1, A, 4}, {2, B, 3}, {4, C, 10}, {4, D, 7}, {2, E, 4}}. Answer here is 4 b
Created July 5, 2019 16:37
You are given a list of data with following attributes start time, Rest Api name/service name, end time. You need to find maximum parallelism that got achieved. Example – {{1, A, 4}, {2, B, 3}, {4, C, 10}, {4, D, 7}, {2, E, 4}}. Answer here is 4 because at time t=4, there are 4 services running namely A, C, D, E respectively. I was asked to writ…
package selftuts;

import java.util.HashMap;

class Selftuts{

	public static void main(String[] args) {
		
sudo snap install docker
sudo chmod 666 /var/run/docker.sock
import requests
import datetime
import pytz
import smtplib, ssl
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import time
smtp_server = "smtp.gmail.com"
port = 587