keyword
stringclasses
7 values
repo_name
stringlengths
8
98
file_path
stringlengths
4
244
file_extension
stringclasses
29 values
file_size
int64
0
84.1M
line_count
int64
0
1.6M
content
stringlengths
1
84.1M
language
stringclasses
14 values
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_files_managment.py
.py
2,381
54
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Files input and output. """ import os from pymod...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_elements_loading.py
.py
31,180
656
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Module implementing a series of methods which allo...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_elements_interactions.py
.py
18,021
410
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Methods to manipulate PyMod elements within the pl...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_pymol_interactions.py
.py
5,827
126
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Interactions of PyMod with PyMOL. """ import os f...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_workspaces.py
.py
8,643
218
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ PyMod sessions managment. """ import os import sh...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_main_menu_commands.py
.py
44,228
983
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Commands executed when interacting with the PyMod ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_external.py
.py
2,083
56
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Interactions with external tools. """ import os i...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_main/_development.py
.py
8,800
217
""" Module for development. """ import os import sys import urllib.request import random import shutil import importlib from pymod_lib.pymod_seq.seq_star_alignment import global_pairwise_alignment_cs class PyMod_development: """ Methods used when developing or testing PyMod. """ def _launch_develop...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_externals/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_externals/hhsuite/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_externals/hhsuite/hhmakemodel.py
.py
23,951
705
#!/usr/bin/env python from pymod_lib.pymod_externals.hhsuite.hh_reader import read_result from copy import deepcopy import re, os, sys, tempfile, glob from operator import itemgetter # hzhu from itertools import groupby # hzhu EMPTY = '*' GAP = '-' DEBUG_MODE = False class Gap: """ A gap is a continuous st...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_externals/hhsuite/hh_reader.py
.py
7,178
205
#!/usr/bin/env python """ Parser for hhr result files created with hhblits|hhsearch|hhalign -o <hhr_file> """ import sys from collections import namedtuple __author__ = 'Markus Meier (markus.meier@mpibpc.mpg.de)' __version__ = '1.0' __license__ = "GPL-3" hhr_alignment = namedtuple('hhr_alignment', ['query_id', '...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/shared_gui_components_qt.py
.py
33,063
1,010
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Common functions and variables used by the Qt GUI ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/pymod_table.py
.py
4,840
133
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. import csv import warnings from pymol.Qt import QtCor...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/specific_gui_components_qt.py
.py
21,533
559
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Classes for PyQt widgets used in specific parts of...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/_header_entry_qt.py
.py
39,691
781
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Module implementing the widgets showed in the left...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/_sequence_text_qt.py
.py
25,703
583
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Module implementing the widgets showing the sequen...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/_main_menu_qt.py
.py
23,319
406
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ A module for building the Qt PyMod main window men...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/main_window_qt.py
.py
45,008
1,076
# Copyright 2020 by Giacomo Janson, Alessandro Paiardini. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ This module implements the m...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/_element_widgets_qt.py
.py
17,313
456
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Module implementing the "widget group" class for a...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/aqua/qsshelper.py
.py
921
27
import os import re class QSSHelper: def __init__(self): pass @staticmethod def open_qss(path): """ opens a Qt stylesheet with a path relative to the project Note: it changes the urls in the Qt stylesheet (in memory), and makes these urls relative to the project W...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_gui/main_window/aqua/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pymod_plot_qt.py
.py
41,762
1,014
# Copyright 2020 by Giacomo Janson. All rights reserved. # This code is part of the PyMod package and governed by its license. Please # see the LICENSE file that should have been included as part of this package # or the main __init__.py file in the pymod3 folder. """ Module for a PyQt window with plots built with the...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/pgcollections.py
.py
15,679
485
# -*- coding: utf-8 -*- """ advancedTypes.py - Basic data structures not included with python Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. Includes: - OrderedDict - Dictionary which preserves the order of its elements - BiDict, ReverseDict - Bi-direction...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/SRTTransform.py
.py
7,960
261
# -*- coding: utf-8 -*- from .Qt import QtCore, QtGui from .Point import Point import numpy as np class SRTTransform(QtGui.QTransform): """Transform that can always be represented as a combination of 3 matrices: scale * rotate * translate This transform has no shear; angles are always preserved. """ d...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/Transform3D.py
.py
1,867
53
# -*- coding: utf-8 -*- from .Qt import QtCore, QtGui from . import functions as fn from .Vector import Vector import numpy as np class Transform3D(QtGui.QMatrix4x4): """ Extension of QMatrix4x4 with some helpful methods added. """ def __init__(self, *args): if len(args) == 1: if i...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/ordereddict.py
.py
4,532
132
# Copyright (c) 2009 Raymond Hettinger # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish,...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/python2_3.py
.py
542
26
# -*- coding: utf-8 -*- """ Helper functions that smooth out the differences between python 2 and 3. """ import sys def asUnicode(x): if sys.version_info[0] == 2: if isinstance(x, unicode): return x elif isinstance(x, str): return x.decode('UTF-8') else: ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/ptime.py
.py
1,039
38
# -*- coding: utf-8 -*- """ ptime.py - Precision time function made os-independent (should have been taken care of by python) Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ import sys if sys.version_info[0] < 3: from time import clock from time i...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/Qt.py
.py
10,195
349
# -*- coding: utf-8 -*- """ This module exists to smooth out some of the differences between PySide and PyQt4: * Automatically import either PyQt4 or PySide depending on availability * Allow to import QtCore/QtGui pyqtgraph.Qt without specifying which Qt wrapper you want to use. * Declare QtCore.Signal, .Slot in PyQ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/debug.py
.py
40,699
1,209
# -*- coding: utf-8 -*- """ debug.py - Functions to aid in debugging Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from __future__ import print_function import sys, traceback, time, gc, re, types, weakref, inspect, os, cProfile, threading from . import p...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/units.py
.py
1,402
64
# -*- coding: utf-8 -*- ## Very simple unit support: ## - creates variable names like 'mV' and 'kHz' ## - the value assigned to the variable corresponds to the scale prefix ## (mV = 0.001) ## - the actual units are purely cosmetic for making code clearer: ## ## x = 20*pA is identical to x = 20*1e-12 #...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/Point.py
.py
4,633
162
# -*- coding: utf-8 -*- """ Point.py - Extension of QPointF which adds a few missing methods. Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from .Qt import QtCore import numpy as np def clip(x, mn, mx): if x > mx: return mx if x < mn: ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exceptionHandling.py
.py
4,149
107
# -*- coding: utf-8 -*- """This module installs a wrapper around sys.excepthook which allows multiple new exception handlers to be registered. Optionally, the wrapper also stops exceptions from causing long-term storage of local stack frames. This has two major effects: - Unhandled exceptions will no longer cause ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/__init__.py
.py
18,237
473
# -*- coding: utf-8 -*- """ PyQtGraph - Scientific Graphics and GUI Library for Python www.pyqtgraph.org """ __version__ = '0.11.0.dev0' ### import all the goodies and add some helper functions for easy CLI use ## 'Qt' is a local module; it is intended mainly to cover up the differences ## between PyQt4 and PySide. ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/colormap.py
.py
9,998
260
import numpy as np from .Qt import QtGui, QtCore from .python2_3 import basestring from .functions import mkColor class ColorMap(object): """ A ColorMap defines a relationship between a scalar value and a range of colors. ColorMaps are commonly used for false-coloring monochromatic images, coloring ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/graphicsWindows.py
.py
2,738
86
# -*- coding: utf-8 -*- """ DEPRECATED: The classes below are convenience classes that create a new window containting a single, specific widget. These classes are now unnecessary because it is possible to place any widget into its own window by simply calling its show() method. """ from .Qt import QtCore, QtGui, mkQ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/WidgetGroup.py
.py
10,004
286
# -*- coding: utf-8 -*- """ WidgetGroup.py - WidgetGroup class for easily managing lots of Qt widgets Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. This class addresses the problem of having to save and restore the state of a large group of widgets. """ fro...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/PlotData.py
.py
1,572
56
class PlotData(object): """ Class used for managing plot data - allows data sharing between multiple graphics items (curve, scatter, graph..) - each item may define the columns it needs - column groupings ('pos' or x, y, z) - efficiently appendable - log, fft transformations ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/functions.py
.py
96,082
2,510
# -*- coding: utf-8 -*- """ functions.py - Miscellaneous functions with no other home Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from __future__ import division import warnings import numpy as np import decimal, re import ctypes import sys, struct from...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/SRTTransform3D.py
.py
10,879
316
# -*- coding: utf-8 -*- from .Qt import QtCore, QtGui from .Vector import Vector from .Transform3D import Transform3D from .Vector import Vector import numpy as np class SRTTransform3D(Transform3D): """4x4 Transform matrix that can always be represented as a combination of 3 matrices: scale * rotate * translate ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/configfile.py
.py
6,853
217
# -*- coding: utf-8 -*- """ configfile.py - Human-readable text configuration file library Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. Used for reading and writing dictionary objects to a python-like configuration file format. Data structures may be nested ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/Vector.py
.py
2,932
87
# -*- coding: utf-8 -*- """ Vector.py - Extension of QVector3D which adds a few missing methods. Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from .Qt import QtGui, QtCore, QT_LIB import numpy as np class Vector(QtGui.QVector3D): """Extension of QVe...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/reload.py
.py
19,304
572
# -*- coding: utf-8 -*- """ Magic Reload Library Luke Campagnola 2010 Python reload function that actually works (the way you expect it to) - No re-importing necessary - Modules can be reloaded in any order - Replaces functions and methods with their updated code - Changes instances to use updated classes - Aut...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/ThreadsafeTimer.py
.py
1,551
41
from .Qt import QtCore, QtGui class ThreadsafeTimer(QtCore.QObject): """ Thread-safe replacement for QTimer. """ timeout = QtCore.Signal() sigTimerStopRequested = QtCore.Signal() sigTimerStartRequested = QtCore.Signal(object) def __init__(self): QtCore.QObject.__init__(sel...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/frozenSupport.py
.py
1,830
52
## Definitions helpful in frozen environments (eg py2exe) import os, sys, zipfile def listdir(path): """Replacement for os.listdir that works in frozen environments.""" if not hasattr(sys, 'frozen'): return os.listdir(path) (zipPath, archivePath) = splitZip(path) if archivePath is None: ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/SignalProxy.py
.py
3,854
119
# -*- coding: utf-8 -*- from .Qt import QtCore from .ptime import time from . import ThreadsafeTimer import weakref __all__ = ['SignalProxy'] class SignalProxy(QtCore.QObject): """Object which collects rapid-fire signals and condenses them into a single signal or a rate-limited stream of signals. Used, f...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/template_pyqt5.py
.py
6,230
115
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqtgraph/console/template.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Fo...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/template_pyside2.py
.py
6,517
114
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'template.ui' # # Created: Sun Sep 18 19:19:10 2016 # by: pyside2-uic running on PySide2 2.0.0~alpha0 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWidgets class Ui_Form(object): def...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/__init__.py
.py
34
1
from .Console import ConsoleWidget
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/Console.py
.py
19,438
484
# -*- coding: utf-8 -*- import sys, re, os, time, traceback, subprocess import pickle from ..Qt import QtCore, QtGui, QT_LIB from ..python2_3 import basestring from .. import exceptionHandling as exceptionHandling from .. import getConfigOption from ..functions import SignalBlock if QT_LIB == 'PySide': from . impo...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/template_pyside.py
.py
6,793
116
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqtgraph/console/template.ui' # # Created: Tue Sep 19 09:45:18 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_Form(object): ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/CmdInput.py
.py
1,236
41
from ..Qt import QtCore, QtGui from ..python2_3 import asUnicode class CmdInput(QtGui.QLineEdit): sigExecuteCmd = QtCore.Signal(object) def __init__(self, parent): QtGui.QLineEdit.__init__(self, parent) self.history = [""] self.ptr = 0 def keyPressEvent(self, ev): ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/console/template_pyqt.py
.py
6,808
128
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqtgraph/console/template.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/Exporter.py
.py
5,393
140
from ..widgets.FileDialog import FileDialog from ..Qt import QtGui, QtCore, QtSvg from ..python2_3 import asUnicode, basestring from ..GraphicsScene import GraphicsScene import os, re LastExportDirectory = None class Exporter(object): """ Abstract class used for exporting graphics to file / printer / whatever...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/HDF5Exporter.py
.py
2,396
72
from ..Qt import QtGui, QtCore from .Exporter import Exporter from ..parametertree import Parameter from .. import PlotItem import numpy try: import h5py HAVE_HDF5 = True except ImportError: HAVE_HDF5 = False __all__ = ['HDF5Exporter'] class HDF5Exporter(Exporter): Name = "HDF5 Export: plot...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/CSVExporter.py
.py
2,857
85
# -*- coding: utf-8 -*- from ..Qt import QtGui, QtCore from .Exporter import Exporter from ..parametertree import Parameter from .. import PlotItem __all__ = ['CSVExporter'] class CSVExporter(Exporter): Name = "CSV from plot data" windows = [] def __init__(self, item): Exporter.__init__(s...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/SVGExporter.py
.py
17,482
444
from .Exporter import Exporter from ..python2_3 import asUnicode from ..parametertree import Parameter from ..Qt import QtGui, QtCore, QtSvg, QT_LIB from .. import debug from .. import functions as fn import re import xml.dom.minidom as xml import numpy as np __all__ = ['SVGExporter'] class SVGExporter(Exporter): ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/ImageExporter.py
.py
4,304
109
from .Exporter import Exporter from ..parametertree import Parameter from ..Qt import QtGui, QtCore, QtSvg, QT_LIB from .. import functions as fn import numpy as np __all__ = ['ImageExporter'] class ImageExporter(Exporter): Name = "Image File (PNG, TIF, JPG, ...)" allowCopy = True def __init__(self, ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/__init__.py
.py
253
12
from .Exporter import Exporter from .ImageExporter import * from .SVGExporter import * from .Matplotlib import * from .CSVExporter import * from .PrintExporter import * from .HDF5Exporter import * def listExporters(): return Exporter.Exporters[:]
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/PrintExporter.py
.py
2,671
69
from .Exporter import Exporter from ..parametertree import Parameter from ..Qt import QtGui, QtCore, QtSvg import re __all__ = ['PrintExporter'] #__all__ = [] ## Printer is disabled for now--does not work very well. class PrintExporter(Exporter): Name = "Printer" def __init__(self, item): Exporter...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/Matplotlib.py
.py
4,842
128
from ..Qt import QtGui, QtCore from .Exporter import Exporter from .. import PlotItem from .. import functions as fn __all__ = ['MatplotlibExporter'] """ It is helpful when using the matplotlib Exporter if your .matplotlib/matplotlibrc file is configured appropriately. The following are suggested for getting usable P...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/tests/test_csv.py
.py
1,704
59
""" CSV export test """ from __future__ import division, print_function, absolute_import import pyqtgraph as pg import csv import os import tempfile app = pg.mkQApp() def approxeq(a, b): return (a-b) <= ((a + b) * 1e-6) def test_CSVExporter(): tempfilename = tempfile.NamedTemporaryFile(suffix='.csv').name ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/tests/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/tests/test_svg.py
.py
2,206
79
""" SVG export test """ from __future__ import division, print_function, absolute_import import pyqtgraph as pg import tempfile import os app = pg.mkQApp() def test_plotscene(): tempfilename = tempfile.NamedTemporaryFile(suffix='.svg').name print("using %s as a temporary file" % tempfilename) pg.setConf...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/tests/test_hdf5.py
.py
2,058
72
# -*- coding: utf-8 -*- import pytest import pyqtgraph as pg from pyqtgraph.exporters import HDF5Exporter import numpy as np from numpy.testing import assert_equal import h5py import os @pytest.fixture def tmp_h5(tmp_path): yield tmp_path / "data.h5" @pytest.mark.parametrize("combine", [False, True]) def test_H...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/exporters/tests/test_image.py
.py
341
14
# -*- coding: utf-8 -*- import pyqtgraph as pg from pyqtgraph.exporters import ImageExporter app = pg.mkQApp() def test_ImageExporter_filename_dialog(): """Tests ImageExporter code path that opens a file dialog. Regression test for pull request 1133.""" p = pg.plot() exp = ImageExporter(p.getPlotItem...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/garbage_collector.py
.py
1,599
51
import gc from ..Qt import QtCore class GarbageCollector(object): ''' Disable automatic garbage collection and instead collect manually on a timer. This is done to ensure that garbage collection only happens in the GUI thread, as otherwise Qt can crash. Credit: Erik Janssens Source: ht...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/lru_cache.py
.py
4,236
122
import operator import sys import itertools _IS_PY3 = sys.version_info[0] == 3 class LRUCache(object): ''' This LRU cache should be reasonable for short collections (until around 100 items), as it does a sort on the items if the collection would become too big (so, it is very fast for getting and set...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/cprint.py
.py
3,028
103
""" Cross-platform color text printing Based on colorama (see pyqtgraph/util/colorama/README.txt) """ import sys, re from .colorama.winterm import WinTerm, WinColor, WinStyle from .colorama.win32 import windll from ..python2_3 import basestring _WIN = sys.platform.startswith('win') if windll is not None: winterm...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/pil_fix.py
.py
2,053
64
# -*- coding: utf-8 -*- """ Importing this module installs support for 16-bit images in PIL. This works by patching objects in the PIL namespace; no files are modified. """ from PIL import Image if Image.VERSION == '1.1.7': Image._MODE_CONV["I;16"] = ('%su2' % Image._ENDIAN, None) Image._fromarray_typemap[((1...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/get_resolution.py
.py
527
15
from .. import mkQApp def test_screenInformation(): qApp = mkQApp() desktop = qApp.desktop() resolution = desktop.screenGeometry() availableResolution = desktop.availableGeometry() print("Screen resolution: {}x{}".format(resolution.width(), resolution.height())) print("Available geometry: {}x{}...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/mutex.py
.py
3,466
115
# -*- coding: utf-8 -*- import traceback from ..Qt import QtCore class Mutex(QtCore.QMutex): """ Subclass of QMutex that provides useful debugging information during deadlocks--tracebacks are printed for both the code location that is attempting to lock the mutex as well as the location that has alre...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/colorama/winterm.py
.py
4,205
121
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL = 0...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/colorama/__init__.py
.py
0
0
null
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/colorama/win32.py
.py
4,901
138
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 try: from ctypes import windll from ctypes import wintypes except ImportError: windll = None SetConsoleTextAttribute = lambda *_: None else: from ctypes import ( byref, Str...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/util/tests/test_lru_cache.py
.py
1,191
51
from pyqtgraph.util.lru_cache import LRUCache def testLRU(): lru = LRUCache(2, 1) # check twice checkLru(lru) checkLru(lru) def checkLru(lru): lru[1] = 1 lru[2] = 2 lru[3] = 3 assert len(lru) == 2 assert set([2, 3]) == set(lru.keys()) assert set([2, 3]) == set(lru.values()) ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/pixmaps/compile.py
.py
627
20
# -*- coding: utf-8 -*- import numpy as np from PyQt4 import QtGui import os, pickle, sys path = os.path.abspath(os.path.split(__file__)[0]) pixmaps = {} for f in os.listdir(path): if not f.endswith('.png'): continue print(f) img = QtGui.QImage(os.path.join(path, f)) ptr = img.bits() ptr.se...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/pixmaps/__init__.py
.py
803
28
""" Allows easy loading of pixmaps used in UI elements. Provides support for frozen environments as well. """ import os, sys, pickle from ..functions import makeQImage from ..Qt import QtGui from ..python2_3 import basestring if sys.version_info[0] == 2: from . import pixmapData_2 as pixmapData else: from . i...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/pixmaps/pixmapData_2.py
.py
65,632
1
import numpy as np; pixmapData={'lock.png': "cnumpy.core.multiarray\n_reconstruct\np0\n(cnumpy\nndarray\np1\n(I0\ntp2\nS'b'\np3\ntp4\nRp5\n(I1\n(I32\nI32\nI4\ntp6\ncnumpy\ndtype\np7\n(S'u1'\np8\nI0\nI1\ntp9\nRp10\n(I3\nS'|'\np11\nNNNI-1\nI-1\nI0\ntp12\nbI00\nS'\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\x0...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/pixmaps/pixmapData_3.py
.py
53,111
1
import numpy as np; pixmapData={'lock.png': b'\x80\x03cnumpy.core.multiarray\n_reconstruct\nq\x00cnumpy\nndarray\nq\x01K\x00\x85q\x02C\x01bq\x03\x87q\x04Rq\x05(K\x01K K K\x04\x87q\x06cnumpy\ndtype\nq\x07X\x02\x00\x00\x00u1q\x08K\x00K\x01\x87q\tRq\n(K\x03X\x01\x00\x00\x00|q\x0bNNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00t...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/__init__.py
.py
234
5
from .Parameter import Parameter, registerParameterType from .ParameterTree import ParameterTree from .ParameterItem import ParameterItem from .ParameterSystem import ParameterSystem, SystemSolver from . import parameterTypes as types
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/Parameter.py
.py
32,590
779
from ..Qt import QtGui, QtCore import os, weakref, re from ..pgcollections import OrderedDict from ..python2_3 import asUnicode, basestring from .ParameterItem import ParameterItem PARAM_TYPES = {} PARAM_NAMES = {} def registerParameterType(name, cls, override=False): global PARAM_TYPES if name in PARAM_TYPES...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/parameterTypes.py
.py
25,922
688
from ..Qt import QtCore, QtGui from ..python2_3 import asUnicode from .Parameter import Parameter, registerParameterType from .ParameterItem import ParameterItem from ..widgets.SpinBox import SpinBox from ..widgets.ColorButton import ColorButton from ..colormap import ColorMap #from ..widgets.GradientWidget import Grad...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/ParameterTree.py
.py
5,662
155
from ..Qt import QtCore, QtGui from ..widgets.TreeWidget import TreeWidget import os, weakref, re from .ParameterItem import ParameterItem #import functions as fn class ParameterTree(TreeWidget): """Widget used to display or control data from a hierarchy of Parameters""" def __init__...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/ParameterSystem.py
.py
4,598
128
from .parameterTypes import GroupParameter from .. import functions as fn from .SystemSolver import SystemSolver class ParameterSystem(GroupParameter): """ ParameterSystem is a subclass of GroupParameter that manages a tree of sub-parameters with a set of interdependencies--changing any one parameter ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/SystemSolver.py
.py
17,816
425
from ..pgcollections import OrderedDict import numpy as np import copy class SystemSolver(object): """ This abstract class is used to formalize and manage user interaction with a complex system of equations (related to "constraint satisfaction problems"). It is often the case that devices must be con...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/ParameterItem.py
.py
6,541
172
from ..Qt import QtGui, QtCore from ..python2_3 import asUnicode import os, weakref, re class ParameterItem(QtGui.QTreeWidgetItem): """ Abstract ParameterTree item. Used to represent the state of a Parameter from within a ParameterTree. - Sets first column of item to name - generates context ...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/parametertree/tests/test_parametertypes.py
.py
4,884
134
# ~*~ coding: utf8 ~*~ import sys import pytest from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph.parametertree as pt import pyqtgraph as pg from pyqtgraph.python2_3 import asUnicode from pyqtgraph.functions import eq import numpy as np app = pg.mkQApp() def _getWidget(param): return list(param.items.keys()...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/metaarray/__init__.py
.py
25
2
from .MetaArray import *
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/metaarray/MetaArray.py
.py
57,689
1,510
# -*- coding: utf-8 -*- """ MetaArray.py - Class encapsulating ndarray with meta data Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. MetaArray is an array class based on numpy.ndarray that allows storage of per-axis meta data such as axis values, names, units,...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/metaarray/readMeta.m
.m
1,752
87
function f = readMeta(file) info = hdf5info(file); f = readMetaRecursive(info.GroupHierarchy.Groups(1)); end function f = readMetaRecursive(root) typ = 0; for i = 1:length(root.Attributes) if strcmp(root.Attributes(i).Shortname, '_metaType_') typ = root.Attributes(i).Value.Data; break end end ...
MATLAB
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/canvas/TransformGuiTemplate_pyside.py
.py
2,827
56
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqtgraph/canvas/TransformGuiTemplate.ui' # # Created: Wed Nov 9 17:57:16 2016 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_Form(ob...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/canvas/TransformGuiTemplate_pyqt.py
.py
2,986
69
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqtgraph/canvas/TransformGuiTemplate.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attribute...
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/canvas/__init__.py
.py
71
3
# -*- coding: utf-8 -*- from .Canvas import * from .CanvasItem import *
Python
3D
pymodproject/pymod
pymod3/pymod_lib/pymod_plot/pyqtgraph/canvas/CanvasTemplate_pyqt.py
.py
5,347
105
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'CanvasTemplate.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf...
Python