query stringlengths 9 9.05k | document stringlengths 10 222k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
set_loop_bandwidth(self, float bw) Set the loop bandwidth. Set the loop filter's bandwidth to . This should be between 2pi/200 and 2pi/100 (in rads/samp). It must also be a positive number. When a new damping factor is set, the gains, alpha and beta, of the loop are recalculated by a call to update_gains(). | def set_loop_bandwidth(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_ccf_sptr_set_loop_bandwidth(self, *args, **kwargs) | [
"def set_loop_bandwidth(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_set_loop_bandwidth(self, *args, **kwargs)",
"def set_bandwidth(self, bandwidth):\r\n self.obs.bandwidthHz = float(bandwidth)\r\n self.ave.bandwidthHz = float(bandwidth)\r\n self.hot.b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set_max_rate_deviation(self, float m) Set the maximum deviation from 0 d_rate can have | def set_max_rate_deviation(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_ccf_sptr_set_max_rate_deviation(self, *args, **kwargs) | [
"def set_max_rate_deviation(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_set_max_rate_deviation(self, *args, **kwargs)",
"def error_rate_deviation(self, error_rate_deviation):\n\n self._error_rate_deviation = error_rate_deviation",
"def property_max_rate(self, pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_loop_bandwidth(self) > float Returns the loop bandwidth. | def get_loop_bandwidth(self):
return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_loop_bandwidth(self) | [
"def get_loop_bandwidth(self):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_loop_bandwidth(self)",
"def set_loop_bandwidth(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_set_loop_bandwidth(self, *args, **kwargs)",
"def set_loop_bandwidth(self, *args, *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_damping_factor(self) > float Returns the loop damping factor. | def get_damping_factor(self):
return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_damping_factor(self) | [
"def get_damping_factor(self):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_damping_factor(self)",
"def velocity_damping(self, kpar):\n return (1.0 + (kpar * self.sigma_v(self.ps_redshift))**2.)**-1.",
"def set_damping_factor(self, *args, **kwargs):\n return _digital_swig.digi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_clock_rate(self) > float Returns the current clock rate. | def get_clock_rate(self):
return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_clock_rate(self) | [
"def get_clock_rate(self):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_clock_rate(self)",
"def get_sample_clock_rate(self):\n d = float64(0)\n CALL ('GetSampClkRate', self, ctypes.byref(d))\n return d.value",
"def get_convert_clock_rate(self):\n d = float64(0)\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pfb_clock_sync_ccf(double sps, float loop_bw, __dummy_4__ taps, unsigned int filter_size = 32, float init_phase = 0, float max_rate_deviation = 1.5, int osps = 1) > digital_pfb_clock_sync_ccf_sptr Timing synchronizer using polyphase filterbanks. This block performs timing synchronization for PAM signals by minimizing t... | def pfb_clock_sync_ccf(*args, **kwargs):
return _digital_swig.pfb_clock_sync_ccf(*args, **kwargs) | [
"def mfccInitFilterBanks(fs, nfft):\n\n # filter bank params:\n lowfreq = 133.33\n linsc = 200/3.\n logsc = 1.0711703\n numLinfilterTotal = 13\n numLogFilt = 27\n\n if fs < 8000:\n nlogfil = 5\n\n # Total number of filters\n nFiltTotal = numLinfilterTotal + numLogFilt\n\n # Comp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__init__(self) > digital_pfb_clock_sync_fff_sptr __init__(self, p) > digital_pfb_clock_sync_fff_sptr | def __init__(self, *args):
this = _digital_swig.new_digital_pfb_clock_sync_fff_sptr(*args)
try: self.this.append(this)
except: self.this = this | [
"def __init__(self, *args):\n this = _digital_swig.new_digital_pfb_clock_sync_ccf_sptr(*args)\n try: self.this.append(this)\n except: self.this = this",
"def pfb_clock_sync_fff(*args, **kwargs):\n return _digital_swig.pfb_clock_sync_fff(*args, **kwargs)",
"def pfb_clock_sync_ccf(*args, **k... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_taps(self) > __dummy_11__ Returns all of the taps of the matched filter | def get_taps(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_taps(self) | [
"def get_taps(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_taps(self)",
"def get_diff_taps(self):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_diff_taps(self)",
"def get_swaps(self, t: int) -> list:\n swaps = []\n for (i, j) in self._arcs:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_diff_taps(self) > __dummy_11__ Returns all of the taps of the derivative filter | def get_diff_taps(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_diff_taps(self) | [
"def get_diff_taps(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_diff_taps(self)",
"def get_diff_channel_taps(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_diff_channel_taps(self, *args, **kwargs)",
"def get_diff_channel_taps(self, *args, **... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_channel_taps(self, int channel) > __dummy_4__ Returns the taps of the matched filter for a particular channel | def get_channel_taps(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_channel_taps(self, *args, **kwargs) | [
"def get_channel_taps(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_channel_taps(self, *args, **kwargs)",
"def get_diff_channel_taps(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_diff_channel_taps(self, *args, **kwargs)",
"d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_diff_channel_taps(self, int channel) > __dummy_4__ Returns the taps in the derivative filter for a particular channel | def get_diff_channel_taps(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_diff_channel_taps(self, *args, **kwargs) | [
"def get_diff_channel_taps(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_diff_channel_taps(self, *args, **kwargs)",
"def get_channel_taps(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_channel_taps(self, *args, **kwargs)",
"d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_taps_as_string(self) > string Return the taps as a formatted string for printing | def get_taps_as_string(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_taps_as_string(self) | [
"def get_taps_as_string(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_taps_as_string(self)",
"def get_diff_taps_as_string(self):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_diff_taps_as_string(self)",
"def get_diff_taps_as_string(self):\n return _digital_s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_diff_taps_as_string(self) > string Return the derivative filter taps as a formatted string for printing | def get_diff_taps_as_string(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_diff_taps_as_string(self) | [
"def get_diff_taps_as_string(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_diff_taps_as_string(self)",
"def get_taps_as_string(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_taps_as_string(self)",
"def get_taps_as_string(self):\n return _digital_swig.d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set_loop_bandwidth(self, float bw) Set the loop bandwidth. Set the loop filter's bandwidth to . This should be between 2pi/200 and 2pi/100 (in rads/samp). It must also be a positive number. When a new damping factor is set, the gains, alpha and beta, of the loop are recalculated by a call to update_gains(). | def set_loop_bandwidth(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_set_loop_bandwidth(self, *args, **kwargs) | [
"def set_loop_bandwidth(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_set_loop_bandwidth(self, *args, **kwargs)",
"def set_bandwidth(self, bandwidth):\r\n self.obs.bandwidthHz = float(bandwidth)\r\n self.ave.bandwidthHz = float(bandwidth)\r\n self.hot.b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set_damping_factor(self, float df) Set the loop damping factor. Set the loop filter's damping factor to . The damping factor should be sqrt(2)/2.0 for critically damped systems. Set it to anything else only if you know what you are doing. It must be a number between 0 and 1. When a new damping factor is set, the gains,... | def set_damping_factor(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_set_damping_factor(self, *args, **kwargs) | [
"def set_freq_damping(self, freq, damping):\n self.k = freq * freq * 4 * math.pi * math.pi\n self.b = 2 * math.sqrt(self.k) * damping\n return",
"def get_damping_factor(self):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_damping_factor(self)",
"def setFlyingVelocityMod(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set_max_rate_deviation(self, float m) Set the maximum deviation from 0 d_rate can have | def set_max_rate_deviation(self, *args, **kwargs):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_set_max_rate_deviation(self, *args, **kwargs) | [
"def set_max_rate_deviation(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_set_max_rate_deviation(self, *args, **kwargs)",
"def error_rate_deviation(self, error_rate_deviation):\n\n self._error_rate_deviation = error_rate_deviation",
"def property_max_rate(self, pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_loop_bandwidth(self) > float Returns the loop bandwidth. | def get_loop_bandwidth(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_loop_bandwidth(self) | [
"def get_loop_bandwidth(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_loop_bandwidth(self)",
"def set_loop_bandwidth(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_set_loop_bandwidth(self, *args, **kwargs)",
"def set_loop_bandwidth(self, *args, *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_damping_factor(self) > float Returns the loop damping factor. | def get_damping_factor(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_damping_factor(self) | [
"def get_damping_factor(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_damping_factor(self)",
"def velocity_damping(self, kpar):\n return (1.0 + (kpar * self.sigma_v(self.ps_redshift))**2.)**-1.",
"def set_damping_factor(self, *args, **kwargs):\n return _digital_swig.digi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get_clock_rate(self) > float Returns the current clock rate. | def get_clock_rate(self):
return _digital_swig.digital_pfb_clock_sync_fff_sptr_get_clock_rate(self) | [
"def get_clock_rate(self):\n return _digital_swig.digital_pfb_clock_sync_ccf_sptr_get_clock_rate(self)",
"def get_sample_clock_rate(self):\n d = float64(0)\n CALL ('GetSampClkRate', self, ctypes.byref(d))\n return d.value",
"def get_convert_clock_rate(self):\n d = float64(0)\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pfb_clock_sync_fff(double sps, float loop_bw, __dummy_4__ taps, unsigned int filter_size = 32, float init_phase = 0, float max_rate_deviation = 1.5, int osps = 1) > digital_pfb_clock_sync_fff_sptr Timing synchronizer using polyphase filterbanks. This block performs timing synchronization for PAM signals by minimizing t... | def pfb_clock_sync_fff(*args, **kwargs):
return _digital_swig.pfb_clock_sync_fff(*args, **kwargs) | [
"def fn_buildFilters(params, fs):\n bandPassRange = params.bpRanges\n params.filtType = 'bandpass'\n params.filterSignal = True\n \n # Handle different filter cases:\n # 1) low pass\n if params.bpRanges[0] == 0:\n # they only specified a top freqency cutoff, so we need a low pass\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__init__(self) > digital_pn_correlator_cc_sptr __init__(self, p) > digital_pn_correlator_cc_sptr | def __init__(self, *args):
this = _digital_swig.new_digital_pn_correlator_cc_sptr(*args)
try: self.this.append(this)
except: self.this = this | [
"def pn_correlator_cc(*args, **kwargs):\n return _digital_swig.pn_correlator_cc(*args, **kwargs)",
"def __init__(self, *args):\n this = _digital_swig.new_digital_correlate_access_code_tag_bb_sptr(*args)\n try: self.this.append(this)\n except: self.this = this",
"def __init__(self, *args):\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pn_correlator_cc(int degree, int mask = 0, int seed = 1) > digital_pn_correlator_cc_sptr PN code sequential search correlator. Receives complex baseband signal, outputs complex correlation against reference PN code, one sample per PN code period. The PN sequence is generated using a GLFSR. | def pn_correlator_cc(*args, **kwargs):
return _digital_swig.pn_correlator_cc(*args, **kwargs) | [
"def create_compcorr(name='CompCor'):\n compproc = pe.Workflow(name=name)\n inputspec = pe.Node(util.IdentityInterface(fields=['num_components',\n 'realigned_file',\n 'mean_file',\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__init__(self) > digital_probe_density_b_sptr __init__(self, p) > digital_probe_density_b_sptr | def __init__(self, *args):
this = _digital_swig.new_digital_probe_density_b_sptr(*args)
try: self.this.append(this)
except: self.this = this | [
"def __init__(self, params: parameters_lib.SwirlLMParameters):\n super(ConstantDensity, self).__init__(params)\n\n self.rho = params.rho",
"def probe_density_b(*args, **kwargs):\n return _digital_swig.probe_density_b(*args, **kwargs)",
"def __init__(self, position, spectrum, brightness):\n pass",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
probe_density_b(double alpha) > digital_probe_density_b_sptr This block maintains a running average of the input stream and makes it available as an accessor function. The input stream is type unsigned char. If you send this block a stream of unpacked bytes, it will tell you what the bit density is. | def probe_density_b(*args, **kwargs):
return _digital_swig.probe_density_b(*args, **kwargs) | [
"def __init__(self, *args):\n this = _digital_swig.new_digital_probe_density_b_sptr(*args)\n try: self.this.append(this)\n except: self.this = this",
"def __call__(self, rgba, alt_prior=None, grayscale=True):\n rgb = rgb_bin(rgba, self.binsize)\n prob = self.table.get(rgb, 0)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__init__(self) > digital_probe_mpsk_snr_est_c_sptr __init__(self, p) > digital_probe_mpsk_snr_est_c_sptr | def __init__(self, *args):
this = _digital_swig.new_digital_probe_mpsk_snr_est_c_sptr(*args)
try: self.this.append(this)
except: self.this = this | [
"def __init__(self, *args):\n this = _digital_swig.new_digital_scrambler_bb_sptr(*args)\n try: self.this.append(this)\n except: self.this = this",
"def __init__(self, *args):\n this = _digital_swig.new_digital_probe_density_b_sptr(*args)\n try: self.this.append(this)\n ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
type(self) > snr_est_type_t Return the type of estimator in use. | def type(self):
return _digital_swig.digital_probe_mpsk_snr_est_c_sptr_type(self) | [
"def is_estimator(model):\n if type(model) == type:\n return issubclass(model, BaseEstimator)\n\n return isinstance(model, BaseEstimator)",
"def test_sklearn_check_estimator(seco_estimator_class):\n check_estimator(seco_estimator_class)",
"def _get_estimator_name(estimator):\n if isinstance(e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
msg_nsample(self) > int Return how many samples between SNR messages. | def msg_nsample(self):
return _digital_swig.digital_probe_mpsk_snr_est_c_sptr_msg_nsample(self) | [
"def n_samples(self):\n return len(self.sampler)",
"def n_profile_samples(self):\n return self.__n_profile_samples",
"def getNumSamples(sound):\n return getLength(sound)",
"def packet_get_samples_per_frame(cls, data: bytes) -> int:\n return _lib.opus_packet_get_samples_per_frame(data, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set_type(self, snr_est_type_t t) Set type of estimator to use. | def set_type(self, *args, **kwargs):
return _digital_swig.digital_probe_mpsk_snr_est_c_sptr_set_type(self, *args, **kwargs) | [
"def setType(self, ttype):\n if ttype == LINEAR_IMPLICIT:\n self.type = ttype\n elif ttype == NONLINEAR:\n self.type = ttype\n else:\n raise DREAMException(\"Solver: Unrecognized solver type: {}.\".format(ttype))",
"def set_type(self, ttype):\n self.typ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set_msg_nsample(self, int n) Set the number of samples between SNR messages. | def set_msg_nsample(self, *args, **kwargs):
return _digital_swig.digital_probe_mpsk_snr_est_c_sptr_set_msg_nsample(self, *args, **kwargs) | [
"def set_sample_number(self):\r\n self.n_samples = self.exprs.shape[0]",
"def set_n_rejection_samples(self, rejection_samples=200):\n if rejection_samples < 0:\n raise ValueError('Must have non-negative rejection samples.')\n self._n_rejection_samples = rejection_samples",
"def r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
probe_mpsk_snr_est_c(snr_est_type_t type, int msg_nsamples = 10000, double alpha = 0.001) > digital_probe_mpsk_snr_est_c_sptr A probe for computing SNR of a signal. This is a probe block (a sink) that can be used to monitor and retrieve estimations of the signal SNR. This probe is designed for use with MPSK signals esp... | def probe_mpsk_snr_est_c(*args, **kwargs):
return _digital_swig.probe_mpsk_snr_est_c(*args, **kwargs) | [
"def type(self):\n return _digital_swig.digital_probe_mpsk_snr_est_c_sptr_type(self)",
"def set_type(self, *args, **kwargs):\n return _digital_swig.digital_probe_mpsk_snr_est_c_sptr_set_type(self, *args, **kwargs)",
"def msr (riskfree_rate,er,cov):\r\n n=er.shape[0]\r\n init_guess=np.repeat(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__init__(self) > digital_scrambler_bb_sptr __init__(self, p) > digital_scrambler_bb_sptr | def __init__(self, *args):
this = _digital_swig.new_digital_scrambler_bb_sptr(*args)
try: self.this.append(this)
except: self.this = this | [
"def __init__(self, *args):\n this = _digital_swig.new_digital_additive_scrambler_bb_sptr(*args)\n try: self.this.append(this)\n except: self.this = this",
"def __init__(self, *args):\n this = _digital_swig.new_digital_descrambler_bb_sptr(*args)\n try: self.this.append(this)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
scrambler_bb(int mask, int seed, int len) > digital_scrambler_bb_sptr Scramble an input stream using an LFSR. This block works on the LSB only of the input data stream, i.e., on an "unpacked binary" stream, and produces the same format on its output. | def scrambler_bb(*args, **kwargs):
return _digital_swig.scrambler_bb(*args, **kwargs) | [
"def descrambler_bb(*args, **kwargs):\n return _digital_swig.descrambler_bb(*args, **kwargs)",
"def bpsk(input_bits, noise):\n modulator = Modulator()\n demodulator = Demodulator()\n channel = Channel()\n signal = modulator.make_bpsk_mod(input_bits)\n\n signal = channel.send_si... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__init__(self) > digital_simple_framer_sptr __init__(self, p) > digital_simple_framer_sptr | def __init__(self, *args):
this = _digital_swig.new_digital_simple_framer_sptr(*args)
try: self.this.append(this)
except: self.this = this | [
"def __init__(self, *args):\n this = _digital_swig.new_digital_framer_sink_1_sptr(*args)\n try: self.this.append(this)\n except: self.this = this",
"def __init__(self, *args):\n this = _digital_swig.new_digital_descrambler_bb_sptr(*args)\n try: self.this.append(this)\n ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Standard clamping of a value into a fixed range (in this case 4.0 to 4.0) | def clip(val):
return max(min(val, 4.0), -4.0) | [
"def clamp(x='0.0', min='0.0', max='1.0'):\n\n pass",
"def clamp(inclusive_lower_bound: int,\n inclusive_upper_bound: int,\n value: int) -> int:\n if value <= inclusive_lower_bound:\n return inclusive_lower_bound\n elif value >= inclusive_upper_bound:\n return inclusive_up... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns 22 confusion matrix assuing binary data values as per [ [true_negatives, false_positives], [false_negatives, true_positives] ] | def confusion_matrix(actual, predictions):
if predictions.shape[0] != actual.shape[0]:
raise ValueError("predictions and actual must be the same length")
true_negatives = 0
false_negatives = 0
false_positives = 0
true_positives = 0
for actual_value, predicted_val... | [
"def buildConfusionMatrix(predictedLabels, correctLabels):\n confusionMatrix = {}\n confusionMatrix['positive', 'positive'] = 0\n confusionMatrix['positive', 'neutral'] = 0\n confusionMatrix['positive', 'negative'] = 0\n confusionMatrix['neutral', 'positive'] = 0\n confusionMatrix['neutral', 'neut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
computes the accuracy by referencing the confusion matrix function from above, must be defined together! | def accuracy(actual, predictions):
if predictions.shape[0] != actual.shape[0]:
raise ValueError("predictions and actual must be the same length!")
CM = confusion_matrix(actual, predictions)
acc = (CM[1][1]+CM[0][0])/(CM[1][1]+CM[0][0]+CM[1][0]+CM[0][1])
return acc | [
"def accuracy(confusion_matrix):\n\n total = 0\n correct = 0\n for ii in confusion_matrix:\n total += sum(confusion_matrix[ii].values())\n correct += confusion_matrix[ii].get(ii, 0)\n\n if total:\n return float(correct) / float(total)\n else:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns precision and recall using confusion matrix above as per wiki definition | def precision_and_recall(actual, predictions):
if predictions.shape[0] != actual.shape[0]:
raise ValueError("predictions and actual must be the same length")
CM = confusion_matrix(actual, predictions)
#[[TN, FP],[FN, TP]]
if CM[1][1] != 0:
precision = CM[1][1]/(CM[1... | [
"def calc_precision(confusion_matrix):\n predicted = confusion_matrix.sum(1)\n correct = confusion_matrix.diagonal()\n return correct / predicted",
"def getPrecision(label, confusionMatrix):\n ##### START OF YOUR CODE HERE ######\n return 0\n ##### END OF YOUR CODE HERE ######",
"def calc_rec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate the jitter in a set of actual zero crossings, given the ideal crossings and unit interval. | def calc_jitter(ui, nbits, pattern_len, ideal_xings, actual_xings):
jitter = []
t_jitter = []
i = 0
# Assemble the TIE track.
for actual_xing in actual_xings:
tie = actual_xing - ideal_xings[i]
# Check for multiple crossings and skip them.
if(tie < (-ui / 2.)):
... | [
"def calc_jitter(\n ui, nui, pattern_len, ideal_xings, actual_xings, rel_thresh=6, num_bins=99, zero_mean=True\n) -> JitterResults:\n\n def my_hist(x):\n \"\"\"\n Calculates the probability mass function (PMF) of the input vector,\n enforcing an output range of [-UI/2, +UI/2], sweeping ev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the next rise/set after a given time. Fetches date by searching the chart of rise/set times as obtained from | def get_next_event_after_dt(self, start_dt, body="moon", event="rise"):
# Other methods, such as using astropy's astroplan, were too slow.
for day in self.charts[body]:
if not event in day:
continue # no rise/set that day
event_dt = self._get_datetime_from_iso(... | [
"def find_next_closest():\n global month, day, year, time\n global available\n page_text = \"\"\n try:\n while page_text != available:\n increment_time()\n dateField = browser.find_element_by_class_name(\"ng_cal_input_field\")\n dateField.send_keys(month + \" \" +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the current moon phase and waxing/waning information. | def get_moon_phase(self):
# These numbers are just guesses.
phases = {
"new": (0, 0.005),
"crescent": (0.005, 0.47),
"quarter": (0.47, 0.53),
"gibbous": (0.53, 0.9925),
"full": (0.9925, 1),
}
now_dt = datetime.datetime.now()
... | [
"def moon(self) -> int:\n return self._moon",
"def moon_phase(self):\n # ('new', 'waxing crescent', 'first quarter', 'waxing gibbous', 'full ', 'waning gibbous', 'third quarter', 'waning crescent')\n # 'new', 'first quarter', 'full ', 'third quarter'\n days = (self.year * self.length_o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test GaussLegendre quadrature nodes and weights | def test_gaussLeg():
sc = simc.SimClass()
n,w = sc.gaussLeg(16,-1,1)
w_corr = np.array([0.027152459411754, 0.062253523938648, 0.095158511682493, \
0.124628971255534, 0.149595988816577, 0.169156519395003, 0.182603415044924, \
0.189450610455069, 0.189450610455069, 0.182603415044924, 0.169156519395003, \
0.14959... | [
"def evaluate_basis_gauss(self):\n phi = np.zeros((len(self.x), self.N_s))\n dphi_w = np.zeros((len(self.x), self.N_s))\n\n for n in range(self.N_s):\n\n # Get the Legendre polynomial of order n and its gradient\n l = L.basis(n)\n dl = l.deriv()\n\n #... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test computation of rhs function. | def test_rhsf():
sc = simc.SimClass()
sc.createInterface()
r = sc.rhsf(0)
assert np.abs(r - np.real((-1/(3+3j) - 1/(-2.5-2.5j)))) < 1e-13
r = sc.rhsf()
assert max(np.abs(r-np.real(1/(sc.zDrops-(3+3j)) + 1/(sc.zDrops-(-2.5-2.5j))))) < 1e-13 | [
"def test(self, x, y):\n return self.model.evaluate(x, y)",
"def test_scipy_eval(self):\n for method in ['2-point',\n '3-point',\n 'cs']:\n hes = Scipy(self.cost_func.problem, self.cost_func.jacobian)\n hes.method = method\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
print out a 4x4 grid in 5width columns within a box | def print_grid (grid):
print("+--------------------+")
for i in range(4):
print("|",end='')
for j in range(4):
if(grid[i][j]==0):
print("{:<5}".format(" "),end='')
else:
print("{:<5}".format(grid[i][j]),end='')
print("|",en... | [
"def print_grid (grid):\r\n print(\"+--------------------+\")\r\n for y in range(4):\r\n print(\"|\", end=\"\")\r\n for x in range(4):\r\n if grid[y][x]==0:\r\n print(\" \"*5, end=\"\")\r\n else:\r\n print(\"{0:<5}\".format(grid[y][x]), end=\"\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check if 2 grids are equal return boolean value | def grid_equal (grid1, grid2):
if(grid1==grid2):
return True
else:
return False | [
"def grid_equal (grid1, grid2):\r\n for x in range(4):\r\n for y in range(4):\r\n if grid1[x][y]!=grid2[x][y]:\r\n return False\r\n return True",
"def equals(tile1, tile2) -> bool:\n\n # compare y dim\n if len(tile1) != len(tile2):\n return False\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses a flat tree to a Tree instance | def parse_flat_tree(self, flat_tree):
import copy
s = copy.copy(flat_tree)
words = deque(s.split(" "))
root = words.popleft()
if words.popleft() == '(': # if the root has children
self.parse_flat_tree_helper(self.t, root, words)
return self.t | [
"def from_file(cls, fPath):\n with open(fPath) as f:\n s = ' '.join(line for line in f).replace('\\n', ' ')\n s = s.replace('(', ' ( ')\n s = s.replace(')', ' ) ')\n nodes = s.split()\n\n trees = []\n # stack holds the ancestors of the given node\n stack =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the count of matching queries to matching_to query passed | def find_query_count(self, matching_to):
node, sep, query = matching_to.partition(" ")
q = deque()
q.append(node)
count = 0
while len(q) > 0:
c = q.popleft()
q.extend(self.t.treemap[c].children)
count += self.t.query(c, query)
return co... | [
"def num_exact_matches(self, possible_matches):\n count = 0\n\n for score, request in possible_matches:\n if score.is_exact_match():\n count += 1\n\n return count",
"def number_of_matches(self):\n return len(self.matches)",
"def count(self, where_dict={}):\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve root folder contents | def retrieve_folder():
root_folder_contents = account.get('storage/folders/root/contents')
for resource in root_folder_contents.get_paging_iterator():
print(resource.data) | [
"def get_root(self):\n return self.get_obj(self._root_path)",
"def getLocalFolderListing(self,root=None):\n root = 1 and root or self.options.path\n fileList = []\n forders = []\n\n for root, dirnames, files in os.walk(self.options.path):\n for subdirname in dirnames:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get ratings similarity between movies in the movie recommendation pool and the target movie. | def get_ratings_similarity(self):
# Get average rating of the target movie
query_1 = "SELECT AVG(rating) FROM ratings WHERE movie_id=%i" % self.target_movie.movie_id
res = self.db.execute(query_1).fetchall()
target_movie_average_rating = res[0][0]
pmids = []
for rm in s... | [
"def recommend(self, target_movie_id, num_recommendations):\n\n\n print(\" - Getting target movie record\")\n self.target_movie = self.db.query(Movie).filter_by(movie_id=target_movie_id).first()\n assert self.target_movie is not None\n\n self.get_movie_recommendation_pool(num_recommendat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get tags similarity between movies in the movie recommendation pool and the target movie. | def get_tags_similarity(self):
target_movie_tags = self.get_tags_count_(self.target_movie.movie_id)
print("get_tags_similarity: target_movie_tags: %r" % target_movie_tags)
tags_similarity = {}
users_query = "select distinct user_id from tags where movie_id=%i" % \
... | [
"def get_ratings_similarity(self):\n\n # Get average rating of the target movie\n query_1 = \"SELECT AVG(rating) FROM ratings WHERE movie_id=%i\" % self.target_movie.movie_id\n res = self.db.execute(query_1).fetchall()\n target_movie_average_rating = res[0][0]\n\n pmids = []\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recommend movies that are similar to target_movie_id. | def recommend(self, target_movie_id, num_recommendations):
print(" - Getting target movie record")
self.target_movie = self.db.query(Movie).filter_by(movie_id=target_movie_id).first()
assert self.target_movie is not None
self.get_movie_recommendation_pool(num_recommendations * 10)
... | [
"def _find_similar_movies(request):\n movie_ratings = _process_data[\"movie_ratings\"]\n movie_genres = _process_data[\"movie_genres\"]\n buff_point = _process_data[\"buff_point\"]\n buff_limit = _process_data[\"buff_limit\"]\n\n movies_finder = build_similar_movies_db.SimilarMovieFinder(\n mo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print the top n recommended movies nicely | def print_recommendations(self, n=10):
print("Title: {}, Genres: {}".format(self.target_movie.title, self.target_movie.genres))
print("="*120)
r_count = 0
print('{} {} {}'.format('Similarity'.ljust(12), 'Movie'.ljust(60), 'Genres'))
print('-'*120)
for k, v in self.final_... | [
"def less_criticized():\n reader = initialize_reader()\n movies_less = []\n for row in reader:\n if(row[2]):\n movies_less.append({\"name\": row[11], \"num_critic_for_users\": int(row[2])}) \n new_list = sorted(movies_less, key=lambda i: i['num_critic_for_users'])\n topTenList = new... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the kernel id. | def get_kernel_id():
import ipykernel
connection_file = os.path.basename(ipykernel.get_connection_file())
return connection_file.split('-', 1)[1].split('.')[0] | [
"def get_instance_kernel(self,instance_id):\n instkernel = conn.get_instance_attribute(instance_id, 'kernel')\n try:\n str_kernel = str(instkernel).split(':', 2) #convert object to string and split to parse the string elements\n a = str_kernel[1].split(\"'\", 2)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reload report template data. | def reloadReportData(self, tmpl_filename=None):
if tmpl_filename is None:
tmpl_filename = self._report_template_filename
report_gen_system.iqReportGeneratorSystem.reloadReportData(self, tmpl_filename) | [
"def reload_data(self):\r\n self.pre_requisite()",
"def reset(self):\n self.__template = None",
"def reloadData(self, event):\n print(\"Reload data from the data folder. \")\n self.dataMgr.loadCSVData('D')\n gv.iChartPanel1.updateDisplay()",
"def load_generated_report(self, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get report folder path. | def getReportDir(self):
return self._report_dir | [
"def get_reportDirectory(self):\n return self.get_basefdir()",
"def reports_dir():\n return _mkifnotexists(\"web/reports\")",
"def def_report_path():\n if os.name == 'nt':\n return(getwindoc())\n else:\n return(os.getenv(\"HOME\"))",
"def filename(self):\n # create the fol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate report and save it in RTF file. | def _genRTFReport(self, report):
if report is None:
report = self._report_template
data_rep = self.generateReport(report)
if data_rep:
rep_file_name = os.path.join(self.getReportDir(), '%s_report_result.rtf' % data_rep['name'])
template_file_name = os.path.abs... | [
"def generate_report():",
"def save_report():\n ct.save_report()",
"def generate_report(self):\n if self.report_format == \"csv\":\n print(\"[+] Building the report -- you selected a csv report.\")\n self.output_csv_report = self._build_output_csv_file_name()\n sel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open RTF report in word in preview mode. | def previewOffice(self, rtf_filename):
try:
# Connect with Word
word_app = win32com.client.Dispatch('Word.Application')
# Hide
word_app.Visible = 0
# Open RTF
rep_tmpl_book = word_app.Documents.Open(rtf_filename)
# Show
... | [
"def openOffice(self, rtf_filename):\n try:\n # Connection with Word\n word_app = win32com.client.Dispatch('Word.Application')\n # Hide\n word_app.Visible = 0\n # Open RTF\n rep_tmpl_book = word_app.Open(rtf_filename)\n # Show\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print RTF report by word. | def printOffice(self, rtf_filename):
try:
# Connect with Word
word_app = win32com.client.Dispatch('Word.Application')
# Hide
word_app.Visible = 0
# Open RTF
rep_tmpl_book = word_app.Documents.Open(rtf_filename)
# Show
... | [
"def previewOffice(self, rtf_filename):\n try:\n # Connect with Word\n word_app = win32com.client.Dispatch('Word.Application')\n # Hide\n word_app.Visible = 0\n # Open RTF\n rep_tmpl_book = word_app.Documents.Open(rtf_filename)\n # ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert generate report to Office. | def convert(self, report=None, to_xls_filename=None, *args, **kwargs):
pass | [
"def oo_render(self, context=None):\n if context is None: context = {}\n self.log(\"Generating report: step 1...\")\n\n # Generate the stream from the template (Relatorio)\n data = self.generate(**context).render().getvalue()\n\n self.log(\"...step 1 done.\")\n\n #\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open RTF file in Word. | def openOffice(self, rtf_filename):
try:
# Connection with Word
word_app = win32com.client.Dispatch('Word.Application')
# Hide
word_app.Visible = 0
# Open RTF
rep_tmpl_book = word_app.Open(rtf_filename)
# Show
word_a... | [
"def previewOffice(self, rtf_filename):\n try:\n # Connect with Word\n word_app = win32com.client.Dispatch('Word.Application')\n # Hide\n word_app.Visible = 0\n # Open RTF\n rep_tmpl_book = word_app.Documents.Open(rtf_filename)\n # ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A trace method to assist with the trace messages for the daemon in the production version. Simply check tracing boolean value, and print | def trace(message):
if tracing == True:
now = datetime.datetime.now()
date = now.strftime("%Y %m %d - %H:%M:%S")
trace_file.write('%r %s\n'%(date, message))
print date, 'sptlqry.py:', message | [
"async def request_enable_debug(self, ctx) -> str:\n self.cbf_ingest.enable_debug(True)\n return \"Debug logging enabled.\"",
"def extrae_tracing_is_enabled():\n global TRACING_ENABLED\n return TRACING_ENABLED",
"def trace(self, msg, *args, **kwargs):\n self.write(msg, level='TRACE',... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draw instancelevel prediction results on an image. | def draw_instance_predictions(self, predictions, track_ids):
boxes = predictions.pred_boxes if predictions.has("pred_boxes") else None
scores = predictions.scores if predictions.has("scores") else None
classes = predictions.pred_classes if predictions.has("pred_classes") else None
labels... | [
"def display_prediction(image_path, model, topk):\n\n # Get predictions\n img, ps, classes, y_obs = predict(image_path, model, topk)\n # Convert results to dataframe for plotting\n result = pd.DataFrame({'p': ps}, index=classes)\n\n # Show the image\n plt.figure(figsize=(16... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
padding a list of indices with 0 until a maximum length (max_length_tweet) | def pad_sequence(self, t_index):
l = len(t_index)
if l < self.max_length_tweet:
req_d = self.max_length_tweet - l
t_index.extend([np.zeros_like(t_index[0])] * req_d)
elif l > self.max_length_tweet:
t_index = t_index[:self.max_length_tweet].copy()
retu... | [
"def pad_indexes(indexes_batch, value):\n return torch.tensor(list(zip_longest(*indexes_batch, fillvalue=value)))",
"def pad(self, max_lengths: Dict[str, int]):\n self.word_indices = self.pad_word_sequence(self.word_indices, max_lengths)",
"def get_padded_tensor(tokens_list, batch_size):\n\ttoken_len ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The id of the switch to which the Database connects. | def switch_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "switch_id") | [
"def switch_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"switch_id\")",
"def get_db_id(self):\n return self.db_id",
"def get_id(self):\n return self._hostID",
"def GetID(self):\n return self.__msgs.connectionid",
"def id(self) -> int:\n return self._context.id",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of IP address to assign to the LoadBalancer. . | def ip_addresses(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
return pulumi.get(self, "ip_addresses") | [
"def test_ip_addresses_list(self):\n pass",
"def get_ip_addresses(self, task):\n return []",
"def _getAddresses(self, *ues):\n return [self._s1_util.get_ip(ue.ue_id) for ue in ues]",
"def get_ip_list(prefix):\n return list(map(lambda x: str(x),ipaddress.ip_network(prefix).hosts()))",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The id of the switch to which the LoadBalancer connects. | def switch_id(self) -> pulumi.Input[str]:
return pulumi.get(self, "switch_id") | [
"def switch_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"switch_id\")",
"def load_balancer_id(self) -> Optional[str]:\n return pulumi.get(self, \"load_balancer_id\")",
"def get_switch_name(node):\n return node['ports'][0]['switch_name']",
"def r_default_switch_fid(self):\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The flag to enable slack notification when the traffic shaping is enabled. | def enable_slack(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "enable_slack") | [
"def shaping_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"shaping_enabled\")",
"def can_register_for_superseding_event_notifications(self):\n return # boolean",
"def supports_gradebook_notification(self):\n return # boolean",
"def sending_enabled(self) -> b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of `additional_certificate` blocks as defined below. | def additional_certificates(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ProxyLBACMECertificateAdditionalCertificateArgs']]]]:
return pulumi.get(self, "additional_certificates") | [
"def additional_certificates(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ProxyLBCertificateAdditionalCertificateArgs']]]]:\n return pulumi.get(self, \"additional_certificates\")",
"def tbs_certlist_bytes(self):",
"def tbs_certificate_bytes(self):",
"def get_certificates_der_v3(self):\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The proxy mode. This must be one of [`http`/`https`/`tcp`]. | def proxy_mode(self) -> pulumi.Input[str]:
return pulumi.get(self, "proxy_mode") | [
"def get_useproxyport(self):\n return self.options['useproxyport']",
"def proxy(self):\n if self._proxy is not None:\n if self._proxy[:7] == \"http://\":\n self._proxy = {'http://': self._proxy}\n Color.pl(\"{+} Proxy: %s\" % self._proxy['http://'])\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ssl policy. This must be one of [`TLS12201904`/`TLS12202106`/`TLS13202106`]. | def ssl_policy(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "ssl_policy") | [
"def get_ssl_protocol(self):\n return self._ssl_protocol",
"def get_force_https_protocol_value(self):\n return getattr(ssl, self.get_force_https_protocol_name())",
"def get_force_https_protocol_name(self):\n default = \"PROTOCOL_TLSv1_2\" if hasattr(ssl, \"PROTOCOL_TLSv1_2\") else \"PROTOCOL_TLSv1\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The flag to enable HTTP/2. This flag is used only when `proxy_mode` is `https`. | def support_http2(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "support_http2") | [
"def AddHttp2Flag(parser):\n parser.add_argument(\n '--use-http2',\n action=arg_parsers.StoreTrueFalseAction,\n help='Whether to use HTTP/2 for connections to the service.',\n )",
"def enable_https_proxy(self):\n # type: () -> int\n return self._get_property('enable_https_proxy')",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
One or more `additional_certificate` blocks as defined below. | def additional_certificates(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ProxyLBCertificateAdditionalCertificateArgs']]]]:
return pulumi.get(self, "additional_certificates") | [
"def additional_certificates(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ProxyLBACMECertificateAdditionalCertificateArgs']]]]:\n return pulumi.get(self, \"additional_certificates\")",
"def test_extraChainFilesAreAddedIfSupplied(self):\n opts = sslverify.OpenSSLCertificateOptions(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The intermediate certificate for a server. | def intermediate_cert(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "intermediate_cert") | [
"def get_ssl_server_certificate():\n return get_conf().get(_SSL_SERVER_CERTIFICATE)",
"def get_server_certificate(addr,ssl_version=PROTOCOL_SSLv3,ca_certs=None):\n\tpass",
"def cert(self):\n return self.just_get_me_a_certificate()",
"def get_cert(self):\n return self.cert",
"def vpn_get_serve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The intermediate certificate for a server. | def intermediate_cert(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "intermediate_cert") | [
"def get_ssl_server_certificate():\n return get_conf().get(_SSL_SERVER_CERTIFICATE)",
"def get_server_certificate(addr,ssl_version=PROTOCOL_SSLv3,ca_certs=None):\n\tpass",
"def cert(self):\n return self.just_get_me_a_certificate()",
"def get_cert(self):\n return self.cert",
"def vpn_get_serve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The flag to change partition uuid. | def change_partition_uuid(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "change_partition_uuid") | [
"def _ID_changed(self, new):\n if new[:7].lower() != \"cluster\":\n self.ID = \"cluster_%s\" % new",
"def __setUUID(self,uuid):\n uustr = str(uuid).lower()\n if map(len,uustr.split('-')) == [8, 4, 4, 4, 12]:\n for c in uustr:\n if c not in '0123456789-abcdef':\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The flag to disable password authentication. | def disable_pw_auth(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "disable_pw_auth") | [
"def disable_password_authentication(self) -> pulumi.Input[bool]:\n return pulumi.get(self, \"disable_password_authentication\")",
"def password_auth_enabled(self) -> Optional[bool]:\n return pulumi.get(self, \"password_auth_enabled\")",
"def ssh_disable_passwd():\n with settings(hide('running'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The flag to enable DHCP client. | def enable_dhcp(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "enable_dhcp") | [
"def enable_dhcp(self, ip_host_num):\n return [\"ip-host %s dhcp-enable true ping-response true traceroute-response true\" % ip_host_num]",
"def dhcp_enabled(self):\n ret = self._get_attr(\"DHCPEnabled\")\n return ret",
"def enableDHCPClick():\n os.system(\"mount -o rw,remount /\")\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of the Note id. | def note_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "note_ids") | [
"def get_ids():",
"def getToonIdsAsList(self):\n return self.toonIds",
"def track_id_list(self) -> List[int]:\n _track_id_list: List[int] = np.unique(self.seq_df[\"TRACK_ID\"].values).tolist()\n return _track_id_list",
"def ids(self):\n names_ = self.metadata()\n return [pla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of the SSHKey id. | def ssh_key_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "ssh_key_ids") | [
"def ex_list_ssh_keys(self):\r\n data = self.connection.request('/ssh_keys').object['ssh_keys']\r\n return list(map(self._to_ssh_key, data))",
"def ssh_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"ssh_keys\")",
"def keys(self):\n c = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A list of the SSHKey text. | def ssh_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "ssh_keys") | [
"def ex_list_ssh_keys(self):\r\n data = self.connection.request('/ssh_keys').object['ssh_keys']\r\n return list(map(self._to_ssh_key, data))",
"def getSSHKeys(self):\n\n file = open(self._ssh_keys_path, \"r\")\n key = file.read()\n return key",
"def ssh_key_ids(self) -> Option... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The id of the API key to be injected into the Note/StartupScript when editing the disk. | def api_key_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "api_key_id") | [
"def api_key_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"api_key_id\")",
"def get_api_key(self):\n key_data = os.path.join(os.path.dirname(os.path.dirname\n (os.path.abspath(__file__))), \"json\", \"key.json\")\n if not os.path.ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The id of the packet filter to attach to the network interface. | def packet_filter_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "packet_filter_id") | [
"def UUID(self):\n ret = libvirtmod.virNWFilterGetUUID(self._o)\n if ret is None: raise libvirtError ('virNWFilterGetUUID() failed')\n return ret",
"def id(self):\n if not self._id:\n self._id = self._layer.GetLayerId()\n return self._id",
"def vlan_iface_id(self) -... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The SNMP community string used when checking by SNMP. | def community(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "community") | [
"def get_snmp_information(self):\n snmp_information = {}\n\n snmp_config = junos_views.junos_snmp_config_table(self.device)\n snmp_config.get(options=self.junos_config_options)\n snmp_items = snmp_config.items()\n\n if not snmp_items:\n return snmp_information\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The SNMP version used when checking by SNMP. This must be one of `1`/`2c`. | def snmp_version(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "snmp_version") | [
"def protocolVersion():",
"def get_version():\n return 'PyS2OPC v' + VERSION + ' on ' + ffi.string(libsub.SOPC_LibSub_GetVersion()).decode()",
"def protocol_version(self):\n ret = self._get_attr(\"protocolVersion\")\n return ret",
"def mcuVersion(self):\r\n self.mcuserial.write('v'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The index of the network interface on which to enable the DHCP service. This must be in the range [`1``7`]. | def interface_index(self) -> pulumi.Input[int]:
return pulumi.get(self, "interface_index") | [
"def interface_index(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"interface_index\")",
"def port_index(self):\n return self.__port_index",
"def if_device(self, if_index):\n if \"%s\" % if_index in self._if_index:\n # found, return interface name\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The index of the network interface on which to enable filtering. This must be in the range [`0``7`]. | def interface_index(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "interface_index") | [
"def interface_index(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"interface_index\")",
"def _get_lif_ifindex(self):\n return self.__lif_ifindex",
"def get_sw_if_index(node, interface_name):\n interface_data = InterfaceUtil.vpp_get_interface_data(\n node, interface=interfac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The flag to allow the packet through the filter. | def allow(self) -> pulumi.Input[bool]:
return pulumi.get(self, "allow") | [
"def setFilterable(self, boolean: bool) -> None:\n ...",
"def can_attack(self):\n return False",
"def secured_packet_exemption_allowed(self):\n if \"securedPacketExemptionAllowed\" in self._prop_dict:\n return self._prop_dict[\"securedPacketExemptionAllowed\"]\n else:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The pre shared secret for the VPN. The length of this value must be in the range [`0``40`]. | def pre_shared_secret(self) -> pulumi.Input[str]:
return pulumi.get(self, "pre_shared_secret") | [
"def get_secret(self):\r\n return self.secret",
"def make_totp_secret():\n return pyotp.random_base32()",
"def primary_secret_key(self) -> str:\n return pulumi.get(self, \"primary_secret_key\")",
"def generate_secret(self):\n bits = self.args.get('length')\n # Bits should divida... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The pre shared secret for the VPN. The length of this value must be in the range [`0``40`]. | def pre_shared_secret(self) -> pulumi.Input[str]:
return pulumi.get(self, "pre_shared_secret") | [
"def get_secret(self):\r\n return self.secret",
"def make_totp_secret():\n return pyotp.random_base32()",
"def primary_secret_key(self) -> str:\n return pulumi.get(self, \"primary_secret_key\")",
"def generate_secret(self):\n bits = self.args.get('length')\n # Bits should divida... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate the delta_e_cie_2000 between two values in rgb format. | def color_diff(a, b):
arr_ = (c_double * len(self.a))(*self.a)
rgb2srgb(arr_)
srgb2linear(arr_)
linear2xyz(arr_)
xyz2Lab(arr_)
arr_2 = (c_double * len(self.b))(*self.b)
rgb2srgb(arr_2)
srgb2linear(arr_2)
... | [
"def _cie_rgb_EOCF(value):\n\n value = np.asarray(value)\n\n return value ** 2.2",
"def color_diff(rgb1, rgb2):\n diff = math.sqrt((rgb1[0]-rgb2[0])**2 + (rgb1[1]-rgb2[1])**2 + (rgb1[2]-rgb2[2])**2)\n return diff",
"def __calculate_pixel_difference(self, pixel1, pixel2):\n return sum( [ (math... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marginalizes image and psf along given axis Creates a tophat the same length as the data Convolves psf with tophat Fits result to data | def fit(image, psf, axis, bg_sigma=0, psf_scale_factor=1):
psf_data = np.sum(psf, axis=axis)
image_data = np.sum(image, axis=axis)
# Since we're summing down an axis, we need to also sum the bg sigma
# This is sqrt(height * sigma**2) = sqrt(height)*sigma
perp_height = image.shape[axis]
backgrou... | [
"def marginalize_gaussian_process(gp, variable, center=True):\n kernel_types = [RBF, Matern]\n kernel = extract_covariance_kernel(gp.kernel_, kernel_types)\n\n constant_kernel = extract_covariance_kernel(gp.kernel_, [ConstantKernel])\n if constant_kernel is not None:\n kernel_var = constant_kerne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the recent internet online datetime | def online_since(self):
return self._dt_online | [
"def offline_since(self):\n return self._dt_offline",
"def last_updated(self, url):\n return self.metadata(url).last_updated_in_seconds",
"def get_date_time(webpage_url):\n article = Article(webpage_url)\n article.download()\n article.parse()\n return article.publish_date.strftime('%d %B %... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the recent internet offline datetime | def offline_since(self):
return self._dt_offline | [
"def online_since(self):\n return self._dt_online",
"def last_updated(self, url):\n return self.metadata(url).last_updated_in_seconds",
"def _last_updated():\n #TODO: implement\n return datetime.datetime.now()",
"def last_geo_failover_time(self) -> str:\n return pulumi.get(self, \"last_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the online or offline duration | def duration(self):
if self._dt_offline is None or self._dt_online >= self._dt_offline:
return datetime.now() - self._dt_online
else:
return datetime.now() - self._dt_offline | [
"def live_duration(self):\n if self.live_info:\n end = self.live_ended_at\n start = self.live_info.get(\"started_at\")\n if end and start:\n return int(end) - int(start)\n return 0",
"def time_diff():\n now = datetime.utcnow()\n diff = now - time... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define the internet connection online state callback implementation. | def on_online(self, func):
self._on_online = func | [
"def _setOnline(self, online):\n if self.online != online:\n self.online = online\n twisted_logger.writeLog(self.logPrefix, self.logName, \"Changing online status to %s\" % online)\n # Call back (trigger) external deferreds\n if online:\n [self.__cal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If implemented, called when internet connection state was first detected offline | def on_offline(self):
return self._on_offline | [
"def on_offline(self, func):\n self._on_offline = func",
"def on_online(self, func):\n self._on_online = func",
"def checkNetworkStatus(self):\r\n pass",
"def test_no_calls_are_made_when_hubstate_is_offline(self):\n self.hs.setkey(self.hs.STATE_KEY_IS_ONLINE, False)\n call_c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define the internet connection offline state callback implementation. | def on_offline(self, func):
self._on_offline = func | [
"def on_offline(self):\n return self._on_offline",
"def on_online(self, func):\n self._on_online = func",
"def process_offline(self, data, **kwargs):\n raise NotImplementedError('Must be implemented by subclass.')",
"def got_state(self, state):\n if state == NM_STATE_CONNECTED:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialise the gripper and action server | def __init__(self, action_server_name, gripper_id="EZGripper", port_name="/dev/ttyUSB0", baudrate=57600,
servo_ids=[1]):
# Initialise the object allowing to control the EZGripper
self.gripper = EZGripper(gripper_id, port_name, baudrate, servo_ids)
# Initialise a JointStateGrippe... | [
"def __init__(self, ):\n self.config = None\n self.goal = None\n\n self._config_server = Server(GraspPlannerConfig, self._config_cb)\n\n self._action_server = SimpleActionServer(\n '~plan_grasp', PlanGraspAction,\n execute_cb=self._execute_cb, auto_start=False)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback executed when a goal is received. Execute the joint state contained in the input | def goal_callback(self):
# Get the input field from the goal, containing the target joint state (JointState msg)
joint_state = self.action_server.accept_new_goal().input
# Make sure the input msg is correct
target_value = joint_state.position[0]
if joint_state.name[0] != self.gr... | [
"def go_to_joint_state(joint_goal):\n print(\"Calling 'Go to joint state' with the following goal: {}\".format(joint_goal))\n # The 'go' command can be called with joint values, poses, or without any\n # parameters if you have already set the pose or joint target for the group.\n ##NOTE: wait=True means the cal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback executed when a preempt request has been received. | def preempt_callback(self):
rospy.loginfo("Action preempted")
self.action_server.set_preempted() | [
"def preempt(self, preempt: bool):\n\n self._preempt = preempt",
"def before_request_callback():\n schedule.run_pending()",
"def preempt_delay(self, preempt_delay: str):\n\n self._preempt_delay = preempt_delay",
"def process_request(self, request):\r\n if (PINNING_COOKIE in request.COO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Publish continuously the gripper's joint state in order to be able to correctly plan and avoid collision | def publish_joint_state(self):
# Define the publisher (the topic name is standard)
pub = rospy.Publisher('/joint_states', JointState, queue_size=10)
# In order to avoid overloading the gripper with too many reading/writing commands, limit the reading at 200Hz
rate = rospy.Rate(200)
... | [
"def _publish_joint_state(self):\n # only publish if we have a subscriber\n if self._joint_state_pub.get_num_connections() == 0:\n return\n\n js = JointState()\n js.header.stamp = rospy.Time.now()\n js.header.frame_id = 'vector'\n js.name = ['head', 'lift']\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |