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 os | |
| from typing import Literal, Optional | |
| import cv2 | |
| import numpy as np | |
| import onnx | |
| import onnxruntime as ort | |
| import onnxslim | |
| import torch | |
| import torchvision |
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 json | |
| import numpy as np | |
| import pandas as pd | |
| inspire_core_list_path = 'inspire_core_list.txt' | |
| inspire_noncore_list_path = 'inspire_noncore_list.txt' | |
| inspire_harvested_data_path = 'inspire_harvested_data.json' | |
| inspire_core_data_path = 'inspire_core_records.json' | |
| inspire_noncore_data_path = 'inspire_noncore_records.json' | |
| save_path = 'inspire_data.df' |
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
| """ | |
| Get the arxiv ids of all the Core and Non-Core records in INSPIRE. | |
| """ | |
| from invenio_search import current_search_client as es | |
| from elasticsearch.helpers import scan | |
| import numpy as np | |
| core = [] | |
| non_core = [] |
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 __future__ import absolute_import, division, print_function | |
| import json | |
| def makejson(obj, eng): | |
| ''' | |
| title = obj.extra_data['source_data']['data']['titles'][0]['title'] | |
| abstracts = obj.extra_data['source_data']['data']['abstracts'][0]['value'] | |
| authors_dict = obj.extra_data['source_data']['data']['authors'] | |
| arxiv_eprints = obj.extra_data['source_data']['data']['arxiv_eprints'] |
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
| # -*- coding: utf-8 -*- | |
| # | |
| # This file is part of INSPIRE. | |
| # Copyright (C) 2014-2017 CERN. | |
| # | |
| # INSPIRE is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # |
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
| ''' | |
| This snippet is supposed to be run from within the inspirehep shell. | |
| ''' | |
| from elasticsearch.helpers import scan | |
| from inspire_utils.record import get_value | |
| from invenio_search import current_search_client as es | |
| import json | |
| core_records = [] |