query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Find appropriate least dataset in local according to num.
def find_local_file(files, traj_num, train_or_val): least_num = np.Inf for f in files: name_list = re.split("[-.]", f) if train_or_val in name_list: for tmp in name_list: if tmp.isdigit(): num = int(tmp) if traj_num <= num < lea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_remote_file(data_json, task_name_version, data_type, traj_num, train_or_val):\n least_num = np.Inf\n for k, v in data_json.items():\n if task_name_version in k and train_or_val in k and data_type in k:\n name_list = re.split(\"[-.]\", k)\n for tmp in name_list:\n ...
[ "0.60515654", "0.5806434", "0.53540474", "0.5349064", "0.5164306", "0.5147884", "0.514781", "0.51312685", "0.51193017", "0.5078722", "0.50693583", "0.5065835", "0.50539136", "0.50523007", "0.50350106", "0.5018262", "0.50050765", "0.49885857", "0.49791822", "0.49589893", "0.49...
0.6678268
0
A function to prepare input features for training. Function takes formatted version of the features set(without labels and a feature file containing labels. Uses num_time_steps and num_features to generate a sequence for input to the LSTM model for training Returns segments and encoded labels (from the activity column)...
def generate_feats_and_labels(features_without_activity, feature_with_activity): num_time_steps = 64 step = 6 segments = [] labels = [] for i in range(0, len(features_without_activity) - num_time_steps, step): xlist = [features_without_activity[cols].values[i: i + num_time_steps] for cols in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_examples_to_features_for_train(examples, label_list, max_seq_length, tokenizer):\r\n label_map = {label : i for i, label in enumerate(label_list)} #label -> i index dictionary\r\n features = []\r\n for (ex_index, example) in enumerate(examples):\r\n label_list = example.label.split(' '...
[ "0.642258", "0.6218882", "0.61765397", "0.61225486", "0.61212564", "0.6071692", "0.5952996", "0.5933982", "0.5924404", "0.5917281", "0.5895744", "0.5895229", "0.5886554", "0.5874698", "0.58411723", "0.5816617", "0.5810758", "0.58042693", "0.58028215", "0.5798988", "0.57898873...
0.6165128
3
Return a list of ycoordinates to use for plotting the tree.
def y_coords(self): # Format is a list with each node and its parent, separated by NaN values return self._list_link_to_parents(col_name="y")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extension_y_coords(self):\n\n # Format is a list with each node and its parent, separated by NaN values\n return self._list_link_to_tips(col_name=\"y\")", "def y_points(self):\n return self._y_points", "def locations_y(self):\n return self._locations[1]", "def yedges(self):\n ...
[ "0.7928994", "0.67593557", "0.6532272", "0.6527265", "0.6500697", "0.6445729", "0.64396954", "0.635136", "0.6332046", "0.6317009", "0.63104063", "0.63104063", "0.6295133", "0.6242105", "0.6229711", "0.6220149", "0.6193215", "0.6193215", "0.61913604", "0.61854917", "0.6175124"...
0.80894214
0
Add a points layer to the layers list.
def add_points( self, data=None, *, properties=None, text=None, symbol='o', size=10, edge_width=1, edge_color='black', edge_color_cycle=None, edge_colormap='viridis', edge_contrast_limits=None, face_color='white', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_points(self, points):\n pass", "def addPoints(self, points):\r\n self.points = points", "def addPointLayer(self, point_data, map_relative=True,\n colour='#ff0000', size=3, name='<point_layer>'):\n\n id = self.addLayer(self.drawPointsLayer, point_data, map_relat...
[ "0.7288185", "0.7023347", "0.70131505", "0.69831395", "0.6618713", "0.6581822", "0.65749407", "0.65553796", "0.64928746", "0.64077336", "0.62529796", "0.62468636", "0.62338465", "0.62084013", "0.6202363", "0.61893904", "0.61647415", "0.61637753", "0.6128609", "0.6099204", "0....
0.6377388
10
The list of installed device classes.
def classes(self): return list(self._classes_generator())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def devices(self):\n return list(self._device_types)", "def list_devices(self):\n return [x for x in self.devices.keys()]", "def classes(self):\n if self.classname:\n return [self.classname]\n return []", "def get_classes(self):\n return self._classes", "def ge...
[ "0.69825745", "0.68640214", "0.6712539", "0.65622866", "0.65499496", "0.65027493", "0.6489424", "0.6489375", "0.648079", "0.64679676", "0.64626825", "0.64520633", "0.6342538", "0.63038015", "0.6281411", "0.6274871", "0.6257163", "0.6255949", "0.6238514", "0.6169164", "0.61636...
0.6352337
12
The name of the device class
def name(self): return self._get_device_class_name()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_class(self):\n # type: () -> string_types\n return self._device_class", "def device_class(self) -> str | None:\n return self._get_sensor_type()[2]", "def device_class(self):\n return self.sensor_type[\"class\"]", "def device_class(self):\n return SENSOR_TYPES[sel...
[ "0.8340306", "0.81362057", "0.79554015", "0.79148746", "0.7908673", "0.78958863", "0.78958863", "0.78958863", "0.7814847", "0.7813284", "0.7813284", "0.7813284", "0.7813284", "0.7813284", "0.77894497", "0.778694", "0.778694", "0.7779215", "0.7779215", "0.77773464", "0.7713451...
0.9185981
0
The set of devices of the current class.
def devices(self): return self.enumerate_devices()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def devices(self):\n\n return self.__devices", "def devices(self):\n return self._devices", "def devices(self):\n return self._devices", "def devices(self):\n return self._devices", "def devices(self):\n return self._devices", "def lv_devices(self):\n devs = set(...
[ "0.79903066", "0.7987605", "0.7987605", "0.7987605", "0.7987605", "0.79554206", "0.7773249", "0.76525307", "0.75988096", "0.7569989", "0.74304664", "0.7372484", "0.72990334", "0.7293757", "0.72474724", "0.7199695", "0.7168249", "0.7138762", "0.71188986", "0.711076", "0.709896...
0.78748673
6
ARIMA on Weighted Moving Average
def arima_wma(prices, signal, name): wma_window = signal['params']['wma_window'] wma_close = talib.WMA(prices['close'], wma_window).to_numpy()[:, None] signal['data'] = arima(wma_close, signal['params']['arima_window'], name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def moving_average(data, temporal_window=100):\n window = np.ones(temporal_window) / temporal_window\n return np.convolve(data, window, 'valid')", "def get_SMA(values, window=20):\n\treturn values.rolling(window, center=False).mean()", "def moving_average(data, beta):\n avg = 0\n maverages = []\n ...
[ "0.64332235", "0.6424645", "0.63507843", "0.6347649", "0.6299912", "0.62887293", "0.6282216", "0.62765396", "0.62661624", "0.6247317", "0.6218867", "0.62028676", "0.60628086", "0.6054383", "0.60532147", "0.60226184", "0.60096055", "0.59677744", "0.5944391", "0.5920132", "0.59...
0.61765444
12
Test that strava api call returns token that matches expected format and is not expired.
def test_get_tokens(): tokens = get_tokens() assert tokens["token_type"] == "Bearer" assert tokens["access_token"] is not None assert tokens["expires_at"] is not None assert tokens["expires_in"] is not None assert tokens["refresh_token"] is not None assert "token_type" in tokens assert ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_rejects_expired_token(self):\n config.set(xsrf_token_key='abcdef')\n tool = utils.XsrfTool()\n token = tool.generate_token(12345, 'test_action')\n utils.set_utcnow_for_test(XsrfToolTests.TEST_NOW +\n datetime.timedelta(hours=4, minutes=1))\n ...
[ "0.7254361", "0.71928334", "0.71925396", "0.7190626", "0.71510196", "0.7123881", "0.70840096", "0.70428467", "0.70105773", "0.6960285", "0.693164", "0.69182277", "0.69151807", "0.69047624", "0.68823147", "0.68401384", "0.68108004", "0.68065697", "0.6799951", "0.67830026", "0....
0.7278672
0
Returns True if root access has been enabled on this database instance, and false otherwise.
def got_root(self): return self.client.get(self.path+'/root')['rootEnabled']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_root_access(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"has_root_access\")", "def has_root():\n return bool(shell32.IsUserAnAdmin())", "def smb_root_accessible(self):\n return self._smb_root_accessible", "def nfs_root_accessible(self):\n return self._nfs...
[ "0.8259805", "0.7298647", "0.72350883", "0.7006684", "0.6966008", "0.6958805", "0.6910536", "0.6738823", "0.672531", "0.6723514", "0.67126113", "0.66492987", "0.6633869", "0.655224", "0.655224", "0.652371", "0.6423022", "0.6423022", "0.6347106", "0.63373667", "0.6323379", "...
0.71701086
3
run to the ball if it is to the bottom from player's position
def run_to_ball_bottom(obs, player_x, player_y): def environment_fits(obs, player_x, player_y): """ environment fits constraints """ # ball is to the bottom from player's position if (obs["ball"][1] > player_y and abs(obs["ball"][0] - player_x) < 0.01): return Tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __move_ball(self):\n while not self.__game_is_over():\n self.__ball.move(self.__dx, self.__dy)\n self.__handle_wall_collision()\n if self.__num_lives == 0:\n self.__game_over_picture()\n break\n elif self.__bricks_total == 0:\n ...
[ "0.72083324", "0.69922", "0.68681103", "0.6814682", "0.68132", "0.67223394", "0.66324455", "0.6627672", "0.6598392", "0.65531284", "0.65530306", "0.6543335", "0.6543335", "0.65364003", "0.6512855", "0.6499431", "0.64736015", "0.64710075", "0.64623606", "0.6428106", "0.641857"...
0.6616856
8
run to the ball if it is to the bottom left from player's position
def run_to_ball_bottom_left(obs, player_x, player_y): def environment_fits(obs, player_x, player_y): """ environment fits constraints """ # ball is to the bottom left from player's position if (obs["ball"][0] < player_x and obs["ball"][1] > player_y): return True ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_ball(self):\r\n self.canvas.move(self.ball, (self.x_speed * self.speed), (self.y_speed * self.speed))\r\n (leftPos, topPos, rightPos, bottomPos) = self.canvas.coords(self.ball)\r\n if leftPos <= 0 or rightPos >= 400:\r\n self.x_speed = -self.x_speed\r\n if topPos <= ...
[ "0.71721065", "0.71283865", "0.67518795", "0.67485005", "0.6705833", "0.66433764", "0.66344875", "0.66251993", "0.66136396", "0.65892315", "0.65353155", "0.644359", "0.6437585", "0.64371544", "0.6433396", "0.643116", "0.641724", "0.64159906", "0.6404897", "0.6388909", "0.6384...
0.67839164
2
run to the ball if it is to the bottom right from player's position
def run_to_ball_bottom_right(obs, player_x, player_y): def environment_fits(obs, player_x, player_y): """ environment fits constraints """ # ball is to the bottom right from player's position if (obs["ball"][0] > player_x and obs["ball"][1] > player_y): return Tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_ball(self):\r\n self.canvas.move(self.ball, (self.x_speed * self.speed), (self.y_speed * self.speed))\r\n (leftPos, topPos, rightPos, bottomPos) = self.canvas.coords(self.ball)\r\n if leftPos <= 0 or rightPos >= 400:\r\n self.x_speed = -self.x_speed\r\n if topPos <= ...
[ "0.6983191", "0.6973917", "0.6759838", "0.6714118", "0.668266", "0.6668169", "0.66586035", "0.66424376", "0.6636509", "0.66255134", "0.65903693", "0.6538866", "0.6521628", "0.65212196", "0.65024984", "0.646723", "0.6415262", "0.640247", "0.6399464", "0.6384403", "0.6368772", ...
0.67749137
2
run to the ball if it is to the right from player's position
def run_to_ball_right(obs, player_x, player_y): def environment_fits(obs, player_x, player_y): """ environment fits constraints """ # ball is to the right from player's position if (obs["ball"][0] > player_x and abs(obs["ball"][1] - player_y) < 0.01): return True ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_right(self):\r\n if self.rect.right < BG_WIDTH:\r\n self.rect.right += self.speed", "def move_right(self):\n self.rect.x += 5 # Moves to the right by 5\n\n # If the player reaches the edge of the screen, they can't go further\n if self.rect.x >= 580:\n ...
[ "0.7143745", "0.70929444", "0.70887804", "0.68167496", "0.6755817", "0.666772", "0.6657931", "0.6640654", "0.6634686", "0.6629268", "0.6627521", "0.6591458", "0.65906996", "0.655483", "0.6534924", "0.65091413", "0.6490543", "0.64902323", "0.64838254", "0.64741504", "0.6473427...
0.6666116
6
run to the ball if it is to the top right from player's position
def run_to_ball_top_right(obs, player_x, player_y): def environment_fits(obs, player_x, player_y): """ environment fits constraints """ # ball is to the top right from player's position if (obs["ball"][0] > player_x and obs["ball"][1] < player_y): return True ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_ball(self):\r\n self.canvas.move(self.ball, (self.x_speed * self.speed), (self.y_speed * self.speed))\r\n (leftPos, topPos, rightPos, bottomPos) = self.canvas.coords(self.ball)\r\n if leftPos <= 0 or rightPos >= 400:\r\n self.x_speed = -self.x_speed\r\n if topPos <= ...
[ "0.6846344", "0.6760717", "0.67123604", "0.6699229", "0.6644585", "0.66358966", "0.6632727", "0.6616267", "0.65979105", "0.65961057", "0.65760654", "0.6562567", "0.64902973", "0.64709157", "0.6426536", "0.64076626", "0.6368969", "0.63622034", "0.6352662", "0.6333112", "0.6319...
0.65169597
12
Return which token type won ('X' or 'O') or None if no one has won yet.
def calc_winner(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenType(self):\n if self.currStringToProcess in LIST_OF_POSSIBLE_KEY_WORDS:\n return KEYWORD\n elif self.currStringToProcess in LIST_OF_POSSIBLE_SYMBOLS:\n return SYMBOL\n elif self.currStringToProcess.isdigit():\n return INT_CONST\n elif self.curr...
[ "0.6712261", "0.639354", "0.639354", "0.638774", "0.6379658", "0.6262658", "0.60917306", "0.5871876", "0.5793148", "0.5793148", "0.57479024", "0.5739574", "0.5725336", "0.5677667", "0.5645393", "0.55922073", "0.55611694", "0.5544923", "0.5538656", "0.553314", "0.551161", "0...
0.0
-1
Converts the input value of meters into miles.
def meters_to_miles(meters): miles = meters / 1609.344 return miles
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kilometers_to_miles(km):\n #convert km to miles:\n return km*0.621371", "def kilometer_to_miles(kilometers: float) -> float:\n kilometers = float(kilometers)\n miles = float(float(kilometers) * 0.621371)\n return round(miles, 2)", "def test_meters_to_miles(self) -> None:\n meters = 50...
[ "0.7894793", "0.7732351", "0.75956684", "0.7350536", "0.7139891", "0.7057429", "0.7055383", "0.70397633", "0.6952373", "0.6857919", "0.68411344", "0.6735596", "0.6708009", "0.6642029", "0.6635606", "0.6609784", "0.6604", "0.6603629", "0.6602266", "0.6579583", "0.64558864", ...
0.8390878
0
Get the "code" collection from the wgapl database.
def get_code(): client = MongoClient() wgapl = client["wgapl"] code = wgapl["code"] return code
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_code(self):\r\n # подключаемся к базе данных хероку, чтобы вытащить крайний ключ-код\r\n engine = db.create_engine('postgresql+psycopg2://vxttrrwzkdeaol:367054ad01122101b1b5d9'\r\n 'ee099e03253d212ec914e330378952dec6c67e5174@ec2-79-125-126-20'\r\n ...
[ "0.66804135", "0.64768034", "0.6157037", "0.60691345", "0.60558945", "0.59080875", "0.5802554", "0.57120275", "0.56858927", "0.56710243", "0.5653338", "0.56491065", "0.5596788", "0.5545779", "0.5545779", "0.5545779", "0.5545779", "0.5459935", "0.5454457", "0.5452583", "0.5449...
0.75370306
0
Calculate the yaw error with [pi, pi] bounds. Error is with respect to current orientation.
def calculate_yaw_error(desired_yaw, current_yaw): yaw_error = desired_yaw - current_yaw # ensure within [-pi, pi] bounds if yaw_error < -np.pi: yaw_error += 2*np.pi elif yaw_error > np.pi: yaw_error -= 2*np.pi return yaw_error
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yaw_pitch_roll(self):\n\n self._normalise()\n yaw = np.arctan2(2*(self.q[0]*self.q[3] - self.q[1]*self.q[2]),\n 1 - 2*(self.q[2]**2 + self.q[3]**2))\n pitch = np.arcsin(2*(self.q[0]*self.q[2] + self.q[3]*self.q[1]))\n roll = np.arctan2(2*(self.q[0]*self.q[1] - self.q[2]*s...
[ "0.6940108", "0.6823165", "0.67930984", "0.6538853", "0.6517106", "0.63758546", "0.63129425", "0.6144478", "0.61151516", "0.6064305", "0.6022627", "0.5962774", "0.59259814", "0.5878198", "0.585353", "0.58436507", "0.5830251", "0.5786376", "0.5663258", "0.557847", "0.553147", ...
0.80633265
0
Convert any arraylike type to a numpy array.
def convert_path_type(path): if isinstance(path, Path): np_path = path_to_array(path)[:,0] elif isinstance(path, Trajectory): np_path = trajectory_to_array(path)[:,0] elif isinstance(path, (list, np.ndarray)): np_path = np.array(path) else: raise ValueError("Invalid type ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _to_arraylike(data):\n _load_objects()\n if data is None:\n raise ValueError('Cannot convert None data.')\n return None\n if not isinstance(data, (ndarray, DataArray, DataFrame, Series, Index)):\n data = np.asarray(data)\n if not np.iterable(data):\n data = np.atleast_1d...
[ "0.7732808", "0.75745517", "0.7344965", "0.7262086", "0.72511667", "0.722614", "0.71071833", "0.7104881", "0.7104881", "0.7082079", "0.69020075", "0.69014776", "0.6863287", "0.6646329", "0.6621843", "0.66197765", "0.6613701", "0.6599244", "0.65807515", "0.65746725", "0.657380...
0.6109258
52
Convert any pointlike type to a numpy array.
def convert_point_type(point): if isinstance(point, (PathPoint, TrajectoryPoint)): np_point = np.array([point.point.x, point.point.y, point.point.z]) elif isinstance(point, (list, np.ndarray)): np_point = np.array(point) else: raise ValueError("Invalid type for `point` argument. Must...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dlib_point_to_np_array(point: dlib.point):\n return np.array([point.x, point.y])", "def md_point_to_np_array(point: dict):\n return np.array([point[\"x\"], point[\"y\"]])", "def _to_numpy_ndarray(cls, data):\n if isinstance(data, np.ndarray):\n return data\n arr = np.array(da...
[ "0.7753892", "0.71920747", "0.6945653", "0.6923151", "0.6800607", "0.66360366", "0.66360366", "0.6525286", "0.64289665", "0.63544416", "0.63276964", "0.630443", "0.6300504", "0.6280665", "0.6271747", "0.6254666", "0.6253987", "0.62291676", "0.6225183", "0.6224312", "0.6223142...
0.7894871
0
Returns a function creating env_name_, possibly a parallel one.
def make_possibly_parallel_environment(env_name_): if num_parallel_environments == 1: return env_load_fn(env_name_) else: return parallel_py_environment.ParallelPyEnvironment( [lambda: env_load_fn(env_name_)] * num_parallel_environments)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return get_env_name(self.tool_name,\n self._python,\n self._requirements,\n self._tagged_env_vars)", "def env_name(pre_chars='(', post_chars=')'):\n env_path = builtins.__xonsh_env__.get('VIRTUAL_ENV', ''...
[ "0.6451079", "0.6439208", "0.6378215", "0.6270262", "0.62300277", "0.619584", "0.6169621", "0.60829926", "0.60193765", "0.59372264", "0.5903769", "0.58852375", "0.5872347", "0.58489674", "0.58021665", "0.57335496", "0.57278764", "0.5714343", "0.5674723", "0.56699646", "0.5626...
0.71322733
0
Convert env to tf if needed.
def make_tf_py_envs(env): if isinstance(env, py_environment.PyEnvironment): tf_env = tf_py_environment.TFPyEnvironment(env) py_env = env else: tf_env = env py_env = None # Can't generically convert to PyEnvironment. return tf_env, py_env
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_tf_environment() -> None:\n _setup_cpu_environment()\n _setup_gpu_environment()", "def restore_env():\n\n def restore(key, value):\n if value is None:\n if key in os.environ:\n del os.environ[key]\n else:\n os.environ[key] = value\n\n resto...
[ "0.5762713", "0.5740193", "0.55034167", "0.54357666", "0.5403401", "0.51857567", "0.5179025", "0.5178907", "0.51584667", "0.51563305", "0.50849205", "0.50706965", "0.50654966", "0.5040908", "0.49639165", "0.495522", "0.49333233", "0.4897317", "0.48752028", "0.4844067", "0.482...
0.6284359
0
Outputs a HRR vector given a FOF term
def fold_term(self, term): if isinstance(term, Var): return self.var(term.name) elif isinstance(term, Const): return self.const(term.name) elif isinstance(term, Dist): return self.dist(term.name) elif isinstance(term, Func): return self.fun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heterodyner_signal_from_f(self,f):\n omega = f*2*np.pi\n phvec = np.cumsum(omega)\n return np.exp(1j*phvec)", "def fvector(data, method ):\n\n fv = 0\n if method['type'] == 'lbp':\n \n\n lbpkern = lbpsimple.generateKernel2()\n \n imlbp = lbpsimple.lbp2on...
[ "0.5883223", "0.5703672", "0.57033074", "0.56326604", "0.5595182", "0.5591195", "0.55410326", "0.55322146", "0.55252945", "0.5522001", "0.54942816", "0.54916763", "0.5482575", "0.5389359", "0.5385037", "0.53610754", "0.53528696", "0.5346154", "0.5344521", "0.5340045", "0.5335...
0.0
-1
Outputs a HRR vector given a FOF term
def fold_term(self, init_repr, term): if isinstance(term, Var): return self.var(init_repr, term.name) elif isinstance(term, Const): return self.const(init_repr, term.name) elif isinstance(term, Dist): return self.dist(init_repr, term.name) elif isinsta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heterodyner_signal_from_f(self,f):\n omega = f*2*np.pi\n phvec = np.cumsum(omega)\n return np.exp(1j*phvec)", "def fvector(data, method ):\n\n fv = 0\n if method['type'] == 'lbp':\n \n\n lbpkern = lbpsimple.generateKernel2()\n \n imlbp = lbpsimple.lbp2on...
[ "0.5880947", "0.5704128", "0.57013804", "0.56279474", "0.55921984", "0.5590232", "0.5538681", "0.55299693", "0.5523403", "0.552075", "0.549251", "0.5488094", "0.5485578", "0.5386424", "0.5386153", "0.5359749", "0.5351463", "0.5344545", "0.5343119", "0.5338326", "0.5332708", ...
0.0
-1
Hide the bottom action bar
def hide_action_bar(self): self.remove_widget(self.bottom_action_bar)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_action_bar(self):\n self.add_widget(self.bottom_action_bar)", "def hide (self):\n \n self.top.withdraw()", "def showSideBar(self):\n\t\treturn False", "def hide(self):\n self.root.iconify() # self.root.withdraw()", "def hide_gui():\n pass", "def hide(self):\r\...
[ "0.7178586", "0.69137925", "0.67086565", "0.65837944", "0.6528224", "0.64973104", "0.6453573", "0.6392218", "0.6388695", "0.6342648", "0.6307397", "0.63020915", "0.6275977", "0.6257325", "0.62182426", "0.61882097", "0.60461926", "0.602763", "0.60223484", "0.5996325", "0.59839...
0.8816797
0
Returns the hidden state of the agent for the start of an episode.
def initial_state(self): # Network details elided. initial_state = None return initial_state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards = 0.0\n\n print(\"Agent Start Episode #\" + str(self.episodesSoFar+1))", "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards ...
[ "0.63696027", "0.60781133", "0.58969474", "0.57763773", "0.56816185", "0.56607085", "0.56607085", "0.56607085", "0.5647302", "0.56286514", "0.55857605", "0.5562711", "0.5553647", "0.5517117", "0.54545885", "0.54510707", "0.54510707", "0.5436602", "0.543472", "0.54115236", "0....
0.0
-1
Returns the hidden state of the agent for the start of an episode.
def initial_state(self): # Network details elided. return self.agent.initial_state()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards = 0.0\n\n print(\"Agent Start Episode #\" + str(self.episodesSoFar+1))", "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards ...
[ "0.63696027", "0.60781133", "0.58969474", "0.57763773", "0.56816185", "0.5647302", "0.56286514", "0.55857605", "0.5562711", "0.5553647", "0.5517117", "0.54545885", "0.54510707", "0.54510707", "0.5436602", "0.543472", "0.54115236", "0.5395311", "0.53882617", "0.53676295", "0.5...
0.56607085
6
Returns the hidden state of the agent for the start of an episode.
def initial_state(self): # Network details elided. return self.agent.initial_state()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards = 0.0\n\n print(\"Agent Start Episode #\" + str(self.episodesSoFar+1))", "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards ...
[ "0.6368146", "0.6077211", "0.58965087", "0.5778984", "0.5679836", "0.56448895", "0.56293267", "0.558369", "0.55615884", "0.5556065", "0.55199885", "0.54533905", "0.5451514", "0.5451514", "0.54390013", "0.5435608", "0.5410603", "0.53967285", "0.53886265", "0.5365539", "0.53610...
0.56612504
5
Returns the hidden state of the agent for the start of an episode.
def initial_state(self): # Network details elided. return self.agent.initial_state()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards = 0.0\n\n print(\"Agent Start Episode #\" + str(self.episodesSoFar+1))", "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards ...
[ "0.6368146", "0.6077211", "0.58965087", "0.5778984", "0.5679836", "0.56448895", "0.56293267", "0.558369", "0.55615884", "0.5556065", "0.55199885", "0.54533905", "0.5451514", "0.5451514", "0.54390013", "0.5435608", "0.5410603", "0.53967285", "0.53886265", "0.5365539", "0.53610...
0.56612504
7
Returns the hidden state of the agent for the start of an episode.
def initial_state(self): # Network details elided. return self._agent.initial_state()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards = 0.0\n\n print(\"Agent Start Episode #\" + str(self.episodesSoFar+1))", "def startEpisode(self):\n self.lastState = None\n self.lastAction = None\n self.episodeRewards ...
[ "0.6368146", "0.6077211", "0.58965087", "0.5778984", "0.5679836", "0.56612504", "0.56612504", "0.56612504", "0.56448895", "0.558369", "0.55615884", "0.5556065", "0.55199885", "0.54533905", "0.5451514", "0.5451514", "0.54390013", "0.5435608", "0.5410603", "0.53967285", "0.5388...
0.56293267
9
Forward propagation function, which will return the discrimination value.
def forward(self, input): # Return discriminator output return self.main(input).view(-1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_propagation(self):\n pass", "def forwardPropagation(self, inputs, label):\n node_hidden = np.dot(inputs, self.input_W)\n node_hidden = np.add(node_hidden, self.input_B)\n node_hidden = np.maximum(0, node_hidden)\n node_output = np.dot(node_hidden, self.hidden_W)\n...
[ "0.63028413", "0.6194315", "0.60869277", "0.60277456", "0.6002301", "0.5988439", "0.5967674", "0.59603673", "0.5935663", "0.59321153", "0.59321153", "0.59223187", "0.5901809", "0.5900911", "0.58897394", "0.5883273", "0.58526605", "0.5850585", "0.58340967", "0.58207715", "0.58...
0.6098401
2
Compare the settings between FOOOF and/or FOOOFGroup objects.
def compare_settings(lst): # Check settings are the same across list of given objects for ind, f_obj in enumerate(lst[:-1]): if get_settings(f_obj) != get_settings(lst[ind+1]): return False # If no settings fail comparison, return that objects have consistent settings return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compare_settings(self, settings, original_fields):\r\n original_keys = original_fields.keys()\r\n if 'children' in original_keys:\r\n original_keys.remove('children')\r\n if len(settings) != len(original_keys):\r\n return True\r\n else:\r\n new_keys...
[ "0.6285345", "0.62570083", "0.6219147", "0.59589237", "0.5861523", "0.58054423", "0.57463837", "0.5701998", "0.5678465", "0.5666813", "0.5628498", "0.5512121", "0.5510255", "0.54830295", "0.54772437", "0.5429576", "0.54196936", "0.53972894", "0.53792423", "0.5327615", "0.5315...
0.5777655
6
The set of arguments for constructing a Zone resource.
def __init__(__self__, *, attributes: Optional[pulumi.Input[Mapping[str, Any]]] = None, description: Optional[pulumi.Input[str]] = None, disable_status_check: Optional[pulumi.Input[bool]] = None, email: Optional[pulumi.Input[str]] = None, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: ZoneArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def __init__(__self__,\n resource_name: str,\n args: Optional[ZoneArgs] = None,\n opts: ...
[ "0.7354836", "0.71310985", "0.6832822", "0.64455605", "0.64455605", "0.63004786", "0.61414325", "0.6081677", "0.6061686", "0.5874698", "0.58457977", "0.58440346", "0.57786363", "0.5751368", "0.5665804", "0.56486547", "0.5626863", "0.56024945", "0.55568105", "0.5540788", "0.55...
0.0
-1
The name of the zone. Note the `.` at the end of the name. Changing this creates a new DNS zone.
def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zone_name(self):\n return self._zone_name", "def name(self):\n return f\"{self.zone_name} {self.zone_variable}\"", "def name(self) -> str | None:\n if self.zone.GroupName is not None:\n return self.zone.GroupName\n\n return self.zone.Name", "def test_zone_name(self)...
[ "0.79185253", "0.73358494", "0.7100498", "0.6901773", "0.68621045", "0.6787704", "0.6787704", "0.67836624", "0.6747171", "0.6641983", "0.66054785", "0.64107364", "0.6370102", "0.6334574", "0.62936705", "0.62936705", "0.62936705", "0.62936705", "0.62936705", "0.6293508", "0.62...
0.0
-1
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the `region` argument of the provider is used. Changing this creates a new DNS zone.
def region(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "region")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_region(self):\n return self.creds.get('region_name')", "def region(self):\n if self._region is None:\n cache_key = self.expand_name(\"region\")\n cached = unitdata.kv().get(cache_key)\n if cached:\n self._region = cached\n else:\n ...
[ "0.62205136", "0.60363674", "0.60109836", "0.60105574", "0.59450287", "0.5911524", "0.5910951", "0.58544093", "0.58544093", "0.5844533", "0.5765771", "0.57569623", "0.57569623", "0.57569623", "0.57569623", "0.5756079", "0.5756079", "0.5756079", "0.5756079", "0.5756079", "0.57...
0.53589296
64
The time to live (TTL) of the zone.
def ttl(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "ttl")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getTTL(self):\n return self.TTL", "def ttl(self):\n return self._ttl", "def ttl(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ttl\")", "def ttl(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ttl\")", "def ttl(self) -> pulumi.Output[int]:\n return ...
[ "0.76726836", "0.7618513", "0.7414751", "0.7414751", "0.7414215", "0.72934455", "0.7222423", "0.7184263", "0.7184263", "0.7184263", "0.71549344", "0.70806086", "0.6582839", "0.6481969", "0.64170986", "0.6350648", "0.6346011", "0.6341109", "0.63091165", "0.6297782", "0.626431"...
0.73184997
5
Map of additional options. Changing this creates a new zone.
def value_specs(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: return pulumi.get(self, "value_specs")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _advanced_backup_options(self, options):\r\n final_dict = super(VirtualServerSubclient, self)._advanced_backup_options(options)\r\n\r\n if 'create_backup_copy_immediately' in options:\r\n final_dict['dataOpt'] = {\r\n 'createBackupCopyImmediately': options.get('create_ba...
[ "0.6151809", "0.586394", "0.5851889", "0.58477145", "0.5626888", "0.5582726", "0.55434835", "0.55264103", "0.55166453", "0.55092126", "0.5495251", "0.54862493", "0.5476434", "0.54744154", "0.54471105", "0.5427879", "0.5413489", "0.54104024", "0.5386581", "0.53772056", "0.5367...
0.0
-1
The name of the zone. Note the `.` at the end of the name. Changing this creates a new DNS zone.
def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zone_name(self):\n return self._zone_name", "def name(self):\n return f\"{self.zone_name} {self.zone_variable}\"", "def name(self) -> str | None:\n if self.zone.GroupName is not None:\n return self.zone.GroupName\n\n return self.zone.Name", "def test_zone_name(self)...
[ "0.79185253", "0.73358494", "0.7100498", "0.6901773", "0.68621045", "0.6787704", "0.6787704", "0.67836624", "0.6747171", "0.6641983", "0.66054785", "0.64107364", "0.6370102", "0.6334574", "0.62936705", "0.62936705", "0.62936705", "0.62936705", "0.62936705", "0.6293508", "0.62...
0.0
-1
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the `region` argument of the provider is used. Changing this creates a new DNS zone.
def region(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "region")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_region(self):\n return self.creds.get('region_name')", "def region(self):\n if self._region is None:\n cache_key = self.expand_name(\"region\")\n cached = unitdata.kv().get(cache_key)\n if cached:\n self._region = cached\n else:\n ...
[ "0.62205136", "0.60363674", "0.60109836", "0.60105574", "0.59450287", "0.5911524", "0.5910951", "0.58544093", "0.58544093", "0.5844533", "0.5765771", "0.57569623", "0.57569623", "0.57569623", "0.57569623", "0.5756079", "0.5756079", "0.5756079", "0.5756079", "0.5756079", "0.57...
0.53589296
63
The time to live (TTL) of the zone.
def ttl(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "ttl")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getTTL(self):\n return self.TTL", "def ttl(self):\n return self._ttl", "def ttl(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ttl\")", "def ttl(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ttl\")", "def ttl(self) -> pulumi.Output[int]:\n return ...
[ "0.76726836", "0.7618513", "0.7414751", "0.7414751", "0.7414215", "0.72934455", "0.7222423", "0.7184263", "0.7184263", "0.7184263", "0.71549344", "0.70806086", "0.6582839", "0.6481969", "0.64170986", "0.6350648", "0.6346011", "0.6341109", "0.63091165", "0.6297782", "0.626431"...
0.73184997
6
Map of additional options. Changing this creates a new zone.
def value_specs(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: return pulumi.get(self, "value_specs")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _advanced_backup_options(self, options):\r\n final_dict = super(VirtualServerSubclient, self)._advanced_backup_options(options)\r\n\r\n if 'create_backup_copy_immediately' in options:\r\n final_dict['dataOpt'] = {\r\n 'createBackupCopyImmediately': options.get('create_ba...
[ "0.6151809", "0.586394", "0.5851889", "0.58477145", "0.5626888", "0.5582726", "0.55434835", "0.55264103", "0.55166453", "0.55092126", "0.5495251", "0.54862493", "0.5476434", "0.54744154", "0.54471105", "0.5427879", "0.5413489", "0.54104024", "0.5386581", "0.53772056", "0.5367...
0.0
-1
The name of the zone. Note the `.` at the end of the name. Changing this creates a new DNS zone.
def name(self) -> pulumi.Output[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zone_name(self):\n return self._zone_name", "def name(self):\n return f\"{self.zone_name} {self.zone_variable}\"", "def name(self) -> str | None:\n if self.zone.GroupName is not None:\n return self.zone.GroupName\n\n return self.zone.Name", "def test_zone_name(self)...
[ "0.7919491", "0.7335921", "0.7100041", "0.69018096", "0.6863055", "0.67889935", "0.67889935", "0.67839086", "0.67486227", "0.66409785", "0.66049653", "0.6410763", "0.6368964", "0.6335311", "0.62952393", "0.62952393", "0.62952393", "0.62952393", "0.62952393", "0.629213", "0.62...
0.0
-1
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the `region` argument of the provider is used. Changing this creates a new DNS zone.
def region(self) -> pulumi.Output[str]: return pulumi.get(self, "region")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_region(self):\n return self.creds.get('region_name')", "def region(self):\n if self._region is None:\n cache_key = self.expand_name(\"region\")\n cached = unitdata.kv().get(cache_key)\n if cached:\n self._region = cached\n else:\n ...
[ "0.6222279", "0.60386515", "0.60126317", "0.6011403", "0.59458005", "0.5913209", "0.5912251", "0.58563", "0.58563", "0.5845269", "0.5766678", "0.5758316", "0.5758316", "0.5758316", "0.5758316", "0.5757539", "0.5757539", "0.5757539", "0.5757539", "0.5757539", "0.5757539", "0...
0.5387341
48
The time to live (TTL) of the zone.
def ttl(self) -> pulumi.Output[int]: return pulumi.get(self, "ttl")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getTTL(self):\n return self.TTL", "def ttl(self):\n return self._ttl", "def ttl(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ttl\")", "def ttl(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"ttl\")", "def ttl(self) -> Optional[pulumi.Input[int]]:\n ...
[ "0.7675314", "0.76201206", "0.74162287", "0.74162287", "0.73199576", "0.73199576", "0.7294184", "0.7223286", "0.71858215", "0.71858215", "0.71858215", "0.7156965", "0.7078912", "0.6582468", "0.6480969", "0.6417167", "0.6352593", "0.6346034", "0.6340161", "0.63076234", "0.6296...
0.7415691
4
Map of additional options. Changing this creates a new zone.
def value_specs(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: return pulumi.get(self, "value_specs")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _advanced_backup_options(self, options):\r\n final_dict = super(VirtualServerSubclient, self)._advanced_backup_options(options)\r\n\r\n if 'create_backup_copy_immediately' in options:\r\n final_dict['dataOpt'] = {\r\n 'createBackupCopyImmediately': options.get('create_ba...
[ "0.6152994", "0.58628565", "0.5854946", "0.58501226", "0.5629163", "0.55849373", "0.55459726", "0.55248135", "0.5519135", "0.55085", "0.549766", "0.5488457", "0.5477245", "0.5476642", "0.5446236", "0.5430043", "0.5415678", "0.54109263", "0.53858376", "0.537953", "0.5366784", ...
0.0
-1
ForwardingEventProcessor init method to configure event dispatching.
def __init__( self, event_dispatcher: type[EventDispatcher] | CustomEventDispatcher, logger: Optional[_logging.Logger] = None, notification_center: Optional[_notification_center.NotificationCenter] = None ): self.event_dispatcher = event_dispatcher or EventDispatcher ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, config):\n Submodule.__init__(self, \"command_ingest\", config)\n self.general_queue = queue()\n\n self.processes = {\n \"dispatch\": ThreadHandler(\n target=partial(self.dispatch),\n name=\"command_ingest_dispatch\",\n ...
[ "0.6087346", "0.6079905", "0.60619843", "0.6043378", "0.59631497", "0.58923537", "0.5833621", "0.5802229", "0.5749943", "0.57423335", "0.57318085", "0.5714144", "0.57129973", "0.565824", "0.5626025", "0.56184834", "0.5613952", "0.5612725", "0.5580789", "0.5579447", "0.557161"...
0.0
-1
Gets the the attachments for this mail id. Attachments are encoded as base64 strings
def api_mail_files(mail_id): attachments = mail_dao.get_attachments(int(mail_id)) return Response(response=json.dumps(attachments), status=200, mimetype='application/json')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_attachments(self, expense_id):\n return self._get_request({}, Expenses.GET_EXPENSE_ATTACHMENTS.format(expense_id))", "def attachments(self):\n return self.properties.get('attachments',\n AttachmentCollection(self.context, ResourcePath(\"attachments\", self....
[ "0.7303763", "0.7001863", "0.69319844", "0.68076575", "0.6689498", "0.66124815", "0.6527049", "0.6423898", "0.6351594", "0.6339437", "0.63129747", "0.62911206", "0.6289755", "0.6266073", "0.62369907", "0.61195576", "0.61109143", "0.59968996", "0.59269166", "0.5782034", "0.575...
0.6365804
8
Test buildArn with folder's default value.
def test_buildArn_no_folder(self): expected = 'arn:aws:s3:::my_bucket/*' actual = TileBucket.buildArn('my_bucket') assert(expected == actual)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_buildArn_with_folder_no_slashes(self):\n\n expected = 'arn:aws:s3:::my_bucket/some/folder/*'\n actual = TileBucket.buildArn('my_bucket', 'some/folder')\n assert(expected == actual)", "def test_buildArn_with_folder_with_slashes(self):\n\n expected = 'arn:aws:s3:::my_bucket/some/folder/*'\n ...
[ "0.61303943", "0.5871019", "0.56616133", "0.5610533", "0.55085605", "0.5381504", "0.53418183", "0.53278697", "0.53275937", "0.5322827", "0.51880187", "0.5173635", "0.5127995", "0.5125553", "0.5084351", "0.5059805", "0.5057678", "0.5053722", "0.50286114", "0.5010562", "0.49670...
0.6925288
0
Computes lambda_star based on strong duality, so it is only valid if Slater's condition holds, which is not the case when the monotone region is a ray. We have proved this method only when w is outside the monotone region, so that w_star > w, and Slater's condition holds.
def get_price_lambda_star_strong_duality(w: np.ndarray, w_star: np.ndarray, c_plus: np.ndarray, psi_plus: np.ndarray) -> np.ndarray: assert not StrategicIdlingHedging._is_w_inside_artificial_monotone_region(w, psi_plus) lambda_star_mat = (c_plus.T @ (w_star - w)) / - (ps...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_price_lambda_star_lp_scipy(w: np.ndarray, c_plus: np.ndarray, psi_plus: np.ndarray) \\\n -> float:\n assert not StrategicIdlingHedging._is_w_inside_artificial_monotone_region(w, psi_plus)\n res = linprog(c=psi_plus.T @ w, A_ub=psi_plus, b_ub=c_plus, bounds=(None, None),\n meth...
[ "0.5998582", "0.59840924", "0.5886466", "0.5653077", "0.56184566", "0.5615842", "0.5615842", "0.5615842", "0.5615842", "0.56120753", "0.55871964", "0.55815357", "0.5576036", "0.5524816", "0.5510785", "0.54428834", "0.5396225", "0.535542", "0.5335983", "0.53229827", "0.5317194...
0.7729669
0
Apply a translation to each triangle's points.
def apply_translate( triangles, translate_tris=(0,0,0) ): checkShapeValidity( triangles ) for i in range(len(triangles)): # each tri in triangles for j in range(len(triangles[i])): # each point in a tri for k in range(len(translate_tris)): # each axis in a po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def translate(self, tr):\n c = self.c -self.a*tr[0] -self.b*tr[1]\n self.c =c\n self.pointN = self.pointN+tr\n self.point1 = self.point1+tr\n self.points +=tr", "def translate(self, tr):\n self.points = self.points + tr", "def translation(self, x, y, z) -> None:\n ...
[ "0.71644294", "0.7132165", "0.6817164", "0.6786846", "0.65986246", "0.65604275", "0.63246864", "0.6288278", "0.62030655", "0.6190187", "0.6180045", "0.61446774", "0.6142105", "0.61025214", "0.60383296", "0.6013204", "0.59801215", "0.59801215", "0.59768236", "0.5942992", "0.59...
0.8022898
0
Returns complete system information of the specified system by uid
def getSystemByUid(self,uid): logger.debug("Call to getSystemByUid - uid: {}".format(uid)) try: response = self.httpHandler.sendHttpRequest(CIC_SYSTEM_ENDPOINT+"?uuid="+uid) except urllib2.HTTPError as e: logger.debug(traceback.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def system_info(self, system_id):\n\n\t\tpath = f'{self.BIKE_ENDPOINT}system/{system_id}/{self.secret_key}'\n\t\tresponse = requests.get(path).json()\n\t\tself.check_api_key(response)\n\n\t\treturn response", "async def get_system_info(self) -> Dict[str, Any]:\n assert self._client is not None\n re...
[ "0.6628133", "0.6589558", "0.65379214", "0.6382721", "0.6331559", "0.6136596", "0.6128842", "0.61010176", "0.6094242", "0.6077139", "0.6000191", "0.59823173", "0.5972837", "0.59549963", "0.59534127", "0.5888255", "0.58729494", "0.58512706", "0.58305013", "0.582857", "0.582793...
0.75533336
0
Returns complete system information of the specified system by name Currently in TMS v2 a separate lookup is needed for the UID to get all information about a system
def getSystemByName(self,systemName): logger.debug("Call to getSystemByName - systemName: {}".format(systemName)) try: response = self.httpHandler.sendHttpRequest( CIC_SYSTEM_ENDPOINT+"?"+ urllib.urlencode({ "n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def system_info(self, system_id):\n\n\t\tpath = f'{self.BIKE_ENDPOINT}system/{system_id}/{self.secret_key}'\n\t\tresponse = requests.get(path).json()\n\t\tself.check_api_key(response)\n\n\t\treturn response", "def _get_host_details(self):\n # Assuming only one system present as part of collection,\n ...
[ "0.73650676", "0.70473665", "0.70217276", "0.6993924", "0.6965106", "0.685575", "0.68375355", "0.6791844", "0.674208", "0.6742061", "0.66896063", "0.6677925", "0.65222424", "0.6461877", "0.6459104", "0.6397138", "0.63589567", "0.63273704", "0.6242176", "0.62328124", "0.621195...
0.7436737
0
Test ConvTranspose modules return expected default output shapes.
def testModules(self, input_shape, stride, kernel_shape, padding, output_shape): if len(input_shape) == 1: module = snt.Conv1DTranspose elif len(input_shape) == 2: module = snt.Conv2DTranspose elif len(input_shape) == 3: module = snt.Conv3DTranspose batch_size = [1] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testTransposeNCHW(self, use_bias, use_output_shape):\n output_shape = tf.TensorShape((4, 5))\n\n conv2_transpose = snt.Conv2DTranspose(\n output_channels=5,\n output_shape=output_shape if use_output_shape else None,\n kernel_shape=3,\n padding=snt.VALID,\n stride=1,\n ...
[ "0.76976144", "0.74256164", "0.73078", "0.7295563", "0.71732086", "0.70990336", "0.6973474", "0.6954109", "0.68891066", "0.6852711", "0.6850671", "0.6718783", "0.6697674", "0.66804165", "0.66372734", "0.6624984", "0.65725124", "0.65636563", "0.65030444", "0.6442761", "0.64122...
0.7231622
4
Check that custom_getter option works.
def testCustomGetter(self, module, num_input_dims, module_kwargs): def stop_gradient(getter, *args, **kwargs): return tf.stop_gradient(getter(*args, **kwargs)) inputs = tf.placeholder(tf.float32, (10,) * (num_input_dims + 2)) conv_mod1 = module(**module_kwargs) out1 = conv_mod1(inputs) con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_getter(self):\n return self._is_getter", "def test_staticproperty_getter(self):\n func = lambda: 'getter'\n ret = staticproperty().getter(func)\n self.assertIsInstance(ret, staticproperty)\n self.assertEqual(ret.fget, func)", "def load_from_options_getter(self, getter,...
[ "0.64644825", "0.6188419", "0.59624517", "0.59098136", "0.5795015", "0.57920235", "0.5781793", "0.5767074", "0.57141", "0.5706302", "0.5674423", "0.55428624", "0.5487217", "0.5472061", "0.5433995", "0.54109555", "0.5394838", "0.539153", "0.5379516", "0.53756106", "0.53731453"...
0.5532378
12
Errors are thrown for invalid strides.
def testStrideError(self, use_bias): snt.Conv2D( output_channels=10, kernel_shape=3, stride=1, name="conv1", use_bias=use_bias) snt.Conv2D( output_channels=10, kernel_shape=3, stride=[1, 1], name="conv1", use_bias=use_bias) snt.Conv2D( output_channels=10, kernel_shap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1],\n use_bias=use_bias)\n snt.Separ...
[ "0.6946206", "0.69117963", "0.6891777", "0.67954826", "0.6713288", "0.6406536", "0.63709587", "0.58808225", "0.585726", "0.58539647", "0.58204424", "0.5808992", "0.57003635", "0.5625724", "0.55856574", "0.5568732", "0.5522062", "0.54916006", "0.5466188", "0.54643273", "0.5458...
0.6682431
5
Tests if output shapes are valid.
def testOutputShapeConsistency(self, use_bias): # When padding is SAME, then the actual number of padding pixels can be # computed as: pad = kernel_shape - strides + (-input_shape % strides) # = 5 - 1 + (- 32 % 1) = 4 # The formula for the minimal size is: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid(self) -> bool:\r\n try:\r\n self.shape\r\n return True\r\n except ValueError:\r\n return False", "def _check_shape(placeholder_shape, data_shape):\n\n return True", "def _test_output_shapes(model):\n assert model.r == r\n asse...
[ "0.70775557", "0.70467687", "0.6996906", "0.69412076", "0.68884826", "0.68154806", "0.673054", "0.6710598", "0.66996604", "0.6671283", "0.6653107", "0.6619467", "0.6614694", "0.6550892", "0.6476432", "0.64648855", "0.6459457", "0.6456372", "0.63903147", "0.636188", "0.6349985...
0.0
-1
Errors are thrown for invalid strides.
def testStrideError(self, use_bias): snt.Conv1D( output_channels=10, kernel_shape=3, stride=1, name="conv1", use_bias=use_bias) err = "Invalid stride" with self.assertRaisesRegexp(snt.IncompatibleShapeError, err): snt.Conv1D(output_channels=10, kernel_shape=3, stride...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1],\n use_bias=use_bias)\n snt.Separ...
[ "0.6946206", "0.69117963", "0.6891777", "0.6713288", "0.6682431", "0.6406536", "0.63709587", "0.58808225", "0.585726", "0.58539647", "0.58204424", "0.5808992", "0.57003635", "0.5625724", "0.55856574", "0.5568732", "0.5522062", "0.54916006", "0.5466188", "0.54643273", "0.54584...
0.67954826
3
Errors are thrown for invalid strides.
def testStrideError(self, out_channels, padding, use_bias, in_shape, out_shape, use_output_shape): snt.Conv1DTranspose( output_channels=out_channels, output_shape=out_shape if use_output_shape else None, kernel_shape=3, padding=padding, stride=1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1],\n use_bias=use_bias)\n snt.Separ...
[ "0.6946206", "0.69117963", "0.6891777", "0.67954826", "0.6682431", "0.6406536", "0.63709587", "0.58808225", "0.585726", "0.58539647", "0.58204424", "0.5808992", "0.57003635", "0.5625724", "0.55856574", "0.5568732", "0.5522062", "0.54916006", "0.5466188", "0.54643273", "0.5458...
0.6713288
4
Test that the number of output and input channels are equal.
def testSameNumberOfOutputAndInputChannels(self, use_bias): input_channels = random.randint(1, 32) inputs = tf.placeholder(tf.float32, shape=[1, 10, 10, input_channels]) conv1 = snt.InPlaneConv2D(kernel_shape=3, use_bias=use_bias) # Before conv1 is connected, we cannot know how many `output_channels` ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_channel_axis_introduction(conv1d_no_channel_axis, output_size, channel_axis):\n conv_layer = Convolution((3, output_size), lambda x: 1)\n output = conv_layer(conv1d_no_channel_axis)\n t_axes = conv1d_no_channel_axis.axes + channel_axis\n assert output.axes.is_equal_set(t_axes), (\"Output axes ...
[ "0.664674", "0.66323465", "0.62907904", "0.6225441", "0.6186593", "0.6177469", "0.61383563", "0.61258215", "0.6115799", "0.60866636", "0.60537875", "0.60298043", "0.6022985", "0.6013691", "0.6011908", "0.600336", "0.59967935", "0.59686774", "0.59686774", "0.59571606", "0.5956...
0.7567504
0
Test that the generated shapes are correct when input shape not known.
def testShapesNotKnown(self, use_bias): inputs = tf.placeholder( tf.float32, shape=[None, None, None, self.in_channels], name="inputs") conv1 = snt.DepthwiseConv2D( channel_multiplier=self.channel_multiplier, kernel_shape=self.kernel_shape, padding=snt.SAME, stride=1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_shape_error(self):\n raise unittest.SkipTest(\"Failing after fixing Poly unsoundness #4878\")\n with self.assertRaisesRegex(TypeError,\n re.escape(\"add got incompatible shapes for broadcasting: (v,), (4,)\")):\n self.CheckShapePolymorphism(\n lambda x, y: ...
[ "0.747374", "0.7306262", "0.7246578", "0.71046007", "0.7103459", "0.7069459", "0.7061438", "0.70431477", "0.70415485", "0.70191", "0.70083374", "0.69907653", "0.6967768", "0.69449884", "0.693447", "0.68732506", "0.6869797", "0.68370634", "0.6822366", "0.6821249", "0.680451", ...
0.6316665
66
Test that errors are thrown for invalid kernel shapes.
def testKernelShape(self, use_bias): snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=[3, 4]) snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3) error_msg = (r"Invalid kernel shape: x is \[3], must be either a positive" r" integer or an iterable of positive integers of size 2"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testKernelShape(self):\n\n snt.Conv3D(output_channels=10, kernel_shape=[3, 4, 5], name=\"conv1\")\n snt.Conv3D(output_channels=10, kernel_shape=3, name=\"conv1\")\n\n with self.assertRaisesRegexp(snt.Error, \"Invalid kernel shape.*\"):\n snt.Conv3D(output_channels=10, kernel_shape=[3, 3], name=\"...
[ "0.78873444", "0.7609064", "0.7360609", "0.7042799", "0.690837", "0.6873189", "0.67869174", "0.6778277", "0.67750585", "0.67590505", "0.6743831", "0.6742346", "0.66965526", "0.6679077", "0.66599214", "0.6624427", "0.6584516", "0.6572337", "0.6564328", "0.65145725", "0.6510687...
0.66158754
16
Test that errors are thrown for invalid strides.
def testStrideError(self, use_bias): snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3, stride=1, use_bias=use_bias) snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3, stride=[1] * 2, use_bias=use_bias) snt.DepthwiseConv2D(channel_multiplier=1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1],\n use_bias=use_bias)\n snt.Separ...
[ "0.7381683", "0.7375827", "0.7318227", "0.72526807", "0.7220994", "0.70877385", "0.7032898", "0.6694438", "0.6598829", "0.65220535", "0.6504271", "0.65038604", "0.63419694", "0.63377136", "0.6329866", "0.6325649", "0.63096607", "0.63058794", "0.6295499", "0.6289325", "0.62835...
0.74363095
0
Test that the generated shapes are correct when input shape not known.
def testShapesNotKnown(self, use_bias): inputs = tf.placeholder( tf.float32, shape=[None, None, None, self.in_channels], name="inputs") conv1 = snt.SeparableConv2D( output_channels=self.out_channels_dw, channel_multiplier=1, kernel_shape=self.kernel_shape, padding=snt.S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_shape_error(self):\n raise unittest.SkipTest(\"Failing after fixing Poly unsoundness #4878\")\n with self.assertRaisesRegex(TypeError,\n re.escape(\"add got incompatible shapes for broadcasting: (v,), (4,)\")):\n self.CheckShapePolymorphism(\n lambda x, y: ...
[ "0.7474064", "0.7305676", "0.72460955", "0.71042717", "0.71038413", "0.70690924", "0.7060619", "0.7044316", "0.7040668", "0.7020431", "0.7009904", "0.69902724", "0.69690907", "0.6945844", "0.6933642", "0.6872379", "0.6870526", "0.68379015", "0.68217283", "0.6821536", "0.68054...
0.6429384
51
Test that errors are thrown for invalid kernel shapes.
def testKernelShape(self, use_bias): # No check against output_channels is done yet (needs input size). snt.SeparableConv2D( output_channels=1, channel_multiplier=2, kernel_shape=[3, 4], name="conv1", use_bias=use_bias) snt.SeparableConv2D( output_channels=1,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testKernelShape(self):\n\n snt.Conv3D(output_channels=10, kernel_shape=[3, 4, 5], name=\"conv1\")\n snt.Conv3D(output_channels=10, kernel_shape=3, name=\"conv1\")\n\n with self.assertRaisesRegexp(snt.Error, \"Invalid kernel shape.*\"):\n snt.Conv3D(output_channels=10, kernel_shape=[3, 3], name=\"...
[ "0.78873444", "0.7609064", "0.7360609", "0.7042799", "0.690837", "0.6873189", "0.6778277", "0.67750585", "0.67590505", "0.6743831", "0.6742346", "0.66965526", "0.6679077", "0.66599214", "0.6624427", "0.66158754", "0.6584516", "0.6572337", "0.6564328", "0.65145725", "0.6510687...
0.67869174
6
Test that errors are thrown for invalid strides.
def testStrideError(self, use_bias): snt.SeparableConv2D( output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1, use_bias=use_bias) snt.SeparableConv2D( output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1, 1], use_bias=use_bias) snt.SeparableConv2D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3, stride=[1] * 2,\n use_bias=use_bias)\n snt.DepthwiseConv2D(channel_mul...
[ "0.74363095", "0.7381683", "0.7318227", "0.72526807", "0.7220994", "0.70877385", "0.7032898", "0.6694438", "0.6598829", "0.65220535", "0.6504271", "0.65038604", "0.63419694", "0.63377136", "0.6329866", "0.6325649", "0.63096607", "0.63058794", "0.6295499", "0.6289325", "0.6283...
0.7375827
2
Test that the generated shapes are correct when input shape not known.
def testShapesNotKnown(self, use_bias): inputs = tf.placeholder( tf.float32, shape=[None, None, self.in_channels], name="inputs") conv1 = snt.SeparableConv1D( output_channels=self.out_channels_dw, channel_multiplier=1, kernel_shape=self.kernel_shape, padding=snt.SAME, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_shape_error(self):\n raise unittest.SkipTest(\"Failing after fixing Poly unsoundness #4878\")\n with self.assertRaisesRegex(TypeError,\n re.escape(\"add got incompatible shapes for broadcasting: (v,), (4,)\")):\n self.CheckShapePolymorphism(\n lambda x, y: ...
[ "0.7474064", "0.7305676", "0.72460955", "0.71042717", "0.71038413", "0.70690924", "0.7060619", "0.7044316", "0.7040668", "0.7020431", "0.7009904", "0.69902724", "0.69690907", "0.6945844", "0.6933642", "0.6872379", "0.6870526", "0.68379015", "0.68217283", "0.6821536", "0.68054...
0.6489998
40
Test that errors are thrown for invalid kernel shapes.
def testKernelShape(self, use_bias): # No check against output_channels is done yet (needs input size). snt.SeparableConv1D( output_channels=1, channel_multiplier=2, kernel_shape=[3], name="conv1", use_bias=use_bias) snt.SeparableConv1D( output_channels=1, ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testKernelShape(self):\n\n snt.Conv3D(output_channels=10, kernel_shape=[3, 4, 5], name=\"conv1\")\n snt.Conv3D(output_channels=10, kernel_shape=3, name=\"conv1\")\n\n with self.assertRaisesRegexp(snt.Error, \"Invalid kernel shape.*\"):\n snt.Conv3D(output_channels=10, kernel_shape=[3, 3], name=\"...
[ "0.78873444", "0.7609064", "0.7360609", "0.7042799", "0.690837", "0.6873189", "0.67869174", "0.6778277", "0.67750585", "0.67590505", "0.6743831", "0.6742346", "0.6679077", "0.66599214", "0.6624427", "0.66158754", "0.6584516", "0.6572337", "0.6564328", "0.65145725", "0.6510687...
0.66965526
12
Test that errors are thrown for invalid strides.
def testStrideError(self, use_bias): snt.SeparableConv1D( output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1, use_bias=use_bias) snt.SeparableConv1D( output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1], use_bias=use_bias) snt.SeparableConv1D( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.DepthwiseConv2D(channel_multiplier=1, kernel_shape=3, stride=[1] * 2,\n use_bias=use_bias)\n snt.DepthwiseConv2D(channel_mul...
[ "0.74363095", "0.7375827", "0.7318227", "0.72526807", "0.7220994", "0.70877385", "0.7032898", "0.6694438", "0.6598829", "0.65220535", "0.6504271", "0.65038604", "0.63419694", "0.63377136", "0.6329866", "0.6325649", "0.63096607", "0.63058794", "0.6295499", "0.6289325", "0.6283...
0.7381683
1
Errors are thrown for invalid strides.
def testStrideError(self): snt.Conv3D( output_channels=10, kernel_shape=3, stride=1, name="conv1") snt.Conv3D( output_channels=10, kernel_shape=3, stride=[1, 1, 1], name="conv1") snt.Conv3D( output_channels=10, kernel_shape=3, stride=[1, 1, 1, 1, 1], name="conv1") with ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testStrideError(self, use_bias):\n\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=1,\n use_bias=use_bias)\n snt.SeparableConv1D(\n output_channels=1, channel_multiplier=3, kernel_shape=3, stride=[1],\n use_bias=use_bias)\n snt.Separ...
[ "0.6946206", "0.69117963", "0.6891777", "0.67954826", "0.6713288", "0.6682431", "0.63709587", "0.58808225", "0.585726", "0.58539647", "0.58204424", "0.5808992", "0.57003635", "0.5625724", "0.55856574", "0.5568732", "0.5522062", "0.54916006", "0.5466188", "0.54643273", "0.5458...
0.6406536
6
Tests if output shapes are valid.
def testOutputShapeConsistency(self, use_bias): # When padding is SAME, then the actual number of padding pixels can be # computed as: pad = kernel_shape - strides + (-input_shape % strides) # = 5 - 1 + (- 32 % 1) = 4 # The formula for the minimal size is: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid(self) -> bool:\r\n try:\r\n self.shape\r\n return True\r\n except ValueError:\r\n return False", "def _check_shape(placeholder_shape, data_shape):\n\n return True", "def _test_output_shapes(model):\n assert model.r == r\n asse...
[ "0.70775557", "0.70467687", "0.6996906", "0.69412076", "0.68884826", "0.68154806", "0.673054", "0.6710598", "0.66996604", "0.6671283", "0.6653107", "0.6619467", "0.6614694", "0.6550892", "0.6476432", "0.64648855", "0.6459457", "0.6456372", "0.63903147", "0.636188", "0.6349985...
0.0
-1
Tests if output shapes are valid when not specified.
def testOutputShapeInference(self, use_bias): inputs = tf.zeros(shape=[3, 5, 5, 5, 2], dtype=tf.float32) conv1 = snt.Conv3DTranspose(name="conv3d_1", output_channels=10, output_shape=None, kernel_shape=5, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_shape_of_model_output(output: Tensor, input_ids: Tensor) ->None:\n bs, seq_len = input_ids.shape[:2]\n invalid_out_shape = len(output.shape) != 3 or output.shape[0] != bs or output.shape[1] != seq_len\n if invalid_out_shape:\n raise ValueError(f'The model output must be `Tensor` of a sha...
[ "0.6936147", "0.6820229", "0.67594224", "0.67512584", "0.66750455", "0.66330785", "0.66114026", "0.6585036", "0.6539576", "0.651291", "0.65008324", "0.6485075", "0.6484304", "0.6352659", "0.62949973", "0.62377226", "0.62211466", "0.62101907", "0.6187085", "0.6183755", "0.6170...
0.5603256
99
Does the `gpg_exists` method return `True` if an executable exists?
def test_gpg_exists(self): self.assertTrue(self.mikla.gpg_exists('ls'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _has_prog(prog):\n try:\n subprocess.check_output(f\"which {prog}\", shell=True)\n return True\n except subprocess.CalledProcessError:\n return False", "def program_exists(name):\n for path in os.environ['PATH'].split(os.path.pathsep):\n if path and os.path.exists(os.path...
[ "0.7030403", "0.6777927", "0.6752885", "0.67500794", "0.67288655", "0.67107606", "0.6676961", "0.65190625", "0.6507877", "0.6464538", "0.64614016", "0.6459744", "0.6372963", "0.6358733", "0.6352219", "0.63188595", "0.6317301", "0.6305219", "0.63042307", "0.6302163", "0.629887...
0.7583465
0
Does the `gpg_exists` method return `False` if an executable does not exist?
def test_gpg_not_exist(self): self.assertFalse(self.mikla.gpg_exists('the-amber-room'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_gpg_exists(self):\n self.assertTrue(self.mikla.gpg_exists('ls'))", "def _has_prog(prog):\n try:\n subprocess.check_output(f\"which {prog}\", shell=True)\n return True\n except subprocess.CalledProcessError:\n return False", "def gnupg_bin():\n for a_bin in [\"gpg2\...
[ "0.7638094", "0.6912175", "0.6780876", "0.6716209", "0.65813255", "0.65088755", "0.6411832", "0.6361488", "0.6329714", "0.62900454", "0.6245905", "0.6234499", "0.6233429", "0.6215781", "0.62155896", "0.61991334", "0.6187949", "0.61727655", "0.61713296", "0.6134203", "0.612251...
0.7319261
1
Returns a list of existing tables that were affected by the fixer
def fix_all(self): altered_tables = {} for ingestible_db_conf in self.ingestible_db_conf_repo.get_ingestible_dbs(): target_db= ingestible_db_conf.target_db_name db_type = ingestible_db_conf.db_type self.logger.info("Fixing consistency for DB Type: %s, Target DB: %s"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tables(self):\n if self.table is None:\n raise GiraffeError(\"Target table has not been set.\")\n return [\n \"{}_wt\".format(self.table),\n \"{}_log\".format(self.table),\n \"{}_e1\".format(self.table),\n \"{}_e2\".format(self.table),\n ...
[ "0.6457245", "0.6424677", "0.6362183", "0.6348534", "0.62072384", "0.62035435", "0.62010133", "0.6188855", "0.6100579", "0.6087688", "0.6062063", "0.60454524", "0.590614", "0.58467525", "0.5834066", "0.58268905", "0.57733846", "0.5759719", "0.57479054", "0.5745992", "0.574278...
0.65083075
0
Get the tiered price for the specified product and quantity. If it's a product variation, we check the parent too
def by_product_qty(self, tier, product, qty=Decimal('1')): qty_discounts = product.tieredprices.exclude(expires__isnull=False, expires__lt=datetime.date.today()).filter(quantity__lte=qty, pricingtier=tier) if qty_discounts.count() > 0: # Get the price with the quantity closest to the one s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_price(self, quantity: int) -> None:\n\n return self.price_per_unit * quantity", "def test_get_price_net(self):\n # Test product\n self.assertEqual(\"%.2f\" % self.p1.get_price_net(self.request), \"1.00\")\n\n # Test variant. By default the price_net of a variant is inherited,\...
[ "0.6363095", "0.628717", "0.6219108", "0.61894006", "0.596654", "0.5897446", "0.5892052", "0.5887688", "0.5854619", "0.58472514", "0.5765326", "0.57305706", "0.57241076", "0.56614685", "0.5659923", "0.5640697", "0.56107175", "0.56066424", "0.5524213", "0.5515812", "0.55145085...
0.77360284
0
Get the current price as modified by all listeners.
def _dynamic_price(self): adjust = PriceAdjustmentCalc(self) signals.satchmo_price_query.send(self, adjustment=adjust, slug=self.product.slug, discountable=self.product.is_discountable) return adjust.final_price()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_price(self):\r\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self._price", "def getPrice(self):\n return self.price"...
[ "0.7942438", "0.7873461", "0.7873461", "0.7873461", "0.77878314", "0.77763563", "0.76093155", "0.75149006", "0.75149006", "0.74750245", "0.74351263", "0.74298775", "0.7282144", "0.7254739", "0.70319283", "0.6977709", "0.6962556", "0.69540745", "0.6911767", "0.6904843", "0.686...
0.6917383
18
A PyTorch Dataset for loading Coco and CocoStuff annotations and converting them to scene graphs on the fly.
def __init__(self, image_dir, instances_json, classes_file, image_size=(64, 64), mask_size=16, normalize_images=True, max_samples=None, min_object_size=0.01, min_objects_per_image=1, max_objects_per_image=8, include_other=False, instance_whitelist=None): super(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_coco_dataset():\n ds = AttrDict()\n # classes = [\n # '__background__', 'person', 'bicycle', 'car', 'motorcycle', 'airplane',\n # 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant',\n # 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse',\n # ...
[ "0.69323593", "0.6685328", "0.6539027", "0.6506792", "0.645301", "0.6449488", "0.6390492", "0.6368818", "0.6361761", "0.63201165", "0.63115907", "0.6282667", "0.62633115", "0.62528783", "0.6242691", "0.6220108", "0.61104697", "0.6061314", "0.5960883", "0.5876139", "0.5867194"...
0.5239029
85
Returns the default collector settings
def get_default_config(self): config = super(SlurmJobWasteCollector, self).get_default_config() config.update({ 'path': 'waste' }) return config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_default_config(self):\r\n config = super(CMDCollector, self).get_default_config()\r\n config.update({\r\n 'enabled': 'True',\r\n 'fs': ',',\r\n 'timeout': 300,\r\n })\r\n return config", "def getDefaultSettings():\n return {}", "def ge...
[ "0.70514023", "0.7008024", "0.69490683", "0.6713433", "0.65743333", "0.65309024", "0.6521635", "0.6515402", "0.6466526", "0.6447688", "0.6397818", "0.6380512", "0.63683224", "0.6357208", "0.63517016", "0.6331759", "0.63120294", "0.62353724", "0.6231899", "0.62074906", "0.6201...
0.641337
10
Loads data for the specified city and filters by month and day if applicable.
def load_data(city, month, day): # load data file into a dataframe df = pd.read_csv(CITY_DATA[city]) # convert the Start Time column to datetime df['Start Time'] = pd.to_datetime(df['Start Time']) # extract month and day of week from Start Time to create new columns df['month'] = df['Start Ti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ...
[ "0.81320685", "0.8108889", "0.8045821", "0.8042514", "0.80090284", "0.80071104", "0.79991937", "0.7998333", "0.7988789", "0.797905", "0.79737365", "0.79610896", "0.7956163", "0.7947432", "0.79463065", "0.7908287", "0.7908229", "0.7904569", "0.7900715", "0.78930074", "0.788921...
0.77491575
48
Displays statistics on the most frequent times of travel.
def time_stats(df): print('\nCalculating The Most Frequent Times of Travel...\n') start_time = time.time() # display the most common month most_common_month = df['month'].value_counts().idxmax() most_common_month_name = months_data[most_common_month - 1].title() print(most_common_month_name + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\...
[ "0.80247396", "0.80233026", "0.7915788", "0.78266186", "0.7822246", "0.78143597", "0.77659196", "0.7740343", "0.773628", "0.77344066", "0.76867086", "0.7668633", "0.7651731", "0.7644636", "0.76399267", "0.76367253", "0.7625196", "0.7623158", "0.7612803", "0.76002145", "0.7583...
0.7387662
46
Displays statistics on the most popular stations and trip.
def station_stats(df): print('\nCalculating The Most Popular Stations and Trip...\n') start_time = time.time() # display most commonly used start station common_start_station = df['Start Station'].value_counts().idxmax() print(common_start_station, " is most commonly used start station.") # d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m...
[ "0.7815675", "0.7662213", "0.7553417", "0.74914914", "0.74748665", "0.7446617", "0.7428588", "0.74237514", "0.74177027", "0.7400495", "0.7387161", "0.7385634", "0.73647535", "0.735934", "0.73566747", "0.73548365", "0.7351854", "0.7351274", "0.735057", "0.73421645", "0.7340198...
0.69246376
82
Displays statistics on the total and average trip duration.
def trip_duration_stats(df): print('\nCalculating Trip Duration...\n') start_time = time.time() # display total travel time total_travel_time = df['Trip Duration'].sum() print(total_travel_time, " is the total travel time.") # display mean travel time mean_travel = df['Trip Duration'].mea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri...
[ "0.814274", "0.8025143", "0.80041367", "0.79496753", "0.7937415", "0.79312176", "0.7926815", "0.7915187", "0.79142886", "0.7908032", "0.79055744", "0.7900715", "0.7891682", "0.78894734", "0.7886722", "0.78851086", "0.7884266", "0.7882474", "0.78738385", "0.78686154", "0.78664...
0.7796756
48
r""" Returns the unique elements of the input tensor.
def unique_op( input, sorted=True, return_inverse=False, return_counts=False, dtype=flow.int ): if not return_inverse and not return_counts: return flow._C.unique(input, sorted, dtype=dtype) else: return flow._C.unique( input, sorted, return_inverse=return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique(x):\n try:\n tmp = x.flatten()\n if tmp.size == 0:\n return tmp\n tmp.sort()\n idx = concatenate(([True],tmp[1:]!=tmp[:-1]))\n return tmp[idx]\n except AttributeError:\n items = list(set(x))\n items.sort()\n return asarray(items)",...
[ "0.70321065", "0.6876299", "0.68101525", "0.65971196", "0.6447664", "0.6408536", "0.6407627", "0.6402337", "0.6345468", "0.6266848", "0.62202865", "0.6127053", "0.6114195", "0.61141056", "0.6111312", "0.61053115", "0.6069881", "0.6031665", "0.6027739", "0.59937423", "0.596469...
0.6147356
11
Test that SALGenerics.xml defines the expected set of generic topics.
def test_salgenerics_topics() -> None: sal_generics_file = get_salgenerics_file() # Check for known issues. jira = check_for_issues("none", "generic_topics") if jira: pytest.skip(f"{jira}: {sal_generics_file.name}") # Test SALGenerics.xml contains the expected commands. with open(str(sal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_xmlfiles_do_not_define_generic_topics(\n xmlfile: pathlib.Path, csc: str, topic: str\n) -> None:\n if topic == \"Telemetry\":\n pass\n else:\n saltype = \"SAL\" + topic.rstrip(\"s\")\n # Check for known issues.\n jira = check_for_issues(csc, topic)\n if jira:\n ...
[ "0.7116352", "0.6682334", "0.6400323", "0.6252207", "0.6087275", "0.6015074", "0.6013223", "0.5904566", "0.57877874", "0.5760492", "0.569128", "0.5643429", "0.5636966", "0.5568564", "0.5563466", "0.55594784", "0.5552239", "0.55276155", "0.5500545", "0.5481077", "0.5453787", ...
0.84279233
0
Update the given comboBox
def update_combobox(combobox, items, block='True'): # --- Blocking signals from ui if block: combobox.blockSignals(True) else: pass # --- Init items if empty if not items: items = ['None'] # --- Get currently selected text selected_text = combobox.currentText() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_comboBox_celuebianhao_currentIndexChanged(self, p0):\n # TODO: not implemented yet\n raise NotImplementedError", "def comboBoxChanged(self):\n new_action = self.ui.comboBoxAction.currentText().lower()\n self.parameters['action'] = new_action\n\n self.changed.emit()", "...
[ "0.6899384", "0.686422", "0.6811405", "0.67945963", "0.67711675", "0.67524314", "0.6749332", "0.65180737", "0.64715", "0.6388051", "0.6365394", "0.6249386", "0.6186808", "0.6160146", "0.6093576", "0.6067558", "0.6023498", "0.6001118", "0.59906507", "0.59624237", "0.5953897", ...
0.7086308
0
Produce languagespecific date representation.
def tr_date(self, date): visitor = _TemplateDateVisitor() tmpl, datekw = date.accept(visitor) tmpl = string.Template(self.tr(tmpl)) kw = {} for key, val in datekw.items(): if isinstance(val, CalendarDate): # localized date kw[key] = sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l10n_format_date(ctx, date, format='long'):\n lang = get_locale(ctx['LANG'])\n if date:\n return format_date(date, locale=lang, format=format)\n else:\n return ''", "def numeric_date_recover(self):\n \n sp_time_zone, current_datetime = self.setup_datetime() \n con...
[ "0.61531264", "0.61133605", "0.6112571", "0.60366064", "0.5910946", "0.5909375", "0.5898708", "0.58553475", "0.5848724", "0.5848724", "0.5846263", "0.5845879", "0.580606", "0.5805439", "0.5768328", "0.57455415", "0.57403564", "0.5734783", "0.5724341", "0.5680319", "0.5636849"...
0.6429855
0
Returns translation of a month name. For a given GEDCOM month name return translated month name.
def _monthName(self, month): if month is not None: month = self.tr("MONTH." + month.upper()) return month
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wordmonth(self, month):\n monthname = [word for word in self.months if word.istitle()]\n Month = int(month) -1\n return monthname[Month]", "def get_month_name(self, month):\n return self.month_names[month.month - 1]", "def get_month_name(month_no):\n locale.setlocale(locale.L...
[ "0.7420913", "0.7374648", "0.73278564", "0.72874063", "0.72810477", "0.7172358", "0.7106204", "0.6751799", "0.6750053", "0.6593021", "0.6485294", "0.6474721", "0.6395206", "0.6246248", "0.61867464", "0.6159261", "0.609756", "0.6079453", "0.60544723", "0.6043487", "0.60133487"...
0.7748758
0
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def plot_confusion_matrix(cm, classes, normalize=False, title='Confusion matrix', cmap=plt.cm.Blues): if normalize: cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis] print("Normalized confusion matrix") else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n...
[ "0.819363", "0.8094859", "0.8028102", "0.8018164", "0.799278", "0.79902315", "0.7979656", "0.7974647", "0.79595697", "0.7956129", "0.7936602", "0.79336774", "0.7933392", "0.79303294", "0.79252326", "0.7923459", "0.79230803", "0.79221183", "0.79218185", "0.7921176", "0.7916744...
0.78127986
100
Serialize a date/time value into an ISO8601 text representation adjusted (if needed) to UTC timezone.
def serialize_date(dt): if dt.tzinfo: dt = dt.astimezone(UTC).replace(tzinfo=None) return dt.isoformat()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _serialize_datetime(val):\n return datetime_to_iso8601(val)", "def to_iso_datetime(value: Union[datetime.datetime, datetime.time]) -> str:\n retval = value.isoformat()\n if value.tzinfo is None:\n retval += 'Z'\n else:\n # replace +00:00 timezone with Z\n retval = re.sub('[+-...
[ "0.75783527", "0.7445774", "0.7327243", "0.7323873", "0.7222513", "0.7213059", "0.7203276", "0.7202411", "0.7156058", "0.71076936", "0.709304", "0.7047264", "0.7027501", "0.69711757", "0.6877027", "0.68557733", "0.6692634", "0.66862136", "0.66354734", "0.6536075", "0.64390963...
0.7416143
2
Check if list is list or a CSV string. In case of string, create a list.
def set_files(self, file_list): if file_list==None: return [] import types isString = isinstance(file_list, types.StringTypes) isList = isinstance(file_list, list) assert isString or isList, "You should provide a list of files as list or as CVS string!" if isList: return file_list if isString : import re ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safelist(listable):\n if type(listable) == str:\n return [listable]\n else:\n return listable.tolist()", "def _is_list(arg):\n return isinstance(arg, collections.Sequence) and not _is_string(arg)", "def _is_list(item):\n return isinstance(item, list)", "def is_list ( self, s ):\...
[ "0.7061733", "0.7050197", "0.6987805", "0.69605166", "0.689558", "0.68587095", "0.68108124", "0.6809189", "0.67672557", "0.66692865", "0.66393006", "0.66272616", "0.66255385", "0.6541521", "0.6526167", "0.6524329", "0.6472686", "0.6454661", "0.64219445", "0.641768", "0.640564...
0.0
-1
Get one item from cfg dictionary. If the item is nested, then use "." to set the path to the item.
def item(self, item_name): self.log.info('Not implemented yet... Sorry!') pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config_item(app_config, item):\n item_path = item.split('.')\n this_config = app_config\n for path_part in item_path:\n this_config = this_config[path_part]\n # end For\n\n return this_config", "def __getitem__(self, item):\n return self._config[item]", "def get_item(self, ...
[ "0.767233", "0.69134456", "0.6912901", "0.6631167", "0.65893537", "0.64392567", "0.612385", "0.5953196", "0.5926586", "0.58816564", "0.5819377", "0.5806405", "0.57977265", "0.5790318", "0.5749713", "0.570999", "0.5680949", "0.5659986", "0.56548715", "0.5633158", "0.5627092", ...
0.0
-1
Asynchronously send a PATCH request to the Twitch API with the user's authentication. The scopes required for a given Twitch API request must have been registered for with `TwitchLogin.RegisterMod(mod)`, with the `mod` object having the relevant `TwitchLogin.TwitchScope` object in its `TwitchScopes` property. The user ...
def Patch(Path: str, Params: Any = None, Data: Any = None, *, Callback: Callable[[int, Dict[str, Any]], None]) -> None: Request("PATCH", Path, Params, Data, Callback=Callback)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def patch(url, session=None, **kwargs):\n\n method = 'PATCH'\n resp = await _request(method, url, session=session, **kwargs)\n return resp", "def partial_update(self, request, pk=None):\n is_stop_requested = request.data.get(\"is_stop_requested\", False)\n if is_stop_requested:\n ...
[ "0.53972507", "0.5281161", "0.52241457", "0.5180269", "0.51552546", "0.5094652", "0.49817306", "0.4965396", "0.4951894", "0.49072388", "0.49016032", "0.4883695", "0.4872769", "0.4844847", "0.4844847", "0.4844847", "0.4844847", "0.4844847", "0.4844847", "0.4844847", "0.4844847...
0.49233624
9
Returns the uplink settings for your MX network.
def getNetworkUplinkSettings(self, networkId: str): metadata = { 'tags': ['Uplink settings'], 'operation': 'getNetworkUplinkSettings', } resource = f'/networks/{networkId}/uplinkSettings' return self._session.get(metadata, resource)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_settings(self): # type: () -> t.Dict[str, t.Any]\n return self.inspection['NetworkSettings']", "def get_akamai_ips_connection(self):\n return self.m_connection.akamai_ips", "def ports(self):\n return self.attrs.get('NetworkSettings', {}).get('Ports', {})", "def getManageIp(s...
[ "0.58161306", "0.51639074", "0.51633143", "0.51286435", "0.5054297", "0.5023034", "0.5008097", "0.49733463", "0.49202013", "0.4920022", "0.49150968", "0.4886921", "0.48844305", "0.48785248", "0.48699006", "0.48679027", "0.48553163", "0.4810464", "0.48043612", "0.47876775", "0...
0.612511
0
Check if a node with the name top_C_001_CTRL exist.
def check(self): if pm.objExists("top_C_001_CTRL"): self.status = "OK" else: self.status = "ERROR" self.addError("No node with the name top_C_001_CTRL") self.errorMessage = "No top Controler"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node_exists(self):\n return self.oid is not None", "def has_node(self, n):\n return n in self.node_dict", "def __check_node(self, node):\r\n if not node or not node.key:\r\n raise IndexError(\"Node doesn't exist!\")", "def isNodeExists(self, longName):\n return self...
[ "0.5932263", "0.5902607", "0.5733696", "0.57212734", "0.56526434", "0.5621299", "0.5572999", "0.5558627", "0.5558627", "0.55556417", "0.55387175", "0.5525269", "0.55163336", "0.5483244", "0.5483244", "0.5477957", "0.5425302", "0.5420195", "0.54100865", "0.5401311", "0.5385778...
0.80126154
0
Check if the name of the parent of the asset node match with the naming convention.
def check(self): badTransformName = list() # prog = re.compile("^[A-Z]{4}[0-9]{2}_C_[0-9]{3}_GAST$") prog = re.compile("^[A-Z]{4}[0-9]{2}_C_[0-9]{3}_G[A-Z]{3}$") progFx = re.compile("^[A-Z]{4}[0-9]{2}_C_[0-9]{3}_G[A-Z]{2}$") for assetTransform in pm.ls(type="gAsset"): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_parent(obj, parent_name):\n if obj.parent is None:\n return False\n if obj.parent.name is None:\n return False\n elif obj.parent.name == parent_name:\n return True\n else:\n return has_parent(obj.parent, parent_name)", "def _contains_in_self_or_parent(self, name: s...
[ "0.6530085", "0.65255064", "0.6508738", "0.6490767", "0.6333319", "0.62200254", "0.6060303", "0.60277796", "0.6008233", "0.6005832", "0.6003955", "0.593273", "0.589719", "0.58755153", "0.58633924", "0.5859596", "0.58096474", "0.57927936", "0.5749615", "0.5744222", "0.5742705"...
0.0
-1
Check if the namespaces are legal.
def check(self): illegalNamespaces = list() progStandard = re.compile("^[A-Z]{4}[0-9]{2}_[0-9]{3}$") progShot = re.compile("^SH[0-9]{4}_[0-9]{3}$") for namespaces in pm.namespaceInfo(listOnlyNamespaces=True, internal=False, recurse=True): for namespace in namespaces.split("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n illegalNamespaces = list()\n\n prog = re.compile(\"^[A-Z]{4}[0-9]{2}_[0-9]{3}:$\")\n\n for assetNode in pm.ls(type=\"gAsset\"):\n if assetNode.isReferenced() and not prog.match(assetNode.namespace()):\n illegalNamespaces.append(assetNode)\n\n ...
[ "0.7497519", "0.7126947", "0.65850127", "0.6554628", "0.655144", "0.6361884", "0.6348672", "0.6336307", "0.63176185", "0.6308767", "0.61710936", "0.61086893", "0.6087368", "0.6029946", "0.60256046", "0.5975307", "0.5941907", "0.5937787", "0.5937092", "0.5903786", "0.58948714"...
0.76849836
0
Returns the unit price for the move
def _get_price_unit(self): self.ensure_one() if self.subcontract_line_id and self.product_id.id == self.subcontract_line_id.product_id.id: line = self.subcontract_line_id order = line.order_id price_unit = line.price_unit if line.taxes_id: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_price_unit(self, cr, uid, move, context=None):\n return move.cost or move.price_unit or move.product_id.standard_price", "def _get_price_unit(self):\n self.ensure_one()\n if self.purchase_line_id and self.product_id.id == self.purchase_line_id.product_id.id:\n price_unit_p...
[ "0.8033934", "0.794004", "0.701637", "0.6741477", "0.6717255", "0.6713961", "0.6713961", "0.66986066", "0.66445947", "0.64631796", "0.6445394", "0.6403125", "0.63941884", "0.6365873", "0.63428265", "0.63428265", "0.63428265", "0.6324418", "0.6314691", "0.6286195", "0.6263461"...
0.7457025
2
Convert object label to Training label for objectness loss
def center_to_sphere(places, size, resolution=0.50, min_value=np.array([0., -50., -4.5]), scale=4, x=(0, 90), y=(-50, 50), z=(-4.5, 5.5)): x_logical = np.logical_and((places[:, 0] < x[1]), (places[:, 0] >= x[0])) y_logical = np.logical_and((places[:, 1] < y[1]), (places[:, 1] >= y[0])) z_logical = np.logica...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def coco_label_to_label(self, coco_label):\n\t\t\treturn self.coco_labels_inverse[coco_label]", "def coco_label_to_label(self, coco_label):\n\t\treturn self.coco_labels_inverse[coco_label]", "def convertclasstoemotion(pred):\n \n label_conversion = {'0': 'neutral',\n '1...
[ "0.62724924", "0.62434286", "0.62132126", "0.6201874", "0.6195789", "0.6153648", "0.615067", "0.6133608", "0.6133375", "0.60148764", "0.59861636", "0.5978544", "0.59243834", "0.5890846", "0.5884813", "0.5822075", "0.5794943", "0.5783297", "0.57597214", "0.575959", "0.57465214...
0.0
-1
Returns the link type to use. This will simply return the given link_type unless one or both of the components is the SpecialMixerComponent, which can only do horizontal or matched_track_only.
def get_link_type(comp_a, comp_b, link_type): need_to_verify = isinstance(comp_a, SpecialMixerComponent) or isinstance(comp_b, SpecialMixerComponent) if need_to_verify and link_type is not LinkType.horizontal: link_type = LinkType.matched_track_only return link_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def schema_item_type_link(self) -> Optional[str]:\n return pulumi.get(self, \"schema_item_type_link\")", "def __get_linkage_type(self):\n return random.choice(self.LINKAGE_TYPE)", "def get_links_of_type(self, link_type):\n return (link for link in self.links if link.get('type', '') == link...
[ "0.5603517", "0.55006784", "0.53137785", "0.52385145", "0.51456344", "0.51456344", "0.505354", "0.5008521", "0.4930851", "0.4930851", "0.49079278", "0.48910624", "0.48759028", "0.48514178", "0.4844459", "0.4826265", "0.47952557", "0.47923282", "0.47908473", "0.47568673", "0.4...
0.8483192
0