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
21,900
dev.py
OctoPrint_OctoPrint/src/octoprint/util/dev.py
""" This module provides a bunch of utility methods and helpers FOR DEVELOPMENT ONLY. """ __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" import contextlib import time @contextlib.contextmanager def duration_log(context=None, log=None): """ Context manager to log the ...
2,218
Python
.py
58
28.948276
87
0.587961
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,901
connectivity.py
OctoPrint_OctoPrint/src/octoprint/util/connectivity.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import threading import time from octoprint.util.net import resolve_host, server_reachable class Connectivit...
7,245
Python
.py
191
26.769634
103
0.560029
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,902
jinja.py
OctoPrint_OctoPrint/src/octoprint/util/jinja.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import os from jinja2 import nodes from jinja2.ext import Extension from jinja2.loaders import ( BaseLoader...
9,351
Python
.py
228
30.991228
103
0.61868
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,903
text.py
OctoPrint_OctoPrint/src/octoprint/util/text.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import re from emoji import demojize from octoprint.util import to_unicode from octoprint.vendor.awesome_slugify import Slugi...
1,535
Python
.py
43
30.72093
103
0.679756
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,904
__init__.py
OctoPrint_OctoPrint/src/octoprint/util/__init__.py
""" This module bundles commonly used utility methods or helper classes that are used in multiple places within OctoPrint's source code. """ __author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" import codecs import collections import cont...
54,507
Python
.py
1,373
31.383103
122
0.611156
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,905
yaml.py
OctoPrint_OctoPrint/src/octoprint/util/yaml.py
from typing import Any, Dict, Hashable, TextIO, Union def load_from_file( file: TextIO = None, path: str = None ) -> Union[Dict[Hashable, Any], list, None]: """ Safely and performantly loads yaml data from the given source. Either a path or a file must be passed in. """ if path is not None: ...
2,876
Python
.py
72
33.569444
88
0.670262
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,906
paths.py
OctoPrint_OctoPrint/src/octoprint/util/paths.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" def normalize(path, expand_user=True, expand_vars=True, real=True, **kwargs): ...
595
Python
.py
15
34.266667
103
0.679443
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,907
comm.py
OctoPrint_OctoPrint/src/octoprint/util/comm.py
__author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2013 David Braam, Gina Häußge & others - Released under terms of the AGPLv3 License" """ The code in this file is based on Cura...
266,176
Python
.py
5,932
29.744774
197
0.52287
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,908
files.py
OctoPrint_OctoPrint/src/octoprint/util/files.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License" import datetime import itertools import logging import os.path import re def _sfn_really_universal(name): from octoprint....
13,559
Python
.py
297
37.969697
122
0.635177
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,909
commandline.py
OctoPrint_OctoPrint/src/octoprint/util/commandline.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import queue import re import time import warnings from typing impo...
9,955
Python
.py
239
32.322176
113
0.604748
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,910
version.py
OctoPrint_OctoPrint/src/octoprint/util/version.py
""" This module provides a bunch of utility methods and helpers for version handling. """ __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" import logging import pkg_resources from octoprint import __version__ def get_octoprint_version_string(): return __version__ def g...
6,927
Python
.py
174
31.770115
120
0.632129
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,911
pip.py
OctoPrint_OctoPrint/src/octoprint/util/pip.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import os import site import sys import threading from typing impor...
23,857
Python
.py
546
32.659341
138
0.589809
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,912
tz.py
OctoPrint_OctoPrint/src/octoprint/util/tz.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" import datetime LOCAL_TZ = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo UTC_TZ = datetime.timezone.utc def is_timezone_aware(dt: datetime.datetime) -> bool: return dt.tzinfo is not None and dt.tzinfo.utco...
342
Python
.py
6
54.666667
87
0.777108
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,913
gcodeInterpreter.py
OctoPrint_OctoPrint/src/octoprint/util/gcodeInterpreter.py
__author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2013 David Braam, Gina Häußge - Released under terms of the AGPLv3 License" import base64 import codecs import io import loggi...
31,001
Python
.py
751
26.541944
123
0.484782
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,914
encoding.py
OctoPrint_OctoPrint/src/octoprint/util/json/encoding.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" import json from collections import OrderedDict from typing import Any, Callable, Dict try: from typing import OrderedDict...
1,937
Python
.py
54
28.814815
103
0.649893
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,915
__init__.py
OctoPrint_OctoPrint/src/octoprint/util/json/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" from octoprint.util import deprecated from . import serializing # noqa: F401 from .encoding import JsonEncoding, dumps, loads...
505
Python
.py
10
48
103
0.752033
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,916
serializing.py
OctoPrint_OctoPrint/src/octoprint/util/json/serializing.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" import base64 import datetime import json import time from collections import OrderedDict from typing import Any, Callable, Dic...
5,046
Python
.py
121
35.272727
103
0.68392
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,917
__init__.py
OctoPrint_OctoPrint/src/octoprint/util/platform/__init__.py
""" This module bundles platform specific flags and implementations. """ __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" import sys try: import fcntl except ImportError:...
3,810
Python
.py
99
32.090909
111
0.660418
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,918
setup.py
OctoPrint_OctoPrint/src/octoprint/util/piptestballoon/setup.py
""" This "python package" doesn't actually install. This is intentional. It is merely used to figure out some information about the environment a specific pip call is running under (installation dir, whether it belongs to a virtual environment, whether the install location is writable by the current user), and for that...
1,258
Python
.py
33
36.272727
81
0.774035
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,919
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/logging/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import os from flask import abort, jsonify, request, url_for from flask_babel import gettext from werkzeug.exceptions import B...
9,980
Python
.py
236
32.224576
106
0.603692
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,920
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/corewizard/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" from flask_babel import gettext import octoprint.plugin from .subwizards import Subwizards class CoreWizardPlugin( octo...
4,113
Python
.py
106
28.849057
103
0.583123
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,921
subwizards.py
OctoPrint_OctoPrint/src/octoprint/plugins/corewizard/subwizards.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import inspect import sys from flask_babel import gettext import octoprint.plugin from octoprint.access import ADMIN_GROUP, U...
4,883
Python
.py
115
34.443478
103
0.67287
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,922
util.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/util.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging from octoprint.util.platform import CLOSE_FDS from .exceptions im...
1,317
Python
.py
29
38.034483
103
0.665882
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,923
cli.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/cli.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" def commands(cli_group, pass_octoprint_ctx, *args, **kwargs): import click click.disable_unicode_literals_warning = T...
8,864
Python
.py
212
29.216981
108
0.55029
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,924
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/__init__.py
import datetime __author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import copy import hashlib import logging import logging.handlers ...
100,285
Python
.py
2,185
30.373455
294
0.522255
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,925
exceptions.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/exceptions.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" class NoUpdateAvailable(Exception): pass class UpdateAlreadyInProgress(Excep...
1,988
Python
.py
58
28.068966
103
0.672996
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,926
bitbucket_commit.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/bitbucket_commit.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" import base64 import logging import requests from . import ApiCheckError BRANCH_HEAD_URL = ( "https://api.bitbucket.org/...
3,465
Python
.py
82
35.378049
103
0.657918
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,927
github_commit.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/github_commit.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import requests BRANCH_HEAD_URL = "https://api.github.com/repos/{u...
2,771
Python
.py
69
33.101449
108
0.641629
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,928
python_checker.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/python_checker.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" from ..exceptions import CannotCheckOffline, ConfigurationInvalid def get_latest(...
1,485
Python
.py
30
40.733333
136
0.656293
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,929
httpheader.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/httpheader.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import requests from ..exceptions import CannotCheckOffline, ConfigurationInvalid, NetworkError logger = logg...
1,649
Python
.py
41
33.04878
103
0.633229
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,930
jsondata.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/jsondata.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import requests from ..exceptions import CannotCheckOffline, ConfigurationInvalid, NetworkError logger = logg...
1,295
Python
.py
29
38.517241
103
0.672785
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,931
pypi_release.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/pypi_release.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2019 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import pkg_resources import requests from octoprint.util.version import ( get_comparable_version, is_p...
4,304
Python
.py
93
39.967742
328
0.666028
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,932
never_current.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/never_current.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" def get_latest(target, check, online=True, *args, **kwargs): local_version = check.get("local_version", "1.0.0") remot...
562
Python
.py
10
51.2
103
0.675182
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,933
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" from ..exceptions import ApiCheckError, RateLimitCheckError from . import ( # noqa...
2,244
Python
.py
62
29.290323
103
0.645564
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,934
git_commit.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/git_commit.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import errno import logging import subprocess import sys from ..exceptions import...
2,930
Python
.py
79
29.113924
107
0.598303
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,935
github_release.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/github_release.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import requests from octoprint.util import sv from octoprint.util....
13,284
Python
.py
273
41.084249
199
0.642614
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,936
commandline.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/commandline.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging from ..exceptions import CannotCheckOffline, ConfigurationInvalid ...
2,164
Python
.py
49
37.326531
113
0.655878
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,937
always_current.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/version_checks/always_current.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" def get_latest(target, check, online=True, *args, **kwargs): current_version = check.get("current_version", "1.0.0") ...
513
Python
.py
9
52
103
0.684
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,938
sleep_a_bit.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/updaters/sleep_a_bit.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import time def can_perform_update(target, check, online=True): return True def perform_update(target, check, target_v...
607
Python
.py
13
41.769231
103
0.681431
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,939
python_updater.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/updaters/python_updater.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" def can_perform_update(target, check, online=True): return ( "python_u...
1,447
Python
.py
30
40.233333
103
0.648188
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,940
single_file_plugin.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/updaters/single_file_plugin.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import ast import logging import os import shutil import tempfile from octoprint.settings import settings from octoprint.util....
2,550
Python
.py
62
33.064516
103
0.647368
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,941
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/updaters/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" from . import ( # noqa: F401 pip, python_updater, single_file_plugin, ...
360
Python
.py
10
32.7
103
0.697406
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,942
update_script.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/updaters/update_script.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import sys from octoprint.util.commandline import CommandlineCaller...
4,158
Python
.py
100
33.27
103
0.639185
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,943
pip.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/updaters/pip.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import collections import logging import threading from octoprint.util.pip import...
4,842
Python
.py
116
33.853448
103
0.639949
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,944
update-octoprint.py
OctoPrint_OctoPrint/src/octoprint/plugins/softwareupdate/scripts/update-octoprint.py
#!/bin/env python __author__ = "Gina Haeussge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import errno import sys import time import traceback # defau...
12,924
Python
.py
346
28.465318
126
0.583073
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,945
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/pluginmanager/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import copy import logging import os import re import shutil import sys import temp...
86,845
Python
.py
2,076
29.129094
293
0.554466
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,946
exceptions.py
OctoPrint_OctoPrint/src/octoprint/plugins/pluginmanager/exceptions.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" class InvalidPackageFormat(Exception): pass
242
Python
.py
4
58
103
0.766949
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,947
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/eventmanager/__init__.py
from flask_babel import gettext import octoprint.events import octoprint.plugin from octoprint.access import ADMIN_GROUP class EventManagerPlugin( octoprint.plugin.SettingsPlugin, octoprint.plugin.AssetPlugin, octoprint.plugin.TemplatePlugin, ): def on_settings_load(self): my_settings = { ...
2,103
Python
.py
60
25.5
74
0.558014
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,948
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/virtual_printer/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import octoprint.plugin class VirtualPrinterPlugin( octoprint.plugin.Settings...
5,939
Python
.py
139
31.42446
116
0.57358
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,949
virtual.py
OctoPrint_OctoPrint/src/octoprint/plugins/virtual_printer/virtual.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" import collections import json import math import os import queue import re import threading import time from typing import Any, Dict, List, Optional from serial import SerialTimeoutExc...
90,602
Python
.py
2,093
30.305781
224
0.533125
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,950
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/tracking/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import concurrent.futures import hashlib import logging import time from urllib.parse import urlencode import requests from fl...
21,424
Python
.py
495
31.581818
103
0.571085
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,951
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/classicwebcam/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" import threading import requests from flask_babel import gettext import octoprint.plugin from octoprint.schema.webcam import ...
9,412
Python
.py
221
30.022624
188
0.563764
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,952
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/discovery/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" """ The SSDP/UPNP implementations has been largely inspired by https://gist.github....
29,507
Python
.py
661
30.963691
121
0.549991
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,953
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/gcodeviewer/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import os import flask from flask_babel import gettext import octoprint.plugin from octoprint.util.files import search_throug...
3,953
Python
.py
98
30.44898
139
0.595933
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,954
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/appkeys/__init__.py
import os import threading import time from collections import defaultdict import flask from flask_babel import gettext import octoprint.plugin from octoprint.access import ADMIN_GROUP, USER_GROUP from octoprint.access.permissions import Permissions from octoprint.server import NO_CONTENT, current_user from octoprint...
20,416
Python
.py
500
29.702
156
0.568289
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,955
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/errortracking/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2019 The OctoPrint Project - Released under terms of the AGPLv3 License" import errno import logging import requests.exceptions import serial import tornado.websocket from flask import jsonify from f...
8,300
Python
.py
204
30.970588
112
0.610918
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,956
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/achievements/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2023 The OctoPrint Project - Released under terms of the AGPLv3 License" import datetime import json import os import threading from typing import List fr...
27,188
Python
.py
605
32.740496
120
0.577013
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,957
achievements.py
OctoPrint_OctoPrint/src/octoprint/plugins/achievements/achievements.py
import os import re from pydantic import BaseModel ROMAN_NUMERAL = re.compile( "^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$", re.IGNORECASE ) class Achievement(BaseModel): key: str = "" name: str = "" description: str = "" hidden: bool = False nag: bool = False timebased: bo...
7,534
Python
.py
248
22.717742
88
0.597618
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,958
data.py
OctoPrint_OctoPrint/src/octoprint/plugins/achievements/data.py
from typing import Dict from pydantic import BaseModel class StatsBase(BaseModel): last_version: str = "" """Version of OctoPrint during last start, used for keeping track of updates.""" seen_versions: int = 0 """Number of different versions seen.""" server_starts: int = 0 """Number of time...
2,764
Python
.py
72
33.25
84
0.667295
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,959
happy_birthday_octoprint.svg
OctoPrint_OctoPrint/src/octoprint/plugins/achievements/static/img/happy_birthday_octoprint.svg
<svg xmlns="http://www.w3.org/2000/svg" id="mdi-cake-variant" viewBox="0 0 24 24"><path d="M12,6C13.11,6 14,5.1 14,4C14,3.62 13.9,3.27 13.71,2.97L12,0L10.29,2.97C10.1,3.27 10,3.62 10,4A2,2 0 0,0 12,6M16.6,16L15.53,14.92L14.45,16C13.15,17.29 10.87,17.3 9.56,16L8.5,14.92L7.4,16C6.75,16.64 5.88,17 4.96,17C4.23,17 3.56,16....
691
Python
.py
1
691
691
0.681621
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,960
happy_birthday_foosel.svg
OctoPrint_OctoPrint/src/octoprint/plugins/achievements/static/img/happy_birthday_foosel.svg
<svg xmlns="http://www.w3.org/2000/svg" id="mdi-cake" viewBox="0 0 24 24"><path d="M11.5,0.5C12,0.75 13,2.4 13,3.5C13,4.6 12.33,5 11.5,5C10.67,5 10,4.85 10,3.75C10,2.65 11,2 11.5,0.5M18.5,9C21,9 23,11 23,13.5C23,15.06 22.21,16.43 21,17.24V23H12L3,23V17.24C1.79,16.43 1,15.06 1,13.5C1,11 3,9 5.5,9H10V6H13V9H18.5M12,16A2....
512
Python
.py
1
512
512
0.646484
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,961
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/backup/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import octoprint.plugin from octoprint.access import ADMIN_GROUP from octoprint.access.permissions import Permissions from octo...
58,534
Python
.py
1,277
27.740799
122
0.482468
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,962
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/action_command_notification/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import re import time import flask from flask_babel import gettext import octoprint.plugin from octoprint.access import USER_...
5,675
Python
.py
140
31.285714
126
0.615455
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,963
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/announcements/__init__.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2016 The OctoPrint Project - Released under terms of the AGPLv3 License" import calendar import logging import os import re import threading import time fr...
23,797
Python
.py
547
31.734918
205
0.559529
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,964
__init__.py
OctoPrint_OctoPrint/src/octoprint/plugins/action_command_prompt/__init__.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import flask from flask_babel import gettext import octoprint.plugin from octoprint.access import USER_GROUP from octoprint.ac...
9,223
Python
.py
245
28.057143
107
0.590338
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,965
with_attrs_docs.py
OctoPrint_OctoPrint/src/octoprint/vendor/with_attrs_docs.py
# Based on pydantic-settings version 0.2.5 by Daniel Daniels, licensed under MIT # # https://github.com/danields761/pydantic-settings from typing import Type from class_doc import extract_docs_from_cls_obj from pydantic import BaseModel def apply_attributes_docs( model: Type[BaseModel], override_existing: bool ...
1,249
Python
.py
35
29.942857
80
0.69186
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,966
flask_principal.py
OctoPrint_OctoPrint/src/octoprint/vendor/flask_principal.py
# -*- coding: utf-8 -*- """ flask_principal ~~~~~~~~~~~~~~~ Identity management for Flask. :copyright: (c) 2012 by Ali Afshar. :license: MIT, see LICENSE for more details. """ from __future__ import with_statement __version__ = '0.4.0' import sys from collections import deque, namedtuple from ...
13,915
Python
.py
350
31.922857
109
0.643288
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,967
__init__.py
OctoPrint_OctoPrint/src/octoprint/vendor/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals
106
Python
.py
2
52.5
82
0.72381
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,968
imp.py
OctoPrint_OctoPrint/src/octoprint/vendor/imp.py
"""This module provides the components needed to build your own __import__ function. Undocumented functions are obsolete. In most cases it is preferred you consider using the importlib module's functionality over this module. Taken from CPython 3.7.0 and vendored to still have it when it gets completely removed. Li...
10,684
Python
.py
255
34.858824
89
0.660873
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,969
alt_translates.py
OctoPrint_OctoPrint/src/octoprint/vendor/awesome_slugify/alt_translates.py
# coding=utf8 CYRILLIC = { # instead of: u'ё': u'e', # io / yo u'у': u'y', # u u'х': u'h', # kh u'щ': u'sch', # shch u'ю': u'u', # iu / yu u'я': u'ya', # ia } GERMAN = { # instead of: u'ä': u'ae', # a u'ö': u'oe', # o u'ü': u'ue', # u } GREEK = {...
514
Python
.py
23
17.695652
32
0.324841
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,970
__init__.py
OctoPrint_OctoPrint/src/octoprint/vendor/awesome_slugify/__init__.py
from .main import Slugify, UniqueSlugify from .alt_translates import * slugify = Slugify() unique_slugify = UniqueSlugify() slugify_unicode = Slugify(translate=None) slugify_url = Slugify() slugify_url.to_lower = True slugify_url.stop_words = ('a', 'an', 'the') slugify_url.max_length = 200 slugify_filename = Slugi...
1,063
Python
.py
28
33.428571
96
0.710526
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,971
main.py
OctoPrint_OctoPrint/src/octoprint/vendor/awesome_slugify/main.py
# coding=utf8 import sys from unidecode import unidecode import regex as re # Don't set regex.DEFAULT_VERSION to regex.VERSION1 cause # this option will influence on 3rd party libs. E.g. `mailgun` and `flanker`. # Use regex.VERSION1 regex flag. # re.VERSION1 - New enhanced behaviour with nested sets and set operat...
8,614
Python
.py
184
36.168478
142
0.570986
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,972
__init__.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
270
Python
.py
7
36.571429
82
0.698473
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,973
periodic.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/periodic.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.periodic ~~~~~~~~~~~~~~~~~~~~~~~ This module implements customized PeriodicCallback from tornado with support of the sliding window. """ import time import logging LOG = logg...
2,036
Python
.py
61
25.213115
82
0.602656
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,974
util.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/util.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import functools import sys PY3 = sys.version_info[0] == 3 from past.builtins import unicode if PY3: MAXSIZE = sys.maxsize def bytes_to_str(b): if isinstance(b, bytes): return b.de...
1,771
Python
.py
61
21.42623
82
0.577581
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,975
sessioncontainer.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/sessioncontainer.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.sessioncontainer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Simple heapq-based session implementation with sliding expiration window support. """ from heapq import heappush, heappop from...
4,616
Python
.py
123
27.601626
82
0.578522
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,976
basehandler.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/basehandler.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.basehandler ~~~~~~~~~~~~~~~~~~~~~~~~~~ Various base http handlers """ import datetime import socket import logging from tornado.web import RequestHandler from tornado.gen import ...
5,110
Python
.py
125
32.288
90
0.632079
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,977
router.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/router.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.router ~~~~~~~~~~~~~~~~~~~~~ SockJS protocol router implementation. """ from tornado import ioloop, version_info from octoprint.vendor.sockjs.tornado import transports, session, ...
6,624
Python
.py
170
29.158824
103
0.598534
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,978
conn.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/conn.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.conn ~~~~~~~~~~~~~~~~~~~ SockJS connection interface """ class SockJSConnection(object): def __init__(self, session): """Connection constructor. `session` ...
1,972
Python
.py
55
27.709091
84
0.625263
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,979
__init__.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from .router import SockJSRouter from .conn import SockJSConnection
176
Python
.py
4
42.75
82
0.783626
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,980
websocket.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/websocket.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import tornado from tornado import escape, gen, websocket from urllib.parse import urlparse class SockJSWebSocketHandler(websocket.WebSocketHandler): if tornado.version_info[0] == 4 and tornado.version_inf...
1,475
Python
.py
35
33.457143
102
0.649196
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,981
migrate.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/migrate.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.migrate ~~~~~~~~~~~~~~~~~~~~~~ `tornado.websocket` to `sockjs.tornado` migration helper. """ from octoprint.vendor.sockjs.tornado import conn class WebsocketHandler(conn.SockJSC...
985
Python
.py
27
30.555556
82
0.671233
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,982
static.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/static.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.static ~~~~~~~~~~~~~~~~~~~~~ Various static handlers required for SockJS to function properly. """ import time import hashlib import random import sys from tornado.gen import cor...
3,771
Python
.py
102
28.627451
85
0.604785
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,983
stats.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/stats.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from collections import deque from tornado import ioloop class MovingAverage(object): """Moving average class implementation""" def __init__(self, period=10): """Constructor. `period` ...
3,150
Python
.py
90
25.844444
82
0.589032
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,984
proto.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/proto.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.proto ~~~~~~~~~~~~~~~~~~~~ SockJS protocol related functions """ import logging LOG = logging.getLogger("tornado.general") # TODO: Add support for ujson module once they can acce...
1,238
Python
.py
39
27.948718
82
0.694772
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,985
session.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/session.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.session ~~~~~~~~~~~~~~~~~~~~~~ SockJS session implementation. """ import asyncio import functools import logging from octoprint.vendor.sockjs.tornado import periodic, proto, sess...
12,913
Python
.py
343
27.594752
110
0.592319
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,986
htmlfile.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/htmlfile.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.htmlfile ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HtmlFile transport implementation. """ import re from octoprint.vendor.sockjs.tornado import proto from octoprint.vendor.so...
2,771
Python
.py
78
28.730769
82
0.63599
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,987
streamingbase.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/streamingbase.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from octoprint.vendor.sockjs.tornado.transports import pollingbase class StreamingTransportBase(pollingbase.PollingTransportBase): def initialize(self, server): super(StreamingTransportBase, self).i...
1,558
Python
.py
38
31.157895
104
0.621353
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,988
pollingbase.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/pollingbase.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.pollingbase ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Polling transports base """ from octoprint.vendor.sockjs.tornado import basehandler from octoprint.vendor.sockjs.torna...
2,245
Python
.py
53
34.54717
100
0.663289
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,989
xhrstreaming.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/xhrstreaming.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.xhrstreaming ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Xhr-Streaming transport implementation """ from octoprint.vendor.sockjs.tornado.transports import streamingbase from...
1,556
Python
.py
39
31.589744
82
0.636303
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,990
jsonp.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/jsonp.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.jsonp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JSONP transport implementation. """ import logging from octoprint.vendor.sockjs.tornado import proto from octoprint.vendor.sockjs....
3,826
Python
.py
96
29.854167
84
0.608437
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,991
__init__.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import octoprint.vendor.sockjs.tornado.transports.pollingbase from .xhr import XhrPollingTransport, XhrSendHandler from .jsonp import JSONPTransport, JSONPSendHandler from .websocket import WebSocketTransport fr...
500
Python
.py
10
48.8
82
0.862705
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,992
websocket.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/websocket.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.websocket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Websocket transport implementation """ import logging from tornado.websocket import WebSocketError from octoprint.vendor....
3,445
Python
.py
91
28.318681
89
0.616702
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,993
base.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/base.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from octoprint.vendor.sockjs.tornado import session class BaseTransportMixin(object): """Base transport. Implements few methods that session expects to see in each transport. """ name = 'overr...
835
Python
.py
18
33.444444
82
0.592593
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,994
xhr.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/xhr.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.xhr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Xhr-Polling transport implementation """ import logging from octoprint.vendor.sockjs.tornado import proto from octoprint.vendor.sockjs...
2,831
Python
.py
74
29.189189
84
0.62902
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,995
rawwebsocket.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/rawwebsocket.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.rawwebsocket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Raw websocket transport implementation """ import logging from tornado.websocket import WebSocketError from octopri...
3,188
Python
.py
80
31.375
89
0.64906
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,996
eventsource.py
OctoPrint_OctoPrint/src/octoprint/vendor/sockjs/tornado/transports/eventsource.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.eventsource ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EventSource transport implementation. """ from octoprint.vendor.sockjs.tornado.transports import streamingbase from oc...
1,501
Python
.py
39
30.153846
82
0.628453
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,997
analysis.py
OctoPrint_OctoPrint/src/octoprint/filemanager/analysis.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import collections import copy import logging import os import queue import threadi...
20,460
Python
.py
482
30.917012
120
0.570229
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,998
util.py
OctoPrint_OctoPrint/src/octoprint/filemanager/util.py
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import io import os from octoprint import UMASK from octoprint.util import atomic_...
7,995
Python
.py
200
30.665
121
0.60869
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)
21,999
destinations.py
OctoPrint_OctoPrint/src/octoprint/filemanager/destinations.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" class FileDestinations: SDCARD = "sdcard" LOCAL = "local"
156
Python
.py
4
35.5
87
0.72
OctoPrint/OctoPrint
8,222
1,667
264
AGPL-3.0
9/5/2024, 5:13:10 PM (Europe/Amsterdam)