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 requests, random | |
from bs4 import BeautifulSoup | |
import smtplib | |
#Function to generate a random quote. | |
def random_quote(url): | |
conn = requests.get(url) | |
soup = BeautifulSoup(conn.content,'html.parser') | |
quotes = soup.find_all('a', attrs={"title": "view quote"}) | |
quotesList = [] |
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
#!/bin/bash | |
#shell script to automate project initialization | |
function create(){ | |
cd | |
python ./automation1.py $1 | |
cd path/to/your/projects/directory/$1 | |
touch Readme.md | |
git init | |
git add . | |
git commit -m "first commit" |
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
//Implementing Singly Linked List in Java | |
class LinkedList{ | |
Node head; //Reference to the Node class to create head node of the list. | |
//Node class to create nodes. here we make static class so that main method | |
//can recoginze it. | |
static class Node{ | |
int data; | |
Node next; |
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
//Implementing Matrix Addition | |
class MatrixMultiplication{ | |
public static void main(String[] args) { | |
//Creating two matrices | |
int[][] a = {{1,2,3},{2,3,4}}; | |
int[][] b = {{1,2,3},{2,3,4}}; | |
//Creating empty matrix to store the result | |
int[][] sum = new int[2][3]; |
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
#!/bin/bash | |
#shell script to automate project initialization. | |
function create(){ | |
cd | |
python ./automation1.py $1 | |
cd path/to/your/projects/directory/$1 | |
touch Readme.md | |
git init | |
git add . | |
git commit -m "first commit" |
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 sys | |
import os | |
from github import Github | |
path = "/path/to/your/desired/projects/directory" | |
def create(): | |
folder_name = str(sys.argv[1]) | |
os.makedirs(path+folder_name) | |
username = #your github username |
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
board_keys = [] | |
for key in theBoard: | |
board_keys.append(key) | |
restart = input("Do want to play Again?(y/n)") | |
if restart == "y" or restart == "Y": | |
for key in board_keys: | |
theBoard[key] = " " |
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
# Read words from an existing excel sheet and find distant words and write it into a new excel sheet. | |
import openpyxl | |
distant_words = [] | |
all_words = [] | |
def get_all_words(filename, all_words): | |
'''Takes an excel sheet and an empty list as inputs and | |
returns the list of all words(values of cells) from all the columns. |
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
values = { | |
# Email Address | |
"emailAddress": str(sys.argv[1]), | |
# Enrollment Number | |
"entry.33987362": str(sys.argv[2]), | |
# Course | |
"entry.363926033": "BE", | |
# Branch | |
"entry.733518766": "IT", | |
# Semester |
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
subjects_time = { | |
"Monday": [["10", "30", "AJ(HC)"], ["11", "30", "DCDR(PC)"], ["1", "00", "WT(AM)"], ["2", "00", "SE(KD)"]], | |
"Tuesday": [["11", "30", "SE(KD)"], ["1", "00", "AJ(HC)"]], | |
"Wednesday": [["11", "30", ".NET(PC)"], ["1", "00", "SE(KD)"], ["2", "00", ".NET(PC)"]], | |
"Thursday": [["10", "30", "WT(AM)"], ["11", "30", "DCDR(PC)"], ["1", "00", "AJ(HC)"]], | |
"Friday": [["10", "30", "AJ(HC)"], ["11", "30", ".NET(PC)"], ["1", "00", "SE(KD)"], ["2", "00", ".NET(PC)"]], | |
} |
OlderNewer