query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Return True if the subarray overlaps a subspace of the master array.
def overlaps(self, indices): p_indices = [] shape = [] if not indices: return p_indices, shape for index, (r0, r1), size in zip(indices, self.location, self.shape): if isinstance(index, slice): stop = size if index.stop < r1: stop -= r1 - index.stop start = index.start - r0 if start < 0: start %= index.step # start is now +ve if start >= stop: # This partition does not span the slice return None, None # Still here? step = index.step index = slice(start, stop, step) index_size, rem = divmod(stop - start, step) if rem: index_size += 1 else: # Still here? index = [i - r0 for i in index if r0 <= i < r1] index_size = len(index) if index_size == 0: return None, None elif index_size == 1: index = slice(index[0], index[0] + 1) else: index0 = index[0] step = index[1] - index0 if step > 0: start, stop = index0, index[-1] + 1 elif step < 0: start, stop = index0, index[-1] - 1 if index == list(range(start, stop, step)): # Replace the list with a slice object if stop < 0: stop = None index = slice(start, stop, step) # --- End: if p_indices.append(index) shape.append(index_size) # --- End: for # Still here? Then this partition does span the slice and the # elements of this partition specified by p_indices are in the # slice. return p_indices, shape
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_overlap(self):\n return False", "def overlaps_with_subspace(wavefunc: dict, subspace: list) -> bool:\n assert isinstance(wavefunc, dict), 'Please provide your state as a dict.'\n assert isinstance(subspace, list), 'Please provide subspace as a list of str.'\n\n # Deal with empty subspace:...
[ "0.69049424", "0.6542034", "0.65178", "0.64850175", "0.6401799", "0.6352982", "0.63502485", "0.6326871", "0.6323529", "0.6288298", "0.62626195", "0.6232904", "0.62079996", "0.617383", "0.61473817", "0.61473817", "0.6106171", "0.6056349", "0.6024105", "0.59949875", "0.59726655...
0.0
-1
Move the partition's subarray to a temporary file on disk.
def to_disk(self, reopen=True): # try: tfa = CachedArray(self.array) # except Exception: # return False fd, _lock_file = mkstemp( prefix=tfa._partition_file + "_", dir=tfa._partition_dir ) close(fd) self.subarray = tfa _temporary_files[tfa._partition_file] = ( tfa._partition_dir, _lock_file, set(), ) if reopen: # Re-open the partition self.open(self.config) return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close(self, **kwargs):\n config = getattr(self, \"config\", None)\n\n if config is None:\n return\n\n if kwargs:\n config.update(kwargs)\n\n original = getattr(self, \"_original\", None)\n logger.partitioning(\"Partition.close: original = {}\".format(ori...
[ "0.58671135", "0.56434155", "0.5580373", "0.5417111", "0.5385665", "0.5372569", "0.53123814", "0.52139175", "0.5193834", "0.51137465", "0.5101339", "0.5099379", "0.50423723", "0.5027432", "0.50095487", "0.5004623", "0.49991313", "0.4995337", "0.49318588", "0.49247873", "0.489...
0.6427523
0
Completely update the partition with another partition's attributes in place. The updated partition is always dependent of the other partition.
def revert(self): original = getattr(self, "_original", None) if not original: return if hasattr(self, "output"): output = self.output keep_output = True else: keep_output = False del self._original self.__dict__ = original.__dict__ if keep_output: self.output = output
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(self, metadata):\n p_metas = metadata.partitions\n\n # Remove old partitions\n removed = set(self._partitions.keys()) - set(p_metas.keys())\n if len(removed) > 0:\n log.info('Removing %d partitions', len(removed))\n for id_ in removed:\n log.debug...
[ "0.6177643", "0.5935486", "0.5843581", "0.5752055", "0.57170105", "0.5648424", "0.55954295", "0.5566008", "0.5558529", "0.5553988", "0.55241215", "0.55186415", "0.53778905", "0.530752", "0.52931553", "0.5265223", "0.52628785", "0.52362907", "0.52102923", "0.5176496", "0.51658...
0.0
-1
Completely update the partition with another partition's attributes in place.
def update_inplace_from(self, other): self.__dict__ = other.__dict__.copy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(self, metadata):\n p_metas = metadata.partitions\n\n # Remove old partitions\n removed = set(self._partitions.keys()) - set(p_metas.keys())\n if len(removed) > 0:\n log.info('Removing %d partitions', len(removed))\n for id_ in removed:\n log.debug...
[ "0.603172", "0.5819609", "0.5723665", "0.56900966", "0.5662162", "0.5607183", "0.55987877", "0.5512243", "0.54352087", "0.53991395", "0.53937256", "0.53484046", "0.532894", "0.53233975", "0.5312622", "0.5310722", "0.527429", "0.52614987", "0.52564377", "0.5246442", "0.5220056...
0.5176845
23
Register a temporary file on this rank that has been created on another rank.
def _register_temporary_file(self): _partition_file = self._subarray._partition_file _partition_dir = self._subarray._partition_dir if _partition_file not in _temporary_files: fd, _lock_file = mkstemp( prefix=_partition_file + "_", dir=_partition_dir ) close(fd) _temporary_files[_partition_file] = ( _partition_dir, _lock_file, set(), ) else: _, _lock_file, _ = _temporary_files[_partition_file] return _lock_file
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register_tmp_file(self, tmp_file: str):\n self.temp_files.add(pathlib.Path(tmp_file))", "def set_temp_file(self):\n\n index = self.filename.rfind('/') + 1\n self.temp_filename = self.filename[:index] + \"tmp_\" + self.filename[index:]", "def add_tempfile(self, filename, exists=True):\n...
[ "0.7100669", "0.6645065", "0.6373811", "0.60678446", "0.59707797", "0.5943573", "0.5882913", "0.5867154", "0.5833076", "0.57806534", "0.5745454", "0.5718152", "0.5706169", "0.5704879", "0.56752044", "0.56738895", "0.56596625", "0.56512666", "0.56443375", "0.56338364", "0.5625...
0.66906744
1
Add the lock files listed in lock_files to the list of lock files managed by other ranks.
def _update_lock_files(self, lock_files): _, _lock_file, _other_lock_files = _temporary_files[ self._subarray._partition_file ] _other_lock_files.update(set(lock_files)) if _lock_file in _other_lock_files: # If the lock file managed by this rank is in the list of # lock files managed by other ranks, remove it from there _other_lock_files.remove(_lock_file)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LockFiles(self, entries):\n self._model.lock(entries)", "def add_mock_files(self, file_list):\n self._mock_file_list.extend(file_list)", "def thread_file_list(self):\n # Establish connection for this thread\n connection = self.connect()\n\n # Set working directory on serv...
[ "0.5858453", "0.5857905", "0.5442941", "0.5427439", "0.5369485", "0.534254", "0.5242692", "0.5233011", "0.52133423", "0.51889026", "0.51700175", "0.51625514", "0.5118121", "0.5110031", "0.50916535", "0.5077471", "0.5056525", "0.5047517", "0.50415224", "0.50407803", "0.5031041...
0.785469
0
x.__init__(...) initializes x; see help(type(x)) for signature
def __init__(self, *more): # real signature unknown; restored from __doc__ pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x_init(self):\n pass", "def init(self, *args, **kwds):\n pass", "def __init__(self, x=None, y=None):\n if y is None:\n if x is None:\n object.__setattr__(self, 'x', 0)\n object.__setattr__(self, 'y', 0)\n else:\n object...
[ "0.7523401", "0.75223213", "0.71459436", "0.7083094", "0.7015502", "0.68367285", "0.6812456", "0.6742144", "0.6742144", "0.6742144", "0.67186326", "0.67170554", "0.67170554", "0.67170554", "0.67170554", "0.67170554", "0.67170554", "0.67170554", "0.67170554", "0.67170554", "0....
0.6569203
96
r""" Samples a 2d function f over specified intervals and returns two arrays (X, Y) suitable for plotting with matlab (matplotlib) syntax. See examples\mplot2d.py. f is a function of one variable, such as x2. x_args is an interval given in the form (var, min, max, n)
def sample2d(f, x_args): try: f = sympify(f) except SympifyError: raise ValueError("f could not be interpreted as a SymPy function") try: x, x_min, x_max, x_n = x_args except (TypeError, IndexError): raise ValueError("x_args must be a tuple of the form (var, min, max, n)") x_l = float(x_max - x_min) x_d = x_l/float(x_n) X = np.arange(float(x_min), float(x_max) + x_d, x_d) Y = np.empty(len(X)) for i in range(len(X)): try: Y[i] = float(f.subs(x, X[i])) except TypeError: Y[i] = None return X, Y
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sample3d(f, x_args, y_args):\n x, x_min, x_max, x_n = None, None, None, None\n y, y_min, y_max, y_n = None, None, None, None\n try:\n f = sympify(f)\n except SympifyError:\n raise ValueError(\"f could not be interpreted as a SymPy function\")\n try:\n x, x_min, x_max, x_n = ...
[ "0.6939351", "0.6302334", "0.6178659", "0.58382726", "0.57627946", "0.5739403", "0.56020606", "0.5559102", "0.5487004", "0.5467543", "0.5426483", "0.5417944", "0.53844726", "0.53342545", "0.53172773", "0.53114015", "0.5287415", "0.5252938", "0.5250112", "0.52382034", "0.52241...
0.7971121
0
r""" Samples a 3d function f over specified intervals and returns three 2d arrays (X, Y, Z) suitable for plotting with matlab (matplotlib) syntax. See examples\mplot3d.py. f is a function of two variables, such as x2 + y2. x_args and y_args are intervals given in the form (var, min, max, n)
def sample3d(f, x_args, y_args): x, x_min, x_max, x_n = None, None, None, None y, y_min, y_max, y_n = None, None, None, None try: f = sympify(f) except SympifyError: raise ValueError("f could not be interpreted as a SymPy function") try: x, x_min, x_max, x_n = x_args y, y_min, y_max, y_n = y_args except (TypeError, IndexError): raise ValueError("x_args and y_args must be tuples of the form (var, min, max, intervals)") x_l = float(x_max - x_min) x_d = x_l/float(x_n) x_a = np.arange(float(x_min), float(x_max) + x_d, x_d) y_l = float(y_max - y_min) y_d = y_l/float(y_n) y_a = np.arange(float(y_min), float(y_max) + y_d, y_d) def meshgrid(x, y): """ Taken from matplotlib.mlab.meshgrid. """ x = np.array(x) y = np.array(y) numRows, numCols = len(y), len(x) x.shape = 1, numCols X = np.repeat(x, numRows, 0) y.shape = numRows, 1 Y = np.repeat(y, numCols, 1) return X, Y X, Y = np.meshgrid(x_a, y_a) Z = np.ndarray((len(X), len(X[0]))) for j in range(len(X)): for k in range(len(X[0])): try: Z[j][k] = float(f.subs(x, X[j][k]).subs(y, Y[j][k])) except (TypeError, NotImplementedError): Z[j][k] = 0 return X, Y, Z
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_f():\n fig = plt.figure()\n ax = fig.gca(projection='3d')\n x_matrix = np.arange(-10, 11, 0.1)\n y_matrix = np.arange(-10, 11, 0.1)\n x_matrix, y_matrix = np.meshgrid(x_matrix, y_matrix)\n # print(x_matrix)\n u_matrix = x_matrix.copy()\n for i in range(x_matrix.shape[0]):\n ...
[ "0.6324257", "0.61952674", "0.60081536", "0.6003968", "0.59578633", "0.5772959", "0.5612362", "0.55938494", "0.5529308", "0.552768", "0.5526545", "0.55223507", "0.55000556", "0.5411602", "0.54069936", "0.53909606", "0.5389578", "0.53585124", "0.5356868", "0.53406954", "0.5334...
0.8300914
0
Samples a 2d or 3d function over specified intervals and returns a dataset suitable for plotting with matlab (matplotlib) syntax. Wrapper for sample2d and sample3d. f is a function of one or two variables, such as x2. var_args are intervals for each variable given in the form (var, min, max, n)
def sample(f, *var_args): if len(var_args) == 1: return sample2d(f, var_args[0]) elif len(var_args) == 2: return sample3d(f, var_args[0], var_args[1]) else: raise ValueError("Only 2d and 3d sampling are supported at this time.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sample3d(f, x_args, y_args):\n x, x_min, x_max, x_n = None, None, None, None\n y, y_min, y_max, y_n = None, None, None, None\n try:\n f = sympify(f)\n except SympifyError:\n raise ValueError(\"f could not be interpreted as a SymPy function\")\n try:\n x, x_min, x_max, x_n = ...
[ "0.7615295", "0.70778996", "0.6081689", "0.57048494", "0.56257445", "0.55822027", "0.55651504", "0.55339074", "0.54328907", "0.53981596", "0.5369118", "0.53515136", "0.53430045", "0.5319749", "0.5275369", "0.5249938", "0.52404726", "0.52143115", "0.52082497", "0.51295596", "0...
0.7539873
1
will have to call
def read_csv(self, filename): with open(filename, 'r') as f: read = f.read() self.names = [x for x in read.split('\n') if x] return self.names
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __call__(self):\n\t\treturn", "def use(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def run(self):", "def __call__(self) -> None:", "def process(self):", "d...
[ "0.752373", "0.7373912", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7356112", "0.7240168", "0.719627", "0.719627", "0.719627", "0.71953917", "0.7184699", "0.71057045", "0.70959705", "0.70959705", "...
0.0
-1
takes names from RestaurantNames class
def __init__(self, names): self.names = names self.results = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, restaurant_name, cuisine_type):\n\t\tself.restaurant_name = restaurant_name.title()\n\t\tself.cuisine_type = cuisine_type", "def __init__(self, restaurant_name, cuisine_type):\n\t\tself.name = restaurant_name\n\t\tself.type = cuisine_type", "def __init__(self, restaurant_name, cuisine_type):...
[ "0.64432555", "0.63475114", "0.63256043", "0.62955445", "0.6226382", "0.6113798", "0.6113798", "0.6113798", "0.6090916", "0.6087849", "0.6081929", "0.60531896", "0.6052965", "0.6027582", "0.60216314", "0.6010803", "0.58969116", "0.58843607", "0.587389", "0.5793254", "0.579325...
0.53139603
63
set the parameters for yelp API
def get_search_parameters(self, name): params = {} params["term"] = str(name) params["sort"] = "0" params["radius.filter"] = "2000" params["limit"] = "1" #return the first search item params["location"] = "Mesa, AZ" return params
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_params(self, **kwargs):\n ...", "def api_connect(self, params):\n\t\tconsumer_key = \"XwD3f3Yoe2GcjqXSd5kRkA\"\n\t\tconsumer_secret = \"VtZMCNmBNEardBkIXo-RU7De-wU\"\n\t\ttoken = \"JymbFW3SgkWemf6aTEHUvsNoPg9Nh7hZ\"\n\t\ttoken_secret = \"S4XUSKiIcUCYnlC3q7FYgUC47co\"\n\t\t\n\t\tsession = rauth.OAu...
[ "0.64296603", "0.621526", "0.61677766", "0.6114416", "0.59252185", "0.5825301", "0.5812804", "0.5749866", "0.57189363", "0.5699997", "0.56947994", "0.5644126", "0.56365013", "0.56365013", "0.56365013", "0.56365013", "0.56365013", "0.5616667", "0.5610575", "0.5582047", "0.5581...
0.0
-1
API keys, session authentication
def api_connect(self, params): consumer_key = "XwD3f3Yoe2GcjqXSd5kRkA" consumer_secret = "VtZMCNmBNEardBkIXo-RU7De-wU" token = "JymbFW3SgkWemf6aTEHUvsNoPg9Nh7hZ" token_secret = "S4XUSKiIcUCYnlC3q7FYgUC47co" session = rauth.OAuth1Session(consumer_key = consumer_key, consumer_secret = consumer_secret, access_token = token, access_token_secret = token_secret, ) request = session.get("http://api.yelp.com/v2/search",params=params) data = request.json() session.close() return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def api_authentication():\r\n apikey = request.args.get('api_key', None)\r\n from flask import _request_ctx_stack\r\n if 'Authorization' in request.headers:\r\n apikey = request.headers.get('Authorization')\r\n if apikey:\r\n user = db.session.query(model.user.User...
[ "0.7194135", "0.6754284", "0.6635698", "0.65901494", "0.65472263", "0.65440655", "0.6510905", "0.64644027", "0.64317477", "0.6324179", "0.6274898", "0.6266883", "0.6257447", "0.62521726", "0.6238254", "0.6219152", "0.62120575", "0.61796516", "0.6170831", "0.615797", "0.615360...
0.0
-1
bridge the connection between Yelp API, get_results and get_search_parameters functions. Returns one result at a time since we are expecting top result per name searched
def main(self, name): api_results = [] params = self.get_search_parameters(name) api_results.append(self.api_connect(params)) time.sleep(1.0) key = api_results[0]['businesses'][0] business_information = [key['name'], self.phone_number_organizer(key), key['rating'],\ key['review_count']] return business_information
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def query_api(term, location):\n response = search(term, location)\n\n businesses = response.get('businesses')\n\n if not businesses:\n print 'No businesses for {0} in {1} found.'.format(term, location)\n return\n\n business_id = businesses[0]['id']\n \n print '{0} businesses found,...
[ "0.66276145", "0.64622295", "0.6457914", "0.63681644", "0.6349981", "0.6308854", "0.61306053", "0.610485", "0.6067382", "0.6036991", "0.6029927", "0.6004755", "0.599794", "0.5988681", "0.5967956", "0.59640205", "0.59510136", "0.59347636", "0.5904494", "0.5894489", "0.58941627...
0.6288888
6
phone numbers should be correctly formatted, and some searches were returning errors from missing numbers
def phone_number_organizer(self, key): try: phone_number = key[u'phone'] format_number = '(' + phone_number[0:3] + ') ' + phone_number[3:6] + '-' + phone_number[6:] return format_number except KeyError: print [u'name'], "requires manual phone number verification." return "Manual Input"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def audit_phone_numbers(formats, number):\n\n # check formatting\n if re.match(r'^\\+39', number): # starts with +39\n formats['has_country_code'] += 1\n else:\n formats['no_country_code'] += 1\n if re.match(r'^(?:\\+?39)?81', number):\n formats['missing_prefix'] += 1\n if re.s...
[ "0.7204492", "0.7189207", "0.7125823", "0.70673645", "0.69369113", "0.6922547", "0.6824679", "0.67972773", "0.67830795", "0.6771247", "0.6759565", "0.67235404", "0.6691779", "0.6690462", "0.6681887", "0.66814655", "0.66740984", "0.66468287", "0.6635932", "0.66335326", "0.6626...
0.6447618
33
iterate through each restaurant name from restaurant names and aggregate to results
def results_aggregator(self, names): for name in names: result = self.main(name) self.results.append(result) print("'%s' has been written to the file." % result[0]) """result is formatted name, number, rating, review count"""
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resolveResult(self, restaurants):\n restaurant_list = []\n for restaurant in restaurants:\n restaurant_list.append({'Name': restaurant['restaurant']['name'], \"cuisines\": [x.strip() for x in restaurant['restaurant']['cuisines'].split(',')],\n \"lat\": restaurant['restaurant...
[ "0.64534056", "0.5905663", "0.5663056", "0.55366874", "0.5487185", "0.548536", "0.54789513", "0.5476311", "0.5471101", "0.5353196", "0.52232534", "0.5216546", "0.51967746", "0.5166121", "0.5148214", "0.5069867", "0.5060537", "0.5055395", "0.50514215", "0.50165194", "0.4985021...
0.5873722
2
this function also works for multidimensional arrays It assumes that the first dimension is time/iteration
def averaged_1d_array(arr, partitions): def f(p): start, stop = p sub_arr = arr[start : stop] #from IPython import embed; embed() return sub_arr.sum(axis=0)/(stop - start) return np.array([f(p) for p in partitions])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conver1D(array):\n l = array.shape\n total = np.zeros((0, l[1] * l[2]), dtype=np.float32)\n i = 0\n for i in range(24):\n tempData = array[i]\n array1D = []\n for x in tempData:\n for s in x:\n array1D.append(s)\n total = np.insert(total, i, arr...
[ "0.582377", "0.581599", "0.5703788", "0.56798375", "0.5665006", "0.5622838", "0.5622838", "0.561631", "0.5614652", "0.56125855", "0.56112605", "0.5594524", "0.5558285", "0.5528516", "0.5528516", "0.5513754", "0.5506847", "0.54488146", "0.54157764", "0.5404244", "0.5395436", ...
0.5034996
60
overload + which is useful for averaging
def __add__(self, other): return self.__class__( { name: self.__getattribute__(name) + other.__getattribute__(name) for name in self._fields } )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_mean(mean):\n return sum(mean)/len(mean)", "def __iadd__(self,value):\n if isinstance(value,LiveStat):\n raise Exception(\"Cannot sum statistics\")\n if value.vcount < 1 or self.vcount < 1:\n raise Exception(\"Cannot sum empty statistics\")\n else...
[ "0.6968986", "0.65940183", "0.6575654", "0.65746444", "0.65079343", "0.6471456", "0.6436682", "0.6430517", "0.63915634", "0.6386282", "0.63346887", "0.6332834", "0.6318238", "0.630995", "0.63077843", "0.63077843", "0.62997144", "0.6263618", "0.62484145", "0.6190253", "0.61901...
0.0
-1
overload / for scalars which is useful for averaging
def __truediv__(self, number): return self.__class__( { name: self.__getattribute__(name) / number for name in self._fields } )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mean(vals):", "def avg(a,b):\r\n return (a+b)/2", "def scalar_function(x, y):\n if x <= y:\n return x*y\n else:\n return x/y", "def mean(values):\r\n return sum(values) / float(len(values))", "def avg(u: np.ndarray, v: np.ndarray) -> np.ndarray:\n \n return (u + v) / 2.0...
[ "0.696143", "0.6685009", "0.65835285", "0.6494379", "0.6486431", "0.647589", "0.6461953", "0.644082", "0.640487", "0.63789093", "0.6378846", "0.6364099", "0.6329329", "0.6322551", "0.6314783", "0.6298621", "0.6284843", "0.62669075", "0.62524444", "0.62499195", "0.6235518", ...
0.0
-1
overload == which is useful for tests
def __eq__(self, other): return np.all([ self.__getattribute__(name) == other.__getattribute__(name) for name in self._fields ])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testEquality(self):\n pass", "def __eq__(self,*args):\r\n pass", "def __eq__(self,*args):\r\n pass", "def __eq__(self,*args):\r\n pass", "def __eq__(self,*args):\r\n pass", "def __eq__(self,*args):\r\n pass", "def __eq__(self,*args):\r\n pass", "def __eq__(self,*args):\r\n pass", ...
[ "0.8219239", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "0.8051525", "...
0.0
-1
Default reducer for distinctions. Expects all distinctions to follow
def __reduce__(self): return instanceReducer(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __reduce__(self):\n\t\treturn self.__class__, (self.dist, self.frozen)", "def evaluation_reducer(self) -> Union[Reducer, Dict[str, Reducer]]:\n return Reducer.AVG", "def __reduce__(self): # real signature unknown; restored from __doc__\r\n pass", "def _reduce(self, action):\n assert ...
[ "0.52857256", "0.5162497", "0.5107433", "0.5057547", "0.5027394", "0.5027394", "0.5027394", "0.5027394", "0.5027394", "0.49870852", "0.49124625", "0.48178238", "0.47693735", "0.47630015", "0.47151983", "0.4696542", "0.46933955", "0.4672102", "0.46205962", "0.46201527", "0.461...
0.5502056
0
Split the graphs into two sets, those matching the distinction and those not matching. Which graphs are which are stored in a
def splitGraphs(self, graphs): raise AbstractMethodException(self.__class__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compare_graphs(self):\n\t\tpass", "def splitNodes(matching):\n outer = set(range(self.n))\n inner = set([])\n for (u, v) in matching:\n if u in outer:\n outer.remove(u)\n if v in outer:\n outer.remove(v)\n ...
[ "0.6665472", "0.6266713", "0.60041565", "0.5954314", "0.5943517", "0.57617503", "0.56672305", "0.55829006", "0.55741566", "0.5567686", "0.555246", "0.5516986", "0.5512369", "0.5498665", "0.54714924", "0.54479235", "0.5445841", "0.54253536", "0.5403769", "0.53954047", "0.53896...
0.58428085
5
For conjugate distinctions this should be overridden and return the base distinctions used. For none conjugate it will automatically return an empty list.
def getBaseDistinctions(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_conjugate_bases_of(chebi_ent):\n if hasattr(chebi_ent, 'OntologyParents'):\n return [ent.chebiId for ent in chebi_ent.OntologyParents if\n (ent.type == \"is conjugate base of\")]\n else:\n return []", "def conjugate(self):\n pass", "def conjugate(self, ???):", ...
[ "0.6720197", "0.64957684", "0.63367724", "0.6140327", "0.6048907", "0.6023874", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", "0.5890595", ...
0.6723077
0
Returns the objects, relations and/or attributes type used by this distinction, it must be overridden.
def getReferencedTypes(self): raise AbstractMethodException(self.__class__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type(self):\n pass", "def type(self):\n pass", "def type(self):\n pass", "def Type(self):\r\n\t\treturn self._get_attribute('type')", "def type(self):\n\t\treturn self.type_", "def target_type(self):", "def get_metacls(self):\n return type", "def type(self):\r\n ...
[ "0.65846187", "0.65846187", "0.65846187", "0.6552763", "0.6550641", "0.64525676", "0.6426711", "0.6419668", "0.64058083", "0.64058083", "0.64058083", "0.64058083", "0.64058083", "0.63964784", "0.6383223", "0.6366031", "0.63618296", "0.6343517", "0.6325977", "0.6325582", "0.62...
0.0
-1
Returns a tuple of information about the split, such as the stat function for AttributeDistinction. The first should be a plain English name of the distinction, other elements are distinction dependent.
def getSplitType(self): raise AbstractMethodException(self.__class__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getsplitinfo():\n \n splitvarlist = spss.GetSplitVariableNames()\n if len(splitvarlist) == 0:\n return [], None\n else:\n splittype = spssaux.getShow(\"split\", olang=\"english\")\n if splittype.lower().startswith(\"layer\"):\n splittype=\"layered\"\n else:\n ...
[ "0.71336925", "0.58916134", "0.5822264", "0.5647063", "0.5593051", "0.54801464", "0.5435515", "0.5412464", "0.52879655", "0.5234384", "0.5225578", "0.5210046", "0.5198215", "0.5153649", "0.5132074", "0.51248753", "0.5116866", "0.5087405", "0.5079402", "0.50550914", "0.5049388...
0.0
-1
Generates a random distinction of this type than is valid for the schema config.schema and for the given graphs. This function for must take graphs as its first argument, and if its a conjugate distinction it must then take, as separate args, not a tuple,
def getRandomDistinction(config, graphs, *base_distinctions): raise AbstractMethodException(Distinction)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_regular_graph(variable_names, dist_func, num_neigh=10, **kwargs):\n shuffle(variable_names)\n num_vars = len(variable_names)\n num_neigh = min(num_neigh, num_vars-1)\n graphs = nx.random_graphs.random_regular_graph(num_neigh, num_vars)\n edges = np.array(graphs.edges())\n edges.sort(...
[ "0.6162866", "0.60737395", "0.56084675", "0.5604049", "0.5572062", "0.55707884", "0.5547834", "0.5473386", "0.54535896", "0.54377645", "0.5403645", "0.5399105", "0.53836566", "0.5325518", "0.5313336", "0.5309223", "0.5285266", "0.52835023", "0.5281857", "0.52793276", "0.52750...
0.7116983
0
Get an estimate of the number of different subtypes for this distinction. This is used to estimate a PDF for randomly sampling the distinction space. Examine the code of other distinctions to get a feel for how things are estimated.
def getNumberOfSubtypes(config, low_estimate=True): raise AbstractMethodException(Distinction)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNumberOfBaseDistinctionsNeeded():\n\n raise AbstractMethodException(Distinction)", "def findAtypicalTerms(self):\n self.atypicalTermsDict = collections.OrderedDict()\n distanceList = list()\n distance = 0\n for key in self.summaryFilteredDict:\n partitionName ...
[ "0.5700454", "0.5624713", "0.5599203", "0.5592559", "0.5505562", "0.54669946", "0.5466142", "0.5449652", "0.5400594", "0.5398503", "0.5343119", "0.53286606", "0.5312603", "0.53101563", "0.5294233", "0.5283371", "0.5280055", "0.5267188", "0.5262132", "0.52526665", "0.52496", ...
0.6394095
0
For a conjugate distinction return the number of base distinctions it needs to operate, and expects in the constructor.
def getNumberOfBaseDistinctionsNeeded(): raise AbstractMethodException(Distinction)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conjugate(self, ???):", "def num_conll(self):\n pass", "def conjugate(self, *args, **kwargs): # real signature unknown\n pass", "def conjugate(self, *args, **kwargs): # real signature unknown\n pass", "def conjugate(self, *args, **kwargs): # real signature unknown\n pass", ...
[ "0.64773166", "0.6208632", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6194198", "0.6151681", "0.59326756", "0.57995605", ...
0.56668746
23
Given a schema return True if this type of distinction is valid for the schema. Default is True. Should be overridden if there are any schemas a distinction is not valid for.
def isValidForSchema(schema): return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_a_dde_schema(self, schema):\n return schema in self.registered_dde_schemas", "def compatibleSchema(self,\n schema: schemaconverter.TDXSchema,\n raise_error: bool = True\n ) -> bool:\n db_tdx_schema = self.tdx_schema\n # see https://stackoverflow.com/a/41579450/1014916...
[ "0.738567", "0.6994796", "0.69861853", "0.67255765", "0.66746897", "0.6557599", "0.64317065", "0.6430458", "0.6274206", "0.62662953", "0.61832917", "0.61832917", "0.61646706", "0.6147451", "0.61017865", "0.6056857", "0.6008853", "0.60003716", "0.59765136", "0.5948833", "0.594...
0.81319565
0
Matrix multiplication of chains of square matrices
def chain_matmul_square(As): As_matmul = As while As_matmul.shape[0] > 1: if As_matmul.shape[0] % 2: A_last = As_matmul[-1:] else: A_last = None As_matmul = torch.matmul(As_matmul[0:-1:2], As_matmul[1::2]) if A_last is not None: As_matmul = torch.cat([As_matmul, A_last], dim=0) return As_matmul.squeeze(0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recursive_multiply(a, b):\n if len(a) == 2:\n return naive_multiply(a, b)\n\n a11 = a[0:int(len(a) / 2)]\n for index, row in enumerate(a11):\n a11[index] = row[0:int(len(row) / 2)]\n\n a12 = a[0:int(len(a) / 2)]\n for index, row in enumerate(a12):\n a12[index] = row[int(len(...
[ "0.7083097", "0.6831898", "0.6822807", "0.68104607", "0.6706873", "0.66786253", "0.66484094", "0.6619107", "0.659644", "0.6510616", "0.6500125", "0.6498091", "0.646012", "0.6443269", "0.64374197", "0.6424422", "0.6419277", "0.6410198", "0.6350263", "0.63494116", "0.6345248", ...
0.70788336
1
Exports generated vectorization dictionary for future use
def save(self, dirname=None): self.genio.save(dirname) logging.info( f'Saved word vectorizations for {dirname}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_vector_dict(self):\n return self.MOVE_DATA", "def create_vector_dict(self):\n return self.MOVE_DATA", "def getVectors(self):\n vectors = dict()\n i = 0\n N = len(self.db.invertedIndex)\n for w, (idf, docs) in self.db.invertedIndex.items():\n for d...
[ "0.6104261", "0.6104261", "0.59266806", "0.5733242", "0.567408", "0.5661961", "0.5612445", "0.5592986", "0.55927783", "0.549614", "0.5439975", "0.5427137", "0.54063416", "0.53769064", "0.5355195", "0.53128344", "0.53023034", "0.52946824", "0.5286039", "0.52819043", "0.5276488...
0.0
-1
Loads word to vector dictionary. If pickle exists, it will use that since it's easiest to load in.
def load(self, dirname=None): self.genio.load(dirname) logging.info(f'Loaded word vectorizations at {dirname}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_vector_dictionary():\n return read_word2vecs_from_file(VECTOR_FILE)", "def load_word2vec(self, path, binary=True, reserve_zero=True, reserve_oov_token=True):\n self.allow_oov = reserve_oov_token\n self.reserve_zero = reserve_zero\n words = []\n if self.reserve_zero:\n ...
[ "0.7791548", "0.72534555", "0.72064674", "0.7057689", "0.7057665", "0.7002823", "0.6931613", "0.68834174", "0.6871142", "0.6848353", "0.6788099", "0.67114586", "0.66740996", "0.6664656", "0.66422987", "0.66346234", "0.6607083", "0.6605387", "0.65846086", "0.65806603", "0.6566...
0.68163615
10
Print Bento details by providing the bento_tag. \b
def get(bento_tag: str, output: str) -> None: # type: ignore (not accessed) bento = bento_store.get(bento_tag) if output == "path": console.print(bento.path) elif output == "json": info = json.dumps(bento.info.to_dict(), indent=2, default=str) console.print_json(info) else: info = yaml.dump(bento.info, indent=2, sort_keys=False) console.print(Syntax(info, "yaml"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_tags():\n for tag in Tag.query.all():\n print tag.__repr__()", "def __gitDescribeTag(self):\n self.vcs.gitDescribe(self.project.getProjectPath(), [])", "def show_target(self, target):\n print \" \" + repr(target.subject) \\\n + \" \" + target.meaning...
[ "0.59889174", "0.5728905", "0.56706613", "0.56307644", "0.5569425", "0.5474408", "0.5425949", "0.54244584", "0.5415978", "0.5385348", "0.53358155", "0.5326319", "0.5322443", "0.5317626", "0.5277394", "0.52764267", "0.5227435", "0.5224774", "0.5220987", "0.5199572", "0.5164107...
0.637782
0
List Bentos in local store \b show all bentos saved $ bentoml list \b show all verions of bento with the name FraudDetector $ bentoml list FraudDetector
def list_bentos(bento_name: str, output: str) -> None: # type: ignore (not accessed) bentos = bento_store.list(bento_name) res = [ { "tag": str(bento.tag), "path": display_path_under_home(bento.path), "size": human_readable_size(calc_dir_size(bento.path)), "creation_time": bento.info.creation_time.astimezone().strftime( "%Y-%m-%d %H:%M:%S" ), } for bento in sorted( bentos, key=lambda x: x.info.creation_time, reverse=True ) ] if output == "json": info = json.dumps(res, indent=2) console.print(info) elif output == "yaml": info = yaml.safe_dump(res, indent=2) console.print(Syntax(info, "yaml")) else: table = Table(box=None) table.add_column("Tag") table.add_column("Size") table.add_column("Creation Time") table.add_column("Path") for bento in res: table.add_row( bento["tag"], bento["size"], bento["creation_time"], bento["path"], ) console.print(table)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def command_list(arguments):\n global current_mode\n current_mode = Mode.list\n #current_entity.addlink(arguments[0], arguments[1])\n return 'Now listing all entities'", "def list_cmd(ctx):\n client = ctx.obj['CLIENT']\n models = client.list_models()\n\n x = PrettyTable()\n x.field_names ...
[ "0.6460789", "0.609852", "0.605642", "0.60312444", "0.5958324", "0.58794826", "0.58415896", "0.5798007", "0.57732534", "0.5748135", "0.5748135", "0.5723663", "0.57183725", "0.57072484", "0.568819", "0.56753975", "0.5644786", "0.56367767", "0.5634464", "0.5600329", "0.55807924...
0.66813993
0
Delete Bento in local bento store. \b
def delete(delete_targets: list[str], yes: bool) -> None: # type: ignore (not accessed) def delete_target(target: str) -> None: tag = Tag.from_str(target) if tag.version is None: to_delete_bentos = bento_store.list(target) else: to_delete_bentos = [bento_store.get(tag)] for bento in to_delete_bentos: if yes: delete_confirmed = True else: delete_confirmed = click.confirm(f"delete bento {bento.tag}?") if delete_confirmed: bento_store.delete(bento.tag) logger.info("%s deleted.", bento) for target in delete_targets: delete_target(target)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(self):\n self.storage.delete(basket=self)\n self.uncache()\n self._data = None\n self.dirty = False", "def dangerously_delete(self, bento_name, bento_version):", "def delete(self):\n\n lod_history = self.repo._get_lod_history(self.lod)\n assert lod_history.exists()\...
[ "0.7051506", "0.68354255", "0.680618", "0.64838576", "0.64788866", "0.6383846", "0.6383846", "0.6383846", "0.6383846", "0.637536", "0.63332254", "0.6227315", "0.61815846", "0.6153086", "0.6130447", "0.61282235", "0.6125379", "0.6116602", "0.6077102", "0.60508895", "0.6031658"...
0.0
-1
Export a Bento to an external file archive \b
def export(bento_tag: str, out_path: str) -> None: # type: ignore (not accessed) bento = bento_store.get(bento_tag) out_path = bento.export(out_path) logger.info("%s exported to %s.", bento, out_path)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def archive(po_filename, bl_filename):\n\n # Store archive in same dir as this script\n root = os.path.abspath(os.path.dirname(sys.argv[0]))\n\n po_archive = root + '/po.csv.%s' % datetime.date.today()\n bl_archive = root + '/bl.csv.%s' % datetime.date.today()\n\n shutil.move(po_filename, po_archive...
[ "0.60800993", "0.60314316", "0.599764", "0.5991197", "0.5971901", "0.59628", "0.59533924", "0.5905716", "0.5669903", "0.5646166", "0.5619919", "0.5599178", "0.55828655", "0.5566471", "0.55654246", "0.5564186", "0.5563321", "0.55614084", "0.5539148", "0.55066764", "0.5496924",...
0.73495036
0
Import a previously exported Bento archive file \b
def import_bento_(bento_path: str) -> None: # type: ignore (not accessed) bento = import_bento(bento_path) logger.info("%s imported.", bento)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def import_idb(self, idb_file):\n self.__run_import_script(file=idb_file, is_bin=False)", "def zoo_import(name, head=''):\n net = gz.get_model(name, pretrained=True)\n export_block(head + name, net, preprocess=True)", "def _import_bh_(self):", "def import_bin(self, bin_file):\n self.__run_import_...
[ "0.6098828", "0.6013871", "0.5977933", "0.58846664", "0.5881364", "0.5841038", "0.57228506", "0.56769913", "0.5621053", "0.56173635", "0.5589252", "0.55258936", "0.5518586", "0.5502786", "0.54741645", "0.5466958", "0.545687", "0.5419559", "0.5372282", "0.5365402", "0.53363955...
0.6817035
0
Pull Bento from a yatai server.
def pull(bento_tag: str, force: bool) -> None: # type: ignore (not accessed) yatai_client.pull_bento(bento_tag, force=force)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def _pull(self) -> None:\n raise NotImplementedError()", "def pull(self):", "def _pull(self) -> None:\n raise NotImplementedError() # pragma: no cover", "def pull_from_postmaster(self):\n # TODO: Assuming first server is good - need to make fallback logic\n return self.sess...
[ "0.6253494", "0.61232203", "0.59411526", "0.5814772", "0.5765839", "0.5646557", "0.55963373", "0.55957717", "0.5572075", "0.55645216", "0.5557959", "0.5454153", "0.5417521", "0.54132676", "0.5413063", "0.53649527", "0.5361535", "0.5349794", "0.53326946", "0.53325665", "0.5319...
0.72192776
0
Push Bento to a yatai server.
def push(bento_tag: str, force: bool, threads: int) -> None: # type: ignore (not accessed) bento_obj = bento_store.get(bento_tag) if not bento_obj: raise click.ClickException(f"Bento {bento_tag} not found in local store") yatai_client.push_bento(bento_obj, force=force, threads=threads)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _push_to_server(self) -> None:\n pass", "def push(self, *args, **kwargs):\n pass", "def push(self, obj):\n pass", "def remote_push(self, pNamespace):", "def push(self):\n origin = self.git_repo.remotes.origin\n origin.push()", "def _push(self):\n push_cmds = ...
[ "0.71998096", "0.6480765", "0.5861547", "0.5851244", "0.5771112", "0.575511", "0.5752704", "0.57498515", "0.568986", "0.564071", "0.56019354", "0.5566268", "0.5532686", "0.5483675", "0.54428613", "0.542945", "0.5403216", "0.5375344", "0.5329458", "0.53241456", "0.53143793", ...
0.70428616
1
Build a new Bento from current directory.
def build(build_ctx: str, bentofile: str, version: str) -> None: # type: ignore (not accessed) if sys.path[0] != build_ctx: sys.path.insert(0, build_ctx) build_bentofile(bentofile, build_ctx=build_ctx, version=version)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build(root):", "def build():", "def makeProject(self, version, baseDirectory=None):\n if baseDirectory is None:\n baseDirectory = FilePath(self.mktemp())\n baseDirectory.createDirectory()\n segments = version.package.split('.')\n directory = baseDirectory\n ...
[ "0.59951997", "0.5941467", "0.58681095", "0.5856485", "0.57614243", "0.5617354", "0.5611247", "0.5596623", "0.558593", "0.5584332", "0.5543917", "0.5542992", "0.54703754", "0.544997", "0.544899", "0.54458034", "0.5438347", "0.54342854", "0.54192024", "0.5414548", "0.5387722",...
0.7293197
0
Read data from the serial interface.
def s_read(self, timeout = 1): if self.s.is_open: data = [] b = bytearray() try: self.s.timeout = 3 data = self.s.read(1) if not len(data): return b self.s.timeout = .04 data += self.s.read(500) except Exception as e: print("Could not read from port" + str(e)) start = data.find(b'\x7e') end = data.find(b'\x7f') txt_start = b'' txt_end = b'' if start < 0: txt_start = data elif end < 0: txt_start = data else: txt_start = data[0:start] txt_end = data[end+1:] txt = txt_start + txt_end if len(txt): if self.log_ascii: self.logfile.write(txt) # End logging if Connection.START_UP_STRING in data: raise Reset_Exception('ChipSHOUTER unit has reset - wait 5 seconds then reinitialize.') if start < 0 or end < 0 or end < start: b = bytearray() return b if self.log_input: self.logfile.write('\nIN :' + str(len(data)) + '[' + hexlify(data) + ']' + '\n') b.extend(data[start:end]) return b else: raise IOError('Comport is not open, use ctl_connect()')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _serial_read(self, size):\n self.write([self.SERIAL_IO])\n resp = self.read(size)\n data = self.decode(resp)\n return data", "def read_from_serial(self):\n self.running = True\n while self.running:\n data = self.serial.readline().decode()\n if ...
[ "0.74985415", "0.7416476", "0.7264147", "0.71994764", "0.7146726", "0.71219176", "0.70422417", "0.68189454", "0.67572755", "0.6739092", "0.6716637", "0.667686", "0.6584695", "0.6572481", "0.6557061", "0.65287864", "0.6526724", "0.650409", "0.6499726", "0.6484594", "0.6483244"...
0.66642123
12
Write data to the serial interface. Raises an IOError if not connected.
def s_write(self, data): self.s.flushOutput() if self.s.is_open: try: self.s.write(data) if self.log_output: self.logfile.write('\nIN :' + str(len(data)) + '[' + hexlify(data) + ']' + '\n') except Exception as e: print("Could not write to port " + str(e)) else: raise IOError('Comport is not open, use ctl_connect()')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write(self, data):\n try:\n self.ser.write(data)\n except SerialException as se:\n log.debug('Serial connection write error: {}'.format(se))", "def serial_write(data):\n global ser\n if ser.writable():\n ser.write(data)\n else:\n print 'The serial', ...
[ "0.8171523", "0.8080821", "0.742356", "0.72597915", "0.7125678", "0.69886917", "0.69797105", "0.6972711", "0.6927657", "0.6772062", "0.6589696", "0.6576141", "0.64458084", "0.6434454", "0.635318", "0.6322469", "0.631071", "0.6309109", "0.62654054", "0.6261372", "0.6193785", ...
0.75385743
2
Set a bool option.
def get_bools_array(self, bools, limit): bit_array = bytearray() bits_array_length = (limit) // 8 for x in range(bits_array_length): bit_array.append(0) for x in range(limit): # set the bits if bools[x]['value'] == True: index = x//8 bit = x % 8 bit_array[index] |= 1 << bit return bit_array
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setBooleanOption(self, option, value):\n result = self.__lib.voikkoSetBooleanOption(self.__handle, option, _boolToInt(value))\n if result == 0:\n raise VoikkoException(\"Could not set boolean option %s to value %s\" % (option, value))", "def setBoolValue(self, *args):\n return...
[ "0.81047094", "0.7505482", "0.72757864", "0.72743803", "0.70943683", "0.705241", "0.70266336", "0.70084757", "0.6970434", "0.6921304", "0.6904598", "0.68884057", "0.6847308", "0.6807809", "0.67250526", "0.6707975", "0.6671484", "0.664038", "0.66249967", "0.6597783", "0.651423...
0.0
-1
Set a bool option.
def set_bools(self, value, bools, limit): for x in range(limit): if value & 1 << x: bools[x]['value'] = True else: bools[x]['value'] = False pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setBooleanOption(self, option, value):\n result = self.__lib.voikkoSetBooleanOption(self.__handle, option, _boolToInt(value))\n if result == 0:\n raise VoikkoException(\"Could not set boolean option %s to value %s\" % (option, value))", "def setBoolValue(self, *args):\n return...
[ "0.81047094", "0.7505482", "0.72757864", "0.72743803", "0.70943683", "0.705241", "0.70266336", "0.70084757", "0.6970434", "0.6921304", "0.6904598", "0.68884057", "0.6847308", "0.6807809", "0.67250526", "0.6707975", "0.6671484", "0.664038", "0.66249967", "0.6597783", "0.651423...
0.0
-1
Set the value. (And calls the base class) This will also check for Options to set the bools. FAULTS_ACTIVE FAULTS_CURRENT >>> BIT_FAULT_PROBE = 0 >>> BIT_FAULT_OVERTEMP = 1 >>> BIT_FAULT_PANEL_OPEN = 2 >>> BIT_FAULT_HIGH_VOLTAGE = 3 >>> BIT_FAULT_RAM_CRC = 4 >>> BIT_FAULT_EEPROM_CRC = 5 >>> BIT_FAULT_GPIO_ERROR = 6 >>> BIT_FAULT_LTFAULT_ERROR = 7 >>> BIT_FAULT_TRIGGER_ERROR = 8 >>> BIT_FAULT_HARDWARE_EXC = 9 >>> BIT_FAULT_TRIGGER_GLITCH = 10 >>> BIT_FAULT_OVERVOLTAGE = 11 >>> BIT_FAULT_TEMP_SENSOR = 12
def set_value(self, item, value): super(t_16_Bit_Options, self).set_value(item, value) if(item == t_16_Bit_Options.FAULT_ACTIVE): self.set_bools(value, self.faults_current, t_16_Bit_Options.BIT_FAULT_MAX ) if(item == t_16_Bit_Options.FAULT_LATCHED): self.set_bools(value, self.faults_latched, t_16_Bit_Options.BIT_FAULT_MAX )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set(self, value): # interface for BlueSky plans\n if str(value).lower() not in (\"fly\", \"taxi\", \"return\"):\n msg = \"value should be either Taxi, Fly, or Return.\"\n msg + \" received \" + str(value)\n raise ValueError(msg)\n\n if self.busy.value:\n ...
[ "0.6006613", "0.59550226", "0.5876505", "0.5848868", "0.58279836", "0.57625586", "0.57241833", "0.57025355", "0.5644544", "0.56344664", "0.5631761", "0.55913144", "0.55671185", "0.551112", "0.5497896", "0.5429743", "0.54183626", "0.53717023", "0.5368946", "0.53565514", "0.534...
0.7903865
0
Set the value. (And calls the base class) This will also check for Options to set the bools. BOOLEAN_CONFIG_1 >>> BIT_PROBE_TERMINATION = 0 >>> BIT_TMODE = 1 >>> BIT_EMODE = 2 >>> BIT_MUTE = 3 >>> BIT_PATTERN_TRIGGER = 4 >>> BIT_DEBUG_REALTIME = 5 >>> BIT_DEBUGPRINT = 6 >>> BIT_DEBUG_HW_OVERRIDE = 7
def set_value(self, item, value): super(t_8_Bit_Options, self).set_value(item, value) if(item == t_8_Bit_Options.BOOLEAN_CONFIG_1): self.set_bools(value, self.bools, t_8_Bit_Options.BIT_MAX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setbool(self, strcommand, value):\n command = ct.c_wchar_p(strcommand)\n value = ct.c_bool(value)\n self.lib.AT_SetBool(self.AT_H, command, value)", "def setBoolean(self, key, value):\n self.__config.setValue(key, QtCore.QVariant(value))\n self.__saved = False", "def Set(...
[ "0.69975346", "0.66105807", "0.6431443", "0.641337", "0.63824916", "0.63277537", "0.6307116", "0.6288704", "0.6275827", "0.6273386", "0.62682843", "0.6259129", "0.6229773", "0.6222815", "0.6199952", "0.615967", "0.6145829", "0.61051655", "0.6090899", "0.6050174", "0.6049057",...
0.7702449
0
Calls base class and sets the options.
def __init__(self): super(t_var_size_Options, self).__init__() self.options = { t_var_size_Options.BOARD_ID : {'value' : '', 'name' : 'board_id' }, t_var_size_Options.CURRENT_STATE : {'value' : '', 'name' : 'state' }, t_var_size_Options.PATTERN_WAVE : {'value' : '', 'name' : 'pat_wav' } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, **options):\n self.options = options", "def set_options(self, options):\n self.options = options", "def initialize_options(self):", "def initialize(self, options):", "def initialize_options(self):\n pass", "def initialize_options(self):\n pass", "def initialize_op...
[ "0.77025074", "0.7662632", "0.7593163", "0.7496479", "0.7381808", "0.7353797", "0.7353797", "0.71979177", "0.71634424", "0.7015553", "0.7015553", "0.7015013", "0.6925202", "0.68997306", "0.683711", "0.6774097", "0.6744283", "0.6743406", "0.6712053", "0.6625223", "0.65894604",...
0.6098035
75
Builds a command packet
def build_command_packet(self, command): packet = bytearray() # All option fields are 0 packet.append(0) packet.append(0) packet.append(0) packet.append(command) return packet
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _build_command(self, command_name, hardware_address = '', comp_var_dict = None):\n # Start command adn set name\n command = \"<Command><Name>{command_name}</Name>\".format(command_name=command_name)\n\n if hardware_address:\n command += \"<DeviceDetails><HardwareAddress>{hardwar...
[ "0.7055916", "0.6958671", "0.6834779", "0.6826811", "0.66905415", "0.6657784", "0.66384405", "0.65551907", "0.64848095", "0.6423199", "0.641272", "0.6404379", "0.63837487", "0.6381479", "0.6360029", "0.6312353", "0.62964827", "0.62884474", "0.6237116", "0.61567235", "0.614946...
0.8249946
0
Show the protocol that was received.
def __show_protocol__(self, data): t_16 = t_16_Bit_Options() t_8 = t_8_Bit_Options() t_var = t_8_Bit_Options() print('Received ' + str(len(data)) + ' Bytest') #---------------------------------------------------------------------- print('='*80) print('Handling Protocol response: ' + hexlify(data)) #---------------------------------------------------------------------- print('='*80) print('Overhead Bytes: ' + hexlify(data[:BP_TOOL.OVERHEAD])) print('Number of UINT16 bitstream data = ' + str(data[BP_TOOL.UINT16S])) print('Number of UINT8 bitstream data = ' + str(data[BP_TOOL.UINT8S])) print('Number of var bitstream data = ' + str(data[BP_TOOL.VARS])) print('Follow = ' + str(self.get_follow(data))) print('Length = ' + str(self.get_length(data))) start = self.get_follow_and_length(data) end = start + BP_TOOL.SIZE_FOLLOW + BP_TOOL.SIZE_LEN print('Following bytes and length = ' + hexlify(data[start:end])) #---------------------------------------------------------------------- print('='*80) bits = self.get_16bit_options_bits(data) values = self.get_16bit_options(data) options = self.get_options_requested(bits) # Display the options if exist if len(options): print('UINT16 bits...... : ' + hexlify(bits)) print('UINT16 data...... : ' + hexlify(values)) print('UINT16 Num of opts ... : ' + str(len(values) // 2)) print('UINT16 options... : ' + str(options)) print('-'*80) for x in range(len(options)): value = (values[x*2] << 8) | (values[x*2 + 1]) opt = options[x] t_16.set_value(opt, value) print('Option: ' + t_16.options[opt]['name'] + ' ' + str(value)) pprint.pprint(t_16.options) else: print('No 16 bit options') #---------------------------------------------------------------------- print('-'*80) bits = self.get_8bit_options_bits(data) values = self.get_8bit_options(data) options = self.get_options_requested(bits) # Display the options if exist if len(options): print('UINT8 bits...... : ' + hexlify(bits)) print('UINT8 data...... : ' + hexlify(values)) print('UINT8 options... : ' + str(options)) print('-'*80) for x in range(len(options)): value = values[x] opt = options[x] t_8.set_value(opt, value) print('Option: ' + t_8.options[x]['name'] + ' ' + str(value)) pprint.pprint(t_8.options) else: print('No 8 bit options') #---------------------------------------------------------------------- print('-'*80) bits = self.get_var_options_bits(data) values = self.get_var_options(data) print('VARS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') # Display the options if exist if len(values): pprint.pprint(values) else: print('No var bit options') print('VAR options... : ' + str(self.get_options_requested(bits))) print('VARS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') print('-'*80)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def protocol_details(self) -> pulumi.Output['outputs.ServerProtocolDetails']:\n return pulumi.get(self, \"protocol_details\")", "def protocol(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"protocol\")", "def protocol(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"protoc...
[ "0.7430098", "0.72326285", "0.72326285", "0.7058655", "0.70196545", "0.694914", "0.694914", "0.68412536", "0.6835205", "0.67115223", "0.6701628", "0.66536134", "0.66198826", "0.66198826", "0.6572238", "0.642882", "0.64042336", "0.6377508", "0.62557447", "0.62252337", "0.61820...
0.6732168
9
remove the special characters for stuffing
def __packet_unstuff(self, data): unstuffed = bytearray() escape = False for count in data: if escape == False: if count == 0x7e: continue if count == 0x7f: continue if count == 0x7d: escape = True else: unstuffed.append(count) else: unstuffed.append(count + 0x7d) escape = False return(unstuffed)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removeSpecialChars(self) -> None:\n self.text = re.sub('[^a-zA-z0-9\\n\\.\\s]', '', self.text)", "def _remove_special_chars(self, text: str) -> str:\n pattern = re.compile(self.special_chars_pattern)\n text = re.sub(pattern, \" \", text)\n return text", "def remove_special_char(...
[ "0.812195", "0.7796951", "0.7721134", "0.7502092", "0.74759036", "0.74687314", "0.74635375", "0.74607944", "0.74368715", "0.73807883", "0.7368768", "0.733261", "0.73250467", "0.7321472", "0.7290007", "0.7253354", "0.72486293", "0.7246413", "0.72234553", "0.72016734", "0.70941...
0.0
-1
inserts the special characters for stuffing
def __packet_stuff(self, data): stuffed = bytearray() stuffed.append(0x7e) for count in data: if count >= 0x7d and count <= 0x7f: stuffed.append(0x7d) stuffed.append(count - 0x7d) else: stuffed.append(count) stuffed.append(0x7f) return(stuffed)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_special(text):\r\n text = text.replace('\\r\\n', ' ')\r\n text = text.replace('\\n', ' ')\r\n text = text.replace('``', \"''\")\r\n text = text.replace('`', \"'\")\r\n text = text.replace('“', '\"')\r\n text = text.replace('”', '\"')\r\n text = text.replace('’', \"'\")\r\n text ...
[ "0.70876557", "0.7074311", "0.70390195", "0.69395334", "0.6510132", "0.6444828", "0.64407015", "0.6432656", "0.6415812", "0.64102846", "0.6397973", "0.63384503", "0.6326793", "0.63186383", "0.6290671", "0.62346226", "0.6180971", "0.61617744", "0.61617744", "0.61369485", "0.61...
0.0
-1
Init will connect to the com port of the shouter.
def __init__(self, comport, logging = False): super(Bin_API, self).__init__(comport, logging)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize(self):\n if self.real:\n self.agent.connect(self)\n else:\n self.connect() # Connect python client to VREP\n self.agent.connect(self)", "def init_com(self):\r\n self.__ser = serial.Serial(\r\n self.__dev_no, self.__baudrate, timeout=...
[ "0.68135244", "0.6722893", "0.6576823", "0.6545895", "0.644708", "0.6422418", "0.63781244", "0.6336236", "0.632813", "0.6293881", "0.6287817", "0.6272204", "0.6263622", "0.6260987", "0.62608707", "0.6248125", "0.6230067", "0.6226806", "0.6222727", "0.6207892", "0.6204479", ...
0.0
-1
ready_for_commands is a function to wait for the firmware to be ready to communicate
def ready_for_commands(self, retries = 3): while retries: try: self.refresh() return True except Reset_Exception as e: pass except Max_Retry_Exception as e: pass finally: retries -= 1 raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _wait_ready(self):\n command = self._recv_from_client()\n while command != \"READY\":\n command = self._client.recv_from_client()", "def waitonready(self):\n debug('ControllerStartup.waitonready()')\n waitonready(self.pidevice, **self._kwargs)", "def waitonready(pidev...
[ "0.66666836", "0.6577503", "0.64121866", "0.62709725", "0.60107315", "0.5956526", "0.5840667", "0.57543665", "0.57164615", "0.5709062", "0.57082236", "0.5687072", "0.5677375", "0.5664126", "0.5635631", "0.56272054", "0.56113994", "0.5595407", "0.55702424", "0.5542301", "0.554...
0.0
-1
This will get the board id.
def get_board_id(self, timeout = 0): self.get_option_from_shouter([t_var_size_Options.BOARD_ID], BP_TOOL.REQUEST_VAR) return str(self.config_var.options[t_var_size_Options.BOARD_ID]['value'].decode("ASCII"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def __board_id(self) -> str:\n url = await self.__url_with_auth(\"1/members/me/boards?fields=name\")\n boards = await (await super()._get_source_responses(url))[0].json()\n return str(first(boards, lambda board: self._parameter(\"board\") in board.values())[\"id\"])", "def ask_for_boar...
[ "0.8467954", "0.7145274", "0.7045439", "0.6920562", "0.687995", "0.67577267", "0.6710416", "0.66724986", "0.66724986", "0.664022", "0.66289103", "0.65972143", "0.65322155", "0.6522598", "0.6491379", "0.626192", "0.62350416", "0.6232243", "0.62153196", "0.61943984", "0.6173523...
0.7062877
2
This will string representing the current state of the system..
def get_state(self, timeout = 0): self.get_option_from_shouter([t_var_size_Options.CURRENT_STATE], BP_TOOL.REQUEST_VAR) rval = str(self.config_var.options[t_var_size_Options.CURRENT_STATE]['value'].decode("ASCII")) return rval
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state(self) -> str:", "def state(self):\n\n\t\treturn str(self)", "def stateString(self):\n return self._mdp.stateString(self._cur_state);", "def state(self):\r\n return str(self)", "def print_state(self):\n print('\\nthe current state is: ' + str(self.state) + '\\n')", "def stat...
[ "0.79885036", "0.77594405", "0.76912963", "0.7673117", "0.76422006", "0.76213574", "0.7592605", "0.7404585", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", "0.73807883", ...
0.0
-1
This will ask if the shouter has reset or not.
def get_is_reset(self, timeout = 0): response = self.send_command_to_shouter(BP_TOOL.IS_RESET) if response == BP_TOOL.ACK: return False elif response == BP_TOOL.IS_RESET: return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset():\n return True", "def hasReset(self, p_int): # real signature unknown; restored from __doc__\n return False", "def is_reset(self):\n return self._tag == 'reset'", "def reset(self):\n\n return bool(APIConsumer.post(\"/reset\"))", "def _allow_reset(self):\r\n return...
[ "0.7329896", "0.7245269", "0.71851176", "0.654862", "0.63327384", "0.6316024", "0.62982106", "0.62982106", "0.62176245", "0.62159413", "0.6165632", "0.61545885", "0.6149942", "0.6145588", "0.61453944", "0.61453944", "0.6144835", "0.61187637", "0.60972834", "0.6062806", "0.606...
0.6855109
3
This will get the current faults on the system.
def __get_faults_list(self, faults): r_faults = [] for x in faults: if faults[x]['value']: r_faults.append(faults[x]['name']) return r_faults
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_faults_current(self):\n request = self.get_option_from_shouter([t_16_Bit_Options.FAULT_ACTIVE], BP_TOOL.REQUEST_16)\n return self.__get_faults_list(self.config_16.faults_current)", "def faults(self):\n debug(\"Getting faults...\")\n code = int(\"01001000\",2)\n command ...
[ "0.82058364", "0.7297142", "0.6973599", "0.62839913", "0.6117404", "0.5914989", "0.585911", "0.5828832", "0.56888837", "0.5640751", "0.5596669", "0.55570495", "0.5398989", "0.5372518", "0.5344608", "0.5326614", "0.52823734", "0.525599", "0.5215235", "0.5206905", "0.51792276",...
0.6233432
4
This will get the current faults on the system.
def get_faults_current(self): request = self.get_option_from_shouter([t_16_Bit_Options.FAULT_ACTIVE], BP_TOOL.REQUEST_16) return self.__get_faults_list(self.config_16.faults_current)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def faults(self):\n debug(\"Getting faults...\")\n code = int(\"01001000\",2)\n command = pack('B',code)\n reply = self.query(command,count=2)\n faults = \" \"\n # The reply is 0xC8 followed by a faults status byte.\n if len(reply) != 2:\n if len(reply)>0...
[ "0.7297142", "0.6973599", "0.62839913", "0.6233432", "0.6117404", "0.5914989", "0.585911", "0.5828832", "0.56888837", "0.5640751", "0.5596669", "0.55570495", "0.5398989", "0.5372518", "0.5344608", "0.5326614", "0.52823734", "0.525599", "0.5215235", "0.5206905", "0.51792276", ...
0.82058364
0
This will get the latched faults on the system.
def get_faults_latched(self): request = self.get_option_from_shouter([t_16_Bit_Options.FAULT_LATCHED], BP_TOOL.REQUEST_16) return self.__get_faults_list(self.config_16.faults_latched)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_faults_current(self):\n request = self.get_option_from_shouter([t_16_Bit_Options.FAULT_ACTIVE], BP_TOOL.REQUEST_16)\n return self.__get_faults_list(self.config_16.faults_current)", "def faults(self):\n debug(\"Getting faults...\")\n code = int(\"01001000\",2)\n command ...
[ "0.6717997", "0.61814696", "0.5997935", "0.5937447", "0.5786711", "0.5544165", "0.5489587", "0.54597056", "0.53924805", "0.53853124", "0.53460693", "0.53460693", "0.5332667", "0.5330461", "0.5298619", "0.5260537", "0.5236995", "0.5182294", "0.5093936", "0.50649893", "0.504098...
0.807573
0
Arm timeout Because of safty reasons we will monitor the trigger when in the armed state. The trigger needs to be activated within the timeout programmed. Every trigger will reset the timer with every pulse. If the time out occurs, the shouter will disarm and disable the high voltage circuitry. The Arm timer will be reset on every trigger / internal or external. NOTE Valid range is between 1 60 minutes
def get_arm_timeout(self, timeout = 0): self.get_option_from_shouter([t_16_Bit_Options.ARM_TIMEOUT], BP_TOOL.REQUEST_16) return self.config_16.options[t_16_Bit_Options.ARM_TIMEOUT]['value']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timeout(self):\n self.timeout_scan_flag=True\n self.timer.stop()\n self.status_sig.emit([\"Update_Status\",\"Timeout during acquisition\",'log'])\n self.status_sig.emit([\"Timeout\"])", "def set_timeout(self, timeout):\r\n return self._arm.set_timeout(timeout)", "def powe...
[ "0.68168837", "0.6529387", "0.61601263", "0.60441667", "0.59999216", "0.59811276", "0.5938586", "0.5874886", "0.58427435", "0.5785943", "0.5688475", "0.56534606", "0.56367904", "0.563389", "0.5626759", "0.5621003", "0.56125724", "0.56084305", "0.5593728", "0.55809", "0.557784...
0.6253944
2
Gets the pattern wave pat_wave 101011110011 .... >>> Request >>> 0> >>> Pattern Wave [More to follow] >>> >> Request Next block >>> 0> >>> Pattern Wave [More to follow] >>> >> >>> ..... >>> >>> Request Next block >>> 0> >>> Pattern Wave [No More to follow] >>> <)
def __request_pat_wave(self, r_number): packet = bytearray() packet.append(0) # 16 bit options packet.append(0) # 8 bit options packet.append(1) # Request the 1 option # --------------------------------------------------------------------- # Request the variable length options. pattern wave. packet.append(0x01 << t_var_size_Options.PATTERN_WAVE) # --------------------------------------------------------------------- # Packets to follow packet.append(r_number) # --------------------------------------------------------------------- # Length of the bytes to follow packet.append(0) rval = self.interact_with_shouter(packet) if rval != False: return rval return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wave(self):\n return self._wave", "def waveband(self):\n return self.get(\"waveband\")", "def waveband(self):\n return self.get(\"waveband\", default=\"\", decode=True).split(\"#\")", "def _wave(self):\n try:\n return wave.open(StringIO(self.contents))\n excep...
[ "0.5981788", "0.5724615", "0.56906223", "0.5673661", "0.56648856", "0.544376", "0.54234815", "0.5388818", "0.5373861", "0.53209776", "0.53193724", "0.5285998", "0.52687967", "0.5267398", "0.51937246", "0.5191461", "0.5150314", "0.5148032", "0.51321924", "0.5121972", "0.512197...
0.7454566
0
This is the main entry for the console.
def main(): bp = Bin_API('COM10') print('Testing') bp.set_hwtrig_term(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def console_entry():\n #main()", "def main():\n return", "def main() -> None:\n return", "def main() -> None:", "def main() -> None:", "def main() -> None:", "def main() -> None:", "def main():\n pass", "def main():\n\tcli = Cli()\n\tcli.run()", "def main(args=None):", "def main...
[ "0.8272837", "0.79682225", "0.7880587", "0.77964354", "0.77964354", "0.77964354", "0.77964354", "0.7750121", "0.7633499", "0.7600834", "0.7600834", "0.7592275", "0.75276023", "0.75276023", "0.75276023", "0.75276023", "0.75276023", "0.75276023", "0.75276023", "0.75276023", "0....
0.0
-1
If we don't define this, it will use the regular dictionary __iter__ which does not call SortedDictionary.keys().
def __iter__(self): for each in list(self.keys()): yield each
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __iter__(self):\n return self.ordered_keys.__iter__()", "def __iter__(self):\n return iter(self.keys())", "def __iter__(self):\n if self._len_keys == 1:\n yield from self._dict.keys()\n else:\n for key in self._dict.keys():\n yield tuple(sort...
[ "0.8112754", "0.7881003", "0.7754839", "0.76607627", "0.764876", "0.7564836", "0.7504256", "0.75019187", "0.74793774", "0.7474488", "0.74243957", "0.7364466", "0.7364466", "0.73356414", "0.7253679", "0.72350866", "0.7233559", "0.7106118", "0.7090561", "0.7053434", "0.69872856...
0.7525102
6
End of checkout process controller. Confirmation is basically seing.
def payment_confirmation(self, **post): sale_order_id = view.session.get('sale_last_order_id') partner_id = view.env.user.partner_id if sale_order_id: sale_order_id = view.env['sale.order'].sudo().browse(int(sale_order_id)) lines = sale_order_id.order_line policy_line = view.env['policies.holder.line'] for line in lines: code = ''.join(random.choice('0123456789ABCDEF') for i in range(16)) policy_line.sudo().create({'name':lines.product_id.id, 'premium':lines.price_unit, 'policy_code':code, 'line_id':partner_id.id, 'start_date':Datetime.now(), 'end_date':Datetime.to_string(timedelta(days=lines.product_id.policy_period*360)+ datetime.now())}) s = super(InsuranceWebsiteSale, self).payment_confirmation() view.session['sale_last_order_id'] = False return s return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def end(self):\n self.my_print(\"\\t[DONE]\", msg_types.INFO)\n self.in_progress = False", "def exit(self): \n self.teo_exchange_intent = self.teo_wallet\n self.withdraw_intent = self.euro_wallet\n\n self.register_teo_exchange(self.teo_exchange_intent)\n self.registe...
[ "0.6969281", "0.6882413", "0.6855795", "0.6694447", "0.65295106", "0.65165967", "0.644258", "0.6396555", "0.6290332", "0.62667876", "0.6263875", "0.625368", "0.625368", "0.625368", "0.62194836", "0.6208796", "0.62025553", "0.6159344", "0.6159344", "0.6155485", "0.6152719", ...
0.0
-1
The set of arguments for constructing a L3Network resource.
def __init__(__self__, *, extended_location: pulumi.Input['ExtendedLocationArgs'], l3_isolation_domain_id: pulumi.Input[str], resource_group_name: pulumi.Input[str], vlan: pulumi.Input[float], hybrid_aks_ipam_enabled: Optional[pulumi.Input[Union[str, 'HybridAksIpamEnabled']]] = None, hybrid_aks_plugin_type: Optional[pulumi.Input[Union[str, 'HybridAksPluginType']]] = None, interface_name: Optional[pulumi.Input[str]] = None, ip_allocation_type: Optional[pulumi.Input[Union[str, 'IpAllocationType']]] = None, ipv4_connected_prefix: Optional[pulumi.Input[str]] = None, ipv6_connected_prefix: Optional[pulumi.Input[str]] = None, l3_network_name: Optional[pulumi.Input[str]] = None, location: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): pulumi.set(__self__, "extended_location", extended_location) pulumi.set(__self__, "l3_isolation_domain_id", l3_isolation_domain_id) pulumi.set(__self__, "resource_group_name", resource_group_name) pulumi.set(__self__, "vlan", vlan) if hybrid_aks_ipam_enabled is None: hybrid_aks_ipam_enabled = 'True' if hybrid_aks_ipam_enabled is not None: pulumi.set(__self__, "hybrid_aks_ipam_enabled", hybrid_aks_ipam_enabled) if hybrid_aks_plugin_type is None: hybrid_aks_plugin_type = 'SRIOV' if hybrid_aks_plugin_type is not None: pulumi.set(__self__, "hybrid_aks_plugin_type", hybrid_aks_plugin_type) if interface_name is not None: pulumi.set(__self__, "interface_name", interface_name) if ip_allocation_type is None: ip_allocation_type = 'DualStack' if ip_allocation_type is not None: pulumi.set(__self__, "ip_allocation_type", ip_allocation_type) if ipv4_connected_prefix is not None: pulumi.set(__self__, "ipv4_connected_prefix", ipv4_connected_prefix) if ipv6_connected_prefix is not None: pulumi.set(__self__, "ipv6_connected_prefix", ipv6_connected_prefix) if l3_network_name is not None: pulumi.set(__self__, "l3_network_name", l3_network_name) if location is not None: pulumi.set(__self__, "location", location) if tags is not None: pulumi.set(__self__, "tags", tags)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: CloudServicesNetworkArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def __init__(__self__,\n resource_name: str,\n args: ManagedNetworkGroupArgs,\n ...
[ "0.6447655", "0.6238602", "0.60722184", "0.5890332", "0.57577604", "0.5746685", "0.57304883", "0.5688393", "0.56835395", "0.56028044", "0.5589953", "0.5589953", "0.5589953", "0.5589815", "0.5561867", "0.55557245", "0.55503047", "0.5528516", "0.551963", "0.55083257", "0.550710...
0.0
-1
The extended location of the cluster associated with the resource.
def extended_location(self) -> pulumi.Input['ExtendedLocationArgs']: return pulumi.get(self, "extended_location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extended_location(self) -> pulumi.Output['outputs.ExtendedLocationResponse']:\n return pulumi.get(self, \"extended_location\")", "def extended_location(self) -> pulumi.Output['outputs.ExtendedLocationResponse']:\n return pulumi.get(self, \"extended_location\")", "def extended_location(self) -...
[ "0.67308724", "0.67308724", "0.6552111", "0.6427688", "0.64267975", "0.64260936", "0.64260936", "0.63151413", "0.6296761", "0.6123441", "0.6123441", "0.595561", "0.58933264", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953...
0.6507004
3
The resource ID of the Network Fabric l3IsolationDomain.
def l3_isolation_domain_id(self) -> pulumi.Input[str]: return pulumi.get(self, "l3_isolation_domain_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l3_isolation_domain_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"l3_isolation_domain_id\")", "def resource_id(self) -> str:\n return pulumi.get(self, \"resource_id\")", "def resource_id(self) -> str:\n return pulumi.get(self, \"resource_id\")", "def resource_id(self) -...
[ "0.82438326", "0.639748", "0.639748", "0.639748", "0.6284943", "0.6265004", "0.62123185", "0.617114", "0.617114", "0.617114", "0.617114", "0.617114", "0.6158674", "0.60937095", "0.60937095", "0.6091811", "0.6091811", "0.6091811", "0.60563904", "0.60457486", "0.5990473", "0....
0.8125011
1
The name of the resource group. The name is case insensitive.
def resource_group_name(self) -> pulumi.Input[str]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def group_name(self) -> str:\n return pulumi.get(self, \"group_name\")", "def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")", "def resource_gr...
[ "0.8591477", "0.8364604", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.81754756", "0.8084906", "0.8084906", "0.8084906", "0.8084906", "0.8084906", "0.8084906", ...
0.80879456
52
The VLAN from the l3IsolationDomain that is used for this network.
def vlan(self) -> pulumi.Input[float]: return pulumi.get(self, "vlan")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vlan(self) :\n\t\ttry :\n\t\t\treturn self._vlan\n\t\texcept Exception as e:\n\t\t\traise e", "def get_vlan_tag(self):\n\t\treturn call_sdk_function('PrlVirtNet_GetVlanTag', self.handle)", "def get_vlan_tag(self):\n\t\treturn call_sdk_function('PrlSrvCfgNet_GetVlanTag', self.handle)", "def vlan(self) -> ...
[ "0.7999924", "0.7726699", "0.7723152", "0.75627106", "0.6896781", "0.68907255", "0.66186804", "0.6475853", "0.6435667", "0.64156556", "0.6283416", "0.62097275", "0.62097275", "0.62045115", "0.579412", "0.5772401", "0.57347697", "0.56815064", "0.5577279", "0.5575757", "0.55137...
0.74945563
4
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster.
def hybrid_aks_ipam_enabled(self) -> Optional[pulumi.Input[Union[str, 'HybridAksIpamEnabled']]]: return pulumi.get(self, "hybrid_aks_ipam_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def internet_advertising_disabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"internet_advertising_disabled\")", "def internet_advertising_disabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"internet_advertising_disabled\")", "def ipam_enabled(self) ...
[ "0.6013737", "0.6013737", "0.57309324", "0.56934357", "0.5477145", "0.52816826", "0.52816826", "0.5257691", "0.52326876", "0.5207934", "0.5207934", "0.5186799", "0.5176646", "0.5155211", "0.51384276", "0.51132184", "0.51126623", "0.5108996", "0.5088345", "0.5074993", "0.50374...
0.0
-1
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS.
def hybrid_aks_plugin_type(self) -> Optional[pulumi.Input[Union[str, 'HybridAksPluginType']]]: return pulumi.get(self, "hybrid_aks_plugin_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_plugin(self) -> Optional[pulumi.Input[Union[str, 'NetworkPlugin']]]:\n return pulumi.get(self, \"network_plugin\")", "def network_plugin_mode(self) -> Optional[pulumi.Input[Union[str, 'NetworkPluginMode']]]:\n return pulumi.get(self, \"network_plugin_mode\")", "def get_network_plugin(...
[ "0.621237", "0.5870624", "0.56298715", "0.5599445", "0.54124904", "0.5070947", "0.5070947", "0.4954396", "0.4948518", "0.4948518", "0.49345273", "0.48785043", "0.48785043", "0.4872126", "0.48533687", "0.48368704", "0.4830044", "0.48197207", "0.47556755", "0.47481972", "0.4741...
0.0
-1
The default interface name for this L3 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine.
def interface_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "interface_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interface_name(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"interface_name\")", "def l3_network_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"l3_network_name\")", "def interface_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \...
[ "0.67701626", "0.6730182", "0.6579234", "0.65378875", "0.6346248", "0.6293956", "0.6253151", "0.61782867", "0.61560553", "0.61084664", "0.61054385", "0.605106", "0.59554195", "0.59140545", "0.5869591", "0.58683455", "0.58659315", "0.5836901", "0.5836809", "0.5832016", "0.5827...
0.684074
0
The type of the IP address allocation, defaulted to "DualStack".
def ip_allocation_type(self) -> Optional[pulumi.Input[Union[str, 'IpAllocationType']]]: return pulumi.get(self, "ip_allocation_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ip_allocation_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"ip_allocation_type\")", "def _get_address_type(self):\n return self.__address_type", "def get_ip_type1(self) -> str:\n hex_ip = hexlify(self.message)[152:160]\n ip_addr = int(hex_ip[6:8] + hex_ip[4...
[ "0.66921926", "0.6558105", "0.6343783", "0.62579095", "0.6204035", "0.61733663", "0.60489833", "0.6027968", "0.590761", "0.5870783", "0.57298845", "0.5710156", "0.569875", "0.5694414", "0.5689083", "0.5678903", "0.5581792", "0.5554217", "0.5541468", "0.55387825", "0.5525745",...
0.60764885
6
The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack.
def ipv4_connected_prefix(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "ipv4_connected_prefix")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def local_ipv4_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv4_network_cidr\")", "def local_ipv4_network_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"local_ipv4_network_cidr\")", "def local_ipv4_network_cidr(self) -> Optional[pulumi.Input...
[ "0.74853224", "0.73985845", "0.73985845", "0.72560716", "0.72186995", "0.68104565", "0.68104565", "0.6797192", "0.66854614", "0.6672047", "0.65196866", "0.6441253", "0.64102024", "0.64046043", "0.6388265", "0.6357316", "0.63264906", "0.63264906", "0.63264906", "0.6296035", "0...
0.72907937
3
The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack.
def ipv6_connected_prefix(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "ipv6_connected_prefix")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PrefixIpv6Address(self):\n if self.force_auto_sync:\n self.get('PrefixIpv6Address')\n return self._PrefixIpv6Address", "def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")", "def local_ipv6_network_cidr(self) -> Opt...
[ "0.7729275", "0.76980174", "0.76423615", "0.76423615", "0.7312516", "0.6983688", "0.6952086", "0.69470865", "0.6910834", "0.6910834", "0.6771784", "0.65345484", "0.6393636", "0.6392489", "0.634702", "0.6326751", "0.6292675", "0.6250887", "0.62504554", "0.6245007", "0.6242389"...
0.74332094
4
The name of the L3 network.
def l3_network_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "l3_network_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network(self) -> str:\n return pulumi.get(self, \"network\")", "def computer_network_name(self) -> str:\n return self._computer_network_name", "def network_name(self, **kwargs):\n\n return self.api_request(self._get_method_fullname(\"network_name\"), kwargs)", "def name(self) -> str:...
[ "0.6955331", "0.6824133", "0.6799091", "0.6677395", "0.66031", "0.6491807", "0.6462104", "0.64592564", "0.64398986", "0.63908404", "0.63872564", "0.638713", "0.63722634", "0.6359511", "0.6331267", "0.63089246", "0.62042356", "0.6186131", "0.61773044", "0.61605525", "0.6082077...
0.88098806
0
The geolocation where the resource lives
def location(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_location(self):\n\t\treturn self.location", "def get_location(self):\n return self.location", "def get_location(self):\n return self.location", "def get_location(self):\r\n return self.__location", "def get_location(self):\r\n return None", "def getLocation(self):\n ...
[ "0.816298", "0.7999453", "0.79540074", "0.7945644", "0.78364915", "0.77626437", "0.7730134", "0.7681095", "0.7624169", "0.76093256", "0.76093256", "0.75724584", "0.75544393", "0.7547195", "0.75165695", "0.74507827", "0.74267685", "0.7419033", "0.7419033", "0.7419033", "0.7419...
0.0
-1
Get an existing L3Network resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None) -> 'L3Network': opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = L3NetworkArgs.__new__(L3NetworkArgs) __props__.__dict__["associated_resource_ids"] = None __props__.__dict__["cluster_id"] = None __props__.__dict__["detailed_status"] = None __props__.__dict__["detailed_status_message"] = None __props__.__dict__["extended_location"] = None __props__.__dict__["hybrid_aks_clusters_associated_ids"] = None __props__.__dict__["hybrid_aks_ipam_enabled"] = None __props__.__dict__["hybrid_aks_plugin_type"] = None __props__.__dict__["interface_name"] = None __props__.__dict__["ip_allocation_type"] = None __props__.__dict__["ipv4_connected_prefix"] = None __props__.__dict__["ipv6_connected_prefix"] = None __props__.__dict__["l3_isolation_domain_id"] = None __props__.__dict__["location"] = None __props__.__dict__["name"] = None __props__.__dict__["provisioning_state"] = None __props__.__dict__["system_data"] = None __props__.__dict__["tags"] = None __props__.__dict__["type"] = None __props__.__dict__["virtual_machines_associated_ids"] = None __props__.__dict__["vlan"] = None return L3Network(resource_name, opts=opts, __props__=__props__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a_state(id):\n state = storage.get(State, id)\n if state is not None:\n return jsonify(state.to_dict())\n abort(404)", "def get_state_by_id(state_id):\n state = storage.get(State, state_id)\n if not state:\n abort(404)\n return jsonify(state.to_dict()), 200", "def get_state_...
[ "0.5696972", "0.5616301", "0.559337", "0.55891603", "0.55436486", "0.5497109", "0.54890585", "0.5482085", "0.5455767", "0.5444336", "0.54149556", "0.53990793", "0.53760177", "0.53489095", "0.534057", "0.5307886", "0.5290895", "0.529065", "0.5247792", "0.5244457", "0.5226916",...
0.6454363
0
The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network.
def associated_resource_ids(self) -> pulumi.Output[Sequence[str]]: return pulumi.get(self, "associated_resource_ids")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_ids(self):\n return self._network_ids", "def otherResources(self):\n return self._get_list_field(\"otherResources\")", "def resource_names(self):\n return self._resource_names", "def get_ids(self):\n all_networks = []\n network_dict = {}\n for network, st...
[ "0.69101155", "0.6573186", "0.6401023", "0.6343839", "0.6258195", "0.5978847", "0.5978847", "0.5978847", "0.5819962", "0.5801385", "0.5795712", "0.5795712", "0.57860464", "0.57594633", "0.5741592", "0.5688209", "0.5666085", "0.5643691", "0.56345814", "0.5630704", "0.5611117",...
0.70806557
1
The resource ID of the Network Cloud cluster this L3 network is associated with.
def cluster_id(self) -> pulumi.Output[str]: return pulumi.get(self, "cluster_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cluster_id(self) -> str:\n return pulumi.get(self, \"cluster_id\")", "def cluster_id(self) -> str:\n return pulumi.get(self, \"cluster_id\")", "def cluster_id(self) -> str:\n return pulumi.get(self, \"cluster_id\")", "def cluster_id(self) -> str:\n return pulumi.get(self, \"cl...
[ "0.8012701", "0.8012701", "0.8012701", "0.8012701", "0.8012701", "0.767193", "0.724202", "0.724202", "0.71904457", "0.71904457", "0.71904457", "0.7147318", "0.71079326", "0.7104546", "0.70985615", "0.70811", "0.7055768", "0.69946766", "0.69447", "0.69314307", "0.68725604", ...
0.74517417
8
The more detailed status of the L3 network.
def detailed_status(self) -> pulumi.Output[str]: return pulumi.get(self, "detailed_status")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(ctx):\n return show_network_status()", "def detailed_status(self) -> str:\n return pulumi.get(self, \"detailed_status\")", "def status(self):\n \n tmpl1 = \"\"\"%-20s%-52s[%s]\"\"\"\n tmpl2 = \"\"\"%-20s%-52s\\n\"\"\"\n # print tmpl1 % (\"Machine Name\", \"IP Ad...
[ "0.7574918", "0.7074409", "0.70706975", "0.6863271", "0.6652941", "0.6643125", "0.6537197", "0.6532778", "0.6486455", "0.64751476", "0.6474038", "0.6464015", "0.6456763", "0.64546263", "0.6443891", "0.64406186", "0.6434034", "0.6434034", "0.6425376", "0.64220667", "0.63576347...
0.71242344
2
The descriptive message about the current detailed status.
def detailed_status_message(self) -> pulumi.Output[str]: return pulumi.get(self, "detailed_status_message")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detailed_status_message(self) -> str:\n return pulumi.get(self, \"detailed_status_message\")", "def detailed_status(self) -> str:\n return pulumi.get(self, \"detailed_status\")", "def status_message(self) -> str:\n return pulumi.get(self, \"status_message\")", "def detailed_status(se...
[ "0.89667886", "0.8075508", "0.79899865", "0.78511816", "0.78511816", "0.7514408", "0.7487773", "0.74315125", "0.74046624", "0.71724355", "0.7140361", "0.71236587", "0.71236587", "0.71236587", "0.7112143", "0.710846", "0.710131", "0.70546633", "0.6989946", "0.69429255", "0.689...
0.87084526
2
The extended location of the cluster associated with the resource.
def extended_location(self) -> pulumi.Output['outputs.ExtendedLocationResponse']: return pulumi.get(self, "extended_location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extended_location(self) -> pulumi.Output[Optional['outputs.ExtendedLocationResponse']]:\n return pulumi.get(self, \"extended_location\")", "def extended_location(self) -> pulumi.Input['ExtendedLocationArgs']:\n return pulumi.get(self, \"extended_location\")", "def extended_location(self) -> p...
[ "0.6552111", "0.6507004", "0.6507004", "0.6427688", "0.64267975", "0.64260936", "0.64260936", "0.63151413", "0.6296761", "0.6123441", "0.6123441", "0.595561", "0.58933264", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953", "0.5883953",...
0.67308724
1
Field Deprecated. These fields will be empty/omitted. The list of Hybrid AKS cluster resource IDs that are associated with this L3 network.
def hybrid_aks_clusters_associated_ids(self) -> pulumi.Output[Sequence[str]]: return pulumi.get(self, "hybrid_aks_clusters_associated_ids")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gateway_cluster_id_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"gateway_cluster_id_lists\")", "def cluster_ids(self):\n return self.model.cluster_ids", "def _get_cluster_list(self):\n return self.__cluster_list", "def network_ids(self):\...
[ "0.68748236", "0.6741056", "0.6469224", "0.58448756", "0.5693075", "0.5632907", "0.56074035", "0.56074035", "0.56074035", "0.56074035", "0.56074035", "0.5602489", "0.55777043", "0.55605936", "0.5555327", "0.55306417", "0.55130476", "0.55130476", "0.55060947", "0.5469506", "0....
0.5681043
6
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The indicator of whether or not to disable IPAM allocation on the network attachment definition injected into the Hybrid AKS Cluster.
def hybrid_aks_ipam_enabled(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "hybrid_aks_ipam_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def internet_advertising_disabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"internet_advertising_disabled\")", "def internet_advertising_disabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"internet_advertising_disabled\")", "def ipam_enabled(self) ...
[ "0.60128003", "0.60128003", "0.57295716", "0.56930447", "0.5477912", "0.5282392", "0.5282392", "0.52573335", "0.5233392", "0.5205244", "0.5205244", "0.5186832", "0.5175805", "0.5155281", "0.51379627", "0.51135457", "0.5112992", "0.51077884", "0.50872314", "0.5076411", "0.5037...
0.0
-1
Field Deprecated. The field was previously optional, now it will have no defined behavior and will be ignored. The network plugin type for Hybrid AKS.
def hybrid_aks_plugin_type(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "hybrid_aks_plugin_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_plugin(self) -> Optional[pulumi.Input[Union[str, 'NetworkPlugin']]]:\n return pulumi.get(self, \"network_plugin\")", "def network_plugin_mode(self) -> Optional[pulumi.Input[Union[str, 'NetworkPluginMode']]]:\n return pulumi.get(self, \"network_plugin_mode\")", "def get_network_plugin(...
[ "0.6210376", "0.5869546", "0.56280184", "0.5598459", "0.5410468", "0.5071059", "0.5071059", "0.49506718", "0.4947999", "0.4947999", "0.4933722", "0.48782876", "0.48782876", "0.48722976", "0.48536256", "0.48370484", "0.4830587", "0.48199967", "0.47548893", "0.47461218", "0.474...
0.0
-1
The default interface name for this L3 network in the virtual machine. This name can be overridden by the name supplied in the network attachment configuration of that virtual machine.
def interface_name(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "interface_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interface_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"interface_name\")", "def l3_network_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"l3_network_name\")", "def interface_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"...
[ "0.6839024", "0.67300063", "0.6576439", "0.6536506", "0.63453054", "0.62927467", "0.6252902", "0.6176393", "0.6155957", "0.6108241", "0.61039215", "0.60497546", "0.5955052", "0.5913382", "0.5868023", "0.5867791", "0.586413", "0.58365524", "0.583649", "0.58314383", "0.58273387...
0.67675763
1
The type of the IP address allocation, defaulted to "DualStack".
def ip_allocation_type(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "ip_allocation_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_address_type(self):\n return self.__address_type", "def get_ip_type1(self) -> str:\n hex_ip = hexlify(self.message)[152:160]\n ip_addr = int(hex_ip[6:8] + hex_ip[4:6] + hex_ip[2:4] + hex_ip[0:2], 16)\n return inet_ntoa(pack(\"<L\", ip_addr))", "def address_type(self) -> str:\n ...
[ "0.6558105", "0.6343783", "0.62579095", "0.6204035", "0.61733663", "0.60764885", "0.60489833", "0.6027968", "0.590761", "0.5870783", "0.57298845", "0.5710156", "0.569875", "0.5694414", "0.5689083", "0.5678903", "0.5581792", "0.5554217", "0.5541468", "0.55387825", "0.5525745",...
0.66921926
0
The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack.
def ipv4_connected_prefix(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "ipv4_connected_prefix")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def local_ipv4_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv4_network_cidr\")", "def local_ipv4_network_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"local_ipv4_network_cidr\")", "def local_ipv4_network_cidr(self) -> Optional[pulumi.Input...
[ "0.748467", "0.7397195", "0.7397195", "0.72900414", "0.7255836", "0.68101245", "0.68101245", "0.6797655", "0.6686527", "0.66722995", "0.6519062", "0.644197", "0.64091825", "0.64038914", "0.6388208", "0.63576555", "0.6327051", "0.6327051", "0.6327051", "0.6295223", "0.6267015"...
0.7218586
5
The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack.
def ipv6_connected_prefix(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "ipv6_connected_prefix")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PrefixIpv6Address(self):\n if self.force_auto_sync:\n self.get('PrefixIpv6Address')\n return self._PrefixIpv6Address", "def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")", "def local_ipv6_network_cidr(self) -> Opt...
[ "0.7729275", "0.76980174", "0.76423615", "0.76423615", "0.74332094", "0.6983688", "0.6952086", "0.69470865", "0.6910834", "0.6910834", "0.6771784", "0.65345484", "0.6393636", "0.6392489", "0.634702", "0.6326751", "0.6292675", "0.6250887", "0.62504554", "0.6245007", "0.6242389...
0.7312516
5
The resource ID of the Network Fabric l3IsolationDomain.
def l3_isolation_domain_id(self) -> pulumi.Output[str]: return pulumi.get(self, "l3_isolation_domain_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l3_isolation_domain_id(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"l3_isolation_domain_id\")", "def resource_id(self) -> str:\n return pulumi.get(self, \"resource_id\")", "def resource_id(self) -> str:\n return pulumi.get(self, \"resource_id\")", "def resource_id(self) ->...
[ "0.8125011", "0.639748", "0.639748", "0.639748", "0.6284943", "0.6265004", "0.62123185", "0.617114", "0.617114", "0.617114", "0.617114", "0.617114", "0.6158674", "0.60937095", "0.60937095", "0.6091811", "0.6091811", "0.6091811", "0.60563904", "0.60457486", "0.5990473", "0.5...
0.82438326
0
The geolocation where the resource lives
def location(self) -> pulumi.Output[str]: return pulumi.get(self, "location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_location(self):\n\t\treturn self.location", "def get_location(self):\n return self.location", "def get_location(self):\n return self.location", "def get_location(self):\r\n return self.__location", "def get_location(self):\r\n return None", "def getLocation(self):\n ...
[ "0.816298", "0.7999453", "0.79540074", "0.7945644", "0.78364915", "0.77626437", "0.7730134", "0.7681095", "0.7624169", "0.76093256", "0.76093256", "0.75724584", "0.75544393", "0.7547195", "0.75165695", "0.74507827", "0.74267685", "0.7419033", "0.7419033", "0.7419033", "0.7419...
0.6883943
75
The name of the resource
def name(self) -> pulumi.Output[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_resource_name(self):\n return self._resource_name", "def name(self):\n return self.raw_resource[\"name\"]", "def resource_name(self) -> Optional[str]:\n return pulumi.get(self, \"resource_name\")", "def resource_name(self) -> Optional[str]:\n return pulumi.get(self, \"reso...
[ "0.8592593", "0.8411918", "0.8165518", "0.8165518", "0.8104756", "0.7934077", "0.7934077", "0.7934077", "0.7934077", "0.7934077", "0.76977456", "0.758492", "0.7497908", "0.7401931", "0.73212445", "0.73001647", "0.73001647", "0.73001647", "0.73001647", "0.7297593", "0.7297593"...
0.0
-1
The provisioning state of the L3 network.
def provisioning_state(self) -> pulumi.Output[str]: return pulumi.get(self, "provisioning_state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def provisioning_state(self) -> str:\n return pulumi.get(self, \"provisioning_state\")", "def provisioning_state(self) -> str:\n return pulumi.get(self, \"provisioning_state\")", "def provisioning_state(self) -> str:\n return pulumi.get(self, \"provisioning_state\")", "def provisioning_s...
[ "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "0.7780151", "...
0.7815268
9
Azure Resource Manager metadata containing createdBy and modifiedBy information.
def system_data(self) -> pulumi.Output['outputs.SystemDataResponse']: return pulumi.get(self, "system_data")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_metadata(self):\n md = self.resource.get_cdmi_user_meta()\n md.update(self.resource.get_acl_metadata())\n return md", "def created_by(self) -> Optional['outputs.UserInfoResponse']:\n return pulumi.get(self, \"created_by\")", "def created_by(self) -> \"str\":\n return ...
[ "0.6872594", "0.63301516", "0.62992716", "0.62992716", "0.62992716", "0.62992716", "0.62210387", "0.62001103", "0.6097473", "0.60971665", "0.6086979", "0.6079593", "0.6051205", "0.60385454", "0.60385454", "0.60385454", "0.60385454", "0.60265017", "0.6005793", "0.6004641", "0....
0.0
-1
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
def type(self) -> pulumi.Output[str]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"resource_type\")", "def ...
[ "0.7918516", "0.7918516", "0.7866337", "0.7866337", "0.7866337", "0.7866337", "0.7866337", "0.7708053", "0.75534964", "0.7282099", "0.70591027", "0.6979169", "0.69202054", "0.6868452", "0.67303157", "0.67049116", "0.6654272", "0.6646357", "0.66396123", "0.66396123", "0.663961...
0.0
-1
Field Deprecated. These fields will be empty/omitted. The list of virtual machine resource IDs, excluding any Hybrid AKS virtual machines, that are currently using this L3 network.
def virtual_machines_associated_ids(self) -> pulumi.Output[Sequence[str]]: return pulumi.get(self, "virtual_machines_associated_ids")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _GetMachineList(self):\n machines = self._experiment.remote\n # All Label.remote is a sublist of experiment.remote.\n for l in self._experiment.labels:\n for r in l.remote:\n assert r in machines\n return machines", "def virtual_machines(self) -> Sequence['outputs.SubResourceReadOnlyR...
[ "0.5911471", "0.5848252", "0.5473489", "0.5471283", "0.54288316", "0.54288316", "0.542811", "0.5384369", "0.53598607", "0.53279454", "0.53103167", "0.53008413", "0.5270152", "0.5221629", "0.5212279", "0.5154512", "0.51520634", "0.5138587", "0.5093057", "0.50420386", "0.500422...
0.55128694
2
The VLAN from the l3IsolationDomain that is used for this network.
def vlan(self) -> pulumi.Output[float]: return pulumi.get(self, "vlan")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vlan(self) :\n\t\ttry :\n\t\t\treturn self._vlan\n\t\texcept Exception as e:\n\t\t\traise e", "def get_vlan_tag(self):\n\t\treturn call_sdk_function('PrlVirtNet_GetVlanTag', self.handle)", "def get_vlan_tag(self):\n\t\treturn call_sdk_function('PrlSrvCfgNet_GetVlanTag', self.handle)", "def vlan(self) -> ...
[ "0.7999924", "0.7726699", "0.7723152", "0.74945563", "0.6896781", "0.68907255", "0.66186804", "0.6475853", "0.6435667", "0.64156556", "0.6283416", "0.62097275", "0.62097275", "0.62045115", "0.579412", "0.5772401", "0.57347697", "0.56815064", "0.5577279", "0.5575757", "0.55137...
0.75627106
3
join the input string
def my_join(iters, string): out = "" for i in range(iters): out += "," + string return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def join(self, iterable) -> String:\n pass", "def my_join(iters, string):\n out = ''\n for i in range(iters):\n out += \", \" + string\n return out", "def join_strings(words):\n joined_string = ''\n for word in words:\n joined_string += word\n\n return joined_string", "def ...
[ "0.73991024", "0.732438", "0.7231096", "0.72088933", "0.7069224", "0.6920054", "0.68781954", "0.67399055", "0.66996497", "0.6629545", "0.6618605", "0.65867525", "0.658431", "0.6571246", "0.653331", "0.65244675", "0.6523184", "0.6489013", "0.6483073", "0.6398085", "0.6364346",...
0.73344773
1