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
Unrolls the RNN encoder in "imputation mode" which will fill imputed values with samples from the DeepAR model.
def unroll_encoder_imputation( self, F, feat_static_cat: Tensor, # (batch_size, num_features) feat_static_real: Tensor, # (batch_size, num_features) past_time_feat: Tensor, # (batch_size, history_length, num_features) past_target: Tensor, # (batch_size, history_length...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def imputation_rnn_unroll(\n self,\n F,\n begin_state: List[Tensor],\n sequence: Tensor,\n sequence_length: int,\n subsequences_length: int,\n scale: Tensor,\n target: Tensor,\n target_observed_values: Tensor,\n time_feat: Tensor,\n repea...
[ "0.59084255", "0.5768774", "0.5570246", "0.5397948", "0.5368438", "0.53532857", "0.5349223", "0.53181547", "0.5179482", "0.51719147", "0.51417714", "0.51277596", "0.51234764", "0.51230425", "0.51127404", "0.5084061", "0.5073099", "0.50728697", "0.5069399", "0.5058308", "0.502...
0.56498396
2
The function modify month's names to numbers
def get_month_number(month_name): months = { "January": "01", "February": "02", "March": "03", "April": "04", "May": "05", "June": "06", "July": "07", "August": "08", "September": "09", "October": "10", "November": "11", "December": "12" } return months[month_name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MonthNum(name):\n return _MONTH_DICT.get(name.capitalize(), 0)", "def monthName(self, num):\n \n monthNames = {\n '1': 'January',\n '2': 'February',\n '3': 'March',\n '4': 'April',\n '5': 'May',\n '6': 'June',\n '7': ...
[ "0.73958105", "0.7155768", "0.70142686", "0.69363326", "0.6745249", "0.6713361", "0.6690283", "0.6677973", "0.6661122", "0.6595928", "0.6524847", "0.65079683", "0.6502951", "0.6501239", "0.6501239", "0.6419771", "0.64167273", "0.6414414", "0.63909864", "0.6374177", "0.6364748...
0.65338856
10
Reprojects points fed into Pnp back onto camera whose R and t were just obtained via Pnp. Used to assess how good the resection was.
def test_reproj_pnp_points(pts3d_for_pnp, pts2d_for_pnp, R_new, t_new, K, rep_thresh=5): errors = [] projpts = [] inliers = [] # print("len",len(pts3d_for_pnp)) # print(pts2d_for_pnp[0]) for i in range(len(pts3d_for_pnp)): Xw = pts3d_for_pnp[i] # pri?\nt(Xw) Xr = np.dot(R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_reproj_pnp_points(pts3d_for_pnp, pts2d_for_pnp, R_new, t_new, K, rep_thresh=5):\n errors = []\n projpts = []\n inliers = []\n for i in range(len(pts3d_for_pnp)):\n Xw = pts3d_for_pnp[i][0]\n Xr = np.dot(R_new, Xw).reshape(3,1)\n Xc = Xr + t_new\n x = np.dot(K, Xc)\n...
[ "0.7177816", "0.6952652", "0.68466777", "0.6752847", "0.6737952", "0.6689228", "0.666188", "0.66419065", "0.64618975", "0.638305", "0.62384635", "0.6073001", "0.6069069", "0.60516804", "0.60219455", "0.6010884", "0.59204143", "0.58847004", "0.5835912", "0.58249265", "0.581583...
0.7315067
0
Performs Pnp with Ransac implemented manually. The camera pose which has the most inliers (points which when reprojected are sufficiently close to their keypoint coordinate) is deemed best and is returned.
def do_pnp(pts3d_for_pnp, pts2d_for_pnp, K, iterations=200, reprojThresh=5): list_pts3d_for_pnp = pts3d_for_pnp list_pts2d_for_pnp = pts2d_for_pnp pts3d_for_pnp = np.array(pts3d_for_pnp) # pts2d_for_pnp = np.expand_dims(np.squeeze(np.array(pts2d_for_pnp)), axis=1) # print(pts3d_for_pnp) # print(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_pnp(pts3d_for_pnp, pts2d_for_pnp, K, iterations=200, reprojThresh=5):\n list_pts3d_for_pnp = pts3d_for_pnp\n list_pts2d_for_pnp = pts2d_for_pnp\n pts3d_for_pnp = np.squeeze(np.array(pts3d_for_pnp))\n pts2d_for_pnp = np.expand_dims(np.squeeze(np.array(pts2d_for_pnp)), axis=1)\n num_pts = len(p...
[ "0.716156", "0.64212894", "0.63186044", "0.6139132", "0.5705693", "0.5690041", "0.567506", "0.56745493", "0.565156", "0.5613238", "0.54753816", "0.54606223", "0.545149", "0.5426219", "0.53686255", "0.5341676", "0.5335844", "0.5290983", "0.524851", "0.52351636", "0.522661", ...
0.72106004
0
Compute the smallest pixel size that will bound a sample.
def get_minimum_pixel_meter_size(frame, beam_width_data): all_widths = [] all_heights = [] for beam_num in range(frame.BeamCount): bl, br, fr, fl = get_box_for_sample(beam_num, 0, frame, beam_width_data) # determine the axis aligned box around this sample box. xs = [bl[0], br[0], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def determine_size(self):\n size = np.inf\n while size >= self.n:\n size = np.random.pareto(0.2)\n size = int(math.ceil(size))\n return size", "def _min_sampled_from_batch(self):\n return min([col._last_batch_size for col in self._profile], default=0)", "def _g...
[ "0.7084712", "0.6887584", "0.68437934", "0.6625404", "0.65869457", "0.6536444", "0.65207165", "0.64497006", "0.64339876", "0.6402938", "0.63633865", "0.63590676", "0.62878376", "0.6282438", "0.62455636", "0.62266964", "0.62258", "0.6210514", "0.6197432", "0.6179695", "0.61650...
0.6524812
6
Create a schedule with a learning rate that decreases linearly from the initial lr set in the optimizer to 0, after a warmup period during which it increases linearly from 0 to the initial lr set in the optimizer.
def get_restart_linear_schedule_with_warmup(optimizer, num_warmup_steps, num_training_steps, last_epoch=-1, restart_warmup_steps=0, restart_steps=0): def lr_lambda(current_step: int): if restart_steps != 0 and restart_warmup_steps != 0 \ and current_step < restart_steps + restart_warmu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(\n self,\n lr_schedule: tf.keras.optimizers.schedules.LearningRateSchedule,\n warmup_steps: int,\n **kwargs):\n super(WarmupDecaySchedule, self).__init__()\n self._lr_schedule = lr_schedule\n self._warmup_steps = warmup_steps", "def rnn_learning_rate_schedule(dataset):\n...
[ "0.75850344", "0.7440217", "0.74165916", "0.73015964", "0.726668", "0.72266424", "0.722616", "0.7222608", "0.72135013", "0.7199848", "0.716905", "0.71587753", "0.71408796", "0.7138617", "0.71310216", "0.7119712", "0.70825034", "0.7076689", "0.7076689", "0.70524365", "0.704878...
0.66050047
76
Provide a helpful representation.
def __repr__(self): return '<Customer customer_id={} first_name={}>'.format( self.customer_id, self.first_name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n return \"<%s: %s>\" % (self.__class__, self.describe())", "def __str__(self):\n if self.__description:\n return self.__description\n return repr(self)", "def describe(self):\n return str(self)", "def __repr__(self):\n return self.pretty_print...
[ "0.7741487", "0.7441897", "0.7426429", "0.7318764", "0.72309095", "0.72000057", "0.71965194", "0.718729", "0.71870273", "0.7180523", "0.71746695", "0.7128212", "0.71147925", "0.7113857", "0.71106625", "0.7107568", "0.710582", "0.71049553", "0.7084181", "0.7064528", "0.7063703...
0.0
-1
Provide a helpful representation.
def __repr__(self): return '<Cart cart_id={} product_id={} quantity={}>'.format( self.cart_id, self.product_id, self.quantity)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n return \"<%s: %s>\" % (self.__class__, self.describe())", "def __str__(self):\n if self.__description:\n return self.__description\n return repr(self)", "def describe(self):\n return str(self)", "def __repr__(self):\n return self.pretty_print...
[ "0.7741487", "0.7441897", "0.7426429", "0.7318764", "0.72309095", "0.72000057", "0.71965194", "0.718729", "0.71870273", "0.7180523", "0.71746695", "0.7128212", "0.71147925", "0.7113857", "0.71106625", "0.7107568", "0.710582", "0.71049553", "0.7084181", "0.7064528", "0.7063703...
0.0
-1
Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes.
def add_header(response): response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1' response.headers['Cache-Control'] = 'public, max-age=0' return response
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_header(response):\n response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n response.headers['Cache-Control'] = 'public, max-age=60'\n return response", "def add_header(response):\n response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n response.headers['Cache-Control'] = 'public, m...
[ "0.82247144", "0.8223862", "0.8223862", "0.8223862", "0.8223862", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", "0.8164743", ...
0.81971866
5
Plucker.uw Line direction as a unit vector self.UW is a unitvector parallel to the line
def uw(self): return sm.unitvec(self.w)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def direction(self):\n len = self.length()\n if len == 0.0:\n uvec = pos.Pos(np.transpose(np.array([0, 0, 0])))\n else:\n uvec = pos.Pos(np.transpose(np.array([(self.end.x - self.start.x) / len,\n (self.end.y - self.start.y...
[ "0.6354871", "0.6124988", "0.60381293", "0.59610367", "0.5940586", "0.59396374", "0.5939317", "0.5903005", "0.58940834", "0.5846335", "0.58430356", "0.58010244", "0.5765009", "0.57433486", "0.57287866", "0.57050014", "0.56702507", "0.5656442", "0.56524044", "0.5646683", "0.56...
0.6646575
0
Plucker.point Generate point on line ``P = self.point(LAMBDA)`` is a point on the line, where LAMBDA is the parametric distance along the line from the principal point of the line P = PP + self.UWLAMBDA. See also Plucker.pp, Plucker.closest.
def point(L, lam): lam = arg.getvector(lam, out='row') return L.pp.reshape((3,1)) + L.uw.reshape((3,1)) * lam
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def closest(self, x):\n # http://www.ahinson.com/algorithms_general/Sections/Geometry/PluckerLine.pdf\n # has different equation for moment, the negative\n\n x = arg.getvector(x, 3)\n\n lam = np.dot(x - self.pp, self.uw)\n p = self.point(lam) # is the closest point on the line\n...
[ "0.6070338", "0.5789104", "0.5676757", "0.5594491", "0.558529", "0.55708915", "0.5563904", "0.5543487", "0.54946566", "0.5481927", "0.5480706", "0.5447783", "0.5440139", "0.5420115", "0.54165536", "0.5394499", "0.5383815", "0.53664374", "0.53557193", "0.53511924", "0.5347073"...
0.67625064
0
Plucker.contains Test if point is on the line ``line.contains(X)`` is true if the point X (3x1) lies on the line defined by the Plucker object self.
def contains(self, x, tol=50*_eps): if arg.isvector(x, 3): return np.linalg.norm( np.cross(x - self.pp, self.w) ) < tol elif arg.ismatrix(x, (3,None)): return [np.linalg.norm(np.cross(_ - self.pp, self.w)) < tol for _ in x.T] else: raise ValueError('bad argume...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contains(self, point):\n raise Exception(\"contains not implemented.\")", "def contains(self, point):\n return super().contains((point[0] - self.x, point[1] - self.y))", "def __contains__(self, point):\n #### Original \n from pyresample.spherical_geometry import point_inside, Co...
[ "0.7271044", "0.7123202", "0.7067892", "0.7061233", "0.696713", "0.6879178", "0.6871819", "0.68405265", "0.67402786", "0.6707626", "0.667894", "0.66752505", "0.66682214", "0.6634924", "0.66344815", "0.6551251", "0.6516272", "0.65076625", "0.6465139", "0.64451253", "0.6437647"...
0.0
-1
Add a leading '$' to an amount, and a '' before that if it is negative.
def format_currency(amount): pretty_amount = str(amount) if amount < 0: pretty_amount = pretty_amount[:1] + "$" + pretty_amount[1:] else: pretty_amount = "$%s" % pretty_amount return pretty_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_price(self):\n return '$ '+str(self.price)", "def format_amount(self) -> str:\n if self.amount_debit != '':\n return self.amount_debit.replace('-', '')\n return self.amount_credit.replace('-', '')", "def _strip_currency(amount):\n if amount[0] == '$':\n amo...
[ "0.6311231", "0.6236592", "0.62246007", "0.617647", "0.61657214", "0.60585886", "0.6026748", "0.6006972", "0.5870252", "0.5839042", "0.57891965", "0.57817835", "0.56697446", "0.5645507", "0.54702485", "0.54470813", "0.5445469", "0.5427947", "0.54265213", "0.54247695", "0.5423...
0.6836816
0
Test TestConfig.minimum_gap field minimum value.
def test_init_minimum_gap_field_below_range(self): test_config = TestConfig(minimum_gap=-1) with self.assertRaises(ValidationError): test_config.clean_fields()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _minimum(self) -> float:\n return self._config[CONF_MIN]", "def MinGapBytes(self):\r\n\t\treturn self._get_attribute('minGapBytes')", "def minimum(self):\n return self.properties.get('minimum')", "def test_set_minimum(self):\n self.server_widget.minimum = 10\n assert self.clie...
[ "0.6993034", "0.68796545", "0.64352655", "0.63890445", "0.6259554", "0.62271816", "0.6207724", "0.6159501", "0.6146005", "0.60876596", "0.60340124", "0.60340124", "0.59907866", "0.5981122", "0.59810156", "0.59423494", "0.59267825", "0.5888969", "0.58854", "0.58768636", "0.586...
0.76341623
0
Create a rule and append to the end of the priority list.
def create(self, subverbify, short_name, description, kind=None, created_utc=None): try: priority = len(list(self._cf.get(subverbify._id36))) except tdb_cassandra.NotFoundException: priority = 0 if priority >= MAX_RULES_PER_SUBVERBIFY: return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_rule(self, rule):\n self.rule.append(rule)", "def add_rule(self, rule):\n \n self.rules.append(rule)", "def append_rule(self, rule):\n\n self._control_manager.append_rule(rule)", "def add_rule(self, rule):\n assert isinstance(rule, Rule)\n self.rule.append(ru...
[ "0.7077096", "0.69089496", "0.6759561", "0.6722181", "0.6671867", "0.6653479", "0.660498", "0.64574087", "0.6448568", "0.62450826", "0.62110984", "0.61071885", "0.609504", "0.6080888", "0.6063088", "0.60506415", "0.6036458", "0.5978689", "0.5946697", "0.59426004", "0.59117514...
0.0
-1
Remove a rule and update priorities of remaining rules.
def remove_rule(self, subverbify, short_name): self._remove(subverbify._id36, [short_name]) rules = self.get_rules(subverbify) blobs = {} for index, rule in enumerate(rules): if rule["priority"] != index: blobs.update(self.get_rule_blob( s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_rule(self, chain, rule, wrap=True, top=False):\n try:\n self.rules.remove(IptablesRule(chain, rule, wrap, top))\n if not wrap:\n self.remove_rules.append(IptablesRule(chain, rule, wrap, top))\n self.dirty = True\n except ValueError:\n ...
[ "0.6658289", "0.66306096", "0.6266302", "0.62314177", "0.62225765", "0.61738706", "0.61737436", "0.60359055", "0.5981215", "0.5948133", "0.5927601", "0.59225756", "0.58291805", "0.58171594", "0.5788776", "0.574652", "0.57319516", "0.57066095", "0.56460625", "0.5643478", "0.55...
0.6455457
2
Return rule associated with short_name or None.
def get_rule(self, subverbify, short_name): try: rules = self._cf.get(subverbify._id36) except tdb_cassandra.NotFoundException: return None rule = rules.get(short_name, None) if not rule: return None rule = json.loads(rule) rule["short_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rule_name(self) -> typing.Optional[str]:\n return self._values.get('rule_name')", "def get_rule(self, rule_name):\n assert rule_name in self.rules.keys(), 'Rule name not in current set of rules'\n return self.rules[rule_name]", "def get_rule(self, name):\n\n return self._control...
[ "0.67104834", "0.6557985", "0.65287083", "0.643685", "0.643685", "0.643685", "0.6387028", "0.6352408", "0.619555", "0.619555", "0.619555", "0.619555", "0.619555", "0.619555", "0.619555", "0.61702245", "0.60376084", "0.60098577", "0.5991991", "0.5991991", "0.5940966", "0.586...
0.7758229
0
Returns the configurable settings for this application
def get_parameter_options(self) -> dict: return { "nodes": { "values": list([3, 4, 6, 8, 10, 14, 16]), "description": "How many nodes does you graph need?" } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getSettings(self):\n return self.cfg", "def app_settings():\n return {\n 'app_wksp_path': os.path.join(App.get_app_workspace().path, ''),\n 'threddsdatadir': App.get_custom_setting(\"thredds_path\"),\n 'threddsurl': App.get_custom_setting(\"thredds_url\"),\n 'logfile': o...
[ "0.78438467", "0.7544641", "0.7541406", "0.74100435", "0.74100435", "0.74087065", "0.729275", "0.72858465", "0.72858465", "0.7158631", "0.7127755", "0.70935506", "0.7092009", "0.706155", "0.70561326", "0.7022985", "0.6997429", "0.6997429", "0.6964183", "0.69358504", "0.693385...
0.0
-1
Sets the name of this ConsistencyGroup.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_group_name(self, name):\n self.groupname = name", "def set_group_name(self, name):\n params = [('groupname', name, 'cdata')]\n\n self.get(COMMAND_UIC, 'SetGroupName', params)", "def set_name(self, name):\n self._name = name", "def set_name(self, name: str):\n self._...
[ "0.77291083", "0.7204853", "0.70147663", "0.6988629", "0.6931022", "0.6931022", "0.6926085", "0.6907357", "0.6907026", "0.68923485", "0.68923485", "0.68923485", "0.68923485", "0.68923485", "0.6886007", "0.6840113", "0.6829938", "0.675757", "0.67537344", "0.67537344", "0.67295...
0.65965986
91
Sets the operational_status of this ConsistencyGroup.
def operational_status(self, operational_status): self._operational_status = operational_status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def operational_state(self, operational_state: str):\n allowed_values = [\"DISABLED\", \"ENABLED\"] # noqa: E501\n if operational_state not in allowed_values:\n raise ValueError(\n \"Invalid value for `operational_state` ({0}), must be one of {1}\"\n .format(...
[ "0.6056155", "0.560231", "0.5499246", "0.5450985", "0.5418997", "0.5390228", "0.5361447", "0.53568166", "0.53536296", "0.53536296", "0.53536296", "0.53495383", "0.5335409", "0.5298802", "0.5288436", "0.5287816", "0.5284188", "0.5277605", "0.52536756", "0.52536756", "0.5253675...
0.7974734
0
Sets the active_clusters of this ConsistencyGroup.
def active_clusters(self, active_clusters): self._active_clusters = active_clusters
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters(self, clusters):\n\n self._clusters = clusters", "def passive_clusters(self, passive_clusters):\n\n self._passive_clusters = passive_clusters"...
[ "0.5969983", "0.5969983", "0.5969983", "0.57970804", "0.5453564", "0.54139143", "0.53327894", "0.5247132", "0.49109638", "0.4897235", "0.48913842", "0.48292735", "0.4816063", "0.48070535", "0.48007727", "0.47520852", "0.46853057", "0.4672924", "0.46639615", "0.46584266", "0.4...
0.8170967
0
Sets the passive_clusters of this ConsistencyGroup.
def passive_clusters(self, passive_clusters): self._passive_clusters = passive_clusters
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters(self, clusters):\n\n self._clusters = clusters", "def active_clusters(self, active_clusters):\n\n self._active_clusters = active_clusters", ...
[ "0.58451086", "0.58451086", "0.58451086", "0.57022583", "0.55503756", "0.5126345", "0.49935988", "0.48193204", "0.47358012", "0.46674076", "0.46449772", "0.46129617", "0.4576382", "0.4559444", "0.45342532", "0.4496811", "0.4462547", "0.4453122", "0.4448191", "0.43995038", "0....
0.8723456
0
Sets the cache_mode of this ConsistencyGroup.
def cache_mode(self, cache_mode): self._cache_mode = cache_mode
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_cache_mode(self, mode: CacheModeStr | mod.CacheModeFlag):\n self.setCacheMode(CACHE_MODES.get_enum_value(mode))", "def bdev_ocf_set_cache_mode(client, name, mode):\n params = {\n 'name': name,\n 'mode': mode,\n }\n\n return client.call('bdev_ocf_set_cache_mode', params)", ...
[ "0.72405267", "0.69031507", "0.6067402", "0.5893205", "0.54835427", "0.5237434", "0.52019465", "0.5176947", "0.5136807", "0.5128", "0.5111399", "0.5088542", "0.50614774", "0.5060343", "0.5011764", "0.5003731", "0.5003731", "0.5003731", "0.4961027", "0.4949549", "0.49066347", ...
0.77972627
0
Sets the storage_at_clusters of this ConsistencyGroup.
def storage_at_clusters(self, storage_at_clusters): self._storage_at_clusters = storage_at_clusters
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters(self, clusters):\n\n self._clusters = clusters", "def clusters_every(self, clusters_every):\n\n self._clusters_every = clusters_every", "def...
[ "0.5501416", "0.5501416", "0.5501416", "0.54116875", "0.53443056", "0.5311897", "0.5190428", "0.505066", "0.49242598", "0.49119785", "0.4810742", "0.47898257", "0.47756672", "0.47756672", "0.47756672", "0.47756672", "0.47756672", "0.47756672", "0.47319382", "0.4697216", "0.46...
0.84057045
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, ConsistencyGroup): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Test the email for a new user is normalized
def test_new_user_email_normalized(self): email = 'test@GMAIL.COM' user = get_user_model().objects.create_user(email, 'test123') self.assertEqual(user.email, email.lower())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_new_user_email_normalized(self):\n email = 'test@GOOGLE.COM'\n user = get_user_model().objects.create_user(email, '212ds')\n\n self.assertEqual(user.email, email.lower())", "def test_new_email_normalised(self):\n\n email = \"test@RANDOMEMAIL.org\"\n user = get_user_mod...
[ "0.79984254", "0.7997281", "0.79201037", "0.7871696", "0.78619236", "0.785927", "0.7858499", "0.7853585", "0.7844939", "0.7773778", "0.7771046", "0.7745209", "0.7744957", "0.7702127", "0.75698525", "0.75344014", "0.74174696", "0.7257744", "0.7147643", "0.7080147", "0.70342535...
0.78920823
4
Test creating user with no email raises error
def test_new_user_invalid_email(self): with self.assertRaises(ValueError): get_user_model().objects.create_user(None, 'test123')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_private_create_user_without_email(self):\n with pytest.raises(ValueError) as exinfo:\n EmailUser.objects._create_user(None, None, False, False)\n self.assertIn('email must be set', str(exinfo.value))", "def test_creating_a_new_user_without_email(self):\n\n with self.asser...
[ "0.90313256", "0.8963383", "0.8736711", "0.8736247", "0.87256855", "0.8717645", "0.87053293", "0.87032956", "0.8700956", "0.869592", "0.86902976", "0.8681168", "0.86709315", "0.8597593", "0.85930586", "0.85868686", "0.8557775", "0.85267687", "0.8396068", "0.83576405", "0.8287...
0.87146974
7
Convert class labels from scalars to onehot vectors.
def dense_to_one_hot(labels_dense, num_classes): num_labels = labels_dense.shape[0] index_offset = np.arange(num_labels) * num_classes labels_one_hot = np.zeros((num_labels, num_classes)) labels_one_hot.flat[index_offset + labels_dense.ravel()] = 1 return labels_one_hot
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def one_hot(labels, classes=None):\n return K.utils.to_categorical(labels, classes)", "def one_hot(labels, classes=None):\n\n one_hot_ = K.utils.to_categorical(labels, classes)\n return(one_hot_)", "def to_onehot(labels: torch.Tensor, num_classes: int) -> torch.Tensor:\n if len(labels.size()) == 1:...
[ "0.82497233", "0.8076126", "0.8051126", "0.7976686", "0.79074484", "0.78987956", "0.78918725", "0.78696436", "0.78488487", "0.78488487", "0.7825817", "0.78246266", "0.77673084", "0.7763923", "0.77525115", "0.77525115", "0.77525115", "0.77478176", "0.77429885", "0.7737038", "0...
0.76582545
30
Convert class labels from scalars to onehot vectors.
def dense_to_one_hot(labels_dense, num_classes): num_labels = labels_dense.shape[0] index_offset = np.arange(num_labels) * num_classes labels_one_hot = np.zeros((num_labels, num_classes)) labels_one_hot.flat[index_offset + labels_dense.ravel()] = 1 return labels_one_hot
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def one_hot(labels, classes=None):\n return K.utils.to_categorical(labels, classes)", "def one_hot(labels, classes=None):\n\n one_hot_ = K.utils.to_categorical(labels, classes)\n return(one_hot_)", "def to_onehot(labels: torch.Tensor, num_classes: int) -> torch.Tensor:\n if len(labels.size()) == 1:...
[ "0.8250402", "0.807683", "0.80523187", "0.7977843", "0.7908335", "0.7900327", "0.7892233", "0.7869711", "0.7849721", "0.7849721", "0.7826951", "0.7826122", "0.77677035", "0.7765413", "0.77540547", "0.77540547", "0.77540547", "0.77489346", "0.7742955", "0.7737176", "0.77226317...
0.76598144
29
Return sum of array elements.
def sum_elements(arr): return sum(arr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sum_array(arr):\n sum = 0\n for num in arr:\n sum += num\n return sum", "def sum_array(arr):\n return sum(sorted(arr)[1:-1]) if arr != None else 0", "def sum_array(arr):\n if arr is None:\n return 0\n else:\n arr = sorted(arr)\n return sum([i for i in arr[1:len...
[ "0.84641844", "0.7686302", "0.75832134", "0.7302249", "0.71580815", "0.69583756", "0.69420534", "0.6904267", "0.68794173", "0.6783834", "0.67373383", "0.6719968", "0.67015296", "0.66813123", "0.66813123", "0.6677621", "0.66183895", "0.6616695", "0.65792567", "0.65682524", "0....
0.88148814
0
Update (or create) the set of species associated with this component. The update_species() function is responsible for generating all of the species associated with this component, including any species that are needed by componentspecific mechanisms.
def update_species(self, mixture, concentration): # Create component specific species # self.product = add_species(model, "Type", name) # Create any other species needed by component mechanisms mechanisms = get_mechanisms(mixture, self) for name in mechanisms: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_species(self):\n warn(f\"Default Update Species Called for Mechanism = {self.name}.\")\n return []", "def update_species_frames(self):\n pass", "def set_species(self, species):\n self.species = species", "def setSpecies(self, *args):\n return _libsbml.SimpleSpeci...
[ "0.7201343", "0.6794251", "0.67788714", "0.62144053", "0.6136422", "0.61360097", "0.60056984", "0.5946216", "0.5859275", "0.5800819", "0.57464457", "0.5720591", "0.5682179", "0.56254756", "0.5606235", "0.5591657", "0.5581193", "0.5556667", "0.55365574", "0.55131936", "0.55022...
0.7214194
0
Update (or create) the set of reactions associated with this component The update_reactions() function is responsible for generating all of the reactions associated with this component, including any species that are needed by componentspecific mechanisms.
def update_reactions(self, mixture): # Create component specific species # self.product = add_species(model, "Type", name) # Create the parameter values for this reacton parameters = parameters.copy() parameters.update(self.parameters) # Create any other reactio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_reactions(self, component = None, part_id = None):\n warn(f\"Default Update Species Called for Mechanism = {self.name}.\")\n return []", "async def update_reactions(self, message, data):\n\n emojis = []\n\n for role in data.roles.all():\n if role.emoji.startswith...
[ "0.67193985", "0.6406615", "0.63984233", "0.5518018", "0.5507412", "0.5444689", "0.5417488", "0.5347676", "0.52699846", "0.522106", "0.5202125", "0.51962376", "0.51833665", "0.5180005", "0.50719094", "0.50367993", "0.5011583", "0.49684516", "0.49613297", "0.49534512", "0.4928...
0.7200728
0
Returns the details of a single cluster.
def show_vsan_cluster(self, cluster_id): url = "clusters/%s" % str(cluster_id) resp, body = self.get(url) body = json.loads(body) self.expected_success(200, resp.status) return service_client.ResponseBody(resp, body['cluster'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detail_cluster(cluster_name, znode):\n\n _cluster_info = dict()\n _cluster_info.update(app.clusters[cluster_name].__dict__)\n _cluster_info.pop(\"auth_data\", None)\n _cluster_info[\"connection\"] = app.managers[cluster_name]._client.state\n resp = Response(json.dumps(_cluster_info),\n ...
[ "0.7864062", "0.78491837", "0.76307255", "0.7593881", "0.75145346", "0.7420813", "0.7218829", "0.7218829", "0.7210412", "0.7203655", "0.716203", "0.71513027", "0.71257395", "0.70250016", "0.6996984", "0.6995955", "0.69480765", "0.6918993", "0.6916563", "0.6915616", "0.6844419...
0.7324333
6
Updates the Specified Vsan Cluster.
def update_vsan_cluster(self, cluster_id, **kwargs): put_body = json.dumps({'cluster': kwargs}) resp, body = self.put('clusters/%s' % cluster_id, put_body) body = json.loads(body) self.expected_success(200, resp.status) return service_client.ResponseBody(resp, body['cluster'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_cluster(self, cluster, params, *args, **kwargs):\n raise NotImplementedError", "def update_cluster(\n self,\n cluster: Union[dto.Cluster, str],\n params: Mapping[str, Any]\n ) -> dto.Cluster:\n raise errors.UnsupportedOperationError(\n \"Operation not s...
[ "0.73922026", "0.668823", "0.6547908", "0.634682", "0.63165927", "0.6212357", "0.6080213", "0.6048803", "0.5943397", "0.59169775", "0.59169775", "0.59169775", "0.59169775", "0.59169775", "0.59169775", "0.58306557", "0.5827873", "0.57883453", "0.57450104", "0.55524766", "0.550...
0.7594836
0
Returns the primary type of resource this client works with.
def resource_type(self): return 'cluster'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"resource_type\")", "def ...
[ "0.7724917", "0.7724917", "0.7425268", "0.7425268", "0.7425268", "0.7425268", "0.7425268", "0.7357114", "0.7356769", "0.71772075", "0.7139699", "0.7116063", "0.70979494", "0.6642737", "0.6618203", "0.6551315", "0.64047694", "0.64029247", "0.63773763", "0.63615155", "0.635429"...
0.61646223
100
takes a positive integer 'm; and an arbitrary integer 'n' uses loop to add together the first m powers of n (from n0 up to and including n(m1)power) and returns the resulting sum
def add_powers(m, n): total = 0 for i in range(m): print(str(n) + ' ** ' + str(i) + ' = ' + str(n**i)) total += n**i return total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def summation( n, exponent ):\n result = 0\n num = 1\n while num < n + 1:\n result += num ** exponent\n num += 1\n return result", "def sum_n_m(n, m):\n total = 0\n for i in range(n, m+1):\n total += i\n return total", "def power(x, m, n):\n a = 1\n while m > 0:\...
[ "0.77180827", "0.76577747", "0.74535847", "0.74179584", "0.72653043", "0.7215351", "0.7007336", "0.6953904", "0.68829525", "0.67098176", "0.66785157", "0.66399765", "0.66026807", "0.6599922", "0.6587916", "0.6572057", "0.656736", "0.6502742", "0.65013236", "0.6498734", "0.648...
0.8448622
0
Return the vertices of the cube at position x, y, z with size 2n.
def cube_vertices(x, y, z, n): #def cube_vertices(self): # """ Return the vertices of the cube at position x, y, z with size 2*n. # # """ # return [ # x-n,y+n,z-n, x-n,y+n,z+n, x+n,y+n,z+n, x+n,y+n,z-n, # top # x-n,y-n,z-n, x+n,y-n,z-n, x+n,y-n,z+n, x-n,y-n,z+n, # bo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cube_vertices(x, y, z, n):\r\n return [\r\n x-n,y+n,z-n, x-n,y+n,z+n, x+n,y+n,z+n, x+n,y+n,z-n, # top\r\n x-n,y-n,z-n, x+n,y-n,z-n, x+n,y-n,z+n, x-n,y-n,z+n, # bottom\r\n x-n,y-n,z-n, x-n,y-n,z+n, x-n,y+n,z+n, x-n,y+n,z-n, # left\r\n x+n,y-n,z+n, x+n,y-n,z-n, x+n,y+n,z-n, x+n,...
[ "0.88732487", "0.8401479", "0.75485486", "0.71039677", "0.66020477", "0.64989316", "0.6416405", "0.64022386", "0.63984644", "0.6340318", "0.6241054", "0.62014246", "0.61978745", "0.6117573", "0.6094861", "0.60677755", "0.6065127", "0.60635835", "0.6009116", "0.597456", "0.591...
0.8348466
2
Return a list of the texture squares for the top, bottom and side.
def tex_coords(top, bottom, side): top = tex_coord(*top) bottom = tex_coord(*bottom) side = tex_coord(*side) result = [] result.extend(top) result.extend(bottom) result.extend(side * 4) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tex_coords(top, bottom, side):\r\n top = tex_coord(*top)\r\n bottom = tex_coord(*bottom)\r\n side = tex_coord(*side)\r\n result = []\r\n result.extend(top)\r\n result.extend(bottom)\r\n result.extend(side * 4)\r\n return result", "def tex_coords(top, bottom, n, e, s, w):\n top = te...
[ "0.70479023", "0.6369389", "0.6313693", "0.6257035", "0.6072368", "0.5949786", "0.5942786", "0.587891", "0.5869891", "0.5812689", "0.5797862", "0.5704141", "0.5604946", "0.5516466", "0.5511813", "0.5502264", "0.54999804", "0.5445988", "0.5434959", "0.54323965", "0.5428365", ...
0.7010188
1
The path to the documentation root in the project.
def full_doc_path(self, version='latest'): doc_base = self.checkout_path(version) for possible_path in ['docs', 'doc', 'Doc']: if os.path.exists(os.path.join(doc_base, '%s' % possible_path)): return os.path.join(doc_base, '%s' % possible_path) #No docs directory, docs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rst_path(self):\n return Path(self.dir_path, self.index_file + \".rst\").abspath", "def project_root() -> Path:\n return PROJECT_ROOT", "def get_sphinx():\n return path.join(TaskCreator.bin_dir, \"sphinx\")", "def root_path(self):\n return self._project.root_path", "def file_pat...
[ "0.73613554", "0.70323396", "0.69424725", "0.6887436", "0.6851283", "0.6805907", "0.6766234", "0.67643344", "0.67579764", "0.670476", "0.66780806", "0.66318774", "0.66300744", "0.6566805", "0.6541825", "0.65327567", "0.6527055", "0.6502812", "0.6487972", "0.647292", "0.646762...
0.7462274
0
Get the default version (slug). Returns self.default_version if the version with that slug actually exists (is built and published). Otherwise returns 'latest'.
def get_default_version(self): # latest is a special case where we don't have to check if it exists if self.default_version == 'latest': return self.default_version # check if the default_version exists version_qs = self.versions.filter( slug=self.default_version,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_version_number(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"default_version_number\")", "def current_version(self):\n try:\n return self.release_set.order_by('-created')[0].version\n except IndexError:\n return \"0.0.0\"", "def default_version(...
[ "0.6860693", "0.6517597", "0.6494637", "0.6483298", "0.64632803", "0.64546573", "0.64076316", "0.6406156", "0.6401131", "0.63940805", "0.6373419", "0.6336589", "0.63026994", "0.6292245", "0.6222101", "0.6204844", "0.6202343", "0.61928856", "0.61548525", "0.6100495", "0.609489...
0.8773976
0
Converts the name string to lower camelcase by using "" and "_" as markers.
def to_lower_camelcase(name): return re.sub(r'(?:\B_|\b\-)([a-zA-Z0-9])', lambda l: l.group(1).upper(), name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def camel2underscore(name):\n s1 = re.sub('(.)([A-Z][a-z]+)', r'\\1_\\2', name)\n return re.sub('([a-z0-9])([A-Z])', r'\\1_\\2', s1).lower()", "def camel_to_underscore(name):\n s1 = re.sub('(.)([A-Z][a-z]+)', r'\\1_\\2', name)\n return re.sub('([a-z0-9])([A-Z])', r'\\1_\\2', s1).lower()", "def _sna...
[ "0.80424976", "0.8040683", "0.79478073", "0.78524476", "0.7763709", "0.77439845", "0.773945", "0.7718065", "0.7695954", "0.7659709", "0.7649814", "0.76285833", "0.7595077", "0.75855196", "0.7585352", "0.7578679", "0.7525267", "0.7521072", "0.74934256", "0.7475441", "0.7468205...
0.80464154
0
nn.init.uniform_(self.in_proj_weight, 3, 3) nn.init.uniform_(self.in_proj_bias, 3, 3)
def main(args): dm = GridGaussian2D(args.modes_per_dim, args.batch_size, args.num_train) dm.setup() args.c, args.h, args.w = dm.size() model = SinusoidalFlowForGridGaussian2D(args) checkpoint_callback = ModelCheckpoint(monitor="val_loss") trainer = pl.Trainer.from_argparse_args(args, callbacks...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, input_dims, output_dims, extra_dims):\n super().__init__()\n self.input_dims = input_dims\n self.output_dims = output_dims\n self.extra_dims = extra_dims\n\n self.weight = nn.Parameter(torch.zeros(*extra_dims, output_dims, input_dims))\n self.bias = nn.P...
[ "0.6953745", "0.6864935", "0.68509305", "0.68509305", "0.68509305", "0.68349546", "0.6781325", "0.6720563", "0.659142", "0.6546701", "0.65405136", "0.6485081", "0.64838433", "0.6414585", "0.6408058", "0.64053327", "0.63800234", "0.63736457", "0.63721454", "0.6364787", "0.6354...
0.0
-1
Get the output shape of this bottleneck
def get_depth_out(self): self.depth_out = self.bottle_params[-1][0][-1] self.depth_middle = self.bottle_params[-2][0][-1] self.stride = self.bottle_params[-2][1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_output_shape(self):\n return self.shape", "def get_output_shape(self):\n return self.out.shape.as_list()", "def output_shape(self) ->torch.Size:\n return self._computed_output_shape()", "def get_output_shape(self):\n return self.output_shape", "def get_output_shape(self)...
[ "0.8109731", "0.81097245", "0.808182", "0.80454737", "0.80454737", "0.80454737", "0.80454737", "0.80454737", "0.7883347", "0.77379495", "0.77379495", "0.77216107", "0.76357347", "0.75928956", "0.7589028", "0.7589028", "0.7589028", "0.75842583", "0.75632435", "0.75494546", "0....
0.0
-1
Mock function to convert v1 dict to v2.
def _convert_v1_dict_to_v2_dict( cls, user_data_dict: MockModifiableUserDataDict ) -> MockModifiableUserDataDict: user_data_dict['schema_version'] = 2 user_data_dict['fake_field'] = 'default_value' return user_data_dict
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_dict_to_dict(self):\n @converters.wrap\n def inner_test(param: dict):\n \"\"\"Make sure the parameter was converted correctly.\"\"\"\n self.assertEqual(param, {'foo': 1, 'bar': ['bat', 2]})\n inner_test(param={'foo': 1, 'bar': ['bat', 2]})", "def test_from_to_j...
[ "0.61611176", "0.609632", "0.60897046", "0.6076754", "0.5955001", "0.5931326", "0.5914933", "0.58525103", "0.5837415", "0.58140814", "0.58095145", "0.57795775", "0.57750386", "0.57622397", "0.5736434", "0.57293653", "0.56653166", "0.56000835", "0.55932057", "0.5563916", "0.55...
0.62639713
0
Testing init method user id set None.
def test_initialization_with_none_user_id_is_successful(self) -> None: user_data_dict: user_domain.RawUserDataDict = { 'schema_version': 1, 'display_alias': 'display_alias', 'pin': '123', 'preferred_language_codes': ['preferred_language_codes'], 'prefe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_init(self):\n pass", "def test_init_default(self):\n self._test_init_default()", "def __init__(self, user_id):\n self.id = user_id", "def __init__(self):\n self.user = None", "def test_custom_init(engine, User):\n init_called = False\n\n def verify_no_args(*args, ...
[ "0.7346121", "0.71253896", "0.70819485", "0.6977564", "0.6880836", "0.68558574", "0.68435776", "0.6826758", "0.67853284", "0.6778359", "0.66994345", "0.6678426", "0.6674602", "0.6651625", "0.66491234", "0.6646697", "0.6617466", "0.66013056", "0.6581438", "0.6568582", "0.65628...
0.6786069
8
Testing init method with a valid user id set.
def test_initialization_with_valid_user_id_is_successful(self) -> None: user_data_dict: user_domain.RawUserDataDict = { 'schema_version': 1, 'display_alias': 'display_alias', 'pin': '123', 'preferred_language_codes': ['preferred_language_codes'], 'pref...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_initialization_with_none_user_id_is_successful(self) -> None:\n user_data_dict: user_domain.RawUserDataDict = {\n 'schema_version': 1,\n 'display_alias': 'display_alias',\n 'pin': '123',\n 'preferred_language_codes': ['preferred_language_codes'],\n ...
[ "0.7117076", "0.71122766", "0.7100365", "0.7072494", "0.7059123", "0.7008773", "0.6988497", "0.6901363", "0.6891721", "0.6860256", "0.68587273", "0.68398094", "0.6826475", "0.67721343", "0.67638195", "0.6741194", "0.67204165", "0.6665057", "0.6630358", "0.66227746", "0.66172"...
0.7196402
0
Return the distance between the Sun and the Earth at a specified time.
def _earth_distance(time='now'): return get_earth(time).radius
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_sun_earth_distance(doy):\n #The eccentricity of the Earth's orbit is currently about 0.0167 (wiki)\n ec=0.0167\n d=1+ec*np.sin(2*np.pi*(doy-93.5)/365)\n return d", "def get_earth(time='now'):\n earth = get_body_heliographic_stonyhurst('earth', time=time)\n\n # Explicitly set the l...
[ "0.6366886", "0.61674243", "0.6008998", "0.59616405", "0.5873041", "0.58699954", "0.5806936", "0.57237506", "0.57159907", "0.56768554", "0.5531404", "0.55176955", "0.5471926", "0.5456648", "0.5420103", "0.53831303", "0.53797495", "0.5370884", "0.53359276", "0.5268986", "0.525...
0.806182
0
Return the orientation angle for the Sun from a specified Earth location and time. The orientation angle is the angle between local zenith and solar north, measured eastward from local zenith.
def _orientation(location, time='now'): obstime = parse_time(time) # Define the frame where its Z axis is aligned with local zenith local_frame = AltAz(obstime=obstime, location=location) return _sun_north_angle_to_z(local_frame)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AngleFromSun(body, time):\n if body == Body.Earth:\n raise EarthNotAllowedError()\n sv = GeoVector(Body.Sun, time, True)\n bv = GeoVector(body, time, True)\n return AngleBetween(sv, bv)", "def era(self):\n # earth rotation angle using Universal Time\n J = self.MJD - 51544.5\n...
[ "0.72583175", "0.67612165", "0.673715", "0.6689378", "0.6545205", "0.63681996", "0.5933678", "0.5922034", "0.5870813", "0.5859787", "0.58522516", "0.5847926", "0.5821525", "0.5758101", "0.57252413", "0.57168233", "0.5699473", "0.56394637", "0.5633997", "0.5607879", "0.5558211...
0.75210774
0
gets all subcollection details of a given collection
def get_collections_details(self, collection, recurse=True): if type(collection) == str: collid = self.get_collection_id(collection) else: collid = collection col_list = [COL_NAME_COLL_COLLID, COL_NAME_COLL_NAME, COL_NAME_COLL_IS_ACTIVE, COL_NAME_COLL_PRID, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collection(self):\n return self.connection.smembers(self.collection_key)", "def get_collection_details_sqlite(self, collid):\n\n # print \"collid : >> \",collid\n child_colls = self.get_child_collections(str(collid))\n coll_ids = [str(each_child[COL_NAME_COLL_COLLID]) for each_chi...
[ "0.6696144", "0.6626496", "0.6606482", "0.6586113", "0.64748806", "0.64517385", "0.642987", "0.6396116", "0.6367949", "0.6306682", "0.6294549", "0.62940454", "0.6276326", "0.62640935", "0.6229501", "0.6222208", "0.62112576", "0.62068486", "0.61749244", "0.6170797", "0.6167649...
0.7673578
0
Get the subcollections of a collection.
def get_collections(self, collid, recurse=True): if recurse: records, _ = self.get_collection_tree(collid, incl_shared=True, col_list=[COL_NAME_COLL_COLLID]) # remove the first entry this function doesnt expect the entry of passed collid records = records[1:] if len(records) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_child_collections(self, collid, recurse=True):\n coll_list = []\n\n collid_queue = Queue()\n collid_queue.put(collid)\n while not collid_queue.empty():\n collid = collid_queue.get()\n # select all collections which have the current collection as parent\n ...
[ "0.65344167", "0.64547986", "0.64509404", "0.62945163", "0.62576836", "0.6179617", "0.6023174", "0.60123295", "0.59746975", "0.59261554", "0.582671", "0.58119714", "0.5811902", "0.5713016", "0.5707588", "0.5689579", "0.5687472", "0.56768304", "0.56313825", "0.5624587", "0.562...
0.66793525
0
Get the subcollections of a collection.
def get_child_collections(self, collid, recurse=True): coll_list = [] collid_queue = Queue() collid_queue.put(collid) while not collid_queue.empty(): collid = collid_queue.get() # select all collections which have the current collection as parent cond...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_collections(self, collid, recurse=True):\n if recurse:\n records, _ = self.get_collection_tree(collid, incl_shared=True, col_list=[COL_NAME_COLL_COLLID])\n # remove the first entry this function doesnt expect the entry of passed collid\n records = records[1:] if len(...
[ "0.6678789", "0.64540786", "0.64494866", "0.629362", "0.6256291", "0.6178797", "0.60246915", "0.6010582", "0.597395", "0.5926473", "0.582756", "0.58132786", "0.5812171", "0.5713582", "0.5707908", "0.56867176", "0.5686199", "0.56755143", "0.5633253", "0.5625894", "0.5619892", ...
0.6535223
1
Get hours for Part Configuration version.
def get_collection_hours_kilometer_for_part_config_version(self, collection_name, # pylint: disable=C0103,R0914 version_type): collection_id = self.get_collection_id(collection_name) rec, sql = self._build_collection_query(collection_id, T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hours(self):\n return self.config['hours']", "def hour(self) -> int:\n return pulumi.get(self, \"hour\")", "def hours(input=None):\n return get(input).hours", "def reservetime_hour(self):\n return self._get_time_info([\"Reserve_Time_H\", \"reserveTimeHour\"])", "def hour(self) -...
[ "0.76645833", "0.6479044", "0.63548124", "0.62065285", "0.6175688", "0.6175688", "0.6118379", "0.60949314", "0.6018003", "0.59785813", "0.5974134", "0.5974134", "0.5974134", "0.59359944", "0.5932781", "0.59300745", "0.58910936", "0.5870701", "0.5869615", "0.58458555", "0.5824...
0.56539375
30
Get collection Diving duration in Microsecond.
def get_collection_time(self, collection_name=None): record = {} cond = [] if collection_name is not None: typejoin = SQLJoinExpr(SQLTableExpr(TABLE_NAME_FILES), OP_INNER_JOIN, SQLTableExpr(TABLE_NAME_COLLMAP), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_duration(self):\n return self._duration", "def get_duration(self):\n return self.duration", "def duration(self) -> str:\n return pulumi.get(self, \"duration\")", "def duration(self) -> datetime.timedelta:\n return self._duration", "def Duration(self):\n\t\treturn self._g...
[ "0.7537427", "0.7511939", "0.74081707", "0.73063624", "0.7305988", "0.7299328", "0.7292389", "0.7289475", "0.7260454", "0.7230925", "0.7230925", "0.7230925", "0.7230925", "0.7230925", "0.7230925", "0.7230925", "0.7230925", "0.7219471", "0.72101784", "0.7164056", "0.7158383", ...
0.0
-1
Get a file state ID for a file state name
def get_file_state_id(self, fstate_name): cond = SQLBinaryExpr(SQLFuncExpr(self.db_func_map[DB_FUNC_NAME_LOWER], COL_NAME_FILESTATES_NAME), OP_EQ, SQLLiteral(fstate_name.lower())) entries = self.select_generic_data(select_list=[COL_NA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_file_state(self, filestate):\n if filestate is not None:\n fs_cond = SQLBinaryExpr(SQLFuncExpr(self.db_func_map[DB_FUNC_NAME_LOWER],\n COL_NAME_FILESTATES_NAME),\n OP_EQ, SQLLiteral(filestate[COL_NAME_FILEST...
[ "0.7130589", "0.7108055", "0.6695532", "0.6661157", "0.64640915", "0.6312", "0.62625", "0.6261872", "0.6166919", "0.61538064", "0.6139899", "0.60647774", "0.6063317", "0.6006399", "0.60057235", "0.5982923", "0.59676933", "0.58153784", "0.58124477", "0.57938623", "0.5784397", ...
0.8115442
0
set reflectivity of surface
def set_reflectivity(self, f_reflec=0, f_refl=0): self.F_REFLEC = f_reflec self.F_REFL = f_refl
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def invert_simple(forward, meas, geom):\n\n surface = forward.surface\n RT = forward.RT\n instrument = forward.instrument\n\n vswir_present = False\n if any(forward.surface.wl < 2600):\n vswir_present = True \n\n tir_present = False\n if any(forward.surface.wl > 2600):\n tir_pres...
[ "0.5862801", "0.58522415", "0.5844085", "0.5654412", "0.56449467", "0.5639725", "0.5534563", "0.5530976", "0.5527018", "0.5517155", "0.549539", "0.5493405", "0.5482795", "0.5452675", "0.543877", "0.5412309", "0.5406852", "0.5405907", "0.5397341", "0.53956336", "0.5384568", ...
0.5687755
3
Test if it is instance of Review
def test_instance_Review(self): self.assertIsInstance(self.review, Review)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_is_instance(self):\n self.assertTrue(isinstance(self.new_review, Review))", "def test_instance(self):\n self.assertIsInstance(self.new_review, Review)", "def test_review_type(self):\n r = Review()\n self.assertEqual(type(Review()), type(r))", "def test_instance_Review(sel...
[ "0.8429336", "0.80726635", "0.7861103", "0.7543513", "0.75267076", "0.700118", "0.68373865", "0.6769761", "0.64689875", "0.64026767", "0.6352267", "0.62557125", "0.6167708", "0.6083273", "0.6082082", "0.60448265", "0.6022782", "0.5971428", "0.59699214", "0.5948738", "0.593576...
0.84017175
1
Return the title of this Post's category. e.g. "New features".
def category_title(self): categories = {c[0]:c[1] for c in self.CATEGORY_CHOICES} if self.category in categories: return categories[self.category]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def category_name(self):\n return self.category.name", "def get_name(self):\n return self.category_name", "def get_category_name(self):\n return self._ctx.get(\"name\", self._ctx[\"id\"])", "def category_slug_to_name(self, slug):\n name = ''\n for k, v in Post.CATEGORY_CHOI...
[ "0.75929123", "0.75175077", "0.7265569", "0.7027844", "0.69307154", "0.6927067", "0.68573546", "0.68305093", "0.68279976", "0.6741304", "0.661411", "0.6613863", "0.65844035", "0.65844035", "0.6550465", "0.6536165", "0.6491928", "0.6458322", "0.64499867", "0.64499867", "0.6449...
0.8041641
0
Tokenize data file and turn into tokenids using given vocabulary file. This function loads data linebyline from data_path, calls the above sentence_to_token_ids, and saves the result to target_path. See comment for sentence_to_token_ids on the details of tokenids format.
def data_to_token_ids(self, input_path, target_path, train = True): # Set up the path path_target = os.path.join(self.data_dir, target_path) # Initialize list tokens_ids = [] tokens_length = [] labels = [] # Tokenize print("Tokenizing data in %s" % path_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_to_token_ids(data_path, target_path, vocabulary_path):\n if not gfile.Exists(target_path):\n print(\"Tokenizing data in %s\" % data_path)\n vocab, _ = initialize_vocabulary(vocabulary_path)\n with gfile.GFile(data_path, mode=\"rb\") as data_file:\n with gfile.GFile(targe...
[ "0.8815808", "0.8453279", "0.8449585", "0.8386317", "0.8366829", "0.82806164", "0.7365037", "0.72646236", "0.7234861", "0.7132155", "0.7091205", "0.70872253", "0.70872253", "0.70568377", "0.7037079", "0.69470847", "0.6747263", "0.6727588", "0.66464597", "0.6556729", "0.643578...
0.8102549
6
Return amount of budget left to operate on.
def budget_left(self): return max(0, self.budget_total - self.budget_spent_with_commission)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def budget_used(self):\n return int(self.total_spent() / self.budget() * 100.0)", "def remaining(self):\n if self.goal:\n return self.goal - self.total_donated()\n else:\n return 0", "def getCargoSpaceLeft(self):\n spaceused = self.cargo[\"wood\"] + self.cargo[...
[ "0.7247964", "0.6916042", "0.6625609", "0.65300584", "0.6501242", "0.6414003", "0.63940954", "0.6321323", "0.6320623", "0.6297888", "0.62641495", "0.6189215", "0.618677", "0.6177097", "0.61375535", "0.6127049", "0.61262167", "0.61081624", "0.6051834", "0.6046209", "0.60273975...
0.850252
0
Return list of all active strategies for given query set or all visible objects.
def running(cls, query_set=None): if query_set is None: query_set = cls.objects_visible.all() return filter(lambda s: s.state.is_running, query_set)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_active_strategies():\n response = houston.get(\"/zipline/trade\")\n\n houston.raise_for_status_with_json(response)\n return response.json()", "def get_queryset(self):\n\n user = get_authentication(self.request)\n queryset = Histories.objects.filter(user=user, is_used=True)\n\n ...
[ "0.60188633", "0.58960664", "0.5878958", "0.5878958", "0.57277346", "0.5722773", "0.5651946", "0.55887", "0.55172074", "0.5447837", "0.5430399", "0.542952", "0.54161626", "0.5393488", "0.53690994", "0.5352621", "0.5339682", "0.52994084", "0.5292256", "0.52896756", "0.5289432"...
0.0
-1
Get the row number of a given first column value, or none if not found
def get_rownumber(self, first_col_val): try: (col_name, col_contents) = self.data[0] col_data = [col_name] + col_contents return col_data.index(first_col_val) except ValueError: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_colnumber(self, header):\n for i in range(0, len(self.data)):\n if self.data[i][0] == header:\n return i\n return None", "def find_row(table, row):\n for idx in range(len(table)):\n if table[idx][0] == row:\n return idx\n return -1", "def ...
[ "0.7619834", "0.71089995", "0.7108466", "0.69579375", "0.6923789", "0.6852907", "0.6820593", "0.66791534", "0.6620368", "0.6442144", "0.639959", "0.63236535", "0.6311095", "0.6266861", "0.6266861", "0.62574804", "0.62408805", "0.62404037", "0.621285", "0.61872005", "0.6164421...
0.8280063
0
Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. For aggregation behavior with incremental intermediate results, see `scan()`.
def reduce_( accumulator: Accumulator[_TState, _T], seed: Union[_TState, Type[NotSet]] = NotSet ) -> Callable[[Observable[_T]], Observable[Any]]: if seed is not NotSet: seed_: _TState = cast(_TState, seed) scanner = ops.scan(accumulator, seed=seed_) return compose( scanner, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_accumulator():\n sum = []\n def accumulator(x):\n sum.append(x)\n total = 0\n for elem in sum:\n total += elem\n return total\n return accumulator", "def make_accumulator():\n pass # replace with your solution", "def reduce(function, iterable, initial...
[ "0.58516884", "0.583959", "0.57685834", "0.54558736", "0.54502994", "0.5439883", "0.5436501", "0.5391882", "0.5238366", "0.5238366", "0.52041197", "0.5199641", "0.51936895", "0.5056149", "0.4981647", "0.49368423", "0.49357632", "0.4913866", "0.49127808", "0.4883915", "0.48664...
0.7118347
0
Get a list of index values for Validation and Traning set from a dataset
def val_train_idxs(n, val_pct=0.2, seed=42): #def get_cv_idxs(n, cv_idx=0, val_pct=0.2, seed=42): np.random.seed(seed) n_val = int(val_pct*n) #idx_start = cv_idx*n_val idxs = np.random.permutation(n) # np.random.permutation has two differences from np.random.shuffle: # if passed an array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_idxvals(self):\n input_rows = list()\n input_cols = list()\n for key in self.index:\n input_rows.append(key[0])\n input_cols.append(key[1])\n\n return list(OrderedSet(input_rows)), list(OrderedSet(input_cols))", "def get_indexes(self, dataset):\n\n ...
[ "0.71831566", "0.68913275", "0.6812306", "0.6763731", "0.67208904", "0.6601021", "0.6547668", "0.6500294", "0.6446978", "0.638615", "0.63846767", "0.6337698", "0.6286675", "0.6274153", "0.6248945", "0.6214698", "0.62135684", "0.6183581", "0.6124768", "0.61200136", "0.60764617...
0.0
-1
Updates the properties of a tag. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Retur...
def update(self, tag, params={}, **options): path = "/tags/%s" % (tag) return self.client.put(path, params, **options)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_tag(self, tag):\n resp = self.put(_u.build_uri(\"tag\", domain=self.domain),\n data={'tag': tag})\n return utils.handle_response(resp)", "def update(self, name=None, tag=None):\n\n\t\tjson_hash = {}\n\t\tif name != None:\n\t\t\tjson_hash['name'] = name\n\t\tif tag ...
[ "0.6135743", "0.609891", "0.5859725", "0.5617817", "0.5574436", "0.5555736", "0.5517233", "0.5472782", "0.54512256", "0.54241633", "0.53814477", "0.53729224", "0.53291374", "0.53140604", "0.5307712", "0.52932525", "0.52650976", "0.52629906", "0.52607507", "0.5231832", "0.5215...
0.6463043
0
Get FC layer by layer number.
def get_fc(self, layer): return getattr(self, 'attention_{}'.format(layer))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetLayer(self,layer):\n\t\tif isinstance(layer,str):\n\t\t\tindex=self.LayerNames.index(layer)\n\t\telif isinstance(layer,int):\n\t\t\tindex=layer\n\t\telse:\n\t\t\traise PycomError('Type of layer in GetLayer() is wrong')\n\t\treturn self.acad.ActiveDocument.Layers.Item(index)", "def get_layer(self, i):\n ...
[ "0.7556093", "0.73877394", "0.7298582", "0.7002362", "0.6957507", "0.69348013", "0.6871215", "0.6770635", "0.6679853", "0.66462094", "0.66361475", "0.65853864", "0.65206087", "0.65053505", "0.6500792", "0.6477682", "0.64108044", "0.6381011", "0.6359749", "0.6357577", "0.62723...
0.6040993
31
Initialise parameters for all layers.
def reset_parameters(self): init_method = getattr(init, self.initialization) for layer in range(self.num_layers): fc = self.get_fc(layer) init_method(fc.weight.data) if self.use_bias: init.constant(fc.bias.data, val=0) init_method(self.out.weig...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_parameters(self):\n # Create the weights and biases\n for i in range(1, len(self.layer_dimensions)):\n # Initialization from He et al.\n mu = 0\n var = 2 / self.layer_dimensions[i]\n sigma = np.sqrt(var)\n weight_shape = (self.layer_dime...
[ "0.78280926", "0.7719127", "0.7592488", "0.7556087", "0.7415395", "0.74049854", "0.73919576", "0.7369997", "0.73693585", "0.73151153", "0.7291972", "0.727757", "0.72004443", "0.7193827", "0.7133063", "0.70881456", "0.7085572", "0.70498", "0.70415986", "0.70038676", "0.7002061...
0.74076843
5
Determina o momento fletor resistente nominal para perfis tubo circulares.
def _Mn_Tubo(perfil, data=False): Mrd_dados = namedtuple("Mrd_dados", "Mn elp elr") elp = 0.07 * perfil.mat.E / perfil.mat.fy elr = 0.31 * perfil.mat.E / perfil.mat.fy if perfil.esb <= elp: Mn = perfil.Mplx return Mn if not data else (Mn, Mrd_dados(Mn, elp, elr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def specificity(self):\n return self.tn / (self.tn + self.fp) if self.tn + self.fp > 0 else .0", "def MFE_rel(self):\n try:\n return(self.MFE / self.price_open)\n except:\n return", "def ramfinc(self):\n return 0", "def specificity(self):\n result = 0\...
[ "0.61954063", "0.6065448", "0.6037932", "0.5950593", "0.5949681", "0.5949259", "0.58371186", "0.5794099", "0.56412834", "0.56332254", "0.5606755", "0.5591927", "0.5583873", "0.55628544", "0.5562344", "0.5554408", "0.55153733", "0.5509942", "0.54903543", "0.54781294", "0.54744...
0.0
-1
Test Controller object initialization
def test_initialization(self, create_controller: Controller) -> None: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, controller):\n self._controller = controller", "def prepareController(self):\n pass", "def setUp(self):\n self.app = init_api()", "def create_controller() -> Controller:\n _controller = Controller()\n return _controller", "def setUp(self):\n self.theView =...
[ "0.76382816", "0.7316197", "0.7148227", "0.71281147", "0.70368886", "0.70328915", "0.7025612", "0.69886863", "0.69886863", "0.693163", "0.69211745", "0.69116", "0.6829956", "0.6814448", "0.6810143", "0.6791103", "0.67686445", "0.6767353", "0.67645466", "0.6753105", "0.6753105...
0.83312243
0
Fill empty posX and posY with random delta from parent's posX and posY.
def fill_coords(tree): # Find pops without x or y empty_pops = tree[(tree['posX'] == '') | (tree['posY'] == '')] # Find pops without x or y, that have parent with x and y not_empty_parent = empty_pops[(~empty_pops['Parent'].isin(empty_pops.index)) & (empty_pops['Parent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_pos(self):\n self.rect.y = random.randrange(-1000, -10)\n self.rect.x = random.randrange(0, WIDTH)", "def reset_pos(self):\r\n self.rect.x = random.randrange(50, 640)\r\n self.rect.y = random.randrange(-300, -80)", "def reset_pos(self):\n self.rect.y = random.randra...
[ "0.73340017", "0.7134516", "0.7103541", "0.6732176", "0.6490961", "0.6468564", "0.6401365", "0.62917775", "0.6289951", "0.6278224", "0.6276646", "0.62731767", "0.617999", "0.61546963", "0.61394554", "0.6121133", "0.60702324", "0.6055425", "0.60066617", "0.59932166", "0.599133...
0.6937389
3
Residual Bottleneck. A residual bottleneck block as described in MSRA's Deep Residual Network paper. Full preactivation architecture is used here.
def residual_bottleneck(incoming, nb_blocks, bottleneck_size, out_channels, downsample=False, downsample_strides=2, activation='relu', batch_norm=True, bias=True, weights_init='variance_scaling', bias_init='zeros', regulariz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _bottleneck_residual_v2(self, x, in_filter, out_filter, stride, activate_before_residual=False):\n\n with tf.name_scope(\"bottle_residual_v2\") as name_scope:\n if activate_before_residual:\n x = self._batch_norm(x)\n x = self._relu(x)\n orig_x = x...
[ "0.66893697", "0.65498596", "0.641462", "0.6362708", "0.6310921", "0.62906426", "0.6168682", "0.6168242", "0.6122524", "0.6094196", "0.60893327", "0.60830563", "0.6071882", "0.60428053", "0.60173064", "0.6010406", "0.59855473", "0.5975837", "0.5968477", "0.59017867", "0.58902...
0.68570954
0
Is the user a member of staff?
def is_staff(self): return self.is_admin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def is_staff(ctx):\n member = ctx.message.author\n vipRole = discord.utils.get(member.guild.roles, name=ROLE_VIP)\n staffRole = discord.utils.get(member.guild.roles, name=ROLE_STAFF)\n return vipRole in member.roles or staffRole in member.roles", "def is_staff(self):\n # Simplest possibl...
[ "0.80926746", "0.794206", "0.794206", "0.794206", "0.7837715", "0.77254343", "0.7695358", "0.75437886", "0.75398374", "0.74684024", "0.7419359", "0.74095607", "0.7408753", "0.74056166", "0.71173227", "0.7050053", "0.7050053", "0.7017228", "0.6948149", "0.687611", "0.6858756",...
0.76053584
7
Return equation for right assignment.
def equation(self, x): if self.type is "2pi": return np.sin(2 * math.pi * x) elif self.type is "5pi": return np.sin(5 * math.pi * x) elif self.type is "5pi_constrained_domain": if x > 1/5 and x < 2/5: return np.sin(5 * math.pi * x) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def operator_rhs(self, inp):\n assert self.operator is not None, \\\n \"Please set an operator with the set_operation method\"\n\n return self.operator.adjoint(inp)", "def right(self) -> Optional[\"ExpressionNode\"]:\n return self.__right", "def sqrtx():\n return Operator([[(...
[ "0.6307654", "0.6255525", "0.6202239", "0.6153378", "0.59350026", "0.59211993", "0.58812124", "0.5870871", "0.5870823", "0.58266944", "0.58058983", "0.57931226", "0.57931226", "0.5792182", "0.5779122", "0.5762174", "0.575999", "0.575999", "0.575999", "0.572472", "0.5713042", ...
0.0
-1
Generate a random string of fixed length
def randomString(stringLength=10): letters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!" return ''.join(random.choice(letters) for i in range(stringLength))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_random_string(length: int):\n\tall_chars = string.ascii_letters + string.digits\n\treturn ''.join(random.choices(all_chars, k=length))", "def generate_random_string(length=6):\n n = int(length / 2 + 1)\n x = binascii.hexlify(os.urandom(n))\n s = x[:length]\n return s.decode(\"utf-8\")",...
[ "0.8680464", "0.8573714", "0.85486245", "0.85297275", "0.85209286", "0.84331024", "0.8432044", "0.84157014", "0.84120053", "0.8389201", "0.8345882", "0.8343962", "0.83406156", "0.83348686", "0.83240855", "0.82986933", "0.82911193", "0.8281826", "0.82818025", "0.82811046", "0....
0.0
-1
return a beautifullyformatted string representation of the BSOption object
def __repr__(self): s = "s = $%.2f, x = $%.2f, t = %.2f (years), sigma = %.3f, rf = %.3f" %(self.s, self.x, self.t, self.sigma, self.rf) return s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n s = \"BSEuroPutOption, value = $%.2f, \\n\" %(self.value())\n s += \"parameters = (s = $%.2f, x = $%.2f, t = %.2f (years), sigma = %.3f, rf = %.3f) \" %(self.s, self.x, self.t, self.sigma, self.rf)\n return s", "def __repr__(self):\r\n s = 'BSEuroCallOption, valu...
[ "0.7743245", "0.75771457", "0.72048223", "0.7101452", "0.68182653", "0.6670102", "0.65069366", "0.64754325", "0.6427255", "0.64237434", "0.6395972", "0.63748646", "0.63716", "0.6344937", "0.6344937", "0.6344937", "0.6344937", "0.6344937", "0.6344937", "0.6344937", "0.6344937"...
0.0
-1
return a beautifullyformatted string representation of the BSEuroCallOption object
def __repr__(self): s = "BSEuroCallOption, value = $%.2f, \n" %(self.value()) s += "parameters = (s = $%.2f, x = $%.2f, t = %.2f (years), sigma = %.3f, rf = %.3f) " %(self.s, self.x, self.t, self.sigma, self.rf) return s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\r\n s = 'BSEuroCallOption, value = $%.2f, \\n' % self.value()\r\n s += 'parameters = (' + BSOption.__repr__(self) + ')'\r\n \r\n return s", "def __repr__(self):\n s = \"BSEuroPutOption, value = $%.2f, \\n\" %(self.value())\n s += \"parameters = (s = $...
[ "0.8103313", "0.7219241", "0.6728212", "0.6698999", "0.646376", "0.63628453", "0.62792015", "0.6268253", "0.6214927", "0.61952573", "0.61423326", "0.61409223", "0.6097723", "0.6097723", "0.6097723", "0.6097723", "0.6097723", "0.6097723", "0.6097723", "0.6097723", "0.6097723",...
0.7956999
1
return a beautifullyformatted string representation of the BSEuroPutOption object
def __repr__(self): s = "BSEuroPutOption, value = $%.2f, \n" %(self.value()) s += "parameters = (s = $%.2f, x = $%.2f, t = %.2f (years), sigma = %.3f, rf = %.3f) " %(self.s, self.x, self.t, self.sigma, self.rf) return s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\r\n s = 'BSEuroCallOption, value = $%.2f, \\n' % self.value()\r\n s += 'parameters = (' + BSOption.__repr__(self) + ')'\r\n \r\n return s", "def __repr__(self) -> str:\n return repr(self._options)", "def __str__(self):\n\n\t\ttmp = dict(\n\t\t\t(key, value...
[ "0.67996633", "0.65343654", "0.6383555", "0.6373018", "0.6317739", "0.617781", "0.6105558", "0.60750437", "0.59459114", "0.591236", "0.58799475", "0.5771792", "0.5771792", "0.5771792", "0.5771792", "0.5771792", "0.5771792", "0.5771792", "0.5771792", "0.5771792", "0.5771792", ...
0.78524536
0
Utility function to clean tweet text by removing links, special characters using simple regex statements.
def clean_tweet(self, tweet): return ' '.join(re.sub(self.pattern, " ", tweet).split())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_tweet(tweet):\n\n pattern = r'http\\S+|pic.\\S+|@[a-zA-Z0-9_]+|#[a-zA-Z0-9_]+|[‘’“”’–—…]|\\xa0'\n return re.sub(pattern, '', tweet)", "def tweet_cleaner(text, unescape=True, remove_html_tags=True, accented_chars=True,\r\n contractions=True, special_chars=True, expand_hash=True, r...
[ "0.8035162", "0.8011612", "0.7933544", "0.79298425", "0.7880287", "0.7745769", "0.7718409", "0.7683514", "0.7630937", "0.7559695", "0.7559695", "0.7540147", "0.75358033", "0.75032693", "0.7438139", "0.7409144", "0.73817146", "0.73814404", "0.73638856", "0.7320942", "0.731223"...
0.6806868
56
Determines whether or not the system is currently signed in
async def check_account(self) -> tuple: results = await self._api.call('system', 'check_account') username = results.header.vars.get('un') result = results.header.vars.get('signed_out') if not result: result = results.header.vars.get('signed_in') return AccountStatu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def signed_in(self):\n return self.__signed_in", "def logged_in():\n\n if current_user.is_authenticated:\n return True\n\n return False", "def logged_in(self) -> bool:\n return self._logged_in", "def is_logged_in(self):\n return self.__is_logged_in", "def logged_in(self):\...
[ "0.7043852", "0.70286995", "0.69998235", "0.696613", "0.6955103", "0.68733066", "0.67904407", "0.67811203", "0.675025", "0.67237157", "0.6703526", "0.6692606", "0.66268814", "0.65579504", "0.65390015", "0.65390015", "0.65390015", "0.65390015", "0.65390015", "0.65390015", "0.6...
0.0
-1
Loads graph and retrieves needed tensors.
def get_graph_and_tensors(self, graph_file_path): detection_graph = self.load_graph(graph_file_path) # detection_graph = load_graph(RFCN_GRAPH_FILE) # detection_graph = load_graph(FASTER_RCNN_GRAPH_FILE) # The input placeholder for the image. # `get_tensor_by_name` returns the T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tensors(loaded_graph):\n with loaded_graph.as_default():\n input_tensor = loaded_graph.get_tensor_by_name(\"input:0\")\n initial_state_tensor = loaded_graph.get_tensor_by_name(\"initial_state:0\")\n final_state_tensor = loaded_graph.get_tensor_by_name(\"final_state:0\")\n pro...
[ "0.6858991", "0.68288416", "0.67769486", "0.67503434", "0.67428714", "0.6577563", "0.6464451", "0.64502686", "0.6421276", "0.6367673", "0.63434", "0.6317668", "0.6294333", "0.62802464", "0.62794447", "0.62794447", "0.6226663", "0.61979306", "0.616802", "0.6157632", "0.612109"...
0.6472334
6
Gets the log entry search results record corresponding to the given log entry search record ``Type``. This method is used to retrieve an object implementing the requested record.
def get_log_entry_search_results_record(self, log_entry_search_record_type): raise errors.Unimplemented()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_log_entry_search_record(self, log_entry_search_record_type):\n raise errors.Unimplemented()", "def get_log_search_record(self, log_search_record_type):\n raise errors.Unimplemented()", "def get_log_search_results_record(self, log_search_record_type):\n raise errors.Unimplemented()"...
[ "0.7800026", "0.75252414", "0.74896276", "0.6703674", "0.6414986", "0.6388541", "0.6359149", "0.63128084", "0.6285656", "0.5988772", "0.5863349", "0.575845", "0.57430834", "0.57041097", "0.5673157", "0.5650069", "0.5519167", "0.5493297", "0.54717463", "0.5395327", "0.53282875...
0.7748229
1
Gets the log search results record corresponding to the given log search record Type. This method is used to retrieve an object implementing the requested record.
def get_log_search_results_record(self, log_search_record_type): raise errors.Unimplemented()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_log_search_record(self, log_search_record_type):\n raise errors.Unimplemented()", "def get_log_entry_search_record(self, log_entry_search_record_type):\n raise errors.Unimplemented()", "def get_log_entry_search_results_record(self, log_entry_search_record_type):\n raise errors.Unim...
[ "0.81211275", "0.7950507", "0.7860889", "0.71315265", "0.6866329", "0.6773024", "0.6758568", "0.6707544", "0.66155493", "0.62025094", "0.61652654", "0.6136641", "0.6074951", "0.5993279", "0.5933346", "0.59170735", "0.585351", "0.5717679", "0.5708172", "0.5639756", "0.56089306...
0.8010156
1
Method to add an edge to a list of edges.
def add_edge(self,source,target,weight): # Check if source exists already if source not in self.nodes.keys(): self.add_node(source) if target not in self.nodes.keys(): self.add_node(target) # Add target to adjacent nodes of source # If gr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addEdgeList(self, edges):\n for e in edges:\n self.addEdge(e[0], e[1], e[2] if len(e) > 2 else None)", "def addEdges(self, edges):\n for edge in edges:\n self.addEdge(edge[0], edge[1], edge[2])", "def addEdge(self, edge: Edge):\n self.edges.append(edge)", "def add_edge(se...
[ "0.8195377", "0.81184", "0.7744713", "0.77296627", "0.7702725", "0.7691168", "0.7534477", "0.7518092", "0.747526", "0.7455602", "0.74454784", "0.7442835", "0.7419788", "0.74111", "0.7379699", "0.7362482", "0.7346307", "0.7338087", "0.7300157", "0.72969157", "0.7292955", "0....
0.0
-1
image_path = image file path function takes in image path, converts to grayscale, and reshapes to 4 dimensional array size to be compatible with ConvNet Model
def shape_new_img(image_path): desired_size = 64 img = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE) new_img_array = cv2.resize(img, (desired_size, desired_size)) finalarray = new_img_array.reshape(1, desired_size, desired_size, 1) return finalarray
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_path(file_path: str):\r\n img = tf.io.read_file(file_path)\r\n img = tf.image.decode_jpeg(img, channels=3)\r\n img = tf.image.resize(img, [IMG_SIZE, IMG_SIZE])\r\n return tf.keras.applications.efficientnet.preprocess_input(img) # Shape: IMG_SIZE x IMG_SIZE x 3\r", "def process_image(self...
[ "0.7006954", "0.68647027", "0.6855115", "0.6789352", "0.6674119", "0.6666364", "0.6618557", "0.658041", "0.6517354", "0.65127414", "0.6487288", "0.64737403", "0.63864326", "0.63765633", "0.6343497", "0.6330149", "0.6300574", "0.6293332", "0.6265311", "0.6248779", "0.62451404"...
0.70797133
0
Load data from tsv into pd.DataFrame
def load_data(args) -> pd.DataFrame: df = pd.read_csv(os.path.join(args.data_dir, args.training_file), delimiter="\t").sample(frac=1, random_state=args.random_seed).reset_index(drop=True) df_test = pd.read_csv(os.path.join(args.data_dir, args.testing_file), delimiter="\t") # startified validation split ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_tsv(path):\n return pd.read_csv(path, sep=\"\\t\", index_col=0)", "def load_tsv(path: str, ncols: int, nonames: bool) -> DataFrame:\n cols = range(ncols) if ncols else None\n return pandas.read_csv(path, usecols=cols, sep='\\t', skipinitialspace=True, header='infer' if not nonames else None)", ...
[ "0.78046244", "0.7410663", "0.7138533", "0.68172055", "0.64366436", "0.63336325", "0.6275371", "0.6241359", "0.6222522", "0.61639935", "0.612264", "0.60965455", "0.60479474", "0.6047263", "0.6036417", "0.6026018", "0.6002982", "0.5983488", "0.5973418", "0.5964774", "0.5951788...
0.0
-1
Get a learning rate that decays stepwise as training progresses.
def learning_rate_with_decay(batch_size, batch_denom, num_images, boundary_epochs, decay_rates, base_lr=0.1, warmup=False): # from tf resnet official github initial_learning_rate = base_lr * batch_size / batch_denom batches_per_epoch = num_images / batch_size # Reduce the learning rate at certain epoch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learning_rate(epoch):\n self.lr = self.lr / 1.00000001\n return self.lr", "def learning_rate_fn():\n start_learning_rate = FLAGS.start_learning_rate\n step = tf.cast(tf.compat.v1.train.get_or_create_global_step(), 'float32')\n effective_step = tf.maximum(step - FLAGS.lr_decay_after_n...
[ "0.8128895", "0.78866446", "0.7876738", "0.77746284", "0.77453184", "0.77453184", "0.7711134", "0.76865244", "0.7617824", "0.7579239", "0.7470724", "0.74477094", "0.7443731", "0.7280691", "0.7254231", "0.72265", "0.7192223", "0.71229", "0.7078642", "0.70588124", "0.7054449", ...
0.0
-1
Builds scaled learning rate function with 5 epoch warm up.
def learning_rate_fn(global_step): lr = tf.train.piecewise_constant( global_step, boundaries, vals) if warmup: warmup_steps = int(batches_per_epoch * 5) warmup_lr = ( initial_learning_rate * tf.cast(global_step, tf.float32) / tf.cast( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _learning_rate_scheduler(max_learning_rate, \n iteration, nb_iterations, nb_warmup_iterations, nb_warmdown_iterations, \n beta2):\n warmup_scaling = lax.max(0.5 * iteration * (1. - beta2), iteration / nb_warmup_iterations)\n warmdown_scaling = (nb_i...
[ "0.6652651", "0.6640007", "0.65168667", "0.64492327", "0.64394706", "0.64066523", "0.6369404", "0.63479376", "0.6344017", "0.6299851", "0.6284512", "0.6271523", "0.6269279", "0.6267349", "0.62576824", "0.62540346", "0.62536865", "0.62487924", "0.6216805", "0.62122124", "0.620...
0.63720345
6
Create a SlowFeatureAnalysis object.
def __init__(self, n_components=None): self.n_components = n_components
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_tslearn_object(self):\n cls = self._get_tslearn_class()\n params = self.get_params()\n params[\"init\"] = params.pop(\"init_algorithm\")\n return cls(**params)", "def create_frequency_feature(temp_df):\n start = time.time()\n cat_dfs = []\n for num in np.arange(1080,...
[ "0.54061645", "0.54002494", "0.53812104", "0.51532626", "0.5152798", "0.50984865", "0.50944054", "0.5050299", "0.4921879", "0.4908696", "0.48946932", "0.48732516", "0.48634565", "0.48622078", "0.48337173", "0.48334008", "0.48292178", "0.47903806", "0.47902977", "0.47701812", ...
0.0
-1
Based on the ``full_resource``, returns either the endpoint or the data from ``full_dehydrate`` for the related resource. Allows the definition to be overridden by a parameter such as dehydrate__nid={True/False}
def dehydrate_related(self, bundle, related_resource, for_list=True): dehydrate_flag_name = "dehydrate__" + self.instance_name should_dehydrate_full_resource = self.should_full_dehydrate(bundle, for_list=for_list) dehydrate_flag_value = bundle.request.GET.get(dehydrate_flag_name, should_dehydrate_full_re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_dehydrate(self, bundle):\n # Dehydrate each field.\n if bundle.obj.obj_type() == 'image':\n obj = ImageResource()\n elif bundle.obj.obj_type() == 'wordbox':\n obj = WordBoxResource()\n else:\n return bundle\n for field_name, field_object ...
[ "0.6515429", "0.64911383", "0.6032073", "0.577838", "0.5590608", "0.556181", "0.5530803", "0.5398338", "0.5395973", "0.53648543", "0.5280198", "0.5276614", "0.52290785", "0.5225174", "0.51913124", "0.51830983", "0.5164275", "0.5134605", "0.5134455", "0.5118333", "0.5115894", ...
0.6897338
0
Does a GET request to /v1/users/{user_id}/receipt/{receipt_id}.
def user_scans_get_receipt_status(self, user_id, receipt_id): # The base uri for api requests query_builder = Configuration.BASE_URI # Prepare query string for API call query_builder += "/v1/users/{user_id}/rec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_receipt(receipt_data, user=None):\n #data = json.dumps({'receipt-data': '{' + receipt_data + '}'})\n data = '{{\\n \"receipt-data\" : \"{}\" \\n}}'.format(receipt_data)\n\n def verify(url):\n tries = 3\n for try_ in range(1, tries + 1):\n try:\n req = url...
[ "0.68066186", "0.6387672", "0.6284188", "0.61212146", "0.5988545", "0.5898742", "0.5813419", "0.5780921", "0.57744616", "0.56520975", "0.5650638", "0.5630443", "0.56287456", "0.55839515", "0.54975605", "0.5484529", "0.53299963", "0.53253794", "0.53048515", "0.5275331", "0.519...
0.7162202
0
DNS domain name for a CloudFront distribution, S3 bucket, ELB, or another resource record set in this hosted zone.
def name(self) -> str: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bucket_domain_name(self) -> str:\n ...", "def bucket_domain_name(self) -> str:\n return jsii.get(self, \"bucketDomainName\")", "def bucket_domain_name(self) -> str:\n return jsii.get(self, \"bucketDomainName\")", "def bucket_dual_stack_domain_name(self) -> str:\n ...", "def ...
[ "0.7415638", "0.71727854", "0.71727854", "0.7060527", "0.70107794", "0.6906877", "0.68897825", "0.68570477", "0.68403655", "0.6685451", "0.6685451", "0.6646775", "0.65964824", "0.6536509", "0.6495623", "0.64910007", "0.64910007", "0.64763945", "0.64763945", "0.6438862", "0.64...
0.0
-1
The CIDR collection ID. See the `aws_route53_cidr_collection` resource for more details.
def collection_id(self) -> str: return pulumi.get(self, "collection_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_collId(self):\n return self.metadata['collectionId']", "def collection_key(self):\n return '%s:collection' % self._model._name", "def transit_router_cidr_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"transit_router_cidr_id\")", "def cidr(self):\n return self....
[ "0.69164056", "0.6209105", "0.61208117", "0.6120586", "0.600459", "0.5943803", "0.5943803", "0.5932236", "0.5932236", "0.59077096", "0.58894444", "0.5877531", "0.58730584", "0.584807", "0.57606053", "0.57472897", "0.57376856", "0.57376856", "0.56912446", "0.56606346", "0.5588...
0.7799479
0
The CIDR collection location name. See the `aws_route53_cidr_location` resource for more details. A `location_name` with an asterisk `""` can be used to create a default CIDR record. `collection_id` is still required for default record.
def location_name(self) -> str: return pulumi.get(self, "location_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collection_id(self) -> str:\n return pulumi.get(self, \"collection_id\")", "def zonal_url(self, zone, collection, name):\n return ''.join([COMPUTE_URL_BASE, 'projects/', PROJECT, '/zones/', zone, '/', collection, '/', name])", "def __init__(self, location, name=\"Collection_zone\", collection...
[ "0.6375379", "0.584592", "0.5788412", "0.57248443", "0.56063217", "0.5539195", "0.5500633", "0.5491932", "0.5449323", "0.5386484", "0.53330386", "0.532101", "0.53041977", "0.5220706", "0.51955473", "0.5187406", "0.5162848", "0.514683", "0.514683", "0.514683", "0.51208603", ...
0.58752483
1
The ID of the subnet that contains the IP address.
def subnet_id(self) -> str: return pulumi.get(self, "subnet_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnet_id(self):\n return self._subnet_id", "def subnet_id(self) -> Optional[str]:\n return pulumi.get(self, \"subnet_id\")", "def subnet_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"subnet_id\")", "def subnet_id(self) -> Optional[pulumi.Input[str]]:\n ...
[ "0.8751081", "0.854746", "0.8446626", "0.8446626", "0.7794184", "0.7731338", "0.76925236", "0.76925236", "0.7578934", "0.75403637", "0.74096775", "0.72043544", "0.7122214", "0.69050956", "0.6847033", "0.680663", "0.6753703", "0.6722486", "0.6688712", "0.6664191", "0.6585422",...
0.89790934
0
ID of the VPC to associate.
def vpc_id(self) -> str: return pulumi.get(self, "vpc_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpc_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> pulumi.Output[str]:\n ...
[ "0.7364716", "0.7364716", "0.7364716", "0.7364716", "0.7364716", "0.7364716", "0.7364716", "0.7364716", "0.7364716", "0.73573804", "0.7354241", "0.7329777", "0.7329777", "0.7329777", "0.7329777", "0.7329777", "0.7329777", "0.7215045", "0.71685207", "0.7160258", "0.7160258", ...
0.7837848
2
Region of the VPC to associate. Defaults to AWS provider region.
def vpc_region(self) -> Optional[str]: return pulumi.get(self, "vpc_region")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpc_region(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"vpc_region\")", "def vpc_region(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"vpc_region\")", "def vpc_region(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vpc_region\")", "def...
[ "0.8128017", "0.8128017", "0.8027361", "0.7484042", "0.7484042", "0.7484042", "0.7484042", "0.7484042", "0.7484042", "0.73833513", "0.7356189", "0.7356189", "0.7356189", "0.7356189", "0.7272525", "0.72284573", "0.6993725", "0.6984235", "0.6984235", "0.6982844", "0.6982844", ...
0.8280792
0
The DNS record's type.
def block_override_dns_type(self) -> str: return pulumi.get(self, "block_override_dns_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _type_str(self):\n try:\n record_name = RECORD_TYPES[self.type]\n return '{0} record'.format(record_name)\n except KeyError:\n return '{0} type 0x{1:04x}'.format(self.__class__.__name__,\n self.type)", "def get_recor...
[ "0.74381524", "0.6981035", "0.69483405", "0.6909859", "0.68910503", "0.6877887", "0.6877388", "0.68566734", "0.68566734", "0.68566734", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151", "0.6837151...
0.0
-1
The date and time that the rule was created, in Unix time format and Coordinated Universal Time (UTC).
def creation_time(self) -> str: return pulumi.get(self, "creation_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_time(self):\n return self._create_time", "def create_time(self):\n return self._create_time", "def create_time(self):\n return self._create_time", "def create_time(self) -> str:\n return pulumi.get(self, \"create_time\")", "def create_time(self) -> str:\n retur...
[ "0.7305326", "0.7305326", "0.7305326", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "0.7191993", "...
0.71273243
24
The unique identifier of the firewall rule group that you want to retrieve the rules for.
def firewall_rule_group_id(self) -> str: return pulumi.get(self, "firewall_rule_group_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rule_id(self) -> str:\n return pulumi.get(self, \"rule_id\")", "def getId(self):\n return _libsbml.Rule_getId(self)", "def config_rule_id(self) -> str:\n return pulumi.get(self, \"config_rule_id\")", "def config_rule_id(self) -> str:\n return pulumi.get(self, \"config_rule_id\...
[ "0.70000225", "0.6697719", "0.66535205", "0.66535205", "0.66535205", "0.66535205", "0.65004975", "0.6484073", "0.6346916", "0.6346916", "0.6328577", "0.63198227", "0.6297455", "0.62891287", "0.6280814", "0.62754023", "0.6244069", "0.6244069", "0.62372446", "0.6214773", "0.621...
0.87333816
0
Indicates whether this set of values represents the default location.
def is_default(self) -> Optional[bool]: return pulumi.get(self, "is_default")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isDefault (self):\n val = self.__getattribute__('StoredValue')\n dft = self.__class__.StoredValue\n return val==dft", "def default(self) -> bool:\n return pulumi.get(self, \"default\")", "def isDefault(self) -> bool:\n ...", "def isDefault(self) -> bool:\n ...", ...
[ "0.69103557", "0.6841762", "0.6840747", "0.6840747", "0.6840747", "0.6763688", "0.6746591", "0.67380065", "0.6710062", "0.67041415", "0.66766477", "0.6664548", "0.6664548", "0.6650742", "0.66497356", "0.66497356", "0.66497356", "0.66497356", "0.66497356", "0.66215074", "0.659...
0.6491844
24