code stringlengths 3 6.57k |
|---|
self.api.xlOpenDriver() |
__del__(self) |
self.api.xlCloseDriver() |
getchannelIdx(self, channel=0, app_name=None, busType=vxlapy.XL_INTERFACE_VERSION) |
ctypes.c_uint(0) |
ctypes.c_uint(0) |
ctypes.c_uint(0) |
print('Channel %d idex %d found'%(channel,channelIdx) |
VxlBaseException("No HW port available") |
getChannelMask(self, busType, channelIdx=1, xlInterfaceVersion=vxlapy.XL_INTERFACE_VERSION) |
vxlapy.XLdriverConfig() |
self.api.xlGetDriverConfig(ctypes.byref(driverConfig) |
range(driverConfig.channelCount) |
print("Channel %d cap 0x%x ifver %d" % (i, driverConfig.channel[i].channelBusCapabilities, driverConfig.channel[i].interfaceVersion) |
print("Using %s, (sn=%06d, mask=0x%04x) |
stringify(driverConfig.channel[i].name) |
openPort(self, busType, userName='vxlapy', accessMask=None, permissionMask=None, rxQueueSize=32768, xlInterfaceVersion=vxlapy.XL_INTERFACE_VERSION_V4) |
self.api.xlOpenPort(ctypes.byref(self.portHandle) |
ctypes.byref(self.permissionMask) |
VxlBaseException("No HW port available") |
activateChannel(self, bustype) |
self.api.xlActivateChannel(self.portHandle, self.accessMask, bustype, 0) |
deactivateChannel(self) |
self.api.xlDeactivateChannel(self.portHandle, self.accessMask) |
flush_rx_buffer(self) |
self.api.xlFlushReceiveQueue(self.portHandle) |
flush_tx_buffer(self) |
self.api.xlCanFlushTransmitQueue(self.portHandle, self.accessMask) |
closePort(self) |
self.api.xlDeactivateChannel(self.portHandle, self.accessMask) |
self.api.xlClosePort(self.portHandle) |
self.api.xlCloseDriver() |
receive(self) |
VxlBase() |
StateBasedBucketer(object) |
__init__(self, encoder) |
fit(self, X, y=None) |
self.encoder.fit_transform(X) |
dt_encoded.drop_duplicates() |
self.dt_states.assign(state = range(len(self.dt_states) |
len(self.dt_states) |
predict(self, X, y=None) |
self.encoder.transform(X) |
pd.merge(dt_encoded, self.dt_states, how='left') |
dt_transformed.fillna(-1, inplace=True) |
astype(int) |
as_matrix() |
fit_predict(self, X, y=None) |
self.fit(X) |
self.predict(X) |
TestSeriesPlots(TestPlotBase) |
setup_method(self, method) |
TestPlotBase.setup_method(self, method) |
mpl.rcdefaults() |
tm.makeTimeSeries() |
test_hist_legacy(self) |
_check_plot_works(self.ts.hist) |
_check_plot_works(self.ts.hist, grid=False) |
_check_plot_works(self.ts.hist, figsize=(8, 10) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(self.ts.hist, by=self.ts.index.month) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(self.ts.hist, by=self.ts.index.month, bins=5) |
self.plt.subplots(1, 1) |
_check_plot_works(self.ts.hist, ax=ax) |
_check_plot_works(self.ts.hist, ax=ax, figure=fig) |
_check_plot_works(self.ts.hist, figure=fig) |
tm.close() |
self.plt.subplots(1, 2) |
_check_plot_works(self.ts.hist, figure=fig, ax=ax1) |
_check_plot_works(self.ts.hist, figure=fig, ax=ax2) |
pytest.raises(ValueError) |
self.ts.hist(by=self.ts.index, figure=fig) |
test_hist_bins_legacy(self) |
DataFrame(np.random.randn(10, 2) |
df.hist(bins=2) |
len(ax.patches) |
test_hist_layout(self) |
pytest.raises(ValueError) |
df.height.hist(layout=(1, 1) |
pytest.raises(ValueError) |
df.height.hist(layout=[1, 1]) |
test_hist_layout_with_by(self) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(df.height.hist, by=df.gender, layout=(2, 1) |
self._check_axes_shape(axes, axes_num=2, layout=(2, 1) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(df.height.hist, by=df.gender, layout=(3, -1) |
self._check_axes_shape(axes, axes_num=2, layout=(3, 1) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(df.height.hist, by=df.category, layout=(4, 1) |
self._check_axes_shape(axes, axes_num=4, layout=(4, 1) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(df.height.hist, by=df.category, layout=(2, -1) |
self._check_axes_shape(axes, axes_num=4, layout=(2, 2) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(df.height.hist, by=df.category, layout=(3, -1) |
self._check_axes_shape(axes, axes_num=4, layout=(3, 2) |
tm.assert_produces_warning(UserWarning) |
_check_plot_works(df.height.hist, by=df.category, layout=(-1, 4) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.