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 | |
from bs4 import BeautifulSoup | |
linkset = [] | |
page = requests.get('www.wikipedia.org') # The URL is of your choice | |
soup = BeautifulSoup(page.content, 'html.parser') | |
linkset = soup.find_all('a') |
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
from flask import Flask, render_template, request | |
app = Flask(__name__) | |
@app.route("/") | |
def index(): | |
return "<h1>Hello World</h1>" | |
if __name__ == "__main__": | |
app.run() |
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 re | |
numregex = re.compile(r'\d\d\d\d\d\d\d\d\d\d') | |
number = input('enter your num') | |
arr = re.findall(str(number)) | |
#-----update-------- | |
if (len(arr) != 0): | |
for i in arr: | |
print(i) |
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 random | |
sample = """ The company was also broadcasting the translations live online using a computer-synthesized voice, | |
instead of the original human interpreters’ voices. Wang took pictures and videos as evidence.""" | |
sample_mod = [] | |
sample_mod = sample.split(" ") | |
punct = [",",".",":","?","!"] |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello, World!" |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
@app.route("/first") | |
def first(): |
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
from flask import Flask,render_template | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return render_template("index.html") | |
@app.route("/first") | |
def first(): |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Sample</title> | |
<style> | |
div#div-1 { | |
border: 1px solid black; |
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 React,{useState, useEffect} from 'react'; | |
import Note from './components/Note' | |
import axios from 'axios' | |
const App = () => { | |
const [notes,setNotes] = useState([]) | |
const [newNote,setNewNote] = useState('') | |
const [showAll,setShowAll] = useState(true) | |
const hook = ()=> { |
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 React,{useEffect, useState} from 'react'; | |
import axios from 'axios'; | |
// import logo from './logo.svg'; | |
import './App.css'; | |
const App = () => { | |
const [countriesData,setCountriesData] = useState([]) | |
const [country, setCountry] = useState([]) |
OlderNewer