本文整理汇总了Python中pyqtgraph.flowchart.Node.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Node.__init__方法的具体用法?Python Node.__init__怎么用?Python Node.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.flowchart.Node
的用法示例。
在下文中一共展示了Node.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'accelX': dict(io='out'),
'accelY': dict(io='out'),
'accelZ': dict(io='out'),
}
self.wiimote = None
self._acc_vals = []
self.ui = QtGui.QWidget()
self.layout = QtGui.QGridLayout()
label = QtGui.QLabel("Bluetooth MAC address:")
self.layout.addWidget(label)
self.text = QtGui.QLineEdit()
self.layout.addWidget(self.text)
label2 = QtGui.QLabel("Update rate (Hz)")
self.layout.addWidget(label2)
self.update_rate_input = QtGui.QSpinBox()
self.update_rate_input.setMinimum(0)
self.update_rate_input.setMaximum(60)
self.update_rate_input.setValue(20)
self.update_rate_input.valueChanged.connect(self.set_update_rate)
self.layout.addWidget(self.update_rate_input)
self.connect_button = QtGui.QPushButton("connect")
self.layout.addWidget(self.connect_button)
self.ui.setLayout(self.layout)
self.connect_button.clicked.connect(self.connect_wiimote)
self.btaddr = "b8:ae:6e:1b:ad:a0" # for ease of use
self.text.setText(self.btaddr)
self.update_timer = QtCore.QTimer()
self.update_timer.timeout.connect(self.update_all_sensors)
Node.__init__(self, name, terminals=terminals)
示例2: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
self.plot = None
## Init node with single input terminal
Node.__init__(self, name, terminals={
'dataIn': {'io': 'in'}
#'dataOut'
})
示例3: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name, proto=None, weightsFile=None, filePath=None):
Node.__init__(self, name, allowAddInput=True, allowAddOutput=True, allowRemove=True)
solverFD = SolverProto.DESCRIPTOR
self.param = LParameter.create(repeated=False, fieldDescriptor=solverFD, expanded=True)
for param in self.param.children():
param.setToDefault()
t = ptree.ParameterTree()
t.addParameters(self.param, depth=1, showTop=False)
t.setMinimumHeight(325)
t.setVerticalScrollBarPolicy(pg.QtCore.Qt.ScrollBarAlwaysOff)
self.ui = t
self.proto = SolverProto()
self.trainLoss, self.testLoss, self.testAcc = None, None, None
self.niter, self.testInterval = None, None
if proto is not None:
self.setProto(proto)
# if a filePath is given, we use it regardless of the directory of the solver prototxt, and will write a
# temporary file in that directory for training purposes. otherwise we give the path of the solver file,
# and hope the train file is in that directory, or else crash!
if filePath is None:
if proto is not None:
filePath = os.path.dirname(proto)
else:
filePath = os.curdir
self.filePath = filePath
self.weights = weightsFile
示例4: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {"data": dict(io="out"), "categories": dict(io="out")}
self.ui = QtGui.QWidget()
self.layout = QtGui.QGridLayout()
label = QtGui.QLabel("Textfile Input:")
self.layout.addWidget(label)
self.text = QtGui.QLineEdit()
self.layout.addWidget(self.text)
self.reload_button = QtGui.QPushButton("read")
self.layout.addWidget(self.reload_button)
self.ui.setLayout(self.layout)
self.reload_button.clicked.connect(self._add_file)
self.text.setText("example_1.csv")
self.files = {
"walk": ["walk_1.csv", "walk_2.csv", "walk_3.csv", "walk_4.csv"],
"hop": ["hop_1.csv", "hop_2.csv", "hop_3.csv", "hop_4.csv"],
"stand": ["stand_1.csv", "stand_2.csv", "stand_3.csv", "stand_4.csv"],
}
self.output = []
self.categories = []
self._compute_files()
Node.__init__(self, name, terminals=terminals)
示例5: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'categoryIn': dict(io='in')
}
Node.__init__(self, name, terminals)
self.recog = []
示例6: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'dataInX': dict(io='in'),
'dataOutX': dict(io='out')
}
self._dataInX = np.array([])
Node.__init__(self, name, terminals=terminals)
示例7: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'categories': dict(io='in'),
'trainigData': dict(io='in'),
'classifyData': dict(io='in'),
'classification': dict(io='out'),
}
Node.__init__(self, name, terminals=terminals)
示例8: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'Znormal': dict(io='in'),
'Xnormal': dict(io='in'),
'VectorX': dict(io='out'),
'VectorY': dict(io='out'),
}
self._stuff = np.array([])
Node.__init__(self, name, terminals=terminals)
示例9: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'X': dict(io='out'),
'Y': dict(io='out'),
}
self._dataIn = [0 in range(100)]
self.frequency_array = [0 in range(100)]
Node.__init__(self, name, terminals=terminals)
示例10: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
"trainingData": dict(io="in"),
"testData": dict(io="in"),
"categories": dict(io="in"),
"category": dict(io="out"),
}
Node.__init__(self, name, terminals=terminals)
示例11: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'irVals': dict(io='in'),
'irX': dict(io='out'),
'irY': dict(io='out')
}
self._ir_vals = []
Node.__init__(self, name, terminals=terminals)
示例12: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'dataIn': dict(io='in'),
'dataOut': dict(io='out'),
}
self.bufferSize = bufferSize
Node.__init__(self, name, terminals=terminals)
示例13: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'In': dict(io='in'),
'Out': dict(io='out'),
}
self._ir_vals = []
self._xy_vals = []
self.avg_val = None
Node.__init__(self, name, terminals=terminals)
示例14: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
'''terminals = {
#'In1': {'io':'in'}, 'In2': {'io':'in'},
'In1': dict(io='in'), 'In2': dict(io='in'),
'Out': dict(io='out'),
}
CtrlNode.__init__(self, name, terminals=terminals)
Node.__init__(self, name, terminals={'In1': {'io':'in'}, 'In2': {'io':'in'}})'''
Node.__init__(self, name, terminals={'In1': {'io':'in'}, 'In2': {'io':'in'},
'Out': {'io':'out'}})
示例15: __init__
# 需要导入模块: from pyqtgraph.flowchart import Node [as 别名]
# 或者: from pyqtgraph.flowchart.Node import __init__ [as 别名]
def __init__(self, name):
terminals = {
'irData': dict(io='in'),
}
self._ir_vals = []
self._xy_vals = []
self.plot = None
self.spi = None
self.avg_val = (0, 0)
Node.__init__(self, name, terminals=terminals)