This file contains hidden or 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
from selenium import webdriver | |
import time | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.chrome.service import Service | |
service = Service(executable_path=r"C:\Users\VT151UP\OneDrive - EY\Documents\chromedriver.exe") | |
options = webdriver.ChromeOptions() |
This file contains hidden or 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
##Python program to print fibonacci base on row number | |
from functools import lru_cache | |
@lru_cache(maxsize=1000) | |
def fibonacci(n): | |
if n==0: | |
return 0 | |
if n==1: |
This file contains hidden or 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
##With Naukri data | |
#### Used selenium as direct request module was not able to get the HTML element so Selenium helped to achieve so | |
from selenium import webdriver | |
from bs4 import BeautifulSoup | |
import time | |
import pandas as pd | |
from selenium.webdriver.chrome.options import Options | |
header = { | |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", |
This file contains hidden or 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
class createLog: | |
def formatLog(filename): | |
import os, logging | |
logfilename = os.path.join(os.path.expanduser('~'), 'xyz', '{0}.log'.format(filename)) | |
print('Log file path : Home/xyz/{}'.format(logfilename)) | |
# create logger | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.DEBUG) | |
# create console handler and set level to debug |
This file contains hidden or 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
''' | |
Below code downlaod all the videos in the playlists present | |
''' | |
import re,os | |
from pytube import Playlist,YouTube | |
# YOUTUBE_STREAM_AUDIO = '480' # modify the value to download a different stream | |
DOWNLOAD_DIR = os.getcwd()+'newDownload' |
This file contains hidden or 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
table { | |
border: 3.5px solid black; | |
border-collapse: collapse; | |
} | |
th, | |
td { |
This file contains hidden or 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
{% extends "layout.html" %} | |
{% block info %} | |
<h2>{{ title|safe }}</h2> | |
{{ posts|safe }} | |
{% endblock %} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
import requests | |
from bs4 import BeautifulSoup as bs | |
from datetime import datetime | |
def scrap_coronaData(): |
This file contains hidden or 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
# from werkzeug.wrappers import Request, Response # for running Flask on Jupyter Lab | |
from flask import Flask, jsonify,redirect, request, render_template, url_for, Markup | |
from coronaScrap import * | |
from multiprocessing import Value #This is Multithreading lib | |
counter = Value('i', 0) | |
app = Flask(__name__) |
NewerOlder