id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23,600 | ext.py | zenodo_zenodo/zenodo/modules/spam/ext.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2020 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 2,918 | Python | .py | 76 | 32.210526 | 76 | 0.671146 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,601 | config.py | zenodo_zenodo/zenodo/modules/spam/config.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2020 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 3,913 | Python | .py | 85 | 41.447059 | 79 | 0.732494 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,602 | tasks.py | zenodo_zenodo/zenodo/modules/spam/tasks.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2020 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 3,816 | Python | .py | 88 | 38.647727 | 78 | 0.716133 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,603 | utils.py | zenodo_zenodo/zenodo/modules/spam/utils.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2020 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 6,010 | Python | .py | 143 | 32.776224 | 80 | 0.631174 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,604 | __init__.py | zenodo_zenodo/zenodo/modules/spam/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2017-2020 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any la... | 1,141 | Python | .py | 29 | 38.103448 | 76 | 0.774572 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,605 | proxies.py | zenodo_zenodo/zenodo/modules/spam/proxies.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2022 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,474 | Python | .py | 33 | 43.272727 | 76 | 0.779944 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,606 | forms.py | zenodo_zenodo/zenodo/modules/spam/forms.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2017 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,827 | Python | .py | 46 | 36.26087 | 76 | 0.72912 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,607 | views.py | zenodo_zenodo/zenodo/modules/spam/views.py | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2017 CERN.
#
# Invenio 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 2 of the
# License, or (at your option) any later... | 13,378 | Python | .py | 316 | 33.68038 | 82 | 0.623673 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,608 | 6ac7565ebb86_create_whitelist_entries_table.py | zenodo_zenodo/zenodo/modules/spam/alembic/6ac7565ebb86_create_whitelist_entries_table.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2022 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,901 | Python | .py | 52 | 32.576923 | 76 | 0.705212 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,609 | event_builders.py | zenodo_zenodo/zenodo/modules/stats/event_builders.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,690 | Python | .py | 39 | 40.717949 | 76 | 0.752433 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,610 | ext.py | zenodo_zenodo/zenodo/modules/stats/ext.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 2,248 | Python | .py | 55 | 36.272727 | 76 | 0.71782 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,611 | errors.py | zenodo_zenodo/zenodo/modules/stats/errors.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,364 | Python | .py | 31 | 41.806452 | 76 | 0.748494 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,612 | config.py | zenodo_zenodo/zenodo/modules/stats/config.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,482 | Python | .py | 34 | 42 | 85 | 0.756925 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,613 | exporters.py | zenodo_zenodo/zenodo/modules/stats/exporters.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 6,373 | Python | .py | 142 | 33.950704 | 80 | 0.595686 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,614 | cli.py | zenodo_zenodo/zenodo/modules/stats/cli.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 5,707 | Python | .py | 140 | 35.435714 | 79 | 0.682007 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,615 | tasks.py | zenodo_zenodo/zenodo/modules/stats/tasks.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 4,625 | Python | .py | 98 | 39.428571 | 84 | 0.670656 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,616 | registrations.py | zenodo_zenodo/zenodo/modules/stats/registrations.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 8,910 | Python | .py | 220 | 25.945455 | 79 | 0.510023 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,617 | utils.py | zenodo_zenodo/zenodo/modules/stats/utils.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 4,819 | Python | .py | 134 | 28.761194 | 78 | 0.63309 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,618 | __init__.py | zenodo_zenodo/zenodo/modules/stats/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,156 | Python | .py | 29 | 38.586207 | 76 | 0.768477 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,619 | proxies.py | zenodo_zenodo/zenodo/modules/stats/proxies.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,306 | Python | .py | 30 | 42.266667 | 76 | 0.779088 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,620 | __init__.py | zenodo_zenodo/zenodo/modules/stats/templates/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 999 | Python | .py | 24 | 40.583333 | 76 | 0.772074 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,621 | __init__.py | zenodo_zenodo/zenodo/modules/stats/templates/aggregations/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,022 | Python | .py | 24 | 41.541667 | 76 | 0.774323 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,622 | __init__.py | zenodo_zenodo/zenodo/modules/stats/templates/aggregations/v7/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016-2019 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any la... | 1,036 | Python | .py | 24 | 42.125 | 76 | 0.774481 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,623 | __init__.py | zenodo_zenodo/zenodo/modules/stats/templates/events/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,016 | Python | .py | 24 | 41.291667 | 76 | 0.772957 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,624 | __init__.py | zenodo_zenodo/zenodo/modules/stats/templates/events/v7/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016-2019 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any la... | 1,030 | Python | .py | 24 | 41.875 | 76 | 0.773134 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,625 | __init__.py | zenodo_zenodo/zenodo/modules/rest/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,065 | Python | .py | 25 | 41.52 | 76 | 0.771676 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,626 | views.py | zenodo_zenodo/zenodo/modules/rest/views.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 2,784 | Python | .py | 76 | 28.934211 | 76 | 0.614302 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,627 | ext.py | zenodo_zenodo/zenodo/modules/jsonschemas/ext.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,737 | Python | .py | 44 | 35.477273 | 76 | 0.715727 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,628 | config.py | zenodo_zenodo/zenodo/modules/jsonschemas/config.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,306 | Python | .py | 31 | 40.483871 | 76 | 0.763965 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,629 | cli.py | zenodo_zenodo/zenodo/modules/jsonschemas/cli.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 3,804 | Python | .py | 80 | 42.2125 | 79 | 0.718177 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,630 | utils.py | zenodo_zenodo/zenodo/modules/jsonschemas/utils.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 4,216 | Python | .py | 103 | 35.980583 | 79 | 0.697919 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,631 | __init__.py | zenodo_zenodo/zenodo/modules/jsonschemas/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,057 | Python | .py | 25 | 41.2 | 76 | 0.773786 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,632 | compilers.py | zenodo_zenodo/zenodo/modules/jsonschemas/compilers.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 3,043 | Python | .py | 71 | 38.915493 | 78 | 0.71781 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,633 | users.py | zenodo_zenodo/zenodo/modules/fixtures/users.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 2,238 | Python | .py | 55 | 37.090909 | 76 | 0.721048 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,634 | records.py | zenodo_zenodo/zenodo/modules/fixtures/records.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option)... | 2,256 | Python | .py | 55 | 36.654545 | 76 | 0.729927 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,635 | ext.py | zenodo_zenodo/zenodo/modules/fixtures/ext.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any l... | 1,805 | Python | .py | 48 | 33.166667 | 76 | 0.705378 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,636 | licenses.py | zenodo_zenodo/zenodo/modules/fixtures/licenses.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 6,025 | Python | .py | 154 | 32.655844 | 79 | 0.633784 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,637 | communities.py | zenodo_zenodo/zenodo/modules/fixtures/communities.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,784 | Python | .py | 42 | 40 | 76 | 0.752304 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,638 | cli.py | zenodo_zenodo/zenodo/modules/fixtures/cli.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option)... | 6,375 | Python | .py | 163 | 34.312883 | 79 | 0.70157 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,639 | utils.py | zenodo_zenodo/zenodo/modules/fixtures/utils.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any l... | 1,427 | Python | .py | 34 | 40.029412 | 76 | 0.762455 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,640 | __init__.py | zenodo_zenodo/zenodo/modules/fixtures/__init__.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,112 | Python | .py | 27 | 40.037037 | 76 | 0.768733 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,641 | oai.py | zenodo_zenodo/zenodo/modules/fixtures/oai.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any l... | 1,598 | Python | .py | 42 | 34.547619 | 76 | 0.722115 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,642 | files.py | zenodo_zenodo/zenodo/modules/fixtures/files.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any l... | 2,726 | Python | .py | 70 | 33.714286 | 79 | 0.691783 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,643 | upload.py | zenodo_zenodo/scripts/upload.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any l... | 2,921 | Python | .py | 83 | 30.13253 | 76 | 0.659469 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,644 | test_schemas_datacite.py | zenodo_zenodo/tests/unit/records/test_schemas_datacite.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016-2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any la... | 29,008 | Python | .tac | 806 | 25.310174 | 79 | 0.516895 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,645 | contact_form.html | zenodo_zenodo/zenodo/modules/support/templates/zenodo_support/contact_form.html | {#-
# This file is part of Zenodo.
# Copyright (C) 2017 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later version.
#
# Zenodo is ... | 11,052 | Python | .tac | 253 | 35.893281 | 288 | 0.59406 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,646 | datacite-to-dcat-ap.xsl | zenodo_zenodo/zenodo/modules/records/data/datacite-to-dcat-ap.xsl | <?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015-2019 EUROPEAN UNION
Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
the European Commission - subsequent versions of the EUPL (the "Licence");
You may not use this work except in compliance with the Licence.
You may obta... | 119,576 | Python | .tac | 2,499 | 39.260504 | 592 | 0.585867 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,647 | datacite-resourceType-v4.1.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-resourceType-v4.1.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element; added values "Audiovisual", "Workflow" & "Other"; deleted value "Film"
2017-10-23 v4.1: Addition of value "DataPaper" -->
<xs:schema xmlns:xs="http://www.w3.org/2... | 1,346 | Python | .tac | 28 | 42.571429 | 184 | 0.682853 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,648 | datacite-funderIdentifierType-v4.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-funderIdentifierType-v4.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2016-05-14 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
<xs:simpleType name="funderIdentifierType" id="funde... | 711 | Python | .tac | 15 | 43.066667 | 184 | 0.704023 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,649 | datacite-relatedIdentifierType-v4.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-relatedIdentifierType-v4.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element; addition of value "PMID"
2014-08-20 v3.1: Addition of values "arxiv" and "bibcode"
2015-02-12 v4.0 Addition of value "IGSN" -->
<xs:schema xmlns:xs="http://www.w3.org... | 1,422 | Python | .tac | 32 | 39.0625 | 184 | 0.672662 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,650 | datacite-titleType-v4.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-titleType-v4.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element
2015-02-12 v4.0 Added value "Other" -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://dataci... | 694 | Python | .tac | 14 | 45.714286 | 184 | 0.704412 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,651 | datacite-relationType-v4.1.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-relationType-v4.1.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!--
2011-01-13 v1.0 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element, addition of values "IsIdenticalTo", "HasMetadata" & "IsMetadataFor"
2014-08-20 v3.1: Addition of values "Reviews" & "IsReviewedBy" and "IsDerivedFrom" & "IsSourceOf"
2017-10-23 v.4.... | 2,325 | Python | .tac | 46 | 44.76087 | 184 | 0.697674 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,652 | datacite-nameType-v4.1.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-nameType-v4.1.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 4.1 - Created 2017-10-23 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-4" targetNamespace="http://datacite.org/schema/kernel-4" elementFormDefault="qualified">
<xs:simpleType name="nameType" id="nameType">
<x... | 494 | Python | .tac | 10 | 46 | 184 | 0.704545 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,653 | datacite-dateType-v4.1.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-dateType-v4.1.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element; addition of value "Collected"; deleted "StartDate" & "EndDate"
2017-10-23 v4.1: Addition of value "Other"-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema... | 1,298 | Python | .tac | 23 | 51.26087 | 258 | 0.702745 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,654 | datacite-descriptionType-v4.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-descriptionType-v4.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element, addition of value "Methods"
2015-02-12 v4.0: Addition of value "TechnicalInfo"-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.or... | 955 | Python | .tac | 19 | 45.473684 | 184 | 0.705128 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,655 | datacite-contributorType-v4.xsd | zenodo_zenodo/zenodo/modules/records/data/include/v4.1/datacite-contributorType-v4.xsd | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 - Created 2011-01-13 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element, added values "ResearchGroup" & "Other"
2014-08-20 v3.1: Addition of value "DataCurator"
2015-05-14 v4.0 dropped value "Funder", use new "funderReference" -->
<xs:s... | 1,729 | Python | .tac | 35 | 43.8 | 184 | 0.700708 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,656 | update_datacite.html | zenodo_zenodo/zenodo/modules/records/templates/zenodo_records/update_datacite.html | {#
# This file is part of Zenodo.
# Copyright (C) 2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later version.
#
# Zenodo is d... | 3,102 | Python | .tac | 83 | 32.313253 | 116 | 0.631631 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,657 | datacite.py | zenodo_zenodo/zenodo/modules/records/serializers/datacite.py | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016, 2017, 2018 CERN.
#
# Invenio 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 2 of the
# License, or (at your optio... | 3,174 | Python | .tac | 70 | 40 | 78 | 0.721539 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,658 | datacite.py | zenodo_zenodo/zenodo/modules/records/serializers/schemas/datacite.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016-2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any la... | 18,409 | Python | .tac | 478 | 28.069038 | 78 | 0.556883 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,659 | uwsgi.ini | zenodo_zenodo/docker/uwsgi/uwsgi.ini | [uwsgi]
plugin = python
master = true
die-on-term = true
stats = 127.0.0.1:9000
socket = 0.0.0.0:5000
safe-pidfile = /usr/local/var/run/uwsgi.pid
chmod-socket = 666
vacuum = true
buffer-size = 65535
socket-timeout = 60
socket-write-timeout = 60
so-write-timeout = 60
so-send-timeout = 60
socket-send-timeout = 60
# # ... | 619 | Python | .wsgi | 26 | 22.615385 | 56 | 0.777211 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,660 | test_wsgi.py | zenodo_zenodo/tests/unit/default/test_wsgi.py | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any later v... | 1,171 | Python | .wsgi | 29 | 38.827586 | 76 | 0.766257 | zenodo/zenodo | 906 | 241 | 543 | GPL-2.0 | 9/5/2024, 5:13:26 PM (Europe/Amsterdam) |
23,661 | copyright | truenas_middleware/debian/debian/copyright | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: truenas
Source: http://www.truenas.com
Files: *
Copyright: 2019 iXsystems Inc
2019 William Grzybowski <william@grzy.org>
License: BSD-3-Clause
Files: debian/*
Copyright: 2019 William Grzybowski <william@grzy.org>
Lice... | 1,813 | Python | .py | 34 | 50.794118 | 74 | 0.804617 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,662 | ix-boot-core.py | truenas_middleware/src/freenas/usr/bin/ix-boot-core.py | #!/usr/bin/python3
import subprocess
import sys
if __name__ == "__main__":
boot_pool = "boot-pool"
if subprocess.run(["zfs", "list", "boot-pool"], capture_output=True).returncode != 0:
boot_pool = "freenas-boot"
for line in subprocess.run(
["zfs", "list", "-H", "-o", "name,truenas:12", "-... | 876 | Python | .py | 21 | 35.571429 | 89 | 0.59577 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,663 | smart_log.chart.py | truenas_middleware/src/freenas/usr/lib/netdata/python.d/smart_log.chart.py | # -*- coding: utf-8 -*-
# Description: smart netdata python.d module
# Author: ilyam8, vorph1
# SPDX-License-Identifier: GPL-3.0-or-later
import contextlib
import os
import re
from copy import deepcopy
from pathlib import Path
from time import time
from bases.FrameworkServices.SimpleService import SimpleService
from ... | 11,999 | Python | .py | 324 | 28.638889 | 118 | 0.613823 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,664 | truenas_disk_stats.chart.py | truenas_middleware/src/freenas/usr/lib/netdata/python.d/truenas_disk_stats.chart.py | from bases.FrameworkServices.SimpleService import SimpleService
from middlewared.utils.disks import get_disks_with_identifiers
from middlewared.utils.disk_stats import get_disk_stats
class Service(SimpleService):
def __init__(self, configuration=None, name=None):
SimpleService.__init__(self, configuratio... | 3,220 | Python | .py | 61 | 40.098361 | 109 | 0.576508 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,665 | cputemp.chart.py | truenas_middleware/src/freenas/usr/lib/netdata/python.d/cputemp.chart.py | from bases.FrameworkServices.SimpleService import SimpleService
from collections import defaultdict
from copy import deepcopy
from third_party import lm_sensors as sensors
from middlewared.utils.cpu import amd_cpu_temperatures, generic_cpu_temperatures, cpu_info
CPU_TEMPERATURE_FEAT_TYPE = 2
ORDER = [
'tempera... | 3,003 | Python | .py | 71 | 30.816901 | 112 | 0.581499 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,666 | truenas-set-authentication-method.py | truenas_middleware/src/freenas/usr/local/bin/truenas-set-authentication-method.py | #!/usr/bin/env python3
import json
import sys
import sqlite3
from middlewared.plugins.account import ADMIN_UID, ADMIN_GID, crypted_password
from middlewared.utils.db import FREENAS_DATABASE
if __name__ == "__main__":
authentication_method = json.loads(sys.stdin.read())
username = authentication_method["usern... | 2,717 | Python | .py | 57 | 39.122807 | 118 | 0.612854 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,667 | truenas-autotune.py | truenas_middleware/src/freenas/usr/local/bin/truenas-autotune.py | #!/usr/bin/env python3
import argparse
import sys
from types import SimpleNamespace
from ixhardware import TRUENAS_UNKNOWN, get_chassis_hardware, parse_dmi
from middlewared.plugins.tunables import zfs_parameter_value
from middlewared.utils.db import query_table, update_table
KiB = 1024 ** 1
MiB = 1024 ** 2
GiB = 102... | 3,419 | Python | .py | 81 | 33.950617 | 120 | 0.627492 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,668 | truenas-nvdimm.py | truenas_middleware/src/freenas/usr/local/bin/truenas-nvdimm.py | #!/usr/bin/env python3
import re
from subprocess import run
from packaging import version
VERSION = re.compile(r'(?<=Version: ).*')
PRODUCT = re.compile(r'(?<=Product Name: ).*')
GEN3_MIN_VERS = version.Version('3.0').major
NVDIMM_CONF_FILE = '/etc/modprobe.d/truenas-nvdimm.conf'
def parse_dmi():
output = run(['... | 2,842 | Python | .py | 71 | 33.647887 | 96 | 0.650563 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,669 | truenas-initrd.py | truenas_middleware/src/freenas/usr/local/bin/truenas-initrd.py | #!/usr/bin/env python3
import argparse
import contextlib
import json
import logging
import os
import subprocess
import sys
import textwrap
import libzfs
import pyudev
logger = logging.getLogger(__name__)
def update_zfs_default(root, readonly_rootfs):
with libzfs.ZFS() as zfs:
existing_pools = [p.name f... | 7,573 | Python | .py | 187 | 31.893048 | 117 | 0.60616 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,670 | truenas-grub.py | truenas_middleware/src/freenas/usr/local/bin/truenas-grub.py | #!/usr/bin/env python3
import math
import psutil
import os
import json
import logging
from middlewared.utils.serial import serial_port_choices
from middlewared.utils.db import query_config_table
from middlewared.utils.vendor import Vendors
logger = logging.getLogger(__name__)
def get_serial_ports():
return {e['s... | 3,954 | Python | .py | 71 | 49.295775 | 135 | 0.68595 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,671 | snmp-agent.py | truenas_middleware/src/freenas/usr/local/bin/snmp-agent.py | #!/usr/bin/env python3
import threading
import time
import contextlib
import os
import libzfs
import netsnmpagent
import pysnmp.hlapi # noqa
import pysnmp.smi
from truenas_api_client import Client
def get_kstat():
kstat = {}
try:
with open("/proc/spl/kstat/zfs/arcstats") as f:
for linen... | 17,417 | Python | .py | 405 | 34.928395 | 112 | 0.608185 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,672 | firmware_update.py | truenas_middleware/src/freenas/usr/local/sbin/firmware_update.py | #!/usr/bin/env python
#
# Copyright (c) 2020 iXsystems, Inc.
# All rights reserved.
# This file is a part of TrueNAS
# and may not be copied and/or distributed
# without the express permission of iXsystems.
from collections import namedtuple
import logging
import logging.config
import logging.handlers
import os
from p... | 9,415 | Python | .py | 235 | 34.097872 | 116 | 0.636145 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,673 | libpython.py | truenas_middleware/src/freenas/usr/local/share/python-gdb/libpython.py | #!/usr/bin/python
'''
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb
to be extended with Python code e.g. for library-specific data visualizations,
such as for the C++ STL types. Documentation on this API can be seen at:
http://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html
... | 63,797 | Python | .py | 1,580 | 29.753165 | 102 | 0.571886 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,674 | TRUENAS-MIB.py | truenas_middleware/src/freenas/usr/local/share/pysnmp/mibs/TRUENAS-MIB.py | # PySNMP SMI module. Autogenerated from smidump -f python TRUENAS-MIB
# by libsmi2pysnmp-0.1.3 at Wed Jul 24 12:51:26 2024,
# Python version sys.version_info(major=3, minor=11, micro=2, releaselevel='final', serial=0)
# Imports
( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", ... | 13,569 | Python | .py | 132 | 101.583333 | 1,524 | 0.756503 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,675 | smart_alert.py | truenas_middleware/src/freenas/usr/local/libexec/smart_alert.py | #!/usr/bin/env python3
import os
from truenas_api_client import Client
def main():
device = os.environ.get("SMARTD_DEVICE")
if device is None:
return
message = os.environ.get("SMARTD_MESSAGE")
if message is None:
return
if "nvme" in device and "number of Error Log entries incre... | 736 | Python | .py | 20 | 30.5 | 87 | 0.616147 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,676 | ipa_ctl.py | truenas_middleware/src/freenas/usr/local/libexec/ipa_ctl.py | #!/usr/bin/python3
# IPA control script for TrueNAS IPA Client. This provides support for some
# basic IPA-related operations that the TrueNAS middleware performs.
#
# Although it is written as a standalone script, it is not intended for use
# outside of the scope of TrueNAS developers. Ad-hoc usage of this script may... | 19,058 | Python | .py | 502 | 29.081673 | 88 | 0.609982 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,677 | find_alias_for_smtplib.py | truenas_middleware/src/freenas/etc/find_alias_for_smtplib.py | import argparse
import email
import email.parser
import json
import os
import re
import requests
import sys
import syslog
from truenas_api_client import Client
ALIASES = re.compile(r'^(?P<from>[^#]\S*?):\s*(?P<to>\S+)$')
def do_sendmail(msg, to_addrs=None, parse_recipients=False):
if to_addrs is None:
... | 4,710 | Python | .py | 113 | 31.238938 | 100 | 0.555313 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,678 | copyright | truenas_middleware/src/freenas/debian/copyright | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: truenas
Source: http://www.truenas.com
Files: *
Copyright: 2019 iXsystems Inc
2019 William Grzybowski <william@grzy.org>
License: BSD-3-Clause
Files: debian/*
Copyright: 2019 William Grzybowski <william@grzy.org>
Lice... | 1,813 | Python | .py | 34 | 50.794118 | 74 | 0.804617 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,679 | setup_test.py | truenas_middleware/src/middlewared/setup_test.py | from setuptools import setup
install_requires = [
'pytest-rerunfailures',
]
setup(
name='middlewared',
description='TrueNAS Middleware Daemon Integration Test Facilities',
packages=[
'middlewared',
'middlewared.test.integration.assets',
'middlewared.test.integration.utils',
... | 752 | Python | .py | 26 | 23.346154 | 72 | 0.655602 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,680 | setup.py | truenas_middleware/src/middlewared/setup.py | import os
from setuptools import find_packages, setup
def get_assets(name):
"""
Recursive get dirs from middlewared/{name}
"""
base_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'middlewared',
)
result = []
for root, dirs, files in os.walk(os.path.join(b... | 1,960 | Python | .py | 57 | 26.22807 | 95 | 0.585571 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,681 | copyright | truenas_middleware/src/middlewared/debian/copyright | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: middlewared
Source: https://github.com/freenas/freenas
Files: *
Copyright: 2016 William Grzybowski <william@grzy.org>
License: BSD-2-Clause
Files: debian/*
Copyright: 2019 William Grzybowski <william@grzy.org>
License: BSD-2-Cla... | 324 | Python | .py | 9 | 34.777778 | 74 | 0.811502 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,682 | role.py | truenas_middleware/src/middlewared/middlewared/role.py | from collections import defaultdict
from dataclasses import dataclass, field
import typing
@dataclass()
class Role:
"""
An authenticated user role.
:ivar includes: a list of other roles that this role includes. When user is granted this role, they will also
receive permissions granted by all the ... | 12,109 | Python | .py | 233 | 40.862661 | 119 | 0.599475 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,683 | async_validators.py | truenas_middleware/src/middlewared/middlewared/async_validators.py | import asyncio
import socket
from middlewared.validators import IpAddress, check_path_resides_within_volume_sync
async def check_path_resides_within_volume(verrors, middleware, schema_name, path):
"""
async wrapper around synchronous general-purpose path validation function
"""
vol_names = [vol["vol_... | 1,724 | Python | .py | 41 | 33.829268 | 103 | 0.669659 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,684 | service_exception.py | truenas_middleware/src/middlewared/middlewared/service_exception.py | import errno
import subprocess
import typing
from truenas_api_client import ErrnoMixin
def get_errname(code: int) -> str:
return errno.errorcode.get(code) or ErrnoMixin._get_errname(code) or 'EUNKNOWN'
class CallException(ErrnoMixin, Exception):
pass
class CallError(CallException):
def __init__(self,... | 3,599 | Python | .py | 90 | 32.433333 | 83 | 0.637986 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,685 | worker.py | truenas_middleware/src/middlewared/middlewared/worker.py | import asyncio
import inspect
import os
import setproctitle
from truenas_api_client import Client
from . import logger
from .common.environ import environ_update
from .utils import MIDDLEWARE_RUN_DIR
from .utils.plugins import LoadPluginsMixin
from .utils.prctl import die_with_parent
from .utils.service.call import M... | 5,118 | Python | .py | 111 | 36.756757 | 117 | 0.638755 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,686 | event.py | truenas_middleware/src/middlewared/middlewared/event.py | import asyncio
import contextlib
import json
import threading
import typing
from middlewared.role import RoleManager
from middlewared.schema import Any, clean_and_validate_arg, ValidationErrors
class Events:
def __init__(self, role_manager: RoleManager):
self.role_manager = role_manager
self._eve... | 4,054 | Python | .py | 97 | 32.515464 | 112 | 0.613839 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,687 | pipe.py | truenas_middleware/src/middlewared/middlewared/pipe.py | import os
import tempfile
class Pipes:
"""
`job.pipes` object containing job's open pipes. Each pipe is a :class:`middlewared.pipe.Pipe` object.
:ivar input: Input pipe
:ivar output: Output pipe
"""
def __init__(self, input_=None, output=None):
self.input = input_
self.output... | 1,985 | Python | .py | 46 | 35.217391 | 117 | 0.653846 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,688 | restful.py | truenas_middleware/src/middlewared/middlewared/restful.py | import asyncio
import base64
import binascii
from collections import defaultdict
import copy
import errno
import pam
import traceback
import types
import urllib.parse
from aiohttp import web
from truenas_api_client import json
from .api.base.server.app import App
from .auth import ApiKeySessionManagerCredentials, Lo... | 37,493 | Python | .py | 843 | 29.10083 | 120 | 0.495608 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,689 | i18n.py | truenas_middleware/src/middlewared/middlewared/i18n.py | from gettext import NullTranslations, GNUTranslations
import logging
import pkg_resources
logger = logging.getLogger(__name__)
translations = NullTranslations()
def set_language(language):
global translations
try:
with open(pkg_resources.resource_filename("middlewared", f"locale/{language}/LC_MESSA... | 759 | Python | .py | 20 | 32.15 | 126 | 0.711142 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,690 | webui_auth.py | truenas_middleware/src/middlewared/middlewared/webui_auth.py | from ipaddress import ip_address, ip_network
from aiohttp import web
def addr_in_allowlist(remote_addr, allowlist):
valid = False
try:
remote_addr = ip_address(remote_addr)
except Exception:
# invalid/malformed IP so play it safe and
# return False
valid = False
else:
... | 2,028 | Python | .py | 48 | 32.041667 | 113 | 0.602538 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,691 | auth.py | truenas_middleware/src/middlewared/middlewared/auth.py | import pam
import re
import threading
from dataclasses import dataclass
from datetime import datetime, UTC
from middlewared.utils.allowlist import Allowlist
from middlewared.utils.auth import AuthMech, AuthenticatorAssuranceLevel
from time import monotonic
class SessionManagerCredentials:
is_user_session = False... | 6,233 | Python | .py | 164 | 30.432927 | 90 | 0.669107 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,692 | __init__.py | truenas_middleware/src/middlewared/middlewared/__init__.py | # Fool setuptools to prevent
# error: Namespace package problem: middlewared is a namespace package, but its
# __init__.py does not call declare_namespace()! Please fix it.
# (See the setuptools manual under "Namespace Packages" for details.)
# when running setup_test.py
# (it checks for presence of declare... | 391 | Python | .py | 7 | 54.857143 | 84 | 0.744792 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,693 | sqlalchemy.py | truenas_middleware/src/middlewared/middlewared/sqlalchemy.py | import datetime
import isodate
from sqlalchemy import (
Table, Column as _Column, ForeignKey, Index,
Boolean, CHAR, DateTime, Integer, SmallInteger, String, Text, UniqueConstraint
) # noqa
from sqlalchemy.orm import declarative_base
from sqlalchemy.orm import relationship # noqa
from sqlalchemy.types import ... | 3,749 | Python | .py | 109 | 26.59633 | 82 | 0.626704 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,694 | logger.py | truenas_middleware/src/middlewared/middlewared/logger.py | import logging
import logging.handlers
import os
import queue
import typing
import warnings
from .logging.console_formatter import ConsoleLogFormatter
# markdown debug is also considered useless
logging.getLogger('MARKDOWN').setLevel(logging.INFO)
# asyncio runs in debug mode but we do not need INFO/DEBUG
logging.getL... | 6,354 | Python | .py | 120 | 47.125 | 112 | 0.72056 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,695 | validators.py | truenas_middleware/src/middlewared/middlewared/validators.py | from datetime import time
import ipaddress
import os
import re
from urllib.parse import urlparse
import uuid
from string import digits, ascii_uppercase, ascii_lowercase, punctuation
from pathlib import Path
from middlewared.utils import filters
from middlewared.utils.filesystem.constants import ZFSCTL
from middlewared... | 14,601 | Python | .py | 335 | 33.820896 | 111 | 0.609488 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,696 | job.py | truenas_middleware/src/middlewared/middlewared/job.py | import asyncio
import contextlib
from collections import OrderedDict
import copy
import enum
import errno
from functools import partial
import logging
import os
import shutil
import sys
import time
import traceback
import threading
from middlewared.service_exception import CallError, ValidationError, ValidationErrors,... | 26,212 | Python | .py | 640 | 29.660938 | 118 | 0.573069 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,697 | main.py | truenas_middleware/src/middlewared/middlewared/main.py | from .api.base.handler.dump_params import dump_params
from .api.base.handler.result import serialize_result
from .api.base.handler.version import APIVersion, APIVersionsAdapter
from .api.base.server.legacy_api_method import LegacyAPIMethod
from .api.base.server.method import Method
from .api.base.server.ws_handler.base... | 88,150 | Python | .py | 1,885 | 33.73687 | 126 | 0.569801 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,698 | console_formatter.py | truenas_middleware/src/middlewared/middlewared/logging/console_formatter.py | import logging
class ConsoleLogFormatter(logging.Formatter):
"""Format the console log messages"""
CONSOLE_COLOR_FORMATTER = {
'YELLOW': '\033[1;33m', # (warning)
'GREEN': '\033[1;32m', # (info)
'RED': '\033[1;31m', # (error)
'HIGHRED': '\033[1;41m', # (critical)
'... | 1,560 | Python | .py | 38 | 31.921053 | 71 | 0.588235 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |
23,699 | pytest.py | truenas_middleware/src/middlewared/middlewared/test/integration/utils/pytest.py | __all__ = ["fail"]
failed = [None]
def fail(reason):
"""
Prematurely abort the whole test suite execution, failing the test where this function is called
(as opposed to just using `pytest.exit` which will not fail the test, and, if no previous tests failed, junit
Jenkins plugin will display the test ... | 392 | Python | .py | 10 | 35.1 | 113 | 0.707124 | truenas/middleware | 2,277 | 481 | 13 | LGPL-3.0 | 9/5/2024, 5:13:34 PM (Europe/Amsterdam) |