-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dracu-lah
committed
Nov 28, 2022
1 parent
7bd673c
commit 35a56a9
Showing
5 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import urllib.request | ||
import pandas as pd | ||
url="https://www.w3schools.com/html/html_tables.asp" | ||
|
||
with urllib.request.urlopen(url) as i: | ||
html = i.read() | ||
data = pd.read_html(html)[0] | ||
print(data.head()) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import PyPDF2 | ||
|
||
pdf= open("aivmm.pdf", "rb") | ||
reader = PyPDF2.PdfFileReader(pdf) | ||
page = reader.getPage(0) | ||
print(page.extractText()) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# The first character in the string has index 0, and the last character has index n-1, where n is the length of the string. The string slicing operator “::” reads all the characters of the string, and -1, in the end, reverses the order of the characters. This is how we can reverse a string | ||
|
||
def reverse_string(string): | ||
return string[::-1] | ||
|
||
a = input("Enter a string :") | ||
print(reverse_string(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from difflib import SequenceMatcher | ||
|
||
text1 = input("Enter text 1 : ") | ||
text2 = input("Enter text 2 : ") | ||
|
||
sequence_score = SequenceMatcher(None, text1, text2).ratio() | ||
|
||
print(f"Both are {sequence_score*100} % similar") |