content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import sys import os import signal sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from munch import Munch ''' Signals munch.subscription.create -> Create a new subscription munch.subscription.delete -> Deletes an existing subscription munch.subscription.update -> Updates an existing subscription munch.subscription.list -> Returns a list of all the available subscriptions munch.appInstanceId.subscriptions.ui -> Notifies UI about events that have happened in the backend ''' ''' Notifications Message Format -> JSON Sample Incoming Message { appInstanceId: 'XXXXX' data: { id: ... username: ... } } Sample Notification Message { status: 1, message: 'Some context information' data: { } } ''' # Create instance of munch using your publish and subscribe keys munch = Munch( 'pub-c-a2ca7a5e-f2c4-4682-93fa-4d95929e2c3f', 'sub-c-c84d1450-0df9-11e6-bbd9-02ee2ddab7fe' ) @munch.consumes('munch.subscription.list') @munch.consumes('munch.subscription.create')
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 6737, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 492, 6, 4008, 198, 6738, 285, 3316, 1330, 337, 3...
2.670918
392
# Definition for a Node. from typing import Optional s = Solution() print(s.flatten(Node(None, None, None, None)))
[ 2, 30396, 329, 257, 19081, 13, 198, 6738, 19720, 1330, 32233, 628, 628, 198, 82, 796, 28186, 3419, 198, 4798, 7, 82, 13, 2704, 41769, 7, 19667, 7, 14202, 11, 6045, 11, 6045, 11, 6045, 22305, 198 ]
3.216216
37
import io import os import tarfile from core.DockerClient import DockerClient from core.LineBuffer import LineBuffer from core.TarUtils import make_tarfile
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, 198, 6738, 4755, 13, 35, 12721, 11792, 1330, 25716, 11792, 198, 6738, 4755, 13, 13949, 28632, 1330, 6910, 28632, 198, 6738, 4755, 13, 47079, 18274, 4487, 1330, 787, 62, 18870,...
3.761905
42
"""Routines for streaming cell data""" import os import warnings import logging logging.captureWarnings(True) if __name__ == "__main__": warnings.warn("to be implemented")
[ 37811, 49, 448, 1127, 329, 11305, 2685, 1366, 37811, 198, 198, 11748, 28686, 198, 11748, 14601, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 27144, 495, 54, 1501, 654, 7, 17821, 8, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 1241...
3.140351
57
import sae import os import sys from driving import wsgi app_root = os.path.dirname(__file__) sys.path.insert(0, os.path.join(app_root, 'django-filter-0.9.2')) application = sae.create_wsgi_app(wsgi.application)
[ 11748, 473, 68, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 5059, 1330, 266, 82, 12397, 198, 198, 1324, 62, 15763, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 220, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, ...
2.511628
86
# -*- coding: utf-8 -*- """ Created on Fri Jun 4 00:12:01 2021 @author: ali_d """ #3D graphs from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import style style.use('fivethirtyeight') fig = plt.figure() ax1 = fig.add_subplot(111, projection='3d') x = [1,2,3,4,5,6,7,8,9,10] y = [5,6,7,8,2,5,6,3,7,2] z = [1,2,6,3,2,7,3,3,7,2] ax1.plot(x,y,z) ax1.set_xlabel('x axis') ax1.set_ylabel('y axis') ax1.set_zlabel('z axis') plt.show() #%% style.use("fivethirtyeight") fig = plt.figure() axis1 = fig.add_subplot(111,projection="3d") x = [1,2,3,4,5,6,7,8,9,10] y = [5,2,7,1,5,8,6,9,2,1] z = [2,4,7,8,5,3,8,7,4,9] axis1.plot(x,y,z) ax1.set_xlabel('x axis') ax1.set_ylabel('y axis') ax1.set_zlabel('z axis') plt.show() #%% #3D Scatter Plot from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import style style.use('ggplot') fig = plt.figure() ax1 = fig.add_subplot(111, projection='3d') x = [1,2,3,4,5,6,7,8,9,10] y = [5,6,7,8,2,5,6,3,7,2] z = [1,2,6,3,2,7,3,3,7,2] x2 = [-1,-2,-3,-4,-5,-6,-7,-8,-9,-10] y2 = [-5,-6,-7,-8,-2,-5,-6,-3,-7,-2] z2 = [1,2,6,3,2,7,3,3,7,2] ax1.scatter(x, y, z, c='g', marker='o') ax1.scatter(x2, y2, z2, c ='r', marker='o') ax1.set_xlabel('x axis') ax1.set_ylabel('y axis') ax1.set_zlabel('z axis') plt.show() #%% from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import style style.use('fast') fig = plt.figure() ax1 = fig.add_subplot(111, projection='3d') x = [4,3,7,8,5,8,2,6,11,10] y = [5,3,7,9,8,5,5,2,7,1] z = [4,2,6,3,2,7,3,3,7,2] x2 = [-1,-2,-3,-4,-5,-6,-7,-8,-9,-10] y2 = [-5,-6,-7,-8,-2,-5,-6,-3,-7,-2] z2 = [1,2,6,3,2,7,3,3,7,2] ax1.scatter(x, y, z, c='g', marker='o') ax1.scatter(x2, y2, z2, c ='r', marker='o') ax1.set_xlabel('x axis') ax1.set_ylabel('y axis') ax1.set_zlabel('z axis') plt.show()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 7653, 220, 604, 3571, 25, 1065, 25, 486, 33448, 198, 198, 31, 9800, 25, 34965, 62, 67, 198, 37811, 198, 198, 2, 18, 35, 28770, 198, 19...
1.772045
1,066
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== from . import cntk_py from .cntk_py import default_param_init_scale as DefaultParamInitScale,\ sentinel_value_for_infer_param_init_rank as SentinelValueForInferParamInitRank,\ sentinel_value_for_auto_select_random_seed as SentinelValueForAutoSelectRandomSeed def uniform(scale=DefaultParamInitScale, seed=None): ''' Uniform initializer Args: scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to uniform distribution between `scale*[-0.05, 0.05]` ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.uniform_initializer(scale, seed) def gaussian(output_rank=SentinelValueForInferParamInitRank, filter_rank=SentinelValueForInferParamInitRank, scale=DefaultParamInitScale, seed=None): ''' Gaussian initializer Args: output_rank (`int`): output rank filter_rank (`int`): filter rank scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to Gaussian distribution with mean `0` and standard deviation `scale*0.2/sqrt(fanIn))`. ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.gaussian_initializer(output_rank, filter_rank, scale, seed) def xavier(output_rank=SentinelValueForInferParamInitRank, filter_rank=SentinelValueForInferParamInitRank, scale=DefaultParamInitScale, seed=None): ''' Xavier initializer Args: output_rank (`int`): output rank filter_rank (`int`): filter rank scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to Gaussian distribution with mean `0` and standard deviation `scale*sqrt(3.0/fanIn)` ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.xavier_initializer(output_rank, filter_rank, scale, seed) def glorot_uniform(output_rank=SentinelValueForInferParamInitRank, filter_rank=SentinelValueForInferParamInitRank, scale=DefaultParamInitScale, seed=None): ''' Glorot initializer Args: output_rank (`int`): output rank filter_rank (`int`): filter rank scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to uniform distribution between `scale*sqrt(6.0/(fanIn+fanOut))*[-1,1]` ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.glorot_uniform_initializer(output_rank, filter_rank, scale, seed) def glorot_normal(output_rank=SentinelValueForInferParamInitRank, filter_rank=SentinelValueForInferParamInitRank, scale=DefaultParamInitScale, seed=None): ''' initializer Args: output_rank (`int`): output rank filter_rank (`int`): filter rank scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to Gaussian distribution with mean `0` and standard deviation `scale*sqrt(2.0/(fanIn+fanOut))` ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.glorot_normal_initializer(output_rank, filter_rank, scale, seed) def he_uniform(output_rank=SentinelValueForInferParamInitRank, filter_rank=SentinelValueForInferParamInitRank, scale=DefaultParamInitScale, seed=None): ''' initializer Args: output_rank (`int`): output rank filter_rank (`int`): filter rank scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to uniform distribution between `scale*sqrt(6.0/fanIn)*[-1,1]` ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.he_uniform_initializer(output_rank, filter_rank, scale, seed) def he_normal(output_rank=SentinelValueForInferParamInitRank, filter_rank=SentinelValueForInferParamInitRank, scale=DefaultParamInitScale, seed=None): ''' initializer Args: output_rank (`int`): output rank filter_rank (`int`): filter rank scale (`float`): scale seed (`int`): random seed Returns: initializer for :class:`cntk.variables.Parameter` initialized to Gaussian distribution with mean `0` and standard deviation `scale*sqrt(2.0/fanIn)` ''' if seed is None: seed = SentinelValueForAutoSelectRandomSeed return cntk_py.he_normal_initializer(output_rank, filter_rank, scale, seed) def bilinear(kernel_width, kernel_height): ''' initializer Args: kernel_width (`int`): kernel width kernel_height (`int`): kernel height Returns: initializer for :class:`cntk.variables.Parameter` useful for deconvolution layer ''' return cntk_py.bilinear_initializer(kernel_width, kernel_height) def initializer_with_rank(initializer, output_rank=None, filter_rank=None): ''' override output_rank and filter_rank specification in a random initializer constructed without an explciti output_rank and filter_rank specification Args:' initializer: initializer whose output_rank and filter_rank parameters are to be overriden output_rank (`int`): new output rank value filter_rank (`int`): new filter rank value Returns: new initializer for `:class:cntk.variables.Parameter` with specified output_rank and filter_rank ''' if output_rank is None: output_rank = SentinelValueForInferParamInitRank if filter_rank is None: filter_rank = SentinelValueForInferParamInitRank return cntk_py.random_initializer_with_rank(initializer, output_rank, filter_rank)
[ 2, 15069, 357, 66, 8, 5413, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 4091, 38559, 24290, 13, 9132, 2393, 287, 262, 1628, 6808, 198, 2, 329, 1336, 5964, 1321, 13, 198, 2, 38093, 25609, 28, 198, 198, 6738...
2.671693
2,321
functions = { 'AddCDAQSyncConnection': { 'parameters': [ { 'direction': 'in', 'name': 'portList', 'type': 'const char[]' } ], 'returns': 'int32' }, 'AddGlobalChansToTask': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelNames', 'type': 'const char[]' } ], 'returns': 'int32' }, 'AddNetworkDevice': { 'parameters': [ { 'direction': 'in', 'name': 'ipAddress', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'attemptReservation', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'deviceNameOut', 'size': { 'mechanism': 'ivi-dance', 'value': 'deviceNameOutBufferSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'deviceNameOutBufferSize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'AreConfiguredCDAQSyncPortsDisconnected': { 'parameters': [ { 'direction': 'in', 'name': 'chassisDevicesPorts', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'disconnectedPortsExist', 'type': 'bool32' } ], 'returns': 'int32' }, 'AutoConfigureCDAQSyncConnections': { 'parameters': [ { 'direction': 'in', 'name': 'chassisDevicesPorts', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' } ], 'returns': 'int32' }, 'CalculateReversePolyCoeff': { 'parameters': [ { 'direction': 'in', 'name': 'forwardCoeffs', 'size': { 'mechanism': 'len', 'value': 'numForwardCoeffsIn' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numForwardCoeffsIn', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'minValX', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxValX', 'type': 'float64' }, { 'direction': 'in', 'name': 'numPointsToCompute', 'type': 'int32' }, { 'direction': 'in', 'name': 'reversePolyOrder', 'type': 'int32' }, { 'direction': 'out', 'name': 'reverseCoeffs', 'size': { 'mechanism': 'custom-code', 'value': '(reversePolyOrder < 0) ? numForwardCoeffsIn : reversePolyOrder + 1' }, 'type': 'float64[]' } ], 'returns': 'int32' }, 'CfgAnlgEdgeRefTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Slope1', 'name': 'triggerSlope', 'type': 'int32' }, { 'direction': 'in', 'name': 'triggerLevel', 'type': 'float64' }, { 'direction': 'in', 'name': 'pretriggerSamples', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgAnlgEdgeStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Slope1', 'name': 'triggerSlope', 'type': 'int32' }, { 'direction': 'in', 'name': 'triggerLevel', 'type': 'float64' } ], 'returns': 'int32' }, 'CfgAnlgMultiEdgeRefTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSources', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'triggerSlopeArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'triggerLevelArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'pretriggerSamples', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'arraySize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgAnlgMultiEdgeStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSources', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'triggerSlopeArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'triggerLevelArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'arraySize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgAnlgWindowRefTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'WindowTriggerCondition1', 'name': 'triggerWhen', 'type': 'int32' }, { 'direction': 'in', 'name': 'windowTop', 'type': 'float64' }, { 'direction': 'in', 'name': 'windowBottom', 'type': 'float64' }, { 'direction': 'in', 'name': 'pretriggerSamples', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgAnlgWindowStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'WindowTriggerCondition1', 'name': 'triggerWhen', 'type': 'int32' }, { 'direction': 'in', 'name': 'windowTop', 'type': 'float64' }, { 'direction': 'in', 'name': 'windowBottom', 'type': 'float64' } ], 'returns': 'int32' }, 'CfgBurstHandshakingTimingExportClock': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' }, { 'direction': 'in', 'name': 'sampleClkRate', 'type': 'float64' }, { 'direction': 'in', 'name': 'sampleClkOutpTerm', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Polarity2', 'name': 'sampleClkPulsePolarity', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Level1', 'name': 'pauseWhen', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Polarity2', 'name': 'readyEventActiveLevel', 'type': 'int32' } ], 'returns': 'int32' }, 'CfgBurstHandshakingTimingImportClock': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' }, { 'direction': 'in', 'name': 'sampleClkRate', 'type': 'float64' }, { 'direction': 'in', 'name': 'sampleClkSrc', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'sampleClkActiveEdge', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Level1', 'name': 'pauseWhen', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Polarity2', 'name': 'readyEventActiveLevel', 'type': 'int32' } ], 'returns': 'int32' }, 'CfgChangeDetectionTiming': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'risingEdgeChan', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'fallingEdgeChan', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' } ], 'returns': 'int32' }, 'CfgDigEdgeRefTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'triggerEdge', 'type': 'int32' }, { 'direction': 'in', 'name': 'pretriggerSamples', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgDigEdgeStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'triggerEdge', 'type': 'int32' } ], 'returns': 'int32' }, 'CfgDigPatternRefTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'triggerPattern', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'DigitalPatternCondition1', 'name': 'triggerWhen', 'type': 'int32' }, { 'direction': 'in', 'name': 'pretriggerSamples', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgDigPatternStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'triggerSource', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'triggerPattern', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'DigitalPatternCondition1', 'name': 'triggerWhen', 'type': 'int32' } ], 'returns': 'int32' }, 'CfgHandshakingTiming': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' } ], 'returns': 'int32' }, 'CfgImplicitTiming': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' } ], 'returns': 'int32' }, 'CfgInputBuffer': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgOutputBuffer': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgPipelinedSampClkTiming': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'source', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'rate', 'type': 'float64' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'activeEdge', 'type': 'int32' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' } ], 'returns': 'int32' }, 'CfgSampClkTiming': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'source', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'rate', 'type': 'float64' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'activeEdge', 'type': 'int32' }, { 'direction': 'in', 'enum': 'AcquisitionType', 'name': 'sampleMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'sampsPerChan', 'type': 'uInt64' } ], 'returns': 'int32' }, 'CfgTimeStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'when', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'enum': 'Timescale2', 'name': 'timescale', 'type': 'int32' } ], 'returns': 'int32' }, 'CfgWatchdogAOExpirStates': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelNames', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'expirStateArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const float64[]' }, { 'direction': 'in', 'enum': 'WatchdogAOOutputType', 'name': 'outputTypeArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'arraySize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgWatchdogCOExpirStates': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelNames', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'WatchdogCOExpirState', 'name': 'expirStateArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'arraySize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'CfgWatchdogDOExpirStates': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelNames', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'DigitalLineState', 'name': 'expirStateArray', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'arraySize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'ClearTEDS': { 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' } ], 'returns': 'int32' }, 'ClearTask': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'ConfigureLogging': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'filePath', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'LoggingMode', 'name': 'loggingMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'groupName', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'LoggingOperation', 'name': 'operation', 'type': 'int32' } ], 'returns': 'int32' }, 'ConfigureTEDS': { 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'filePath', 'type': 'const char[]' } ], 'returns': 'int32' }, 'ConnectTerms': { 'parameters': [ { 'direction': 'in', 'name': 'sourceTerminal', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'destinationTerminal', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InvertPolarity', 'name': 'signalModifiers', 'type': 'int32' } ], 'returns': 'int32' }, 'ControlWatchdogTask': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'WatchdogControlAction', 'name': 'action', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateAIAccel4WireDCVoltageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelSensitivityUnits1', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'useExcitForScaling', 'type': 'bool32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIAccelChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelSensitivityUnits1', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIAccelChargeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelChargeSensitivityUnits', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIBridgeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgeUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIChargeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ChargeUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAICurrentChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'CurrentUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CurrentShuntResistorLocationWithDefault', 'name': 'shuntResistorLoc', 'type': 'int32' }, { 'direction': 'in', 'name': 'extShuntResistorVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAICurrentRMSChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'CurrentUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CurrentShuntResistorLocationWithDefault', 'name': 'shuntResistorLoc', 'type': 'int32' }, { 'direction': 'in', 'name': 'extShuntResistorVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIForceBridgePolynomialChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'forwardCoeffs', 'size': { 'mechanism': 'len', 'value': 'numForwardCoeffs' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numForwardCoeffs', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'reverseCoeffs', 'size': { 'mechanism': 'len', 'value': 'numReverseCoeffs' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numReverseCoeffs', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIForceBridgeTableChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'electricalVals', 'size': { 'mechanism': 'len', 'value': 'numElectricalVals' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numElectricalVals', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'physicalVals', 'size': { 'mechanism': 'len', 'value': 'numPhysicalVals' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numPhysicalVals', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIForceBridgeTwoPointLinChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'firstElectricalVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'secondElectricalVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'firstPhysicalVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'secondPhysicalVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIForceIEPEChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceIEPEUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceIEPESensorSensitivityUnits', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIFreqVoltageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'FrequencyUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'thresholdLevel', 'type': 'float64' }, { 'direction': 'in', 'name': 'hysteresis', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIMicrophoneChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'SoundPressureUnits1', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'micSensitivity', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxSndPressLevel', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIPosEddyCurrProxProbeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'LengthUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'EddyCurrentProxProbeSensitivityUnits', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIPosLVDTChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'LengthUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'LVDTSensitivityUnits1', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'voltageExcitFreq', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ACExcitWireMode', 'name': 'acExcitWireMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIPosRVDTChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AngleUnits1', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'RVDTSensitivityUnits1', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'voltageExcitFreq', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ACExcitWireMode', 'name': 'acExcitWireMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIPressureBridgePolynomialChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'PressureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'forwardCoeffs', 'size': { 'mechanism': 'len', 'value': 'numForwardCoeffs' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numForwardCoeffs', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'reverseCoeffs', 'size': { 'mechanism': 'len', 'value': 'numReverseCoeffs' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numReverseCoeffs', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIPressureBridgeTableChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'PressureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'electricalVals', 'size': { 'mechanism': 'len', 'value': 'numElectricalVals' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numElectricalVals', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'physicalVals', 'size': { 'mechanism': 'len', 'value': 'numPhysicalVals' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numPhysicalVals', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIPressureBridgeTwoPointLinChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'PressureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'firstElectricalVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'secondElectricalVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'firstPhysicalVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'secondPhysicalVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIRTDChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'RTDType1', 'name': 'rtdType', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'r0', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateAIResistanceChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ResistanceUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIRosetteStrainGageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'StrainGageRosetteType', 'name': 'rosetteType', 'type': 'int32' }, { 'direction': 'in', 'name': 'gageOrientation', 'type': 'float64' }, { 'direction': 'in', 'name': 'rosetteMeasTypes', 'size': { 'mechanism': 'len', 'value': 'numRosetteMeasTypes' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'numRosetteMeasTypes', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'StrainGageBridgeType1', 'name': 'strainConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'gageFactor', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalGageResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'poissonRatio', 'type': 'float64' }, { 'direction': 'in', 'name': 'leadWireResistance', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateAIStrainGageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'StrainUnits1', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'StrainGageBridgeType1', 'name': 'strainConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'gageFactor', 'type': 'float64' }, { 'direction': 'in', 'name': 'initialBridgeVoltage', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalGageResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'poissonRatio', 'type': 'float64' }, { 'direction': 'in', 'name': 'leadWireResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAITempBuiltInSensorChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateAIThrmcplChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ThermocoupleType1', 'name': 'thermocoupleType', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CJCSource1', 'name': 'cjcSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'cjcVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'cjcChannel', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIThrmstrChanIex': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'a', 'type': 'float64' }, { 'direction': 'in', 'name': 'b', 'type': 'float64' }, { 'direction': 'in', 'name': 'c', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateAIThrmstrChanVex': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'a', 'type': 'float64' }, { 'direction': 'in', 'name': 'b', 'type': 'float64' }, { 'direction': 'in', 'name': 'c', 'type': 'float64' }, { 'direction': 'in', 'name': 'r1', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateAITorqueBridgePolynomialChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TorqueUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'forwardCoeffs', 'size': { 'mechanism': 'len', 'value': 'numForwardCoeffs' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numForwardCoeffs', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'reverseCoeffs', 'size': { 'mechanism': 'len', 'value': 'numReverseCoeffs' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numReverseCoeffs', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAITorqueBridgeTableChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TorqueUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'electricalVals', 'size': { 'mechanism': 'len', 'value': 'numElectricalVals' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numElectricalVals', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'physicalVals', 'size': { 'mechanism': 'len', 'value': 'numPhysicalVals' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numPhysicalVals', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAITorqueBridgeTwoPointLinChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TorqueUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'nominalBridgeResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'firstElectricalVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'secondElectricalVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgeElectricalUnits', 'name': 'electricalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'firstPhysicalVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'secondPhysicalVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'BridgePhysicalUnits', 'name': 'physicalUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIVelocityIEPEChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'VelocityUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'sensitivity', 'type': 'float64' }, { 'direction': 'in', 'enum': 'VelocityIEPESensorSensitivityUnits', 'name': 'sensitivityUnits', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIVoltageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'VoltageUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIVoltageChanWithExcit': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'VoltageUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'BridgeConfiguration1', 'name': 'bridgeConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'useExcitForScaling', 'type': 'bool32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAIVoltageRMSChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'VoltageUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAOCurrentChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'CurrentUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateAOFuncGenChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'FuncGenType', 'name': 'type', 'type': 'int32' }, { 'direction': 'in', 'name': 'freq', 'type': 'float64' }, { 'direction': 'in', 'name': 'amplitude', 'type': 'float64' }, { 'direction': 'in', 'name': 'offset', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateAOVoltageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'VoltageUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCIAngEncoderChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'EncoderType2', 'name': 'decodingType', 'type': 'int32' }, { 'direction': 'in', 'name': 'zidxEnable', 'type': 'bool32' }, { 'direction': 'in', 'name': 'zidxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'EncoderZIndexPhase1', 'name': 'zidxPhase', 'type': 'int32' }, { 'direction': 'in', 'enum': 'AngleUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'pulsesPerRev', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'initialAngle', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCIAngVelocityChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'EncoderType2', 'name': 'decodingType', 'type': 'int32' }, { 'direction': 'in', 'enum': 'AngularVelocityUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'pulsesPerRev', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCICountEdgesChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'edge', 'type': 'int32' }, { 'direction': 'in', 'name': 'initialCount', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'CountDirection1', 'name': 'countDirection', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateCIDutyCycleChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minFreq', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxFreq', 'type': 'float64' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'edge', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCIFreqChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'FrequencyUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'edge', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CounterFrequencyMethod', 'name': 'measMethod', 'type': 'int32' }, { 'direction': 'in', 'name': 'measTime', 'type': 'float64' }, { 'direction': 'in', 'name': 'divisor', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCIGPSTimestampChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'TimeUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'GpsSignalType1', 'name': 'syncMethod', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCILinEncoderChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'EncoderType2', 'name': 'decodingType', 'type': 'int32' }, { 'direction': 'in', 'name': 'zidxEnable', 'type': 'bool32' }, { 'direction': 'in', 'name': 'zidxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'EncoderZIndexPhase1', 'name': 'zidxPhase', 'type': 'int32' }, { 'direction': 'in', 'enum': 'LengthUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'distPerPulse', 'type': 'float64' }, { 'direction': 'in', 'name': 'initialPos', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCILinVelocityChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'EncoderType2', 'name': 'decodingType', 'type': 'int32' }, { 'direction': 'in', 'enum': 'VelocityUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'distPerPulse', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCIPeriodChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TimeUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'edge', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CounterFrequencyMethod', 'name': 'measMethod', 'type': 'int32' }, { 'direction': 'in', 'name': 'measTime', 'type': 'float64' }, { 'direction': 'in', 'name': 'divisor', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCIPulseChanFreq': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'FrequencyUnits2', 'name': 'units', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateCIPulseChanTicks': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'sourceTerminal', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateCIPulseChanTime': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'DigitalWidthUnits3', 'name': 'units', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateCIPulseWidthChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TimeUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'startingEdge', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCISemiPeriodChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TimeUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCITwoEdgeSepChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TimeUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'firstEdge', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Edge1', 'name': 'secondEdge', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateCOPulseChanFreq': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'FrequencyUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Level1', 'name': 'idleState', 'type': 'int32' }, { 'direction': 'in', 'name': 'initialDelay', 'type': 'float64' }, { 'direction': 'in', 'name': 'freq', 'type': 'float64' }, { 'direction': 'in', 'name': 'dutyCycle', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateCOPulseChanTicks': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'sourceTerminal', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'Level1', 'name': 'idleState', 'type': 'int32' }, { 'direction': 'in', 'name': 'initialDelay', 'type': 'int32' }, { 'direction': 'in', 'name': 'lowTicks', 'type': 'int32' }, { 'direction': 'in', 'name': 'highTicks', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateCOPulseChanTime': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'counter', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'DigitalWidthUnits3', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'Level1', 'name': 'idleState', 'type': 'int32' }, { 'direction': 'in', 'name': 'initialDelay', 'type': 'float64' }, { 'direction': 'in', 'name': 'lowTime', 'type': 'float64' }, { 'direction': 'in', 'name': 'highTime', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateDIChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToLines', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'LineGrouping', 'name': 'lineGrouping', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateDOChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToLines', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'LineGrouping', 'name': 'lineGrouping', 'type': 'int32' } ], 'returns': 'int32' }, 'CreateLinScale': { 'parameters': [ { 'direction': 'in', 'name': 'name', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'slope', 'type': 'float64' }, { 'direction': 'in', 'name': 'yIntercept', 'type': 'float64' }, { 'direction': 'in', 'enum': 'UnitsPreScaled', 'name': 'preScaledUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'scaledUnits', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateMapScale': { 'parameters': [ { 'direction': 'in', 'name': 'name', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'prescaledMin', 'type': 'float64' }, { 'direction': 'in', 'name': 'prescaledMax', 'type': 'float64' }, { 'direction': 'in', 'name': 'scaledMin', 'type': 'float64' }, { 'direction': 'in', 'name': 'scaledMax', 'type': 'float64' }, { 'direction': 'in', 'enum': 'UnitsPreScaled', 'name': 'preScaledUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'scaledUnits', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreatePolynomialScale': { 'parameters': [ { 'direction': 'in', 'name': 'name', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'forwardCoeffs', 'size': { 'mechanism': 'len', 'value': 'numForwardCoeffsIn' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numForwardCoeffsIn', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'reverseCoeffs', 'size': { 'mechanism': 'len', 'value': 'numReverseCoeffsIn' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numReverseCoeffsIn', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'UnitsPreScaled', 'name': 'preScaledUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'scaledUnits', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIAccelChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AccelUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIBridgeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TEDSUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAICurrentChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TEDSUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CurrentShuntResistorLocationWithDefault', 'name': 'shuntResistorLoc', 'type': 'int32' }, { 'direction': 'in', 'name': 'extShuntResistorVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIForceBridgeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIForceIEPEChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ForceIEPEUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIMicrophoneChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'SoundPressureUnits1', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'maxSndPressLevel', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIPosLVDTChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'LengthUnits2', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'voltageExcitFreq', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ACExcitWireMode', 'name': 'acExcitWireMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIPosRVDTChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'AngleUnits1', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'voltageExcitFreq', 'type': 'float64' }, { 'direction': 'in', 'enum': 'ACExcitWireMode', 'name': 'acExcitWireMode', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIPressureBridgeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'PressureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIRTDChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateTEDSAIResistanceChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TEDSUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIStrainGageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'StrainUnits1', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'initialBridgeVoltage', 'type': 'float64' }, { 'direction': 'in', 'name': 'leadWireResistance', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIThrmcplChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'CJCSource1', 'name': 'cjcSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'cjcVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'cjcChannel', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIThrmstrChanIex': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'currentExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'currentExcitVal', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateTEDSAIThrmstrChanVex': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TemperatureUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ResistanceConfiguration', 'name': 'resistanceConfig', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'r1', 'type': 'float64' } ], 'returns': 'int32' }, 'CreateTEDSAITorqueBridgeChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TorqueUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIVoltageChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TEDSUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTEDSAIVoltageChanWithExcit': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'nameToAssignToChannel', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'InputTermCfgWithDefault', 'name': 'terminalConfig', 'type': 'int32' }, { 'direction': 'in', 'name': 'minVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'maxVal', 'type': 'float64' }, { 'direction': 'in', 'enum': 'TEDSUnits', 'name': 'units', 'type': 'int32' }, { 'direction': 'in', 'enum': 'ExcitationSource', 'name': 'voltageExcitSource', 'type': 'int32' }, { 'direction': 'in', 'name': 'voltageExcitVal', 'type': 'float64' }, { 'direction': 'in', 'name': 'customScaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTableScale': { 'parameters': [ { 'direction': 'in', 'name': 'name', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'prescaledVals', 'size': { 'mechanism': 'len', 'value': 'numPrescaledValsIn' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numPrescaledValsIn', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'scaledVals', 'size': { 'mechanism': 'len', 'value': 'numScaledValsIn' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'numScaledValsIn', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'UnitsPreScaled', 'name': 'preScaledUnits', 'type': 'int32' }, { 'direction': 'in', 'name': 'scaledUnits', 'type': 'const char[]' } ], 'returns': 'int32' }, 'CreateTask': { 'init_method': True, 'parameters': [ { 'direction': 'in', 'is_session_name': True, 'name': 'sessionName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'CreateWatchdogTimerTask': { 'init_method': True, 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'is_session_name': True, 'name': 'sessionName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'lines', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'DigitalLineState', 'include_in_proto': False, 'name': 'expState', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated WatchdogExpChannelsAndState', 'is_compound_type': True, 'max_length': 96, 'name': 'expStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'CreateWatchdogTimerTaskEx': { 'init_method': True, 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'is_session_name': True, 'name': 'sessionName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' } ], 'returns': 'int32' }, 'DeleteNetworkDevice': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'DeleteSavedGlobalChan': { 'parameters': [ { 'direction': 'in', 'name': 'channelName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'DeleteSavedScale': { 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'DeleteSavedTask': { 'parameters': [ { 'direction': 'in', 'name': 'taskName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'DeviceSupportsCal': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'calSupported', 'type': 'bool32' } ], 'returns': 'int32' }, 'DisableRefTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'DisableStartTrig': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'DisconnectTerms': { 'parameters': [ { 'direction': 'in', 'name': 'sourceTerminal', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'destinationTerminal', 'type': 'const char[]' } ], 'returns': 'int32' }, 'ExportSignal': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'Signal', 'name': 'signalID', 'type': 'int32' }, { 'direction': 'in', 'name': 'outputTerminal', 'type': 'const char[]' } ], 'returns': 'int32' }, 'GetAIChanCalCalDate': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'year', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'month', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'day', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'hour', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'minute', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetAIChanCalExpDate': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'year', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'month', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'day', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'hour', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'minute', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetAnalogPowerUpStates': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'channelName', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'out', 'include_in_proto': False, 'name': 'state', 'repeating_argument': True, 'type': 'float64' }, { 'direction': 'in', 'enum': 'PowerUpChannelType', 'include_in_proto': False, 'name': 'channelType', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated AnalogPowerUpChannelAndType', 'is_compound_type': True, 'max_length': 96, 'name': 'channels', 'repeated_var_args': True }, { 'direction': 'out', 'grpc_type': 'repeated double', 'max_length': 96, 'name': 'powerUpStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'GetArmStartTrigTimestampVal': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetArmStartTrigTrigWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetAutoConfiguredCDAQSyncConnections': { 'parameters': [ { 'direction': 'out', 'name': 'portList', 'size': { 'mechanism': 'ivi-dance', 'value': 'portListSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'portListSize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetBufferAttributeUInt32': { 'cname': 'DAQmxGetBufferAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'BufferAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetCalInfoAttributeBool': { 'cname': 'DAQmxGetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetCalInfoAttributeDouble': { 'cname': 'DAQmxGetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetCalInfoAttributeString': { 'cname': 'DAQmxGetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetCalInfoAttributeUInt32': { 'cname': 'DAQmxGetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetChanAttributeBool': { 'cname': 'DAQmxGetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetChanAttributeDouble': { 'cname': 'DAQmxGetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetChanAttributeDoubleArray': { 'cname': 'DAQmxGetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetChanAttributeInt32': { 'cname': 'DAQmxGetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetChanAttributeString': { 'cname': 'DAQmxGetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetChanAttributeUInt32': { 'cname': 'DAQmxGetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeBool': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeDouble': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeDoubleArray': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeInt32': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeInt32Array': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'int32[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeString': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeUInt32': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDeviceAttributeUInt32Array': { 'cname': 'DAQmxGetDeviceAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'DeviceAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetDigitalLogicFamilyPowerUpState': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'logicFamily', 'type': 'int32' } ], 'returns': 'int32' }, 'GetDigitalPowerUpStates': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'channelName', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'out', 'enum': 'PowerUpStates', 'include_in_proto': False, 'name': 'state', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated string', 'max_length': 96, 'name': 'channelName', 'repeated_var_args': True }, { 'direction': 'out', 'grpc_type': 'repeated PowerUpStates', 'max_length': 96, 'name': 'powerUpStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'GetDigitalPullUpPullDownStates': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'channelName', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'out', 'enum': 'ResistorState', 'include_in_proto': False, 'name': 'state', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated string', 'max_length': 96, 'name': 'channelName', 'repeated_var_args': True }, { 'direction': 'out', 'grpc_type': 'repeated ResistorState', 'max_length': 96, 'name': 'pullUpPullDownStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'GetDisconnectedCDAQSyncPorts': { 'parameters': [ { 'direction': 'out', 'name': 'portList', 'size': { 'mechanism': 'ivi-dance', 'value': 'portListSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'portListSize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetErrorString': { 'parameters': [ { 'direction': 'in', 'name': 'errorCode', 'type': 'int32' }, { 'direction': 'out', 'name': 'errorString', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'bufferSize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetExportedSignalAttributeBool': { 'cname': 'DAQmxGetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetExportedSignalAttributeDouble': { 'cname': 'DAQmxGetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetExportedSignalAttributeInt32': { 'cname': 'DAQmxGetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetExportedSignalAttributeString': { 'cname': 'DAQmxGetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetExportedSignalAttributeUInt32': { 'cname': 'DAQmxGetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetExtendedErrorInfo': { 'parameters': [ { 'direction': 'out', 'name': 'errorString', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'bufferSize', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetFirstSampClkWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetFirstSampTimestampVal': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetNthTaskChannel': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'index', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'buffer', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'bufferSize', 'type': 'int32' } ], 'returns': 'int32' }, 'GetNthTaskDevice': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'index', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'buffer', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'bufferSize', 'type': 'int32' } ], 'returns': 'int32' }, 'GetNthTaskReadChannel': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'index', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'buffer', 'size': { 'mechanism': 'ivi-dance', 'value': 'bufferSize' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'bufferSize', 'type': 'int32' } ], 'returns': 'int32' }, 'GetPersistedChanAttributeBool': { 'cname': 'DAQmxGetPersistedChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PersistedChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPersistedChanAttributeString': { 'cname': 'DAQmxGetPersistedChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PersistedChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPersistedScaleAttributeBool': { 'cname': 'DAQmxGetPersistedScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PersistedScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPersistedScaleAttributeString': { 'cname': 'DAQmxGetPersistedScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PersistedScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPersistedTaskAttributeBool': { 'cname': 'DAQmxGetPersistedTaskAttribute', 'parameters': [ { 'direction': 'in', 'name': 'taskName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PersistedTaskAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPersistedTaskAttributeString': { 'cname': 'DAQmxGetPersistedTaskAttribute', 'parameters': [ { 'direction': 'in', 'name': 'taskName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PersistedTaskAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeBool': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeBytes': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'uInt8[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeDouble': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeDoubleArray': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeInt32': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeInt32Array': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'int32[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeString': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeUInt32': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetPhysicalChanAttributeUInt32Array': { 'cname': 'DAQmxGetPhysicalChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'PhysicalChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetReadAttributeBool': { 'cname': 'DAQmxGetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetReadAttributeDouble': { 'cname': 'DAQmxGetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetReadAttributeInt32': { 'cname': 'DAQmxGetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetReadAttributeString': { 'cname': 'DAQmxGetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetReadAttributeUInt32': { 'cname': 'DAQmxGetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetReadAttributeUInt64': { 'cname': 'DAQmxGetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetRealTimeAttributeBool': { 'cname': 'DAQmxGetRealTimeAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetRealTimeAttributeInt32': { 'cname': 'DAQmxGetRealTimeAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetRealTimeAttributeUInt32': { 'cname': 'DAQmxGetRealTimeAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetRefTrigTimestampVal': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetScaleAttributeDouble': { 'cname': 'DAQmxGetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetScaleAttributeDoubleArray': { 'cname': 'DAQmxGetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetScaleAttributeInt32': { 'cname': 'DAQmxGetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetScaleAttributeString': { 'cname': 'DAQmxGetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetSelfCalLastDateAndTime': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'year', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'month', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'day', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'hour', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'minute', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetStartTrigTimestampVal': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetStartTrigTrigWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetSyncPulseTimeWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'GetSystemInfoAttributeString': { 'cname': 'DAQmxGetSystemInfoAttribute', 'parameters': [ { 'direction': 'in', 'grpc_type': 'SystemAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetSystemInfoAttributeUInt32': { 'cname': 'DAQmxGetSystemInfoAttribute', 'parameters': [ { 'direction': 'in', 'grpc_type': 'SystemAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTaskAttributeBool': { 'cname': 'DAQmxGetTaskAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TaskAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTaskAttributeString': { 'cname': 'DAQmxGetTaskAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TaskAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTaskAttributeUInt32': { 'cname': 'DAQmxGetTaskAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TaskAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeBool': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeDouble': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExBool': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExDouble': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExInt32': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExString': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExTimestamp': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExUInt32': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeExUInt64': { 'cname': 'DAQmxGetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeInt32': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeString': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeTimestamp': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeUInt32': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTimingAttributeUInt64': { 'cname': 'DAQmxGetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeBool': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeDouble': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeDoubleArray': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeInt32': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeInt32Array': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'int32[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeString': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeTimestamp': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetTrigAttributeUInt32': { 'cname': 'DAQmxGetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWatchdogAttributeBool': { 'cname': 'DAQmxGetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWatchdogAttributeDouble': { 'cname': 'DAQmxGetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWatchdogAttributeInt32': { 'cname': 'DAQmxGetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWatchdogAttributeString': { 'cname': 'DAQmxGetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWriteAttributeBool': { 'cname': 'DAQmxGetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWriteAttributeDouble': { 'cname': 'DAQmxGetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWriteAttributeInt32': { 'cname': 'DAQmxGetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWriteAttributeString': { 'cname': 'DAQmxGetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'size': { 'mechanism': 'ivi-dance', 'value': 'size' }, 'type': 'char[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWriteAttributeUInt32': { 'cname': 'DAQmxGetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'GetWriteAttributeUInt64': { 'cname': 'DAQmxGetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'IsTaskDone': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'isTaskDone', 'type': 'bool32' } ], 'returns': 'int32' }, 'LoadTask': { 'init_method': True, 'parameters': [ { 'direction': 'in', 'is_session_name': True, 'name': 'sessionName', 'type': 'const char[]' }, { 'direction': 'out', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'ReadAnalogF64': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadAnalogScalarF64': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadBinaryI16': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'coerced': True, 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'int16[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadBinaryI32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'int32[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadBinaryU16': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'coerced': True, 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt16[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadBinaryU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCounterF64': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCounterF64Ex': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCounterScalarF64': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCounterScalarU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCounterU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCounterU32Ex': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCtrFreq': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'interleaved', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArrayFrequency', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'out', 'name': 'readArrayDutyCycle', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCtrFreqScalar': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'frequency', 'type': 'float64' }, { 'direction': 'out', 'name': 'dutyCycle', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCtrTicks': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'interleaved', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArrayHighTicks', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt32[]' }, { 'direction': 'out', 'name': 'readArrayLowTicks', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCtrTicksScalar': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'highTicks', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'lowTicks', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCtrTime': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'interleaved', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArrayHighTime', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'out', 'name': 'readArrayLowTime', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'float64[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadCtrTimeScalar': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'highTime', 'type': 'float64' }, { 'direction': 'out', 'name': 'lowTime', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadDigitalLines': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInBytes' }, 'type': 'uInt8[]' }, { 'direction': 'in', 'name': 'arraySizeInBytes', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'out', 'name': 'numBytesPerSamp', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadDigitalScalarU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadDigitalU16': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'coerced': True, 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt16[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadDigitalU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt32[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadDigitalU8': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'fillMode', 'type': 'int32' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInSamps' }, 'type': 'uInt8[]' }, { 'direction': 'in', 'name': 'arraySizeInSamps', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsPerChanRead', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'ReadRaw': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'readArray', 'size': { 'mechanism': 'passed-in', 'value': 'arraySizeInBytes' }, 'type': 'uInt8[]' }, { 'direction': 'in', 'name': 'arraySizeInBytes', 'type': 'uInt32' }, { 'direction': 'out', 'name': 'sampsRead', 'type': 'int32' }, { 'direction': 'out', 'name': 'numBytesPerSamp', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'RegisterDoneEvent': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'options', 'type': 'uInt32' }, { 'callback_params': [ { 'direction': 'out', 'include_in_proto': False, 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'status', 'type': 'int32' } ], 'direction': 'in', 'include_in_proto': False, 'name': 'callbackFunction', 'type': 'DAQmxDoneEventCallbackPtr' }, { 'callback_token': True, 'direction': 'in', 'include_in_proto': False, 'name': 'callbackData', 'pointer': True, 'type': 'void' } ], 'returns': 'int32', 'stream_response': True }, 'RegisterEveryNSamplesEvent': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'EveryNSamplesEventType', 'name': 'everyNSamplesEventType', 'type': 'int32' }, { 'direction': 'in', 'name': 'nSamples', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'options', 'type': 'uInt32' }, { 'callback_params': [ { 'direction': 'out', 'include_in_proto': False, 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'enum': 'EveryNSamplesEventType', 'name': 'everyNSamplesEventType', 'type': 'int32' }, { 'direction': 'out', 'name': 'nSamples', 'type': 'uInt32' } ], 'direction': 'in', 'include_in_proto': False, 'name': 'callbackFunction', 'type': 'DAQmxEveryNSamplesEventCallbackPtr' }, { 'callback_token': True, 'direction': 'in', 'include_in_proto': False, 'name': 'callbackData', 'pointer': True, 'type': 'void' } ], 'returns': 'int32', 'stream_response': True }, 'RegisterSignalEvent': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'Signal2', 'name': 'signalID', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'options', 'type': 'uInt32' }, { 'callback_params': [ { 'direction': 'out', 'include_in_proto': False, 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'out', 'name': 'signalID', 'type': 'int32' } ], 'direction': 'in', 'include_in_proto': False, 'name': 'callbackFunction', 'type': 'DAQmxSignalEventCallbackPtr' }, { 'callback_token': True, 'direction': 'in', 'include_in_proto': False, 'name': 'callbackData', 'pointer': True, 'type': 'void' } ], 'returns': 'int32', 'stream_response': True }, 'RemoveCDAQSyncConnection': { 'parameters': [ { 'direction': 'in', 'name': 'portList', 'type': 'const char[]' } ], 'returns': 'int32' }, 'ReserveNetworkDevice': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'overrideReservation', 'type': 'bool32' } ], 'returns': 'int32' }, 'ResetBufferAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'BufferAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetChanAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetDevice': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'ResetExportedSignalAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetReadAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetRealTimeAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetTimingAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetTimingAttributeEx': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetTrigAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetWatchdogAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'ResetWriteAttribute': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' } ], 'returns': 'int32' }, 'SaveGlobalChan': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelName', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'saveAs', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'author', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'SaveOptions', 'name': 'options', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SaveScale': { 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'saveAs', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'author', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'SaveOptions', 'name': 'options', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SaveTask': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'saveAs', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'author', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'SaveOptions', 'name': 'options', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SelfCal': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'SelfTestDevice': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'SetAIChanCalCalDate': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelName', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'year', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'month', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'day', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'hour', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'minute', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetAIChanCalExpDate': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channelName', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'year', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'month', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'day', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'hour', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'minute', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetAnalogPowerUpStates': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'channelNames', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'state', 'repeating_argument': True, 'type': 'float64' }, { 'direction': 'in', 'enum': 'PowerUpChannelType', 'include_in_proto': False, 'name': 'channelType', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated AnalogPowerUpChannelsAndState', 'is_compound_type': True, 'max_length': 96, 'name': 'powerUpStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'SetArmStartTrigTrigWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'SetBufferAttributeUInt32': { 'cname': 'DAQmxSetBufferAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'BufferAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetCalInfoAttributeBool': { 'cname': 'DAQmxSetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetCalInfoAttributeDouble': { 'cname': 'DAQmxSetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetCalInfoAttributeString': { 'cname': 'DAQmxSetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetCalInfoAttributeUInt32': { 'cname': 'DAQmxSetCalInfoAttribute', 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'CalibrationInfoAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetChanAttributeBool': { 'cname': 'DAQmxSetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetChanAttributeDouble': { 'cname': 'DAQmxSetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetChanAttributeDoubleArray': { 'cname': 'DAQmxSetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetChanAttributeInt32': { 'cname': 'DAQmxSetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetChanAttributeString': { 'cname': 'DAQmxSetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetChanAttributeUInt32': { 'cname': 'DAQmxSetChanAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'channel', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ChannelAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetDigitalLogicFamilyPowerUpState': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'LogicFamily', 'name': 'logicFamily', 'type': 'int32' } ], 'returns': 'int32' }, 'SetDigitalPowerUpStates': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'channelNames', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'PowerUpStates', 'include_in_proto': False, 'name': 'state', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated DigitalPowerUpChannelsAndState', 'is_compound_type': True, 'max_length': 96, 'name': 'powerUpStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'SetDigitalPullUpPullDownStates': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' }, { 'direction': 'in', 'include_in_proto': False, 'name': 'channelNames', 'repeating_argument': True, 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'ResistorState', 'include_in_proto': False, 'name': 'state', 'repeating_argument': True, 'type': 'int32' }, { 'direction': 'in', 'grpc_type': 'repeated DigitalPullUpPullDownChannelsAndState', 'is_compound_type': True, 'max_length': 96, 'name': 'pullUpPullDownStates', 'repeated_var_args': True } ], 'returns': 'int32' }, 'SetExportedSignalAttributeBool': { 'cname': 'DAQmxSetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetExportedSignalAttributeDouble': { 'cname': 'DAQmxSetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetExportedSignalAttributeInt32': { 'cname': 'DAQmxSetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetExportedSignalAttributeString': { 'cname': 'DAQmxSetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetExportedSignalAttributeUInt32': { 'cname': 'DAQmxSetExportedSignalAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ExportSignalAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetFirstSampClkWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'SetReadAttributeBool': { 'cname': 'DAQmxSetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetReadAttributeDouble': { 'cname': 'DAQmxSetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetReadAttributeInt32': { 'cname': 'DAQmxSetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetReadAttributeString': { 'cname': 'DAQmxSetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetReadAttributeUInt32': { 'cname': 'DAQmxSetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetReadAttributeUInt64': { 'cname': 'DAQmxSetReadAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'ReadAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetRealTimeAttributeBool': { 'cname': 'DAQmxSetRealTimeAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetRealTimeAttributeInt32': { 'cname': 'DAQmxSetRealTimeAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetRealTimeAttributeUInt32': { 'cname': 'DAQmxSetRealTimeAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'RealTimeAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetScaleAttributeDouble': { 'cname': 'DAQmxSetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetScaleAttributeDoubleArray': { 'cname': 'DAQmxSetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetScaleAttributeInt32': { 'cname': 'DAQmxSetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetScaleAttributeString': { 'cname': 'DAQmxSetScaleAttribute', 'parameters': [ { 'direction': 'in', 'name': 'scaleName', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'ScaleAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetStartTrigTrigWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'SetSyncPulseTimeWhen': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'data', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'SetTimingAttributeBool': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeDouble': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExBool': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExDouble': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExInt32': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExString': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExTimestamp': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExUInt32': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeExUInt64': { 'cname': 'DAQmxSetTimingAttributeEx', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'deviceNames', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeInt32': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeString': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeTimestamp': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeUInt32': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTimingAttributeUInt64': { 'cname': 'DAQmxSetTimingAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TimingAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeBool': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeDouble': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeDoubleArray': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeInt32': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeInt32Array': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'size': { 'mechanism': 'len', 'value': 'size' }, 'type': 'const int32[]' }, { 'direction': 'in', 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeString': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeTimestamp': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'CVIAbsoluteTime' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetTrigAttributeUInt32': { 'cname': 'DAQmxSetTrigAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'TriggerAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWatchdogAttributeBool': { 'cname': 'DAQmxSetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWatchdogAttributeDouble': { 'cname': 'DAQmxSetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWatchdogAttributeInt32': { 'cname': 'DAQmxSetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWatchdogAttributeString': { 'cname': 'DAQmxSetWatchdogAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'lines', 'type': 'const char[]' }, { 'direction': 'in', 'grpc_type': 'WatchdogAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWriteAttributeBool': { 'cname': 'DAQmxSetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'bool32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWriteAttributeDouble': { 'cname': 'DAQmxSetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWriteAttributeInt32': { 'cname': 'DAQmxSetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWriteAttributeString': { 'cname': 'DAQmxSetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'const char[]' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWriteAttributeUInt32': { 'cname': 'DAQmxSetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'SetWriteAttributeUInt64': { 'cname': 'DAQmxSetWriteAttribute', 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'grpc_type': 'WriteAttributes', 'name': 'attribute', 'type': 'int32' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt64' }, { 'direction': 'in', 'hardcoded_value': '0U', 'include_in_proto': False, 'name': 'size', 'type': 'uInt32' } ], 'returns': 'int32' }, 'StartNewFile': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'filePath', 'type': 'const char[]' } ], 'returns': 'int32' }, 'StartTask': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'StopTask': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' } ], 'returns': 'int32' }, 'TaskControl': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'TaskControlAction', 'name': 'action', 'type': 'int32' } ], 'returns': 'int32' }, 'TristateOutputTerm': { 'parameters': [ { 'direction': 'in', 'name': 'outputTerminal', 'type': 'const char[]' } ], 'returns': 'int32' }, 'UnreserveNetworkDevice': { 'parameters': [ { 'direction': 'in', 'name': 'deviceName', 'type': 'const char[]' } ], 'returns': 'int32' }, 'WaitForNextSampleClock': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'isLate', 'type': 'bool32' } ], 'returns': 'int32' }, 'WaitForValidTimestamp': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'enum': 'TimestampEvent', 'name': 'timestampEvent', 'type': 'int32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'out', 'name': 'timestamp', 'type': 'CVIAbsoluteTime' } ], 'returns': 'int32' }, 'WaitUntilTaskDone': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'timeToWait', 'type': 'float64' } ], 'returns': 'int32' }, 'WriteAnalogF64': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const float64[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteAnalogScalarF64': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'name': 'value', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteBinaryI16': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'coerced': True, 'direction': 'in', 'name': 'writeArray', 'type': 'const int16[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteBinaryI32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const int32[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteBinaryU16': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'coerced': True, 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt16[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteBinaryU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt32[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteCtrFreq': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'frequency', 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'dutyCycle', 'type': 'const float64[]' }, { 'direction': 'out', 'name': 'numSampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteCtrFreqScalar': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'name': 'frequency', 'type': 'float64' }, { 'direction': 'in', 'name': 'dutyCycle', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteCtrTicks': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'highTicks', 'type': 'const uInt32[]' }, { 'direction': 'in', 'name': 'lowTicks', 'type': 'const uInt32[]' }, { 'direction': 'out', 'name': 'numSampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteCtrTicksScalar': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'name': 'highTicks', 'type': 'uInt32' }, { 'direction': 'in', 'name': 'lowTicks', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteCtrTime': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'highTime', 'type': 'const float64[]' }, { 'direction': 'in', 'name': 'lowTime', 'type': 'const float64[]' }, { 'direction': 'out', 'name': 'numSampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteCtrTimeScalar': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'name': 'highTime', 'type': 'float64' }, { 'direction': 'in', 'name': 'lowTime', 'type': 'float64' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteDigitalLines': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt8[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteDigitalScalarU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'name': 'value', 'type': 'uInt32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteDigitalU16': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'coerced': True, 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt16[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteDigitalU32': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt32[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteDigitalU8': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSampsPerChan', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'enum': 'GroupBy', 'name': 'dataLayout', 'type': 'int32' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt8[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteRaw': { 'parameters': [ { 'direction': 'in', 'name': 'task', 'type': 'TaskHandle' }, { 'direction': 'in', 'name': 'numSamps', 'type': 'int32' }, { 'direction': 'in', 'name': 'autoStart', 'type': 'bool32' }, { 'direction': 'in', 'name': 'timeout', 'type': 'float64' }, { 'direction': 'in', 'name': 'writeArray', 'type': 'const uInt8[]' }, { 'direction': 'out', 'name': 'sampsPerChanWritten', 'type': 'int32' }, { 'direction': 'in', 'hardcoded_value': 'nullptr', 'include_in_proto': False, 'name': 'reserved', 'pointer': True, 'type': 'bool32' } ], 'returns': 'int32' }, 'WriteToTEDSFromArray': { 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'bitStream', 'size': { 'mechanism': 'len', 'value': 'arraySize' }, 'type': 'const uInt8[]' }, { 'direction': 'in', 'name': 'arraySize', 'type': 'uInt32' }, { 'direction': 'in', 'enum': 'WriteBasicTEDSOptions', 'name': 'basicTEDSOptions', 'type': 'int32' } ], 'returns': 'int32' }, 'WriteToTEDSFromFile': { 'parameters': [ { 'direction': 'in', 'name': 'physicalChannel', 'type': 'const char[]' }, { 'direction': 'in', 'name': 'filePath', 'type': 'const char[]' }, { 'direction': 'in', 'enum': 'WriteBasicTEDSOptions', 'name': 'basicTEDSOptions', 'type': 'int32' } ], 'returns': 'int32' } }
[ 12543, 2733, 796, 1391, 198, 220, 220, 220, 705, 4550, 34, 46640, 28985, 32048, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 17143, 7307, 10354, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 198...
1.501789
255,145
#!/usr/bin/env python3 # -*- coding: utf-8 -*- x = abs(100) y = abs(-20) print(x, y) print() # 以下函数可以接收任意多个参数 print('max(1, 2, 3) =', max(1, 2, 3)) print('min(1, 2, 3) =', min(1, 2, 3)) print('sum([1, 2, 3]) =', sum([1, 2, 3])) print() # 数据类型转换 print(int('123')) print(int(12.34)) print(float('12.34')) print(str(1.23)) print(str(100)) print(bool(1)) print(bool(0)) print(bool('he')) print(bool('')) print(bool(None)) # 函数名其实就是指向一个函数对象的引用,完全可以把函数名赋给一个变量,相当于给这个函数起了一个“别名” a = abs # 变量a指向abs函数 print(a(-1)) # 所以也可以通过a调用abs函数
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 87, 796, 2352, 7, 3064, 8, 198, 88, 796, 2352, 32590, 1238, 8, 198, 4798, 7, 87, 11, 331, 8, 198, 198, ...
1.273381
417
### Comparison between drivers ## import time import board import busio ### Adafruit MPU6050 (similar chip) import adafruit_mpu6050 ### RM Forked Driver from robohat_mpu9250.mpu9250 import MPU9250 as RM9250 from robohat_mpu9250.mpu6500 import MPU6500 as RM6500 from robohat_mpu9250.ak8963 import AK8963 as RM8963 ### RM CircuitPython Driver import roboticsmasters_mpu6500 import roboticsmasters_mpu9250 ### i2c i2c = busio.I2C(board.SCL, board.SDA) ### adafruit driver mpu = adafruit_mpu6050.MPU6050(i2c, address=0x69) ## ### RM Forked #rm_mpu = RM6500(i2c, address=0x69) #rm_ak = RM8963(i2c) #sensor = RM9250(rm_mpu, rm_ak) ### New Driver #nmpu = roboticsmasters_mpu6500.MPU6500(i2c, address=0x69) npmu = roboticsmasters_mpu9250.MPU9250(i2c) time.sleep(1) ##while True: ## print("=============") ## print("Acceleration:") ## print("X:%.2f, Y: %.2f, Z: %.2f m/s^2"%(mpu.acceleration)) ## print("X:{0:0.2f}, Y: {1:0.2f}, Z: {2:0.2f} m/s^2".format(*sensor.read_acceleration())) ## print("X:%.2f, Y: %.2f, Z: %.2f m/s^2"%(nmpu.acceleration)) ## print("Gyro:") ## print("X:%.2f, Y: %.2f, Z: %.2f degrees/s"%(mpu.gyro)) ## print("X:{0:0.2f}, Y: {1:0.2f}, Z: {2:0.2f} degrees/s".format(*sensor.read_gyro())) ## print("X:%.2f, Y: %.2f, Z: %.2f degrees/s"%(nmpu.gyro)) ## print("Temperature:") ## print("%.2f C"%mpu.temperature) ## print("%.2f C"%sensor.read_temperature()) ## print("%.2f C"%nmpu.temperature) ## print("") ## time.sleep(2) while not i2c.try_lock(): pass while True: print("I2C addresses found:", [hex(device_address) for device_address in i2c.scan()]) time.sleep(2)
[ 21017, 220, 34420, 1022, 6643, 198, 2235, 198, 11748, 640, 198, 11748, 3096, 198, 11748, 1323, 952, 198, 198, 21017, 1215, 1878, 4872, 4904, 52, 1899, 1120, 357, 38610, 11594, 8, 198, 11748, 512, 1878, 4872, 62, 3149, 84, 1899, 1120, ...
2.037576
825
__all__ = ['create_build_dir'] from pathlib import Path from typing import Optional from error import * from file_structure import * from ..find_build_dir import *
[ 834, 439, 834, 796, 37250, 17953, 62, 11249, 62, 15908, 20520, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 4049, 1330, 1635, 198, 6738, 2393, 62, 301, 5620, 1330, 1635, 198, 6738, 11485, 19796...
3.479167
48
import os from util.YamlConfig import YamlConfig if __name__ == "__main__": yaml_test()
[ 11748, 28686, 198, 198, 6738, 7736, 13, 56, 43695, 16934, 1330, 14063, 75, 16934, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 331, 43695, 62, 9288, 3419, 198 ]
2.594595
37
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet from oops_fhir.r4.code_system.v3_act_code import v3ActCode __all__ = ["v3SecurityPolicy"] _resource = _ValueSet.parse_file(Path(__file__).with_suffix(".json")) class v3SecurityPolicy(v3ActCode): """ V3 Value SetSecurityPolicy Types of security policies that further specify the ActClassPolicy value set. Examples: encrypt prohibit redisclosure without consent directive Status: active - Version: 2014-03-26 http://terminology.hl7.org/ValueSet/v3-SecurityPolicy """
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 277, 71, 343, 13, 37540, 13, 27160, 316, 1330, 11052, 7248, 355, 4808, 11395, 7248, 198, 198, 6738, 267, 2840, 62, 69, 71, 343, 13, 26791, 1330, 11052, 7248, 628, 198, 6738, 267, 2840, ...
2.966825
211
from __future__ import absolute_import from sentry import http from sentry.plugins.bases.data_forwarding import DataForwardingPlugin from test_only_plugins.base import CorePluginMixin from test_only_plugins.utils import get_secret_field_config
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 1908, 563, 1330, 2638, 198, 6738, 1908, 563, 13, 37390, 13, 65, 1386, 13, 7890, 62, 11813, 278, 1330, 6060, 39746, 278, 37233, 198, 198, 6738, 1332, 62, 8807, 62, 37390, ...
3.686567
67
import pytest import os from contextualized_topic_models.models.ctm import ZeroShotTM from contextualized_topic_models.evaluation.measures import CoherenceNPMI, CoherenceCV, InvertedRBO, TopicDiversity from contextualized_topic_models.utils.data_preparation import TopicModelDataPreparation @pytest.fixture @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 11748, 28686, 198, 198, 6738, 38356, 1143, 62, 26652, 62, 27530, 13, 27530, 13, 310, 76, 1330, 12169, 28512, 15972, 198, 6738, 38356, 1143, 62, 26652, 62, 27530, 13, 18206, 2288, 13, 47336, 1330, 1766, 23545, 45...
3.317308
104
# !/usr/bin/env python3 # -*-coding:utf-8-*- # @file: setup.py # @brief: # @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com # @version: 0.0.1 # @creation date: 28-10-2019 # @last modified: Tue 29 Oct 2019 02:00:37 PM EDT from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension ext_modules = [Extension('writeKT15FalseColor', ['writeKT15FalseColor.pyx'])] setup( ext_modules = cythonize(ext_modules) )
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 2, 2488, 7753, 25, 9058, 13, 9078, 198, 2, 2488, 65, 3796, 25, 198, 2, 2488, 9800, 25, 22597, 39598, 327, 1...
2.512953
193
#-------------------------------- # demo of convolution of 2D image - laplacian kernel #-------------------------------- import numpy as np import cv2 if __name__ == '__main__': UseWebCam()
[ 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 2, 3880, 201, 198, 2, 13605, 286, 3063, 2122, 286, 362, 35, 2939, 532, 8591, 489, 330, 666, 9720, 220, 201, 198, 2, 3880, 201, 198, 201, 198, 201, 198, 11748, 299, 3215...
2.290909
110
""" N Queens ========== Place N queens on a NxN chessboard such that no queens come under attack. Give all possible placements of N queens. SOLUTION - Backtracking to find all possible placements - Grow the state space tree by placing a queen on one row at a time - Bounding function: no two queens share the same row, column and diagonal. Time O(N!) The worst case “brute force” solution for the N-queens puzzle has an O(n^n) time complexity. This means it will look through every position on an NxN board, N times, for N queens. It is by far the slowest and most impractical method. If you refactor and prevent it from checking queens occupying the same row as each other, it will still be brute force, but the possible board states drop from 16,777,216 to a little over 40,000 and has a time complexity of O(n!). """ from typing import NamedTuple, List, Tuple, Set
[ 37811, 201, 198, 45, 14045, 201, 198, 2559, 855, 201, 198, 27271, 399, 38771, 319, 257, 399, 87, 45, 19780, 3526, 884, 326, 645, 38771, 1282, 739, 1368, 13, 201, 198, 23318, 477, 1744, 21957, 3196, 286, 399, 38771, 13, 201, 198, 201...
3.440613
261
# in not in 重载 # contains l1 = MyList([1, 2, 3]) print(1 in l1) # True print(1 not in l1) # False print(4 in l1) # False
[ 2, 287, 407, 287, 16268, 229, 235, 164, 121, 121, 198, 2, 4909, 628, 198, 198, 75, 16, 796, 2011, 8053, 26933, 16, 11, 362, 11, 513, 12962, 198, 4798, 7, 16, 287, 300, 16, 8, 220, 1303, 6407, 198, 4798, 7, 16, 407, 287, 300, ...
2.015873
63
use_list_comprehension() print(use_zip_for_list_processing())
[ 198, 1904, 62, 4868, 62, 785, 3866, 5135, 295, 3419, 198, 4798, 7, 1904, 62, 13344, 62, 1640, 62, 4868, 62, 36948, 28955 ]
2.695652
23
import json import uuid import factory from django.db import connection from django.test import TestCase from django.test import override_settings from django.utils import timezone from facility_profile.models import Facility import mock import pytest from ..helpers import create_buffer_and_store_dummy_data from ..helpers import create_dummy_store_data from morango.constants import transfer_statuses from morango.errors import MorangoLimitExceeded from morango.models.core import Buffer from morango.models.core import DatabaseIDModel from morango.models.core import InstanceIDModel from morango.models.core import RecordMaxCounter from morango.models.core import RecordMaxCounterBuffer from morango.models.core import Store from morango.models.core import SyncSession from morango.models.core import TransferSession from morango.sync.backends.utils import load_backend from morango.sync.context import LocalSessionContext from morango.sync.controller import MorangoProfileController from morango.sync.controller import SessionController from morango.sync.operations import _dequeue_into_store from morango.sync.operations import _queue_into_buffer from morango.sync.operations import CleanupOperation from morango.sync.operations import ReceiverDequeueOperation from morango.sync.operations import ProducerDequeueOperation from morango.sync.operations import ReceiverDeserializeOperation from morango.sync.operations import InitializeOperation from morango.sync.operations import ProducerQueueOperation from morango.sync.operations import ReceiverQueueOperation from morango.sync.syncsession import TransferClient DBBackend = load_backend(connection).SQLWrapper() @override_settings(MORANGO_SERIALIZE_BEFORE_QUEUING=False) @override_settings(MORANGO_DESERIALIZE_AFTER_DEQUEUING=False)
[ 11748, 33918, 198, 11748, 334, 27112, 198, 198, 11748, 8860, 198, 6738, 42625, 14208, 13, 9945, 1330, 4637, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 1330, 20957, 62, 33692, 198, 6738, 42625,...
3.74375
480
''' Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she eats all of them instead and will not eat any more bananas during this hour. Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return. Return the minimum integer k such that she can eat all the bananas within h hours. Example 1: Input: piles = [3,6,7,11], h = 8 Output: 4 Example 2: Input: piles = [30,11,23,4,20], h = 5 Output: 30 Example 3: Input: piles = [30,11,23,4,20], h = 6 Output: 23 ''' # low, high = 1, max(piles) # mid = low + high / 2 that is 6 in given example # 1 + 1 + 2 + 2 = 6 hours to finish but we need to optimise # low = 1, high = 6 + 1 = # mid = 4 now #
[ 7061, 6, 198, 42, 16044, 10408, 284, 4483, 35484, 13, 1318, 389, 299, 30935, 286, 35484, 11, 262, 340, 71, 14540, 468, 30935, 58, 72, 60, 35484, 13, 383, 10942, 423, 3750, 290, 481, 1282, 736, 287, 289, 2250, 13, 198, 198, 42, 160...
3.176667
300
#!/usr/bin/env python #coding=utf-8 import sys import db_opr ################################# main program################################## if __name__ == '__main__': print 'start initdb...' db_init = DBInit() db_init.run() del db_init print 'end initdb...'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 11748, 25064, 220, 198, 11748, 20613, 62, 404, 81, 198, 198, 29113, 2, 1388, 1430, 29113, 2235, 198, 361, 11593, 3672, 834, 6624, 705, 834, ...
3.045455
88
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import List, Optional import torch import torch.nn as nn import torch.nn.functional as F from pytext.config.field_config import CharFeatConfig from pytext.data.utils import Vocabulary from pytext.fields import FieldMeta from pytext.utils.usage import log_class_usage from .embedding_base import EmbeddingBase class CharacterEmbedding(EmbeddingBase): """ Module for character aware CNN embeddings for tokens. It uses convolution followed by max-pooling over character embeddings to obtain an embedding vector for each token. Implementation is loosely based on https://arxiv.org/abs/1508.06615. Args: num_embeddings (int): Total number of characters (vocabulary size). embed_dim (int): Size of character embeddings to be passed to convolutions. out_channels (int): Number of output channels. kernel_sizes (List[int]): Dimension of input Tensor passed to MLP. highway_layers (int): Number of highway layers applied to pooled output. projection_dim (int): If specified, size of output embedding for token, via a linear projection from convolution output. Attributes: char_embed (nn.Embedding): Character embedding table. convs (nn.ModuleList): Convolution layers that operate on character embeddings. highway_layers (nn.Module): Highway layers on top of convolution output. projection (nn.Module): Final linear layer to token embedding. embedding_dim (int): Dimension of the final token embedding produced. """ Config = CharFeatConfig @classmethod def from_config( cls, config: CharFeatConfig, metadata: Optional[FieldMeta] = None, vocab_size: Optional[int] = None, ): """Factory method to construct an instance of CharacterEmbedding from the module's config object and the field's metadata object. Args: config (CharFeatConfig): Configuration object specifying all the parameters of CharacterEmbedding. metadata (FieldMeta): Object containing this field's metadata. Returns: type: An instance of CharacterEmbedding. """ if vocab_size is None: vocab_size = metadata.vocab_size return cls( vocab_size, config.embed_dim, config.cnn.kernel_num, config.cnn.kernel_sizes, config.highway_layers, config.projection_dim, ) def forward(self, chars: torch.Tensor) -> torch.Tensor: """ Given a batch of sentences such that tokens are broken into character ids, produce token embedding vectors for each sentence in the batch. Args: chars (torch.Tensor): Batch of sentences where each token is broken into characters. Dimension: batch size X maximum sentence length X maximum word length Returns: torch.Tensor: Embedded batch of sentences. Dimension: batch size X maximum sentence length, token embedding size. Token embedding size = `out_channels * len(self.convs))` """ batch_size = chars.size(0) max_sent_length = chars.size(1) max_word_length = chars.size(2) chars = chars.view(batch_size * max_sent_length, max_word_length) # char_embedding: (bsize * max_sent_length, max_word_length, embed_dim) char_embedding = self.char_embed(chars) # conv_inp dim: (bsize * max_sent_length, emb_size, max_word_length) conv_inp = char_embedding.transpose(1, 2) char_conv_outs = [F.relu(conv(conv_inp)) for conv in self.convs] # Apply max pooling # char_pool_out[i] dims: (bsize * max_sent_length, out_channels) char_pool_outs = [torch.max(out, dim=2)[0] for out in char_conv_outs] # Concat different feature maps together # char_pool_out dim: (bsize * max_sent_length, out_channel * num_kernels) char_out = torch.cat(char_pool_outs, 1) # Highway layers, preserves dims if self.highway is not None: char_out = self.highway(char_out) if self.projection is not None: # Linear map back to final embedding size: # (bsize * max_sent_length, projection_dim) char_out = self.projection(char_out) # Reshape to (bsize, max_sent_length, "output_dim") return char_out.view(batch_size, max_sent_length, -1) class Highway(nn.Module): """ A `Highway layer <https://arxiv.org/abs/1505.00387>`. Adopted from the AllenNLP implementation. """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 204...
2.540757
1,877
from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from time import sleep from .xpath import xpath from .browser import explicit_wait_visibility_of_element_located MODE_INSTAGRAM = "mode=instagram" def go_to_instagram_Tab(browser): """Go to instragram mode""" if MODE_INSTAGRAM in browser.current_url: print("Already in Instragram Mode") return try: instagram_button = browser.find_element_by_xpath(xpath[go_to_instagram_Tab.__name__]["instagram_button"]) except: print("Unable to find Instagram Button") ActionChains(browser).move_to_element(instagram_button).click().perform() if MODE_INSTAGRAM in browser.current_url: print("Switched to Instagram Mode") return def create_post(browser, account, message, file, schedule_options=None): """Create a post.""" explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["create_post_button"]) create_post_button = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["create_post_button"]) ActionChains(browser).move_to_element(create_post_button).click().perform() sleep(2) explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["instagram_feed_button"]) instagram_feed_button = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["instagram_feed_button"]) ActionChains(browser).move_to_element(instagram_feed_button).click().perform() sleep(1) try: explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["input_account"]) input_account = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["input_account"]) for character in account: ActionChains(browser).move_to_element(input_account).click().send_keys(character).perform() sleep(1) list_account = explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["list_account"].format(account), timeout=1) if list_account is not None: ActionChains(browser).move_to_element(list_account).click().perform() sleep(1) break sleep(2) except: pass # First we load the content explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["add_content_button"]) add_content_button = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["add_content_button"]) browser.execute_script("arguments[0].scrollIntoView();", add_content_button) ActionChains(browser).move_to_element(add_content_button).click().perform() sleep(2) input_file = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["input_file"]) input_file.send_keys(file) sleep(1) input_message = explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["input_message"]) browser.execute_script("arguments[0].scrollIntoView();", input_message) ActionChains(browser).move_to_element(input_message).click().send_keys(message).perform() sleep(1) if schedule_options is not None: schedule_options_hour, schedule_options_minutes, schedule_options_am_pm, = schedule_options["time"].replace(":", " ").split() options_publish_button = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["options_publish_button"]) ActionChains(browser).move_to_element(options_publish_button).click().perform() sleep(1) schedule_option = explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["schedule_option"]) ActionChains(browser).move_to_element(schedule_option).click().perform() sleep(1) input_date = browser.find_element_by_xpath(xpath["instagram"][create_post.__name__]["input_date"]) ActionChains(browser).move_to_element(input_date).click().send_keys(schedule_options["date"]).perform() sleep(1) hour, minutes, am_pm = browser.find_elements_by_xpath(xpath["instagram"][create_post.__name__]["input_time"]) hour.send_keys(schedule_options_hour) sleep(1) minutes.send_keys(schedule_options_minutes) sleep(1) am_pm.send_keys(schedule_options_am_pm) sleep(1) print("Watting for load finish.") load_finished = explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["load_complete"]) if load_finished is None: print("Load not finish. Aborting...") return send_post_button = explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["send_post_button"]) browser.execute_script("arguments[0].scrollIntoView();", send_post_button) ActionChains(browser).move_to_element(send_post_button).click().perform() sleep(1) success_message = explicit_wait_visibility_of_element_located(browser, xpath["instagram"][create_post.__name__]["success_message"]) if success_message is None: print("Error Creating Post") return False print("Post Created.") return True
[ 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 2673, 62, 38861, 1330, 7561, 1925, 1299, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 6738, 640, 1330, 3993, 198, 198, 6738, 764, 87, 6...
2.585873
2,067
# Copyright (C) 2019-2021 Ruhr West University of Applied Sciences, Bottrop, Germany # AND Elektronische Fahrwerksysteme GmbH, Gaimersheim Germany # # This Source Code Form is subject to the terms of the Apache License 2.0 # If a copy of the APL2 was not distributed with this # file, You can obtain one at https://www.apache.org/licenses/LICENSE-2.0.txt. from typing import Tuple from collections import OrderedDict import numpy as np import torch import torch.distributions.constraints as constraints import pyro import pyro.distributions as dist from netcal.scaling import AbstractLogisticRegression class LogisticCalibrationDependent(AbstractLogisticRegression): """ This calibration method is for detection only and uses multivariate normal distributions to obtain a calibration mapping by means of the confidence as well as additional features. This calibration scheme tries to model several dependencies in the variables given by the input ``X`` [1]_. It is necessary to provide all data in input parameter ``X`` as an NumPy array of shape ``(n_samples, n_features)``, whereas the confidence must be the first feature given in the input array. The ground-truth samples ``y`` must be an array of shape ``(n_samples,)`` consisting of binary labels :math:`y \\in \\{0, 1\\}`. Those labels indicate if the according sample has matched a ground truth box :math:`\\text{m}=1` or is a false prediction :math:`\\text{m}=0`. **Mathematical background:** For confidence calibration in classification tasks, a confidence mapping :math:`g` is applied on top of a miscalibrated scoring classifier :math:`\\hat{p} = h(x)` to deliver a calibrated confidence score :math:`\\hat{q} = g(h(x))`. For detection calibration, we can also use the additional box regression output which we denote as :math:`\\hat{r} \\in [0, 1]^J` with :math:`J` as the number of dimensions used for the box encoding (e.g. :math:`J=4` for x position, y position, width and height). Therefore, the calibration map is not only a function of the confidence score, but also of :math:`\\hat{r}`. To define a general calibration map for binary problems, we use the logistic function and the combined input :math:`s = (\\hat{p}, \\hat{r})` of size K by .. math:: g(s) = \\frac{1}{1 + \\exp(-z(s))} , According to [2]_, we can interpret the logit :math:`z` as the logarithm of the posterior odds .. math:: z(s) = \\log \\frac{f(\\text{m}=1 | s)}{f(\\text{m}=0 | s)} \\approx \\log \\frac{f(s | \\text{m}=1)}{f(s | \\text{m}=1)} = \\ell r(s) Inserting multivariate normal density distributions into this framework with :math:`\\mu^+, \\mu^- \\in \\mathbb{R}^K` and :math:`\\Sigma^+, \\Sigma^- \\in \\mathbb{R}^{K \\times K}` as the mean vectors and covariance matrices for :math:`\\text{m}=1` and :math:`\\text{m}=0`, respectively, we get a likelihood ratio of .. math:: \\ell r(s) = \\log \\frac{\\Sigma^-}{\\Sigma^+} + \\frac{1}{2} (s_-^T \\Sigma_-^{-1}s^-) - (s_+^T \\Sigma_+^{-1}s^+), with :math:`s^+ = s - \\mu^+` and :math:`s^- = s - \\mu^-`. To keep the restrictions to covariance matrices (symmetric and positive semidefinit), we optimize a decomposed matrix V as .. math:: \\Sigma = V^T V instead of estimating :math:`\\Sigma` directly. This guarantees both requirements. Parameters ---------- method : str, default: "mle" Method that is used to obtain a calibration mapping: - 'mle': Maximum likelihood estimate without uncertainty using a convex optimizer. - 'momentum': MLE estimate using Momentum optimizer for non-convex optimization. - 'variational': Variational Inference with uncertainty. - 'mcmc': Markov-Chain Monte-Carlo sampling with uncertainty. momentum_epochs : int, optional, default: 1000 Number of epochs used by momentum optimizer. mcmc_steps : int, optional, default: 20 Number of weight samples obtained by MCMC sampling. mcmc_chains : int, optional, default: 1 Number of Markov-chains used in parallel for MCMC sampling (this will result in mcmc_steps * mcmc_chains samples). mcmc_warmup_steps : int, optional, default: 100 Warmup steps used for MCMC sampling. vi_epochs : int, optional, default: 1000 Number of epochs used for ELBO optimization. independent_probabilities : bool, optional, default: False Boolean for multi class probabilities. If set to True, the probability estimates for each class are treated as independent of each other (sigmoid). use_cuda : str or bool, optional, default: False Specify if CUDA should be used. If str, you can also specify the device number like 'cuda:0', etc. References ---------- .. [1] Fabian Küppers, Jan Kronenberger, Amirhossein Shantia and Anselm Haselhoff: "Multivariate Confidence Calibration for Object Detection." The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops. .. [2] Kull, Meelis, Telmo Silva Filho, and Peter Flach: "Beta calibration: a well-founded and easily implemented improvement on logistic calibration for binary classifiers" Artificial Intelligence and Statistics, PMLR 54:623-631, 2017 `Get source online <http://proceedings.mlr.press/v54/kull17a/kull17a.pdf>`_ .. [3] Fabian Küppers, Jan Kronenberger, Jonas Schneider and Anselm Haselhoff: "Bayesian Confidence Calibration for Epistemic Uncertainty Modelling." 2021 IEEE Intelligent Vehicles Symposium (IV), 2021 """ def __init__(self, *args, **kwargs): """ Create an instance of `LogisticCalibrationDependent`. Detailed parameter description given in class docs. """ # an instance of this class is definitely of type detection if 'detection' in kwargs and kwargs['detection'] == False: print("WARNING: On LogisticCalibrationDependent, attribute \'detection\' must be True.") kwargs['detection'] = True super().__init__(*args, **kwargs) # ------------------------------------------------- @property def intercept(self) -> float: """ Getter for intercept of dependent logistic calibration. """ if self._sites is None: raise ValueError("Intercept is None. You have to call the method 'fit' first.") return self._sites['bias']['values'] @property def means(self) -> Tuple[np.ndarray, np.ndarray]: """ Getter for mean vectors of dependent logistic calibration. """ if self._sites is None: raise ValueError("Weights is None. You have to call the method 'fit' first.") index_1 = 2 * (self.num_features ** 2) index_2 = index_1 + self.num_features weights = self._sites['weights']['values'] return weights[index_1:index_2], weights[index_2:] @property def covariances(self) -> Tuple[np.ndarray, np.ndarray]: """ Getter for covariance matrices of dependent logistic calibration. """ if self._sites is None: raise ValueError("Weights is None. You have to call the method 'fit' first.") index_1 = self.num_features ** 2 index_2 = index_1 + self.num_features ** 2 weights = self._sites['weights']['values'] decomposed_inv_cov_pos = np.reshape(weights[:index_1], (self.num_features, self.num_features)) decomposed_inv_cov_neg = np.reshape(weights[index_1:index_2], (self.num_features, self.num_features)) inv_cov_pos = np.matmul(decomposed_inv_cov_pos.T, decomposed_inv_cov_pos.T) inv_cov_neg = np.matmul(decomposed_inv_cov_neg.T, decomposed_inv_cov_neg.T) cov_pos = np.linalg.inv(inv_cov_pos) cov_neg = np.linalg.inv(inv_cov_neg) return cov_pos, cov_neg # ------------------------------------------------- def prepare(self, X: np.ndarray) -> torch.Tensor: """ Preprocessing of input data before called at the beginning of the fit-function. Parameters ---------- X : np.ndarray, shape=(n_samples, [n_classes]) or (n_samples, [n_box_features]) NumPy array with confidence values for each prediction on classification with shapes 1-D for binary classification, 2-D for multi class (softmax). On detection, this array must have 2 dimensions with number of additional box features in last dim. Returns ------- torch.Tensor Prepared data vector X as torch tensor. """ assert self.detection, "Detection mode must be enabled for dependent logistic calibration." if len(X.shape) == 1: X = np.reshape(X, (-1, 1)) # on detection mode, convert confidence to sigmoid and append the remaining features data_input = np.concatenate((self._inverse_sigmoid(X[:, 0]).reshape(-1, 1), X[:, 1:]), axis=1) return torch.Tensor(data_input) def prior(self): """ Prior definition of the weights used for log regression. This function has to set the variables 'self.weight_prior_dist', 'self.weight_mean_init' and 'self.weight_stddev_init'. """ # number of weights num_weights = 2 * (self.num_features ** 2 + self.num_features) # prior estimates for decomposed inverse covariance matrices and mean vectors decomposed_inv_cov_prior = torch.diag(torch.ones(self.num_features)) mean_mean_prior = torch.ones(self.num_features) # initial stddev for all weights is always the same weights_mean_prior = torch.cat((decomposed_inv_cov_prior.flatten(), decomposed_inv_cov_prior.flatten(), mean_mean_prior.flatten(), mean_mean_prior.flatten())) self._sites = OrderedDict() # set properties for "weights" self._sites['weights'] = { 'values': None, 'constraint': constraints.real, 'init': { 'mean': weights_mean_prior, 'scale': torch.ones(num_weights) }, 'prior': dist.Normal(weights_mean_prior, 10 * torch.ones(num_weights), validate_args=True), } # set properties for "bias" self._sites['bias'] = { 'values': None, 'constraint': constraints.real, 'init': { 'mean': torch.zeros(1), 'scale': torch.ones(1) }, 'prior': dist.Normal(torch.zeros(1), 10 * torch.ones(1), validate_args=True), } def model(self, X: torch.Tensor = None, y: torch.Tensor = None) -> torch.Tensor: """ Definition of the log regression model. Parameters ---------- X : torch.Tensor, shape=(n_samples, n_log_regression_features) Input data that has been prepared by "self.prepare" function call. y : torch.Tensor, shape=(n_samples, [n_classes]) Torch tensor with ground truth labels. Either as label vector (1-D) or as one-hot encoded ground truth array (2-D) (for multiclass MLE only). Returns ------- torch.Tensor, shape=(n_samples, [n_classes]) Logit of the log regression model. """ # get indices of weights index_1 = int(np.power(self.num_features, 2)) index_2 = index_1 + int(np.power(self.num_features, 2)) index_3 = index_2 + self.num_features # sample from prior - on MLE, this weight will be set as conditional bias = pyro.sample("bias", self._sites["bias"]["prior"]) weights = pyro.sample("weights", self._sites["weights"]["prior"]) # the first dimension of the given input data is the "independent" sample dimension with pyro.plate("data", X.shape[0]): # get weights of decomposed cov matrices V^(-1) decomposed_inv_cov_pos = torch.reshape(weights[:index_1], (self.num_features, self.num_features)) decomposed_inv_cov_neg = torch.reshape(weights[index_1:index_2], (self.num_features, self.num_features)) mean_pos = weights[index_2:index_3] mean_neg = weights[index_3:] # get logits by calculating gaussian ratio between both distributions # calculate covariance matrices # COV^(-1) = V^(-1) * V^(-1,T) inverse_cov_pos = torch.matmul(decomposed_inv_cov_pos, decomposed_inv_cov_pos.transpose(1, 0)) inverse_cov_neg = torch.matmul(decomposed_inv_cov_neg, decomposed_inv_cov_neg.transpose(1, 0)) # calculate data without means difference_pos = X - mean_pos difference_neg = X - mean_neg # add a new dimensions. This is necessary for torch to distribute dot product difference_pos = torch.unsqueeze(difference_pos, 2) difference_neg = torch.unsqueeze(difference_neg, 2) logit = 0.5 * (torch.matmul(difference_neg.transpose(2, 1), torch.matmul(inverse_cov_neg, difference_neg)) - torch.matmul(difference_pos.transpose(2, 1), torch.matmul(inverse_cov_pos, difference_pos)) ) # remove unnecessary dimensions logit = torch.squeeze(logit) # add bias ratio to logit logit = bias + logit # if MLE, (slow) sampling is not necessary. However, this is needed for 'variational' and 'mcmc' if self.method in ['variational', 'mcmc']: probs = torch.sigmoid(logit) pyro.sample("obs", dist.Bernoulli(probs=probs, validate_args=True), obs=y) return logit
[ 2, 15069, 357, 34, 8, 13130, 12, 1238, 2481, 371, 7456, 81, 2688, 2059, 286, 27684, 13473, 11, 14835, 1773, 11, 4486, 198, 2, 5357, 15987, 21841, 1313, 46097, 27361, 81, 15448, 591, 6781, 68, 402, 2022, 39, 11, 402, 1385, 364, 9096,...
2.510612
5,560
"""Show the current status information for each of the selected lambda targets.""" import argparse import textwrap import typing import yaml from botocore.client import BaseClient from reviser import definitions from reviser import interactivity from reviser import servicer def get_completions( completer: "interactivity.ShellCompleter", ) -> typing.List[str]: """Get shell auto-completes for this command.""" return [] def populate_subparser(parser: argparse.ArgumentParser): """Populate parser for the status command.""" parser.add_argument( "qualifier", nargs="?", help=""" Specifies a version or alias to show status for. If not specified, $LATEST will be used for functions and the latest version will be dynamically determined for layers. """, ) def _get_layer_version_info( client: BaseClient, layer_reference: "definitions.LambdaLayerReference", ) -> dict: """Fetch layer information for display.""" if not layer_reference.unversioned_arn: return {} versions = servicer.get_layer_versions( client, layer_reference.unversioned_arn, ) current = next((v for v in versions if v.arn == layer_reference.arn), None) if current is None: return {} out = { "name": current.name, "version": current.version or "UNKNOWN", "created": current.created.isoformat("T"), "runtimes": ", ".join(current.runtimes), "arn": layer_reference.arn or "UNKNOWN", } latest = versions[-1] if latest != current: out["status"] = f"Newer version {latest.version} exists." else: out["status"] = "Is latest version." return out def _display_function_info( client: BaseClient, name: str, qualifier: str, ): """Display the response lambda function information.""" lambda_function = servicer.get_function_version( lambda_client=client, function_name=name, qualifier=qualifier, ) data = { "modified": lambda_function.modified, "description": lambda_function.description, "arn": lambda_function.arn, "runtime": lambda_function.runtime, "role": lambda_function.role, "handler": lambda_function.handler, "size": lambda_function.size, "timeout": lambda_function.timeout, "memory": lambda_function.memory, "version": lambda_function.version, "environment": lambda_function.environment, "revision_id": lambda_function.revision_id, "layers": [ { **_get_layer_version_info(client, item), "size": item.size, } for item in lambda_function.layers ], "status": lambda_function.status.to_dict(), "update_status": lambda_function.status.to_dict(), } suffix = qualifier or "$LATEST" print(f"\n--- {lambda_function.name}:{suffix} ---") print(textwrap.indent(yaml.safe_dump(data), prefix=" ")) print("\n") def _display_layer_info( client: BaseClient, name: str, qualifier: str, ) -> None: """Display layer version information.""" try: version = int(qualifier) except (ValueError, TypeError): version = servicer.get_layer_versions(client, name)[-1].version or 0 layer = servicer.get_layer_version( lambda_client=client, layer_name=name, version=version, ) if layer is None: return print(f"\n--- {layer.name}:{version} ---") data = { "arn": layer.arn, "version": layer.version, "created": layer.created.isoformat(), "description": layer.description, "size": layer.size, "runtimes": ", ".join(layer.runtimes), } print(textwrap.indent(yaml.safe_dump(data), prefix=" ")) def run(ex: "interactivity.Execution") -> "interactivity.Execution": """Display the current configuration of the lambda target(s).""" selected = ex.shell.context.get_selected_targets(ex.shell.selection) qualifier = ex.args.get("qualifier") or "$LATEST" items: typing.List[typing.Tuple[definitions.Target, str]] items = [(t, n) for t in selected.function_targets for n in t.names] for target, name in items: _display_function_info(target.client("lambda"), name, qualifier) items = [(t, n) for t in selected.layer_targets for n in t.names] for target, name in items: _display_layer_info(target.client("lambda"), name, qualifier) return ex.finalize( status="SUCCESS", message="Status reports have been display.", echo=False, )
[ 37811, 15307, 262, 1459, 3722, 1321, 329, 1123, 286, 262, 6163, 37456, 6670, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 2420, 37150, 198, 11748, 19720, 198, 198, 11748, 331, 43695, 198, 6738, 10214, 420, 382, 13, 16366, 1330, 7308, ...
2.529348
1,857
ff = open('LINEAS', 'r') flines = ff.readlines() ff.close() ff = open('LINEAS.csv', 'w') for l in flines: tmp = l.split() idx, element = tmp[0].split('=') ff.write('{0},{1},{2},{3}\n'.format(idx, element,tmp[1],tmp[2])) ff.close()
[ 198, 198, 487, 796, 1280, 10786, 24027, 1921, 3256, 705, 81, 11537, 198, 2704, 1127, 796, 31246, 13, 961, 6615, 3419, 198, 487, 13, 19836, 3419, 198, 198, 487, 796, 1280, 10786, 24027, 1921, 13, 40664, 3256, 705, 86, 11537, 198, 1640,...
2.084034
119
import argparse, logging
[ 11748, 1822, 29572, 11, 18931, 198 ]
4.166667
6
from pygame.sprite import RenderClear from subpixelsurface import * # This class keeps an ordered list of sprites in addition to the dict, # so we can draw in the order the sprites were added. # Some quick benchmarks show that [:] is the fastest way to get a # shallow copy of a list. # This is kind of a wart -- the actual RenderUpdates class doesn't # use add_internal in its add method, so just overriding # add_internal won't work.
[ 6738, 12972, 6057, 13, 34975, 578, 1330, 46722, 19856, 198, 6738, 22718, 14810, 333, 2550, 1330, 1635, 198, 198, 2, 770, 1398, 7622, 281, 6149, 1351, 286, 42866, 287, 3090, 284, 262, 8633, 11, 198, 2, 523, 356, 460, 3197, 287, 262, ...
3.805085
118
from logging import getLogger log = getLogger('msn.nssb') import msn from msn import MSNTextMessage from util import callsback from util.primitives.funcs import get from util.Events import EventMixin class NSSBAdapter(EventMixin): ''' Chatting with federated (yahoo) buddies happens over the NS protocol, but MSNConversations are made to work with Switchboard protocol implementations. This class exists to provide a switchboard interface to the NS. ''' _instances = [] events = EventMixin.events | set (( 'on_buddy_join', 'on_buddy_leave', 'on_buddy_timeout', 'on_conn_success', 'on_authenticate', 'disconnect', 'contact_alias', 'needs_auth', 'recv_error', 'recv_text_msg', 'send_text_msg', 'typing_info', 'recv_action', 'recv_p2p_msg', 'transport_error', )) @property @property @property @callsback @callsback def send_typing_status(self, name, status): ''' UUM 0 bob@yahoo.com 32 2 87\r\n MIME-Version: 1.0\r\n Content-Type: text/x-msmsgscontrol\r\n TypingUser: alice@live.com\r\n \r\n ''' payload = [] line = lambda k,v: '%s: %s' % (k,v) add = payload.append add(line('MIME-Version', '1.0')) add(line('Content-Type', 'text/x-msmsgscontrol')) add(line('TypingUser', name)) add('') add('') payload = '\r\n'.join(payload) netid = 32 msg = msn.Message('UUM', self.__chatbuddy, netid, 2, payload = payload) self.ns.socket.send(msg, trid=True, callback=sentinel) def recv_msg_plain(self, msg): ''' msg_plain(msg, src_account, src_display) this is called when a msg comes in with type='text/plain' @param socket: the socket it arrived from (better be self.socket!) @param msg: the rfc822 object representing the MIME headers and such @param src_account: the email address/passport this comes from @param src_display: the display name of the buddy who sent it @param *params: more stuff! ''' name, nick = msg.args[:2] msg = MSNTextMessage.from_net(msg.payload) # self.event('contact_alias', name, nick) self.event('recv_text_msg', name, msg) def recv_msg_control(self, msg): ''' msg_control(msg, src_account, src_display) This is called when a message comes in with type='text/x-msmsgscontrol' Generally, these are typing indicators. @param msg: msnmessage ''' name = msg.args[0] self.event('typing_info', name, bool(msg.payload.get('TypingUser', False))) @classmethod
[ 6738, 18931, 1330, 651, 11187, 1362, 201, 198, 6404, 796, 651, 11187, 1362, 10786, 907, 77, 13, 77, 824, 65, 11537, 201, 198, 201, 198, 11748, 13845, 77, 201, 198, 201, 198, 6738, 13845, 77, 1330, 6579, 45, 8206, 12837, 201, 198, 20...
2.062281
1,429
import urllib from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext from olympia.amo.templatetags import jinja_helpers from olympia.amo.feeds import NonAtomicFeed from olympia.addons.models import Addon, Review
[ 11748, 2956, 297, 571, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 198, 198, 6738, 267, 6760, 544, 13, 18811, 13, 1149...
3.048193
83
default_app_config = 'wechat_ggfilm_backend.apps.WechatGgfilmBackendConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 732, 17006, 62, 1130, 26240, 62, 1891, 437, 13, 18211, 13, 1135, 17006, 38, 70, 26240, 7282, 437, 16934, 6 ]
2.777778
27
import logging import mimetypes from concurrent.futures import ThreadPoolExecutor from http.client import RemoteDisconnected from io import BytesIO from typing import Iterator, Callable from urllib.parse import urlparse import pymongo import urllib3 from bson import ObjectId from requests import HTTPError from tsing_spider.porn.xarthunter import ( XarthunterItemPage, XarthunterVideoIndexPage, XarthunterImageIndexPage ) from tsing_spider.util import http_get from ghs.spiders.base import BaseSpiderTaskGenerator from ghs.utils.storage import create_s3_client, create_mongodb_client, bucket_name, put_json log = logging.getLogger(__file__) item_thread_pool = ThreadPoolExecutor(max_workers=8) mongodb_client = create_mongodb_client() collection = mongodb_client.get_database("resman").get_collection("spider_xart") urllib3.disable_warnings() s3_client = create_s3_client() def initialize(): """ Initialize mongodb and s3 :return: """ log.info("Initializing database") collection.create_index([("published", pymongo.ASCENDING)]) collection.create_index([("type", pymongo.ASCENDING)]) collection.create_index([("url", pymongo.ASCENDING)]) def image_item_processor(item: XarthunterItemPage): """ Download all images to S3 storage and append item details to mongodb :param item: :return: """ _id = ObjectId() doc = item.json doc["_id"] = _id s3_path_list = [] for i, image_url in enumerate(item.image_urls): try: image_data = http_get(image_url, headers={"Referer": item.url}) url_path = urlparse(image_url).path mime_type = mimetypes.guess_type(url_path)[0] file_suffix = url_path.split(".")[-1] s3_path = f"xart/images/{str(_id)}/{i}.{file_suffix}" s3_path_list.append(s3_path) with BytesIO(image_data) as fp: s3_client.put_object( bucket_name=bucket_name, object_name=s3_path, data=fp, length=len(image_data), content_type=mime_type ) except HTTPError as he: if 400 <= he.response.status_code < 500: log.warning(f"Can't download image {image_url} since resource is not able to access (4xx).") else: raise he doc["url"] = item.url doc["type"] = "image" doc["published"] = False put_json(s3_client, doc, f"xart/images/{str(_id)}/meta.json") collection.insert_one(doc) log.info(f"Image {item.url} written.") def video_item_processor(item: XarthunterItemPage): """ Download video to S3 storage and append item details to mongodb :param item: :return: """ _id = ObjectId() doc = item.json doc["_id"] = _id video_data = http_get(item.mp4_video_url, headers={"Referer": item.url}) with BytesIO(video_data) as fp: s3_client.put_object( bucket_name=bucket_name, object_name=f"xart/videos/{str(_id)}/video.mp4", data=fp, length=len(video_data) ) if item.preview_image_url is not None: preview_image_data = http_get(item.preview_image_url, headers={"Referer": item.url}) with BytesIO(preview_image_data) as fp: s3_client.put_object( bucket_name=bucket_name, object_name=f"xart/videos/{str(_id)}/preview.jpg", data=fp, length=len(preview_image_data), content_type="image/jpeg" ) doc["url"] = item.url doc["type"] = "video" doc["published"] = False put_json(s3_client, doc, f"xart/videos/{str(_id)}/meta.json") collection.insert_one(doc) log.info(f"Video {item.url} written.")
[ 11748, 18931, 198, 11748, 17007, 2963, 12272, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 2638, 13, 16366, 1330, 21520, 7279, 15236, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 19720, 1330, 40...
2.196787
1,743
#!/usr/bin/env python #import roslib; roslib.load_manifest('Phoebe') import rospy from nav_msgs.msg import Odometry # print("All data", completePose) if __name__ == "__main__": rospy.init_node('getPoseTTBot', anonymous=False) #make node rospy.Subscriber('odom', Odometry, callback) rospy.spin()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 11748, 686, 6649, 571, 26, 686, 6649, 571, 13, 2220, 62, 805, 8409, 10786, 2725, 2577, 1350, 11537, 198, 11748, 686, 2777, 88, 198, 198, 6738, 6812, 62, 907, 14542, 13, 19662, 133...
2.449612
129
import datetime import io import math import os.path import subprocess WGRIB_BIN = os.path.expanduser('bin/osx/wgrib2')
[ 11748, 4818, 8079, 198, 11748, 33245, 198, 11748, 10688, 198, 11748, 28686, 13, 6978, 198, 11748, 850, 14681, 198, 198, 54, 38, 7112, 33, 62, 33, 1268, 796, 28686, 13, 6978, 13, 11201, 392, 7220, 10786, 8800, 14, 418, 87, 14, 86, 70...
2.595745
47
# -*- coding: utf-8 -*- # Copyright (c) 2021, Noah Jacob and Contributors # See license.txt from __future__ import unicode_literals import frappe from frappe.utils import nowdate,flt import unittest
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 33448, 11, 18394, 12806, 290, 25767, 669, 198, 2, 4091, 5964, 13, 14116, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
2.802632
76
from nltk.tokenize import SExprTokenizer from apodeixi.util.a6i_error import ApodeixiError from apodeixi.util.dataframe_utils import DataFrameUtils from apodeixi.util.formatting_utils import ListUtils, StringUtils class IntervalSpec(): ''' Abstract helper class used to construct Interval objects. This is needed because sometimes all columns in an Interval are not known at configuration time, and are only known at runtime. For example, perhaps at configuration time we know where an interval starts, but not where it ends, since the end user might add columns to an Excel spreadsheet that quality as part of the interval. Thus, only at runtime in the context of a particular set of Excel columns (a "linear space") can it be determined which are the columns that qualify as belonging to an interval. Example: Say an interval spec is: "All columns from A to F, not inclusive". Then if the linear space is [Q, R, A, T, Y, U, F, G, W], the application of the spec to the linear space yields the Interval [A, T, Y, U] Concrete classes implement different "spec" algorithms, so this particular class is just an abstract class. ''' def buildIntervals(self, parent_trace, linear_space): ''' Implemented by concrete derived classes. Must return a list of Interval objects, constructed by applying the concrete class's semantics to the specificity of the linear_space given. Example: Say an interval spec is: "One interval is the list of all columns up to A (non inclusive, then columns from A to F, not inclusive, and the remaining columns form the last interval". Then if the linear space is [Q, R, A, T, Y, U, F, G, W], the application of the spec to the linear space yields these 3 Intervals: * [Q, R] * [A, T, Y, U] * [F, G, W] ''' raise NotImplementedError("Class " + str(self.__class__) + " forgot to implement method buildInterval") class GreedyIntervalSpec(IntervalSpec): ''' Concrete interval spec class which builds a list consisting of a single interval taking all the columns found in Excel (i.e., all the 'linear space') Example: Say the linear space is [Q, R, A, T, Y, U, F, G, W]. Then this class returns the list containing just one interval: [Q, R, A, T, Y, U, F, G, W] ''' def buildIntervals(self, parent_trace, linear_space): ''' ''' #if self.entity_name == None: # Overwrite self.entity_name to be consistent with the linear space given self.entity_name = IntervalUtils().infer_first_entity(parent_trace, linear_space) my_trace = parent_trace.doing("Validating mandatory columns are present") missing_cols = [col for col in self.mandatory_columns if not col in linear_space] if len(missing_cols) > 0: raise ApodeixiError(my_trace, "Posting lacks some mandatory columns", data = { 'Missing columns': missing_cols, 'Posted columns': linear_space}) return [Interval(parent_trace, linear_space, self.entity_name)] class MinimalistIntervalSpec(IntervalSpec): ''' Concrete interval spec class which builds minimalist intervals, where each interval has exactly 1 non-UID column from the linear space. For example, if the linear space is ['UID', 'Big Rock', 'UID.1', 'Breakdown 1', 'UID.2', 'Breakdown 2'], then calling the `buildIntervals` method will produce these intervals: * ['UID', 'Big Rock'] * ['UID.1', 'Breakdown 1'] * ['UID.2', 'Breakdown 2'] ''' def buildIntervals(self, parent_trace, linear_space): ''' ''' if self.entity_name == None: self.entity_name = IntervalUtils().infer_first_entity(parent_trace, linear_space) my_trace = parent_trace.doing("Validating mandatory columns are present") missing_cols = [col for col in self.mandatory_columns if not col in linear_space] if len(missing_cols) > 0: raise ApodeixiError(my_trace, "Posting lacks some mandatory columns", data = { 'Missing columns': missing_cols, 'Posted columns': linear_space}) interval_columns = [] interval_entity = None intervals_list = [] #for col in linear_space[start_idx:]: current_interval_cols = [] for idx in range(len(linear_space)): loop_trace = parent_trace.doing("Looping through linear space to build intervals", data = { 'linear_space': str(linear_space), 'idx in loop': str(idx), 'current_interval_cols': str(current_interval_cols)}) col = linear_space[idx] if IntervalUtils().is_a_UID_column(loop_trace, col): # append all UIDs until you hit a non-UID, and stop there current_interval_cols.append(col) continue else: # This is the end of the interval current_interval_cols.append(col) interval_entity = col intervals_list.append(Interval(loop_trace, current_interval_cols, interval_entity)) # Reset for next interval to process current_interval_cols = [] continue return intervals_list class ClosedOpenIntervalSpec(IntervalSpec): ''' Concrete interval spec class which builds a list of interval based on knowing the intervals' endpoints, where each endpoint is the start of an interval (and not the end of the previous interval). Example: Say an interval spec is: "Split the linear space at [A, F]" Then if the linear space is [Q, R, A, T, Y, U, F, G, W], the application of the spec to the linear space yields these 3 Intervals: * [Q, R] * [A, T, Y, U] * [F, G, W] @param splitting_columns The columns inside the interval that partition it. In the above example, that would be [A, F] @param may_ignore_tail A boolean. It determines whether it is OK to not have a "tail" of splitting columns, i.e., for a posting's columns to only include a subset of splitting columns up to an index in self.splitting_columns. By default it is False, which means that all splitting columns are mandatory. In the above example, if the linear space is [Q, R, A, T, Y, U] and the splitting columsn are [A, F], then this class will error out when building intervals unless `may_ignore_tail` is True, in which case it will result in these intervals: * [Q, R] * [A, T, Y, U] ''' def buildIntervals(self, parent_trace, linear_space): ''' ''' if self.entity_name == None: self.entity_name = IntervalUtils().infer_first_entity(parent_trace, linear_space) my_trace = parent_trace.doing("Checking splitting columns all belong to linear_spac_") if True: filtered_splitting_columns = self.splitting_columns.copy() missing = [col for col in self.splitting_columns if not col in linear_space] if len(missing) > 0: if not self.may_ignore_tail: # Error out raise ApodeixiError(my_trace, "Can't build intervals because some splitting columns are not in linear space. " + "\n\t=> This sometimes happens if the ranges in the Posting Label don't cover all " + "the data.", data = { 'linear_space': str(linear_space), 'splitting_columns': str(self.splitting_columns), 'missing in linear space': str(missing) }) else: # Check if the missing is a tail, which would be OK missing_start_idx = min([self.splitting_columns.index(col) for col in missing]) after_misses = [col for col in self.splitting_columns if not col in missing and self.splitting_columns.index(col) > missing_start_idx] if len(after_misses) == 0: # We are missing a tail, which is allowed filtered_splitting_columns = self.splitting_columns[:missing_start_idx].copy() else: # error out raise ApodeixiError(my_trace, "Can't build intervals because some non-blank splitting columns" + " are 'present after misses', i.e., they lie after some " + " of the splitting columns missing in linear space", data = { 'linear_space': str(linear_space), 'splitting_columns': str(self.splitting_columns), 'missing in linear space': str(missing), 'present after misses': str(after_misses)}) my_trace = parent_trace.doing("Splitting linear space", data = { 'linear_space': str(linear_space), 'splitting_columns': str(self.splitting_columns)}) if True: intervals_list = [] remaining_cols = linear_space # We add a synthetic extra point at the end for loop to work, since if there are N splitting columns we # will end up with N+1 intervals, so we need to loop through N+1 cycles, not N # That makes the loop below work (otherwise the last interval is not produced, which is a bug) class _PointAtInfinity(): ''' Helper class to represent an additional object "after" all the others. ''' # Add POINT_AT_INFINITY for loop to work # for loop to work, since if there are N splitting columns we # will end up with N+1 intervals, so we need to loop through N+1 cycles, not N # That makes the loop below work (otherwise the last interval is not produced, which is a bug) interval_endpoints = filtered_splitting_columns.copy() interval_endpoints. append(Interval.POINT_AT_INFINITY) for col in interval_endpoints: loop_trace = my_trace.doing("Cycle in loop for one of the splitting_columns", data = {'col': str(col)}) if col != Interval.POINT_AT_INFINITY: # We split by 'col' if it is not the POINT_AT_INFINITY # # GOTCHA: if the submitted form has UIDs, then there probably is a UID column to the left # of `col`. If so, include such UID if it exists, else it will erroneously be considered part # of the entity to the left of `col`, which might then error out thinking it has two UID # columns, which is not legal. # col_idx = linear_space.index(col) if col_idx > 0 and IntervalUtils().is_a_UID_column(loop_trace, linear_space[col_idx - 1]): split_by = [linear_space[col_idx-1]] else: split_by = [col] check, pre_cols, post_cols = ListUtils().is_sublist( parent_trace = loop_trace, super_list = remaining_cols, alleged_sub_list = split_by) if not check: raise ApodeixiError(loop_trace, "Strange internal error: couldn't split columns by column", data = { 'columns_to_split': remaining_cols, 'splitting_column': col}) interval_entity = IntervalUtils().infer_first_entity(loop_trace, remaining_cols) intervals_list.append(Interval( parent_trace = loop_trace, columns = pre_cols, entity_name = interval_entity)) # Initialize data for next cycle in loop remaining_cols = split_by remaining_cols.extend(post_cols) else: # This is the last interval, splitting by the POINT_AT_INFINITY interval_entity = IntervalUtils().infer_first_entity(loop_trace, remaining_cols) intervals_list.append(Interval( parent_trace = loop_trace, columns = remaining_cols, entity_name = interval_entity)) return intervals_list class Interval(): ''' Helper class used as part of the configuration for parsing a table in an Excel spreadsheet. It represents a list of string-valued column names in Excel, ordered from left to right, all for a given entity. Additionally, it indicates which of those column names is the name of the entity (as opposed to a property of) the entity. ''' UID = 'UID' # Field name for anything that is a UID # Sometimes we need a synthetic extra point at the end of an interval. class _PointAtInfinity(): ''' Helper class to represent an additional object "after" all the others. ''' POINT_AT_INFINITY = _PointAtInfinity() def is_subset(self, columns): ''' UID-aware method to test if this Interval is a subset of the given columns. By "UID-aware" we mean that the method ignores any UID column when determining subset condition. For example, ['UID', 'Car', 'Make'] would be considered a subset of ['Car', 'Make', 'Driver'] For internal reasons, it also has POINT_AT_INFINITY awareness ''' me = set(self.columns).difference(set([Interval.UID])).difference(set([Interval.POINT_AT_INFINITY])) them = set(columns) return me.issubset(them) def non_entity_cols(self): ''' Returns a list of strings, corresponding to the Interval's columns that are not the entity type ''' #GOTCHA: Don't compare column names to the entity name directly, since there might be spurious # differences due to lower/upper case. Instead, format as a yaml field to have a standard # policy on case, space, hyphens, etc. prior to comparison FMT = StringUtils().format_as_yaml_fieldname result = [col for col in self.columns if FMT(col) != FMT(self.entity_name)] return result
[ 198, 6738, 299, 2528, 74, 13, 30001, 1096, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 311, 3109, 1050, 30642, 7509, 220, ...
2.02957
8,184
"""Manage assets. Usage: ./manage.py assets rebuild Rebuild all known assets; this requires tracking to be enabled: Only assets that have previously been built and tracked are considered "known". ./manage.py assets rebuild --parse-templates Try to find as many of the project's templates (hopefully all), and check them for the use of assets. Rebuild all the assets discovered in this way. If tracking is enabled, the tracking database will be replaced by the newly found assets. """ import os, sys, imp import time from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django import template from django_assets.conf import settings from django_assets.templatetags.assets import AssetsNode as AssetsNodeOriginal try: from django.templatetags.assets import AssetsNode as AssetsNodeMapped except ImportError: # Since Django #12295, custom templatetags are no longer mapped into # the Django namespace. Support both versions. AssetsNodeMapped = None from django_assets import registry, Bundle from django_assets.merge import abspath from django_assets.bundle import BuildError try: import jinja2 except: jinja2 = None else: jinja2_envs = [] from django_assets.jinja2.extension import AssetsExtension # Prepare a Jinja2 environment we can later use for parsing. # If not specified by the user, put in there at least our own # extension, which we will need most definitely to achieve anything. _jinja2_extensions = getattr(settings, 'ASSETS_JINJA2_EXTENSIONS') if not _jinja2_extensions: _jinja2_extensions = [AssetsExtension.identifier] jinja2_envs.append(jinja2.Environment(extensions=_jinja2_extensions)) try: from coffin.common import get_env as get_coffin_env except: pass else: jinja2_envs.append(get_coffin_env()) def _shortpath(abspath): """Make an absolute path relative to the project's settings module, which would usually be the project directory.""" b = os.path.dirname(os.path.normpath(sys.modules[settings.SETTINGS_MODULE].__file__)) p = os.path.normpath(abspath) return p[len(os.path.commonprefix([b, p])):] from django.utils import autoreload
[ 37811, 5124, 496, 6798, 13, 198, 198, 28350, 25, 628, 220, 220, 220, 24457, 805, 496, 13, 9078, 6798, 17884, 628, 220, 220, 220, 220, 220, 220, 220, 797, 11249, 477, 1900, 6798, 26, 428, 4433, 9646, 284, 307, 9343, 25, 198, 220, 2...
2.962677
777
import torch from ..Objective import Objective
[ 11748, 28034, 198, 198, 6738, 11485, 10267, 425, 1330, 37092, 628 ]
4.454545
11
import imaplib import re import warnings from typing import Iterable, List from nehushtan.logger.NehushtanFileLogger import NehushtanFileLogger from nehushtan.logger.NehushtanLogging import NehushtanLogging from nehushtan.mail.rfc3501.SearchCommandKit import SearchCommandKit from nehushtan.mail.rfc822.NehushtanEmailMessage import NehushtanEmailMessage class IMAPAgent: """ Greatly Changed between 0.4.7 and 0.4.8 """ FETCH_METHOD_RFC822 = '(RFC822)' FETCH_METHOD_RFC822_HEADER = '(RFC822.HEADER)' FETCH_METHOD_RFC822_WITH_UID = '(UID RFC822)' FETCH_METHOD_RFC822_HEADER_WITH_UID = '(UID RFC822.HEADER)' """ Since 0.1.13 [Experimental, Not Fully Completed] """ STATUS_NAME_MESSAGES = 'MESSAGES' # 邮箱中的邮件数。 STATUS_NAME_RECENT = 'RECENT' # 设置了 .ecent 标志的消息数。 STATUS_NAME_UIDNEXT = 'UIDNEXT' # 邮箱的下一个唯一标识符值。 STATUS_NAME_UIDVALIDITY = 'UIDVALIDITY' # 邮箱的唯一标识符有效性值。 STATUS_NAME_UNSEEN = 'UNSEEN' # 没有设置 .een 标志的消息数。 def list_mail_boxes(self, directory='""', pattern='*'): """ 检索帐户可用的邮箱 :param directory: :param pattern: :return: 一个字符串序列,包含每个邮箱的 `标志`,`层次结构分隔符` 和 `邮箱名称` """ response_code, boxes = self._connection.list(directory, pattern) if response_code != 'OK': raise Exception(f'IMAPAgent cannot fetch box list. Code = {response_code} Data = {boxes}') return boxes @staticmethod def parse_box_string_to_tuple(box_string): """ :param box_string: :return: A tuple with parsed components (flags, delimiter, mailbox_name) """ list_response_pattern = re.compile( r'.(?P<flags>.*?). "(?P<delimiter>.*)" (?P<name>.*)' ) match = list_response_pattern.match(box_string.decode('utf-8')) flags, delimiter, mailbox_name = match.groups() mailbox_name = mailbox_name.strip('"') return flags, delimiter, mailbox_name def select_mailbox(self, box: str, readonly: bool = False): """ :param box: :param readonly: :return: The Number of Total Mails """ response_code, data = self._connection.select(box, readonly) if response_code != 'OK': raise Exception(f"IMAPAgent select_mailbox {box} failed: {response_code} with Data: {data}") return int(data[0]) def search_mails_for_message_id(self, criteria, charset=None): """ :param criteria: :param charset: :return: Message ID array """ warnings.warn('NOT FRIENDLY WITH NON-ASCII') response_code, data = self._connection.search(charset, criteria) if response_code != 'OK': raise Exception(f"IMAPAgent search_mails_in_mailbox failed: {response_code} with Data: {data}") message_id_array = data[0].decode('utf-8').split(' ') return message_id_array def fetch_mail_with_message_id(self, message_id: str, message_parts: str) -> list: """ :param message_id: :param message_parts: such as '(BODY.PEEK[HEADER] FLAGS)' for subject :return: """ response_code, data = self._connection.fetch(message_id, message_parts) if response_code != 'OK': raise Exception(f"IMAPAgent fetch_mail failed: {response_code} with Data: {data}") return data # # 字符编码转换 # @staticmethod # def decode_str(str_in): # value, charset = decode_header(str_in)[0] # if charset: # value = value.decode(charset) # return value def fetch_mail_with_message_id_as_nem( self, message_id: str, headers_only: bool = False ) -> NehushtanEmailMessage: """ Since 0.4.8 """ fetch_method = self.FETCH_METHOD_RFC822 if headers_only: fetch_method = self.FETCH_METHOD_RFC822_HEADER rfc822 = self.fetch_mail_with_message_id(message_id, fetch_method) raw_mail_text: bytes = rfc822[0][1] return NehushtanEmailMessage.parse_bytes(raw_mail_text) def fetch_mail_with_uid_as_nem( self, uid: str, headers_only: bool = False ) -> NehushtanEmailMessage: """ Since 0.4.8 """ fetch_method = self.FETCH_METHOD_RFC822_WITH_UID if headers_only: fetch_method = self.FETCH_METHOD_RFC822_HEADER_WITH_UID rfc822 = self.fetch_mail_with_uid(uid, fetch_method) raw_mail_text: bytes = rfc822[0][1] return NehushtanEmailMessage.parse_bytes(raw_mail_text)
[ 11748, 545, 64, 489, 571, 198, 11748, 302, 198, 11748, 14601, 198, 6738, 19720, 1330, 40806, 540, 11, 7343, 198, 198, 6738, 497, 71, 1530, 38006, 13, 6404, 1362, 13, 8199, 71, 1530, 38006, 8979, 11187, 1362, 1330, 44470, 1530, 38006, ...
2.025405
2,283
"""Version file.""" VERSION = "0.0.38"
[ 37811, 14815, 2393, 526, 15931, 198, 43717, 796, 366, 15, 13, 15, 13, 2548, 1, 198 ]
2.4375
16
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import logging import unittest from collections import OrderedDict from mock import patch from pyhocon import ConfigFactory from typing import Any from cassandra.metadata import ColumnMetadata as CassandraColumnMetadata from databuilder.extractor.cassandra_extractor import CassandraExtractor from databuilder.models.table_metadata import TableMetadata, ColumnMetadata # patch whole class to avoid actually calling for boto3.client during tests @patch('cassandra.cluster.Cluster.connect', lambda x: None) if __name__ == '__main__': unittest.main()
[ 2, 15069, 25767, 669, 284, 262, 1703, 917, 6248, 1628, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 18931, 198, 11748, 555, 715, 395, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, ...
3.594444
180
import os import io import re import pytest from contextlib import redirect_stdout import numpy as np from sklearn.neighbors import KDTree from sklearn.neighbors import NearestNeighbors from sklearn.preprocessing import normalize import pickle import joblib import scipy from pynndescent import NNDescent, PyNNDescentTransformer @pytest.mark.skipif( list(map(int, scipy.version.version.split("."))) < [1, 3, 0], reason="requires scipy >= 1.3.0", ) @pytest.mark.skipif( list(map(int, scipy.version.version.split("."))) < [1, 3, 0], reason="requires scipy >= 1.3.0", ) # This tests a recursion error on cosine metric reported at: # https://github.com/lmcinnes/umap/issues/99 # graph_data used is a cut-down version of that provided by @scharron # It contains lots of all-zero vectors and some other duplicates # same as the previous two test, but this time using the PyNNDescentTransformer # interface @pytest.mark.parametrize("metric", ["euclidean", "cosine"]) @pytest.mark.parametrize("metric", ["euclidean", "cosine"]) @pytest.mark.parametrize("metric", ["euclidean", "cosine"]) @pytest.mark.parametrize("metric", ["manhattan"]) @pytest.mark.parametrize("n_trees", [1, 2, 3, 10]) @pytest.mark.parametrize("metric", ["euclidean", "cosine"]) @pytest.mark.parametrize( "metric", ["euclidean", "manhattan"] ) # cosine makes no sense for 1D @pytest.mark.parametrize("metric", ["euclidean", "cosine"])
[ 11748, 28686, 198, 11748, 33245, 198, 11748, 302, 198, 11748, 12972, 9288, 198, 6738, 4732, 8019, 1330, 18941, 62, 19282, 448, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 24544, 631, ...
2.675824
546
from django.test import SimpleTestCase from django.utils.deprecation import CallableFalse, CallableTrue
[ 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 6738, 42625, 14208, 13, 26791, 13, 10378, 8344, 341, 1330, 4889, 540, 25101, 11, 4889, 540, 17821, 628 ]
3.75
28
"""Parallelized, single-point launch script to run DSO on a set of benchmarks.""" import os import sys import time import multiprocessing from copy import deepcopy from datetime import datetime import click from dso import DeepSymbolicOptimizer from dso.logeval import LogEval from dso.config import load_config from dso.utils import safe_update_summary def train_dso(config): """Trains DSO and returns dict of reward, expression, and traversal""" print("\n== TRAINING SEED {} START ============".format(config["experiment"]["seed"])) # For some reason, for the control task, the environment needs to be instantiated # before creating the pool. Otherwise, gym.make() hangs during the pool initializer if config["task"]["task_type"] == "control" and config["training"]["n_cores_batch"] > 1: import gym import dso.task.control # Registers custom and third-party environments gym.make(config["task"]["env"]) # Train the model model = DeepSymbolicOptimizer(deepcopy(config)) start = time.time() result = model.train() result["t"] = time.time() - start result.pop("program") save_path = model.config_experiment["save_path"] summary_path = os.path.join(save_path, "summary.csv") print("== TRAINING SEED {} END ==============".format(config["experiment"]["seed"])) return result, summary_path @click.command() @click.argument('config_template', default="") @click.option('--runs', '--r', default=1, type=int, help="Number of independent runs with different seeds") @click.option('--n_cores_task', '--n', default=1, help="Number of cores to spread out across tasks") @click.option('--seed', '--s', default=None, type=int, help="Starting seed (overwrites seed in config), incremented for each independent run") @click.option('--benchmark', '--b', default=None, type=str, help="Name of benchmark") def main(config_template, runs, n_cores_task, seed, benchmark): """Runs DSO in parallel across multiple seeds using multiprocessing.""" messages = [] # Load the experiment config config_template = config_template if config_template != "" else None config = load_config(config_template) # Overwrite named benchmark (for tasks that support them) task_type = config["task"]["task_type"] if benchmark is not None: # For regression, --b overwrites config["task"]["dataset"] if task_type == "regression": config["task"]["dataset"] = benchmark # For control, --b overwrites config["task"]["env"] elif task_type == "control": config["task"]["env"] = benchmark else: raise ValueError("--b is not supported for task {}.".format(task_type)) # Overwrite config seed, if specified if seed is not None: if config["experiment"]["seed"] is not None: messages.append( "INFO: Replacing config seed {} with command-line seed {}.".format( config["experiment"]["seed"], seed)) config["experiment"]["seed"] = seed # Save starting seed and run command config["experiment"]["starting_seed"] = config["experiment"]["seed"] config["experiment"]["cmd"] = " ".join(sys.argv) # Set timestamp once to be used by all workers timestamp = datetime.now().strftime("%Y-%m-%d-%H%M%S") config["experiment"]["timestamp"] = timestamp # Fix incompatible configurations if n_cores_task == -1: n_cores_task = multiprocessing.cpu_count() if n_cores_task > runs: messages.append( "INFO: Setting 'n_cores_task' to {} because there are only {} runs.".format( runs, runs)) n_cores_task = runs if config["training"]["verbose"] and n_cores_task > 1: messages.append( "INFO: Setting 'verbose' to False for parallelized run.") config["training"]["verbose"] = False if config["training"]["n_cores_batch"] != 1 and n_cores_task > 1: messages.append( "INFO: Setting 'n_cores_batch' to 1 to avoid nested child processes.") config["training"]["n_cores_batch"] = 1 # Start training print_summary(config, runs, messages) # Generate configs (with incremented seeds) for each run configs = [deepcopy(config) for _ in range(runs)] for i, config in enumerate(configs): config["experiment"]["seed"] += i # Farm out the work if n_cores_task > 1: pool = multiprocessing.Pool(n_cores_task) for i, (result, summary_path) in enumerate(pool.imap_unordered(train_dso, configs)): if not safe_update_summary(summary_path, result): print("Warning: Could not update summary stats at {}".format(summary_path)) print("INFO: Completed run {} of {} in {:.0f} s".format(i + 1, runs, result["t"])) else: for i, config in enumerate(configs): result, summary_path = train_dso(config) if not safe_update_summary(summary_path, result): print("Warning: Could not update summary stats at {}".format(summary_path)) print("INFO: Completed run {} of {} in {:.0f} s".format(i + 1, runs, result["t"])) # Evaluate the log files print("\n== POST-PROCESS START =================") log = LogEval(config_path=os.path.dirname(summary_path)) log.analyze_log( show_count=config["postprocess"]["show_count"], show_hof=config["training"]["hof"] is not None and config["training"]["hof"] > 0, show_pf=config["training"]["save_pareto_front"], save_plots=config["postprocess"]["save_plots"]) print("== POST-PROCESS END ===================") if __name__ == "__main__": main()
[ 37811, 10044, 29363, 1143, 11, 2060, 12, 4122, 4219, 4226, 284, 1057, 360, 15821, 319, 257, 900, 286, 31747, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 18540, 305, 919, 278, 198, 6738, 4866, 1330...
2.656467
2,157
import cvxpy as cp import matplotlib.pyplot as matplt from utils import * from ddpg_alg_spinup import ddpg import tensorflow as tf from env_mra import ResourceEnv import numpy as np import time import pickle from parameters import * if __name__ == "__main__": with open("saved_alpha.pickle", "wb") as fileop: pickle.dump(alpha, fileop) with open("saved_weight.pickle", "wb") as fileop: pickle.dump(weight, fileop) ######################################################################################################################## ########################################## Main Training ############################################# ######################################################################################################################## start_time = time.time() utility = np.zeros(SliceNum) x = np.zeros([UENum, maxTime], dtype=np.float32) for i in range(SliceNum): ac_kwargs = dict(hidden_sizes=hidden_sizes, activation=tf.nn.relu, output_activation=tf.nn.sigmoid) logger_kwargs = dict(output_dir=str(RESNum)+'slice'+str(i), exp_name=str(RESNum)+'slice_exp'+str(i)) env = ResourceEnv(alpha=alpha[i], weight=weight[i], num_res=RESNum, num_user=UENum, max_time=maxTime, min_reward=minReward, rho=rho, test_env=False) utility[i], _ = ddpg(env=env, ac_kwargs=ac_kwargs, steps_per_epoch=steps_per_epoch, epochs=epochs, pi_lr=pi_lr, q_lr=q_lr, start_steps=start_steps, batch_size=batch_size, seed=seed, replay_size=replay_size, max_ep_len=maxTime, logger_kwargs=logger_kwargs, fresh_learn_idx=True) print('slice' + str(i) + 'training completed.') end_time = time.time() print('Training Time is ' + str(end_time - start_time)) ##################################### result ploting ############################################### with open("saved_alpha.pickle", "rb") as fileop: load_alpha = pickle.load(fileop) with open("saved_weight.pickle", "rb") as fileop: load_weight = pickle.load(fileop) #print(weight) #matplt.subplot(2, 1, 1) #matplt.plot(sum_utility) #matplt.subplot(2, 1, 2) #matplt.plot(sum_x) matplt.show() print('done')
[ 11748, 269, 85, 87, 9078, 355, 31396, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 2603, 489, 83, 198, 6738, 3384, 4487, 1330, 1635, 198, 6738, 49427, 6024, 62, 14016, 62, 39706, 929, 1330, 49427, 6024, 198, 11748, 11192, 273, ...
2.325234
1,070
import numpy as np import neat.parallel
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 15049, 13, 1845, 29363, 628 ]
3.230769
13
import httpx
[ 11748, 2638, 87, 628 ]
3.5
4
from YTPlaylistRanking.YTPlaylistRanking import SortType, main import argparse if __name__ == "__main__": parser = argparse.ArgumentParser( description=("Gets statistics about videos in a YouTube playlist using the playlist's id to write to a file" " the list of videos in ascending order according to a certain criteria (ex view count)." "\nWarning: the output file is overwritten with each run!!"), epilog="https://github.com/TheDigitalPhoenixX/YTPlaylistRanking" ) parser.add_argument("id", help="Playlist ID") parser.add_argument("-d", "--debug", help="write intermediate api responses to files(default: %(default)s)", action="store_true") parser.add_argument("-vc", "--viewCount", dest="sortTypes", help="Sort according to ViewCount(default)", action="append_const", const=SortType.ViewCount) parser.add_argument("-lc", "--likeCount", dest="sortTypes", help="Sort according to Like Count", action="append_const", const=SortType.LikeCount) parser.add_argument("-dlc", "--dislikeCount", dest="sortTypes", help="Sort according to Dislike Count", action="append_const", const=SortType.DislikeCount) parser.add_argument("-ltvc", "--likeToViewCount", dest="sortTypes", help="Sort according to LikeToViewCount", action="append_const", const=SortType.LikeToViewCount) parser.add_argument("-ltdlc", "--likeToDislikeCount", dest="sortTypes", help="Sort according to LikeToDislikeCount", action="append_const", const=SortType.LikeToDislikeCount) parser.add_argument("-r", "--reverse", help="reverse the order of the list(default: %(default)s)", action="store_true") parser.add_argument("-rn", "--removeNumbering", help="remove numbering(default: %(default)s)", action="store_true") args = parser.parse_args() main(args.id, args.debug, args.sortTypes if args.sortTypes != None else [SortType.ViewCount], not args.reverse, args.removeNumbering)
[ 6738, 575, 51, 11002, 4868, 49, 15230, 13, 56, 51, 11002, 4868, 49, 15230, 1330, 33947, 6030, 11, 1388, 201, 198, 11748, 1822, 29572, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 2...
2.23546
1,066
# Bot token goes here BOT_TOKEN = '' # Manually specify Tesseract path TESSERACT_PATH = ''
[ 2, 18579, 11241, 2925, 994, 198, 33, 2394, 62, 10468, 43959, 796, 10148, 198, 198, 2, 1869, 935, 11986, 39412, 263, 529, 3108, 198, 51, 7597, 1137, 10659, 62, 34219, 796, 10148, 198 ]
2.787879
33
#!/usr/bin/env python import time from netmiko import ConnectHandler, redispatch net_connect = ConnectHandler( device_type='terminal_server', ip='10.10.10.10', username='admin', password='admin123', secret='secret123') # Manually handle interaction in the Terminal Server (fictional example, but # hopefully you see the pattern) net_connect.write_channel("\r\n") time.sleep(1) net_connect.write_channel("\r\n") time.sleep(1) output = net_connect.read_channel() # Should hopefully see the terminal server prompt print(output) # Login to end device from terminal server net_connect.write_channel("connect 1\r\n") time.sleep(1) # Manually handle the Username and Password max_loops = 10 i = 1 while i <= max_loops: output = net_connect.read_channel() if 'Username' in output: net_connect.write_channel(net_connect.username + '\r\n') time.sleep(1) output = net_connect.read_channel() # Search for password pattern / send password if 'Password' in output: net_connect.write_channel(net_connect.password + '\r\n') time.sleep(.5) output = net_connect.read_channel() # Did we successfully login if '>' in output or '#' in output: break net_connect.write_channel('\r\n') time.sleep(.5) i += 1 # We are now logged into the end device # Dynamically reset the class back to the proper Netmiko class redispatch(net_connect, device_type='cisco_ios') # Now just do your normal Netmiko operations new_output = net_connect.send_command("show ip int brief")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 640, 198, 6738, 2010, 76, 12125, 1330, 8113, 25060, 11, 2266, 8802, 963, 198, 198, 3262, 62, 8443, 796, 8113, 25060, 7, 198, 220, 220, 220, 3335, 62, 4906, 11639, 23705, 282, ...
2.750871
574
import numpy as np from scipy.stats import norm from .mixed_optimiser import MVO from scipy.optimize import shgo, differential_evolution, dual_annealing import scipy as stats class MVMOO(MVO): """ Multi variate mixed variable optimisation """ def __init__(self, input_dim=1, num_qual=0, num_obj=2, bounds=None, k_type='matern3', dist='manhattan', scale='bounds'): """ Initialisation of the class """ super().__init__(input_dim=input_dim, num_qual=num_qual, bounds=bounds, dist=dist, k_type=k_type) self.num_obj = num_obj self.scale = scale def generatemodels(self, X, Y, scale=True, variance=1.0): """ Generate a list containing the models for each of the objectives """ self.nsamples, nobj = np.shape(Y) models = [] if scale is True: self.Yscaled = self.scaley(Y) self.Xscaled = self.scaleX(X,mode=self.scale) for i in range(nobj): self.fitmodel(self.Xscaled, self.Yscaled[:,i].reshape((-1,1)), variance=variance) models.append(self.model) return models for i in range(nobj): self.fitmodel(X, Y[:,i].reshape((-1,1))) models.append(self.model) return models def is_pareto_efficient(self, costs, return_mask = True): """ Find the pareto-efficient points for minimisation problem :param costs: An (n_points, n_costs) array :param return_mask: True to return a mask :return: An array of indices of pareto-efficient points. If return_mask is True, this will be an (n_points, ) boolean array Otherwise it will be a (n_efficient_points, ) integer array of indices. """ is_efficient = np.arange(costs.shape[0]) n_points = costs.shape[0] next_point_index = 0 # Next index in the is_efficient array to search for while next_point_index<len(costs): nondominated_point_mask = np.any(costs<costs[next_point_index], axis=1) nondominated_point_mask[next_point_index] = True is_efficient = is_efficient[nondominated_point_mask] # Remove dominated points costs = costs[nondominated_point_mask] next_point_index = np.sum(nondominated_point_mask[:next_point_index])+1 if return_mask: is_efficient_mask = np.zeros(n_points, dtype = bool) is_efficient_mask[is_efficient] = True return is_efficient_mask else: return is_efficient def paretofront(self, Y): """ Return an array of the pareto front for the system, set up for a minimising """ ind = self.is_pareto_efficient(Y, return_mask=False) return Y[ind,:] def EIM(self, X, mode='euclidean'): """ Calculate the expected improvment matrix for a candidate point @ARTICLE{7908974, author={D. {Zhan} and Y. {Cheng} and J. {Liu}}, journal={IEEE Transactions on Evolutionary Computation}, title={Expected Improvement Matrix-Based Infill Criteria for Expensive Multiobjective Optimization}, year={2017}, volume={21}, number={6}, pages={956-975}, doi={10.1109/TEVC.2017.2697503}, ISSN={1089-778X}, month={Dec}} """ f = self.currentfront nfx = np.shape(f)[0] nobj = np.shape(f)[1] nx = np.shape(X)[0] r = 1.1 * np.ones((1, nobj)) y = np.zeros((nx, 1)) ulist = [] varlist = [] X = self.scaleX(X, mode='bounds') for iobj in range(nobj): u, var = self.models[iobj].predict_y(X) ulist.append(u) varlist.append(var) u = np.concatenate(ulist, axis=1) var = np.concatenate(varlist, axis=1) std = np.sqrt(np.maximum(0,var)) u_matrix = np.reshape(u.T,(1,nobj,nx)) * np.ones((nfx,1,1)) s_matrix = np.reshape(std.T,(1,nobj,nx)) * np.ones((nfx,1,1)) f_matrix = f.reshape((nfx,nobj,1)) * np.ones((1,1,nx)) Z_matrix = (f_matrix - u_matrix) / s_matrix EI_matrix = np.multiply((f_matrix - u_matrix), norm.cdf(Z_matrix)) + np.multiply(s_matrix, norm.pdf(Z_matrix)) if mode == 'euclidean': y = np.min(np.sqrt(np.sum(EI_matrix**2,axis=1)),axis=0).reshape(-1,1) elif mode == 'hypervolume': y = np.min(np.prod(r.reshape(1,2,1) - f_matrix + EI_matrix, axis=1) - np.prod(r - f, axis=1).reshape((-1,1)),axis=0).reshape((-1,1)) elif mode == 'maxmin': y = np.min(np.max(EI_matrix,axis=1),axis=0).reshape(-1,1) elif mode == 'combine': y = np.min(np.sqrt(np.sum(EI_matrix**2,axis=1)),axis=0).reshape(-1,1) +\ np.min(np.prod(r.reshape(1,2,1) - f_matrix + EI_matrix, axis=1) - \ np.prod(r - f, axis=1).reshape((-1,1)),axis=0).reshape((-1,1)) else: y1 = np.min(np.sqrt(np.sum(EI_matrix**2,axis=1)),axis=0).reshape(-1,1) y2 = np.min(np.prod(r.reshape(1,2,1) - f_matrix + EI_matrix, axis=1) - np.prod(r - f, axis=1).reshape((-1,1)),axis=0).reshape((-1,1)) #y3 = np.min(np.max(EI_matrix,axis=1),axis=0).reshape(-1,1) return np.hstack((y1,y2)) return y def CEIM_Hypervolume(self, X): """ Calculate the expected improvment matrix for a candidate point, given constraints @ARTICLE{7908974, author={D. {Zhan} and Y. {Cheng} and J. {Liu}}, journal={IEEE Transactions on Evolutionary Computation}, title={Expected Improvement Matrix-Based Infill Criteria for Expensive Multiobjective Optimization}, year={2017}, volume={21}, number={6}, pages={956-975}, doi={10.1109/TEVC.2017.2697503}, ISSN={1089-778X}, month={Dec}} """ f = self.currentfront nobj = np.shape(f)[1] nx = np.shape(X)[0] r = 1.1 * np.ones((1, nobj)) y = np.zeros((nx, 1)) ulist = [] varlist = [] for iobj in range(nobj): u, var = self.models[iobj].predict_y(X) ulist.append(u) varlist.append(var) u = np.concatenate(ulist, axis=1) var = np.concatenate(varlist, axis=1) std = np.sqrt(np.maximum(0,var)) for ix in range(nx): Z = (f - u[ix,:]) / std[ix,:] EIM = np.multiply((f - u[ix,:]), norm.cdf(Z)) + np.multiply(std[ix,:], norm.pdf(Z)) y[ix] = np.min(np.prod(r - f + EIM, axis=1) - np.prod(r - f, axis=1)) # Constraints ncon = len(self.constrainedmodels) uconlist = [] varconlist = [] for iobj in range(ncon): ucon, varcon = self.constrainedmodels[iobj].predict_y(X) uconlist.append(ucon) varconlist.append(varcon) ucon = np.concatenate(uconlist, axis=1) varcon = np.concatenate(varconlist, axis=1) stdcon = np.sqrt(np.maximum(0,varcon)) PoF = np.prod(norm.cdf((0 - ucon) / stdcon), axis=1).reshape(-1,1) return y * PoF def AEIM_Hypervolume(self, X): """ Calculate the adaptive expected improvment matrix for a candidate point Adaptive addition based on https://arxiv.org/pdf/1807.01279.pdf """ f = self.currentfront c = self.contextual nfx = np.shape(f)[0] nobj = np.shape(f)[1] nx = np.shape(X)[0] r = 1.1 * np.ones((1, nobj)) y = np.zeros((nx, 1)) ulist = [] varlist = [] for iobj in range(nobj): u, var = self.models[iobj].predict_y(X) ulist.append(u) varlist.append(var) u = np.concatenate(ulist, axis=1) var = np.concatenate(varlist, axis=1) std = np.sqrt(np.maximum(0,var)) u_matrix = np.reshape(u.T,(1,nobj,nx)) * np.ones((nfx,1,1)) s_matrix = np.reshape(std.T,(1,nobj,nx)) * np.ones((nfx,1,1)) f_matrix = f.reshape((nfx,nobj,1)) * np.ones((1,1,nx)) c_matrix = c.reshape((nfx,nobj,1)) * np.ones((1,1,nx)) Z_matrix = (f_matrix - u_matrix - c_matrix) / s_matrix EI_matrix = np.multiply((f_matrix - u_matrix), norm.cdf(Z_matrix)) + np.multiply(s_matrix, norm.pdf(Z_matrix)) y = np.min(np.prod(r.reshape(1,2,1) - f_matrix + EI_matrix, axis=1) - np.prod(r - f, axis=1).reshape((-1,1)),axis=0).reshape((-1,1)) #for ix in range(nx): # Z = (f - u[ix,:] - c) / std[ix,:] # EIM = np.multiply((f - u[ix,:]), norm.cdf(Z)) + np.multiply(std[ix,:], norm.pdf(Z)) # y[ix] = np.min(np.prod(r - f + EIM, axis=1) - np.prod(r - f, axis=1)) return y def AEIM_Euclidean(self, X): """ Calculate the expected improvment matrix for a candidate point @ARTICLE{7908974, author={D. {Zhan} and Y. {Cheng} and J. {Liu}}, journal={IEEE Transactions on Evolutionary Computation}, title={Expected Improvement Matrix-Based Infill Criteria for Expensive Multiobjective Optimization}, year={2017}, volume={21}, number={6}, pages={956-975}, doi={10.1109/TEVC.2017.2697503}, ISSN={1089-778X}, month={Dec}} """ f = self.currentfront c = self.contextual nfx = np.shape(f)[0] nobj = np.shape(f)[1] nx = np.shape(X)[0] y = np.zeros((nx, 1)) ulist = [] varlist = [] X = self.scaleX(X, mode='bounds') for iobj in range(nobj): u, var = self.models[iobj].predict_f(X) ulist.append(u) varlist.append(var) u = np.concatenate(ulist, axis=1) var = np.concatenate(varlist, axis=1) std = np.sqrt(np.maximum(0,var)) u_matrix = np.reshape(u.T,(1,nobj,nx)) * np.ones((nfx,1,1)) s_matrix = np.reshape(std.T,(1,nobj,nx)) * np.ones((nfx,1,1)) f_matrix = f.reshape((nfx,nobj,1)) * np.ones((1,1,nx)) c_matrix = c.reshape((nfx,nobj,1)) * np.ones((1,1,nx)) Z_matrix = (f_matrix - u_matrix - c_matrix) / s_matrix EI_matrix = np.multiply((f_matrix - u_matrix), norm.cdf(Z_matrix)) + np.multiply(s_matrix, norm.pdf(Z_matrix)) y = np.min(np.sqrt(np.sum(EI_matrix**2,axis=1)),axis=0).reshape(-1,1) return y def EIMmixedoptimiser(self, constraints, algorithm='Random Local', values=None, mode='euclidean'): """ Optimise EI search whole domain """ if algorithm == 'Random': Xsamples = self.sample_design(samples=10000, design='halton') if constraints is False: fvals = self.EIM(Xsamples, mode=mode) else: fvals = self.CEIM_Hypervolume(Xsamples) fmax = np.amax(fvals) indymax = np.argmax(fvals) xmax = Xsamples[indymax,:] if values is None: return fmax, xmax return fmax, xmax, fvals, Xsamples elif algorithm == 'Random Local': Xsamples = self.sample_design(samples=10000, design='halton') if constraints is False: fvals = self.EIM(Xsamples, mode=mode) else: fvals = self.CEIM_Hypervolume(Xsamples) if mode == 'all': fmax = np.max(fvals,axis=0) print(fvals.shape) print(fmax.shape) indmax = np.argmax(fvals,axis=0) print(indmax) xmax = Xsamples[indmax,:] qual = xmax[:,-self.num_qual:].reshape(-1) bnd = list(self.bounds[:,:self.num_quant].T) bndlist = [] for element in bnd: bndlist.append(tuple(element)) modes = ['euclidean', 'hypervolume'] results = [] for i in range(2): results.append(stats.optimize.minimize(self.EIMoptimiserWrapper, xmax[i,:-self.num_qual].reshape(-1), args=(qual[i],constraints,modes[i]), bounds=bndlist,method='SLSQP')) xmax = np.concatenate((results[0].x, qual[0]),axis=None) xmax = np.vstack((xmax,np.concatenate((results[1].x, qual[1]),axis=None))) fmax = np.array((results[0].fun,results[1].fun)) return fmax, xmax fmax = np.amax(fvals) indymax = np.argmax(fvals) xmax = Xsamples[indymax,:] qual = xmax[-self.num_qual:] bnd = list(self.bounds[:,:self.num_quant].T) bndlist = [] for element in bnd: bndlist.append(tuple(element)) result = stats.optimize.minimize(self.EIMoptimiserWrapper, xmax[:-self.num_qual].reshape(-1), args=(qual,constraints,mode), bounds=bndlist,method='SLSQP') if values is None: return result.fun, np.concatenate((result.x, qual),axis=None) return fmax, xmax, fvals, Xsamples else: raise NotImplementedError() def multinextcondition(self, X, Y, constraints=False, values=None, method='EIM', mode='euclidean'): """ Suggest the next condition for evaluation """ if constraints is False: try: self.k_type = 'matern3' self.models = self.generatemodels(X, Y) except: print('Initial model optimisation failed, retrying with new kernel') try: self.k_type = 'matern5' self.models = self.generatemodels(X, Y) except: print('Model optimisation failed, retrying with new value of variance') for variance in [0.1,1,2,10]: try: self.models = self.generatemodels(X, Y, variance=variance) except: print('Model optimisation failed, retrying with new value of variance') self.currentfront = self.paretofront(self.Yscaled) means = [] for model in self.models: mean, _ = model.predict_y(self.sample_design(samples=2, design='halton')) means.append(mean.numpy()) if np.any(means == np.nan): print("Retraining model with new starting variance") self.models = self.generatemodels(X, Y, variance=0.1) if method == 'AEIM': fmax, xmax = self.AEIMmixedoptimiser(constraints, algorithm='Random Local') else: fmax, xmax = self.EIMmixedoptimiser(constraints, algorithm='Random Local',mode=mode) if values is None and mode != 'all': return xmax.reshape(1,-1), fmax elif values is None and mode == 'all': if np.allclose(xmax[0,:],xmax[1,:], rtol=1e-3, atol=1e-5): return xmax[0,:].reshape(1,-1), fmax[0] return np.unique(xmax.round(6),axis=0), fmax self.models = self.generatemodels(X,Y) self.currentfront = self.paretofront(self.Yscaled) self.constrainedmodels = self.generatemodels(X, constraints, scale=False) fmax, xmax = self.EIMmixedoptimiser(constraints, algorithm='Simplical') if values is None: return xmax.reshape(1,-1), fmax
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2593, 198, 6738, 764, 76, 2966, 62, 40085, 5847, 1330, 337, 29516, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 427, 2188, 11, 22577, 62, 1990, 2122, 11, 10...
1.872631
8,495
number_of_dragons = int(input()) dragons_dict = {} for index in range(number_of_dragons): data = input().split() type = data[0] name = data[1] damage = data[2] health = data[3] armor = data[4] if damage == 'null': damage = 45 damage = int(damage) if health == 'null': health = 250 health = int(health) if armor == 'null': armor = 10 armor = int(armor) if type not in dragons_dict: dragons_dict[type] = {} dragons_dict[type][name] = {'damage': damage, 'health': health, 'armor': armor} elif type in dragons_dict and name in dragons_dict[type]: dragons_dict[type][name]['damage'] = damage dragons_dict[type][name]['health'] = health dragons_dict[type][name]['armor'] = armor elif type in dragons_dict and name not in dragons_dict[type]: dragons_dict[type][name] = {'damage': damage, 'health': health, 'armor': armor} # but dragons are sorted alphabetically by their name # average damage, health, and armor of the dragons for type, value in dragons_dict.items(): total_damage = 0 total_health = 0 total_armor = 0 sorted_dragons = dict(sorted(value.items(), key=lambda kvp: kvp[0])) for name, values in sorted_dragons.items(): total_damage += values['damage'] total_health += values['health'] total_armor += values['armor'] average_damage = total_damage / len(value) average_health = total_health / len(value) average_armor = total_armor / len(value) print(f"{type}::({average_damage:.2f}/{average_health:.2f}/{average_armor:.2f})") for name, values in sorted_dragons.items(): print(f"-{name} -> damage: {values['damage']}, health: {values['health']}, armor: {values['armor']}")
[ 17618, 62, 1659, 62, 7109, 34765, 796, 493, 7, 15414, 28955, 198, 7109, 34765, 62, 11600, 796, 23884, 198, 1640, 6376, 287, 2837, 7, 17618, 62, 1659, 62, 7109, 34765, 2599, 198, 220, 220, 220, 1366, 796, 5128, 22446, 35312, 3419, 198,...
2.59708
685
# Copyright (c) Andrey Sobolev, 2020. Distributed under MIT license, see LICENSE file. import os from jinja2 import Environment, FileSystemLoader
[ 2, 220, 220, 15069, 357, 66, 8, 220, 843, 4364, 36884, 2305, 85, 11, 12131, 13, 4307, 6169, 739, 17168, 5964, 11, 766, 38559, 24290, 2393, 13, 198, 198, 11748, 28686, 198, 6738, 474, 259, 6592, 17, 1330, 9344, 11, 9220, 11964, 17401...
3.431818
44
import json import os import sys from src.gitHubApiRequest import performRequest from src.utils import createFolderIfDoesntExist if __name__ == '__main__': try: sys.argv[1] except IndexError: print('pass your github token as parameter (' 'https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line)') exit(1) # devList = ['rafaelfranca', 'eileencodes', 'lifo'] path = '{}\\{}'.format(os.path.dirname(os.path.abspath(__file__)), 'data') createFolderIfDoesntExist(path) devsByRepositorysLanguage(['JavaScript', 'Ruby', 'c'], 500, 5) f = open('data/ProjWithUser.json', ) data = json.load(f) for lang in data: print(lang) numberContByLang = 0 qtdCount = 0 for repositories in data[lang]: numberContByRep = 0 for rep in repositories: print('--', rep) for dev in repositories[rep]: numberContByRep += dev['contributions'] # print('----', dev['contributions']) # print('\n\n') print(numberContByRep) print('\n\n') numberContByLang += numberContByRep print(numberContByLang)
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 12351, 13, 18300, 16066, 32, 14415, 18453, 1330, 1620, 18453, 198, 6738, 12351, 13, 26791, 1330, 2251, 41092, 1532, 13921, 429, 3109, 396, 628, 628, 198, 361, 11593, 3672...
2.10802
611
from django import template from django.template.base import FilterExpression from django.template.loader import get_template from django.conf import settings from ..exceptions import SiteMessageConfigurationError register = template.Library() @register.tag def detect_clause(parser, clause_name, tokens): """Helper function detects a certain clause in tag tokens list. Returns its value. """ if clause_name in tokens: t_index = tokens.index(clause_name) clause_value = parser.compile_filter(tokens[t_index + 1]) del tokens[t_index:t_index + 2] else: clause_value = None return clause_value
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 28243, 13, 8692, 1330, 25853, 16870, 2234, 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 1330, 651, 62, 28243, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, ...
3.009174
218
# -*- coding: utf-8 -*- """ Defines loader objects that parse config files and return functions that provide inputs to TensorFlow Estimator objects. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __all__ = ["ContinuousSequenceBatchLoader", "DiscreteSequenceBatchLoader", "IndependentBatchLoader"] import json import tensorflow as tf from os import path, walk from nnetmaker.loader.parsers import * from nnetmaker.loader.processors import * from nnetmaker.loader.secondaries import * from nnetmaker.util import * _PARSERS = {"raw": RawParser, "int": Int64Parser, "float": FloatParser, "string": StringParser} _SECONDARIES = {"ones": OnesFeature} _PROCESSORS = {"slice": SliceProcessor, "onehot": OneHotProcessor, "reshape": ReshapeProcessor} _EPSILON = float(1e-8) def _parse_and_validate_manifest(manifest_filename): """Reads parameters from the specified __manifest__.json file, validates the entries, and returns a dictionary of record parser objects for each feature.""" # Strip comments while keeping line numbers. s = "" with open(manifest_filename, "r") as f_in: for line in f_in: comment_pos = line.find("//") s += line[:comment_pos] + "\n" manifest = json.loads(s) manifest_val = ArgumentsValidator(manifest, "Dataset manifest") with manifest_val: compression_type = manifest_val.get("compression", [ATYPE_NONE, ATYPE_STRING], True) if compression_type is not None: compression_type = compression_type.upper() if compression_type not in ["ZLIB", "GZIP"]: raise ValueError("Unsupported compression type: %s" % compression_type) allow_var_len = manifest_val.get("allow_var_len", ATYPE_BOOL, True) features_list = manifest_val.get("features", ATYPE_DICTS_LIST, True) # Validate each feature and create parser objects. feat_parsers = {} feat_shapes = {} feat_dtypes = {} for feat in features_list: feat_val = ArgumentsValidator(feat, "Dataset feature") with feat_val: name = feat_val.get("name", ATYPE_STRING, True) dtype = tf.as_dtype(feat_val.get("dtype", ATYPE_STRING, True)) shape = feat_val.get("shape", ATYPE_INTS_LIST, True) deserialize_type = feat_val.get("deserialize_type", ATYPE_STRING, True) deserialize_args = feat_val.get("deserialize_args", ATYPE_DICT, False, default={}) var_len = feat_val.get("var_len", ATYPE_BOOL, allow_var_len, default=False) if var_len and not allow_var_len: raise ValueError("Variable length features not allowed for this dataset.") try: shape = [int(x) for x in list(shape)] except: raise ValueError("Invalid shape for feature `%s`: %s" % (name, shape)) try: feat_parsers[name] = _PARSERS[deserialize_type](shape, dtype, deserialize_args, var_len) except KeyError: raise ValueError("Unsupported deserialization type: %s" % deserialize_type) if var_len: feat_shapes[name] = [-1] + shape else: feat_shapes[name] = shape feat_dtypes[name] = dtype return compression_type, allow_var_len, feat_parsers, feat_shapes, feat_dtypes def _parse_dataset_dict(dataset_dict): """Parses the dataset dictionary and loads the list of filenames, parsers, and manifest info.""" dataset_val = ArgumentsValidator(dataset_dict, "Dataset loader") with dataset_val: dataset_type = dataset_val.get("type", ATYPE_STRING, True) dataset_args = dataset_val.get("args", ATYPE_DICT, True) if dataset_type == "dir": # Recursively get all TFRecords files from the specified data dir into a sorted list. dataset_val = ArgumentsValidator(dataset_args, "Dataset dir loader") with dataset_val: data_dir = path.realpath(dataset_val.get("data_dir", ATYPE_STRING, True)) manifest_filename = path.join(data_dir, "__manifest__.json") all_filenames = [] for root_dir, _, filenames in walk(data_dir): for f in filenames: if f.lower().endswith(".tfrecords"): all_filenames.append(path.join(root_dir, f)) all_filenames = list(sorted(all_filenames)) if len(all_filenames) == 0: raise ValueError("No .tfrecords files found in %s" % data_dir) elif dataset_type == "list": # Use the user-specified file that explicitly lists data source locations. dataset_val = ArgumentsValidator(dataset_args, "Dataset list loader") with dataset_val: list_filename = path.realpath(dataset_val.get("list_file", ATYPE_STRING, True)) manifest_filename = path.realpath(dataset_val.get("manifest_file", ATYPE_STRING, True)) with open(list_filename) as f_in: all_filenames = [line.strip() for line in f_in if len(line.strip()) > 0] if len(all_filenames) == 0: raise ValueError("No filenames found in %s" % list_filename) else: raise ValueError("Unsupported datatype type: %s" % dataset_type) return tuple([all_filenames] + list(_parse_and_validate_manifest(manifest_filename))) class BaseLoader(object): """Base class for data loader objects.""" @property def target_batch_size(self): """The target batch size of the loader.""" return self._target_batch_size class IndependentBatchLoader(BaseLoader): """A loader for iterating over batches of independent examples stored as TFRecord files in the specified data directory.""" class ContinuousSequenceBatchLoader(BaseLoader): """A loader for iterating over batches of subsequences selected from large continuous sequences of data. Each ``TFRecord`` file stores a sequence of contiguous data chunks that together comprise a sequence containing no boundaries within. Each file is considered an independent source, and batch subsequences are selected by concatenating all chunks along the first dimension then selecting windows of the concatenated data. All features for each chunk must have the same length along the first dimension.""" class DiscreteSequenceBatchLoader(BaseLoader): """A loader for iterating over batches of subsequences selected from large discrete sequences of data. Each TFRecord file stores a sequence of contiguous subsequences that each represent a single unit and together comprise a longer sequence. Each file is considered an independent source, and batch subsequences are selected by concatenating all unit subsequences along the first dimension then selecting a number of contiguous units, aligned at unit subsequence boundaries. Unit subsequence features may have different lengths along the first dimension.""" pass
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7469, 1127, 40213, 5563, 326, 21136, 4566, 3696, 290, 1441, 5499, 326, 2148, 198, 15414, 82, 284, 309, 22854, 37535, 10062, 320, 1352, 5563, 13, 198, 37811, ...
2.913495
2,312
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. """Configurable VTA Hareware Environment scope.""" # pylint: disable=invalid-name, exec-used from __future__ import absolute_import as _abs import os import json import copy import tvm from tvm import te from . import intrin def get_vta_hw_path(): """Get the VTA HW path.""" curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) vta_hw_default = os.path.abspath(os.path.join(curr_path, "../../../3rdparty/vta-hw")) VTA_HW_PATH = os.getenv('VTA_HW_PATH', vta_hw_default) return os.path.abspath(VTA_HW_PATH) def pkg_config(cfg): """Returns PkgConfig pkg config object.""" pkg_config_py = os.path.join(get_vta_hw_path(), "config/pkg_config.py") libpkg = {"__file__": pkg_config_py} exec(compile(open(pkg_config_py, "rb").read(), pkg_config_py, "exec"), libpkg, libpkg) PkgConfig = libpkg["PkgConfig"] return PkgConfig(cfg) class DevContext(object): """Internal development context This contains all the non-user facing compiler internal context that is hold by the Environment. Parameters ---------- env : Environment The environment hosting the DevContext Note ---- This class is introduced so we have a clear separation of developer related, and user facing attributes. """ # Memory id for DMA MEM_ID_UOP = 0 MEM_ID_WGT = 1 MEM_ID_INP = 2 MEM_ID_ACC = 3 MEM_ID_OUT = 4 # VTA ALU Opcodes ALU_OPCODE_MIN = 0 ALU_OPCODE_MAX = 1 ALU_OPCODE_ADD = 2 ALU_OPCODE_SHR = 3 # Task queue id (pipeline stage) QID_LOAD_INP = 1 QID_LOAD_WGT = 1 QID_LOAD_OUT = 2 QID_STORE_OUT = 3 QID_COMPUTE = 2 def get_task_qid(self, qid): """Get transformed queue index.""" return 1 if self.DEBUG_NO_SYNC else qid class Environment(object): """Hardware configuration object. This object contains all the information needed for compiling to a specific VTA backend. Parameters ---------- cfg : dict of str to value. The configuration parameters. Example -------- .. code-block:: python # the following code reconfigures the environment # temporarily to attributes specified in new_cfg.json new_cfg = json.load(json.load(open("new_cfg.json"))) with vta.Environment(new_cfg): # env works on the new environment env = vta.get_env() """ current = None # constants MAX_XFER = 1 << 22 # debug flags DEBUG_DUMP_INSN = (1 << 1) DEBUG_DUMP_UOP = (1 << 2) DEBUG_SKIP_READ_BARRIER = (1 << 3) DEBUG_SKIP_WRITE_BARRIER = (1 << 4) # memory scopes inp_scope = "local.inp_buffer" wgt_scope = "local.wgt_buffer" acc_scope = "local.acc_buffer" # initialization function @property @property def dev(self): """Developer context""" if self._dev_ctx is None: self._dev_ctx = DevContext(self) return self._dev_ctx @property def mock(self): """A mock version of the Environment The ALU, dma_copy and intrinsics will be mocked to be nop. """ if self.mock_mode: return self if self._mock_env is None: self._mock_env = copy.copy(self) self._mock_env._dev_ctx = None self._mock_env.mock_mode = True return self._mock_env @property def dma_copy(self): """DMA copy pragma""" return ("dma_copy" if not self.mock_mode else "skip_dma_copy") @property def alu(self): """ALU pragma""" return ("alu" if not self.mock_mode else "skip_alu") @property def gemm(self): """GEMM intrinsic""" return self.dev.gemm @property @property def target_host(self): """The target host""" if self.TARGET in ["pynq", "de10nano", "zc706"]: return "llvm -target=armv7-none-linux-gnueabihf" if self.TARGET == "ultra96": return "llvm -target=aarch64-linux-gnu" if self.TARGET in ["sim", "tsim"]: return "llvm" raise ValueError("Unknown target %s" % self.TARGET) @property def get_env(): """Get the current VTA Environment. Returns ------- env : Environment The current environment. """ return Environment.current # The memory information for the compiler @tvm.register_func("tvm.info.mem.%s" % Environment.inp_scope) @tvm.register_func("tvm.info.mem.%s" % Environment.wgt_scope) @tvm.register_func("tvm.info.mem.%s" % Environment.acc_scope) # TVM related registration @tvm.register_func("tvm.intrin.rule.default.vta.coproc_sync") @tvm.register_func("tvm.intrin.rule.default.vta.coproc_dep_push") @tvm.register_func("tvm.intrin.rule.default.vta.coproc_dep_pop") def _init_env(): """Initialize the default global env""" config_path = os.path.join(get_vta_hw_path(), "config/vta_config.json") if not os.path.exists(config_path): raise RuntimeError("Cannot find config in %s" % str(config_path)) cfg = json.load(open(config_path)) return Environment(cfg) Environment.current = _init_env()
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.45551
2,450
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path import sys try: import apiai except ImportError: sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir) ) import apiai CLIENT_ACCESS_TOKEN = '73a62055c012487b9312db1d7ac7de61'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 2471, 544, 72, 198, 16...
2.091549
142
#!/usr/bin/env python import codecs import cStringIO import unittest from chirp.library import bulk_tagging_form TEST_FORM_1 = """ 00123--------- A Perfect Circle a7314af4 [ 1 ] 192 12 Mer de Noms e2ebb0f2 [ 1 ] 128 12 Mer de Noms 55d1c5a4 [ ] 192 12 Thirteenth Step A line to skip 1234abcd [ x ] 192 10 To Be Deleted abcd1234 [ ? ] 222 7 What You Talkin' About Willis? 00665--------- Audioslave 00085fb1 [ 1 ] 128 14 Audioslave 660414cd [ 1 ] 192 14 Audioslave 52c55fc7 [ ] 228 12 Out of Exile 11111111 [ 2 ] 228 13 TALB 22222222 [ 2 ] 228 13 MISMATCH """ EXPECTED_RESULTS_1 = { "a7314af4": (bulk_tagging_form.VERIFIED, "A Perfect Circle", "Mer de Noms"), "e2ebb0f2": (bulk_tagging_form.DUPLICATE, "A Perfect Circle", "Mer de Noms"), "55d1c5a4": (bulk_tagging_form.VERIFIED, "A Perfect Circle", "Thirteenth Step"), "1234abcd": (bulk_tagging_form.DELETE, "A Perfect Circle", "To Be Deleted"), "abcd1234": (bulk_tagging_form.QUESTION, "A Perfect Circle", "What You Talkin' About Willis?"), "00085fb1": (bulk_tagging_form.DUPLICATE, "Audioslave", "Audioslave"), "660414cd": (bulk_tagging_form.VERIFIED, "Audioslave", "Audioslave"), "52c55fc7": (bulk_tagging_form.VERIFIED, "Audioslave", "Out of Exile"), "11111111": (bulk_tagging_form.TALB_MISMATCH, "Audioslave", "TALB", '"MISMATCH" vs. "TALB"'), "22222222": (bulk_tagging_form.TALB_MISMATCH, "Audioslave", "MISMATCH", '"MISMATCH" vs. "TALB"'), } if __name__ == "__main__": unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 40481, 82, 198, 11748, 269, 10100, 9399, 198, 11748, 555, 715, 395, 198, 198, 6738, 442, 343, 79, 13, 32016, 1330, 11963, 62, 12985, 2667, 62, 687, 628, 198, 51, 6465, 62...
2.045288
817
from environs import Env env = Env() env.read_env() BOT_TOKEN = env.str("BOT_TOKEN") ADMIN = env.str("ADMIN") IP = env.str("ip")
[ 6738, 17365, 343, 684, 1330, 2039, 85, 198, 198, 24330, 796, 2039, 85, 3419, 198, 24330, 13, 961, 62, 24330, 3419, 198, 198, 33, 2394, 62, 10468, 43959, 796, 17365, 13, 2536, 7203, 33, 2394, 62, 10468, 43959, 4943, 198, 2885, 23678, ...
2.20339
59
# -*- coding: utf-8 -*- # # Copyright (C) 2020 Vinay M. Sajip. See LICENSE for licensing information. # # Part of the test harness for sarge: Subprocess Allegedly Rewards Good Encapsulation :-) # import sys import time if __name__ == '__main__': try: rc = main() except Exception as e: print(e) rc = 9 sys.exit(rc)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 11820, 323, 337, 13, 311, 1228, 541, 13, 4091, 38559, 24290, 329, 15665, 1321, 13, 198, 2, 198, 2, 2142, 286, 262, 1332, 19356, ...
2.496454
141
#!/usr/bin/python # -*- coding: utf-8 -*- # PQN-NNLS algorithm (Kim, Sra, Dhillon 2006) import numpy as np def pqn_nnls(A, b, err, limit = 300): """return x which is >= 0 and minimizes ||Ax - b||""" m, n = A.shape; AtA = np.dot(A.T, A) Atb = np.dot(A.T, b) curS = np.eye(n) x = np.zeros(n, 1) for iteration in range(limit): # gradient for current x grad = AtA*x - Atb fixed_set = [] free_set = [] for i in range(n): if (abs(x[i]) < err) and (grad[i] > err): fixed_set.append(i) else: free_set.append(i) cur_y = x[free_set] grad_y = grad[free_set]; subS = curS[free_set, free_set] subA = A(:, free_set); # using APA rule alpha = 1; sigma = 1; s = 1/2; tau = 1/4; m = 0; storedgamma = gamma(s^m*sigma) while (obj(cur_y)-obj(storedgamma)) < tau*grad_y.T * (cur_y - storedgamma) m = m+1; storedgamma = gamma(s^m*sigma); d = storedgamma - cur_y; u = x; u[free_set] = alpha*d; u[fixed_set] = 0; pre_b = np.dot(A, u) temp2 = np.dot(At, pre_b) temp3 = np.dot(u, u.T) temp4 = np.dot(pre_b.T, pre_b) temp5 = np.dot(curS, temp2, u.T) curS = ((1 + temp2.T*curS*temp2/temp4)*temp3 - ... (temp5+temp5.\'))/temp4 + curS; curs += if norm(x[free_set] - cur_y - alpha*d) < err break; x[free_set] = cur_y + alpha*d; return x;
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 350, 48, 45, 12, 6144, 6561, 11862, 357, 26374, 11, 311, 430, 11, 360, 12639, 261, 4793, 8, 201, ...
1.662351
1,004
from django.urls import path from . import views app_name = 'memberships' urlpatterns = [ path('register/', views.RegistrationView.as_view(), name='registration'), path('login/', views.LoginView.as_view(), name='login'), path('logout/', views.logout_view, name='logout'), path('forget-pass/', views.ForgetPassView.as_view(), name='forget_pass'), path('activation/<str:id>/<str:code>', views.ActivationView.as_view(), name='activation'), path('reset-code/<str:email>/<str:code>', views.ResetCodeView.as_view(), name='reset_code'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 30814, 5748, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 30238, 14, 3256, 5009, 13, 47133, 76...
2.748768
203
from conceptnet_rocks.database import load_dump_into_database from graph_garden import arangodb from pathlib import Path from typing import Optional import typer app = typer.Typer() @app.command()
[ 6738, 3721, 3262, 62, 305, 4657, 13, 48806, 1330, 3440, 62, 39455, 62, 20424, 62, 48806, 198, 6738, 4823, 62, 70, 5872, 1330, 610, 648, 375, 65, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 11748, 1259, 525,...
3.35
60
import logging import os import sys import traceback import time import argparse from . import config, util, server from .writer import _rebuild, _check_output logger = logging.getLogger(__name__) if __name__ == "__main__": main()
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 198, 6738, 764, 1330, 4566, 11, 7736, 11, 4382, 198, 6738, 764, 16002, 1330, 4808, 260, 11249, 11, 4808, 9122, 6...
3.102564
78
from sklearn.feature_extraction.text import CountVectorizer examples = [ "apple ball cat", "ball cat dog", ] # vectorizer = CountVectorizer() # X = vectorizer.fit_transform(examples) # print(vectorizer.get_feature_names_out()) # print(X.toarray()) max_features = 3 ngrams = 2 vectorizer = CountVectorizer(max_features=max_features, ngram_range=(1, ngrams)) X = vectorizer.fit_transform(examples) print(vectorizer.get_feature_names_out()) print(X.toarray())
[ 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 628, 198, 1069, 12629, 796, 685, 198, 220, 220, 220, 366, 18040, 2613, 3797, 1600, 198, 220, 220, 220, 366, 1894, 3797, 3290, 1600, 198, 60, 198, 198, ...
2.838323
167
#coding=utf-8 import sys import gzip import json import hashlib import re import urllib2 import xml.dom.minidom import zlib USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36' APPKEY = '85eb6835b0a1034e' APPSEC = '2ad42749773c441109bdc0191257a664' if __name__ == '__main__': if len(sys.argv) == 1: print('输入视频播放地址') else: media_urls = GetBilibiliUrl(sys.argv[1]) for media_url in media_urls: print media_url
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 11748, 25064, 198, 11748, 308, 13344, 198, 11748, 33918, 198, 11748, 12234, 8019, 198, 11748, 302, 198, 11748, 2956, 297, 571, 17, 198, 11748, 35555, 13, 3438, 13, 1084, 312, 296, 198, 11748, ...
1.98893
271
from flask import Flask, render_template #this has changed import plotly import plotly.graph_objs as go import pandas as pd import numpy as np import json app = Flask(__name__) @app.route('/') if __name__ == '__main__': app.run()
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 1303, 5661, 468, 3421, 198, 11748, 7110, 306, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198...
2.86747
83
XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXX XXXXXXX XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX XXXX XX XXXXX XXXXXX XXXXX XXXXXX X XXXXXXXX XXXXXXXXXXXXX XXXX XXXXXX XXXXX XXXXXXXXX XXXXX XX XXXXX XXXXXXXXXXXXXXXXXX X X XXXXXXXX XXXXX XXXX XXXXXXX XXXXXXXXXX XX XXXXX XXXXXXXXXXXXXXXXXX X XXX XXXX XX XXXXXXXXXXXXXX XXXXXX XXXXXX XXXXXXXXXX XXXXXX XXXXX XXXXXXXXXX XX XXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXX
[ 24376, 24376, 24376, 24376, 24376, 24376, 8051, 198, 24376, 8051, 1395, 24376, 1395, 24376, 8051, 1395, 24376, 198, 24376, 24376, 24376, 24376, 24376, 24376, 8051, 198, 198, 24376, 21044, 1395, 24376, 198, 198, 24376, 8051, 1395, 24376, 1395,...
2.726027
146
import numbers from typing import Optional, Union, Any, Callable, Sequence import torch from ignite.metrics import Metric, MetricsLambda from ignite.exceptions import NotComputableError from ignite.metrics.metric import sync_all_reduce, reinit__is_reduced __all__ = ["ConfusionMatrix", "mIoU", "IoU", "DiceCoefficient", "cmAccuracy", "cmPrecision", "cmRecall"] class ConfusionMatrix(Metric): """Calculates confusion matrix for multi-class data. - `update` must receive output of the form `(y_pred, y)` or `{'y_pred': y_pred, 'y': y}`. - `y_pred` must contain logits and has the following shape (batch_size, num_categories, ...) - `y` should have the following shape (batch_size, ...) and contains ground-truth class indices with or without the background class. During the computation, argmax of `y_pred` is taken to determine predicted classes. Args: num_classes (int): number of classes. See notes for more details. average (str, optional): confusion matrix values averaging schema: None, "samples", "recall", "precision". Default is None. If `average="samples"` then confusion matrix values are normalized by the number of seen samples. If `average="recall"` then confusion matrix values are normalized such that diagonal values represent class recalls. If `average="precision"` then confusion matrix values are normalized such that diagonal values represent class precisions. output_transform (callable, optional): a callable that is used to transform the :class:`~ignite.engine.Engine`'s `process_function`'s output into the form expected by the metric. This can be useful if, for example, you have a multi-output model and you want to compute the metric with respect to one of the outputs. device (str of torch.device, optional): device specification in case of distributed computation usage. In most of the cases, it can be defined as "cuda:local_rank" or "cuda" if already set `torch.cuda.set_device(local_rank)`. By default, if a distributed process group is initialized and available, device is set to `cuda`. Note: In case of the targets `y` in `(batch_size, ...)` format, target indices between 0 and `num_classes` only contribute to the confusion matrix and others are neglected. For example, if `num_classes=20` and target index equal 255 is encountered, then it is filtered out. """ @reinit__is_reduced @reinit__is_reduced @sync_all_reduce("confusion_matrix", "_num_examples") def IoU(cm: ConfusionMatrix, ignore_index: Optional[int] = None) -> MetricsLambda: """Calculates Intersection over Union using :class:`~ignite.metrics.ConfusionMatrix` metric. Args: cm (ConfusionMatrix): instance of confusion matrix metric ignore_index (int, optional): index to ignore, e.g. background index Returns: MetricsLambda Examples: .. code-block:: python train_evaluator = ... cm = ConfusionMatrix(num_classes=num_classes) IoU(cm, ignore_index=0).attach(train_evaluator, 'IoU') state = train_evaluator.run(train_dataset) # state.metrics['IoU'] -> tensor of shape (num_classes - 1, ) """ if not isinstance(cm, ConfusionMatrix): raise TypeError("Argument cm should be instance of ConfusionMatrix, but given {}".format(type(cm))) if ignore_index is not None: if not (isinstance(ignore_index, numbers.Integral) and 0 <= ignore_index < cm.num_classes): raise ValueError("ignore_index should be non-negative integer, but given {}".format(ignore_index)) # Increase floating point precision and pass to CPU cm = cm.type(torch.DoubleTensor) iou = cm.diag() / (cm.sum(dim=1) + cm.sum(dim=0) - cm.diag() + 1e-15) if ignore_index is not None: return MetricsLambda(ignore_index_fn, iou) else: return iou def mIoU(cm: ConfusionMatrix, ignore_index: Optional[int] = None) -> MetricsLambda: """Calculates mean Intersection over Union using :class:`~ignite.metrics.ConfusionMatrix` metric. Args: cm (ConfusionMatrix): instance of confusion matrix metric ignore_index (int, optional): index to ignore, e.g. background index Returns: MetricsLambda Examples: .. code-block:: python train_evaluator = ... cm = ConfusionMatrix(num_classes=num_classes) mIoU(cm, ignore_index=0).attach(train_evaluator, 'mean IoU') state = train_evaluator.run(train_dataset) # state.metrics['mean IoU'] -> scalar """ return IoU(cm=cm, ignore_index=ignore_index).mean() def cmAccuracy(cm: ConfusionMatrix) -> MetricsLambda: """Calculates accuracy using :class:`~ignite.metrics.ConfusionMatrix` metric. Args: cm (ConfusionMatrix): instance of confusion matrix metric Returns: MetricsLambda """ # Increase floating point precision and pass to CPU cm = cm.type(torch.DoubleTensor) return cm.diag().sum() / (cm.sum() + 1e-15) def cmPrecision(cm: ConfusionMatrix, average: bool = True) -> MetricsLambda: """Calculates precision using :class:`~ignite.metrics.ConfusionMatrix` metric. Args: cm (ConfusionMatrix): instance of confusion matrix metric average (bool, optional): if True metric value is averaged over all classes Returns: MetricsLambda """ # Increase floating point precision and pass to CPU cm = cm.type(torch.DoubleTensor) precision = cm.diag() / (cm.sum(dim=0) + 1e-15) if average: return precision.mean() return precision def cmRecall(cm: ConfusionMatrix, average: bool = True) -> MetricsLambda: """ Calculates recall using :class:`~ignite.metrics.ConfusionMatrix` metric. Args: cm (ConfusionMatrix): instance of confusion matrix metric average (bool, optional): if True metric value is averaged over all classes Returns: MetricsLambda """ # Increase floating point precision and pass to CPU cm = cm.type(torch.DoubleTensor) recall = cm.diag() / (cm.sum(dim=1) + 1e-15) if average: return recall.mean() return recall def DiceCoefficient(cm: ConfusionMatrix, ignore_index: Optional[int] = None) -> MetricsLambda: """Calculates Dice Coefficient for a given :class:`~ignite.metrics.ConfusionMatrix` metric. Args: cm (ConfusionMatrix): instance of confusion matrix metric ignore_index (int, optional): index to ignore, e.g. background index """ if not isinstance(cm, ConfusionMatrix): raise TypeError("Argument cm should be instance of ConfusionMatrix, but given {}".format(type(cm))) if ignore_index is not None: if not (isinstance(ignore_index, numbers.Integral) and 0 <= ignore_index < cm.num_classes): raise ValueError("ignore_index should be non-negative integer, but given {}".format(ignore_index)) # Increase floating point precision and pass to CPU cm = cm.type(torch.DoubleTensor) dice = 2.0 * cm.diag() / (cm.sum(dim=1) + cm.sum(dim=0) + 1e-15) if ignore_index is not None: return MetricsLambda(ignore_index_fn, dice) else: return dice
[ 11748, 3146, 198, 6738, 19720, 1330, 32233, 11, 4479, 11, 4377, 11, 4889, 540, 11, 45835, 198, 198, 11748, 28034, 198, 198, 6738, 44794, 13, 4164, 10466, 1330, 3395, 1173, 11, 3395, 10466, 43, 4131, 6814, 198, 6738, 44794, 13, 1069, 1...
2.780136
2,638
import arcade from arcade import load_texture from arcade.gui import UIManager from arcade.gui.widgets import UITextArea, UIInputText, UITexturePane LOREM_IPSUM = ( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget pellentesque velit. " "Nam eu rhoncus nulla. Fusce ornare libero eget ex vulputate, vitae mattis orci eleifend. " "Donec quis volutpat arcu. Proin lacinia velit id imperdiet ultrices. Fusce porta magna leo, " "non maximus justo facilisis vel. Duis pretium sem ut eros scelerisque, a dignissim ante " "pellentesque. Cras rutrum aliquam fermentum. Donec id mollis mi.\n" "\n" "Nullam vitae nunc aliquet, lobortis purus eget, porttitor purus. Curabitur feugiat purus sit " "amet finibus accumsan. Proin varius, enim in pretium pulvinar, augue erat pellentesque ipsum, " "sit amet varius leo risus quis tellus. Donec posuere ligula risus, et scelerisque nibh cursus " "ac. Mauris feugiat tortor turpis, vitae imperdiet mi euismod aliquam. Fusce vel ligula volutpat, " "finibus sapien in, lacinia lorem. Proin tincidunt gravida nisl in pellentesque. Aenean sed " "arcu ipsum. Vivamus quam arcu, elementum nec auctor non, convallis non elit. Maecenas id " "scelerisque lectus. Vivamus eget sem tristique, dictum lorem eget, maximus leo. Mauris lorem " "tellus, molestie eu orci ut, porta aliquam est. Nullam lobortis tempor magna, egestas lacinia lectus.\n" ) window = MyWindow() arcade.run()
[ 11748, 27210, 198, 6738, 27210, 1330, 3440, 62, 41293, 198, 6738, 27210, 13, 48317, 1330, 471, 3955, 272, 3536, 198, 6738, 27210, 13, 48317, 13, 28029, 11407, 1330, 471, 2043, 2302, 30547, 11, 12454, 20560, 8206, 11, 471, 2043, 2302, 49...
2.56304
579
######################### # 演示元组 ######################### # 元组: 元组是一序列不可修改的元素的集合 dimensions = (1, 2, 3, 4, 5) print(dimensions) print(type(dimensions))
[ 14468, 7804, 2, 198, 2, 10545, 120, 242, 163, 97, 118, 17739, 225, 163, 119, 226, 198, 14468, 7804, 2, 628, 198, 2, 10263, 227, 225, 163, 119, 226, 171, 120, 248, 10263, 227, 225, 163, 119, 226, 42468, 31660, 41753, 237, 26344, 24...
1.666667
93
# Generated by Django 1.11.8 on 2018-01-24 15:48 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 23, 319, 2864, 12, 486, 12, 1731, 1315, 25, 2780, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
from django.shortcuts import render # Create your views here. from rest_framework import generics, status, mixins from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.views import APIView from measure.models import Measures from .serializers import MeasuresSerializer import datetime as dt from attack_information.models import Attackinformation from django.db.models import Count, Sum, Q, F, Avg
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 11, 3722, 11, 5022, 1040, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 22507, 7149, 198, 6738, ...
4.034783
115
import torch.nn as nn
[ 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 201, 198 ]
2.272727
11
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198 ]
4
9
import numpy, itertools, tqdm, json scanners = [] new = [] with open("data.txt", "r") as fh: lines = fh.readlines() number = 0 for line in lines: line = line.strip() # print(line) if "scanner" in line: if new: scanners.append({"coords_raw":new, "id": number}) number = int(line.split(" scanner ")[1].split(" ")[0]) new = [] elif line: new.append(tuple([int(i) for i in line.split(",")])) number += 1 scanners.append({"coords_raw":new, "id": number}) # print(scanners) unsolved = list(range(len(scanners))) print("yet to solve:",unsolved) # start = unsolved.pop(0) start = unsolved[0] print("starting with",scanners[start]["id"]) scanners[start]["offset"] = (0,0,0) scanners[start]["rotations"] = (0,0,0) scanners[start]["range"] = ((-1000, 1000), (-1000, 1000), (-1000, 1000)) scanners[start]["coords_parsed"] = scanners[start]["coords_raw"].copy() solved = [] absoluteprobes = set(scanners[start]["coords_parsed"]) while len(unsolved) > 0: print("solved",[i["id"] for i in solved],"unsolved",unsolved) candidate_index = unsolved.pop(0) candidate = scanners[candidate_index] # solved_so_far = list(solved.keys()) candidate["matched"] = 11 got_it = False # print("looking at", candidate, "vs", absoluteprobes) for hypothesis_matchA, hypothesis_matchB in tqdm.tqdm(itertools.product(candidate["coords_raw"],absoluteprobes)): # print("trying",hypothesis_matchA,"vs",hypothesis_matchB) for rotx, roty, rotz in itertools.product(range(4), range(4), range(4)): # print(rotx,roty,rotz) matched = 1 offset = [ hypothesis_matchB[i] - rotate(hypothesis_matchA, (rotx, roty, rotz))[i] for i in range(3) ] for coord in candidate["coords_raw"]: it_would_be = rotate(coord, (rotx, roty, rotz)) # print("coord",coord,"rotated to",it_would_be) it_would_be = offset_coord(it_would_be, offset) # print("coord",coord,"offset to",it_would_be) if tuple(it_would_be) in absoluteprobes: # print("found!") matched += 1 # if matched > 1: # print("offset", offset, "matched", matched) if matched > candidate["matched"]: # simplistic... got_it = True candidate["rotation"] = (rotx, roty, rotz) candidate["offset"] = offset candidate["range"] = ((-1000 + offset[0], 1000 + offset[0]),(-1000 + offset[1], 1000 + offset[1]), (-1000 + offset[2], 1000 + offset[2])) candidate["matched"] = matched parsed = [] for i in candidate["coords_raw"]: parsed.append(offset_coord(rotate(i, (rotx, roty, rotz)), offset)) candidate["coords_parsed"] = parsed # print("an improved position was found:", candidate) if not got_it: unsolved.append(candidate_index) else: solved.append(candidate) absoluteprobes.update(candidate["coords_parsed"]) # print("solved", candidate) # print("current view of all probes:", absoluteprobes) print(len(absoluteprobes),"probes found.") with open("probes.json", "w") as fh: fh.write(json.dumps(list(absoluteprobes))) with open("scanners.json", "w") as fh: fh.write(json.dumps(scanners)) print("Locations:", absoluteprobes) print("full table dump:", solved)
[ 11748, 299, 32152, 11, 340, 861, 10141, 11, 256, 80, 36020, 11, 33918, 198, 198, 1416, 15672, 796, 17635, 198, 3605, 796, 17635, 198, 198, 4480, 1280, 7203, 7890, 13, 14116, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220,...
2.143623
1,678
from typing import TypeVar, Generic, Optional, Dict, Any from abc import abstractmethod from dataclasses import dataclass T = TypeVar("T") @dataclass
[ 6738, 19720, 1330, 5994, 19852, 11, 42044, 11, 32233, 11, 360, 713, 11, 4377, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 51, 796, 5994, 19852, 7203, 51, 4943, 628, 198, 31, ...
3.369565
46
import dask.array as da import dask.dataframe as dd def apply_parallel( function, array, chunks=4, drop_axis=None, new_axis=None, dtype=float, *args, **kwargs ): """Apply the function in parallel using Dask. See https://docs.dask.org/en/latest/array-api.html#dask.array.map_blocks for more information. Parameters ---------- function function to apply array : ndarray data to apply function against chunks : int, optional (default: 4) number of chunks to break data into in order to run drop_axis : int or list-like, optional (default: None) If present, is the number or tuple of numbers of axis to drop new_axis : int or list-like, optional (default: None) If present, is the axis number or tuple of numbers of axes to add dtype : [type], optional (default: float) output dtype Returns ------- ndarray of dtype """ return ( da.from_array(array, chunks=chunks, name=False) .map_blocks( function, *args, **kwargs, dtype=dtype, drop_axis=drop_axis, new_axis=new_axis, ) .compute() ) def apply_parallel_predicate(function, array1, array2, chunks=4, *args, **kwargs): """Apply the pygeos predicate function in parallel using Dask. See https://docs.dask.org/en/latest/array-api.html#dask.array.map_blocks for more information. Parameters ---------- function predicate function to apply, takes 2 input arrays array1 : ndarray array2 : ndarray chunks : int, optional (default: 4) number of chunks to break data into in order to run dtype : [type], optional (default: float) output dtype Returns ------- ndarray(bool) """ return da.map_blocks( function, da.from_array(array1, chunks=chunks, name=False), da.from_array(array2, chunks=chunks, name=False), dtype="bool", ).compute() def apply_parallel_dataframe(function, df, partitions=4, *args, **kwargs): """Apply the function in parallel using Dask. See https://docs.dask.org/en/latest/array-api.html#dask.array.map_blocks for more information. Parameters ---------- function function to apply df : DataFrame data frame to apply function against partitions : int, optional (default: 4) number of partitions to break data into in order to run drop_axis : int or list-like, optional (default: None) If present, is the number or tuple of numbers of axis to drop new_axis : int or list-like, optional (default: None) If present, is the axis number or tuple of numbers of axes to add Returns ------- ndarray of dtype """ return ( dd.from_pandas(df, npartitions=partitions) .map_partitions(function, *args, **kwargs) .compute() )
[ 11748, 288, 2093, 13, 18747, 355, 12379, 198, 11748, 288, 2093, 13, 7890, 14535, 355, 49427, 628, 198, 4299, 4174, 62, 1845, 29363, 7, 198, 220, 220, 220, 2163, 11, 198, 220, 220, 220, 7177, 11, 198, 220, 220, 220, 22716, 28, 19, ...
2.492077
1,199
''' Zephyr: Open-source seismic waveform modelling and inversion code written in Python ''' __version__ = 'devel' __author__ = 'Brendan Smithyman' __license__ = 'MIT' __copyright__ = 'Copyright 2015 Brendan Smithyman'
[ 7061, 6, 198, 57, 27446, 2417, 25, 4946, 12, 10459, 37463, 6769, 687, 38591, 290, 287, 9641, 2438, 3194, 287, 11361, 198, 7061, 6, 198, 198, 834, 9641, 834, 220, 220, 796, 705, 2934, 626, 6, 198, 834, 9800, 834, 220, 220, 220, 796...
2.986842
76
# -*- coding: utf-8 -*- """ example.routes.py """ from webapp2_extras.routes import HandlerPrefixRoute, RedirectRoute # -------------------------------------------------------------------- # Routes # -------------------------------------------------------------------- routes = [ HandlerPrefixRoute('example.handlers.', [ RedirectRoute('/', name = 'index', handler = 'ExampleHandler', strict_slash = True, ), RedirectRoute('/populate', name = 'populate', handler = 'DebugHandler:populate', strict_slash = True, ), RedirectRoute('/update', name = 'update', handler = 'DebugHandler:update', strict_slash = True, ), RedirectRoute('/delete', name = 'delete', handler = 'DebugHandler:delete', strict_slash = True, ), ]) ]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 20688, 13, 81, 448, 274, 13, 9078, 198, 198, 37811, 198, 198, 6738, 3992, 1324, 17, 62, 2302, 8847, 13, 81, 448, 274, 1330, 32412, 36698, 844, 43401, 11, ...
2.218391
435
from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('', include('django.contrib.auth.urls')), path('', include('social_django.urls', namespace='social')), path('', include('social_auth_app.urls')), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, ...
2.45122
246
# -*- coding: utf-8 -*- #! /usr/bin/env python import numpy as np import matplotlib.pyplot as plt from six.moves import range # plain plotting from values def plot_conn(values, name='', fs=1, ylim=None, xlim=None, show=True): ''' Plot connectivity estimation results. Allows to plot your results without using *Data* class. Args: *values* : numpy.array connectivity estimation values in shape (fq, k, k) where fq - frequency, k - number of channels *name* = '' : str title of the plot *fs* = 1 : int sampling frequency *ylim* = None : list range of y-axis values shown, e.g. [0,1] *None* means that default values of given estimator are taken into account *xlim* = None : list [from (int), to (int)] range of y-axis values shown, if None it is from 0 to Nyquist frequency *show* = True : boolean show the plot or not ''' fq, k, k = values.shape fig, axes = plt.subplots(k, k) freqs = np.linspace(0, fs//2, fq) if not xlim: xlim = [0, np.max(freqs)] if not ylim: ylim = [np.min(values), np.max(values)] for i in range(k): for j in range(k): axes[i, j].fill_between(freqs, values[:, i, j], 0) axes[i, j].set_xlim(xlim) axes[i, j].set_ylim(ylim) plt.suptitle(name, y=0.98) plt.tight_layout() plt.subplots_adjust(top=0.92) if show: plt.show()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2237, ...
2.153957
695
from typing import Optional, List from pydantic import BaseModel
[ 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 628, 198 ]
3.888889
18
import librosa import os import numpy as np import scipy.io.wavfile as wavfile audio_range = (0, 20) if not os.path.exists('./norm_audio_train'): os.mkdir('./norm_audio_train') for idx in range(audio_range[0], audio_range[1]): print('Processing audio %s'%idx) path = './audio_train/trim_audio_train%s.wav' % idx norm = './norm_audio_train/trim_audio_train%s.wav' % idx if os.path.exists(path): audio, _ = librosa.load(path, sr=16000) max = np.max(np.abs(audio)) norm_audio = np.divide(audio, max) wavfile.write(norm,16000,norm_audio)
[ 11748, 9195, 4951, 64, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 952, 13, 45137, 7753, 355, 266, 615, 7753, 198, 198, 24051, 62, 9521, 796, 357, 15, 11, 1160, 8, 198, 198, 361, 407, 28686, ...
2.180812
271
# -*- coding: utf-8 -*- """ Created on Thu Apr 29 12:08:34 2021 @author: BKG """ import sqlite3 from sqlite3 import Error import pandas as pd import PySimpleGUI as sg import re from re import search from datetime import datetime from fpdf import FPDF def _db_connection(): ''' Connects to the .db file Returns ------- connection : sqlite db connection ''' try: connection = sqlite3.connect('Data\\UIF_Alumni_DB.db') except Error: print(Error) return connection if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2758, 2808, 1105, 25, 2919, 25, 2682, 33448, 198, 198, 31, 9800, 25, 347, 42, 38, 198, 37811, 198, 198, 11748, 44161, 578, 18, 198, 6738...
2.587156
218
"""isort:skip_file.""" import argparse import os import sys sys.path.append("../") from torch.utils.data import DataLoader from tqdm import tqdm from beta_rec.core.eval_engine import SeqEvalEngine from beta_rec.core.train_engine import TrainEngine from beta_rec.datasets.seq_data_utils import ( SeqDataset, collate_fn, create_seq_db, dataset_to_seq_target_format, load_dataset, reindex_items, ) from beta_rec.models.narm import NARMEngine from beta_rec.utils.monitor import Monitor def parse_args(): """Parse args from command line. Returns: args object. """ parser = argparse.ArgumentParser(description="Run NARM..") parser.add_argument( "--config_file", nargs="?", type=str, default="../configs/narm_default.json", help="Specify the config file name. Only accept a file from ../configs/", ) # If the following settings are specified with command line, # these settings will be updated. parser.add_argument( "--dataset", nargs="?", type=str, help="Options are: tafeng, dunnhunmby and instacart", ) parser.add_argument( "--data_split", nargs="?", type=str, help="Options are: leave_one_out and temporal", ) parser.add_argument("--root_dir", nargs="?", type=str, help="working directory") parser.add_argument( "--n_sample", nargs="?", type=int, help="Number of sampled triples." ) parser.add_argument("--sub_set", nargs="?", type=int, help="Subset of dataset.") parser.add_argument( "--temp_train", nargs="?", type=int, help="IF value >0, then the model will be trained based on the temporal feeding, else use normal trainning.", ) parser.add_argument( "--emb_dim", nargs="?", type=int, help="Dimension of the embedding." ) parser.add_argument( "--late_dim", nargs="?", type=int, help="Dimension of the latent layers.", ) parser.add_argument("--lr", nargs="?", type=float, help="Intial learning rate.") parser.add_argument("--num_epoch", nargs="?", type=int, help="Number of max epoch.") parser.add_argument( "--batch_size", nargs="?", type=int, help="Batch size for training." ) parser.add_argument("--optimizer", nargs="?", type=str, help="OPTI") parser.add_argument("--activator", nargs="?", type=str, help="activator") parser.add_argument("--alpha", nargs="?", type=float, help="ALPHA") return parser.parse_args() class NARM_train(TrainEngine): """An instance class from the TrainEngine base class.""" def __init__(self, config): """Initialize NARM_trian Class. Args: config (dict): All the parameters for the model. """ self.config = config super(NARM_train, self).__init__(self.config) self.load_dataset_seq() self.build_data_loader() self.engine = NARMEngine(self.config) self.seq_eval_engine = SeqEvalEngine(self.config) def load_dataset_seq(self): """Build a dataset for model.""" # ml = Movielens_100k() # ml.download() # ml.load_interaction() # self.dataset = ml.make_temporal_split(n_negative=0, n_test=0) ld_dataset = load_dataset(self.config) ld_dataset.download() ld_dataset.load_interaction() self.dataset = ld_dataset.make_temporal_split(n_negative=0, n_test=0) self.train_data = self.dataset[self.dataset.col_flag == "train"] self.valid_data = self.dataset[self.dataset.col_flag == "validate"] self.test_data = self.dataset[self.dataset.col_flag == "test"] # self.dataset = Dataset(self.config) self.config["dataset"]["n_users"] = self.train_data.col_user.nunique() self.config["dataset"]["n_items"] = self.train_data.col_item.nunique() + 1 def build_data_loader(self): """Convert users' interactions to sequences. Returns: load_train_data (DataLoader): training set. """ # reindex items from 1 self.train_data, self.valid_data, self.test_data = reindex_items( self.train_data, self.valid_data, self.test_data ) # data to sequences self.valid_data = create_seq_db(self.valid_data) self.test_data = create_seq_db(self.test_data) # convert interactions to sequences seq_train_data = create_seq_db(self.train_data) # convert sequences to (seq, target) format load_train_data = dataset_to_seq_target_format(seq_train_data) # define pytorch Dataset class for sequential datasets load_train_data = SeqDataset(load_train_data) # pad the sequences with 0 self.load_train_data = DataLoader( load_train_data, batch_size=self.config["model"]["batch_size"], shuffle=False, collate_fn=collate_fn, ) return self.load_train_data def _train(self, engine, train_loader, save_dir): """Train the model with epochs.""" epoch_bar = tqdm(range(self.config["model"]["max_epoch"]), file=sys.stdout) for epoch in epoch_bar: print("Epoch {} starts !".format(epoch)) print("-" * 80) if self.check_early_stop(engine, save_dir, epoch): break engine.train_an_epoch(train_loader, epoch=epoch) """evaluate model on validation and test sets""" # evaluation self.seq_eval_engine.train_eval_seq( self.valid_data, self.test_data, engine, epoch ) def train(self): """Train and test NARM.""" self.monitor = Monitor( log_dir=self.config["system"]["run_dir"], delay=1, gpu_id=self.gpu_id ) train_loader = self.load_train_data self.engine = NARMEngine(self.config) self.narm_save_dir = os.path.join( self.config["system"]["model_save_dir"], self.config["model"]["save_name"] ) self._train(self.engine, train_loader, self.narm_save_dir) self.config["run_time"] = self.monitor.stop() self.seq_eval_engine.test_eval_seq(self.test_data, self.engine) if __name__ == "__main__": args = parse_args() narm = NARM_train(args) narm.train() # narm.test() have already implemented in train()
[ 37811, 271, 419, 25, 48267, 62, 7753, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198...
2.300644
2,794
import logging from pathlib import Path from flask import Flask from config import config from model.model import get_detector from views.views import detector_blueprint logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) app = Flask(__name__) app.secret_key = config.get("secret_key", "secret") app.config["UPLOAD_FOLDER"] = config.get("upload_folder", "static") app.config["MAX_CONTENT_LENGTH"] = config.get("max_content_length", 16 * 1024 * 1024) app.config["ALLOWED_IMAGE_EXTENSIONS"] = config.get( "allowed_image_extensions", ["JPEG", "JPG", "PNG"] ) app.config["CONFIDENCE"] = config.get("default_confidence", 0.90) app.register_blueprint(detector_blueprint) # Creating upload folder in case it doesn't exist Path(app.config["UPLOAD_FOLDER"]).mkdir(exist_ok=True) # Preloading model get_detector() if __name__ == "__main__": logger.info("Starting app") app.run(port=config.get("serving_port", 8000))
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 42903, 1330, 46947, 198, 198, 6738, 4566, 1330, 4566, 198, 6738, 2746, 13, 19849, 1330, 651, 62, 15255, 9250, 198, 6738, 5009, 13, 33571, 1330, 31029, 62, 17585, 4798, 19...
2.893293
328
from flask import Flask, jsonify, request from flask_restful import Api, Resource from pymongo import MongoClient import bcrypt import logging logging.basicConfig(level=logging.DEBUG,format='%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d] [%(thread)d] - %(message)s',datefmt='%d/%m/%Y %H:%M:%S',filename='flask.log') from logging.handlers import TimedRotatingFileHandler app = Flask(__name__) api = Api(app) client = MongoClient("mongodb://my_db:27017") db = client.projectDB users = db["Users"] """ HELPER FUNCTIONS """ """ RESOURCES """ api.add_resource(Hello, '/hello') api.add_resource(Register, '/register') api.add_resource(Retrieve, '/retrieve') api.add_resource(Save, '/save') if __name__ == "__main__": app.run(host='0.0.0.0', debug=False)
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 11, 20857, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 275, 29609, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 169...
2.607383
298
score_list = [] score_list_file = open("score.txt") for score in score_list_file: score = score.rstrip().split(",") score_list.append([score[0],int(score[1])]) score_list_file.close() print (score_list)
[ 26675, 62, 4868, 796, 17635, 198, 198, 26675, 62, 4868, 62, 7753, 796, 1280, 7203, 26675, 13, 14116, 4943, 198, 198, 1640, 4776, 287, 4776, 62, 4868, 62, 7753, 25, 198, 220, 220, 220, 4776, 796, 4776, 13, 81, 36311, 22446, 35312, 7,...
2.529412
85
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/02/25 16:30 # @Author : niuliangtao # @Site : # @File : MachineLearninginAction.py # @Software: PyCharm import csv import random import socket import time import http.client import http.client import requests from bs4 import BeautifulSoup if __name__ == '__main__': url = "https://github.com/apachecn/MachineLearning" req = requests.get(url) soup = BeautifulSoup(req.content.decode('gbk', 'ignore'), 'lxml') print req.text.encode("utf-8")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 2864, 14, 2999, 14, 1495, 1467, 25, 1270, 198, 2, 2488, 13838, 220, 1058, 37628, ...
2.607843
204
from mercury import * b64_cert = 'MIIJRDCCCCygAwIBAgIRAO7eZWDNNcCvAgAAAABZcbcwDQYJKoZIhvcNAQELBQAwQjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFUdvb2dsZSBUcnVzdCBTZXJ2aWNlczETMBEGA1UEAxMKR1RTIENBIDFPMTAeFw0yMDAyMTIxMTQ3MTFaFw0yMDA1MDYxMTQ3MTFaMGYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgTExDMRUwEwYDVQQDDAwqLmdvb2dsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATKjE9IuwUMNbIbCmiOS1XWI2yPFLanStLIADumajnPmHrED+4/bPKa3HXecM4hPVHL8OgqwVYWveZsS6OdF9Pqo4IG2jCCBtYwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFCRtN1AKArkz3KlGMpfhLYkaPFkYMB8GA1UdIwQYMBaAFJjR+G4Q68+b7GCfGJAboOt9Cf0rMGQGCCsGAQUFBwEBBFgwVjAnBggrBgEFBQcwAYYbaHR0cDovL29jc3AucGtpLmdvb2cvZ3RzMW8xMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2cvZ3NyMi9HVFMxTzEuY3J0MIIEnQYDVR0RBIIElDCCBJCCDCouZ29vZ2xlLmNvbYINKi5hbmRyb2lkLmNvbYIWKi5hcHBlbmdpbmUuZ29vZ2xlLmNvbYISKi5jbG91ZC5nb29nbGUuY29tghgqLmNyb3dkc291cmNlLmdvb2dsZS5jb22CBiouZy5jb4IOKi5nY3AuZ3Z0Mi5jb22CESouZ2NwY2RuLmd2dDEuY29tggoqLmdncGh0LmNugg4qLmdrZWNuYXBwcy5jboIWKi5nb29nbGUtYW5hbHl0aWNzLmNvbYILKi5nb29nbGUuY2GCCyouZ29vZ2xlLmNsgg4qLmdvb2dsZS5jby5pboIOKi5nb29nbGUuY28uanCCDiouZ29vZ2xlLmNvLnVrgg8qLmdvb2dsZS5jb20uYXKCDyouZ29vZ2xlLmNvbS5hdYIPKi5nb29nbGUuY29tLmJygg8qLmdvb2dsZS5jb20uY2+CDyouZ29vZ2xlLmNvbS5teIIPKi5nb29nbGUuY29tLnRygg8qLmdvb2dsZS5jb20udm6CCyouZ29vZ2xlLmRlggsqLmdvb2dsZS5lc4ILKi5nb29nbGUuZnKCCyouZ29vZ2xlLmh1ggsqLmdvb2dsZS5pdIILKi5nb29nbGUubmyCCyouZ29vZ2xlLnBsggsqLmdvb2dsZS5wdIISKi5nb29nbGVhZGFwaXMuY29tgg8qLmdvb2dsZWFwaXMuY26CESouZ29vZ2xlY25hcHBzLmNughQqLmdvb2dsZWNvbW1lcmNlLmNvbYIRKi5nb29nbGV2aWRlby5jb22CDCouZ3N0YXRpYy5jboINKi5nc3RhdGljLmNvbYISKi5nc3RhdGljY25hcHBzLmNuggoqLmd2dDEuY29tggoqLmd2dDIuY29tghQqLm1ldHJpYy5nc3RhdGljLmNvbYIMKi51cmNoaW4uY29tghAqLnVybC5nb29nbGUuY29tghMqLndlYXIuZ2tlY25hcHBzLmNughYqLnlvdXR1YmUtbm9jb29raWUuY29tgg0qLnlvdXR1YmUuY29tghYqLnlvdXR1YmVlZHVjYXRpb24uY29tghEqLnlvdXR1YmVraWRzLmNvbYIHKi55dC5iZYILKi55dGltZy5jb22CGmFuZHJvaWQuY2xpZW50cy5nb29nbGUuY29tggthbmRyb2lkLmNvbYIbZGV2ZWxvcGVyLmFuZHJvaWQuZ29vZ2xlLmNughxkZXZlbG9wZXJzLmFuZHJvaWQuZ29vZ2xlLmNuggRnLmNvgghnZ3BodC5jboIMZ2tlY25hcHBzLmNuggZnb28uZ2yCFGdvb2dsZS1hbmFseXRpY3MuY29tggpnb29nbGUuY29tgg9nb29nbGVjbmFwcHMuY26CEmdvb2dsZWNvbW1lcmNlLmNvbYIYc291cmNlLmFuZHJvaWQuZ29vZ2xlLmNuggp1cmNoaW4uY29tggp3d3cuZ29vLmdsggh5b3V0dS5iZYILeW91dHViZS5jb22CFHlvdXR1YmVlZHVjYXRpb24uY29tgg95b3V0dWJla2lkcy5jb22CBXl0LmJlMCEGA1UdIAQaMBgwCAYGZ4EMAQICMAwGCisGAQQB1nkCBQMwLwYDVR0fBCgwJjAkoCKgIIYeaHR0cDovL2NybC5wa2kuZ29vZy9HVFMxTzEuY3JsMIIBBAYKKwYBBAHWeQIEAgSB9QSB8gDwAHUAsh4FzIuizYogTodm+Su5iiUgZ2va+nDnsklTLe+LkF4AAAFwOXBpZwAABAMARjBEAiA+QN+Y1BC1iTg87rmcpsUM/Gu24qPQtScwEkDt1exEhAIgQZ65pwiFU6WtL7WIBUDRTSLLJtQzSUb9E8H/e+H3kv8AdwBep3P531bA57U2SH3QSeAyepGaDIShEhKEGHWWgXFFWAAAAXA5cGl4AAAEAwBIMEYCIQD9qpknf9RA9NTnDbJ1R740ilIoZ5axO70RNKA2ozIpDQIhAI1NyadJ74gUNJMOwgVolIAXXkoTlllaI+RlhpKJXQelMA0GCSqGSIb3DQEBCwUAA4IBAQB/1D1o4bHjhENzzSVqw/WiW7R1Yg4kZjli4Jx+LL27l0iKIq5Je3M7N9seKeytHKln9LJWcZKJU0ZbTMAspum0myuT9TCRUzlQySsFdd3w5wh0ORzaaMxfdFZXbP5bVcGkuC/FdoNgnFFjfdJlif8ZWazQdGNT68dXSNYBrSWcZvTi6UHviVzyKRNF8NXQPkmfEGnd4JAhXr/bNfKhYp/n8vsemQpmKWuA2eO+1W3C8iCVQ2JaQUSEkOquDseMqEKLRl+Rqg9HWNZpZ7CJfxVEk9f8L9nc9fqQrRM3CB6E4nNwbo7jkwdkw9vcyse48vXjWRg69iSIEEw4VHtES7QNAAAABE4wggRKMIIDMqADAgECAg0B47SaoY2KqYElaVC4MA0GCSqGSIb3DQEBCwUAMEwxIDAeBgNVBAsTF0dsb2JhbFNpZ24gUm9vdCBDQSAtIFIyMRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWduMB4XDTE3MDYxNTAwMDA0MloXDTIxMTIxNTAwMDA0MlowQjELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFUdvb2dsZSBUcnVzdCBTZXJ2aWNlczETMBEGA1UEAxMKR1RTIENBIDFPMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAYz0XUi83TnORA73603WkhG8nPPI5MdbkPMRmEPZ48Ke9QDRCTbwWAgJ8qoL0SSwLhPZ9YFiT+MJ8LdHdVkx1L903hkoIQ9lGsDMOyIpQPNGuYEEnnC52DOd0gxhwt79EYYWXnI4MgqCMS/9Ikf9Qv50RqW03XUGawr55CYwX74BzEY2Gvn2oz/2KXvUjZ03wUZ9x13C5p6PhteGnQtxAFuPExwjsk/RozdPgj4OxrGYoWxuPNpM0L27OkWWA4iDutHbnGjKdTG/y82aSrvN08YdeTFZjugb2P4mRHIEAGTtesl+i5wFkSoUklI+TtcDQspbRjfPmjPYPRzW0krAcCAwEAAaOCATMwggEvMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUmNH4bhDrz5vsYJ8YkBug630J/SswHwYDVR0jBBgwFoAUm+IHV2ccHsBqBt5ZtJot39wZhi4wNQYIKwYBBQUHAQEEKTAnMCUGCCsGAQUFBzABhhlodHRwOi8vb2NzcC5wa2kuZ29vZy9nc3IyMDIGA1UdHwQrMCkwJ6AloCOGIWh0dHA6Ly9jcmwucGtpLmdvb2cvZ3NyMi9nc3IyLmNybDA/BgNVHSAEODA2MDQGBmeBDAECAjAqMCgGCCsGAQUFBwIBFhxodHRwczovL3BraS5nb29nL3JlcG9zaXRvcnkvMA0GCSqGSIb3DQEBCwUAA4IBAQAagD42efvzLqlGN31eVBY1rsdOCJn+vdE0aSZSZgc9CrpJy2L08RqO/BFPaJZMdCvTZ96yo6oFjYRNTCBlD6WW2g0W+Gw7228EI4hrOmzBYL1on3GO7i1YNAfw1VTphln9e14NIZT1jMmo+NjyrcwPGvOap6kEJ/mjybD/AnhrYbrHNSvoVvpPwxwM7bY8tEvq7czhPOzcDYzWPpvKQliLzBYhF0C8otZm79rEFVvNiaqbCSbnMtINbmcgAlsQsJAJnAwfnq3YO+qh/GzoEFwIUhlRKnG7rHq13RXtK8kIKiyKtKYhq2P/11JJUNCJt63yr/tQri/hlQ3zRq2dnPXKAAAPAABMBAMASDBGAiEAp1m1VKUw8r1LF/L9agFglOFk5CdyhuhtOSv3WjINpBMCIQD6JAciHPny8Y1BaW/OESa3bBx7o2GagPJ38I7OMb/f6BQAACCrO+g1PIiO1QCzFvhk8pvtjo/yhA3ITY4otKLs9CqQAhY/617WD2nmWRNnnuwRTLYs' print(parse_cert(b64_cert)) b64_dns = '1e2BgAABAAAAAQAABGxpdmUGZ2l0aHViA2NvbQAAHAABwBEABgABAAABzQBIB25zLTE3MDcJYXdzZG5zLTIxAmNvAnVrABFhd3NkbnMtaG9zdG1hc3RlcgZhbWF6b27AGAAAAAEAABwgAAADhAASdQAAAVGA' print(parse_dns(b64_dns))
[ 6738, 27394, 1330, 1635, 198, 198, 65, 2414, 62, 22583, 796, 705, 44, 3978, 41, 35257, 4093, 4093, 35641, 23155, 40, 4339, 70, 40, 3861, 46, 22, 68, 57, 22332, 6144, 66, 34, 85, 10262, 17922, 33, 57, 66, 15630, 86, 35, 48, 56, 4...
1.34532
3,782
import os import random import string import uuid from dotenv import load_dotenv from flask import request, g, jsonify, make_response from flask_cors import CORS from flask_sqlalchemy import SQLAlchemy as _SQLAlchemy from flask_marshmallow import Marshmallow from flask_migrate import Migrate from time import monotonic from notifications_utils.clients.zendesk.zendesk_client import ZendeskClient from notifications_utils.clients.statsd.statsd_client import StatsdClient from notifications_utils.clients.redis.redis_client import RedisClient from notifications_utils import logging, request_helper from werkzeug.exceptions import HTTPException as WerkzeugHTTPException, RequestEntityTooLarge from werkzeug.local import LocalProxy from app.callback.sqs_client import SQSClient from app.celery.celery import NotifyCelery from app.clients import Clients from app.clients.email.aws_ses import AwsSesClient from app.clients.sms.firetext import FiretextClient from app.clients.sms.loadtesting import LoadtestingClient from app.clients.sms.mmg import MMGClient from app.clients.sms.aws_sns import AwsSnsClient from app.clients.sms.twilio import TwilioSMSClient from app.clients.sms.aws_pinpoint import AwsPinpointClient from app.clients.performance_platform.performance_platform_client import PerformancePlatformClient from app.oauth.registry import oauth_registry from app.va.va_profile import VAProfileClient from app.va.mpi import MpiClient from app.encryption import Encryption from app.attachments.store import AttachmentStore DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ" DATE_FORMAT = "%Y-%m-%d" load_dotenv() class SQLAlchemy(_SQLAlchemy): """We need to subclass SQLAlchemy in order to override create_engine options""" db = SQLAlchemy() migrate = Migrate() ma = Marshmallow() notify_celery = NotifyCelery() encryption = Encryption() firetext_client = FiretextClient() loadtest_client = LoadtestingClient() mmg_client = MMGClient() aws_ses_client = AwsSesClient() from app.clients.email.govdelivery_client import GovdeliveryClient # noqa govdelivery_client = GovdeliveryClient() aws_sns_client = AwsSnsClient() twilio_sms_client = TwilioSMSClient( account_sid=os.getenv('TWILIO_ACCOUNT_SID'), auth_token=os.getenv('TWILIO_AUTH_TOKEN'), from_number=os.getenv('TWILIO_FROM_NUMBER'), ) aws_pinpoint_client = AwsPinpointClient() sqs_client = SQSClient() zendesk_client = ZendeskClient() statsd_client = StatsdClient() redis_store = RedisClient() performance_platform_client = PerformancePlatformClient() va_profile_client = VAProfileClient() mpi_client = MpiClient() attachment_store = AttachmentStore() clients = Clients() from app.oauth.jwt_manager import jwt # noqa from app.provider_details.provider_service import ProviderService # noqa provider_service = ProviderService() api_user = LocalProxy(lambda: g.api_user) authenticated_service = LocalProxy(lambda: g.authenticated_service)
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 334, 27112, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 6738, 42903, 1330, 2581, 11, 308, 11, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 42903, 62, 66, ...
3.071504
951
from flask import Flask, request, Response, jsonify #import pprint import json import spacy app = Flask(__name__) print("Loading spacy SM") _nlp = spacy.load("en_core_web_sm") #_nlp = spacy.load("en_core_web_trf") # performs better # Run with # <s>flask run --port=5002</s> # TODO Didn't work with spaCy, use # python app.py # Test with # curl http://127.0.0.1:5002/ --header "Content-Type: application/json" --request POST -d '{"doc" : {"text": "Napoleon was the emperor of the First French Empire."}}' @app.route('/', methods=['get', 'post']) # Run at flask startup (https://stackoverflow.com/a/55573732) with app.app_context(): pass if __name__ == '__main__': port = 5001 print("Running app... on port: ", port) app.wsgi_app = LoggingMiddleware(app.wsgi_app) #app.run(host='0.0.0.0', port=80) # expose 0.0.0.0 - esp. important for docker app.run(host='0.0.0.0', port=port) #app.run()
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 18261, 11, 33918, 1958, 198, 2, 11748, 279, 4798, 198, 11748, 33918, 198, 11748, 599, 1590, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 4798, 7203, 19031, 599, 1590, 9447, 4943, ...
2.523035
369
REGISTRY = {} from .simple_agent import SimpleAgent from .cql_agent import CQLAgent REGISTRY['simple'] = SimpleAgent REGISTRY['cql'] = CQLAgent
[ 31553, 1797, 40405, 796, 23884, 198, 198, 6738, 764, 36439, 62, 25781, 1330, 17427, 36772, 198, 6738, 764, 66, 13976, 62, 25781, 1330, 327, 9711, 36772, 198, 31553, 1797, 40405, 17816, 36439, 20520, 796, 17427, 36772, 198, 31553, 1797, 40...
3
48
import time_gen assert time_gen.get_file_list(None,['fits']) == True
[ 11748, 640, 62, 5235, 198, 198, 30493, 640, 62, 5235, 13, 1136, 62, 7753, 62, 4868, 7, 14202, 17414, 6, 21013, 6, 12962, 6624, 6407, 628 ]
2.730769
26
from random import * data = range(10000) # the original, naive version # "final" version
[ 6738, 4738, 1330, 1635, 198, 198, 7890, 796, 2837, 7, 49388, 8, 198, 198, 2, 262, 2656, 11, 24354, 2196, 628, 198, 2, 366, 20311, 1, 2196, 220, 198 ]
3.241379
29
if __name__=="__main__": import sys CpGLocationFileName = sys.argv[1] CpGsInfoFileName = sys.argv[2] outputFileName = sys.argv[3] CpGToLocationDict = makeCpGLocationDict(CpGLocationFileName) convertCpGsToLocations(CpGToLocationDict, CpGsInfoFileName, outputFileName)
[ 201, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 201, 198, 197, 11748, 25064, 201, 198, 197, 34, 79, 8763, 5040, 8979, 5376, 796, 25064, 13, 853, 85, 58, 16, 60, 201, 198, 197, 34, 79, 33884, 12360, 8979, 5376, 796,...
2.295082
122