src/p/y/python-cookbook-HEAD/cb2_examples/cb2_17_4_sol_1.py python-cookbook(Download)
from ctypes import windll, c_int, c_string, byref
# load 'Ehllapi.dll' (from current dir), and function 'hllapi' from the DLL
Ehllap32 = windll.ehllapi
hllapi = Ehllap32.hllapi
# prepare the arguments with types and initial values
h_func = c_int(1)
h_text = c_string('A')
h_len = c_int(1)
h_ret = c_int(999)
src/p/y/pysundials-HEAD/2.3.0/examples/cvodes/serial/cvsadjdenx.py pysundials(Download)
cvodes.CVodeSetQuadErrCon(cvode_mem, True, cvodes.CV_SS, reltolQ, abstolQ) time = cvodes.realtype(0.0) ncheck = ctypes.c_int(0) steps = 150 cvadj_mem = cvodes.CVadjMalloc(cvode_mem, steps, cvodes.CV_HERMITE)
src/p/y/py_examples-HEAD/opencv/CVtypes.py py_examples(Download)
import ctypes, os from ctypes import Structure, Union, POINTER, SetPointerType, CFUNCTYPE, cdll, byref from ctypes import c_char_p, c_double, c_float, c_byte, c_ubyte, c_int, c_void_p, c_ulong from ctypes import c_uint32, c_short, c_char, c_longlong # ----Load the DLLs ----------------------------------------------------------
src/p/y/pysundials-HEAD/2.3.0/examples/cvodes/serial/cvsadjkryx_pnt.py pysundials(Download)
tnext = 1e-08 t = cvodes.realtype(T0) ncheck = ctypes.c_int(0) rewt = cvodes.NVector([0]*NEQ) wdata = WebData() for i in range(NGRP):
src/p/y/pysundials-HEAD/2.3.0/examples/cvodes/serial/cvsadjkryx_int.py pysundials(Download)
tnext = 1e-08 t = cvodes.realtype(T0) ncheck = ctypes.c_int(0) rewt = cvodes.NVector([0]*(NEQ+1)) wdata = WebData() for i in range(NGRP):
src/p/y/pysundials-HEAD/2.3.0/examples/cvodes/serial/cvsadjbanx.py pysundials(Download)
#begin main code t = cvodes.realtype(0) ncheck = ctypes.c_int(0) reltol = 0 abstol = 1.0e-5
src/d/a/DAQpy-HEAD/examples/test_system.py DAQpy(Download)
DATA_BUFFER_SIZE = samplesPerChannel / iterations DataBuffer = ctypes.c_double * DATA_BUFFER_SIZE data = DataBuffer() samplesRead = ctypes.c_int() c_daqmx.DAQmxReadAnalogF64(taskHandle, DATA_BUFFER_SIZE, 10.0, c_daqmx.DAQmx_Val_GroupByChannel, data, DATA_BUFFER_SIZE, ctypes.byref(samplesRead), None) assert samplesRead.value == DATA_BUFFER_SIZE, "%s != %s" % (samplesRead.value, DATA_BUFFER_SIZE) totalSamples += samplesRead.value
DATA_BUFFER_SIZE = nSamples DataBuffer = ctypes.c_double * DATA_BUFFER_SIZE data = DataBuffer() samplesRead = ctypes.c_int() try: c_daqmx.DAQmxReadAnalogF64(taskHandle, DATA_BUFFER_SIZE, 10.0, c_daqmx.DAQmx_Val_GroupByChannel, data, DATA_BUFFER_SIZE, ctypes.byref(samplesRead), None)
src/d/a/DAQpy-HEAD/examples/daqmxtest.py DAQpy(Download)
DATA_BUFFER_SIZE = 1000 DataBuffer = ctypes.c_double * DATA_BUFFER_SIZE data = DataBuffer() samplesRead = ctypes.c_int() c_daqmx.DAQmxReadAnalogF64(taskHandle, DATA_BUFFER_SIZE, 10.0, c_daqmx.DAQmx_Val_GroupByChannel, data, DATA_BUFFER_SIZE, ctypes.byref(samplesRead), None) print "Acquired %d points" % samplesRead.value
def every_n_callback(taskHandle, everyNSamplesEventType, nSamples, callbackData): # Read Code DATA_BUFFER_SIZE = nSamples DataBuffer = ctypes.c_double * DATA_BUFFER_SIZE data = DataBuffer() samplesRead = ctypes.c_int() c_daqmx.DAQmxReadAnalogF64(taskHandle, DATA_BUFFER_SIZE, 10.0, c_daqmx.DAQmx_Val_GroupByChannel, data, DATA_BUFFER_SIZE, ctypes.byref(samplesRead), None)
src/c/l/clyther-0.1-beta-3/examples/future/test2.py clyther(Download)
import copencl as cl import clyther from ctypes import c_float,c_int from clyther import runtime as clrt from clyther.memory import global_array_type, shared_array_type import numpy as np
src/c/l/clyther-0.1-beta-3/examples/example2.py clyther(Download)
import copencl as cl import clyther from ctypes import c_float,c_int from clyther import runtime as clrt, math from clyther.memory import global_array_type, shared_array_type import numpy as np
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next