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
The URI of a JSON file with generic OIDC provider configuration.
def metadata_url(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "metadata_url")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def external_key_uri(self) -> str:\n return pulumi.get(self, \"external_key_uri\")", "def resource_uri(self):\n primary_key_value = getattr(self, self.primary_key(), None)\n return '/{}/{}'.format(self.endpoint(), primary_key_value)", "def client_uri(self) -> str:\n return pulumi.ge...
[ "0.58484304", "0.5718676", "0.56547517", "0.55690217", "0.5525268", "0.5523892", "0.5468434", "0.5437212", "0.543432", "0.54275876", "0.539528", "0.53946126", "0.53621924", "0.53621924", "0.52938956", "0.52786773", "0.5265082", "0.5255933", "0.5247114", "0.5244697", "0.524053...
0.0
-1
The error code compose of code and message.
def __init__(__self__, *, code: Optional[pulumi.Input[str]] = None, message: Optional[pulumi.Input[str]] = None): if code is not None: pulumi.set(__self__, "code", code) if message is not None: pulumi.set(__self__, "message", message)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def error_code(self) -> str:\n return self.__error_code", "def error_code(self) -> str:\n return self._error_code", "def error_code(self):\n # type: () -> int\n return self._error_code", "def error_code(self) -> CustomErrorCode:\n enforce(self.is_set(\"error_code\"), \"'err...
[ "0.8241768", "0.81812644", "0.78035223", "0.7753963", "0.7751545", "0.772463", "0.7693357", "0.76655906", "0.7604812", "0.7565905", "0.750626", "0.73562944", "0.72182995", "0.7198194", "0.71655583", "0.7160118", "0.70757735", "0.7026724", "0.7025697", "0.69720846", "0.6864171...
0.0
-1
Allowed HTTP methods on crosssite requests. The special value `` allows all methods. If not set, `GET` and `HEAD` are allowed by default.
def allowed_methods(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "allowed_methods")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_methods(self) -> typing.List[\"HttpMethods\"]:\n return self._values.get('allowed_methods')", "def method_check(self, request, allowed=None):\r\n if allowed is None:\r\n allowed = []\r\n \r\n request_method = request.method.lower()\r\n allows = ','.jo...
[ "0.7423935", "0.7296543", "0.7222836", "0.6936173", "0.6891019", "0.68852997", "0.6878349", "0.68775344", "0.6873932", "0.67572796", "0.6679898", "0.66399485", "0.6631", "0.6596117", "0.65467566", "0.65234345", "0.65112895", "0.65102315", "0.6300847", "0.6244466", "0.61768734...
0.6373552
18
Indicate if only https is allowed.
def https_only(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "https_only")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter_ssl(request):\n if request.scheme == 'https':\n return True\n else:\n return False", "def filter_nossl(request):\n if request.scheme == 'http':\n return True\n else:\n return False", "def is_https_url(value):\n url = urlparse(value)\n\n if url.scheme != ...
[ "0.7965766", "0.77154565", "0.7565724", "0.7392088", "0.7078807", "0.69868004", "0.69662243", "0.6949298", "0.6943993", "0.68764025", "0.6849603", "0.68306315", "0.6793388", "0.67595094", "0.6756962", "0.67073786", "0.66795087", "0.6645245", "0.66423917", "0.66260034", "0.650...
0.76651585
4
The certificate name of key vault.
def key_vault_cert_name(self) -> pulumi.Input[str]: return pulumi.get(self, "key_vault_cert_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cert_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"cert_name\")", "def certificate(self) -> str:\n return pulumi.get(self, \"certificate\")", "def cert_object_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"cert_object_name\")", "def ge...
[ "0.758189", "0.7455251", "0.7288411", "0.70827883", "0.69880337", "0.69289696", "0.69289696", "0.69289696", "0.6776658", "0.67424226", "0.67424226", "0.6607505", "0.65850496", "0.65850496", "0.65640557", "0.64721227", "0.64680535", "0.6467388", "0.64542025", "0.6445159", "0.6...
0.878979
0
The vault uri of user key vault.
def vault_uri(self) -> pulumi.Input[str]: return pulumi.get(self, "vault_uri")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getVaultPath():\n\n global args, vaultPathDefault\n\n if args.vault_location:\n return args.vault_location;\n return vaultPathDefault;", "def login_uri(self) -> str:\n return pulumi.get(self, \"login_uri\")", "def key_vault_id(self) -> str:\n return pulumi.get(self, \"key_vaul...
[ "0.64142376", "0.6235193", "0.6036792", "0.59924376", "0.59768283", "0.5971981", "0.58634526", "0.5826966", "0.5797031", "0.5797031", "0.5797031", "0.5797031", "0.5797031", "0.5797031", "0.57618064", "0.5708384", "0.56703407", "0.5665968", "0.56502765", "0.5635299", "0.560923...
0.8133783
0
Type of the managed identity
def type(self) -> Optional[pulumi.Input[Union[str, 'ManagedIdentityType']]]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type(self) -> pulumi.Input[Union[str, 'ManagedServiceIdentityType']]:\n return pulumi.get(self, \"type\")", "def _get_identity_type():\n try:\n if current_domain.config[\"IDENTITY_TYPE\"] == IdentityType.INTEGER.value:\n return sa_types.Integer\n elif current_domain.config[...
[ "0.7761315", "0.76163673", "0.74161214", "0.7392319", "0.72801745", "0.71537596", "0.7120337", "0.7120337", "0.6923905", "0.6920005", "0.68184227", "0.6804015", "0.6702298", "0.6583505", "0.65592873", "0.64996374", "0.64783317", "0.64559376", "0.64455855", "0.64435047", "0.64...
0.80989707
0
The egress traffic type of Azure Spring Apps VNet instances.
def outbound_type(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "outbound_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def external_ip_egress_bandwidth_tier(self) -> Optional[pulumi.Input['NetworkPerformanceConfigExternalIpEgressBandwidthTier']]:\n return pulumi.get(self, \"external_ip_egress_bandwidth_tier\")", "def total_egress_bandwidth_tier(self) -> Optional[pulumi.Input['NetworkPerformanceConfigTotalEgressBandwidthTi...
[ "0.65339226", "0.6236908", "0.56914127", "0.5491461", "0.54817224", "0.5452596", "0.54486585", "0.54274386", "0.5395915", "0.53066194", "0.53031415", "0.53031415", "0.53031415", "0.53031415", "0.53031415", "0.5293636", "0.52842754", "0.5266688", "0.5249907", "0.51743174", "0....
0.47620803
64
Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1.
def failure_threshold(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "failure_threshold")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def min_failing_periods_to_alert(self) -> float:\n return pulumi.get(self, \"min_failing_periods_to_alert\")", "def num_failures(self):\n min_time = time.time() - self.window\n\n while self.failures and self.failures[0] < min_time:\n self.failures.popleft()\n\n return len(s...
[ "0.62211543", "0.61700594", "0.59348035", "0.5868571", "0.58095855", "0.58095855", "0.57868975", "0.57868975", "0.57742214", "0.5734706", "0.5734706", "0.57197326", "0.5679623", "0.5649005", "0.56028503", "0.55575526", "0.554021", "0.5508836", "0.55004007", "0.54635555", "0.5...
0.58630425
4
The URI of Issuer Identifier
def issuer_uri(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "issuer_uri")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def issuer(self) -> str:\n return self._issuer", "def issuer_ref(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"issuer_ref\")", "def issuer(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"issuer\")", "def issuer_ref(self) -> Optional[pulumi.Input[str]]:\n return...
[ "0.7646841", "0.7435857", "0.7091825", "0.70170575", "0.70170575", "0.6907568", "0.6890675", "0.6831944", "0.66125613", "0.6593813", "0.65786487", "0.64956343", "0.6431885", "0.6297742", "0.6297742", "0.62904745", "0.62709564", "0.61797154", "0.6160396", "0.6139776", "0.61397...
0.7777817
0
The account key of the Azure Storage Account.
def account_key(self) -> pulumi.Input[str]: return pulumi.get(self, "account_key")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key(self):\n return self.account_name()", "def key(self):\n return self.account_name()", "def storage_account_id(self) -> str:\n return pulumi.get(self, \"storage_account_id\")", "def storage_account_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"storage_account_i...
[ "0.8144788", "0.8144788", "0.8025911", "0.77892786", "0.7679347", "0.7556321", "0.7549248", "0.75267416", "0.73520774", "0.73520774", "0.72898984", "0.72898984", "0.7162431", "0.7162431", "0.7162431", "0.7162431", "0.7162431", "0.7162431", "0.7162431", "0.7162431", "0.7131392...
0.7543794
7
The account name of the Azure Storage Account.
def account_name(self) -> pulumi.Input[str]: return pulumi.get(self, "account_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def storage_account_name(self) -> str:\n return pulumi.get(self, \"storage_account_name\")", "def get_azure_storage_account_name(self):\n try:\n account = self.instance_metadata.get_tags()['bkp_storage_account']\n logging.debug(\"Using storage account name from instance metada...
[ "0.8778352", "0.82673603", "0.81351453", "0.81351453", "0.79683715", "0.74342984", "0.73019737", "0.72072047", "0.72072047", "0.72003174", "0.72003174", "0.71416295", "0.70545614", "0.7012603", "0.69673634", "0.6847172", "0.6847172", "0.6660188", "0.6611199", "0.660042", "0.6...
0.7368441
6
The type of the storage. Expected value is 'StorageAccount'.
def storage_type(self) -> pulumi.Input[str]: return pulumi.get(self, "storage_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def storage_type(self) -> str:\n return pulumi.get(self, \"storage_type\")", "def storage_type(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"storage_type\")", "def storage_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"storage_type\")", "def storage_typ...
[ "0.80617404", "0.75941575", "0.7571626", "0.7571626", "0.7571626", "0.73159206", "0.69092166", "0.69092166", "0.69064105", "0.69064105", "0.69053733", "0.68934095", "0.68683213", "0.6799984", "0.67855215", "0.6677192", "0.6590892", "0.6579358", "0.6579358", "0.6564802", "0.65...
0.7771626
1
Read a SQuAD json file into a list of SquadExample.
def read_squad_examples(input_file, return_answers, context_only=False, question_only=False, draft=False, draft_num_examples=12, append_title=False): with open(input_file, "r") as reader: input_data = json.load(reader)["data"] examples = [] ans_cnt = 0 no_ans_cnt = 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _load(examples, f):\n\n for l in f:\n json_example = json.loads(l)\n if FLAGS.mode == 'long_answers' and not has_long_answer(json_example):\n continue\n\n elif FLAGS.mode == 'short_answers' and not has_short_answer(json_example):\n continue\...
[ "0.6267746", "0.60942703", "0.60015744", "0.5937395", "0.583262", "0.57891154", "0.5735901", "0.5714332", "0.56753427", "0.56574446", "0.5635107", "0.5611678", "0.56028175", "0.5540956", "0.54811484", "0.54550457", "0.5454042", "0.54204696", "0.54198706", "0.5417933", "0.5417...
0.6315961
0
Perform comparison of `self` with the other SymbolicObject.
def __eq__(self, other: SymbolicObject) -> bool: if isinstance(other, ListObject): return self._subobjects == other._subobjects else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n if isinstance(other, Symbol):\n return self.arg == other.arg\n else:\n return False", "def __eq__(self, other):\n if not isinstance(other, SymbolCandidate):\n return False\n\n return self.to_dict() == other.to_dict()", "def...
[ "0.7809101", "0.73107564", "0.71312803", "0.71312803", "0.71312803", "0.70826554", "0.70706224", "0.70706224", "0.6969285", "0.6969285", "0.69676965", "0.6938953", "0.6919271", "0.6916628", "0.6906109", "0.6906109", "0.6906109", "0.6906109", "0.68721765", "0.6862627", "0.6856...
0.7316913
1
Gets dashboard settings for the user given. If no settings found, creates default settings.
def get_or_create_dashboard_settings(user): # Check if user trying to edit the dashboard workspace actually owns it. try: dashboard_settings = DashboardSettings._default_manager \ .select_related('user') \ .get(u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_dashboard_settings(username):\n # Check if user trying to edit the dashboard workspace actually owns it.\n try:\n return DashboardSettings._default_manager \\\n .select_related('user') \\\n .get(user__username=username)\n except ...
[ "0.80640435", "0.72362447", "0.7004914", "0.6679749", "0.64580715", "0.6444134", "0.64130247", "0.63655984", "0.63344324", "0.63144016", "0.6307737", "0.6242521", "0.62199265", "0.6193862", "0.6183659", "0.6183659", "0.61625105", "0.6116983", "0.60974985", "0.60819674", "0.60...
0.80688894
0
Get dashboard settings for the user given. If no settings found, creates default settings.
def get_dashboard_settings(username): # Check if user trying to edit the dashboard workspace actually owns it. try: return DashboardSettings._default_manager \ .select_related('user') \ .get(user__username=username) except ObjectDoesNot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_or_create_dashboard_settings(user):\n # Check if user trying to edit the dashboard workspace actually owns it.\n try:\n dashboard_settings = DashboardSettings._default_manager \\\n .select_related('user') \\\n ...
[ "0.8191085", "0.7317524", "0.7003957", "0.6711404", "0.65192735", "0.6457729", "0.64255", "0.64010525", "0.64002216", "0.63992774", "0.6371247", "0.6301747", "0.626276", "0.62348807", "0.62348807", "0.6230378", "0.6190716", "0.6159513", "0.61379147", "0.6123708", "0.6097421",...
0.8137409
1
Creating a singleton class to reuse same enumerator instance for different locale and template values.
def __new__(cls): # type: (Type[object]) -> LocaleTemplateEnumerator if LocaleTemplateEnumerator.__instance is None: LocaleTemplateEnumerator.__instance = object.__new__(cls) return LocaleTemplateEnumerator.__instance # type: ignore
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enum(cls, options, values):\r\n names, real = zip(*options)\r\n del names # unused\r\n\r\n def factory(i, name):\r\n return cls(i, name, (len(real),), lambda a: real[a[0]], values)\r\n return factory", "def locale_factory(factory):\n global _get_locale\n _get_loc...
[ "0.5429948", "0.5259973", "0.50239676", "0.49553558", "0.49103224", "0.4897437", "0.48882216", "0.48806643", "0.48669264", "0.47522846", "0.47477952", "0.47389334", "0.4732584", "0.4691044", "0.46705028", "0.46522367", "0.46377352", "0.4597522", "0.45503786", "0.45320725", "0...
0.72694325
0
Accuracy for binary multilabel problems. Rows of y_true and y_score correspond to different samples, while columns correspond to different binary problems (a.k.a. labels). Predictions should be logits, since decision is based on their sign.
def bml_accuracy(y_true: tf.Tensor, y_score: tf.Tensor, per_label: bool = False): y_true = tf.cast(y_true, float) y_pred_bool = tf.math.greater(y_score, 0) y_pred = tf.cast(y_pred_bool, float) error_values = tf.math.abs(tf.math.subtract(y_true, y_pred)) if per_label: axis = 0 else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accuracy_onehot(y_pred, y_label):\n return (y_pred.argmax(dim=1) == y_label).float().mean().item()", "def evaluate(y_test, pred_labels):\n \n # Converts one-hot code to a label (the index of 1)\n y_test_labels = np.argmax(y_test, axis=1)\n \n # Compare test labels to predicted labels\n s...
[ "0.70556194", "0.70486546", "0.69155747", "0.6827478", "0.67473066", "0.6735491", "0.66892606", "0.66877055", "0.6685115", "0.66744816", "0.66541487", "0.66397107", "0.662847", "0.66148007", "0.66047555", "0.6594834", "0.65947586", "0.65828127", "0.65822566", "0.65699726", "0...
0.7422478
0
join two dictionaries where thhe values are lists by returning a result dictionary with the same keys and values of the concatenation of the lists a[key] + b[key]. If the key is not shared in both dictionaries, just the (single) list is present
def join_list_valued_dictionaries(*dicts): if len(dicts) == 0: return {} if len(dicts) == 1: return dicts[0] def sub_join(a, b): r = a for k, v in b.items(): r[k] = r.get(k, []) + v return r return join_list_valued_dictionaries(*[sub_join(dicts[0], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def join_distributions(a, b):\n assert a.keys() == b.keys()\n return {k: a[k] + b[k] for k in a}", "def merge_dicts(a, b):\n new_dict = defaultdict(list)\n add_to_dict(a, new_dict)\n add_to_dict(b, new_dict)\n return new_dict", "def concat_dict(d1, d2):\n if d1 is None:\n return d2\...
[ "0.7869966", "0.77815855", "0.751371", "0.74863803", "0.7356698", "0.72889316", "0.7249963", "0.71724707", "0.71724707", "0.7097785", "0.7073086", "0.7056804", "0.70443076", "0.7031643", "0.69992906", "0.69992906", "0.69992906", "0.69992906", "0.69992906", "0.69992906", "0.69...
0.6978626
22
Return current time as a str.
def _get_current_time() -> str: return datetime.now().strftime("%FT%H:%M:%S")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_now() -> str:\n return datetime_to_str(datetime_now())", "def time_str(self):\n return datetime.now().strftime('%c')", "def get_current_timestamp_str(self):\n return str(time.mktime(datetime.datetime.now().timetuple()))", "def timestr():\n return dt.strftime(dt.now(),'%H:%M:%S')"...
[ "0.84509486", "0.8347383", "0.83357835", "0.83153456", "0.8281625", "0.81280434", "0.8064863", "0.80240214", "0.7912566", "0.7883643", "0.7870203", "0.7835668", "0.778461", "0.7778285", "0.7766617", "0.7743687", "0.7738805", "0.7716735", "0.7706359", "0.7691741", "0.76118463"...
0.84182936
1
Set fatal headers to avoid auth set useragent
def set_headers(): format_data = {'sequence': 2, 'Level': 1} headers = {'user-agent': 'Mozilla/5.0'} response = requests.post(base_url + '/post', data=format_data, headers=headers) print(response.text) print(response.json()) print(response.status_code)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_agent_header(self):\n self._api_client.set_default_header('User-Agent', self._api_client.user_agent)", "def _enforce_user_agent(headers: dict) -> dict:\n headers.update(SYNAPSE_USER_AGENT_HEADER)\n return headers", "def process_request_headers(request):\n request.headers.setdefault...
[ "0.71222794", "0.6775418", "0.6518116", "0.6333701", "0.6303567", "0.5984411", "0.5941009", "0.58793515", "0.58352125", "0.5806717", "0.5776468", "0.5764241", "0.5739667", "0.5683293", "0.5662744", "0.5630671", "0.5602602", "0.55962396", "0.55901384", "0.5583218", "0.5565013"...
0.59415
6
Sets the adult_only of this ItemSales.
def adult_only(self, adult_only): self._adult_only = adult_only
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_sells(self, strong_sells):\n\n self._strong_sells = strong_sells", "def show_active_only(self, show_active_only):\n\n self._show_active_only = show_active_only", "def tier_audio_only(self, tier_audio_only):\n\n self._tier_audio_only = tier_audio_only", "def used_at_enroll(self...
[ "0.5087459", "0.4894444", "0.4867578", "0.4860698", "0.48260245", "0.48260245", "0.47746468", "0.47110674", "0.46303967", "0.45919532", "0.45513403", "0.44893876", "0.44858214", "0.4474832", "0.44726378", "0.44655922", "0.44529468", "0.44529468", "0.44436842", "0.44286826", "...
0.8189795
0
Sets the buying_options of this ItemSales.
def buying_options(self, buying_options): self._buying_options = buying_options
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buying_rate(self, buying_rate):\n\n self._buying_rate = buying_rate", "def buys(self, buys):\n\n self._buys = buys", "def strong_buys(self, strong_buys):\n\n self._strong_buys = strong_buys", "def buy_shoppingitem(self, user_id, shoppinglist_id, item_id):\n item = self.get_sho...
[ "0.62151164", "0.62148196", "0.5615667", "0.52937883", "0.5275793", "0.52350783", "0.51824725", "0.5083314", "0.5078414", "0.50655854", "0.50540715", "0.50007606", "0.49771652", "0.49422622", "0.4805815", "0.47577018", "0.47535282", "0.47187123", "0.47092205", "0.4693948", "0...
0.8711927
0
Sets the categories of this ItemSales.
def categories(self, categories): self._categories = categories
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def categories(self, categories):\n self._categories = categories", "def categories(self, categories: List[str]):\n\n self._categories = categories", "def set_categories(self, categories: NounCategories):\n \n self._categories = categories", "def setCategories(self, categories):\n ...
[ "0.72948045", "0.69839436", "0.67623174", "0.6389498", "0.6147543", "0.6051271", "0.59756434", "0.59113", "0.57410383", "0.5525801", "0.5475356", "0.547085", "0.5386509", "0.5386509", "0.5386509", "0.5386509", "0.5386509", "0.5382905", "0.5368983", "0.5367254", "0.533218", ...
0.72951263
0
Sets the condition_id of this ItemSales.
def condition_id(self, condition_id): self._condition_id = condition_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def condition(self, condition):\n\n self._condition = condition", "def condition(self, condition):\n if condition is None:\n raise ValueError(\"Invalid value for `condition`, must not be `None`\") # noqa: E501\n\n self._condition = condition", "def stock_id(self, stock_id):\n\n...
[ "0.64505553", "0.59656864", "0.5744234", "0.57027864", "0.524356", "0.51424336", "0.5130536", "0.5023173", "0.49770892", "0.49188453", "0.48711163", "0.48537466", "0.48537466", "0.48537466", "0.48533857", "0.4847926", "0.48465332", "0.48439646", "0.48439646", "0.48439646", "0...
0.80206376
0
Sets the epid of this ItemSales.
def epid(self, epid): self._epid = epid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eid(self, eid):\n\n self._eid = eid", "def item_id(self, item_id):\n\n self._item_id = item_id", "def item_id(self, item_id):\n\n self._item_id = item_id", "def item_id(self, item_id):\n\n self._item_id = item_id", "def entity_id(self, entity_id):\n\n self._entity_id ...
[ "0.66136", "0.5907787", "0.5907787", "0.5907787", "0.5818448", "0.5604956", "0.55743223", "0.55743223", "0.5543133", "0.55322415", "0.55236936", "0.5469466", "0.5469466", "0.54331964", "0.53905296", "0.53765124", "0.53579533", "0.5349761", "0.53479254", "0.5306997", "0.528610...
0.71824455
0
Sets the item_affiliate_web_url of this ItemSales.
def item_affiliate_web_url(self, item_affiliate_web_url): self._item_affiliate_web_url = item_affiliate_web_url
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_web_url(self, item_web_url):\n\n self._item_web_url = item_web_url", "def item_href(self, item_href):\n\n self._item_href = item_href", "def affiliate_oid(self, affiliate_oid):\n\n self._affiliate_oid = affiliate_oid", "def affiliate_oid(self, affiliate_oid):\n\n self._af...
[ "0.7350103", "0.5727296", "0.53991103", "0.53991103", "0.5241137", "0.5209633", "0.5203572", "0.5155432", "0.51309067", "0.51288414", "0.51180637", "0.5116727", "0.5108142", "0.50461507", "0.50214386", "0.4986647", "0.49800935", "0.49271065", "0.49271065", "0.4905298", "0.484...
0.90469366
0
Sets the item_group_href of this ItemSales.
def item_group_href(self, item_group_href): self._item_group_href = item_group_href
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_href(self, item_href):\n\n self._item_href = item_href", "def group(self, group):\n\n self._group = group", "def group(self, group):\n\n self._group = group", "def group(self, group):\n\n self._group = group", "def set_group(self, group):\n self._group = group", ...
[ "0.64147997", "0.5997305", "0.5997305", "0.5997305", "0.59561414", "0.5939749", "0.5848538", "0.5848538", "0.5848538", "0.5848538", "0.5848538", "0.5848538", "0.58449274", "0.58423185", "0.5781381", "0.561276", "0.5610783", "0.5525309", "0.5483424", "0.54135656", "0.53795904"...
0.8676908
0
Sets the item_group_type of this ItemSales.
def item_group_type(self, item_group_type): self._item_group_type = item_group_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setType(self, newType):\n self._itemType = newType", "def item_data_type(self, item_data_type):\n\n self._item_data_type = item_data_type", "def SetItemType(self, item, ct_type):\r\n\r\n item.SetType(ct_type)\r\n self.CalculatePositions()\r\n self.Refresh()", "def packa...
[ "0.65581787", "0.6480481", "0.63832486", "0.6049397", "0.58650666", "0.57678217", "0.5703288", "0.56395245", "0.56316465", "0.56316465", "0.56144613", "0.5601117", "0.5587642", "0.5572054", "0.5540604", "0.55227727", "0.5505104", "0.5505104", "0.5505104", "0.54510576", "0.542...
0.87010425
0
Sets the item_id of this ItemSales.
def item_id(self, item_id): self._item_id = item_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def line_item_id(self, line_item_id):\n\n self._line_item_id = line_item_id", "def tracking_item_id(self, tracking_item_id):\n\n self._tracking_item_id = tracking_item_id", "def order_item_id(self, order_item_id):\n if order_item_id is None:\n raise ValueError(\"Invalid value fo...
[ "0.67135483", "0.66489536", "0.64930934", "0.6481447", "0.6402728", "0.6402728", "0.62162936", "0.58104146", "0.5735389", "0.5732351", "0.5656824", "0.56315494", "0.5601998", "0.55821735", "0.55691874", "0.5554902", "0.55505425", "0.55119246", "0.55119246", "0.54936564", "0.5...
0.7961969
0
Sets the item_web_url of this ItemSales.
def item_web_url(self, item_web_url): self._item_web_url = item_web_url
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_affiliate_web_url(self, item_affiliate_web_url):\n\n self._item_affiliate_web_url = item_affiliate_web_url", "def item_href(self, item_href):\n\n self._item_href = item_href", "def web_id(self, web_id):\n\n self._web_id = web_id", "def terms_web_url(self, terms_web_url):\n\n ...
[ "0.7349451", "0.6189335", "0.60956615", "0.5963491", "0.59073883", "0.5899541", "0.5864579", "0.58559597", "0.5848743", "0.5848743", "0.5827632", "0.5806649", "0.56297743", "0.56231093", "0.5461144", "0.5461144", "0.5461144", "0.5461144", "0.5461144", "0.5461144", "0.5461144"...
0.86385405
0
Sets the last_sold_date of this ItemSales.
def last_sold_date(self, last_sold_date): self._last_sold_date = last_sold_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_sold_price(self, last_sold_price):\n\n self._last_sold_price = last_sold_price", "def date_of_previous_sale(self, date_of_previous_sale):\n\n self._date_of_previous_sale = date_of_previous_sale", "def sales(self, sales):\n\n self._sales = sales", "def sells(self, sells):\n\n ...
[ "0.71155304", "0.6344994", "0.56760174", "0.5521508", "0.54803395", "0.54646087", "0.5438514", "0.5346013", "0.5346013", "0.5346013", "0.5346013", "0.5261467", "0.5183333", "0.5177637", "0.5151373", "0.5151373", "0.5137475", "0.5108728", "0.5075976", "0.5073356", "0.50451106"...
0.88628453
0
Sets the seller of this ItemSales.
def seller(self, seller): self._seller = seller
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def seller(self):\n if \"seller\" in self._prop_dict:\n return self._prop_dict[\"seller\"]\n else:\n return None", "def sells(self, sells):\n\n self._sells = sells", "def selling_rate(self, selling_rate):\n\n self._selling_rate = selling_rate", "def sales(sel...
[ "0.6697284", "0.66262287", "0.6391551", "0.62356764", "0.62135136", "0.6008907", "0.5998044", "0.57037395", "0.56009555", "0.5567515", "0.54543287", "0.54317856", "0.5429202", "0.5387732", "0.5300934", "0.52661985", "0.52331066", "0.52003163", "0.5166502", "0.51127577", "0.50...
0.8261237
0
Sets the total_sold_quantity of this ItemSales.
def total_sold_quantity(self, total_sold_quantity): self._total_sold_quantity = total_sold_quantity
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total_quantity(self, total_quantity):\n\n self._total_quantity = total_quantity", "def totalStock(self, totalStock):\n\n self._totalStock = totalStock", "def spreadTotal(self, spreadTotal):\n\n self._spreadTotal = spreadTotal", "def total_sales(self):\n total_sales = 0\n ...
[ "0.6774645", "0.66276425", "0.6408581", "0.6090883", "0.5989977", "0.5779511", "0.577322", "0.56095916", "0.5504931", "0.5491277", "0.5491277", "0.5491277", "0.5491277", "0.5491277", "0.5491277", "0.5491277", "0.5491277", "0.54662925", "0.5437657", "0.54362494", "0.54284585",...
0.8742177
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, ItemSales): 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.84560555", "0.83913696", "0.8143685", "0.81403786", "0.8131871", "0.8093231", "0.80915105", "0.80915105", "0.80915105", "0.8084564", "0.8084564", "0.8075547", "0.8075547", "0.8065006" ]
0.0
-1
Get list of cached nodes
def get_nodes(): with session_for_read() as session: res = session.query( model.Node ).order_by( model.Node.started_at.desc() ) return [model.Node(uuid=entry.uuid, version_id=entry.version_id, state=entry.state, started_at=entry.started_at,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memcache_nodes(self) -> pulumi.Output[Sequence['outputs.NodeResponse']]:\n return pulumi.get(self, \"memcache_nodes\")", "def is_node_cached(self, nodes):\n nodes_with_cache = []\n for node in nodes:\n for shape in cmds.listRelatives(node, shapes=True) or []:\n ...
[ "0.7440275", "0.73381656", "0.73135996", "0.7066691", "0.6887182", "0.6702315", "0.6702315", "0.6696846", "0.6681407", "0.66375214", "0.663557", "0.66270006", "0.66270006", "0.66168535", "0.6607316", "0.66055197", "0.65985227", "0.6537221", "0.648612", "0.6431349", "0.6407742...
0.64808947
19
Get all cached nodes
def get_node(uuid, **fields): try: with session_for_read() as session: res = session.query(model.Node).filter_by( uuid=uuid, **fields).one() return model.Node(uuid=res.uuid, version_id=res.version_id, state=res.state, started_at=res.start...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memcache_nodes(self) -> pulumi.Output[Sequence['outputs.NodeResponse']]:\n return pulumi.get(self, \"memcache_nodes\")", "def getNodes(self):\n return self.__allNodes", "def get_all_nodes(self):\n return self._get_all_nodes()", "def is_node_cached(self, nodes):\n nodes_with_ca...
[ "0.7465894", "0.7198057", "0.71751165", "0.71269", "0.7011555", "0.68562955", "0.68547124", "0.6803133", "0.66800016", "0.66800016", "0.6629431", "0.65715885", "0.65470916", "0.6544306", "0.654275", "0.6535336", "0.6535336", "0.65226245", "0.65187615", "0.6505588", "0.648842"...
0.0
-1
Get all rule actions
def get_rules_actions(**fields): # NOTE(TheJulia): This appears to exist largely to help unit # testing of rules funcitonality. with session_for_read() as session: query = session.query( model.RuleAction ).filter_by(**fields) return [model.RuleAction( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rule_actions(self) -> pulumi.Output[Sequence['outputs.RuleRuleAction']]:\n return pulumi.get(self, \"rule_actions\")", "def actions(self):\n return self._separated_constructs(RuleAction)", "def rule_actions(self) -> Sequence['outputs.GetRulesRuleRuleActionResult']:\n return pulumi.get(...
[ "0.8276521", "0.8218657", "0.8102494", "0.8061606", "0.7776112", "0.75107414", "0.7438307", "0.7419799", "0.73742896", "0.73123074", "0.7190016", "0.7182163", "0.71364886", "0.71125984", "0.7101544", "0.70307213", "0.70307213", "0.69803685", "0.69803685", "0.69803685", "0.695...
0.69620425
20
Test get list of cars.
def test_get_cars(): response = client.get("/") assert response.status_code == STATUS_OK cars = response.json() assert len(cars) == 1000 # first id should be 1 assert cars[0]["id"] == 1 # last id should be 1000 assert cars[-1]["id"] == 1000 expected_first_car = { "id": 1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_retrieve_vehicle_list(self):\n Vehicle.objects.create(\n user=self.user,\n type='Ambulance',\n license_plate='AA-123-AA'\n )\n Vehicle.objects.create(\n user=self.user,\n type='VSL',\n license_plate='BB-123-BB'\n ...
[ "0.728713", "0.70732194", "0.6877226", "0.66280323", "0.6627546", "0.6617916", "0.66015947", "0.6516677", "0.65003616", "0.6494228", "0.6474433", "0.6452659", "0.644835", "0.64268446", "0.64245474", "0.64245474", "0.64103067", "0.6386505", "0.63795984", "0.6367435", "0.635131...
0.7419185
0
Test update of car with data that violates the validation.
def test_update_car_bad_data(): car_data = { "id": 1, "make": "BMWNotValid", # must be in existing makes "model": "longname" * 10, # must not be longer than 50 "year": 2051, # must be between 1900 and 2050 "vin": "JH4CU2F60AC794232", } response = client.put("/1", d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_car_invalid_id():\n car_data = {\n \"id\": 1,\n \"make\": \"BMW\",\n \"model\": \"3 Series\",\n \"year\": 1998,\n \"vin\": \"JH4CU2F60AC794232\",\n }\n response = client.put(\"/11111\", data=car_data)\n assert response.status_code == STATUS_NOT_FOUND",...
[ "0.6991418", "0.6967305", "0.6955346", "0.6937041", "0.67552537", "0.6683829", "0.6683829", "0.6683829", "0.6682928", "0.66734666", "0.663993", "0.65518606", "0.6516334", "0.64842486", "0.6463759", "0.64606327", "0.6420454", "0.64185685", "0.64", "0.6390827", "0.63846207", ...
0.76970667
0
Set departure date for PetRecord.
def departure(self, when: datetime.date): if self._departure: logging.warning( f'Overwriting departure date of {self._departure.isoformat()} ' f'for pet {self.animal_id} with {when.isoformat()}' ) self._departure = when if self.intake_date...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dep_date(self, dep_date):\n\n self._dep_date = dep_date", "def rt_dep_date(self, rt_dep_date):\n\n self._rt_dep_date = rt_dep_date", "def set_end_date(self, date):\n pass", "def decommission_date(self, decommission_date):\n\n self._decommission_date = decommission_date", "de...
[ "0.64680725", "0.59559137", "0.58675516", "0.56469953", "0.5542561", "0.5542561", "0.5510933", "0.5475105", "0.54704136", "0.5468636", "0.54546434", "0.54263943", "0.54159814", "0.5384544", "0.5369418", "0.5339517", "0.5271403", "0.5271403", "0.5271403", "0.5271403", "0.52714...
0.7525663
0
Reads a file and returns a list with the MTBF
def readFile(fileName,outputFailureFile, delta, column=0, value=0): mtbf = [] formatAlt = '%m/%d/%y %H:%M %p' date_format = '%Y-%m-%d %H:%M:%S' previousDate = 0 count = 0 with open(fileName) as f: lines = len(f.readlines()) file = open(outputFailureFile, 'w') with open(fileName) as f: for line in f: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_file(filename) -> List[Todo]:\n with pathlib.Path(filename).expanduser().open('r') as fp:\n return [Todo(_id, line) for _id, line in enumerate(fp)]", "def get_reward_lists(f):\r\n with open(f, 'r',newline='') as f:\r\n lines = f.readlines()\r\n return lines", "def read_list(fnam...
[ "0.68389314", "0.6711856", "0.66570807", "0.65310794", "0.6521277", "0.65019274", "0.6491816", "0.64900476", "0.6448725", "0.64194274", "0.6405656", "0.6403526", "0.6403478", "0.6397466", "0.6389297", "0.6376211", "0.63605905", "0.63522184", "0.63331294", "0.62931746", "0.629...
0.0
-1
Return rotation angle and axis from rotation matrix. >>> angle = (random.random() 0.5) (2math.pi) >>> direc = np.random.random(3) 0.5 >>> point = np.random.random(3) 0.5 >>> R0 = rotation_matrix(angle, direc, point) >>> angle, direc, point = rotation_from_matrix(R0) >>> R1 = rotation_matrix(angle, direc, point) >>> is_...
def py_rotation_from_matrix(matrix): return np.float32(quat2angle_axis(mat2quat(matrix)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_conversions_matrix_axis_angle():\n R = np.eye(3)\n a = pr.axis_angle_from_matrix(R)\n pr.assert_axis_angle_equal(a, np.array([1, 0, 0, 0]))\n\n R = pr.active_matrix_from_intrinsic_euler_xyz(\n np.array([-np.pi, -np.pi, 0.0]))\n a = pr.axis_angle_from_matrix(R)\n pr.assert_axis_ang...
[ "0.6898602", "0.68321466", "0.6810445", "0.67116857", "0.66915035", "0.66259545", "0.65869004", "0.6560683", "0.6527974", "0.6504224", "0.6500942", "0.649548", "0.64880544", "0.6487649", "0.64815956", "0.6448026", "0.64381915", "0.64362437", "0.6427002", "0.6418396", "0.64182...
0.66997886
4
Create a variable if not exists. If the variable exists, does nothing.
def init_variable(self, name, default=None, init=None, init_on_each_run=False): if name not in self._variables: with self._variables_lock: if name not in self._variables: self._variables[name] = dict(default=default, init=init, init_on_each_run=init_on_each_run) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _find_or_create_variable(self, cname, vname, source):\n try:\n var = self.model.get_variable_by_name(cname, source.name)\n raise KeyError()\n except KeyError:\n # Have we created it already?\n try:\n var = self.model.get_variable_by_name(...
[ "0.66135", "0.64219284", "0.6297552", "0.62745655", "0.6173047", "0.6173047", "0.61465114", "0.60872984", "0.60309684", "0.60244226", "0.59587556", "0.5957422", "0.59001416", "0.5866025", "0.5755347", "0.5714722", "0.5713024", "0.5698671", "0.5697514", "0.5679482", "0.5671809...
0.0
-1
Returns which player's turn it is to play.
def get_current_turn(self): return self._turn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_player_turn(self):\r\n return self._player_turn", "def get_player_turn(self):\n\n return self._player_turn", "def get_turn(self):\n return self.__turn_info['turn']", "def get_turn(self):\n return self._turn", "def get_current_turn(self):\n return self.turns.latest...
[ "0.81130254", "0.8007694", "0.77692515", "0.75822973", "0.74057853", "0.7375622", "0.7327072", "0.72976446", "0.72754925", "0.726533", "0.7144933", "0.7010673", "0.695338", "0.6881855", "0.6700417", "0.6592374", "0.6503998", "0.64579785", "0.6441762", "0.64229673", "0.6417575...
0.74529725
4
Checks for a given player's marble and returns true if the marble at the coordinate is the given player's marble. Else returns false if no marble at location, red marble, or opposing player's marble.
def is_players_marble(self, player_name, coordinates): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_a_player_in_check(self, color):\n\n current_player = color\n if current_player == 'red':\n opposing_player = 'blue'\n else:\n opposing_player = 'red'\n\n if self.can_checkmate(opposing_player):\n return self.get_general(current_player)\n\n ...
[ "0.6371152", "0.62271994", "0.6159929", "0.6007417", "0.5952692", "0.5943541", "0.59348553", "0.59212834", "0.58644724", "0.5835248", "0.58184683", "0.5800758", "0.5779436", "0.5768361", "0.5752794", "0.5746334", "0.57021654", "0.56954736", "0.5679706", "0.566278", "0.5601972...
0.7535614
0
Returns the available package manager that can be used to satisfy the requirement. Raises NotImplementedError if there's no supported package manager.
def get_available_package_manager(self): for manager in self.package.keys(): try: executable = self.SUPPORTED_PACKAGE_MANAGERS[manager] if is_executable_exists(executable): return manager except KeyError: raise NotImplem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getPackageManager(self) -> None:\n\t\tfor pkgmgr in config.SUPPORTED_PACKAGE_MGRS:\n\t\t\tif subprocess.run([\"which\", pkgmgr]).returncode == 0:\n\t\t\t\tself.package_manager = pkgmgr\n\t\t\t\treturn\n\t\tlogger.error(\"Supported package manager not found, aborting.\")\n\t\traise ValueError(\"Package manager ...
[ "0.8017461", "0.6659611", "0.57003313", "0.54842085", "0.54710925", "0.54704237", "0.5449203", "0.5447248", "0.5420251", "0.5409994", "0.538757", "0.53618056", "0.53569317", "0.53168195", "0.5298704", "0.52824444", "0.52675456", "0.5236451", "0.5236451", "0.5236451", "0.52314...
0.8670982
0
Returns the next element in the iteration without advancing the iterator.
def peek(self): return self.tmpNext
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __next__(self):\n return next(self.iterator)", "def __next__(self):\n return next(self.iter)", "def __next__(self):\n\t\tif self.i >= len(self.l):\n\t\t\tself.i = 0\n\t\t\traise StopIteration\n\t\tresult = self.l[self.i]\n\t\tself.i += 1\n\t\treturn result", "def __next__(self):\n if...
[ "0.79477453", "0.78446555", "0.775278", "0.7702536", "0.76835656", "0.76673263", "0.7658624", "0.76465726", "0.76022387", "0.75659126", "0.7556752", "0.752537", "0.7500898", "0.7500898", "0.74560964", "0.74174786", "0.73758715", "0.7373713", "0.7363025", "0.73472965", "0.7347...
0.0
-1
Gets the reviewer_id of this Reviewer.
def reviewer_id(self) -> int: return self._reviewer_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reviewer(self):\n return self._reviewer", "def reader_id(self):\n return self.__reader_id", "def reviewer_id(self, reviewer_id: int):\n\n self._reviewer_id = reviewer_id", "def _rId(self):\n return self.__rId", "def get_id(self) -> int:\n return self.user_id", "def ...
[ "0.703908", "0.6915261", "0.6749293", "0.64833635", "0.61571133", "0.61508846", "0.61508846", "0.61508846", "0.61508846", "0.61508846", "0.61508846", "0.6129321", "0.6117284", "0.609871", "0.6097539", "0.6088713", "0.60864633", "0.6080269", "0.6080269", "0.6080269", "0.608026...
0.8855759
0
Sets the reviewer_id of this Reviewer.
def reviewer_id(self, reviewer_id: int): self._reviewer_id = reviewer_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reviewer_id(self) -> int:\n return self._reviewer_id", "def reviewer(self, reviewer):\n if not reviewer:\n return\n\n from stalker import User\n\n if not isinstance(reviewer, User):\n raise TypeError(\n \"%s.reviewer should be a stalker.User in...
[ "0.7088148", "0.6961504", "0.6730103", "0.6098527", "0.59316134", "0.5863515", "0.5856905", "0.57035094", "0.57035094", "0.56890965", "0.5641935", "0.55952567", "0.55806994", "0.55806994", "0.55507225", "0.55275005", "0.55275005", "0.5499536", "0.54735816", "0.5455478", "0.54...
0.9096719
0
Gets the email_address of this Reviewer.
def email_address(self) -> str: return self._email_address
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_email(self):\n return self.reference[REF_EMAIL_ADDRESS][REF_VALUE]", "def get_email(self):\n return self._email", "def get_email(self):\n return self.email", "def email(self):\n return self._email", "def email(self):\n return self._email", "def email(self):\n ...
[ "0.8315964", "0.8075597", "0.7931696", "0.78280723", "0.78280723", "0.78280723", "0.78280723", "0.7812102", "0.77469987", "0.7736563", "0.77002656", "0.7679467", "0.7635844", "0.7523839", "0.75008816", "0.75008816", "0.75008816", "0.7385697", "0.73670113", "0.7310596", "0.731...
0.8231358
1
Sets the email_address of this Reviewer.
def email_address(self, email_address: str): if email_address is None: raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 self._email_address = email_address
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def email_address(self, email_address: \"str\"):\n self._attrs[\"emailAddress\"] = email_address", "def email_address(self, email_address):\n\n self._email_address = email_address", "def email_address(self, email_address):\n\n self._email_address = email_address", "def email_address(self...
[ "0.7984109", "0.7983768", "0.7983768", "0.7983768", "0.7586743", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7418325", "0.7273733", "0.7245795", "0.7245795", "0.71644205", "0.71533054", "0.70765686", ...
0.77362484
4
Gets the first_name of this Reviewer.
def first_name(self) -> str: return self._first_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_first_name(self):\n return self._first_name", "def get_first_name(self) -> str:\n return self.first_name", "def first_name(self):\n\n return self._first_name", "def first_name(self):\n return self._first_name", "def first_name(self):\n return self._first_name", ...
[ "0.8719638", "0.8647118", "0.85736495", "0.8563446", "0.8563446", "0.8563446", "0.8124718", "0.8124718", "0.805808", "0.7980624", "0.784391", "0.784391", "0.76431525", "0.7576764", "0.7576764", "0.7576764", "0.7576764", "0.7576764", "0.7576764", "0.7576764", "0.7576764", "0...
0.8543971
6
Sets the first_name of this Reviewer.
def first_name(self, first_name: str): if first_name is None: raise ValueError("Invalid value for `first_name`, must not be `None`") # noqa: E501 self._first_name = first_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_first_name(self, first_name):\n self.first_name = first_name", "def first_name(self, first_name):\n\n self._first_name = first_name", "def first_name(self, first_name):\n\n self._first_name = first_name", "def first_name(self, first_name):\n\n self._first_name = first_name...
[ "0.88206065", "0.8627562", "0.8627562", "0.8627562", "0.8627562", "0.8627562", "0.8627562", "0.8627562", "0.8627562", "0.8627562", "0.85723734", "0.8175841", "0.81346387", "0.81346387", "0.78424424", "0.7722226", "0.76083934", "0.74516344", "0.74516344", "0.71168065", "0.7063...
0.81909794
11
Gets the last_name of this Reviewer.
def last_name(self) -> str: return self._last_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_last_name(self) -> str:\n return self.last_name", "def get_last_name(self):\n return self._last_name", "def last_name(self):\n\n return self._last_name", "def last_name(self):\n return self._last_name", "def last_name(self):\n return self._last_name", "def last_...
[ "0.8749592", "0.87145317", "0.85123354", "0.849484", "0.849484", "0.849484", "0.849484", "0.81887805", "0.81887805", "0.81887805", "0.81887805", "0.81887805", "0.8186987", "0.8089191", "0.80842835", "0.80842835", "0.8046388", "0.80258906", "0.7580761", "0.74016935", "0.737911...
0.85029256
3
Sets the last_name of this Reviewer.
def last_name(self, last_name: str): if last_name is None: raise ValueError("Invalid value for `last_name`, must not be `None`") # noqa: E501 self._last_name = last_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_last_name(self, last_name):\n self.last_name = last_name", "def last_name(self, last_name):\n\n self._last_name = last_name", "def last_name(self, last_name):\n\n self._last_name = last_name", "def last_name(self, last_name):\n\n self._last_name = last_name", "def last_n...
[ "0.8684762", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.84929544", "0.8268963", "0.8203433", "0.8084252", "0.7752098", "0.758103", "0.758103", "0.75073636", "0.7141308", "0.70237243", "0.694...
0.8115626
13
Gets the is_admin of this Reviewer.
def is_admin(self) -> bool: return self._is_admin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_admin(self):\n return self._is_admin", "def is_admin(self):\n return self._is_admin", "def is_admin(self):\n return self.admin", "def is_admin(self):\r\n return self.admin", "def is_admin(self):\n if self.type == 1:\n return True\n else:\n ...
[ "0.84415877", "0.84415877", "0.8433332", "0.8425221", "0.7823693", "0.76947385", "0.76893914", "0.7654832", "0.765458", "0.7628546", "0.7628546", "0.75279987", "0.7517313", "0.7393756", "0.7364527", "0.734012", "0.73036826", "0.72699404", "0.7251162", "0.7227948", "0.72035116...
0.8307749
4
Sets the is_admin of this Reviewer.
def is_admin(self, is_admin: bool): if is_admin is None: raise ValueError("Invalid value for `is_admin`, must not be `None`") # noqa: E501 self._is_admin = is_admin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_admin(self, is_admin):\n\n self._is_admin = is_admin", "def is_admin(self) -> bool:\n return self._is_admin", "def is_admin(self):\r\n return self.admin", "def is_admin(self):\n return self.admin", "def is_admin(self):\n return self._is_admin", "def is_admin(self...
[ "0.8313083", "0.68032444", "0.67743313", "0.67349625", "0.6726341", "0.6726341", "0.66756386", "0.65361243", "0.64560163", "0.64082944", "0.6380349", "0.63686347", "0.6365736", "0.6124963", "0.608976", "0.60281116", "0.6001576", "0.5987062", "0.5910663", "0.5900064", "0.58984...
0.7943349
1
Gets the reputation of this Reviewer.
def reputation(self) -> int: return self._reputation
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_reputation_score(self):\n self._extract()\n if self.user_type == 0:\n for key in BitBucketEnum.USER_NEW_REPUTATION_MAPPING:\n if key.high >= self.no_of_followers >= key.low:\n return BitBucketEnum.USER_NEW_REPUTATION_MAPPING[key]\n elif self...
[ "0.70396495", "0.6783486", "0.6761931", "0.6374297", "0.60242176", "0.60017604", "0.5945111", "0.5945111", "0.58749944", "0.56576365", "0.550287", "0.547581", "0.54635966", "0.544583", "0.544583", "0.544583", "0.54416543", "0.5427354", "0.5405694", "0.5403015", "0.5403015", ...
0.843139
0
Sets the reputation of this Reviewer.
def reputation(self, reputation: int): if reputation is None: raise ValueError("Invalid value for `reputation`, must not be `None`") # noqa: E501 self._reputation = reputation
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reputation(self) -> int:\n return self._reputation", "async def reputation_command(self, ctx, member: Member):\n await self.reputation_handler(ctx, member)", "def reps(self, r: int) -> None:\n self._invalidate()\n self._reps = r", "def set_rewards_score(self, _score: Address) ...
[ "0.70128846", "0.6446977", "0.5709752", "0.5684103", "0.54864764", "0.54684055", "0.54684055", "0.5386139", "0.5386139", "0.5367879", "0.5349362", "0.532366", "0.5241034", "0.52365535", "0.51928395", "0.5151908", "0.5151908", "0.50674355", "0.50368845", "0.502343", "0.5009259...
0.82964504
0
Lists the last 12 months of precipitation data in inches per day
def precipitation(): # Open sessions session = Session(bind=engine) # Find out what is the latest date with data lastDate=session.query(Measurement.date).order_by(Measurement.date.desc()).first() for date in lastDate: dataArray = date.split("-") (year,month,day) = dataArray ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def precipitation():\n # Calculate the date 1 year ago from the last data point in the database\n #Create our session (link) from Python to the DB\n session = Session(engine)\n\n # Use query from notebook. Get the last date in database, then calc a year before \n last_date = session.query(func.max(M...
[ "0.62665176", "0.61204433", "0.61152095", "0.5993231", "0.5826932", "0.582668", "0.5810659", "0.57877105", "0.5750036", "0.56713074", "0.5620029", "0.5593923", "0.55708265", "0.55708265", "0.55615467", "0.55581546", "0.5541824", "0.5521256", "0.5512094", "0.54897225", "0.5465...
0.53534317
31
Returns the highest value in the tree. Given that this should be the most extreme right value, thats all it checks for. Utilizes recursion.
def get_max(self): if not self: return None return self.right.get_max() if self.right else self.value #Ternarary Operator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_maximum_value(self):\n if self.root: \n self.max_val = self.root.value\n else:\n return 'No tree found'\n def inner(root):\n if root.left:\n inner(root.left)\n\n if root.right:\n inner(root.right)\n\n if self.max_val < root.value:\n self.max_val = roo...
[ "0.86048627", "0.83545583", "0.81750786", "0.7977292", "0.7889282", "0.7888253", "0.7879322", "0.7853726", "0.7782082", "0.7773082", "0.77617455", "0.7717895", "0.7715405", "0.7596972", "0.7556186", "0.75554997", "0.7479638", "0.7473104", "0.74716824", "0.741902", "0.7366188"...
0.7992134
3
Returns the lowest value in the tree. Given that this should be the most extreme left value, thats all it checks for. Utilizes recusion.
def get_min(self): if not self: return None return self.left.get_min() if self.left else self.value #Ternarary Operator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_min(self):\n\t\tif self.left:\n\t\t\treturn self.left.get_min()\n\t\treturn self.value", "def find_min(self):\n current = self\n while current.left is not None:\n current = current.left\n return current", "def findMin(self):\n curr = self\n while curr.hasLe...
[ "0.83112144", "0.8306886", "0.8230182", "0.81225884", "0.79692185", "0.7939081", "0.7869427", "0.7826729", "0.77282697", "0.7728052", "0.7622708", "0.7584791", "0.7576134", "0.7552991", "0.7545388", "0.74931014", "0.7466292", "0.7380854", "0.73605657", "0.7340406", "0.7339110...
0.8202071
3
Returns True if anonymous users can view an object
def canAnonymousView(self, object): if 'Anonymous' in rolesForPermissionOn('View', object): return True # XXX i am not sure it is possible to assign local roles to the anonymous user # XXX if it is, there may need to be some local role tomfoolery here # XXX something like the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_view(self, user):\r\n return True", "def has_permission(self, request, view):\n usuario = request.user\n return str(usuario) == \"AnonymousUser\"", "def has_object_permission(self, request, view, obj):\n return request.user == obj", "def has_object_permission(self, request...
[ "0.76471233", "0.7558649", "0.7534376", "0.74678046", "0.74630797", "0.7441778", "0.74407387", "0.7438599", "0.74314827", "0.73942655", "0.73845345", "0.73434985", "0.7279345", "0.72743434", "0.72716", "0.725434", "0.72350353", "0.7220531", "0.7212784", "0.72040564", "0.72028...
0.8060076
0
Return absolute path to given media for given app.
def app_media_path(app_path, media, check_exists=True): app_module = import_module(app_path) app_dir = os.path.dirname(app_module.__file__) app_media = os.path.realpath(os.path.join(app_dir, 'media', media)) if check_exists and not os.path.exists(app_media): raise Exception("app_media_path: fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_path(self):\n return self._path", "def get_media_directory():\n\treturn _paths[_MEDIA_DIRECTORY_KEY]", "def get_media_path(self, filename):\n return join(settings.CMS_PAGE_MEDIA_PATH, \"%d\" % self.id, filename)", "def file_path(self, request, response=None, info=None):\n url =...
[ "0.6710615", "0.6597268", "0.6476491", "0.64652354", "0.63037014", "0.61956733", "0.6157926", "0.6127691", "0.60986835", "0.609796", "0.6041601", "0.60035944", "0.59938234", "0.5956039", "0.5950107", "0.5932423", "0.5919481", "0.59043443", "0.586998", "0.58005416", "0.5728673...
0.75694823
0
Sets the review of this UploadMetaDataByUrl.
def review(self, review): self._review = review
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def review(self, review: object):\n\n self._review = review", "def review_link(self, review_link):\n\n self._review_link = review_link", "def reviews(self, reviews: object):\n\n self._reviews = reviews", "def auto_review(self, auto_review):\n \n self._auto_review = auto_rev...
[ "0.6744694", "0.58021426", "0.5697436", "0.5669849", "0.5369329", "0.5186228", "0.51568687", "0.51039904", "0.50660807", "0.5022752", "0.49988222", "0.4971737", "0.48771748", "0.4847336", "0.48173162", "0.48096222", "0.47925913", "0.47739556", "0.47710755", "0.47418672", "0.4...
0.69357795
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, UploadMetaDataByUrl): 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.84560555", "0.83913696", "0.8143685", "0.81403786", "0.8131871", "0.8093231", "0.80915105", "0.80915105", "0.80915105", "0.8084564", "0.8084564", "0.8075547", "0.8075547", "0.8065006" ]
0.0
-1
Renders an aaline of a series of points.
def render_shore(self, coords, radius): pygame.draw.circle(self.surface, RED, (450, 450), int(radius), 1) # Original centre # pygame.draw.aalines(self.surface, BEIGE, True, coords, False) # Island shore for point in coords: # Data points x, y = int(point.x), int(point.y) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aline(p, width, dash, grayamount):\r\n if grayamount > 0:\r\n w(\"%f setgray\" %grayamount)\r\n ap = []\r\n for i in range(len(p)):\r\n ap.append(apoint(p[i]))\r\n if dash > 0:\r\n w(\"[%d %d] 0 setdash\" % (dash,dash))\r\n\r\n w(\"%d %d moveto\" % (ap[0][0],ap[0][1]))\r\n ...
[ "0.6036105", "0.59704536", "0.5908416", "0.57214755", "0.5675155", "0.555769", "0.5467638", "0.5463365", "0.5452389", "0.5427127", "0.5387111", "0.538037", "0.53776515", "0.53546864", "0.5348236", "0.5341367", "0.5327778", "0.5299721", "0.52859634", "0.52554893", "0.52538234"...
0.0
-1
Convert a Mongo document to a json friendly dictionary. Wrapper for JSONEncoder().encode(obj)
def doc_to_dict(obj: any): as_str = JSONEncoder().encode(obj) as_dict = json.loads(as_str) return as_dict
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jsonify(mongo_doc):\n if isinstance(mongo_doc, (QuerySet, list,)):\n return [jsonify(element) for element in mongo_doc]\n result_dict = mongo_doc.to_mongo().to_dict()\n clean_dict = scrub_object(result_dict)\n return clean_dict", "def mongo_to_dict(obj):\n return_data = []\n if obj i...
[ "0.7751189", "0.7684457", "0.7655759", "0.72269845", "0.6452093", "0.6446049", "0.62887144", "0.6262514", "0.62480944", "0.62096334", "0.61689687", "0.6135056", "0.61272544", "0.6117382", "0.6106464", "0.60537565", "0.6052991", "0.60157996", "0.60116357", "0.5992897", "0.5985...
0.74007875
3
Returns balance for a specific asset.
def balance_for(self, asset): if self._session: return self._session.get_asset_balance(asset) return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def fetch_balance(self, params={}):\n await self.load_markets()\n response = await self.privateGetUserAssets(params)\n #\n # {\n # \"success\": \"1\",\n # \"data\": {\n # \"assets\": [\n # {\n # \"ass...
[ "0.6998977", "0.6915406", "0.6905411", "0.6901185", "0.6888168", "0.6864111", "0.67987245", "0.67295617", "0.67028135", "0.66516423", "0.66418517", "0.66074914", "0.65841806", "0.6577802", "0.653417", "0.653417", "0.65276855", "0.6508777", "0.6487161", "0.6486384", "0.6484204...
0.7870229
0
Constructs a ResNet20 model.
def attention_resnet20(num_classes, genotype,**kwargs): model = CifarAttentionResNet(CifarAttentionBasicBlock, 3, num_classes, genotype,**kwargs) return model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resnet18(**kwargs):\n model = ResNet(BasicBlock, [2, 2, 2, 2], **kwargs)\n return model", "def resnet10(**kwargs):\n model = ResNet(BasicBlock, [1, 1, 1, 1], **kwargs)\n return model", "def _init_model(self):\r\n\r\n self.model = ResNet152V2(weights='imagenet')", "def resnet18(pretrain...
[ "0.68054265", "0.6769135", "0.6736109", "0.66332465", "0.6598781", "0.65358216", "0.65358216", "0.65358216", "0.65358216", "0.65358216", "0.65321076", "0.6504928", "0.6504928", "0.6504928", "0.6490016", "0.6484339", "0.6465462", "0.63809526", "0.63374937", "0.63250715", "0.63...
0.6079336
35
Constructs a ResNet32 model.
def attention_resnet32(**kwargs): model = CifarAttentionResNet(CifarAttentionBasicBlock, 5, **kwargs) return model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resnet34(**kwargs):\n model = ResNet(BasicBlock, [3, 4, 6, 3], **kwargs)\n\n return model", "def resnet34(**kwargs):\n model = ResNet(BasicBlock, [3, 4, 6, 3], **kwargs)\n return model", "def resnet34(pretrained=False):\n model = ResNet(BasicBlock, [3, 4, 6, 3])\n if pretrained:\n ...
[ "0.6857811", "0.68577653", "0.6768416", "0.67630184", "0.67630184", "0.67630184", "0.6720212", "0.6706112", "0.66980666", "0.66313994", "0.6602754", "0.65995735", "0.6594192", "0.6594192", "0.6594192", "0.6594192", "0.6594192", "0.65856785", "0.6577216", "0.6555677", "0.65235...
0.0
-1
As markup_parser.find(...) but considering only the contents of the object, if any.
def find(self, **opts): return self.parser.find(search_inside=self, **opts)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find(self, name=None, attrs={}, recursive=True, text=None,\r\n **kwargs):\r\n r = None\r\n l = self.findAll(name, attrs, recursive, text, 1, **kwargs)\r\n if l:\r\n r = l[0]\r\n return r", "def exercise_soup(soup):\n\n if soup.is_xml:\n tag = soup....
[ "0.58088076", "0.56156546", "0.5473539", "0.5453928", "0.53706133", "0.53554076", "0.53485525", "0.5243441", "0.5210581", "0.5208208", "0.51579773", "0.5155597", "0.5153486", "0.5126259", "0.51010054", "0.50978875", "0.50926816", "0.50926816", "0.5082175", "0.5078788", "0.507...
0.5959158
0
Return a list of the attribute names defined on this tag.
def keys(self): return list(s.name.lower() for s in self.attributes)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_attribute_names(cls):\n return cls._attributes.keys()", "def get_attribute_list(self):\n attributes = [attr for attr in vars(self.entries[0]) if not attr.startswith('__')]\n return attributes", "def attrs(self):\n return list(name for name in self.__dict__\n ...
[ "0.83599883", "0.81126386", "0.80672854", "0.8040757", "0.80139613", "0.7993628", "0.779489", "0.76194197", "0.7553009", "0.73802024", "0.73802024", "0.73477286", "0.7317138", "0.7298589", "0.7298508", "0.7267542", "0.7244325", "0.72144645", "0.72113234", "0.7200922", "0.7196...
0.7529272
9
Return the number of lines in the parser's input.
def get_linecount(self): self._update_linetab(len(self.input)) lcount = len(self.__linepos) return lcount - (self.input.endswith('\n'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n_lines(self):\n try: \n return self._n_lines\n except AttributeError:\n self._n_lines = len(self.lines())\n return self._n_lines", "def no_of_lines():\n number_of_lines = len(open(FILE_NAME).readlines())\n return number_of_lines", "def __len__(self):\n ...
[ "0.70893157", "0.70837975", "0.7047926", "0.6941458", "0.69319934", "0.6898968", "0.6753637", "0.67148846", "0.6656068", "0.6598888", "0.65961856", "0.6588376", "0.6571244", "0.6522785", "0.65110785", "0.64612", "0.6434015", "0.6423785", "0.6403259", "0.64004654", "0.6382193"...
0.7796819
0
Load Yaml document, replace all hashes/mappings with AttrDict
def ordered_load(stream, Loader=yaml.Loader, object_pairs_hook=AttrDict): class Ordered_Loader(Loader): pass def construct_mapping(loader, node): loader.flatten_mapping(node) return object_pairs_hook(loader.construct_pairs(node)) Ordered_Loader.add_constructor( yaml.resolver...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_yaml(self, yaml):\n self.hwAddress = yaml.get('hwAddress')\n if self.hwAddress:\n self.hwAddress = self.hwAddress.lower()\n self.ip = yaml.get('IP')\n self.formulas = {}\n for f in yaml:\n if isinstance(yaml[f], dict):\n self.formulas...
[ "0.60840374", "0.6024036", "0.601915", "0.60054845", "0.59766436", "0.5961035", "0.58675313", "0.58308613", "0.58295536", "0.58166593", "0.580542", "0.5799267", "0.5797956", "0.5792827", "0.5769378", "0.5694039", "0.5674458", "0.56620085", "0.56424516", "0.5630868", "0.559333...
0.0
-1
This will clear the db after each test
def tearDown(self): Project.objects.all().delete()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tearDown(self):\r\n empty_db()", "def tearDown(self):\r\n empty_db()", "def tearDown(self):\r\n empty_db()", "def tearDown(self):\r\n empty_db()", "def tearDown(self):\r\n empty_db()", "def tearDown(self):\r\n empty_db()", "def tearDown(self):\r\n te...
[ "0.89044493", "0.89044493", "0.89044493", "0.89044493", "0.89044493", "0.89044493", "0.8740075", "0.8740075", "0.8740075", "0.8740075", "0.8740075", "0.8740075", "0.8740075", "0.8740075", "0.8740075", "0.8489243", "0.84169805", "0.84093654", "0.8405529", "0.8405529", "0.83240...
0.0
-1
This will test whether the new profile is an instance of the Profile class
def test_is_instance(self): self.assertTrue(isinstance(self.profile, Profile))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_is_instance(self):\n self.assertTrue(isinstance(self.new_user.profile, Profile))", "def test_user_has_profile_attached(self):\n user = self.users[0]\n self.assertTrue(hasattr(user, 'profile'))\n self.assertIsInstance(user.profile, ImagerProfile)", "def test_user_profile_cre...
[ "0.8785664", "0.7257248", "0.69495296", "0.672652", "0.66678697", "0.66532326", "0.65127534", "0.6467724", "0.6325855", "0.62845534", "0.62834173", "0.62581414", "0.62090695", "0.6125988", "0.60870045", "0.5942049", "0.59326804", "0.5924218", "0.59083617", "0.590499", "0.5896...
0.88005567
0
Rearrange image blocks into rows. This function can be used to implement 2D convolution as a `matml`, e.g., `tf.nn.conv2d(x, k) = tf.matmul(im2row(x), tf.reshape(k, [1, out_size]))`.
def im2row(x, block_shape, slice_step=(1, 1), data_format='NHWC', padding='VALID', name=None): with tf.name_scope(name or 'im2row'): data_format = _validate_data_format(data_format) padding = _validate_padding(padding) if padding == 'VALID': pas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pack_images(images, rows, cols):\n shape = tf.shape(input=images)\n width = shape[-3]\n height = shape[-2]\n depth = shape[-1]\n images = tf.reshape(images, (-1, width, height, depth))\n batch = tf.shape(input=images)[0]\n rows = tf.minimum(rows, batch)\n cols = tf.minimum(batch // rows...
[ "0.6867549", "0.68613553", "0.65635204", "0.6317079", "0.62568736", "0.6218436", "0.6158386", "0.61057496", "0.60747755", "0.6055959", "0.6055959", "0.6055959", "0.5998775", "0.5820042", "0.5772963", "0.5764869", "0.5692432", "0.5655144", "0.5647515", "0.5646014", "0.5610602"...
0.6770558
2
Prepare image for inputting to the neural network. Returns a Variable
def prep_image(img, inp_dim): orig_im = img dim = orig_im.shape[1], orig_im.shape[0] img = cv2.resize(orig_im, (inp_dim, inp_dim)) img_ = img[:, :, ::-1].transpose((2, 0, 1)).copy() img_ = torch.from_numpy(img_).float().div(255.0).unsqueeze(0) return img_, orig_im, dim
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def preprocess(self, img):\n img_ = image.load_img(img, target_size=(299, 299))\n img_ = image.img_to_array(img_)\n img_ = np.expand_dims(img_, axis=0)\n img_ = preprocess_input(img_)\n return img_", "def recreate_image(im_as_var):\n recreated_im = im_as_var.data.numpy()[0]\...
[ "0.6291536", "0.62114257", "0.62105995", "0.6195852", "0.6168508", "0.61647016", "0.61413085", "0.61290294", "0.6119026", "0.6114515", "0.6112793", "0.61009884", "0.60939866", "0.60806966", "0.6080033", "0.6020758", "0.601292", "0.5997404", "0.5967493", "0.59661937", "0.59604...
0.0
-1
Display an error message dialog with an OK button
def warning(text, window=None): message(text, u'Atenção', M_WARNING, B_OK, window)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _show_error_dialog(exception):\n message_box = acm.GetFunction('msgBox', 3)\n ok_button = 0\n error_icon = 16\n message_box('Error', str(exception), ok_button | error_icon)", "def errorDialog(self, errormessage):\r\n Tk.tkMessageBox.showerror(self, 'Error', errormessage)", "def errorDial...
[ "0.7990651", "0.7796173", "0.777093", "0.7627543", "0.7567406", "0.7561154", "0.75003237", "0.74963856", "0.7486464", "0.74700665", "0.74240553", "0.7392879", "0.7345544", "0.7302868", "0.727927", "0.7278214", "0.7266168", "0.72611666", "0.7228451", "0.7187574", "0.71833485",...
0.0
-1
Display an error message dialog with an OK button
def error(text, window=None): message(text, u'Erro', M_ERROR, B_OK, window)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _show_error_dialog(exception):\n message_box = acm.GetFunction('msgBox', 3)\n ok_button = 0\n error_icon = 16\n message_box('Error', str(exception), ok_button | error_icon)", "def errorDialog(self, errormessage):\r\n Tk.tkMessageBox.showerror(self, 'Error', errormessage)", "def errorDial...
[ "0.7990651", "0.7796173", "0.777093", "0.7627543", "0.7567406", "0.7561154", "0.75003237", "0.74963856", "0.7486464", "0.74700665", "0.74240553", "0.7392879", "0.7345544", "0.7302868", "0.727927", "0.7278214", "0.7266168", "0.72611666", "0.7228451", "0.7187574", "0.71833485",...
0.6728764
38
Method retrieving product price regardless of promotions
def get_simple_price(self, content, date = None): prices = [] for element in content: product = element['product'] quantity = element['quantity'] history = product.history_set.filter(created__gte = date-timedelta(hours = 24)).order_by('-created') if len(history)>0: prices.append((element, quantity*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_price(self):\r\n return self.price", "def get_price(self):\n return self.sale_price if self.sale_price else self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_price(self):\n return self.price", "def get_...
[ "0.75077236", "0.7429356", "0.7321421", "0.7321421", "0.7321421", "0.72734624", "0.7262753", "0.72165847", "0.71952164", "0.71706617", "0.7056544", "0.702859", "0.70231146", "0.7008821", "0.6968741", "0.6928531", "0.69056505", "0.6900999", "0.68991107", "0.68770814", "0.68742...
0.621966
60
Get path where trader is running in.
def _get_trader_dir(temp_name: str): cwd = Path.cwd() temp_path = cwd.joinpath(temp_name) # If .vntrader folder exists in current working directory, # then use it as trader running path. if temp_path.exists(): return cwd, temp_path # Otherwise use home path of system. home_path = P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_path() -> str:\n return os.path.dirname(os.path.realpath(__file__))", "def current_trades_path(self):\n trades_dir = Path(\"espn/trades\")\n if not trades_dir.exists() or not trades_dir.is_dir():\n LOGGER.info(\"directory for trades does not exist, creating it now\")\n ...
[ "0.7459081", "0.7198007", "0.71936923", "0.71873873", "0.69942874", "0.6970728", "0.6934121", "0.6924056", "0.69168085", "0.69168085", "0.69146365", "0.68379545", "0.6828697", "0.6804567", "0.6730282", "0.6702411", "0.66995096", "0.6697262", "0.6670406", "0.6670406", "0.66650...
0.64867556
40
Get path for temp folder with folder name.
def get_folder_path(folder_name: str): folder_path = TEMP_DIR.joinpath(folder_name) if not folder_path.exists(): folder_path.mkdir() return folder_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_temp_folder(self):\n folder_name = str(time.time()).replace(\".\", \"\")\n folder_path = os.path.join(self.temp_folder, folder_name)\n os.makedirs(folder_path)\n self.logger.debug(f\"Created nested temp folder at {folder_path}\")\n return folder_path", "def get_fol...
[ "0.7564088", "0.7472838", "0.74263763", "0.7266514", "0.7176345", "0.71352065", "0.69447136", "0.69116396", "0.6877877", "0.6869686", "0.6867788", "0.68660843", "0.68176615", "0.6788788", "0.67191666", "0.6711163", "0.66805774", "0.6664047", "0.6653994", "0.6631358", "0.66311...
0.76120293
0
Save data into json file in temp path.
def save_json(filename: str, data: dict): filepath = get_file_path(filename) with open(filepath, mode="w+", encoding="UTF-8") as f: json.dump( data, f, indent=4, ensure_ascii=False )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _write(self, filename, data):\n fullpath = os.path.join(self._tempdir, filename)\n with open(fullpath, 'w') as ofile:\n json.dump(data, ofile)\n return fullpath", "def save_json():\r\n with open(os.path.join(cwd, 'data.json'), 'w') as f:\r\n json.dump(data, f)", "d...
[ "0.7984496", "0.78909826", "0.7799274", "0.77699864", "0.7734938", "0.7716659", "0.7681191", "0.75846934", "0.7529496", "0.7481133", "0.7467559", "0.7459418", "0.74591017", "0.73854935", "0.7375848", "0.7343941", "0.7334746", "0.73193693", "0.72733265", "0.7148962", "0.712516...
0.6702047
60
Return tf.Example generated for input (source, target).
def _convert_to_tf_example(example, tokenizer, rules, config, max_sizes=None): source = example[0] target = example[1] tokens = source.split(" ") num_tokens = len(tokens) # Tokenize. (wordpiece_ids, num_wordpieces, token_start_wp_idx, token_end_wp_idx) = tokenization_utils.get_wordpiece_inputs( t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_example(X, y, n, target_type='int'):\n\n feature = {}\n feature['X'] = tf.train.Feature(\n float_list=tf.train.FloatList(value=X.flatten()))\n feature['n'] = tf.train.Feature(\n int64_list=tf.train.Int64List(value=n.flatten()))\n\n if target_type == 'int':\n f...
[ "0.7200703", "0.7054768", "0.63515484", "0.63070923", "0.62983334", "0.6239659", "0.61383206", "0.6056011", "0.60341537", "0.60294867", "0.5946218", "0.5917854", "0.5829136", "0.57980055", "0.57837766", "0.5753489", "0.57359165", "0.57216424", "0.56756085", "0.5670556", "0.56...
0.5449919
38
Function to get the best step size based on Wolfe conditions. Temporary steps are taken with adaptive step size to check if the Wolfe condition is met, and returns the update with the highest gain (loss) in the (negative) log likelihood.
def _choose_step(self, X, cluster_prob, means, covariances, alpha=1.0, tau=0.5): initial_ll = self._get_log_likelihood(X, cluster_prob, means, covariances) while 1: covs_grad = self._sigma_grad(X, cluster_prob, means, covariances) means_grad = self._mu_grad(X, cluster_prob, means...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FrankWolfeStepSize(self, targetFlows, precision = FRANK_WOLFE_STEPSIZE_PRECISION):\n GuessValue = .5\n step = .25\n iterations = 0\n while True:\n LastStep = GuessValue\n FWF = 0\n for l in self.link:\n linkDelta = targetFlows[l] - self.link[l].flow\n...
[ "0.6409683", "0.6351052", "0.6188639", "0.607659", "0.5966872", "0.590952", "0.58333313", "0.58236814", "0.5812185", "0.5754255", "0.57131684", "0.5683247", "0.5617028", "0.5555603", "0.5529865", "0.5473802", "0.54603", "0.5454885", "0.5442035", "0.54390204", "0.54352283", ...
0.0
-1
Generate a presigned URL to share an S3 object.
def create_presigned_url(self, bucket_name, object_name, version_id=None, expiration=3600): optional_get_object_args = {} if version_id: optional_get_object_args["VersionId"] = version_id return self._client.generate_presigned_url( "get_object", Params={"Buck...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_presigned_url(bucket_name, object_name):\n\n logger = logging.getLogger(\"SimpleReplayLogger\")\n\n s3_client = boto3.client('s3')\n try:\n response = s3_client.generate_presigned_url('get_object',\n Params={'Bucket': bucket_name,\n ...
[ "0.78117466", "0.78018427", "0.7710399", "0.7695114", "0.7681602", "0.7670291", "0.7665101", "0.7615917", "0.7542682", "0.7523503", "0.74855345", "0.74198645", "0.734909", "0.72295886", "0.7174961", "0.712802", "0.70851696", "0.69830734", "0.6980432", "0.69759345", "0.6955798...
0.7260495
13
Build personalization mock instance from a mock dict
def build_personalization(personalization): mock_personalization = Personalization() for to_addr in personalization['to_list']: personalization.add_to(to_addr) for cc_addr in personalization['cc_list']: personalization.add_to(cc_addr) for bcc_addr in personalization['bcc_list']: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_mock_personalization_dict():\n mock_pers = dict()\n\n mock_pers['to_list'] = [Email(\"test1@example.com\",\n \"Example User\"),\n Email(\"test2@example.com\",\n \"Example User\")]\n\n mock_pers['cc_list'] ...
[ "0.7227917", "0.71913016", "0.5935387", "0.5676039", "0.56470394", "0.56279707", "0.560038", "0.55305165", "0.5497064", "0.54886824", "0.54856783", "0.5457688", "0.5451727", "0.54167384", "0.54046017", "0.5400025", "0.5387686", "0.5387686", "0.5369571", "0.53296673", "0.52545...
0.6781945
2
Return a config entry for the flow or abort if already configured.
async def _async_create_entry_or_abort(self) -> FlowResult: assert self.ws_address is not None if existing_config_entries := self._async_current_entries(): config_entry = existing_config_entries[0] self.hass.config_entries.async_update_entry( config_entry, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config() -> Optional[Config]:\n return CurrentConfig.get()", "def __previous_config(self):\n if self.__during_ha_import:\n return self.__config_before_ha_import\n try:\n return self.core.config_manager.get(\n self.NAME,\n which_configur...
[ "0.6301572", "0.6244465", "0.60991144", "0.6082767", "0.60372484", "0.59984225", "0.59984225", "0.58877337", "0.5847886", "0.5833606", "0.57443905", "0.57239795", "0.5719059", "0.5690515", "0.56557983", "0.5651104", "0.56357414", "0.561335", "0.56114197", "0.56101674", "0.560...
0.0
-1
Sets the name of this Action. The name of the action, as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
def name(self, name: "str"): if name is None: raise ValueError("Invalid value for `name`, must not be `None`") self._attrs["name"] = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def action_name(self, action_name: \"str\"):\n if action_name is None:\n raise ValueError(\"Invalid value for `action_name`, must not be `None`\")\n self._attrs[\"actionName\"] = action_name", "def set_name(self, name):\n\t\tself.name_ = name", "def set_name(self, name):\n asser...
[ "0.7541588", "0.714387", "0.71147466", "0.707843", "0.7070231", "0.7070231", "0.7070231", "0.7070231", "0.703657", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0.6990582", "0....
0.0
-1
Gets the created_by of this Action. The principal that created this action template.
def created_by(self) -> "str": return self._attrs.get("createdBy")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_by(self):\n return self._created_by", "def created_by(self) -> str:\n return pulumi.get(self, \"created_by\")", "def created_by(self) -> Optional[str]:\n return pulumi.get(self, \"created_by\")", "def created_by(self) -> Optional[str]:\n return pulumi.get(self, \"creat...
[ "0.8232145", "0.7920716", "0.7869939", "0.7869939", "0.7869939", "0.7869939", "0.7869939", "0.7869939", "0.7768678", "0.76987773", "0.7529534", "0.752064", "0.7325127", "0.72745264", "0.7170561", "0.7161829", "0.7098213", "0.7098213", "0.6959352", "0.6901025", "0.6901025", ...
0.7383296
15
Sets the created_by of this Action. The principal that created this action template.
def created_by(self, created_by: "str"): self._attrs["createdBy"] = created_by
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_by(self, created_by):\n\n self._created_by = created_by", "def created_by(self, created_by):\n\n self._created_by = created_by", "def created_by(self, created_by):\n\n self._created_by = created_by", "def created_by(self, created_by):\n\n self._created_by = created_by"...
[ "0.7854841", "0.7854841", "0.7854841", "0.7854841", "0.7854841", "0.7854841", "0.73793906", "0.70586365", "0.70300126", "0.70300126", "0.70300126", "0.70300126", "0.70300126", "0.70300126", "0.6791496", "0.6778444", "0.6778444", "0.6778444", "0.6778444", "0.6736256", "0.66544...
0.7650044
8
Gets the updated_at of this Action. The date and time this action template was updated (ISO8601 date/time with zone).
def updated_at(self) -> "datetime": return self._attrs.get("updatedAt")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updated_at(self) -> str:\n return pulumi.get(self, \"updated_at\")", "def updated_at(self):\n return self._updated_at", "def updated_at(self):\n return self._updated_at", "def updated_at(self):\n return self._updated_at", "def updated_at(self) -> pulumi.Output[str]:\n ...
[ "0.8263809", "0.8003104", "0.8003104", "0.8003104", "0.7963", "0.7659269", "0.7628157", "0.75440395", "0.7084764", "0.7084764", "0.7084032", "0.70445544", "0.6960209", "0.69056475", "0.68546337", "0.6709228", "0.6709228", "0.66293466", "0.6581125", "0.6570225", "0.6561802", ...
0.76662296
6
Sets the updated_at of this Action. The date and time this action template was updated (ISO8601 date/time with zone).
def updated_at(self, updated_at: "datetime"): self._attrs["updatedAt"] = updated_at
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updated_at(self, updated_at):\n\n self._updated_at = updated_at", "def updated_at(self, updated_at):\n\n self._updated_at = updated_at", "def updated_at(self, updated_at):\n\n self._updated_at = updated_at", "def updated_at(self, updated_at):\n\n self._updated_at = updated_at"...
[ "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.76279855", "0.7339446", "0.6864951", "0.6751799", "0.6751799", "0.6751799", "0.66636556", "0.66636556", "0.66636556", "0.6577296", "0.6494024", "0....
0.7776772
1
Gets the updated_by of this Action. The principal that updated this action template.
def updated_by(self) -> "str": return self._attrs.get("updatedBy")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updated_by(self):\n return self._updated_by", "def updated_by(self) -> Optional[pulumi.Input['UserInfoArgs']]:\n return pulumi.get(self, \"updated_by\")", "def updated_by(self) -> Optional['outputs.UserInfoResponse']:\n return pulumi.get(self, \"updated_by\")", "def created_by(self):...
[ "0.79385346", "0.7508264", "0.7353987", "0.67640674", "0.67457896", "0.659792", "0.659792", "0.659792", "0.659792", "0.659792", "0.659792", "0.6595865", "0.65433884", "0.6538879", "0.64585453", "0.64180905", "0.6407515", "0.6407515", "0.6404717", "0.6378871", "0.6378871", "...
0.7425515
3