This file contains 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
* docker run --name mongo-container -d -p 27017:27017 -v data:/data/db mongo | |
* mongo remote_ip [connect to a remote monogodb using mongoshell] | |
* mongo --host mongodb0.example.com --port 27017 | |
* sql:table::nosql:collection | |
* sql:datarow::nosql:document |
This file contains 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
* sudo gpasswd -a user_name[like winter_soilder] lxd [to add user to the lxd group so no sudo is required to execute lxc cmds] | |
* getent group group_name[lxd] [to see the group members] | |
* lxd init [initialize lxd env] | |
* lxc version | |
* lxc help | less |
This file contains 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
* sudo systemctl status docker [check whether docker is running] | |
* getent group docker [check whether we are the memeber of the group, if not then we need | |
to add in the group to run docker commands] | |
* to add in docker group | |
sudo usermod -aG docker ${USER} | |
su - ${USER} | |
* docker pull image_name [pull the image] |
This file contains 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
Resources -> | |
http://rogerdudler.github.io/git-guide/ | |
https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches | |
* git config cmds :- | |
git config --global user.name "user name" | |
git config --global user.email "user email" | |
git config --global color.ui "auto" | |
git config --global core.editor "vim" |
This file contains 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
* man command [manual for a command] | |
* sudo -s passwd [to set root password] | |
* figlet "text here" [show text in design] | |
* grep pattern file_name [find pattern in file] | |
* | [pipe commands, eg: cat file | grep pattern] |
This file contains 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
import gc | |
import numpy as np | |
from pprint import pprint | |
def levenshtein_distance_optimal(pattern, docs, ignore_case=True) -> dict: | |
"""Do a fuzzy matching of documents using levenshtein distance in linear space complexity | |
Parameters | |
---------- |
This file contains 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
import numpy as np | |
from pprint import pprint | |
def levenshtein_distance(pattern, docs, ignore_case=True) -> dict: | |
"""Do a fuzzy matching of documents using levenshtein distance. | |
Parameters | |
---------- | |
pattern : str |
This file contains 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
/* | |
Name: Randomized Quick Sort | |
Author: Gaurav Sharma | |
Date: 29-04-19 15:34 | |
Description: A simple c++ program to sort an array using quick sort algorithm with random pivoting. | |
*/ | |
#include <iostream> | |
#include <conio.h> | |
#include <time.h> |
This file contains 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
/* | |
Name: Merge Sort | |
Author: Gaurav Sharma | |
Date: 28-04-19 15:23 | |
Description: A simple c++ program to sort an array using Merge sort algorithm. | |
*/ | |
#include <iostream> | |
#include <conio.h> | |
#include <time.h> |
This file contains 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
/* | |
Name: Quick Sort | |
Author: Gaurav Sharma | |
Date: 27-04-19 18:01 | |
Description: A simple c++ program to sort an array using Quick sort algorithm. | |
*/ | |
#include <iostream> | |
#include <conio.h> | |
#include <time.h> |
NewerOlder