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
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, ModelDto): 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.808826", "0.808826", "0.8054592", "0.79827315", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(VescCtrlStamped, self).__init__(*args, **kwds) # message fields cannot be None, assign default values for those that are if self.header is None: self.header = std_msgs.msg.Header() if self.control is None: self.control...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(KomodoSpeechRecCommand, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.cmd is None:\n ...
[ "0.7793788", "0.7720338", "0.7720338", "0.7686591", "0.76257044", "0.7563645", "0.7439646", "0.7417169", "0.73514634", "0.73075664", "0.7279945", "0.72372043", "0.7227262", "0.7224145", "0.7224145", "0.7218594", "0.7211639", "0.7211639", "0.7211639", "0.7211639", "0.7211639",...
0.6953332
48
Converts tuple of tensors to `x_dict`, `edge_index_dict` and `edge_mask_dict`.
def _captum_data_to_hetero_data( self, *args ) -> Tuple[Dict[NodeType, Tensor], Dict[EdgeType, Tensor], Optional[Dict[ EdgeType, Tensor]]]: if self.mask_type == MaskLevelType.node: node_tensors = args[:self.num_node_types] node_tensors = [mask.squeeze(0) for mask...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_tensor_to_dic(x):\n B = x.size()[0]\n H = x.size()[2]\n W = x.size()[3]\n\n res = {\n 'y': x[:, 0, :, :].view(B, 1, H, W),\n 'u': x[:, 1, :, :].view(B, 1, H, W),\n 'v': x[:, 2, :, :].view(B, 1, H, W)\n }\n\n return res", "def unpack_tensors(encoder, decoder):\n ...
[ "0.64118654", "0.60061747", "0.59165525", "0.58948964", "0.57231694", "0.57053775", "0.5433653", "0.5412113", "0.53587425", "0.5351688", "0.53233457", "0.5310919", "0.5301571", "0.52776206", "0.52116895", "0.5171543", "0.5152033", "0.51467085", "0.5144656", "0.5132203", "0.51...
0.62618107
1
Helper function to get the number of underlying states in this env
def get_num_states(self): return self.n_states
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_num_states(self):\n return self.N_STATES", "def n_states(self):\n if self._thermodynamic_states is None:\n return 0\n else:\n return len(self._thermodynamic_states)", "def __len__(self):\n i = 0\n for S in self.states():\n i += 1\n ...
[ "0.84148604", "0.8077961", "0.7926179", "0.7887465", "0.7776408", "0.763221", "0.76170987", "0.73388886", "0.73353", "0.7206722", "0.7192643", "0.7043774", "0.6984127", "0.6941678", "0.6842774", "0.6842774", "0.68121105", "0.67282057", "0.67217463", "0.6711314", "0.66939133",...
0.84657013
0
Update the learning rate at the beginning of the given epoch.
def step_begin_epoch(self, epoch): self.lr = self.get_next_lr(epoch) self.optimizer.set_lr(self.warmup_factor * self.lr) return self.optimizer.get_lr()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_learning_rate(self):\r\n self.scheduler.step(self.clock.epoch)", "def on_epoch_start(self):\n self.current_epoch += 1\n self.current_lr = self.fn(self.current_epoch)\n self.model.set_learning_rate(self.current_lr)\n self.epochs += [self.current_epoch]\n self.l...
[ "0.81629276", "0.8128818", "0.7775677", "0.75607294", "0.75487196", "0.74510247", "0.7445148", "0.7395265", "0.7356856", "0.7356856", "0.72853124", "0.72751504", "0.72751504", "0.72224146", "0.71981025", "0.7182542", "0.71626866", "0.7149261", "0.714207", "0.71375054", "0.708...
0.75082546
5
Update the learning rate after each update.
def step_update(self, num_updates): if self.args['optimization']['warmup_updates'] > 0 and \ num_updates <= self.args['optimization']['warmup_updates']: self.warmup_factor = num_updates / float(self.args['optimization']['warmup_updates']) lr = self.warmup_factor * self.lr ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_learning_rate(self):\r\n self.scheduler.step(self.clock.epoch)", "def update_learning_rate(self):\n self.scheduler.step()\n lr = self.optimizer.param_groups[0]['lr']\n print('learning rate = %.7f' % lr)", "def _update_learning_rate(self):\r\n\r\n self.n_steps += 1\...
[ "0.8525054", "0.8246478", "0.81739384", "0.80492413", "0.7949033", "0.7949033", "0.78992677", "0.7889223", "0.78623694", "0.7703854", "0.7637969", "0.76320887", "0.7508339", "0.7478694", "0.73086154", "0.72947234", "0.7267212", "0.7239035", "0.7234639", "0.72077906", "0.71868...
0.7071266
25
Test vector vector np.dot()
def test_dot_vv(self): self.check_dot_vv(dot2, "np.dot()")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vec_dot(v1,v2):\r\n \r\n return np.dot(v1,v2)", "def test_dot():\n assert_equal(dot(Vector(3.0, 2.0), Vector(2.0, -1.0)), 4.0)", "def vector_dot(v, w):\n return np.dot(v, w)", "def naive_vector_dot(x, y):\n assert len(x.shape) == 1\n assert len(y.shape) == 1\n assert x.shape[0] == y....
[ "0.7729243", "0.7593925", "0.7540244", "0.7518693", "0.74872077", "0.746405", "0.719647", "0.7181264", "0.71422243", "0.7130567", "0.7128198", "0.71028394", "0.70881313", "0.70767075", "0.69903505", "0.6980675", "0.6961528", "0.69609135", "0.69603133", "0.69534457", "0.694454...
0.7226153
6
Test vector matrix and matrix vector np.dot()
def test_dot_vm(self): self.check_dot_vm(dot2, dot3, "np.dot()")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_vector_dot_product(self):\n\n # Example 1.2\n vector_p = np.array([0.5, 0.0, 0.5])\n vector_q = np.array([0.5, 0.5, 0.0])\n crystal = crystal_system.Tetragonal(0.5, 1.0)\n magnitude_ref_nm = 5.0/16.0\n\n vector_d = vector_p - vector_q\n magnitude_nm = vecto...
[ "0.7504578", "0.74533993", "0.74486", "0.74431276", "0.72927237", "0.72450703", "0.72100276", "0.7147672", "0.6972846", "0.69246024", "0.6920578", "0.68998843", "0.68958205", "0.6860826", "0.6840426", "0.6788017", "0.67832977", "0.6773496", "0.67483807", "0.66943765", "0.6676...
0.71582407
7
Receives a sentence string along with a word embedding model and returns the vector representation of the sentence
def to_vector(text, model, idf, is_tokenized=False): if not is_tokenized: text= text.split() # splits the text by space and returns a list of words vec = np.zeros(300) # creates an empty vector of 300 dimensions for word in text: # iterates over the sentence if (word in model) & (word in idf): # che...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sentence_to_vec(s, embeddings_dict, stop_words, tokenizer):\n \n words = str(s).lower()\n words = tokenizer(words)\n # remove stop words, if any, and only alpha-numeric tokens\n words = [w for w in words if not w in stop_words and w.isalpha()]\n \n embeddings = []\n for w in words:\n ...
[ "0.79989785", "0.78163093", "0.77080643", "0.7668718", "0.7491303", "0.73854554", "0.73629165", "0.72011703", "0.7179297", "0.71756536", "0.7169924", "0.7107425", "0.7021935", "0.6970946", "0.6929865", "0.68540657", "0.68103296", "0.67714775", "0.6711006", "0.66728824", "0.66...
0.7980614
1
Returns user's first name if allowed
def get(self): user_id = request.args.get('user_id') return get_etunimi(user_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def first_name(self, instance):\r\n return instance.user.first_name", "def ldap_get_firstname(self, user):\n result = super(Auth42, self)._search_not_empty(user)\n if result is not None:\n firstname = result.get(\"first-name\")[0]\n return firstname\n\n return No...
[ "0.83094084", "0.81553173", "0.8020652", "0.7927046", "0.7927046", "0.7846302", "0.78416204", "0.78360397", "0.78026956", "0.7765525", "0.77536064", "0.7666393", "0.76545405", "0.76107544", "0.7533112", "0.75198895", "0.75198895", "0.75198895", "0.7512671", "0.751137", "0.746...
0.0
-1
Returns user's last name if allowed
def get(self): user_id = request.args.get('user_id') return get_sukunimi(user_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_name(self, instance):\r\n return instance.user.last_name", "def ldap_get_lastname(self, user):\n result = super(Auth42, self)._search_not_empty(user)\n if result is not None:\n lastname = result.get(\"last-name\")[0]\n return lastname\n\n return None", ...
[ "0.8347803", "0.8260994", "0.80135506", "0.80135506", "0.7983094", "0.7939775", "0.7873495", "0.78676707", "0.7845761", "0.7765788", "0.7742584", "0.7642941", "0.7642941", "0.7642941", "0.7642941", "0.7640135", "0.7609205", "0.75454444", "0.75418484", "0.75418484", "0.7541848...
0.0
-1
Returns the email address of a user if allowed
def get(self): user_id = request.args.get('user_id') return get_email(user_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_user_email_address(self, request):\n return request.session.get(SESSION_VAR_EMAIL_ADDRESS, not request.user.is_anonymous() and request.user.email)", "def get_user_email(self):\n member = self.get_user()\n if member:\n return member.getProperty('email')", "def email(self...
[ "0.7640283", "0.75975126", "0.7367814", "0.7354638", "0.7342185", "0.7320356", "0.7007652", "0.6980314", "0.68996096", "0.68971515", "0.68785584", "0.6868301", "0.6859209", "0.6834781", "0.6822347", "0.68096685", "0.6762867", "0.6750951", "0.6693975", "0.6693975", "0.6693975"...
0.6948022
8
Returns user's birthday if consent is given
def get(self): user_id = request.args.get('user_id') return get_birthday_if_consent(user_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def profile_birthday(self, ctx):\n profile = await self.cache.get_profile(ctx.author.id)\n if not profile.birthday:\n res = \"You have not set your birthday on your profile yet.\"\n return await ctx.send_line(res, ctx.author.avatar_url)\n res = f\"Your birthday is o...
[ "0.72332054", "0.70199263", "0.687424", "0.68516415", "0.6521123", "0.64762974", "0.64724165", "0.6465451", "0.6422354", "0.63612837", "0.6237562", "0.6121551", "0.60917675", "0.6083023", "0.59954244", "0.59732383", "0.5852152", "0.5838429", "0.5827987", "0.58237296", "0.5728...
0.7677598
0
Returns user's birthday without checking permissions nor consent
def get(self): user_id = request.args.get('user_id') return get_birthday_bypass_perms(user_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self):\n user_id = request.args.get('user_id')\n return get_birthday_if_consent(user_id)", "def date_of_birth(self, instance):\r\n return instance.user.profile.date_of_birth", "async def profile_birthday(self, ctx):\n profile = await self.cache.get_profile(ctx.author.id)\n ...
[ "0.7671829", "0.75878334", "0.74650097", "0.7390223", "0.7328393", "0.72650516", "0.71650004", "0.71214545", "0.70694405", "0.69943786", "0.69579464", "0.674583", "0.66245526", "0.6523784", "0.6428562", "0.6420339", "0.6415252", "0.6411336", "0.626385", "0.6196039", "0.615011...
0.712338
7
Sets the payment_type_id of this PaymentTypeItem.
def payment_type_id(self, payment_type_id): self._payment_type_id = payment_type_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payment_type(self, payment_type):\n\n self._payment_type = payment_type", "def payment_id(self, payment_id):\n\n self._payment_id = payment_id", "def id_type(self, id_type):\n\n self._id_type = id_type", "def type_id(self, type_id):\n if type_id is None:\n raise Val...
[ "0.7822851", "0.65960383", "0.65822244", "0.65310174", "0.63869613", "0.6136055", "0.61256033", "0.61256033", "0.6108814", "0.59600955", "0.5906096", "0.5818897", "0.5796968", "0.5769708", "0.5728596", "0.5725139", "0.5715725", "0.56858593", "0.5684226", "0.5672244", "0.56369...
0.8613032
0
Sets the record_type_enum of this PaymentTypeItem.
def record_type_enum(self, record_type_enum): self._record_type_enum = record_type_enum
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payment_type(self, payment_type):\n\n self._payment_type = payment_type", "def payment_method_enum(self, payment_method_enum):\n\n self._payment_method_enum = payment_method_enum", "def setType(self, newType):\n self._itemType = newType", "def set_type(self, type):\n self.type...
[ "0.64230585", "0.6160108", "0.59505534", "0.59199256", "0.59199256", "0.5907753", "0.5895924", "0.58951545", "0.58934975", "0.58934975", "0.58934975", "0.58934975", "0.58255035", "0.58018976", "0.57379663", "0.57379663", "0.57379663", "0.5728627", "0.5728627", "0.5728627", "0...
0.8431553
0
Sets the category_id of this PaymentTypeItem.
def category_id(self, category_id): self._category_id = category_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_category(self, category):\n\n\t\tif category is not None and not isinstance(category, str):\n\t\t\traise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: category EXPECTED TYPE: str', None, None)\n\t\t\n\t\tself.__category = category\n\t\tself.__key_modified['category'] = 1", "def category(self, category):\...
[ "0.6923407", "0.6768853", "0.6768853", "0.6768853", "0.6768853", "0.6768853", "0.66357696", "0.6626646", "0.64678156", "0.64107984", "0.61634713", "0.6073168", "0.5913669", "0.58615935", "0.5852529", "0.5745075", "0.5634143", "0.55845106", "0.5583384", "0.55692273", "0.552917...
0.74686265
0
Sets the payment_method_enum of this PaymentTypeItem.
def payment_method_enum(self, payment_method_enum): self._payment_method_enum = payment_method_enum
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payment_method(self, payment_method):\n\n self._payment_method = payment_method", "def payment_type(self, payment_type):\n\n self._payment_type = payment_type", "def record_type_enum(self, record_type_enum):\n\n self._record_type_enum = record_type_enum", "def payment_type_id(self, p...
[ "0.6469431", "0.6388738", "0.57271594", "0.56324756", "0.5329956", "0.5257706", "0.52399486", "0.521306", "0.5190753", "0.50760657", "0.50760657", "0.50760657", "0.50669575", "0.50669575", "0.50669575", "0.49524143", "0.49524143", "0.49524143", "0.49524143", "0.49524143", "0....
0.85835725
0
Sets the account_receivable_gl_posting_id of this PaymentTypeItem.
def account_receivable_gl_posting_id(self, account_receivable_gl_posting_id): self._account_receivable_gl_posting_id = account_receivable_gl_posting_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bank_gl_posting_id(self, bank_gl_posting_id):\n\n self._bank_gl_posting_id = bank_gl_posting_id", "def payment_reference_id(self, payment_reference_id):\n\n self._payment_reference_id = payment_reference_id", "def payment_type_id(self, payment_type_id):\n\n self._payment_type_id = paym...
[ "0.6287282", "0.5032368", "0.50069255", "0.46867025", "0.45541477", "0.45061678", "0.43421096", "0.42789668", "0.42569223", "0.42491508", "0.42490616", "0.41683605", "0.41555345", "0.41504076", "0.41455126", "0.41360366", "0.41047356", "0.41047356", "0.40977576", "0.4095567", ...
0.8706938
0
Sets the bank_gl_posting_id of this PaymentTypeItem.
def bank_gl_posting_id(self, bank_gl_posting_id): self._bank_gl_posting_id = bank_gl_posting_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account_receivable_gl_posting_id(self, account_receivable_gl_posting_id):\n\n self._account_receivable_gl_posting_id = account_receivable_gl_posting_id", "def bank_id(self, bank_id):\n\n self._bank_id = bank_id", "def banking_pin(self, banking_pin):\n\n self._banking_pin = banking_pin"...
[ "0.6745645", "0.562506", "0.5399022", "0.5398957", "0.5357401", "0.52835876", "0.52018905", "0.5072775", "0.5035513", "0.5017996", "0.49794698", "0.48970804", "0.4876028", "0.4795575", "0.47910053", "0.4775233", "0.4744159", "0.4744159", "0.4744159", "0.47400093", "0.47257552...
0.8536787
0
Sets the group_by of this PaymentTypeItem.
def group_by(self, group_by): if group_by is not None and len(group_by) > 20: raise ValueError("Invalid value for `group_by`, length must be less than or equal to `20`") # noqa: E501 self._group_by = group_by
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def group_by(self, column):\n self._group_by += (column,)\n return self", "def group_by_source(self, group_by_source):\n\n self._group_by_source = group_by_source", "def item_group_type(self, item_group_type):\n\n self._item_group_type = item_group_type", "def group_by(self, group...
[ "0.6438202", "0.6276274", "0.6262191", "0.6039348", "0.59322596", "0.5755513", "0.5647521", "0.56185347", "0.5594318", "0.54548544", "0.53876215", "0.5371212", "0.53380775", "0.5323402", "0.53005445", "0.53005445", "0.53005445", "0.5279282", "0.52513254", "0.5219659", "0.5197...
0.6600027
0
Sets the credit_card_surcharge of this PaymentTypeItem.
def credit_card_surcharge(self, credit_card_surcharge): self._credit_card_surcharge = credit_card_surcharge
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_recharge(self, recharge):\n self.__recharge = recharge", "def card_currency(self, card_currency):\n\n self._card_currency = card_currency", "def charge(self, charge):\n self._charge = charge", "def charge(self, charge):\n\n self._charge = charge", "def set_risk_free_rate...
[ "0.5508267", "0.5343107", "0.52265245", "0.5211856", "0.51083934", "0.4946877", "0.49288738", "0.48837417", "0.48817888", "0.48810524", "0.48196957", "0.4813889", "0.48098442", "0.47275433", "0.46974495", "0.46724483", "0.46499938", "0.46184856", "0.46184856", "0.46109632", "...
0.8302346
0
Sets the ccs_charge_item_id of this PaymentTypeItem.
def ccs_charge_item_id(self, ccs_charge_item_id): self._ccs_charge_item_id = ccs_charge_item_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 charge_group_id(self, charge_group_id):\n\n self._charge_group_id = charge_group_id", "def currenc...
[ "0.64439636", "0.64439636", "0.64439636", "0.59968764", "0.59102356", "0.59102356", "0.59102356", "0.58427143", "0.57947373", "0.57430375", "0.54000044", "0.5371585", "0.5371585", "0.5299935", "0.5282176", "0.5282176", "0.526574", "0.519227", "0.51758873", "0.5158136", "0.514...
0.84784275
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, PaymentTypeItem): 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.8455985", "0.83913255", "0.81440157", "0.8140831", "0.8132328", "0.80937284", "0.809181", "0.809181", "0.809181", "0.808509", "0.808509", "0.8076134", "0.8076134", "0.8065528" ]
0.0
-1
Returns a list of bulk send batch satuses initiated by account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def get_bulk_send_batches(self, account_id, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_bulk_send_batches_with_http_info(account_id, **kwargs) else: (data) = self.get_bulk_send_batches_with_http_info(account_id, **kwargs) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bulk_send_batches_with_http_info(self, account_id, **kwargs):\n\n all_params = ['account_id', 'batch_ids', 'count', 'search_text', 'start_position', 'status']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n all_params.append('_preload_content')\n ...
[ "0.65653515", "0.61944246", "0.58963114", "0.5720518", "0.5623178", "0.56228936", "0.54510564", "0.54476494", "0.5405516", "0.5391804", "0.5384053", "0.53634554", "0.5345068", "0.5332715", "0.53194845", "0.52468485", "0.5219997", "0.52082664", "0.52035666", "0.5203321", "0.51...
0.6706921
0
Returns a list of bulk send batch satuses initiated by account. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def get_bulk_send_batches_with_http_info(self, account_id, **kwargs): all_params = ['account_id', 'batch_ids', 'count', 'search_text', 'start_position', 'status'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bulk_send_batches(self, account_id, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.get_bulk_send_batches_with_http_info(account_id, **kwargs)\n else:\n (data) = self.get_bulk_send_batches_with_http_info(account_id, ...
[ "0.67055404", "0.6192187", "0.58946806", "0.57182485", "0.5625208", "0.5620817", "0.5448789", "0.54462606", "0.54047304", "0.5388081", "0.5383271", "0.536587", "0.53459924", "0.53322285", "0.5318728", "0.52466774", "0.521723", "0.52062696", "0.5205322", "0.5202895", "0.517901...
0.6564789
1
Lists toplevel details for all bulk send lists visible to the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def get_bulk_send_lists(self, account_id, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_bulk_send_lists_with_http_info(account_id, **kwargs) else: (data) = self.get_bulk_send_lists_with_http_info(account_id, **kwargs) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bulk_send_lists_with_http_info(self, account_id, **kwargs):\n\n all_params = ['account_id']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n all_params.append('_preload_content')\n all_params.append('_request_timeout')\n\n params = lo...
[ "0.5510908", "0.5348474", "0.49564496", "0.49216318", "0.48704678", "0.4832404", "0.4758676", "0.47388116", "0.4725047", "0.46665576", "0.4651571", "0.46051958", "0.459794", "0.45974922", "0.4585549", "0.45338935", "0.45257932", "0.45096952", "0.44669247", "0.44401896", "0.44...
0.44542152
19
Lists toplevel details for all bulk send lists visible to the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def get_bulk_send_lists_with_http_info(self, account_id, **kwargs): all_params = ['account_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs):\n\n all_params = ['account_id', 'bulk_send_list_id']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n all_params.append('_preload_content')\n all_params.append('_r...
[ "0.5346353", "0.49569643", "0.49204624", "0.48695102", "0.48323372", "0.4757793", "0.4739533", "0.47242078", "0.4664801", "0.46479598", "0.46037436", "0.46000364", "0.4597081", "0.45838234", "0.45320642", "0.45224354", "0.45086703", "0.4465492", "0.4453108", "0.44409767", "0....
0.55090225
0
Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the res...
def update_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs) else: (data) = self.update_bulk_send_list...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs):\n\n all_params = ['account_id', 'bulk_send_list_id', 'bulk_sending_list']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n all_params.append('_preload_content')\n ...
[ "0.67880017", "0.586625", "0.5492051", "0.5431518", "0.54002625", "0.53008133", "0.52582383", "0.5104001", "0.4967054", "0.4963827", "0.48697105", "0.48270813", "0.48029232", "0.4753969", "0.47033533", "0.46689865", "0.46622792", "0.46560374", "0.46417344", "0.46401846", "0.4...
0.7142892
0
Updates an existing bulk send list. If send_envelope query string value is provided, will accept an empty payload and try to send the specified envelope This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the res...
def update_bulk_send_list_with_http_info(self, account_id, bulk_send_list_id, **kwargs): all_params = ['account_id', 'bulk_send_list_id', 'bulk_sending_list'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_para...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_bulk_send_list(self, account_id, bulk_send_list_id, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.update_bulk_send_list_with_http_info(account_id, bulk_send_list_id, **kwargs)\n else:\n (data) = self.update_bulk...
[ "0.71422833", "0.586651", "0.5492664", "0.5430854", "0.5399218", "0.5300758", "0.5258146", "0.5104346", "0.49670896", "0.49651593", "0.486877", "0.48272792", "0.48018768", "0.47554457", "0.47028977", "0.4668621", "0.4662875", "0.4654954", "0.4641325", "0.46397704", "0.4630237...
0.6786801
1
Gets the correct layer to be used in the tool
def getLayerFromButton(self, button): #edgvClass found in the dictionary (this is made using the sqlite seed) (category, edgvClass) = self.findReclassificationClass(button) driverName = self.widget.abstractDb.getType() if driverName == "QSQLITE": #reclassification la...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def layer(self):\n return self.GetLayer()", "def GetLayer(self, *args):\n return _XCAFDoc.XCAFDoc_LayerTool_GetLayer(self, *args)", "def getLayer(uniq):\n return Layer(Cuebot.getStub('layer').GetLayer(\n job_pb2.LayerGetLayerRequest(id=uniq), timeout=Cuebot.Timeout).layer)", "def laye...
[ "0.7838754", "0.75384325", "0.74833834", "0.7441619", "0.7426181", "0.7406445", "0.74033916", "0.7388051", "0.71598697", "0.7121109", "0.71156615", "0.7041097", "0.7023889", "0.7008319", "0.6891749", "0.6844146", "0.6834896", "0.68150085", "0.68102705", "0.6801982", "0.678901...
0.56592727
90
Given a branch, eat every leaf at self.hop_interval.
def eat_leaves(self, branch): if self.hop_interval < 1: return curr_leaf = branch.root while curr_leaf: if curr_leaf.val % self.hop_interval == 0: curr_leaf.val = -1 curr_leaf = curr_leaf.next
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_branch(self,G):\n d = self.loc.index(-1) -1 # Depth of current location\n self.loc[d] += 1 # Move one branch to the right \n G[d+1] = [] # Reset the generator on level below\n while self.loc[d] > self.branches[d]-1: # If end of branches at this depth, \n d -= 1 ...
[ "0.58760077", "0.54932976", "0.5423017", "0.53809017", "0.5299648", "0.52354574", "0.52342373", "0.52159876", "0.5128096", "0.5088844", "0.5067467", "0.5040407", "0.5021326", "0.5017099", "0.5009833", "0.4992579", "0.49916053", "0.49868554", "0.492641", "0.49007663", "0.48962...
0.8551676
0
returns atmospheric density, (kg/m3)
def density_from_pressure(temperature, pressure, RH): # R = specific gas constant , J/(kg*degK) = 287.05 for dry air Rd = 287.05 # http://www.baranidesign.com/air-density/air-density.htm # http://wahiduddin.net/calc/density_altitude.htm # Evaporation into the Atmosphere, Wilfried Brutsaert, p37 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def density(self):\n return (1e-3*self.molar_mass) * self.pressure / (gas_constant * self.temperature) # kg/m^3", "def density_g_cm3(self):\n return self._density_kg_m3 / 1000.0", "def density_kg_m3(self):\n return self._density_kg_m3", "def electron_density_per_m3(self):\n return...
[ "0.7981219", "0.7337905", "0.7231991", "0.7116725", "0.6896696", "0.6842307", "0.67297554", "0.6643401", "0.6615492", "0.65925467", "0.65505767", "0.6545142", "0.6515437", "0.6513114", "0.6476936", "0.64687324", "0.64638305", "0.64568466", "0.64568466", "0.64568466", "0.64486...
0.59366703
53
Calculates the unit vector of a vector.
def unit_vector(vector): if not np.all((vector == 0)): return vector / np.linalg.norm(vector) else: return vector
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cal_unit_vec(vector):\n return vector / np.linalg.norm(vector)", "def unit_vector(vector):\n #print 'unit_vector'\n #print vector\n #print type(vector)\n #npvector = np.array(vector)\n return vector / np.linalg.norm(vector)", "def unit_vector(vector):\r\n return vector / np.linalg.norm...
[ "0.8584984", "0.8464844", "0.8449742", "0.8449742", "0.8449742", "0.84188914", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83892196", "0.83637154", "0.8318228", "0.8311494", "0....
0.78263307
31
Given coordinates of closed 2D polygon, determines whether set of 2D coordinates is within polygon boundaries.
def point_in_polygon(x, y, poly): n = len(poly) inside = False p1x, p1y = poly[0] for i in range(n + 1): p2x, p2y = poly[i % n] if y > min(p1y, p2y): if y <= max(p1y, p2y): if x <= max(p1x, p2x): if p1y != p2y: xint...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inside_polygon(x, y, points):\n n = len(points)\n inside = False\n p1x, p1y = points[0]\n for i in range(1, n + 1):\n p2x, p2y = points[i % n]\n if y > min(p1y, p2y):\n if y <= max(p1y, p2y):\n if x <= max(p1x, p2x):\n if p1y != p2y:\n ...
[ "0.76181465", "0.761057", "0.7599715", "0.7302665", "0.7236606", "0.7158191", "0.71512145", "0.70672786", "0.7016834", "0.6989205", "0.6960009", "0.69359666", "0.68919224", "0.68301475", "0.6784286", "0.67425776", "0.67170155", "0.67143065", "0.67037433", "0.6683307", "0.6666...
0.7012714
9
Compute sequence lengths for each batch element in a tensor using a binary mask.
def get_lengths_from_binary_sequence_mask( mask: torch.BoolTensor, ) -> torch.LongTensor: return mask.sum(-1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_lengths_from_binary_sequence_mask(mask: torch.Tensor):\n return mask.long().sum(-1)", "def get_lengths_from_binary_sequence_mask(self, mask: torch.Tensor):\n return mask.long().sum(-1)", "def length(sequence):\r\n populated = tf.sign(tf.abs(sequence))\r\n length = tf.cast(tf.reduce_sum(...
[ "0.7909907", "0.78093165", "0.68119484", "0.66441935", "0.64059174", "0.6311697", "0.6290988", "0.6189305", "0.6063029", "0.6061948", "0.60144204", "0.59709346", "0.5941078", "0.5875362", "0.5818991", "0.5807896", "0.5748366", "0.56816006", "0.56356966", "0.55701566", "0.5568...
0.78823507
1
Given a variable of shape `(batch_size,)` that represents the sequence lengths of each batch element, this function returns a `(batch_size, max_length)` mask variable. For example, if our input was `[2, 2, 3]`, with a `max_length` of 4, we'd return `[[1, 1, 0, 0], [1, 1, 0, 0], [1, 1, 1, 0]]`. We require `max_length` h...
def get_mask_from_sequence_lengths( sequence_lengths: torch.Tensor, max_length: int ) -> torch.BoolTensor: # (batch_size, max_length) ones = sequence_lengths.new_ones(sequence_lengths.size(0), max_length) range_tensor = ones.cumsum(dim=1) return sequence_lengths.unsqueeze(1) >= range_tensor
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sequence_mask(lengths, max_len=None):\r\n batch_size = lengths.numel()\r\n max_len = max_len or lengths.max()\r\n return (torch.arange(0, max_len)\r\n .type_as(lengths)\r\n .repeat(batch_size, 1)\r\n .lt(lengths.unsqueeze(1)))", "def sequence_mask(lengths, max_len=No...
[ "0.74920034", "0.7483088", "0.7206051", "0.6819283", "0.6588281", "0.6537425", "0.65057117", "0.64488655", "0.63128495", "0.6210642", "0.61760044", "0.6175143", "0.61017036", "0.60947627", "0.60796463", "0.6052767", "0.5975326", "0.5972552", "0.5955614", "0.59449095", "0.5938...
0.7598485
0
r"""Applies residual net 101 model. Note that the fc layers in the original architecture will be replaced with fully convolutional layers. For convenience, We still call them fc layers, though.
def sg_resnet_101(x, opt): opt += tf.sg_opt(num_class=1000, conv_only=False, squeeze=True) # convolution layers ( residual net v2 arch ) conv = (x .sg_conv(dim=64, size=7, stride=2) .sg_pool(size=3, stride=2, pad='SAME') .sg_resnet_layer(dim=64, num=3, stride=1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resnet101(pretrained=False, **kwargs):\n model = ResNet(Bottleneck, [3, 4, 23, 3], **kwargs)\n if pretrained:\n model.load_state_dict(model_zoo.load_url(model_urls['resnet101']))\n fc = transfer_fc(model.fc)\n model.fc = fc\n return model", "def modified_resnet10(self) -> torch.nn.Modul...
[ "0.68103427", "0.6642946", "0.6612078", "0.65899354", "0.6542888", "0.6424872", "0.6363448", "0.63495874", "0.6342291", "0.6342071", "0.63304263", "0.6328647", "0.6266833", "0.6262299", "0.6260273", "0.623561", "0.6233115", "0.6220963", "0.6190933", "0.61806256", "0.61517215"...
0.63932425
6
r"""Applies basic architecture residual net. Note that the fc layers in the original architecture will be replaced with fully convolutional layers. For convenience, We still call them fc layers, though.
def sg_resnet_layer(tensor, opt): assert opt.dim is not None, 'dim is mandatory.' assert opt.num is not None, 'num is mandatory.' # default stride opt += tf.sg_opt(stride=1) # 1st block out = (tensor .sg_bypass(act='relu', bn=True) .sg_conv(dim=opt.dim, size=1, act='relu'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def residual_net_old(total_depth, data_layer_params, num_classes = 1000, acclayer = True):\n # figure out network structure\n net_defs = {\n 18:([2, 2, 2, 2], \"standard\"),\n 34:([3, 4, 6, 3], \"standard\"),\n 50:([3, 4, 6, 3], \"bottleneck\"),\n 101:([3, 4, 23, 3], \"bottleneck\...
[ "0.6846631", "0.6512502", "0.6477615", "0.6418338", "0.63706464", "0.6302761", "0.6291098", "0.62775016", "0.6271404", "0.62692654", "0.62280244", "0.62271845", "0.6192073", "0.61914605", "0.61685985", "0.6161442", "0.6138508", "0.6134096", "0.61052674", "0.6101448", "0.60866...
0.0
-1
Maps the given position to one of the mission plane's subdivisions, and verifies if it is a legal area.
def is_subdivision_available(self, position: np.ndarray) -> bool: subdivision_x_index = int(position[0]) // self.square_subdivision_length subdivision_y_index = int(position[1]) // self.square_subdivision_length return self.plane_subdivisions_availability[subdivision_x_index, subdivision_y_index] == 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pos_within_bounds(position):\n if type(position[0]) == int:\n row,col = position\n else:\n col,row = position\n \n if not 1<=row<=8:\n return False\n if not 65<=ord(col)<=72:\n return False\n return True", "def inside_limit...
[ "0.5870312", "0.58559686", "0.5751566", "0.5714609", "0.57096195", "0.5689408", "0.56798744", "0.56762284", "0.5654134", "0.5624692", "0.5623249", "0.5615668", "0.55862385", "0.5580088", "0.5574577", "0.55440044", "0.5542264", "0.5541276", "0.5527285", "0.55205816", "0.550516...
0.6583165
0
Retrieves a local (or from any scope if the `depth` is specified, the name has historical reasons) variable.
def get_local(self, where: Any, depth: int = 0) -> Any: return self.scope_stack[depth][where]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def local_variable(initial_value,\n validate_shape=True,\n name=None,\n use_resource=None):\n return variable_scope.variable(\n initial_value, trainable=False,\n collections=[ops.GraphKeys.LOCAL_VARIABLES],\n validate_shape=validate_shape,\n ...
[ "0.6384627", "0.6260965", "0.61752033", "0.61425614", "0.6025435", "0.60070276", "0.5988529", "0.59588075", "0.5955907", "0.5824214", "0.5651528", "0.5646678", "0.5620118", "0.5559949", "0.555987", "0.5546778", "0.5507365", "0.5480121", "0.5427318", "0.54002684", "0.53955483"...
0.75251776
0
Creates and saves a User with the given username, email and password
def _create_user(self, username, email, password, is_staff, is_superuser, **extra_fields): now = timezone.now() if not email: raise ValueError('The given username must be set') email = self.normalize_email(email) user = self.model(username=email, email=e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_user(self, email, password,username, **extra_fields):\r\n if not email:\r\n raise ValueError('The given email must be set')\r\n if not username:\r\n raise ValueError('The given username must be set')\r\n email = self.normalize_email(email)\r\n user = se...
[ "0.8688118", "0.85212123", "0.8470014", "0.8408307", "0.8397623", "0.8376213", "0.83459276", "0.83334935", "0.83148307", "0.82950073", "0.8293574", "0.82866865", "0.82846284", "0.8282472", "0.8262413", "0.82573724", "0.8244926", "0.81742525", "0.8174012", "0.81729937", "0.816...
0.0
-1
Centroid ycoordinate of element e in global Cartesian coordinate system.
def centry(self, e: int) -> float: result = self._read_inline(f"centry({e})") return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getcenter(self):\n return self.centro.cartesianas()", "def getCentroid(self):\r\n return self._centroid", "def get_centre(self):\n # just get the centroid\n # perhaps try something like:\n # https://github.com/mapbox/polylabel/blob/master/polylabel.js\n # in the fu...
[ "0.6603653", "0.65820926", "0.64293665", "0.64113486", "0.6320278", "0.6292431", "0.61695504", "0.61522007", "0.6151395", "0.6139535", "0.61233187", "0.60308814", "0.60294485", "0.60122937", "0.5979308", "0.5952355", "0.59457916", "0.5933232", "0.5932158", "0.59098566", "0.58...
0.0
-1
Xcoordinate of node k in the active coordinate system.
def nx(self, n: int) -> float: result = self._read_inline(f"nx({n})") return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x(self):\n return self._kml['x']", "def kx(self, k: int) -> float:\n result = self._read_inline(f\"kx({k})\")\n return result", "def get_x(self):\n return self.posX", "def _get_x(self):\n return self.position.x", "def x(self):\n if self._x is None:\n ...
[ "0.7097291", "0.70390826", "0.6730181", "0.6705391", "0.6696086", "0.6564014", "0.6528588", "0.6526854", "0.65099895", "0.6498834", "0.64540195", "0.6441986", "0.6431794", "0.64116704", "0.63622534", "0.6322273", "0.63098997", "0.6300082", "0.62870294", "0.6265667", "0.625501...
0.0
-1
Ycoordinate of node k in the active coordinate system.
def ny(self, n: int) -> float: result = self._read_inline(f"ny({n})") return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def y(self):\n return self._kml['y']", "def findY(self):\n return self.y", "def getY(self):\n return self.labels[0]", "def __get_y__(self):\n return self.Direction['y']", "def getY(self):\r\n\t\treturn self._y", "def get_y(self):\n return self.__y", "def getY(self):\n...
[ "0.7153611", "0.6720105", "0.66428995", "0.66149193", "0.6589207", "0.6587384", "0.65639365", "0.65630436", "0.65630436", "0.6558805", "0.65314806", "0.652817", "0.6517409", "0.65169525", "0.651619", "0.65130126", "0.6487588", "0.6487588", "0.64821535", "0.6474406", "0.646925...
0.0
-1
Xcoordinate of keypoint k in the active coordinate system.
def kx(self, k: int) -> float: result = self._read_inline(f"kx({k})") return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x(self):\n return self._kml['x']", "def x(self):\n return _libsbml.Point_x(self)", "def get_x(self):\n return self.coords[0]", "def get_x(self):\n return self.posX", "def get_x_position(self):\n return self.actual_coordinates[0]", "def _get_x(self):\n return ...
[ "0.7346432", "0.69811106", "0.6953063", "0.69497323", "0.6934706", "0.69345665", "0.68799025", "0.6864242", "0.68457437", "0.6808988", "0.679431", "0.6706073", "0.6622826", "0.6607535", "0.65305334", "0.6500533", "0.6477185", "0.6453437", "0.64193225", "0.64114183", "0.640530...
0.70647717
1
Ycoordinate of keypoint k in the active coordinate system.
def ky(self, k: int) -> float: result = self._read_inline(f"ky({k})") return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def y(self):\n return self._kml['y']", "def findY(self):\n return self.y", "def get_y(self):\n return self.coords[1]", "def y(self):\n return _libsbml.Point_y(self)", "def getY(self):\r\n\t\treturn self._y", "def __get_y__(self):\n return self.Direction['y']", "def ge...
[ "0.7326198", "0.70024025", "0.6983337", "0.6981136", "0.6968318", "0.6948874", "0.694867", "0.6932499", "0.69242305", "0.6912647", "0.68999946", "0.6899753", "0.6899753", "0.6896919", "0.6870333", "0.682652", "0.6821816", "0.6802133", "0.67984855", "0.6748123", "0.6739709", ...
0.62761796
66
Xcoordinate of line l at length fraction lfrac (0.0 to 1.0).
def lx(self, l: int, lfrac: float) -> float: self._check_lfrac(lfrac) self._raise_if_not_line(l) result = self._read_inline(f"lx({l},{lfrac})") return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lxyz(self, l: int, lfrac: float) -> Point:\n self._check_lfrac(lfrac)\n self._raise_if_not_line(l)\n x = self._read_inline(f\"lx({l},{lfrac})\")\n y = self._read_inline(f\"ly({l},{lfrac})\")\n z = self._read_inline(f\"lz({l},{lfrac})\")\n return Point(x, y, z)", "def...
[ "0.74311626", "0.64162236", "0.6094749", "0.59952855", "0.5986584", "0.5896808", "0.5741566", "0.5721142", "0.57070285", "0.56550175", "0.5473326", "0.5436364", "0.53056836", "0.5301671", "0.53007704", "0.52541345", "0.52516824", "0.52301204", "0.5201244", "0.51664", "0.51418...
0.83110285
0
Get a single Employer by its id
def employers_id_get(id): # noqa: E501 return query_manager.get_resource(id=id, rdf_type_uri=EMPLOYER_TYPE_URI, rdf_type_name=EMPLOYER_TYPE_NAME, kls=Employer)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_employee_by_id(self, employee_id):\n employee = self.admin_repository.get_employee_by_id(employee_id)\n if employee:\n print('''Name: {}\\nEmail: {}\\n\n '''.format(employee[0], employee[1]))\n return employee\n else:\n print(\"Inva...
[ "0.7912563", "0.78663605", "0.77408695", "0.7640504", "0.7632499", "0.73787713", "0.7366478", "0.6907838", "0.6822969", "0.6775455", "0.67666215", "0.64948523", "0.6482978", "0.6428584", "0.63961726", "0.638778", "0.6380637", "0.6374707", "0.6364641", "0.6348949", "0.62959325...
0.8084092
0
Get the submenu associated with this item.
def submenu(self) -> CursesMenu | None: return self._submenu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cp_submenu(self):\n response = self.get(COMMAND_CPM, 'GetCpSubmenu')\n\n return response_list(response['submenu']['submenuitem'])", "def get_menu ( self, object ):\n return self.menu", "def GetMenu(self):\n return self._menu", "def get_menu ( self, object, row ):\n ...
[ "0.7404429", "0.72888833", "0.7087812", "0.69491416", "0.6905734", "0.6877223", "0.66307855", "0.6398336", "0.63354725", "0.6256995", "0.62494344", "0.62360096", "0.6048636", "0.5993777", "0.5921776", "0.5914873", "0.5907261", "0.5852874", "0.58203447", "0.5779321", "0.574314...
0.8376664
0
Construct an User instance
def __init__(self, user_name, display_name=None, first_name=None, last_name=None, honorific=None, register_date=None, register_time=None, default_thermostat_identifier=None, management_ref=None, utility_ref=None, support_ref=None, phone_number=None, is_residential=None, is_developer=No...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user(self, *args, **kwargs) -> User:\n return User(self.handle, *args, **kwargs)", "def create_user(self):\n return UserFactory.create()", "def new_user(first_name, sur_name, user_name, email, password):\n new_user = User(first_name, sur_name, user_name, email, password)\n return new_us...
[ "0.79245967", "0.7868969", "0.74402773", "0.7337297", "0.7328512", "0.73237526", "0.73021823", "0.72845113", "0.72768515", "0.7243336", "0.72321326", "0.7228584", "0.72206134", "0.7156756", "0.7154991", "0.71455604", "0.71287847", "0.7120101", "0.7103267", "0.7103161", "0.709...
0.0
-1
Gets the user_name attribute of this User instance.
def user_name(self): return self._user_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getUserName(self):\n user = User.by_id(self.user_id)\n return user.name", "def user_name(self):\n return self._user_name", "def user_name(self) -> str:\n return pulumi.get(self, \"user_name\")", "def user_name(self):\n return self._stub.List(self._message).user_name", ...
[ "0.8695933", "0.8491625", "0.83442926", "0.8032907", "0.79995286", "0.796969", "0.7923125", "0.79227084", "0.7877159", "0.78485185", "0.7691971", "0.7687316", "0.76827425", "0.76773435", "0.75762814", "0.7565913", "0.75477576", "0.75477576", "0.7528237", "0.7527566", "0.74714...
0.85629064
1
Gets the display_name attribute of this User instance.
def display_name(self): return self._display_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_display_name(self):\n return self.user.get_full_name() or self.user.get_username()", "def get_displayname(self):\n return self.full_name or self.user.username", "def get_display_name(self):\n\n return self._display_name", "def display_name(self):\n return self.propert...
[ "0.86711675", "0.84099305", "0.82567805", "0.82308203", "0.8199648", "0.80818456", "0.8024915", "0.8024915", "0.8024915", "0.8024915", "0.8024915", "0.8008838", "0.7975295", "0.7975295", "0.7975295", "0.7975295", "0.7975295", "0.7975295", "0.7975295", "0.7975295", "0.7975295"...
0.7977381
12
Gets the first_name attribute of this User instance.
def first_name(self): 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 return self._first_name", "def first_name(self):\n return self._first_name", "def first_name(self):\n return self._first_name", "d...
[ "0.88124865", "0.8706269", "0.86452955", "0.86452955", "0.86452955", "0.8574421", "0.85342723", "0.82670474", "0.82670474", "0.80297154", "0.7976355", "0.7976355", "0.7707818", "0.76792186", "0.76559454", "0.76211447", "0.76211447", "0.76211447", "0.76211447", "0.76211447", "...
0.86649644
2
Gets the last_name attribute of this User instance.
def last_name(self): return self._last_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_last_name(self):\n return self._last_name", "def get_last_name(self) -> str:\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_name(self):\n return self._last_name", "def last_na...
[ "0.87178856", "0.8713105", "0.8498345", "0.8498345", "0.8498345", "0.8498345", "0.8497585", "0.8481689", "0.8282436", "0.8142776", "0.8142776", "0.8142776", "0.8142776", "0.8142776", "0.80393517", "0.80393517", "0.79960173", "0.7952464", "0.7662235", "0.7600344", "0.7449552",...
0.8540826
2
Gets the honorific attribute of this User instance.
def honorific(self): return self._honorific
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def userattr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"userattr\")", "def userattr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"userattr\")", "def userattr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"userattr\")", "def get_user_at...
[ "0.650002", "0.6303197", "0.6303197", "0.6078447", "0.60471505", "0.6021869", "0.5964756", "0.5782634", "0.56317824", "0.56303495", "0.56178695", "0.5617328", "0.554256", "0.55301005", "0.55264765", "0.5509889", "0.5502829", "0.55017775", "0.55010796", "0.55010796", "0.550107...
0.7681896
0
Gets the register_date attribute of this User instance.
def register_date(self): return self._register_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_registered(self) -> datetime:\n return datetime.utcfromtimestamp(self.registered)", "def date_of_birth(self):\n return self.__date_of_birth", "def get_account_created_date(self):\n return self.account_created_date", "def getUserSignupDate(self):\r\n userinfo = self.getUse...
[ "0.710168", "0.679528", "0.6697615", "0.66683227", "0.6667845", "0.6667845", "0.6667845", "0.6667845", "0.66475785", "0.66140026", "0.6567986", "0.6497813", "0.6298222", "0.6298222", "0.6282141", "0.6282141", "0.6282141", "0.6276728", "0.6276728", "0.6276728", "0.6259881", ...
0.8172965
0
Gets the register_time attribute of this User instance.
def register_time(self): return self._register_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_time(self):\n return self.__time", "def regime(self):\n return self._regime", "def get_time(self):\n return self.time", "def get_time(self):\n return self._time", "def get_time(self):\n return self._time", "def get_time(self):\n return self._time", "def...
[ "0.6913053", "0.68987423", "0.6827761", "0.6789466", "0.6789466", "0.6789466", "0.6560795", "0.6560795", "0.6560795", "0.6505586", "0.64685464", "0.64661264", "0.64661264", "0.64661264", "0.64457023", "0.64457023", "0.64457023", "0.64457023", "0.6444971", "0.64374536", "0.639...
0.7947593
0
Gets the default_thermostat_identifier attribute of this User instance.
def default_thermostat_identifier(self): return self._default_thermostat_identifier
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_default(cls):\n return cls.USER", "def user_huid(self) -> Optional[UUID]:\n return self.user.user_huid", "def InternalUID(self, default=None):\n return self.data.get('internal_uid', default)", "def default_user(self) -> str:\n return OS_MAPPING.get(self.os, []).get(\"u...
[ "0.70473707", "0.64426047", "0.630716", "0.6257896", "0.61779475", "0.61380607", "0.60576195", "0.5995088", "0.59517395", "0.5923838", "0.5923838", "0.58937633", "0.5871734", "0.58711296", "0.58512545", "0.5830031", "0.5830031", "0.5821047", "0.5818187", "0.5814174", "0.58123...
0.8652761
0
Gets the phone_number attribute of this User instance.
def phone_number(self): return self._phone_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def person_phone_number(self):\n return self._person_phone_number", "def phone_number(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"phone_number\")", "def phone(self):\n\n return self._phone", "def phone(self):\n return self._phone", "def phone(self):\n ...
[ "0.8198738", "0.7827681", "0.7626391", "0.7618975", "0.7618975", "0.7618975", "0.7552291", "0.7527312", "0.7527312", "0.7480803", "0.7427364", "0.739278", "0.7230414", "0.7224511", "0.71762", "0.7134153", "0.71201205", "0.70701677", "0.69107413", "0.68850917", "0.68703765", ...
0.8475206
0
Gets the is_residential attribute of this User instance.
def is_residential(self): return self._is_residential
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_residency_enabled(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"data_residency_enabled\")", "def data_residency_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"data_residency_enabled\")", "def data_residency_enabled(self) -> Optional[pulum...
[ "0.6353559", "0.6298907", "0.6298907", "0.59566754", "0.59394073", "0.5862926", "0.58575934", "0.5575959", "0.5392949", "0.5358", "0.53560656", "0.5341406", "0.5334984", "0.53021574", "0.52886343", "0.5274095", "0.52702373", "0.52136904", "0.5113034", "0.5104108", "0.50992763...
0.80482715
0
Gets the is_developer attribute of this User instance.
def is_developer(self): return self._is_developer
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_developer(self):\n return int(self.developer_status) == 2", "def developer(self):\n return self._developer", "def is_dev(self):\n\n return self.dev", "def is_personal(self):\n return self.user_id is not None", "def is_superuser(self):\n return self.is_admin", "de...
[ "0.7745556", "0.7628809", "0.6563136", "0.64153016", "0.6180708", "0.5860149", "0.58316773", "0.5763394", "0.5736679", "0.5734305", "0.5722964", "0.5693252", "0.567447", "0.5673131", "0.5673131", "0.56721425", "0.5660587", "0.5660587", "0.5639675", "0.56344515", "0.56068736",...
0.8319895
0
Gets the is_management attribute of this User instance.
def is_management(self): return self._is_management
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def management(self) -> Optional[str]:\n return pulumi.get(self, \"management\")", "def management(self) -> Optional[pulumi.Input['NodeManagementArgs']]:\n return pulumi.get(self, \"management\")", "def management(self) -> Optional[pulumi.Input['NodeManagementArgs']]:\n return pulumi.get(s...
[ "0.7033219", "0.6449006", "0.6449006", "0.63830245", "0.637783", "0.6326368", "0.62673104", "0.62673104", "0.6132066", "0.6126286", "0.61177313", "0.605762", "0.6055739", "0.6011934", "0.5975108", "0.5960456", "0.595922", "0.5954248", "0.59392065", "0.5903144", "0.5903144", ...
0.81892514
0
Gets the is_utility attribute of this User instance.
def is_utility(self): return self._is_utility
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_utility_value(self):\n raise AIError(\"Must be implemented in child class!\")", "def get_isenabled(self):\n return self.isenabled", "def utility(self) -> str:\n return self._utility", "def is_active_user(self):\n\n return self.is_active", "def active(self):\n if s...
[ "0.60515", "0.59666544", "0.5894315", "0.58752745", "0.58124226", "0.57885695", "0.5767348", "0.5767348", "0.5744299", "0.5656193", "0.55965054", "0.5585718", "0.5569105", "0.55544823", "0.55357367", "0.5520389", "0.55084056", "0.5503989", "0.5503989", "0.5458196", "0.5451966...
0.7529154
0
Gets the is_contractor attribute of this User instance.
def is_contractor(self): return self._is_contractor
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_collaborator(self, user):\r\n url = '{0}/{1}'.format(self.get_url(), user)\r\n\r\n return http.Request('GET', url), resource.parse_boolean", "def synchronize_contractor_info(self):\n\n return self._synchronize_contractor_info", "def is_customer(self):\n return self.user_type ...
[ "0.577618", "0.5696702", "0.5499465", "0.544657", "0.5404379", "0.5395525", "0.53895193", "0.5301738", "0.52895766", "0.52783394", "0.524137", "0.5240245", "0.5182664", "0.51820606", "0.5168482", "0.51283586", "0.5127332", "0.5125212", "0.5123661", "0.5113954", "0.5113603", ...
0.80072033
0
Reference to the Camera object that the Focuser is assigned to, if any. A Focuser should only ever be assigned to one or zero Cameras!
def camera(self): return self._camera
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def camera(self):\n return self.__camera", "def camera_entity(self):\n return self._camera_entity", "def _get_camera(self):\n rect = (self._dim[0], self._dim[2], self._dim[1] - self._dim[0],\n self._dim[3] - self._dim[2])\n flip = (False, type(self).__name__ == 'Image...
[ "0.7597138", "0.67578745", "0.6709415", "0.6595553", "0.6538796", "0.65192163", "0.65192163", "0.64636594", "0.6444139", "0.64416015", "0.6292046", "0.6280653", "0.622294", "0.6220005", "0.6183805", "0.6179369", "0.6164218", "0.6147449", "0.6094211", "0.6086462", "0.6067165",...
0.7503336
1
Convert an numpy representation image to Image protobuf.
def make_image(tensor): from PIL import Image height, width, channel = tensor.shape image = Image.fromarray(tensor) import io output = io.BytesIO() image.save(output, format='PNG') image_string = output.getvalue() output.close() return tf.Summary.Image(height=height, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_proto_to_image(image_pb: NLImage) -> np.ndarray:\n input_array = np.frombuffer(image_pb.data, dtype=np.uint8)\n dimensions = [image_pb.height, image_pb.width]\n if image_pb.color:\n dimensions.append(3)\n input_image = input_array.reshape(dimensions)\n return input_image", "def ...
[ "0.7984228", "0.7688757", "0.6840271", "0.6521011", "0.6453714", "0.6436157", "0.638863", "0.63449216", "0.62659436", "0.62381893", "0.6181992", "0.6170321", "0.6163695", "0.6132956", "0.6117163", "0.61133146", "0.61118764", "0.6100666", "0.60880834", "0.6081963", "0.6077308"...
0.0
-1
Get the current device or use a device by device number, and return the CUDA context.
def get_context(devnum=None): return _runtime.get_or_create_context(devnum)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_device():\n return context.get_context('device_target')", "def get_device():\n import torch\n\n if torch.cuda.is_available():\n return torch.device('cuda')\n return torch.device('cpu')", "def get_device(i=0):\n if torch.cuda.is_available():\n return torch.d...
[ "0.7311526", "0.71926", "0.7107093", "0.7078534", "0.7078534", "0.7052546", "0.70200545", "0.6866035", "0.68125933", "0.68071365", "0.67982614", "0.6745143", "0.6731756", "0.66556823", "0.66474414", "0.6617979", "0.6610446", "0.65516037", "0.6531695", "0.6530794", "0.652303",...
0.0
-1
A decorator that ensures a CUDA context is available when fn is executed.
def require_context(fn): @functools.wraps(fn) def _require_cuda_context(*args, **kws): with _runtime.ensure_context(): return fn(*args, **kws) return _require_cuda_context
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cudify(fn):\n\n @functools.wraps(fn)\n def wrapper(*args, **kwargs):\n result = fn(*args, **kwargs)\n return cuda_if_gpu(result)\n\n return wrapper", "def translation_rule_gpu(func):\n # functions to call before running the translation rule\n setup_funcs = (\n ensure_gpu_e...
[ "0.7606609", "0.6391569", "0.6279433", "0.6196908", "0.6090334", "0.60102594", "0.5855044", "0.58378994", "0.58010226", "0.57514495", "0.56556994", "0.5614155", "0.55304664", "0.54902506", "0.54859966", "0.548332", "0.5475126", "0.5343005", "0.5337974", "0.53101325", "0.53101...
0.874117
0
Return chrpos not in our results
def get_mutations_we_miss(quality_cutoff): murim_mutations = get_murim_mutations(quality_cutoff) my_mutations = get_my_mutations(quality_cutoff) missing = {} for chrpos in murim_mutations: if chrpos not in my_mutations: missing[chrpos] = True return missing
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _findExMark(self):\n c_i = 0\n while c_i < len(self.c) and self.c[c_i] != '!':\n c_i += 1\n\n if c_i+1 < len(self.c):\n iRet = self.c[c_i+1:]\n self.code = self.c[:c_i]\n return iRet\n\n return ''", "def test_only_pos_that_not_match(self...
[ "0.62925655", "0.6126581", "0.59913015", "0.563983", "0.5589107", "0.5559448", "0.5548103", "0.55321884", "0.553037", "0.5506197", "0.5400125", "0.5400125", "0.535854", "0.53486437", "0.53403604", "0.53381205", "0.5319673", "0.53077114", "0.5306026", "0.5301365", "0.5256786",...
0.0
-1
Creates an NDArray object from a json.
def fromjson(cls, jsonstr: ty.Text) -> "NDArray": return cls(**json.loads(jsonstr))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_numpy_json(array_json):\n return json.loads(array_json, object_hook=json_numpy_obj_hook)[constants.NUMPY_JSON_KEY]", "def load_numpy_json(array_json):\n return json.loads(array_json, object_hook=json_numpy_obj_hook)[constants.NUMPY_JSON_KEY]", "def json_numpy_obj_hook(dct):\n if isinstance(dc...
[ "0.69514996", "0.69514996", "0.66255546", "0.66255546", "0.66255546", "0.6534709", "0.6406849", "0.61918086", "0.60854906", "0.6003771", "0.59946936", "0.5867945", "0.5817754", "0.5802425", "0.57825124", "0.57658815", "0.5764051", "0.5698009", "0.56537634", "0.5653357", "0.55...
0.8065292
0
Reload a BioPose from a file path.
def reload_from_file(self, path, model_num=0): self.struct, self.header = self.load_from_file(path) self._setup_self(model_num)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reloadfile(self, ):\n self.loadfile()", "def reload(self, filename = None):\r\n if self.config.get('world', 'autosave'):\r\n self.save()\r\n self.load(filename or self.filename)", "def editPose(self, *arg, **properties):\n mode = Mode(properties.get('show', None), properties.get('sequence...
[ "0.665631", "0.66278744", "0.6137292", "0.60278887", "0.60278887", "0.60278887", "0.5970695", "0.59583193", "0.59583193", "0.5936089", "0.59038794", "0.59038794", "0.59038794", "0.58904886", "0.5796916", "0.57966334", "0.57948697", "0.57860357", "0.5781128", "0.57578224", "0....
0.65708685
2
Get the Bio Structure stored in this class.
def structure(self): return self.struct
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_structure(self):\n return self.structure", "def get_structure(self):\n return self.model.structure", "def get_structure(self):\n return self.model.structure", "def get_structure(self):\n return self.model.structure", "def get_structure(self):\n return self.model.s...
[ "0.6950234", "0.6490224", "0.6490224", "0.6490224", "0.6490224", "0.64164376", "0.6301339", "0.6268473", "0.6190397", "0.6148493", "0.61165506", "0.59748316", "0.58606714", "0.5851", "0.58488363", "0.58059376", "0.58034164", "0.579782", "0.5790342", "0.5783361", "0.5751781", ...
0.6972353
0
Get a Bio Atom of the stored structure
def atom(self, atom_name, resnum, chain_id, icode=' ', alt=' ', model_num=0): return self.struct[model_num][chain_id][(alt, resnum, icode)][atom_name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_atom_info(self):\n return", "def getAtom(self, atomname):\n if self.hasAtom(atomname):\n return self.atoms[atomname]\n else:\n return None", "def get_atom1(self):\n return self.atom1", "def __generate_atoms__(self, pdb):\n\n atoms = [] # Maybe ...
[ "0.58798796", "0.5874702", "0.58376926", "0.58077455", "0.5714377", "0.5640595", "0.5609761", "0.55405253", "0.55150217", "0.54806393", "0.54746413", "0.5467564", "0.5455949", "0.5453991", "0.5424829", "0.54153556", "0.5300758", "0.5267167", "0.523773", "0.52045727", "0.51402...
0.60623544
0
Setup all residues in the model, for ease of use like a pose.
def _setup_all_residues(self, model_num=0): all_residues = vector1() for chain_id in self.get_chain_ids(model_num): #print "ChainID: "+chain_id residues = self.residues(chain_id, model_num) all_residues.extend(residues) return all_residues
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _setup_self(self, model_num =0):\n self.all_residues = self._setup_all_residues(model_num) #vector1 of Bio Residues\n self.pdb_info = self._setup_pdb_info() #PDBInfo to map the vector1\n self.peptide_bond_distances = self._setup_peptide_bond_distances() #map of bond distances to next resid...
[ "0.74968535", "0.63797474", "0.63122195", "0.62103146", "0.6163988", "0.6152127", "0.6149729", "0.61155874", "0.6064542", "0.604339", "0.6024658", "0.59996843", "0.58754027", "0.58730763", "0.5871819", "0.5844229", "0.5817004", "0.5811886", "0.57980657", "0.5790398", "0.57789...
0.67536104
1
Determine whether keystone role is present on this instance.
def _has_keystone_role(self, role): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hasRole():\n conn = iamConn()\n try:\n conn.get_role(getArgs().role_name)\n return True\n except boto.exception.BotoServerError:\n return False", "def has_role(self, role):\n return False", "def has_role(self, role):\n\n if self.roles and (role in self.roles):\n ...
[ "0.73785156", "0.731025", "0.7289285", "0.6929106", "0.6872853", "0.6777043", "0.66895545", "0.664631", "0.6607835", "0.6569764", "0.6477714", "0.63835794", "0.63809526", "0.6378541", "0.6374232", "0.6370181", "0.62561595", "0.62432677", "0.6196893", "0.6196893", "0.6196893",...
0.8105857
0
Determine if an instance of this class has the configured role.
def has_role(self, role): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_role(self, role):\n\n if self.roles and (role in self.roles):\n return True\n return False", "def hasRole():\n conn = iamConn()\n try:\n conn.get_role(getArgs().role_name)\n return True\n except boto.exception.BotoServerError:\n return False", "def...
[ "0.7896236", "0.7512418", "0.7256095", "0.7245744", "0.7003567", "0.69252825", "0.6891301", "0.67671865", "0.67068225", "0.65956527", "0.65429205", "0.64899147", "0.6452588", "0.6435398", "0.64034194", "0.63751453", "0.6334606", "0.6284422", "0.62312996", "0.6199919", "0.6199...
0.7872166
1
r"""Convert a PIL image to a tensor.
def pil_to_tensor(pil_image): pil_image = np.array(pil_image) if len(pil_image.shape) == 2: pil_image = pil_image[:, :, None] return torch.tensor(pil_image, dtype=torch.float32).permute(2, 0, 1) / 255
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pil_to_tensor(img):\n img = ToTensor()(img)\n return img", "def tensor_to_image(img):\n t = transforms.ToPILImage()\n return t(img)", "def convert_image_to_tensor(image):\n # image = image.astype(np.float32)\n return transform(image)\n # return transform(image)", "def image_to_tensor...
[ "0.86524886", "0.8369619", "0.7892313", "0.7614676", "0.75939214", "0.73847216", "0.7316568", "0.7297114", "0.7256734", "0.71910536", "0.7155536", "0.71102834", "0.7071602", "0.7056273", "0.7029596", "0.70270246", "0.7019936", "0.68735516", "0.68491185", "0.6820653", "0.68206...
0.7981066
2
r"""Convert a tensor image to a NumPy image.
def im_to_numpy(tensor): tensor_reshaped = tensor.expand(3, *tensor.shape[1:]).permute(1, 2, 0) return tensor_reshaped.detach().cpu().numpy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_tensor_to_numpy_img(tensor_img):\n\n img = tensor_img.to('cpu').clone().detach()\n img = img.numpy().squeeze(0)\n img = img.transpose(1, 2, 0)\n img = img * np.array((0.229, 0.224, 0.225)) + np.array((0.485, 0.456, 0.406))\n img = img.clip(0, 1)\n return img", "def tensor_to_image(i...
[ "0.81803477", "0.75987214", "0.75975317", "0.7478998", "0.73794717", "0.72697514", "0.717385", "0.7120241", "0.71202296", "0.70445955", "0.6977794", "0.69403756", "0.6920481", "0.68865293", "0.6833818", "0.67852956", "0.6774928", "0.6769853", "0.6698418", "0.6698418", "0.6698...
0.7501114
3
r""" Read an image as a tensor.
def imread(file, as_pil=False, resize=None, to_rgb=False): # Read an example image as a numpy array. if is_url(file): hdr = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 ' '(KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_image_as_tensor(path: Path) -> tf.Tensor:\n img_data = tf.io.read_file(str(path))\n img_tensor = tf.io.decode_jpeg(img_data, channels=3)\n\n return img_tensor", "def _load_image(self, id_: str) -> Tensor:\n filename = os.path.join(self.root, \"output\", id_ + \".jpg\")\n with Imag...
[ "0.8206076", "0.7440673", "0.74256104", "0.7360796", "0.72985256", "0.7280834", "0.7244267", "0.7217901", "0.713479", "0.71282846", "0.71136254", "0.7005773", "0.69485295", "0.6920515", "0.6828518", "0.67671347", "0.67425317", "0.66869235", "0.6661708", "0.6650682", "0.662930...
0.0
-1
Path to KrasHras experiment data.
def data_path(scope="session"): return join(dirname(__file__), pardir, "new_data")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_data_path(experiment_name: str) -> Path: # pragma: no cover\n return experiment_dir(experiment_name) / DATA_CONFIG", "def get_data_path():\n\n import rospkg\n rospack = rospkg.RosPack()\n return os.path.join(rospack.get_path('testing_tools'), 'data')", "def data_path(self):\n rai...
[ "0.69645005", "0.6877004", "0.67597955", "0.67516285", "0.6749529", "0.657514", "0.643488", "0.64172506", "0.6380676", "0.6370303", "0.6369643", "0.6348749", "0.63282925", "0.62771314", "0.62283856", "0.6226209", "0.62016654", "0.6201136", "0.61884636", "0.6166573", "0.616154...
0.62623316
14
Path to KrasHras experiment data.
def pdb_path(scope="session"): return join(dirname(__file__), pardir, "new_data", "pdb")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_data_path(experiment_name: str) -> Path: # pragma: no cover\n return experiment_dir(experiment_name) / DATA_CONFIG", "def get_data_path():\n\n import rospkg\n rospack = rospkg.RosPack()\n return os.path.join(rospack.get_path('testing_tools'), 'data')", "def data_path(self):\n rai...
[ "0.69645005", "0.6877004", "0.67597955", "0.67516285", "0.6749529", "0.657514", "0.643488", "0.64172506", "0.6380676", "0.6370303", "0.6369643", "0.6348749", "0.63282925", "0.62771314", "0.62623316", "0.62283856", "0.6226209", "0.62016654", "0.6201136", "0.61884636", "0.61665...
0.0
-1
Path to KrasHras experiment data.
def graph_path(scope="session"): return join(dirname(__file__), pardir, "new_data", "graph")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_data_path(experiment_name: str) -> Path: # pragma: no cover\n return experiment_dir(experiment_name) / DATA_CONFIG", "def get_data_path():\n\n import rospkg\n rospack = rospkg.RosPack()\n return os.path.join(rospack.get_path('testing_tools'), 'data')", "def data_path(self):\n rai...
[ "0.69645005", "0.6877004", "0.67597955", "0.67516285", "0.6749529", "0.657514", "0.643488", "0.64172506", "0.6380676", "0.6370303", "0.6369643", "0.6348749", "0.63282925", "0.62771314", "0.62623316", "0.62283856", "0.6226209", "0.62016654", "0.6201136", "0.61884636", "0.61665...
0.0
-1
Initialize DQN policy with learner state dict.
def _init_networks(self, state_dict: OrderedDict): self.dqn = Brain(self.backbone_cfg, self.head_cfg).to(self.device) self.dqn.load_state_dict(state_dict) self.dqn.eval()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_dqn(self, board, n_actions):\n init_screen = self.get_dqn_state(board)\n _, _, screen_height, screen_width = init_screen.shape\n target_net = DQN(screen_height, screen_width, n_actions).to(self._device)\n target_net.load_state_dict(torch.load(self._model_path, map_location=torch.device('cpu'))...
[ "0.6555668", "0.6518163", "0.6272778", "0.6224898", "0.6148021", "0.61440444", "0.6142832", "0.611464", "0.60020775", "0.5961852", "0.5953095", "0.5931775", "0.5928532", "0.59280604", "0.59260803", "0.5918939", "0.5905448", "0.5877632", "0.58421046", "0.5836625", "0.58327734"...
0.62069845
4
Restore the trained generator.
def restore_model(self, resume_iters): print('Loading the trained models from step {}...'.format(resume_iters)) G_path = os.path.join(self.model_save_dir, '{}-G.ckpt'.format(resume_iters)) self.G.load_state_dict(torch.load(G_path, map_location=lambda storage, loc: storage))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def restore(self):\n\n self.brain.restore_checkpoint()", "def restore(self):\n raise NotImplementedError", "def restore(self):\n if self._restored_model:\n return\n with self.eval_graph.graph.as_default():\n last_checkpoint = self._find_last_checkpoint()\n # TODO(rbharath): I...
[ "0.708835", "0.6852618", "0.6841735", "0.6836941", "0.68357104", "0.6661446", "0.6627166", "0.65900266", "0.65030843", "0.64941865", "0.64750063", "0.64442873", "0.6420912", "0.64137375", "0.6392724", "0.6380359", "0.6376886", "0.63644135", "0.6354999", "0.6346124", "0.632251...
0.6923629
1
Decay learning rates of the generator and discriminator.
def update_lr(self, g_lr, d_lr): for param_group in self.g_optimizer.param_groups: param_group['lr'] = g_lr for param_group in self.d_optimizer.param_groups: param_group['lr'] = d_lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decay(self):\n if self.l_rate > self.l_rate_bound[0] and self.l_rate - self.decay_rate > 0.0:\n self.l_rate -= self.decay_rate\n elif self.l_rate - self.decay_rate <= 0.0 or self.l_rate < self.l_rate_bound[0]:\n self.l_rate = self.l_rate_bound[0]\n\n for layer in self...
[ "0.6981796", "0.6901867", "0.6595308", "0.6595308", "0.6520544", "0.6509009", "0.6448326", "0.64350474", "0.64350474", "0.64276624", "0.6409419", "0.6386371", "0.63727814", "0.6352418", "0.63500345", "0.6336587", "0.6306771", "0.6276676", "0.6246788", "0.6243236", "0.6231694"...
0.0
-1
Reset the gradient buffers.
def reset_grad(self): self.g_optimizer.zero_grad() self.d_optimizer.zero_grad()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_grad(self):\n self.unet.zero_grad()", "def reset_grad(self):\n self.g_optimizer.zero_grad()\n self.d_optimizer.zero_grad()\n self.dr_optimizer.zero_grad()", "def reset_grad(self):\r\n self.unet.zero_grad()", "def reset_grad(self):\n self.optimizer.zero_grad...
[ "0.71560687", "0.7139683", "0.71308017", "0.70535165", "0.7002051", "0.699623", "0.6969341", "0.69283223", "0.67869973", "0.6751413", "0.67297673", "0.66919523", "0.66904217", "0.6677895", "0.6668575", "0.66074187", "0.65914613", "0.6567536", "0.6561699", "0.6533144", "0.6532...
0.71071595
4
check if the file type is valid extension
def is_accept_type(file_name): bare_name, file_extension = os.path.splitext(file_name) for ext in ACCEPTED_FILES: if file_extension.lower() == ext: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_file_type(fname):\n ext = path.splitext(fname)[1]\n return ext in allowed_extensions", "def check_allowed_extension(filename):\n return '.' in filename and filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS", "def isExtensionSupported(filename):\n\treturn os.path.splitext(filename)[-1].split('.'...
[ "0.82721543", "0.8057865", "0.8039022", "0.8038856", "0.7817049", "0.78145677", "0.7805749", "0.77664715", "0.7758707", "0.7756892", "0.76600915", "0.7641917", "0.7639738", "0.7598427", "0.7589441", "0.7589441", "0.7580095", "0.7564311", "0.7532806", "0.7493416", "0.748709", ...
0.7092994
69
Adds an edge between A and B
def add_edge_between(self, a: tuple, b: tuple): if a not in self.graph: self.graph[a] = set() if b not in self.graph: self.graph[b] = set() self.graph[a].add(b) self.graph[b].add(a)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_edge(self, v1, v2):\n pass # TODO", "def addEdge(this, a, b):\n if not a in this.m:\n this.m[a]=set()\n this.m[a].add(b)", "def add_edge(self, vertex1, vertex2):\n\n vertex1.add_outgoing_node(vertex2)\n vertex2.add_incoming_node(vertex1)", "def addEdge2(graph, NodeA, ...
[ "0.79517925", "0.7741704", "0.77036667", "0.7629268", "0.75553256", "0.74691015", "0.7459512", "0.74530184", "0.7441038", "0.7438055", "0.74359745", "0.742147", "0.740728", "0.7393829", "0.73929167", "0.73886824", "0.7377695", "0.73727304", "0.7356138", "0.73470694", "0.73190...
0.76932955
3
Rotates the 64bit value `x` to the left by `count` bits.
def rotl(x, count): ret = 0 for i in range(64): bit = (x >> i) & 1 ret |= bit << ((i + count) % 64) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RotL_64(x, N):\n #return (x << np.uint64(N & 63)) | (x >> np.uint64((64-N) & 63))\n return(np.left_shift(x, (N & 63), dtype=np.uint64) |\n np.right_shift(x, ((64-N) & 63), dtype=np.uint64))", "def rotate_left(x, d):\n d = d % N\n out = x << d\n excess = out \n out = out & (2**N-1)...
[ "0.69289225", "0.68354046", "0.6803503", "0.67269284", "0.6693046", "0.64044005", "0.63563085", "0.63408786", "0.6292079", "0.6265463", "0.6151498", "0.6141075", "0.6136378", "0.6136378", "0.6058015", "0.60513264", "0.60011715", "0.5967805", "0.58945185", "0.5865883", "0.5816...
0.78278226
0
Command to update Categoria entity with id equals 'categoria_id'
def update_categoria_cmd(categoria_id, **categoria_properties): return UpdateCategoriaCommand(categoria_id, **categoria_properties)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modificarcategoria(self, categoria):\n self.categoria=categoria", "def atualizar_categoria():\n try:\n if current_user.is_administrator():\n cod_id = request.args.get('id')\n categoria = Categoria.query.filter_by(cod_categoria = cod_id).one()\n if request.met...
[ "0.7163842", "0.66136664", "0.6594855", "0.61249435", "0.6089281", "0.60456514", "0.59815377", "0.5940213", "0.58911365", "0.58237416", "0.58164054", "0.57653", "0.5748613", "0.5664358", "0.5607816", "0.5600868", "0.5598614", "0.5574376", "0.55127513", "0.5508996", "0.5492437...
0.77859616
0
Validates a string consisting of only the set of characters in self.openChars + self.closeChars Handling of any other characters (except leading/trailing whitespace) is not defined.
def validateString(self, string): stack = [] string = string.strip() if len(string) % 2 is not 0: return False for ch in string: if ch in self.openChars: stack.append(ch) elif len(stack) is 0: return False ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_should_raise_in_case_of_wrong_characters(self):\n validator = CharCombinationValidator()\n\n regex = re.compile(r'[\\(\\[\\{]\\)\\]\\}')\n forbidden_chars = regex.sub('', punctuation)\n for char in forbidden_chars:\n with self.assertRaises(FormulaValidationError):\n ...
[ "0.64473355", "0.6324341", "0.6268161", "0.6156467", "0.61024976", "0.60878146", "0.60247946", "0.6023882", "0.59943956", "0.5978903", "0.5954871", "0.5925721", "0.5904736", "0.5904401", "0.5866074", "0.5851196", "0.5843581", "0.5830767", "0.5809286", "0.5788769", "0.5784513"...
0.7643795
0
Compare the Jacobian self to `J`. If `J` is a Jacobian, then self and `J` are equal if and only if their curves are equal.
def __cmp__(self, J): if not is_Jacobian(J): return cmp(type(self), type(J)) return cmp(self.curve(), J.curve())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n if isinstance(other, CNPJ):\n return self.cnpj == other.cnpj\n return False", "def evaluate_jacobian_equality_constraints(self):\n raise NotImplementedError(\n 'evaluate_jacobian_equality_constraints called '\n 'but not implemented ...
[ "0.6410235", "0.6020256", "0.5888579", "0.5888024", "0.5868826", "0.585366", "0.57917243", "0.5776429", "0.577431", "0.575446", "0.57004124", "0.5663982", "0.5653235", "0.56305444", "0.56263167", "0.55675596", "0.55604726", "0.55537325", "0.5544201", "0.5535306", "0.5531205",...
0.7796725
0
Plots the distribution of all the columns in X in a series of subplots
def plot_distributions(x, variable_name): n_cols = x.shape[1] plot_rows = n_cols // 2 plot_rows += n_cols % 2 plot_cols = 2 position = range(1, n_cols + 1) fig = plt.figure() for col_index in range(n_cols): col_values = x[:, col_index] ax = fig.add_subplot(plot_rows, plot_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_subs(df, cols):\n plt.figure(figsize=(16,20))\n for i, col in enumerate(cols):\n plot_number = i + 1\n plt.subplot(5,3,plot_number)\n plt.title(col)\n sns.boxplot(data=df[col])", "def dist_plotter(data: pd.DataFrame, variable: str):\n fig, axs = plt.subplots(2,5, gri...
[ "0.66440254", "0.65448105", "0.6519474", "0.64961797", "0.6418807", "0.6415088", "0.6349119", "0.62254137", "0.6188959", "0.61773705", "0.6139047", "0.6133007", "0.6067479", "0.6057533", "0.60484046", "0.6036549", "0.5968887", "0.59626037", "0.59624046", "0.59356964", "0.5920...
0.67808795
0
Normalise each column in x by diving all values in a column by the maximum value of that column
def normalise(x): x = np.copy(x) n_cols = x.shape[1] for col_index in range(n_cols): col = x[:, col_index] factor = np.max(col) x[:, col_index] = col / factor return x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize(x):\n # TODO: Implement Function\n data_max = np.max(x)\n data_min = np.min(x)\n x = (x - data_min) / (data_max - data_min)\n return x", "def normalisation_l_inf(x):\n res = np.zeros(x.shape)\n for i in range(x.shape[0]):\n for j in range(x.shape[1]):\n res[i,...
[ "0.70669967", "0.7019552", "0.70194155", "0.6996103", "0.6954262", "0.6934858", "0.6918338", "0.6918338", "0.6783472", "0.67740446", "0.6643814", "0.66314995", "0.6599614", "0.6599614", "0.6581436", "0.6576671", "0.6520969", "0.651061", "0.64951664", "0.64898723", "0.64699143...
0.83841187
0
This function falls back to native json library when there is a big unsigned 64 bit integer.
def orjson_dumps_custom(obj, fp): def default(obj): # orjson can not serialize OrderedDict, so convert it to a regular dict. if isinstance(obj, collections.OrderedDict): return dict(obj) raise TypeError def dump(): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_dict_keys_int_range_valid_u64(self):\n assert (\n orjson.dumps(\n {0: True},\n option=orjson.OPT_NON_STR_KEYS | orjson.OPT_STRICT_INTEGER,\n )\n == b'{\"0\":true}'\n )\n assert (\n orjson.dumps(\n ...
[ "0.63265043", "0.6002089", "0.59477466", "0.5823343", "0.5799484", "0.5766806", "0.57467103", "0.57233983", "0.5708222", "0.55917484", "0.5590471", "0.5553047", "0.553966", "0.5426084", "0.5402586", "0.54014647", "0.5349219", "0.5323168", "0.53181505", "0.530763", "0.5270987"...
0.0
-1
Encodes an object into a JSON string.
def json_encode(obj, output=None, binary=False): # 2->TODO encode json according to 'binary' flag. if binary: result = six.ensure_binary(_json_encode(obj, None)) if output: output.write(result) else: return result else: return six.ensure_text(_json_en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode_json(obj):\n\treturn json.dumps(obj)", "def json_encode(obj):\n return json.dumps(obj)", "def toJSON(object):\n\treturn json.dumps(object, ensure_ascii=False)", "def serialize(self, obj):\n return json.dumps(obj)", "def json_encode(obj, **kwargs):\n return json.dumps(obj, default=js...
[ "0.8591071", "0.851421", "0.7861495", "0.7777002", "0.7759428", "0.769876", "0.7677229", "0.7647728", "0.7627841", "0.7609582", "0.75406253", "0.750778", "0.74252117", "0.7413698", "0.7411497", "0.7343329", "0.73427695", "0.73409724", "0.73409724", "0.73409724", "0.73409724",...
0.7421563
13
Write a dict to a JSON encoded file The file is first completely written to tmp_path, and then renamed to file_path
def atomic_write_dict_as_json_file(file_path, tmp_path, info): fp = None try: fp = open(tmp_path, "w") fp.write(json_encode(info)) fp.close() fp = None if sys.platform == "win32" and os.path.isfile(file_path): os.unlink(file_path) os.rename(tmp_path, f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_json(dict_to_write, path, file_name):\n with open(path + \"/\" + file_name + \".json\", \"w\") as fp:\n json.dump(dict_to_write, fp)\n return None", "def json_write(path, dictionary):\n json_output = json.dumps(dictionary, indent=4)\n with open(path, \"w\", encoding=\"utf-8\") as f:\...
[ "0.7838923", "0.76291955", "0.76263666", "0.7526244", "0.74973845", "0.7426513", "0.74224156", "0.741152", "0.7324913", "0.7303804", "0.7303804", "0.7274632", "0.7269578", "0.72627527", "0.7242219", "0.724105", "0.7223898", "0.72232205", "0.71935713", "0.717947", "0.7148161",...
0.8226132
0