54065add4551a2415af574ad558f7c2d6fbeb9a9,pdftotree/TreeVisualizer.py,,get_pdf_dim,#Any#,86
Before Change
)
soup = BeautifulSoup(html_content, "html.parser")
pages = soup.find_all("page")
page_width, page_height = (
int(float(pages[0].get("width"))),
int(float(pages[0].get("height"))),
)
return page_width, page_height
After Change
def get_pdf_dim(pdf_file) -> Tuple[int, int]:
with open(pdf_file, "rb") as f:
parser = PDFParser(f)
doc = PDFDocument(parser)
// Look at the 1st page only.
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: HazyResearch/pdftotree
Commit Name: 54065add4551a2415af574ad558f7c2d6fbeb9a9
Time: 2020-09-24
Author: hiromu.hota@hal.hitachi.com
File Name: pdftotree/TreeVisualizer.py
Class Name:
Method Name: get_pdf_dim
Project Name: EducationalTestingService/skll
Commit Name: ca10c185d94470054d693f19e7691523dbe3ec55
Time: 2019-03-05
Author: jbiggs@ets.org
File Name: skll/data/readers.py
Class Name: NDJReader
Method Name: _sub_read
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: b591a7aecce5b8de42a0dd7bba62780675d34fce
Time: 2019-04-30
Author: eriklindernoren@live.se
File Name: utils/datasets.py
Class Name: ImageFolder
Method Name: __getitem__
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 9dcac66250b2d26d9b2505ad04841f3f4b8bc2a1
Time: 2019-04-30
Author: eriklindernoren@live.se
File Name: utils/datasets.py
Class Name: ImageFolder
Method Name: __getitem__