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
Given some YAML data, returns a Python dictionary of the decoded data.
def from_yaml(self, content): if yaml is None: raise UnsupportedDeserializationFormat("Usage of the YAML aspects requires yaml.") return yaml.load(content, Loader=DeliciousCakeLoader)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decode(self,data):\n import yaml\n return yaml.load(data.decode('utf-8'))", "def load_yaml(path: str) -> Dict[str, Any]:\n with open(path, \"r\", encoding=\"utf8\") as fp:\n data = yaml.safe_load(fp)\n return data", "def decode_plist(data: bytes, format: plistlib.PlistFormat ...
[ "0.7853358", "0.66340005", "0.6626472", "0.6574009", "0.6567654", "0.6452953", "0.64397526", "0.6328967", "0.63035524", "0.62361264", "0.61895347", "0.6178947", "0.6170322", "0.61695206", "0.61465263", "0.6069981", "0.6046829", "0.6044219", "0.6029651", "0.602275", "0.5994938...
0.6240451
9
Sets up a fresh ``TestApiClient`` instance. If you are employing a custom serializer, you can pass the class to the ``serializer=`` kwarg.
def __init__(self, serializer=None): self.client = Client() self.serializer = serializer if not self.serializer: self.serializer = Serializer()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUpClass(cls):\n\n cls.client = TestClient(fastapi_app.app)\n log.info('Completed initialization for FastAPI based REST API tests')", "def setUp(self):\n self.client = api.Client(config.get_config(), api.json_handler)", "def __init__(self, client, use_stubs=True):\n super()._...
[ "0.71280473", "0.7047191", "0.67063236", "0.67063236", "0.67063236", "0.67063236", "0.67063236", "0.66958034", "0.6658839", "0.6648448", "0.6648448", "0.6591276", "0.65784484", "0.65784484", "0.65784484", "0.6565896", "0.65395904", "0.65109086", "0.6473594", "0.6473594", "0.6...
0.7342596
0
Performs a simulated ``PATCH`` request to the provided URI. Optionally accepts a ``data`` kwarg. Unlike ``GET``, in ``PATCH`` the ``data`` gets serialized & sent as the body instead of becoming part of the URI.
def patch(self, uri, format='json', data=None, authentication=None, **kwargs): content_type = self.get_content_type(format) kwargs['content_type'] = content_type if data is not None: kwargs['data'] = self.serializer.serialize(data, format=content_type) if authenticat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch(self, uri, data=None, **kwargs):\n return self.session.patch(uri, data=data, **kwargs)", "def patch(url, data=None, **kwargs):\n\n return request('patch', url, data=data, **kwargs)", "def httpPatch(self, url='', data='', params={}, headers={}):\n\n return self.httpRequest('PATCH', ur...
[ "0.8076148", "0.796969", "0.7752265", "0.757951", "0.74033654", "0.73889875", "0.7138142", "0.7117914", "0.7026602", "0.6790582", "0.67652714", "0.673733", "0.6645499", "0.6576483", "0.6573789", "0.6473399", "0.6451276", "0.6418717", "0.63956666", "0.6358712", "0.63524735", ...
0.7594948
3
Creates & returns the HTTP ``Authorization`` header for use with BASIC Auth.
def create_basic(self, username, password): import base64 return 'Basic %s' % base64.b64encode(':'.join([username, password]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buildHeader(self):\n if self.key:\n userString = self.user+b\":\"+self.key\n else:\n userString = self.user+b\":\"\n \n encodedUserString = b64encode(userString)\n decodedUserString = encodedUserString.decode(\"ascii\")\n self.basicAuthHeader ...
[ "0.7319791", "0.7224981", "0.71700853", "0.7093998", "0.7091341", "0.703689", "0.6984674", "0.6921208", "0.6903912", "0.68323785", "0.6818913", "0.679293", "0.6736904", "0.6729793", "0.66252935", "0.661051", "0.661051", "0.6498154", "0.64945173", "0.64784914", "0.64305276", ...
0.5779016
61
Creates & returns the HTTP ``Authorization`` header for use with ``ApiKeyAuthentication``.
def create_apikey(self, username, api_key): return 'ApiKey %s:%s' % (username, api_key)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_authorization_header(self, **kwargs):\n return {\"Authorization\": \"Bearer {}\".format(self.create_jwt(**kwargs))}", "def create_auth_header(api_token):\n return {'Authorization': f'token {api_token}'}", "def get_authorization_header(self):\n return {\"Authorization\": \"Bearer {}\...
[ "0.79029155", "0.76349175", "0.7616474", "0.7457935", "0.7305883", "0.7305883", "0.7078373", "0.7045101", "0.68265605", "0.67640316", "0.6697808", "0.6673068", "0.6568124", "0.6563028", "0.6517762", "0.65161633", "0.6454743", "0.6442109", "0.6433472", "0.6398316", "0.6390734"...
0.60155815
58
Creates & returns the HTTP ``Authorization`` header for use with Digest Auth.
def create_digest(self, username, api_key, method, uri): from delicious_cake.authentication import ( hmac, sha1, uuid, python_digest,) new_uuid = uuid.uuid4() opaque = hmac.new(str(new_uuid), digestmod=sha1).hexdigest() return python_digest.build_authorization_reques...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_authorization_header(username, password, creation=None, nonce=None):\n \n digest, creation, nonce = create_password_digest(password, creation, nonce)\n \n header = 'UsernameToken Username=\"%s\", PasswordDigest=\"%s\", Created=\"%s\", Nonce=\"%s\"' % (\n username, digest, creation, no...
[ "0.7130063", "0.6842859", "0.68218744", "0.67306155", "0.6693262", "0.6407943", "0.63962346", "0.6326362", "0.6267268", "0.6188872", "0.617579", "0.6160646", "0.6152257", "0.6127644", "0.6102611", "0.60800135", "0.6057633", "0.60469854", "0.60469854", "0.6044261", "0.6041835"...
0.67848086
3
Creates & returns the HTTP ``Authorization`` header for use with Oauth.
def create_oauth(self, user): from oauth_provider.models import Consumer, Token, Resource # Necessary setup for ``oauth_provider``. resource, _ = Resource.objects.get_or_create(url='test', defaults={ 'name': 'Test Resource' }) consumer, _ = Consumer.objects.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_authorization_header(self, **kwargs):\n return {\"Authorization\": \"Bearer {}\".format(self.create_jwt(**kwargs))}", "def build_header(self):\n authstring = \"Bearer \" + self.auth_token\n header = {\n \"Authorization\": authstring,\n \"Content-Type\": \"app...
[ "0.77402943", "0.75087076", "0.74638504", "0.72214884", "0.71171105", "0.7023979", "0.7023043", "0.6991982", "0.69452", "0.6878812", "0.6878812", "0.6838401", "0.6816353", "0.6734694", "0.6732963", "0.66030836", "0.6587415", "0.65705407", "0.65083236", "0.65037996", "0.649670...
0.6386616
24
Ensures the response is returning a HTTP 200.
def assertHttpOK(self, resp): return self.assertEqual(resp.status_code, 200)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assert200(self, response):\n self.assertEqual(response.status_code, 200)", "def check_status(response):\n if response.status_code == 200:\n return True", "def _check_200(self, response):\n if response.code != 200:\n raise YubiKeyVerificationError(\n \"Recei...
[ "0.7938829", "0.772116", "0.7639664", "0.76110756", "0.7579124", "0.7499769", "0.74345255", "0.73750305", "0.71393454", "0.70920306", "0.70421", "0.7041117", "0.7041117", "0.70404863", "0.7027915", "0.69213134", "0.6889967", "0.6838135", "0.68068576", "0.6775905", "0.6775406"...
0.7407983
7
Ensures the response is returning a HTTP 201.
def assertHttpCreated(self, resp): return self.assertEqual(resp.status_code, 201)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def response_check(response):\n print(response)\n print(response.text)\n return response.status_code == 201", "def response_201(description, schema=None):\n return response(201, {\n \"description\": description,\n \"schema\": schema or \"__self__\",\n })", "def response_201_created...
[ "0.7565979", "0.7402724", "0.7250557", "0.6872894", "0.67679614", "0.6635371", "0.6523232", "0.64580125", "0.63901186", "0.63509244", "0.6331898", "0.6271732", "0.6082825", "0.60827667", "0.6059668", "0.60135883", "0.5989146", "0.5980217", "0.5980217", "0.5956743", "0.5955998...
0.77290875
0
Ensures the response is returning HTTP 204.
def assertHttpNoContent(self, resp): return self.assertEqual(resp.status_code, 204)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_valid_cancel_response(response: HTTPResponse) -> bool:\n return response.status_code == 204", "def get204(self):\n bad = ('content-length', 'content-type')\n for h in bad:\n bottle.response.set_header(h, 'foo')\n bottle.status = 204\n for h, v in bottle.respons...
[ "0.7896424", "0.7577545", "0.74138534", "0.7140695", "0.6863875", "0.68156505", "0.6569978", "0.6482058", "0.6442881", "0.6411783", "0.6360287", "0.63140124", "0.61087763", "0.59918267", "0.59223133", "0.5852847", "0.58454144", "0.583439", "0.5788223", "0.57782143", "0.573709...
0.8238245
0
Ensures the response is returning a HTTP 303.
def assertHttpSeeOther(self, resp): return self.assertEqual(resp.status_code, 303)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def redirect_see_other(self, location):\n self.status = 303\n self.set_header('Location', location)", "def assertHttpNotModified(self, resp):\r\n return self.assertEqual(resp.status_code, 304)", "def maybe_raise_304(request, response):\n if request.method not in (consts.METHOD_HEAD, con...
[ "0.68732953", "0.63391995", "0.62620664", "0.60503554", "0.592402", "0.5892194", "0.5832724", "0.58121383", "0.57434475", "0.56933373", "0.56909317", "0.5684102", "0.56678915", "0.56550056", "0.5603425", "0.55731463", "0.5570283", "0.5541419", "0.54840755", "0.5483576", "0.54...
0.8128117
0
Ensures the response is returning a HTTP 304.
def assertHttpNotModified(self, resp): return self.assertEqual(resp.status_code, 304)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assertHttpNotModified(self, response):\n self.assertEqual(response.status_code, 304)\n self.assertEqual(response.content, b'')", "def not_modified(self):\n self.status = 304", "def maybe_raise_304(request, response):\n if request.method not in (consts.METHOD_HEAD, consts.METHOD_GET)...
[ "0.7930896", "0.78272265", "0.7808683", "0.7782452", "0.73721576", "0.71786124", "0.7112794", "0.6997171", "0.6825168", "0.6557326", "0.65200156", "0.6374649", "0.6361528", "0.6275578", "0.62712544", "0.62165684", "0.6215826", "0.60442156", "0.5957684", "0.59441185", "0.58505...
0.83741283
0
Ensures the response is returning a HTTP 401.
def assertHttpUnauthorized(self, resp): return self.assertEqual(resp.status_code, 401)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unauthorized():\n return HttpError(401)", "def check_unauthorized_response(response: HTTPResponse) -> bool:\n return response.status_code == 403", "def _handle_authentication_error(self):\n response = make_response('Access Denied')\n response.headers['WWW-Authenticate'] = self.auth.get_...
[ "0.79064614", "0.7694163", "0.7458772", "0.7433221", "0.73901856", "0.72239524", "0.7216813", "0.71336293", "0.6974692", "0.69368577", "0.69290894", "0.6916384", "0.6906962", "0.68942577", "0.6892944", "0.6885096", "0.6837186", "0.6826796", "0.68238544", "0.68238544", "0.6815...
0.78266346
1
Ensures the response is returning a HTTP 404.
def assertHttpNotFound(self, resp): return self.assertEqual(resp.status_code, 404)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assert404(self, response):\n self.assertEqual(response.status_code, 404)", "def error_404(self):\n response = self.render_template('404.html')\n response.status_code = 404\n return response", "def handleStatus_404(self):\n log.err('HTTP Error 404')", "def assert404(self...
[ "0.790908", "0.78814924", "0.7863589", "0.78222686", "0.77748805", "0.77714616", "0.77214867", "0.761703", "0.76067454", "0.75657207", "0.75579596", "0.75170684", "0.7512387", "0.7511083", "0.7508464", "0.7507327", "0.7438006", "0.7409498", "0.7390723", "0.73422486", "0.73359...
0.76956916
7
Ensures the response is returning a HTTP 405.
def assertHttpMethodNotAllowed(self, resp): return self.assertEqual(resp.status_code, 405)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def response_method_not_allowed():\n\n return b\"HTTP/1.1 405 Method Not Allowed\\r\\n\"", "def response_405_method_not_allowed(self):\n errormsg = 'Method Not Allowed: {0}'.format(self.request.method)\n return self.create_response(405, errormsg, body={'error': errormsg})", "def assertHttpMeth...
[ "0.827428", "0.8162962", "0.81502956", "0.80705625", "0.80660796", "0.8049071", "0.77447253", "0.75813985", "0.74800783", "0.7455237", "0.74060255", "0.7390705", "0.7367596", "0.723841", "0.721052", "0.7201132", "0.7089467", "0.700921", "0.695928", "0.6947804", "0.69314986", ...
0.8194176
1
This method ensures that the keys of the ``data`` match up to the keys of ``expected``. It covers the (extremely) common case where you want to make sure the keys of a response match up to what is expected. This is typically less fragile than testing the full structure, which can be prone to data changes.
def assertKeys(self, data, expected): self.assertEqual(sorted(data.keys()), sorted(expected))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verifyData(self, expectedDict):\n pass", "def _validate_dict_data(self, expected, actual):\n for k, v in expected.iteritems():\n if k in actual:\n if (isinstance(v, basestring) or\n isinstance(v, bool) or\n isinstance(v, (i...
[ "0.7880229", "0.7131019", "0.6944203", "0.67076516", "0.6644849", "0.6540538", "0.6530971", "0.65075475", "0.64853203", "0.6450126", "0.6436165", "0.6423227", "0.6404842", "0.63923526", "0.63868815", "0.6374971", "0.6365855", "0.6343817", "0.63314325", "0.62999284", "0.628989...
0.77329355
1
Returns whether or not the user has exceeded their throttle limit. Always returns ``False``, as this implementation does not actually throttle the user.
def should_be_throttled(self, identifier, **kwargs): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_rate_limit(self):\n # Already received 429 from server\n if self.rate_limit_sleep:\n msg = f\"请求过于频繁,已被BitMEX限制,请等待{self.rate_limit_sleep}秒后再试\"\n self.gateway.write_log(msg)\n return False\n # Just local request limit is reached\n elif not sel...
[ "0.71637654", "0.68461096", "0.68322796", "0.6784584", "0.67728996", "0.6698457", "0.6509276", "0.65054375", "0.6485945", "0.6483057", "0.6455917", "0.6443118", "0.64237595", "0.6419088", "0.6403148", "0.63092524", "0.63026386", "0.63025075", "0.6262011", "0.6240201", "0.6212...
0.64176446
14
Returns whether or not the user has exceeded their throttle limit. Maintains a list of timestamps when the user accessed the api within the cache. Returns ``False`` if the user should NOT be throttled or ``True`` if the user should be throttled.
def should_be_throttled(self, identifier, **kwargs): key = self.convert_identifier_to_key(identifier) # Make sure something is there. cache.add(key, []) # Weed out anything older than the timeframe. minimum_time = int(time.time()) - int(self.timeframe) times_acc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_rate_limited(self, force_update=False, ignore_stale=False):\n status = self.request_rate_limit_status(force_update, ignore_stale)\n return status[\"remaining\"] <= 0", "def _throttle_check(self, request):\n identifier = self._meta.authentication.get_identifier(request)\n\n # Ch...
[ "0.6790206", "0.6717661", "0.66364104", "0.6563438", "0.6547813", "0.6522983", "0.65170264", "0.6475759", "0.6452944", "0.6339649", "0.62557715", "0.62415576", "0.61852133", "0.61314553", "0.6081574", "0.6078226", "0.5962146", "0.5950248", "0.59409", "0.5909863", "0.5889914",...
0.7509203
0
RFC 2822 date formatter
def format_date(d): # workaround because Django's dateformat utility requires a datetime # object (not just date) dt = aware_datetime(d.year, d.month, d.day, 0, 0, 0) return dateformat.format(dt, 'j M Y')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_date(self, data):\r\n if self.datetime_formatting == 'rfc-2822':\r\n return format_date(data)\r\n\r\n return data.isoformat()", "def strfdate(self, fmt):\n pattern = r'%({})'.format(reduce(lambda x, y: '{}|{}'.format(x, y), FORMAT_MAP.keys()))\n for f in re.finda...
[ "0.7483799", "0.66591036", "0.6650875", "0.6634145", "0.6500568", "0.64674264", "0.6455783", "0.6437112", "0.63685936", "0.63325226", "0.62979186", "0.6276806", "0.6276609", "0.62255204", "0.62238866", "0.6215531", "0.61853355", "0.61783", "0.61441535", "0.6123688", "0.610962...
0.55592746
92
RFC 2822 time formatter
def format_time(t): # again, workaround dateformat input requirement dt = aware_datetime(2000, 1, 1, t.hour, t.minute, t.second) return dateformat.format(dt, 'H:i:s O')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_time(self, data):\r\n if self.datetime_formatting == 'rfc-2822':\r\n return format_time(data)\r\n\r\n return data.isoformat()", "def format_time(self, time):\n hh = time[0:2]\n mm = time[2:4]\n ss = time[4:]\n return \"%s:%s:%s UTC\" % (hh,mm,ss)", ...
[ "0.76340127", "0.7151466", "0.6709251", "0.67038286", "0.6646695", "0.6599227", "0.6587984", "0.65410787", "0.6511673", "0.65063095", "0.6418841", "0.6407892", "0.6406361", "0.6395881", "0.6394002", "0.638684", "0.6356853", "0.6341619", "0.63362694", "0.6327491", "0.63262755"...
0.66229934
5
Rolls back the transaction, then closes the cursor
def rollback(self, cursor): with warnings.catch_warnings(): warnings.simplefilter("ignore") connection = cursor.connection connection.rollback() self._close_cursor(cursor)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rollback_transaction(self):\n cursor = self._cursor()\n cursor.close()\n self._db.rollback()\n self._end_transaction()", "def RollBack(self):\r\n self.conn.rollback()", "def rollback(self):\r\n self.db.rollback()", "def _end_transaction(self):\n self._db.a...
[ "0.8367313", "0.7846241", "0.74062705", "0.7332911", "0.7326742", "0.7240418", "0.72183955", "0.72058105", "0.7139467", "0.712701", "0.7117892", "0.70757395", "0.70459586", "0.70356464", "0.70237327", "0.696789", "0.6967672", "0.6967672", "0.6967672", "0.69630826", "0.6847721...
0.79432493
1
Confirm that the paper is not already in the current set of papers
def checkPaper(self,event=None): if self.title.getVal() not in self.paperList: self.paperList.append(self.title.getVal()) self.paperList.sort() self.title.updateVals(self.paperList) return ## This section of code should probably go into setData. ....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def consistent_paper_ids():\n paper_ids = PAPERS_DF['CURATED-COFs paper ID'].str.lower()\n cof_ids = list(FRAMEWORKS_DF['CURATED-COFs ID'].str.lower()) + list(FRAMEWORKS_DISCARDED_DF['CURATED-COFs ID'].str.lower())\n cof_ids_paper_ids = { cof_id: f'p{cof_id[:4]}' for cof_id in cof_ids }\n paper_ids_set...
[ "0.65667135", "0.576984", "0.57557976", "0.5590175", "0.5564247", "0.54752856", "0.5409141", "0.5375455", "0.5341315", "0.5323894", "0.52699083", "0.5245454", "0.5175397", "0.51713836", "0.5163926", "0.5162682", "0.51438636", "0.5082637", "0.5081683", "0.50778663", "0.5048289...
0.58469963
1
Gets the owner_id of this User.
def owner_id(self): return self._owner_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def owner_id(self) -> str:\n return pulumi.get(self, \"owner_id\")", "def owner_id(self) -> str:\n return self.__owner_id", "def owner_id(self) -> Optional[str]:\n return pulumi.get(self, \"owner_id\")", "def owner_id(self) -> int:\n return self.proto.owner", "def bot_owner_id(s...
[ "0.83744425", "0.8353622", "0.8329249", "0.8013848", "0.788471", "0.7878415", "0.7777347", "0.77658355", "0.77593607", "0.75711924", "0.7440445", "0.7440445", "0.7372656", "0.7350895", "0.73441017", "0.73261577", "0.7291739", "0.7228984", "0.7182677", "0.7176582", "0.7160329"...
0.8581755
0
Sets the owner_id of this User.
def owner_id(self, owner_id): self._owner_id = owner_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def owner_id(self, owner_id):\n\n self._owner_id = owner_id", "def owner_id(self, owner_id):\n if owner_id is None:\n raise ValueError(\"Invalid value for `owner_id`, must not be `None`\") # noqa: E501\n\n self._owner_id = owner_id", "def set_owner(self, owner):\n self._...
[ "0.8568209", "0.8119774", "0.77956396", "0.7681927", "0.73618996", "0.7312287", "0.7191758", "0.7191758", "0.7191758", "0.7191758", "0.7139", "0.7139", "0.7139", "0.7139", "0.7034663", "0.69649446", "0.6747203", "0.665887", "0.66583693", "0.66071224", "0.65972215", "0.65324...
0.8510191
1
Sets the created_at of this User.
def created_at(self, created_at): self._created_at = created_at
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_at(self, created_at: \"datetime\"):\n self._attrs[\"createdAt\"] = created_at", "def created_at(self, created_at: \"datetime\"):\n self._attrs[\"createdAt\"] = created_at", "def created_at(self, created_at: \"datetime\"):\n self._attrs[\"createdAt\"] = created_at", "def creat...
[ "0.77213824", "0.77213824", "0.77213824", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7627927", "0.7603173", ...
0.76181597
20
Gets the identifier of this User.
def identifier(self): return self._identifier
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self):\n return self.user_id", "def getId(self):\n return self.getUserName()", "def getId(self):\n return self.getUserName()", "def get_id(self) -> int:\n return self.user_id", "def get_user_id(self):\n return self.id_user", "def get_id(self):\n return...
[ "0.8332739", "0.8247513", "0.8247513", "0.821621", "0.81096745", "0.81074154", "0.81074154", "0.81074154", "0.8076097", "0.8070575", "0.8070575", "0.7967964", "0.79057306", "0.7852173", "0.7849818", "0.7801357", "0.77748287", "0.77748287", "0.77748287", "0.77748287", "0.77748...
0.72067666
88
Sets the identifier of this User.
def identifier(self, identifier): self._identifier = identifier
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setId(self, identifier):\n self.identifier = identifier", "def set_identifier(self, uid):\n\n self.uid = uid\n\n self.set_unique_metadata('DC', 'identifier', self.uid, {'id': self.IDENTIFIER_ID})", "def setIdentifier(self, identifier):\n self._config['identifier'] = identifier",...
[ "0.75760937", "0.7285924", "0.7203813", "0.7203813", "0.70833343", "0.70833343", "0.70833343", "0.70833343", "0.70821375", "0.7039978", "0.68477786", "0.67846274", "0.6726643", "0.65923434", "0.65923434", "0.65923434", "0.65923434", "0.65923434", "0.65923434", "0.65923434", "...
0.70914125
5
Gets the identifier_type of this User.
def identifier_type(self): return self._identifier_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type(self) -> Optional[pulumi.Input[Union[str, 'IdentityType']]]:\n return pulumi.get(self, \"type\")", "def user_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"user_type\")", "def get_type(self) -> str:\n return Tables.USER.name", "def _get_identity_type():\...
[ "0.73569995", "0.7224076", "0.72128284", "0.71911085", "0.7121389", "0.71001047", "0.71001047", "0.7076836", "0.70685667", "0.70685667", "0.7051919", "0.7034168", "0.6987057", "0.69357944", "0.6919698", "0.690309", "0.6888364", "0.6816797", "0.68045443", "0.6797269", "0.67786...
0.84428173
0
Sets the identifier_type of this User.
def identifier_type(self, identifier_type): self._identifier_type = identifier_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id_type(self, id_type):\n\n self._id_type = id_type", "def uni_type(self, uni_type):\n self._uni_type = uni_type", "def identifier_type(self):\n return self._identifier_type", "def type_id(self, type_id):\n if type_id is None:\n raise ValueError(\"Invalid value for ...
[ "0.7343522", "0.6538318", "0.64600015", "0.6278787", "0.6270271", "0.62259614", "0.61249685", "0.61249685", "0.603793", "0.5999761", "0.5999761", "0.58989596", "0.5883387", "0.58479685", "0.5833746", "0.5833746", "0.5833746", "0.5833746", "0.58203447", "0.58203447", "0.581974...
0.8391057
0
Gets the default_language of this User.
def default_language(self): return self._default_language
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_default_language():\n utility = queryUtility(ILanguageAvailability)\n if utility is not None:\n return utility.getDefaultLanguage()\n return DEFAULT_LANGUAGE", "def default_language(self) -> str:\n return self.raw_config.get(\"default_language\", \"en\")", "def get_default_langua...
[ "0.8239461", "0.8200383", "0.78681815", "0.77684957", "0.77571326", "0.7733698", "0.76982373", "0.76222897", "0.7503088", "0.7464798", "0.74502814", "0.74310917", "0.7418701", "0.73148566", "0.7301118", "0.7287795", "0.7287795", "0.7282925", "0.71904445", "0.7184111", "0.7176...
0.85018957
0
Gets the optional_identifier of this User.
def optional_identifier(self): return self._optional_identifier
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"user_id\")", "def user_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"user_id\")", "def user_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"user_id\")", "def user_id(...
[ "0.7086485", "0.7086485", "0.7086485", "0.7002342", "0.6986764", "0.6986764", "0.6940646", "0.6912998", "0.6897527", "0.6731352", "0.66652924", "0.65866464", "0.65866464", "0.65650094", "0.6549909", "0.6535329", "0.6524638", "0.64742637", "0.6468832", "0.6456096", "0.6427148"...
0.8084323
0
Sets the optional_identifier of this User.
def optional_identifier(self, optional_identifier): self._optional_identifier = optional_identifier
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def optional_identifier(self):\n return self._optional_identifier", "def unique_identifier(self, unique_identifier):\n\n self._unique_identifier = unique_identifier", "def setIdentifier(self, identifier):\n self._config['identifier'] = identifier", "def setIdentifier(self, identifier):\n...
[ "0.62258846", "0.614728", "0.5832333", "0.5832333", "0.57497954", "0.56187314", "0.56187314", "0.5583662", "0.5571645", "0.5571645", "0.5571645", "0.5571645", "0.55633354", "0.5551343", "0.55437756", "0.5531331", "0.54097635", "0.53962916", "0.53962916", "0.53962916", "0.5396...
0.8022541
0
Gets the id of this User.
def id(self): return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self) -> int:\n return self.user_id", "def get_id(self):\n return self.user_id", "def id(self) -> int:\n return self.user.id", "def get_user_id(self):\n return self.id_user", "def user_id(self):\n return self._user_id", "def user_id(self):\n return sel...
[ "0.853538", "0.8450037", "0.8324702", "0.82290304", "0.78343046", "0.78343046", "0.78343046", "0.78343046", "0.78343046", "0.7776566", "0.7776566", "0.7742189", "0.76083595", "0.76081216", "0.76081216", "0.76081216", "0.75642884", "0.75399655", "0.75081486", "0.75081486", "0....
0.0
-1
Sets the id of this User.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id):\n self.__id = id", "def set_id(self, id_):\n\n self.id_ = id_", "def id_user(self, id_user):\n\n self._id_user = id_user", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id_=None):\n ...
[ "0.7824512", "0.77583843", "0.7670428", "0.7422975", "0.737911", "0.7290192", "0.72846144", "0.71759987", "0.71309996", "0.71309996", "0.71309996", "0.71234137", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0...
0.0
-1
Gets the v of this User.
def v(self): return self._v
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def v(self):\n return self._properties['v']", "def get_V(self):\n return self.V", "def u(self):\n return self.__u", "def V(self):\n return self._V", "def V(self):\n return self._V", "def V(self):\n return self._V", "def v(self) :\n\t\ttry :\n\t\t\treturn self._...
[ "0.7168312", "0.70460105", "0.6737483", "0.65314513", "0.65314513", "0.65314513", "0.6527697", "0.6368424", "0.63262707", "0.62365353", "0.61727065", "0.61496645", "0.6029475", "0.60023403", "0.595538", "0.59395707", "0.59395707", "0.59395707", "0.59395707", "0.5878968", "0.5...
0.6831925
3
Gets the id of this User.
def id(self): return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self) -> int:\n return self.user_id", "def get_id(self):\n return self.user_id", "def id(self) -> int:\n return self.user.id", "def get_user_id(self):\n return self.id_user", "def user_id(self):\n return self._user_id", "def user_id(self):\n return sel...
[ "0.853538", "0.8450037", "0.8324702", "0.82290304", "0.78343046", "0.78343046", "0.78343046", "0.78343046", "0.78343046", "0.7776566", "0.7776566", "0.7742189", "0.76083595", "0.76081216", "0.76081216", "0.76081216", "0.75642884", "0.75399655", "0.75081486", "0.75081486", "0....
0.0
-1
Sets the id of this User.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id):\n self.__id = id", "def set_id(self, id_):\n\n self.id_ = id_", "def id_user(self, id_user):\n\n self._id_user = id_user", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id_=None):\n ...
[ "0.7824512", "0.77583843", "0.7670428", "0.7422975", "0.737911", "0.7290192", "0.72846144", "0.71759987", "0.71309996", "0.71309996", "0.71309996", "0.71234137", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0.71189946", "0...
0.0
-1
Returns true if both objects are equal
def __eq__(self, other): 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.7961088", "0.7961088", "0.79433626", "0.79303336", "0.7926563", "0.7897525", "0.78826123", "0.78826123", "0.78806067", "0.7872423", "0.7868354", "0.78668815", "0.7825702", "0.7819993", "0.78162885", "0.78078854", "0.78068...
0.79670393
42
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
Converts a string written in Pascal case to a readable format, by making all uppercase characters lowercase and inserting a space before them. For example, "ClassNameInCamelCase" > " class name in camel case"
def convert_pascal_case_to_readable_format(text): return "".join(list(map(lambda x : " " + x.lower() if x.isupper() else x, list(text))))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pascalcase(string):\n\n return capitalcase(camelcase(string))", "def pascal_case(st) -> str:\n if st.find('-') != -1 or st.find('_') != -1:\n st = ''.join(a.capitalize() for a in re.split('-|_', st))\n return st[:1].upper() + st[1: len(st)]", "def pascal_case(value: str, **kwargs: Any) -> s...
[ "0.8296492", "0.8039185", "0.7776675", "0.7678082", "0.7655412", "0.76382124", "0.76150423", "0.75121444", "0.7489683", "0.747727", "0.74744934", "0.74711543", "0.7465326", "0.74313045", "0.74099046", "0.7408012", "0.74060667", "0.7404799", "0.7384817", "0.7378558", "0.737719...
0.78985703
2
The ID of the user.
def user_id(self) -> pulumi.Input[str]: return pulumi.get(self, "user_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_id(self):\n return self.id_user", "def get_id(self) -> int:\n return self.user_id", "def get_id(self):\n return self.user_id", "def id(self) -> int:\n return self.user.id", "def user_id(self) -> str:\n return self._user_id", "def user_id(self) -> str:\n ...
[ "0.89756554", "0.89190996", "0.8905186", "0.885279", "0.8742443", "0.8742443", "0.87343824", "0.87343824", "0.87343824", "0.87343824", "0.87343824", "0.86709505", "0.85473293", "0.8486647", "0.8486647", "0.8486588", "0.8409068", "0.8376281", "0.83407825", "0.83398414", "0.833...
0.8355973
19
Indicates a password is not required for this user.
def no_password_required(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "no_password_required")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_password_required(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"no_password_required\")", "def password_exclude_username(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"password_exclude_username\")", "def password_exclude_username(self) -> Optional[...
[ "0.8460122", "0.763484", "0.763484", "0.74716187", "0.6995404", "0.6983601", "0.68777615", "0.68529534", "0.6739707", "0.66859794", "0.66664875", "0.66528493", "0.66411316", "0.6550964", "0.65074784", "0.64961374", "0.6494851", "0.6494851", "0.6494851", "0.64849573", "0.64436...
0.8337702
1
A list of tags to be added to this resource. A tag is a keyvalue pair.
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: return pulumi.get(self, "tags")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tags(self):\r\n url = '{0}/{1}'.format(self.get_url(), 'tags')\r\n\r\n return http.Request('GET', url), parsers.parse_json", "def tags(self):\r\n return resources.Tags(self)", "def list(self):\n return self._post(\n request='list',\n uri=ApiUri.TAGS.value,\...
[ "0.74211305", "0.73971444", "0.7369284", "0.7300915", "0.7295448", "0.72440463", "0.7207665", "0.7133781", "0.71269214", "0.7111019", "0.7099455", "0.7099455", "0.70992476", "0.70758015", "0.70460284", "0.704161", "0.704161", "0.704161", "0.704161", "0.7011103", "0.70064586",...
0.0
-1
The ARN of the created ElastiCache User.
def arn(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_user(self):\n user = self.iam_client.create_user(\n UserName=self.generate_username(),\n Tags=self.get_tags()\n )\n\n username = user['User']['UserName']\n accesskey = self.iam_client.create_access_key(UserName=username)\n\n print('UserName = {}...
[ "0.64371204", "0.6337539", "0.62726927", "0.6241865", "0.6120261", "0.60115385", "0.5934762", "0.5877562", "0.5877562", "0.5877562", "0.5877562", "0.58673775", "0.58275205", "0.58275205", "0.5825224", "0.5825224", "0.5812684", "0.57705086", "0.57705086", "0.57705086", "0.5770...
0.54278296
85
Indicates a password is not required for this user.
def no_password_required(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "no_password_required")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_password_required(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"no_password_required\")", "def password_exclude_username(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"password_exclude_username\")", "def password_exclude_username(self) -> Optional[...
[ "0.8460122", "0.763484", "0.763484", "0.74716187", "0.6995404", "0.6983601", "0.68777615", "0.68529534", "0.6739707", "0.66859794", "0.66664875", "0.66528493", "0.66411316", "0.6550964", "0.65074784", "0.64961374", "0.6494851", "0.6494851", "0.6494851", "0.64849573", "0.64436...
0.8337702
2
A list of tags to be added to this resource. A tag is a keyvalue pair.
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: return pulumi.get(self, "tags")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tags(self):\r\n url = '{0}/{1}'.format(self.get_url(), 'tags')\r\n\r\n return http.Request('GET', url), parsers.parse_json", "def tags(self):\r\n return resources.Tags(self)", "def list(self):\n return self._post(\n request='list',\n uri=ApiUri.TAGS.value,\...
[ "0.74211305", "0.73971444", "0.7369284", "0.7300915", "0.7295448", "0.72440463", "0.7207665", "0.7133781", "0.71269214", "0.7111019", "0.7099455", "0.7099455", "0.70992476", "0.70758015", "0.70460284", "0.704161", "0.704161", "0.704161", "0.704161", "0.7011103", "0.70064586",...
0.0
-1
The ID of the user.
def user_id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "user_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_id(self):\n return self.id_user", "def get_id(self) -> int:\n return self.user_id", "def get_id(self):\n return self.user_id", "def id(self) -> int:\n return self.user.id", "def user_id(self) -> str:\n return self._user_id", "def user_id(self) -> str:\n ...
[ "0.89756554", "0.89190996", "0.8905186", "0.885279", "0.8742443", "0.8742443", "0.87343824", "0.87343824", "0.87343824", "0.87343824", "0.87343824", "0.86709505", "0.85473293", "0.8486647", "0.8486647", "0.8486588", "0.8409068", "0.8376281", "0.8355973", "0.8355973", "0.83407...
0.82621723
29
The ARN of the created ElastiCache User.
def arn(self) -> pulumi.Output[str]: return pulumi.get(self, "arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_user(self):\n user = self.iam_client.create_user(\n UserName=self.generate_username(),\n Tags=self.get_tags()\n )\n\n username = user['User']['UserName']\n accesskey = self.iam_client.create_access_key(UserName=username)\n\n print('UserName = {}...
[ "0.64371204", "0.6337539", "0.62726927", "0.6241865", "0.6120261", "0.60115385", "0.5934762", "0.5877562", "0.5877562", "0.5877562", "0.5877562", "0.58673775", "0.58275205", "0.58275205", "0.5825224", "0.5825224", "0.5812684", "0.5759778", "0.5759778", "0.5759778", "0.5759778...
0.57705086
41
Indicates a password is not required for this user.
def no_password_required(self) -> pulumi.Output[Optional[bool]]: return pulumi.get(self, "no_password_required")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_password_required(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"no_password_required\")", "def no_password_required(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"no_password_required\")", "def password_exclude_username(self) -> Optional[pulumi.Inpu...
[ "0.8337702", "0.8337702", "0.763484", "0.763484", "0.74716187", "0.6995404", "0.6983601", "0.68777615", "0.68529534", "0.6739707", "0.66859794", "0.66664875", "0.66528493", "0.66411316", "0.6550964", "0.65074784", "0.64961374", "0.6494851", "0.6494851", "0.6494851", "0.648495...
0.8460122
0
A list of tags to be added to this resource. A tag is a keyvalue pair.
def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]: return pulumi.get(self, "tags")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tags(self):\r\n url = '{0}/{1}'.format(self.get_url(), 'tags')\r\n\r\n return http.Request('GET', url), parsers.parse_json", "def tags(self):\r\n return resources.Tags(self)", "def list(self):\n return self._post(\n request='list',\n uri=ApiUri.TAGS.value,\...
[ "0.74211305", "0.73971444", "0.7369284", "0.7300915", "0.7295448", "0.72440463", "0.7207665", "0.7133781", "0.71269214", "0.7111019", "0.7099455", "0.7099455", "0.70992476", "0.70758015", "0.70460284", "0.704161", "0.704161", "0.704161", "0.704161", "0.7011103", "0.70064586",...
0.0
-1
The ID of the user.
def user_id(self) -> pulumi.Output[str]: return pulumi.get(self, "user_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_id(self):\n return self.id_user", "def get_id(self) -> int:\n return self.user_id", "def get_id(self):\n return self.user_id", "def id(self) -> int:\n return self.user.id", "def user_id(self) -> str:\n return self._user_id", "def user_id(self) -> str:\n ...
[ "0.89756554", "0.89190996", "0.8905186", "0.885279", "0.8742443", "0.8742443", "0.87343824", "0.87343824", "0.87343824", "0.87343824", "0.87343824", "0.86709505", "0.85473293", "0.8486647", "0.8486647", "0.8486588", "0.8376281", "0.8355973", "0.8355973", "0.83407825", "0.8339...
0.8409068
16
Function to find one layer of the flow.
def flowaux(v, e, v_in, v_out, v_c, f, l_k, k): v_out_prime = set() c_prime = set() for q in v_c: N = search_neighbor(q, e) p_set = N & (v - v_out) if len(p_set) == 1: p = list(p_set)[0] f[p] = q l_k[p] = k v_out_prime = v_out_prime | ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_layer(self, l):\n\n if l == 0:\n return self.input_layer\n elif 0 < l < self.num_layers() - 1:\n return self.hidden_layers[l - 1]\n elif l == self.num_layers() - 1:\n return self.output_layer\n else:\n return None", "def find_layer_f...
[ "0.71090496", "0.68806463", "0.6657526", "0.6551693", "0.65460074", "0.65329236", "0.65323037", "0.64970475", "0.6489001", "0.6453922", "0.6426151", "0.64198965", "0.63650995", "0.6364994", "0.63398355", "0.6327089", "0.6282898", "0.625721", "0.6246821", "0.62377495", "0.6231...
0.0
-1
Gets the end_ms of this HosAuthenticationLogsParam.
def end_ms(self) -> int: return self._end_ms
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endTime(self):\n return self.params['tend']", "def ends(self):\n return self.time_end", "def end_time(self):\n return from_ts(self.end_time_ms)", "def end_time(self):\n return self._end_time", "def end_time(self):\n return self._end_time", "def end_time(self):\n ...
[ "0.63109547", "0.6268163", "0.6231742", "0.6175565", "0.6175565", "0.6175565", "0.6175565", "0.6175565", "0.6175565", "0.61269546", "0.6068394", "0.60665053", "0.606174", "0.6053363", "0.6035307", "0.6023847", "0.6000368", "0.59965724", "0.59839904", "0.59678596", "0.59607255...
0.66466403
0
Sets the end_ms of this HosAuthenticationLogsParam.
def end_ms(self, end_ms: int): if end_ms is None: raise ValueError("Invalid value for `end_ms`, must not be `None`") # noqa: E501 self._end_ms = end_ms
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def end_times(self, end_times):\n\n self._end_times = end_times", "def setEnd(self, *args):\n return _libsbml.LineSegment_setEnd(self, *args)", "def end_time_stamp(self, end_time_stamp):\n\n self._end_time_stamp = end_time_stamp", "def set_end(self, end_line):\n self.__end_line = ...
[ "0.6376095", "0.61687016", "0.6159021", "0.60957205", "0.60931474", "0.60931474", "0.60931474", "0.60044515", "0.60044515", "0.60044515", "0.59925276", "0.59925276", "0.5928473", "0.5799864", "0.5782158", "0.5758243", "0.5747421", "0.5743827", "0.5733858", "0.5670335", "0.565...
0.71272355
0
Gets the group_id of this HosAuthenticationLogsParam.
def group_id(self) -> int: return self._group_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_group(self) -> \"ILogGroup\":\n return self._values.get('log_group')", "def log_group(self) -> \"ILogGroup\":\n return self._values.get('log_group')", "def log_group(self) -> \"ILogGroup\":\n return self._values.get('log_group')", "def GroupId(self):\n\t\treturn self._get_attribu...
[ "0.7447565", "0.7447565", "0.7447565", "0.71787196", "0.7088018", "0.7088018", "0.7088018", "0.7070405", "0.70409995", "0.70409995", "0.703324", "0.7017565", "0.7017565", "0.7017565", "0.6954151", "0.6920351", "0.68674237", "0.6834283", "0.6706362", "0.6706362", "0.6457911", ...
0.6813435
18
Gets the start_ms of this HosAuthenticationLogsParam.
def start_ms(self) -> int: return self._start_ms
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def starts(self):\n return self.time_start", "def start_time(self):\n return self._get(\"start_time\")", "def start_ms(self, start_ms: int):\n if start_ms is None:\n raise ValueError(\"Invalid value for `start_ms`, must not be `None`\") # noqa: E501\n\n self._start_ms = ...
[ "0.6405963", "0.6222927", "0.6141911", "0.6122385", "0.6033196", "0.60223365", "0.5971894", "0.59407055", "0.5937395", "0.59267944", "0.5915915", "0.5915915", "0.5915915", "0.5915915", "0.5915915", "0.5915915", "0.5915915", "0.5915915", "0.5903209", "0.5849257", "0.5821974", ...
0.66025126
0
Scaling relation for the characteristic outflow velocity of cool gas vs SFR surface density This is model specific (i.e., v0 varies with height `z0`) from Equation XX The mean value of the adopted distribution is 2vout0
def _vout0(self,x): v0 = self.cool_params['vout0'] return v0*x**0.23+3
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def u(self, k, m, z):\n result = self.nfw(k, m, z) * m / self.U.rho_m(z)\n # FOG\n #sigma2 = self.U.sigma2DispFog(m, z)\n #result *= np.exp(- 0.5 * sigma2 * k**2 * mu**2)\n return result", "def scaled_vcov(self):\n return (self.rss()[np.newaxis, np.newaxis, :]\n * 1...
[ "0.6022934", "0.6015217", "0.59607327", "0.5910608", "0.5883398", "0.586845", "0.58627844", "0.5820433", "0.58068776", "0.57485044", "0.5733325", "0.5717681", "0.5706827", "0.5675136", "0.56647545", "0.56202245", "0.55866146", "0.55425906", "0.554046", "0.55357325", "0.551989...
0.58038306
9
True if frame passes some quality test.
def isGoodFrame(self, frame): if max(frame)<0.1: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detect(frame: numpy.ndarray) -> bool:\n color = frame[:20, 1100:1150].mean(axis=(0, 1))\n return numpy.linalg.norm(color - BG_COLOR) < 5", "def frame_in_range(frame_):\n f = cv2.cvtColor(frame_, cv2.COLOR_BGR2GRAY)\n if f.shape != grey.shape:\n f = cv2.resize(f, (gr...
[ "0.65025055", "0.6463752", "0.6411242", "0.63261217", "0.62327987", "0.61239547", "0.6015413", "0.5983221", "0.5983221", "0.5936096", "0.5933823", "0.5932894", "0.59248334", "0.5887699", "0.58772904", "0.58712804", "0.5871266", "0.58663535", "0.58296067", "0.5828973", "0.5809...
0.7504522
0
this module takes two integers a and b , calculates lcm of those
def lcm(a,b): if a==0: return b if b==0: return a c=gcd(a,b) lcm=a*b/c return lcm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lcm(a, b):\n\treturn a * b // gcm(a, b)", "def lcm(a: int, b: int):\n return (a * b) // euclid(a, b)", "def lcm(self, a, b):\n return a*b", "def lcm(a, b):\n\n\treturn (a * b)/gcd(a, b)", "def lcm(self, a, b):\n raise NotImplementedError", "def lcm(a, b):\r\n return a * b // gcd(a...
[ "0.91096514", "0.9085567", "0.9078759", "0.9064827", "0.9054768", "0.90526557", "0.8995649", "0.8995649", "0.8994117", "0.89923996", "0.89923996", "0.89923996", "0.89923996", "0.89923996", "0.89923996", "0.89923996", "0.89923996", "0.89923996", "0.8989513", "0.8987177", "0.89...
0.8866265
28
Assumes that maxvalue and minvalue are the same.
def scale(image, maxval=1024): image += maxval # minimum value is now 0 image /= maxval*2 return(image)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testMinMax(self, value):\n\t\tif value > self.oldmax:\n\t\t\tself.oldmax = value\n\t\t\tself.maxBox.SetValue(str(value).encode('utf-8'))\n\t\telif value < self.oldmin:\n\t\t\tself.oldmin = value\n\t\t\tself.minBox.SetValue(str(value).encode('utf-8'))", "def _limit(value, min_value, max_value):\n\n if valu...
[ "0.74981374", "0.7469589", "0.72411853", "0.71913457", "0.71437925", "0.71399415", "0.7089612", "0.7089612", "0.7089612", "0.7089612", "0.70744425", "0.7043096", "0.69569045", "0.6931975", "0.6897616", "0.6839734", "0.6820642", "0.6820642", "0.67871433", "0.6782617", "0.67789...
0.0
-1
Initialize a Flask application.
def init_app(self, app): self.app = app # Follow the Flask guidelines on usage of app.extensions if not hasattr(app, 'extensions'): app.extensions = {} if 'sso' in app.extensions: raise RuntimeError("Flask application already initialized") app.extensions['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_app():\n\n # 1 Create Flask application\n app = Flask(\n import_name=__name__,\n template_folder=\"templates\",\n static_folder=\"static\"\n )\n\n # 2 Update the apps configuration\n app = config_selector(app)\n register_error_handlers(app)\n\n cache.init_app(app...
[ "0.82614", "0.8210009", "0.80665725", "0.8018193", "0.79514575", "0.78813463", "0.77499765", "0.7743806", "0.7632491", "0.7609962", "0.755211", "0.7523433", "0.75160366", "0.7503788", "0.74454916", "0.7438563", "0.74367917", "0.7357721", "0.73522884", "0.7327796", "0.73150647...
0.0
-1
Input is an array of 2D boxes 4 coordinates. Each column represents a cuboid in the format [x1, z1, x2, z2].T. Thus, the dimensions should be 4 x N. The 2 sets of 2D coordinates represent the 2 corners of the bounding box. The first set of coordinates is the point closest to the origin of the image. The second set of c...
def query(self, boxes): boxes = np.asarray(boxes) # check size if boxes.shape[0] != 4: raise ValueError('Incorrect number of dimensions for query: ' 'input dim {}'.format(boxes.shape[0])) if boxes.shape[1] < 1: raise ValueError('The ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bounding_box(points):\n x, y, z = zip(*points)\n min_x = min(x)\n max_x = max(x)\n min_y = min(y)\n max_y = max(y)\n min_z = min(z)\n max_z = max(z)\n return [\n [min_x, min_y, min_z],\n [max_x, min_y, min_z],\n [max_x, max_y, min_z],\n [min_x, max_y, min_z],...
[ "0.62785417", "0.6258063", "0.61474866", "0.6107473", "0.6085401", "0.608344", "0.60834175", "0.6076458", "0.60758954", "0.60327506", "0.6016607", "0.5952552", "0.59468377", "0.5945636", "0.592042", "0.59108967", "0.5900372", "0.58887833", "0.5885261", "0.5877578", "0.5864019...
0.5464501
83
Returns a copy of this RationalFrac object.
def __copy__(self): copy = RationalFrac(0, empty=True) copy.numer = self.numer.copy() copy.denom = self.denom.copy() copy.neg = bool(self.neg) return copy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reciprocal(self):\n recip = RationalFrac(0, empty=True)\n if 0 in self.numer:\n raise ZeroDivisionError('the reciprocal of zero is undefined.')\n recip.numer = self.denom.copy()\n recip.denom = self.numer.copy()\n recip.neg = bool(self.neg)\n return recip", ...
[ "0.715213", "0.6598063", "0.6528002", "0.651319", "0.635435", "0.6245816", "0.6245816", "0.6212015", "0.6199356", "0.6175587", "0.6157219", "0.615112", "0.606235", "0.6060698", "0.6025477", "0.5965869", "0.5938698", "0.5868", "0.58585805", "0.5839526", "0.58172697", "0.5792...
0.87779135
0
Returns the sum of this fraction and other.
def __add__(self, other): if isinstance(other, RationalFrac): if 0 in self.denom or 0 in other.denom: raise ZeroDivisionError( 'cannot add when either ' + 'operand is undefined.') # Get denominator factors not shared # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __add__(self, other):\n top = self.num*other.denom + self.denom*other.num\n bott = self.denom*other.denom\n return fraction(top, bott)", "def __add__(self, other):\n top = self.num*other.denom + self.denom*other.num\n bott = self.denom*other.denom\n return Fraction(t...
[ "0.8426208", "0.83280116", "0.8161403", "0.79077035", "0.7842017", "0.7834647", "0.7779204", "0.7590757", "0.7390967", "0.7045312", "0.7040087", "0.69647586", "0.69512224", "0.68733066", "0.6759707", "0.67361355", "0.6692984", "0.6637878", "0.66350734", "0.6627179", "0.661512...
0.7992369
3
Returns the difference between this fraction and other.
def __sub__(self, other): return self.__add__(other.__neg__())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __sub__(self, other):\n # type: (object) -> Fraction\n dx = other\n if type(other) is float:\n dx = dectofr(other)\n return Fraction(self.numerator * dx.denominator - self.denominator * dx.numerator,\n self.denominator * dx.denominator)", "def __s...
[ "0.832831", "0.8318827", "0.82934016", "0.78274983", "0.76480234", "0.75205654", "0.75205654", "0.72975314", "0.72296596", "0.7187367", "0.71538526", "0.7094719", "0.7050738", "0.7038256", "0.7022518", "0.70098484", "0.69702893", "0.6961445", "0.69440037", "0.69210976", "0.69...
0.6189352
76
Returns other / self as a RationalFraction.
def __rtruediv__(self, other): return RationalFrac(other).__imul__(self.reciprocal())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __sub__(self, other):\n # type: (object) -> Fraction\n dx = other\n if type(other) is float:\n dx = dectofr(other)\n return Fraction(self.numerator * dx.denominator - self.denominator * dx.numerator,\n self.denominator * dx.denominator)", "def __a...
[ "0.74741864", "0.74484", "0.74077547", "0.7344442", "0.7335089", "0.732786", "0.7255355", "0.72160393", "0.71326405", "0.70935357", "0.7050261", "0.70449257", "0.6976947", "0.6904565", "0.68757546", "0.6860957", "0.6859017", "0.6848071", "0.6809597", "0.67946804", "0.67878497...
0.720031
8
Removes the wholenumber part of this fraction and returns it.
def mixed(self): numer = self.numer_prod() denom = self.denom_prod() self.numer = RationalFrac.factorize(numer % denom) return numer // denom
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strip(phone):\n return re.sub('\\D', '', Phone.normalize(phone))", "def inverse(self):\n return fraction(self.denom, self.num)", "def inverse( self ):\r\n\t\treturn fraction( self.denominator, self.numerator )", "def remove_numbers(self, doc):\n regex = re.compile('[%s]' % re.escape(...
[ "0.57959", "0.56876844", "0.5521207", "0.5515522", "0.54231673", "0.5327377", "0.53215885", "0.5305532", "0.52699625", "0.5264385", "0.52430075", "0.52190167", "0.51769674", "0.5174182", "0.5140094", "0.51145774", "0.511165", "0.50969434", "0.50953054", "0.50943065", "0.50457...
0.45984858
67
Returns True if the fractions are equal in value. Assumes the rep invariant that both are fully simplified.
def __eq__(self, other): if isinstance(other, RationalFrac): return (self.numer == other.numer and self.denom == other.denom and self.neg == other.neg) elif isinstance(other, (int, float, str)): return self.__eq__(RationalFrac(other)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_equal(self):\n self.assertTrue(Fraction(7,10)==Fraction(7,10))", "def __eq__(self, frac):\n\n if isinstance(frac,Fraction):\n if self.numerator ==0 and self.denominator==0:\n if frac.numerator ==0 and frac.denominator==0:\n return True\n ...
[ "0.7204892", "0.6743338", "0.66553587", "0.6536204", "0.653479", "0.6530094", "0.62008494", "0.6173435", "0.6129048", "0.612746", "0.6048667", "0.60469717", "0.6034087", "0.6014346", "0.6012058", "0.5993801", "0.59746945", "0.5961649", "0.5915798", "0.5865019", "0.5861805", ...
0.5807518
22
Computes the sum of all integers between 1 and n, inclusive. Assume n is positive. >>> sum(1) 1 >>> sum(5) 1 + 2 + 3 + 4 + 5 15
def sum(n): if n == 0: return 0 return sum(n - 1) + n
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sumTo(n):\n\n sum_all = (n * (n+1))/2\n\n return sum_all", "def integer_sum(n):\n\n sum = 0\n k = 0\n\n # INVARIANT\n # The sum of far is equal to the sum of the first k integer numbers\n # VARIANT: n-k\n #\n while (k!=n):\n k += 1\n sum += k\n\n return sum", "...
[ "0.81436116", "0.81035244", "0.80758256", "0.79683304", "0.7923275", "0.78943473", "0.76944906", "0.7515479", "0.7357257", "0.7357257", "0.7334356", "0.72306144", "0.7068577", "0.7026728", "0.7009316", "0.6926463", "0.69131505", "0.6901731", "0.6886891", "0.6871722", "0.68600...
0.7903437
5
Is mystring int of float (with . or , separator)?
def is_some_number(mystring): # print(Bcolors.cyan + re.findall(r".*\\(.*)", inspect.stack()[0][1])[0] + " --- " # + inspect.stack()[0][3] + "()" + Bcolors.ENDC) mystring = str(mystring) mystring = re.sub(",", ".", mystring) try: if float(mystring): return True except ValueEr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isFloat(string):\n return (True)", "def isFloat(string):\n try: float(string)\n except ValueError: return 0\n else: return 1", "def isFloat(string):\n return all(c in \"0123456789.\" for c in string)", "def isfloat(string:str) -> bool:\n try:\n float(string)\n return True\n ...
[ "0.836674", "0.7978666", "0.78715444", "0.7857042", "0.78247863", "0.77827334", "0.77773714", "0.7766098", "0.77313656", "0.7670445", "0.7576941", "0.75688595", "0.75108796", "0.7473517", "0.74715954", "0.7461522", "0.7461522", "0.72504324", "0.7199588", "0.71842223", "0.7130...
0.75161314
12
third, fourth etc. digit after decimal separator were removed
def two_digits_after_point(value): if isinstance(value, str): result = format(float(value), '.2f') return result elif isinstance(value, float): result = format(value, '.2f') return float(result) elif isinstance(value, int): value = float(value) print(value) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fixNumber(sval):\n\n r, val = VALID_RE.match(sval.strip()).groups()\n parts = VALPARTS_RE.findall(val)\n dpart = parts.pop(-1)\n if parts:\n return (r or \"\") + \"\".join(parts) + \".\" + dpart\n return (r or \"\") + dpart", "def drop_trailing(amount, decimals=2):\n if not amount:\n...
[ "0.63893", "0.63117105", "0.62716657", "0.6263186", "0.6065556", "0.6051358", "0.6045102", "0.5972964", "0.59603125", "0.59342945", "0.58738965", "0.5870975", "0.5825112", "0.58199716", "0.58199716", "0.58199716", "0.5815442", "0.5803415", "0.5734243", "0.5732806", "0.5723747...
0.5473026
51
Find the unique values for a column in a dataset.
def unique_vals(rows, col): return set([row[col] for row in rows])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique (a_data,a_column) :\n return list(__np.unique(a_data[a_column]))", "def get_unique(self):\n unique_values = len(self.df[self.col_name].unique())\n return unique_values", "def unique_column_values(rows, column_name):\r\n\r\n values = [] #Create an empty list\r\n for row in rows: ...
[ "0.80408406", "0.77386856", "0.7719097", "0.7606807", "0.7365728", "0.707723", "0.7064098", "0.7032525", "0.69424534", "0.67523456", "0.6602968", "0.6587545", "0.6583702", "0.6398712", "0.6347141", "0.6320527", "0.6139979", "0.6117238", "0.6051513", "0.6025287", "0.6017522", ...
0.7449302
4
Test if a value is numeric.
def is_numeric(value): return isinstance(value, int) or isinstance(value, float)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_numeric(self) -> bool:\n return False", "def isnumeric(self):\n return isnumeric(self)", "def is_numeric(val):\n if \\\n isinstance(val, int) or \\\n isinstance(val, float):\n return True\n elif \\\n isinstance(val, str) and \\\n val.isdigit():\n return True\n ...
[ "0.8431534", "0.8420194", "0.83458734", "0.82320344", "0.81494164", "0.80371577", "0.7912043", "0.79112756", "0.7841708", "0.78381044", "0.77513504", "0.77433884", "0.7729803", "0.7716779", "0.76922977", "0.7621601", "0.76034904", "0.75766325", "0.7556757", "0.7554882", "0.75...
0.8804906
0
(SiteData) is a pandas data frame. Its columns must contain soil moisture time series information (sm_col, in m3/m3), even if this information is simply a dummy value, precipitation time series data (precip_col, in mm), a dayofyear column (DOY_col), and a depth at which to produce estimates (z, in cm).
def CalculateSMEstimates(SiteData, parameters, z, sm_col, precip_col, DOY_col): EtaSeries = AddEtaSeries(parameters[:3], SiteData[DOY_col]) BetaSeries = GetBeta(SiteData[precip_col], EtaSeries, z, parameters[-1]) SMSeries = GetSMSeries(BetaSeries, parameters[3:6]) SiteData['BetaSeries'] = BetaSeries; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CalibrateSMParameters(SiteData, z, sm_col, p_col, DOY_col): \n if max(SiteData[sm_col] < 2): SiteData[sm_col] = [sm*100 for sm in SiteData[sm_col]] #To ensure 0-100 range for calibration\n n = GetSystemMemory(_default_triad, SiteData[p_col], z, _long_beta_time, _interval, _thresh, SiteData[DOY_col])\n ...
[ "0.5279564", "0.5216495", "0.51905215", "0.51789725", "0.51128995", "0.5047456", "0.4922376", "0.4917374", "0.48789617", "0.48669007", "0.48598233", "0.48523605", "0.48469058", "0.48375946", "0.47450426", "0.4723107", "0.47182447", "0.4697271", "0.4684314", "0.4656989", "0.46...
0.595098
0
Pulls the last comment from Jira from an issue and writes it to the file object.
def write_last_jira_comment(f, jira, issue): c = jira.comments(issue) if len(c) > 0: try: comment = "# Last comment:\n# ---8<---\n# %s\n# --->8---\n" % "\n# ".join( c[-1].body.splitlines() ) f.write(comment) except UnicodeEncodeError: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_issue_get_comment(self):\n pass", "def get_jira_issues(jira, username):\n exclude_stories = cfg.args.x\n epics_only = cfg.args.e\n all_status = cfg.args.all\n filename = cfg.args.file\n user = cfg.args.user\n last_comment = cfg.args.l\n\n issue_types = [\"Sub-task\", \"Epic\"...
[ "0.6075822", "0.5766692", "0.57225376", "0.5706545", "0.56782675", "0.5660388", "0.562079", "0.5594009", "0.5592562", "0.54743004", "0.54743004", "0.54206204", "0.5357396", "0.53555393", "0.53269064", "0.53223073", "0.5312051", "0.5309631", "0.53081733", "0.52708644", "0.5232...
0.82421225
0
Write a service as JSON to disk.
def write(self, service, values): with open(os.path.join(self.directory, service), "w") as f: values = [d.copy() for d in values] for d in values: # There can be other values in the JSON: d["extra"] = 123 f.write(dumps(values))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write(self):\n self.json_o.write()", "def _write_json(self):\n with open(self._file_path, 'w') as f:\n json.dump(self._content, f, indent=4, separators=None,\n encoding='utf-8', sort_keys=False)", "def write(self, fp, **kwds):\n json.dump(self._dict, fp)...
[ "0.6887641", "0.6863764", "0.6736979", "0.6722275", "0.6722275", "0.664673", "0.6581311", "0.6567649", "0.6556391", "0.6537179", "0.6525358", "0.6525358", "0.6525358", "0.65116346", "0.64981365", "0.6491529", "0.64880604", "0.6445406", "0.64098686", "0.6409763", "0.63928807",...
0.69052315
0
Get the gradient at x.
def get_grad(self, x: np.ndarray) -> np.ndarray: grad = self(x, (1,), MODE_FUN) return grad
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_gradient_at(self, x: np.ndarray) -> np.ndarray:\n\n if self.gradient_f:\n # if the problem has knowledge about the gradient, use it directly without approximation\n return self.gradient_f(x)\n\n return gradient_approximation(self.f, x)", "def gradient(self, x):\n ...
[ "0.8431075", "0.8220892", "0.81939673", "0.8100273", "0.8041275", "0.7874888", "0.78477836", "0.78477836", "0.78477836", "0.7821183", "0.7686003", "0.7656612", "0.76546735", "0.76266927", "0.7616608", "0.7598924", "0.75333893", "0.7458194", "0.7305269", "0.72385085", "0.72335...
0.7632087
13
Get the Hessian at x.
def get_hess(self, x: np.ndarray) -> np.ndarray: hess = self(x, (2,), MODE_FUN) return hess
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_hessian_at(self, x: np.ndarray) -> np.ndarray:\n\n if self.hessian_f:\n # if the problem has knowledge about the hessian, use it directly without approximation\n return self.hessian_f(x)\n\n return hessian_approximation(self.f, x)", "def hessian(self, x):\n h =...
[ "0.8458919", "0.8419205", "0.77352273", "0.74425995", "0.7210657", "0.71494526", "0.71207774", "0.706013", "0.7052453", "0.70523036", "0.69106334", "0.67868537", "0.67564434", "0.67418474", "0.66375303", "0.66321194", "0.66119343", "0.65594655", "0.6557495", "0.6504383", "0.6...
0.7324089
4
Don't solve; just calculate the residual.
def apply_nonlinear(self, params, unknowns, resids): x = params['x'] z = unknowns['z'] resids['z'] = x*z + z - 4.0 # Output equations need to evaluate a residual just like an explicit comp. resids['y'] = x + 2.0*z - unknowns['y'] #print(x, unknowns['y'], z, resids['z'],...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def residuals(self) -> npt.NDArray[np.float64]:\n return self.data - self.theory", "def _residual_edp(self, params):\n data = self.F**2\n model = np.absolute(self._model())**2\n sigma = self.sigma\n return (data[self.mask]-model[self.mask]) / sigma[self.mask] \n \n # The following th...
[ "0.75207597", "0.74286073", "0.7376393", "0.7226276", "0.72101337", "0.7203779", "0.7152294", "0.7139851", "0.7122367", "0.7044565", "0.6966574", "0.696351", "0.6918906", "0.69171983", "0.6910487", "0.68780875", "0.68604714", "0.68274367", "0.6788165", "0.6740059", "0.6716727...
0.0
-1
Don't solve; just calculate the residual.
def apply_nonlinear(self, params, unknowns, resids): y2_actual = params['y2_actual'] y2_command = unknowns['y2_command'] resids['y2_command'] = y2_actual - y2_command
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def residuals(self) -> npt.NDArray[np.float64]:\n return self.data - self.theory", "def _residual_edp(self, params):\n data = self.F**2\n model = np.absolute(self._model())**2\n sigma = self.sigma\n return (data[self.mask]-model[self.mask]) / sigma[self.mask] \n \n # The following th...
[ "0.75207597", "0.74286073", "0.7376393", "0.7226276", "0.72101337", "0.7203779", "0.7152294", "0.7139851", "0.7122367", "0.7044565", "0.6966574", "0.696351", "0.6918906", "0.69171983", "0.6910487", "0.68780875", "0.68604714", "0.68274367", "0.6788165", "0.6740059", "0.6716727...
0.0
-1
Sets the bus of this VmdkDiskModify.
def bus(self, bus): self._bus = bus
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setDisk(self, disk):\n self.__disk = disk", "def disk(self, disk):\n self._context[\"disk\"] = disk", "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def patch_bus(bus, monitor):\n def ...
[ "0.58872455", "0.56734043", "0.5484107", "0.5484107", "0.54451966", "0.53144777", "0.5280042", "0.5246588", "0.5158919", "0.5141707", "0.5138391", "0.51179224", "0.50389117", "0.5015399", "0.4993466", "0.4975708", "0.49539313", "0.49192414", "0.48801315", "0.48144785", "0.479...
0.66168743
0
Sets the volume_name of this VmdkDiskModify.
def volume_name(self, volume_name): self._volume_name = volume_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vmdk_name(self, vmdk_name):\n if self.local_vars_configuration.client_side_validation and vmdk_name is None: # noqa: E501\n raise ValueError(\"Invalid value for `vmdk_name`, must not be `None`\") # noqa: E501\n\n self._vmdk_name = vmdk_name", "def vm_volume_num(self, vm_volume_num)...
[ "0.664882", "0.65464115", "0.64266187", "0.631686", "0.6287056", "0.609979", "0.6031413", "0.59200186", "0.59200186", "0.5833772", "0.5833772", "0.5833772", "0.5830027", "0.58194065", "0.5739266", "0.5723184", "0.5694489", "0.56447357", "0.5628672", "0.56066847", "0.5601079",...
0.7681403
0
Sets the vmdk_name of this VmdkDiskModify.
def vmdk_name(self, vmdk_name): if self.local_vars_configuration.client_side_validation and vmdk_name is None: # noqa: E501 raise ValueError("Invalid value for `vmdk_name`, must not be `None`") # noqa: E501 self._vmdk_name = vmdk_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, sNewVmName):\n\t\tcall_sdk_function('PrlVmCfg_SetName', self.handle, sNewVmName)", "def set_name(self, name):\n\n\t\tif name is not None and not isinstance(name, str):\n\t\t\traise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None)\n\t\t\n\t\tself.__name = name...
[ "0.6180049", "0.5682717", "0.5510199", "0.5493571", "0.547936", "0.54495317", "0.5419289", "0.5413662", "0.5413662", "0.53651136", "0.5356296", "0.5356296", "0.535376", "0.53503484", "0.53503484", "0.53503484", "0.53503484", "0.53503484", "0.53488547", "0.53488547", "0.534460...
0.8014622
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, VmdkDiskModify): return False return self.to_dict() == other.to_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): if not isinstance(other, VmdkDiskModify): return True return self.to_dict() != other.to_dict()
{ "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.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Return a dict of the settings that have been overridden
def overridden_settings(settings): for name, defvalue in iter_default_settings(): value = settings[name] if not isinstance(defvalue, dict) and value != defvalue: yield name, value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def overrides(self) -> tuple[dict[str, Any], dict[str, Any]]:\n settings = {}\n if self.actions:\n settings = self.actions.overrides\n if self.validations:\n settings |= self.validations.overrides\n\n filter_settings = {}\n if self.extra_fields:\n ...
[ "0.7346544", "0.7113492", "0.70555323", "0.6989259", "0.68593514", "0.6838193", "0.67347074", "0.66259027", "0.66149807", "0.66128004", "0.6571948", "0.6570668", "0.6519824", "0.64205575", "0.6413141", "0.6413141", "0.6302792", "0.629003", "0.6280132", "0.6275411", "0.6226373...
0.75717515
0
Get the most adapted camera.
def _get_camera(self): rect = (self._dim[0], self._dim[2], self._dim[1] - self._dim[0], self._dim[3] - self._dim[2]) flip = (False, type(self).__name__ == 'ImageObj', False) return scene.cameras.PanZoomCamera(rect=rect, flip=flip)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def camera(self):\n return self.__camera", "def camera(self):\n return self._camera", "def camera(self):\n return self._camera", "def query_camera(self):\n ok, orig_pic = self.vs.read() # Read video stream\n if ok: # If no errors\n orig_pic = imutils.rotate(ori...
[ "0.72895586", "0.7186887", "0.7186887", "0.6782575", "0.6728729", "0.6517638", "0.6354531", "0.6348791", "0.6342679", "0.62891865", "0.617836", "0.616951", "0.6164929", "0.6161288", "0.6155857", "0.613634", "0.6065176", "0.60479224", "0.6034211", "0.59510446", "0.5920536", ...
0.6817456
3
Get the cmap value.
def cmap(self): return self._cmap
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmap(self):\n return self.pixels.get_cmap()", "def get_dict(self):\r\n return self.cmap", "def cmap(self):\n return self._palette", "def get_colormap(self):\n return colors.colormaps[self.name]", "def get_colormap(self):\n return colors.colormaps[self.name]", "def g...
[ "0.7760374", "0.7364522", "0.70107603", "0.70075864", "0.70075864", "0.69170356", "0.67953396", "0.67953396", "0.67626363", "0.64906967", "0.645177", "0.645177", "0.645177", "0.645177", "0.644522", "0.6442088", "0.6416265", "0.64073807", "0.6388735", "0.63541937", "0.63541937...
0.77731913
0
Get the clim value.
def clim(self): return self._clim
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmax(self):\n return self[\"cmax\"]", "def cmax(self):\n return self['cmax']", "def cci(self) -> float:\n return self._cci", "def circpol(self):\n return self._circpol", "def _get_colorbar_limits(self):\n if self.boundaries is not None:\n C = self.boundarie...
[ "0.67236733", "0.6712079", "0.65425247", "0.62587947", "0.6220321", "0.6204345", "0.6174163", "0.61661345", "0.6025893", "0.5992265", "0.59856856", "0.592044", "0.5914137", "0.5899723", "0.5873103", "0.586085", "0.5836172", "0.58251774", "0.5794521", "0.57810426", "0.5728131"...
0.8357046
0
Get the vmin value.
def vmin(self): return self._vmin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def u_min(self):\n if self._u_min is None:\n return np.abs(self.uvgrid).min()\n else:\n return self._u_min", "def get_vmin(self, ch_id: int) -> float:\n return float(self.query(':measure:vmin? channel{}'.format(ch_id)))", "def native_min_value(self) -> float:\n ...
[ "0.7175751", "0.7102573", "0.69673556", "0.68678826", "0.67789984", "0.67514956", "0.67177314", "0.66744006", "0.66293454", "0.6618641", "0.66053855", "0.6600497", "0.6541106", "0.6541106", "0.65201604", "0.6514122", "0.6498408", "0.6469401", "0.6461982", "0.64603996", "0.644...
0.8957891
0
Get the vmax value.
def vmax(self): return self._vmax
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vmax(f, v=1, Bc=None):\n\n if Bc is None: Bc = secross()\n raise 'Not implemented yet'\n return None\n return y", "def u_max(self):\n if self._u_max is None:\n return self.uv_max\n else:\n return self._u_max", "def get_vmax(self, ch_id: int) -> float:\n ...
[ "0.6980328", "0.68466234", "0.67387015", "0.66502815", "0.6474122", "0.6426576", "0.62576944", "0.62295485", "0.62255204", "0.61764604", "0.61752987", "0.60901165", "0.60740125", "0.6061604", "0.6045117", "0.60092264", "0.597966", "0.59331876", "0.5885071", "0.5869099", "0.58...
0.88350874
0
here get the State names out of the metafisheries returned from the queryset. iterate through queryset and add State names to list
def get_state_list(request, type_id): query_return = self.get_queryset(self) #now make a list from queryset with a split() on the commas states_list = query_return.fishery_states.split(",") return state_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def states_list():\n state_dict = storage.all('State').values()\n return render_template('7-states_list.html', state_dict=state_dict)", "def states_list():\n return render_template('7-states_list.html',\n states=storage.all(State).values())", "def states_list():\n elements...
[ "0.5769793", "0.5757501", "0.57327837", "0.5705726", "0.5701665", "0.5697557", "0.5694013", "0.56834173", "0.56329405", "0.5527282", "0.552367", "0.5488443", "0.546672", "0.546672", "0.54398465", "0.54220855", "0.5394789", "0.538664", "0.53857636", "0.53794926", "0.53045315",...
0.6217915
0
Return the state attributes of the device.
def extra_state_attributes(self): attr = {} #attr["name"] = self._visonic_device.getDeviceName() attr[PANEL_ATTRIBUTE_NAME] = self._panel attr[DEVICE_ATTRIBUTE_NAME] = self._visonic_device.getDeviceID() return attr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_state_attributes(self):\r\n return self.attributes", "def device_state_attributes(self):\r\n return self._attributes", "def device_state_attributes(self):\n return self._state_attrs", "def device_state_attributes(self):\n return self._state_attrs", "def device_state_a...
[ "0.92738223", "0.92053986", "0.91516256", "0.91516256", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148746", "0.9148746", "0.9137698", "0.9110632",...
0.73300517
93
Get absolute path to resource, works for dev and for PyInstaller
def resource_path(relative_path): try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except AttributeError: base_path = abspath(".") return join(base_path, relative_path)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_resource_path():\n return os.path.join(os.path.dirname(__file__), \"resources\") + os.path.sep", "def resourcePath(relative):\r\n try:\r\n # PyInstaller creates a temp folder and stores path in _MEIPASS\r\n base_path = sys._MEIPASS\r\n except Exception:\r\n base_path = os.pa...
[ "0.83695436", "0.8280479", "0.82485795", "0.8139178", "0.8114118", "0.80985415", "0.80940944", "0.80797124", "0.80677074", "0.80673695", "0.8062465", "0.8062465", "0.8062465", "0.8062465", "0.8062465", "0.8062465", "0.8062465", "0.80569947", "0.80545217", "0.80448323", "0.804...
0.80251104
35
An EntryGroup resource represents a logical grouping of zero or more Data Catalog Entry resources.
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, description: Optional[pulumi.Input[str]] = None, display_name: Optional[pulumi.Input[str]] = None, entry_group_id: Optional[pulumi.Input[str]] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_entry_group(self, location_id, entry_group_id):\n entry_group = self.__datacatalog.create_entry_group(\n parent=f'projects/{self.__project_id}/locations/{location_id}',\n entry_group_id=entry_group_id,\n entry_group=datacatalog.EntryGroup())\n logging.info(...
[ "0.6919622", "0.6528784", "0.60112506", "0.6007885", "0.58633554", "0.5828231", "0.5820577", "0.57293856", "0.5727503", "0.5491122", "0.54391736", "0.5376663", "0.5360833", "0.5358634", "0.52797055", "0.5245396", "0.5201506", "0.5191022", "0.5172875", "0.5170198", "0.5153464"...
0.53819716
11
Called when the user specifies an intent for this skill
def on_intent(intent_request, session): print("on_intent requestId=" + intent_request['requestId'] + ", sessionId=" + session['sessionId']) intent = intent_request['intent'] intent_name = intent_request['intent']['name'] # Dispatch to your skill's intent handlers if intent_name == "AMAZ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_intent(intent_request, session):\n\n intent = intent_request['intent']\n intent_name = intent_request['intent']['name']\n\n # Dispatch to your skill's intent handlers\n\n if intent_name not in skillmap:\n intent_name = \"NullSkill\"\n\n if intent_name in skillmap:\n try:\n ...
[ "0.7143966", "0.6956116", "0.6949057", "0.6905333", "0.68928874", "0.67641324", "0.6754843", "0.6722764", "0.6720773", "0.67161995", "0.6699252", "0.6691263", "0.6645522", "0.6642719", "0.6638686", "0.6607724", "0.6594981", "0.6575682", "0.6570076", "0.65620786", "0.65609014"...
0.6670276
12
Given a list of words, return list with duplicates removed.
def without_duplicates(words): words_with_number_of_times_appear = {} for word in words: if word in words_with_number_of_times_appear: words_with_number_of_times_appear[word] += 1 else: words_with_number_of_times_appear[word] = 1 final_list_of_words = words_with_num...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def without_duplicates(words):\n\n # the long way: add each item to a set through iteration\n #\n # duplicate_remover = set([])\n # for word in words:\n # duplicate_remover.add(word)\n # words = list(duplicate_remover)\n # return words\n\n # the quick version: convert to set removes dup...
[ "0.8782853", "0.8540177", "0.80357206", "0.79982984", "0.7957965", "0.78726363", "0.7813481", "0.73638797", "0.7334073", "0.730446", "0.7295227", "0.7244554", "0.7232783", "0.71240723", "0.7089221", "0.7059419", "0.7034976", "0.70081365", "0.7008079", "0.69790393", "0.6970064...
0.7275074
11
Return a random tensor on random device.
def get_a_tensor(): dev = random.choice(devices) shape = random.choice(((1), (2, 3), (4, 5, 6), (7, 8, 9, 10))) t = torch.rand(shape).to(dev) nonlocal expected expected += t.numel() return t
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random(*args):\n dims = list(args)\n assert type(dims[0]) == int\n return params_func(cmd, \"random\", params=dims, return_type='FloatTensor')", "def rand(self):\n return np.random.rand(self.nx)", "def randn(*shape, **kwargs):\n return Tensor(np.random.randn(*shape), **kwargs)", "d...
[ "0.68169653", "0.6814161", "0.6806337", "0.6664422", "0.657156", "0.65650165", "0.64437443", "0.62449664", "0.6210957", "0.6179746", "0.61376923", "0.61367035", "0.6125145", "0.607551", "0.60309863", "0.59588253", "0.595576", "0.59045106", "0.5898309", "0.58919007", "0.586938...
0.7898191
0
Check that invalid 'usage_key_string' raises Http404.
def test_container_page_with_valid_and_invalid_usage_key_string(self): request = RequestFactory().get('foo') request.user = self.user request.LANGUAGE_CODE = 'en' # Check for invalid 'usage_key_strings' self.assertRaises( Http404, views.container_handler, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_itemidnotvalid_return4042(self):\r\n config = self.__load_config()\r\n url = f\"http://{config['api']['host']}:{config['api']['port']}/gs/api/v1/asdfg\"\r\n r = requests.get(url)\r\n\r\n self.assertEqual(r.status_code, 404)", "def test_invalid_usage_exception(exception_app):\...
[ "0.6456678", "0.63005984", "0.62856245", "0.6027633", "0.5959825", "0.59315944", "0.5925906", "0.58767587", "0.5854767", "0.5842417", "0.58341265", "0.58260226", "0.5808284", "0.580575", "0.5801374", "0.57830447", "0.57718116", "0.5770981", "0.5766837", "0.5766837", "0.573840...
0.7274999
0
Calculates the area of the square instance.
def area(self): return self.__size ** 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def area(self):\n if isinstance(self.crs, GeographicalCRS):\n major_axis = self.crs.ellipsoid.a\n minor_axis = self.crs.ellipsoid.b\n\n area = 0.0\n if major_axis == minor_axis: # Sphere\n for seg in self.segment_tuples:\n x1, ...
[ "0.79241526", "0.78404045", "0.77561104", "0.7749781", "0.77387184", "0.77033395", "0.76251054", "0.7585852", "0.7585852", "0.7549177", "0.75270367", "0.75222003", "0.75135034", "0.75106245", "0.75106245", "0.75106245", "0.75106245", "0.75106245", "0.75050455", "0.74775326", ...
0.7314246
55