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
| #!/usr/bin/env python3 | |
| """ | |
| Single-figure visualization for paper-level mean rating bins (0.5 width) with stacked counts by rating std category (COLORED). | |
| Data source: https://github.com/papercopilot/paperlists | |
| What this script does: | |
| - Reads a JSON file (NOT JSONL). The JSON is expected to be either: | |
| * a list of paper objects, or | |
| * a single paper object, or |
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 tarfile | |
| import os | |
| from multiprocessing import Process, Queue, cpu_count, Manager, Value | |
| import multiprocessing | |
| from tqdm import tqdm | |
| def extract_member(tar_file, member, output_dir, progress, queue): | |
| try: | |
| tar_file.extract(member, path=output_dir) | |
| except Exception as e: |
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
| // https://github.com/ForwardStar/bb_downloader | |
| var url = location.href; | |
| var header = url.match(/https:\/\/\w*.\w*.edu.\w*\//g)[0]; | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open("GET", url, true); | |
| xhr.onreadystatechange = function () { | |
| if (xhr.readyState == 4) { | |
| var files = xhr.responseText.match(/\/bbcswebdav\/pid-\d*-dt-content-rid-\d*\_\d*\/xid-\d*\_\d*/g); | |
| if (files == null) { | |
| alert("No files detected!"); |