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
Verify that the email exists
def clean_username(self): username = self.cleaned_data.get("username") if not username: return username if User.objects.filter(username__iexact=username).exclude(pk=self.instance.pk): raise forms.ValidationError("That username is already used.") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def email_exists(self, email):\n user = [user for user in ALL_USERS if user['email'] == email]\n if user:\n return True\n return False", "def email_exists(form, field):\n if User.select().where(User.email == field.data).exists():\n raise ValidationError('A user with that...
[ "0.7689403", "0.765135", "0.7533824", "0.7524095", "0.7495039", "0.7457489", "0.7449288", "0.7435111", "0.7427037", "0.7413979", "0.7402739", "0.74022645", "0.7400224", "0.73930234", "0.7370677", "0.7362725", "0.73592645", "0.7330334", "0.73037314", "0.7303057", "0.72869605",...
0.0
-1
Return the set of all inlined instructions in `root_insn` (included).
def get_inlined_insns(root_insn): result = set() def helper(insn): result.add(insn) for input in insn.inputs: if ( isinstance(input.value, ir.ComputingInstruction) and input.value.inline ): helper(input.value) helper(r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_instructions(self):\n tmp_ins = []\n idx = 0\n for i in self.method.get_instructions():\n if idx >= self.start and idx < self.end:\n tmp_ins.append(i)\n\n idx += i.get_length()\n return tmp_ins", "def getIncludes(self):\n return self...
[ "0.5307971", "0.500042", "0.49988607", "0.4996068", "0.49914584", "0.49559152", "0.49267817", "0.49252596", "0.48164862", "0.4806877", "0.47919488", "0.4760398", "0.47565317", "0.4750424", "0.47436726", "0.47354415", "0.4718832", "0.46956724", "0.46533853", "0.46467805", "0.4...
0.8623057
0
Runs a TensorFlow MetaGraphDef in a session
def run_session(mgd, data, FLAGS): start_time = time.time() tf.reset_default_graph() with tf.Session() as sess: writer = tf.summary.FileWriter(FLAGS.log_dir, sess.graph) new_saver = tf.train.import_meta_graph(mgd) x = tf.get_collection("inputs")[0] y = tf.get_collection("inp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_meta(self):\n\n from tensorflow.core.protobuf import meta_graph_pb2\n\n meta_graph = meta_graph_pb2.MetaGraphDef()\n self.load_protobuf_from_file(meta_graph, self._tf_model_prefix + '.meta')\n graph = meta_graph.graph_def\n if self._dest_nodes != None:\n from ...
[ "0.6274277", "0.60739666", "0.6026382", "0.5897435", "0.5864941", "0.5849541", "0.5836316", "0.58317566", "0.58282316", "0.5817513", "0.5810686", "0.57663506", "0.57596743", "0.5745088", "0.57264596", "0.5708775", "0.5678011", "0.56721777", "0.564967", "0.564967", "0.56419325...
0.5808981
11
Returns a string representation of a path
def render_path(path_to_item): result = "" for pth in path_to_item: if isinstance(pth, six.integer_types): result += "[{0}]".format(pth) else: result += "['{0}']".format(pth) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path_str(path):\n\toutput = \"PATH: \"\n\tif path:\n\t\tfor i in path:\n\t\t\toutput += str(i.data) + \" -> \"\n\telse:\n\t\toutput += \"Empty\"\n\treturn output", "def path_to_str(path):\n if hasattr(path, '__fspath__'):\n path = as_str_any(path.__fspath__())\n return path", "def as_string(pa...
[ "0.79950243", "0.77772427", "0.76012766", "0.75008774", "0.7465539", "0.73858505", "0.724589", "0.7177473", "0.71564364", "0.70764357", "0.70681226", "0.70649594", "0.70468634", "0.70299315", "0.6943011", "0.69423383", "0.6906489", "0.6906489", "0.69057655", "0.68910974", "0....
0.0
-1
Set all gradients to zero.
def zero_grad(self, *args, **kwargs) -> None: if self.accumulate_step == 0: self.optim.zero_grad(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zero_grad(self):\n for p, dp in self.params:\n dp.zero_()", "def zero_grad(self):\r\n for param in self.params:\r\n param.grad = None", "def zero_grad(self):\n for parameter in self.param():\n parameter.zero_grad()", "def zero_grad(self):\n for...
[ "0.82702607", "0.81805444", "0.814893", "0.81255984", "0.81255984", "0.81189126", "0.8070103", "0.8044154", "0.8031452", "0.77749264", "0.7728885", "0.76807404", "0.7661728", "0.7655967", "0.7650281", "0.757709", "0.757709", "0.757709", "0.75762653", "0.7576093", "0.74743295"...
0.7148537
23
Execute backward pass given the gradients of the output.
def backward_by_grad(self, tensor: Tensor, grad: Tensor) -> None: self.accumulate_step += 1 no_sync = self.is_torch_ddp and self.accumulate_step < self.accumulate_size if no_sync: with self.model.no_sync(): self.optim.backward_by_grad(tensor, grad) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backward(self, grad_output):\n raise NotImplementedError", "def backward(ctx, grad_output):\n\n # This is a pattern that is very convenient - at the top of backward\n # unpack saved_tensors and initialize all gradients w.r.t. inputs to\n # None. Thanks to the fact that additional ...
[ "0.8256701", "0.8139726", "0.80726355", "0.80297303", "0.799924", "0.799924", "0.7979082", "0.7883907", "0.7843122", "0.78148246", "0.7793955", "0.77793646", "0.7741853", "0.77388406", "0.76947737", "0.76642466", "0.7656647", "0.7656647", "0.76518065", "0.7639178", "0.7613024...
0.0
-1
Update the learning rate.
def step(self, *args, **kwargs) -> None: self.accumulate_step += 1 if self.accumulate_step < self.accumulate_size: pass else: self.accumulate_step = 0 self.lr_scheduler.step(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 self.scheduler.step(self.clock.epoch)", "def _update_learning_rate(self):\r\n\r\n self.n_steps += 1\...
[ "0.85207516", "0.8443684", "0.8412453", "0.81772655", "0.81772655", "0.80736464", "0.79869145", "0.7953497", "0.7847292", "0.78134376", "0.7592255", "0.7587759", "0.75857747", "0.75485224", "0.7536506", "0.7426985", "0.74088407", "0.740228", "0.740081", "0.7305337", "0.725570...
0.0
-1
Compute the next learning rate.
def get_lr(self) -> Tensor: return self.lr_scheduler.get_lr()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learning_rate(epoch):\n self.lr = self.lr / 1.00000001\n return self.lr", "def learning_rate_fn():\n start_learning_rate = FLAGS.start_learning_rate\n step = tf.cast(tf.compat.v1.train.get_or_create_global_step(), 'float32')\n effective_step = tf.maximum(step - FLAGS.lr_decay_after_n...
[ "0.7981846", "0.7804597", "0.76686656", "0.7587778", "0.758086", "0.7545769", "0.7515176", "0.74679166", "0.74679166", "0.74444884", "0.74229044", "0.74229044", "0.73832905", "0.7368827", "0.733177", "0.7275121", "0.7221742", "0.7167522", "0.7112848", "0.7098112", "0.70773935...
0.0
-1
Returns the current learning rate.
def get_last_lr(self) -> Tensor: return self.lr_scheduler.get_last_lr()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_learning_rate(self):\n config = self.config\n cur_lr = Train_model_pipeline.adjust_learning_rate(\n self.optimizer,\n self.epoch,\n config[\"training\"][\"learning_rate\"],\n decay=config[\"training\"][\"lr_decay_rate\"],\n step=config[\"...
[ "0.8372228", "0.83621866", "0.8276308", "0.78240114", "0.775285", "0.775285", "0.7735422", "0.76954764", "0.76220965", "0.76217103", "0.75346035", "0.73251355", "0.73148596", "0.73148596", "0.7210688", "0.717406", "0.71435565", "0.7134736", "0.70828766", "0.7057531", "0.70397...
0.6125329
100
Generates coordinates in a square around the center.
def find_surrounding(lat, long, length, mile_increment): if length == '3': weight = 1 elif length == '4': weight = 2 elif length == '5': weight = 3 elif length == '2': weight = 0 elif length == '1': weight = -1 e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_xy(number_pixels, center=0.0 * apu.arcsec, pixel_size=1.0 * apu.arcsec):\n x = (np.arange(number_pixels) - number_pixels / 2 + 0.5) * pixel_size + center\n return x", "def get_square_centers(self):\n x_values = np.arange(-2, 4, 2) * np.ones(self.GRID_SHAPE)\n y_values = np.arange...
[ "0.6872194", "0.68604183", "0.6601526", "0.64500463", "0.63754547", "0.6361909", "0.6361438", "0.6347429", "0.6318766", "0.62896496", "0.62695235", "0.62200445", "0.6192349", "0.6175877", "0.61730886", "0.61618996", "0.6143512", "0.61316645", "0.6096782", "0.6089587", "0.6085...
0.0
-1
Return the representation of the Configuration.
def __repr__(self) -> str: view = { "server": self.server, "access-token": 'yes' if self.token is not None else 'no', "insecure": self.insecure, "output": self.output, "verbose": self.verbose, } return "<Configuration({})".format(view)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self) -> str:\n return json.dumps(self._config)", "def __str__(self):\n config_str = 'Configurations\\n'\n config_str += pprint.pformat(self.__dict__)\n return config_str", "def serialize(self):\n return json.dumps(self._config, default=lambda o: o.__dict__, sort...
[ "0.8340746", "0.82181877", "0.81958765", "0.81958765", "0.7780272", "0.761452", "0.757062", "0.7474367", "0.7451793", "0.7430284", "0.7401777", "0.7253823", "0.72423315", "0.7222489", "0.72190684", "0.7210399", "0.71891826", "0.7171529", "0.7164452", "0.7149819", "0.7072997",...
0.7508696
7
Sets the provider of this QuoteSeriesId.
def provider(self, provider): if self.local_vars_configuration.client_side_validation and provider is None: # noqa: E501 raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and provider i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def provider(self, provider):\n\n self._provider = provider", "def provider(self, provider: Provider) -> None:\n self._provider = provider", "def provider(self, provider: str):\n if provider is None:\n raise ValueError(\"Invalid value for `provider`, must not be `None`\") # noq...
[ "0.68183726", "0.6565658", "0.6405145", "0.60436845", "0.60427135", "0.6029212", "0.60222685", "0.5900081", "0.5854553", "0.550032", "0.54858", "0.5350791", "0.5307258", "0.5278959", "0.5225017", "0.5167773", "0.51624393", "0.5092774", "0.5018978", "0.500916", "0.49686128", ...
0.56159663
9
Sets the price_source of this QuoteSeriesId.
def price_source(self, price_source): self._price_source = price_source
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_price(self, price):\n assert isinstance(price, float), 'Price must be a float'\n self._price = price", "def price(self, price):\n\n self._price = price", "def price(self, price):\n\n self._price = price", "def price(self, price):\n\n self._price = price", "def pri...
[ "0.6167126", "0.6058284", "0.6058284", "0.6058284", "0.6058284", "0.60502464", "0.6015236", "0.5999806", "0.59924823", "0.59658754", "0.58039397", "0.5769713", "0.5769713", "0.57653004", "0.5605163", "0.5595293", "0.55577815", "0.55550915", "0.5468279", "0.54497796", "0.53435...
0.8176036
0
Sets the instrument_id of this QuoteSeriesId.
def instrument_id(self, instrument_id): if self.local_vars_configuration.client_side_validation and instrument_id is None: # noqa: E501 raise ValueError("Invalid value for `instrument_id`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_instrument(self, instrument_id, channel=0):\n if not 0 <= instrument_id <= 127:\n raise ValueError(f\"Undefined instrument id: {instrument_id}\")\n\n if not 0 <= channel <= 15:\n raise ValueError(\"Channel not between 0 and 15.\")\n\n self.write_short(0xC0 + chann...
[ "0.6593195", "0.65317917", "0.65317917", "0.65317917", "0.65317917", "0.6389134", "0.63215214", "0.6160165", "0.6136501", "0.61186457", "0.60556626", "0.60402614", "0.603777", "0.5880715", "0.5880715", "0.58299214", "0.576715", "0.5766734", "0.566574", "0.55925006", "0.559149...
0.70015216
0
Sets the instrument_id_type of this QuoteSeriesId.
def instrument_id_type(self, instrument_id_type): allowed_values = [None,"LusidInstrumentId", "Figi", "RIC", "QuotePermId", "Isin", "CurrencyPair", "ClientInternal", "Sedol", "Cusip"] # noqa: E501 if self.local_vars_configuration.client_side_validation and instrument_id_type not in allowed_values: # n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 ValueError(\"Invalid value for `type_id`, must not be `None`\")\n\n self._type_id = type_id", "def identifier_type(self, identifier_type):\n self._identifi...
[ "0.7232628", "0.65018576", "0.6447048", "0.6281578", "0.61472297", "0.6039474", "0.6032719", "0.5949014", "0.5932484", "0.5932484", "0.59108263", "0.58610237", "0.5860774", "0.5670331", "0.56138617", "0.56090164", "0.5546033", "0.55052215", "0.55052215", "0.55052215", "0.5505...
0.8050317
0
Sets the field of this QuoteSeriesId.
def field(self, field): if self.local_vars_configuration.client_side_validation and field is None: # noqa: E501 raise ValueError("Invalid value for `field`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and field is not None and ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setSeriesFK(self, value):\n return self.getDbRecord().setColumnValue(SERIES_COLUMN, value)", "def _set_id(self, value):\n pass", "def stock_id(self, stock_id):\n\n self._stock_id = stock_id", "def _set_id(self):\n raise NotImplementedError()", "def survey_id(self, survey_id)...
[ "0.63670295", "0.6222844", "0.61845446", "0.61738515", "0.6166193", "0.6093446", "0.6054812", "0.6016857", "0.60165656", "0.5925285", "0.5908305", "0.58842623", "0.5860688", "0.58333033", "0.5818788", "0.58110344", "0.5803882", "0.5803473", "0.5791737", "0.5767367", "0.575455...
0.0
-1
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, QuoteSeriesId): 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, QuoteSeriesId): 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 values of outputStates for all mechanisms in MechanismList
def outputStateValues(self): values = [] for item in self.mechanisms: for output_state_name, output_state in list(item.outputStates.items()): values.append(output_state.value) return values
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _assign_output_states(self):\n for mech in self.terminalMechanisms.mechanisms:\n self.outputStates[mech.name] = mech.outputStates", "def outputStateNames(self):\n names = []\n for item in self.mechanisms:\n for output_state in item.outputStates:\n nam...
[ "0.7471102", "0.7393028", "0.6943229", "0.6363082", "0.6308046", "0.6297066", "0.62822974", "0.6233221", "0.61901164", "0.6188034", "0.61457056", "0.61176836", "0.6104881", "0.60902965", "0.6057253", "0.6047594", "0.60425544", "0.6013339", "0.59914774", "0.5939767", "0.593849...
0.813667
0
Safely read an environment variable. Raises errors if it is not defined or it is empty.
def get_env(env_name: str, default: Optional[str] = None) -> str: if env_name not in os.environ: if default is None: raise KeyError(f"{env_name} not defined and no default value is present!") return default env_value: str = os.environ[env_name] if not env_value: if defau...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(key:str):\n value = environ.get(key)\n if value == None or len(str(value)) == 0:\n raise ValueError('Missing env: '+key)\n return value", "def getenv_check(e):\n res = os.getenv(e)\n if res == None:\n print(e, 'environment variable not set - stopping.')\n exit(1)\n else...
[ "0.7431095", "0.72157043", "0.7201595", "0.7190676", "0.710908", "0.70579153", "0.70178723", "0.70094293", "0.69677675", "0.69134235", "0.68654037", "0.67542636", "0.668937", "0.66355616", "0.66238236", "0.6592303", "0.65878177", "0.65641236", "0.65597224", "0.65532595", "0.6...
0.5785148
65
Load all the environment variables defined in the `env_file`. This is equivalent to `. env_file` in bash. It is possible to define all the system specific variables in the `env_file`.
def load_envs(env_file: Optional[str] = None) -> None: dotenv.load_dotenv(dotenv_path=env_file, override=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_envs_from_file(file_path=constants.ENV_FILE_DEFAULT_PATH.value):\n #pylint: disable=unspecified-encoding\n with open(file_path, \"r\") as file:\n for line in file:\n line = line.strip()\n if not line:\n continue\n if line.startswith(\"#\"):\n ...
[ "0.8037709", "0.75521344", "0.74704516", "0.74306357", "0.73876494", "0.7366125", "0.7323644", "0.70755285", "0.7024416", "0.6894454", "0.6866709", "0.68233156", "0.68144315", "0.67741936", "0.67297035", "0.66447043", "0.6612059", "0.6598596", "0.6559391", "0.6450934", "0.638...
0.8404838
0
Returns the total number of subscribers for a given subreddit.
def number_of_subscribers(subreddit): # Set the Default URL strings base_url = 'https://www.reddit.com' api_uri = '{base}/r/{subreddit}/about.json'.format(base=base_url, subreddit=subreddit) # Set an User-Agent user_agent = {'User-Agent': 'Pyth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def number_of_subscribers(subreddit):\n url = \"https://www.reddit.com/r/{}.json\".format(subreddit)\n r = requests.get(url, headers={'User-agent': 'shoji'},\n allow_redirects=False)\n data = r.json()\n if not r.status_code == 200:\n return 0\n try:\n sub = data.get...
[ "0.88452405", "0.88001615", "0.8758702", "0.87437683", "0.87410414", "0.8737465", "0.8723826", "0.87215465", "0.86755574", "0.86608243", "0.86076564", "0.86025274", "0.8579033", "0.8564103", "0.85612786", "0.8550934", "0.8545987", "0.8475834", "0.8413587", "0.82184273", "0.82...
0.9056629
0
Returns starting state of the board.
def initial_state(): return [[EMPTY, EMPTY, EMPTY], [EMPTY, EMPTY, EMPTY], [EMPTY, EMPTY, EMPTY]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_state(self):\r\n return np.zeros(self.board_size, dtype=np.int8)", "def start_state():\n return chess.Board()", "def startingState(self):\n # Returns starting position and 4 false because no corners are visited yet\n return (self.startingPosition, (False, False, False, False))...
[ "0.8081514", "0.7890486", "0.7534929", "0.72789717", "0.72789717", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", ...
0.0
-1
Returns player who has the next turn on a board, with X to start.
def player(board): plays = 0 # Count non-empty squares for i in range(3): for j in range(3): if board[i][j] != EMPTY: plays += 1 # Even number of plays -> X's turn if plays % 2 == 0: return X else: return O
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_player(self):\n # Counter is a useful class that counts objects.\n count = Counter(self.board)\n if count.get('X', 0) > count.get('O', 0):\n return 'O'\n return 'X'", "def player(board):\n\n # Game is over\n if terminal(board):\n return None\n\n # C...
[ "0.7661532", "0.7463526", "0.72801614", "0.7205356", "0.71879673", "0.714234", "0.70418155", "0.69762915", "0.6889093", "0.68672496", "0.6861137", "0.68553096", "0.68539065", "0.68487495", "0.683079", "0.67577827", "0.66969573", "0.66860044", "0.6655561", "0.66033244", "0.658...
0.61284626
79
Returns the optimal action for the current player on the board.
def minimax(board): if player(board) == X: return optimal_max(board)[0] else: return optimal_min(board)[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_best_action(self):\n if self.bestAction is None:\n self.calculate_best_action()\n return self.bestAction", "def getAction(self, gameState: GameState):\n _max = float(\"-inf\")\n action = None\n for move in gameState.getLegalActions(0):\n util = min...
[ "0.7766856", "0.76323676", "0.75855315", "0.75285065", "0.75175256", "0.74667144", "0.7460485", "0.74263537", "0.7416421", "0.73943585", "0.7375846", "0.7333894", "0.73147565", "0.7306611", "0.7284639", "0.72650313", "0.72650313", "0.7250975", "0.72331834", "0.7203267", "0.71...
0.69210726
48
Finds all words in word_set that do not have the letter l.
def words_without_letter(l): return {w for w in word_set if has_no_letter(w, l)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def words_uses_only(letters):\n\treturn {w for w in word_set if uses_only(w, letters)}", "def known(words):\r\n return set(w for w in words if w in WORDS)", "def exclude_words(self, words):\n idcs = []\n for i in range(len(self)):\n if not self.transcript(i) in words:\n ...
[ "0.70398265", "0.66386557", "0.66319805", "0.6586166", "0.65605026", "0.64877725", "0.64639956", "0.6449832", "0.63439935", "0.6343545", "0.63153183", "0.6264546", "0.62233686", "0.6147896", "0.6138847", "0.61236644", "0.6107858", "0.60502595", "0.5988028", "0.5979397", "0.59...
0.8541773
0
Finds all words in word_set made from letters.
def words_uses_only(letters): return {w for w in word_set if uses_only(w, letters)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def words_without_letter(l):\n\treturn {w for w in word_set if has_no_letter(w, l)}", "def filter_by_lettersets(words):\n lettersets = {}\n\n for word in words:\n letterset = frozenset(word)\n length = len(word)\n if letterset not in lettersets or length > lettersets[letterset][0]:\n ...
[ "0.7162044", "0.70259464", "0.70036924", "0.69394267", "0.69267565", "0.68268996", "0.6785891", "0.677334", "0.67678404", "0.67589533", "0.67586404", "0.6694646", "0.66327876", "0.6626484", "0.66089416", "0.6602606", "0.6593278", "0.65701854", "0.65646875", "0.65646625", "0.6...
0.8051923
0
Forward fill impute missing values with normal values
def impute(sd, imputation_values, method='ffill', mask=True): ts = pd.read_csv(os.path.join(sd, 'timeseries.csv')) ts = ts.set_index('CHARTTIME') variables = list(imputation_values.keys()) if mask: # Create an imputation mask ts_mask = ts.mask(ts.notna(), 1) ts_mask = ts_mask.m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def impute(data):\n for column in data:\n column_data = data[column]\n if column_data.dtype in (np.int, np.float):\n fill_value = column_data.mean()\n else:\n fill_value = column_data.mode()[0]\n\n data[column] = data[column].fillna(fill_value)\n\n return dat...
[ "0.73599714", "0.70890987", "0.7026632", "0.6688881", "0.6549432", "0.6546821", "0.6531315", "0.65311575", "0.6475209", "0.6466261", "0.64583945", "0.6422094", "0.6412224", "0.63935703", "0.63814783", "0.6297297", "0.6296319", "0.6279812", "0.62196153", "0.62133193", "0.61792...
0.6297344
15
Test json_loads_object validates result.
def test_json_loads_object() -> None: assert json_loads_object('{"c":1.2}') == {"c": 1.2} with pytest.raises( ValueError, match="Expected JSON to be parsed as a dict got <class 'list'>" ): json_loads_object("[]") with pytest.raises( ValueError, match="Expected JSON to be parsed a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_simplef(self):\n samp1 = JObject(keys = ['status', 'result'])\n j = json.loads('{\"status\": \"success\", \"resultd\": \"yes\"}')\n self.assertFalse(check_json_object(j, samp1))", "def test_simple(self):\n samp1 = JObject(keys = ['status', 'result'])\n j = json.loads('...
[ "0.7466225", "0.7436751", "0.7261869", "0.7108797", "0.707524", "0.7068392", "0.7052709", "0.69498384", "0.6922862", "0.68458074", "0.679536", "0.6768142", "0.674017", "0.6738646", "0.66757935", "0.66757935", "0.66631764", "0.66617775", "0.66461724", "0.65988183", "0.6568571"...
0.8140474
0
Return a fresh (data zeroed) hidden and cell state tuple with a specific batch size
def _make_hidden(self, batch_size): hidden = (torch.zeros(self.nb_layers, batch_size, self.hidden_size).to(device), torch.zeros(self.nb_layers, batch_size, self.hidden_size).to(device)) return hidden
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_hidden_state(self, batch_size):\n hidden_state = tf.tile(self.initial_hidden_state[None, ...], [batch_size, 1])\n cell_state = tf.tile(self.initial_cell_state[None, ...], [batch_size, 1])\n return hidden_state, cell_state", "def init_hidden(self, batch_size):\n return (torch....
[ "0.81655204", "0.75587237", "0.75587237", "0.73917025", "0.73917025", "0.73917025", "0.73889154", "0.7329571", "0.7324585", "0.7226849", "0.72016627", "0.7067802", "0.70672965", "0.6992893", "0.695398", "0.6941257", "0.6941257", "0.6941257", "0.69278216", "0.69278216", "0.691...
0.709326
11
Detach the hidden state, and optionally zero the hidden data
def detach_hidden(self, zero=False): if zero: self.hidden = self._make_hidden(self.batch_size) else: self.hidden[0].detach()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detach_hidden(self, zero=False):\n if zero:\n self.hidden = self._make_hidden(self.batch_size)\n else:\n self.hidden = self.hidden.detach()", "def reset_hidden(hidden, mask):\n if len(mask) != 0:\n hidden[:, mask, :] = 0\n \n ...
[ "0.81687796", "0.7248448", "0.69499934", "0.6717769", "0.669204", "0.6651705", "0.6403011", "0.6300455", "0.6255132", "0.62323743", "0.62123096", "0.61785233", "0.6158845", "0.61502695", "0.6142751", "0.61369663", "0.6118904", "0.6113743", "0.60545844", "0.6038087", "0.598468...
0.8106021
1
Set the hidden size and zero the data for either batch training or generation
def set_mode(self, mode): if mode == 'train': self.hidden = self._make_hidden(self.batch_size) elif mode == 'generate': self.hidden = self._make_hidden(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self, batch_size: Optional[int] = 1):\n self.hidden = self.get_hidden(batch_size)", "def reset(self, batch_size: Optional[int] = 1):\n self.hidden = self.get_hidden(batch_size)", "def initHidden(self, batch_size):\n zero_hidden = torch.zeros(self.n_layers, batch_size, self.hidden...
[ "0.7795626", "0.7795626", "0.76980114", "0.74409264", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7368098", "0.7276465", "0.7210777", "0.7189889", "0.7174418", "0.7104354", "0.7019515", "0.6858735", "0.6810638", ...
0.588926
72
Return a fresh (data zeroed) hidden state tensor with a specific batch size
def _make_hidden(self, batch_size): hidden = torch.zeros(self.nb_layers, batch_size, self.hidden_size).to(device) return hidden
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_hidden_state(self, batch_size):\n return tf.zeros((batch_size, self.enc_units))", "def initHidden(self, batch_size):\n zero_hidden = torch.zeros(self.n_layers, batch_size, self.hidden_size)\n return zero_hidden", "def init_hidden(self, batch_size):\n return (torch.zer...
[ "0.8334007", "0.79642075", "0.7712523", "0.7712523", "0.7663268", "0.7630949", "0.7606729", "0.75923026", "0.7557339", "0.7497162", "0.7418408", "0.73653173", "0.73548245", "0.7339017", "0.7325712", "0.7308824", "0.7279275", "0.7279275", "0.7279275", "0.72212434", "0.7221097"...
0.78121454
2
Set the hidden size and zero the data for either batch training or generation
def set_mode(self, mode): if mode == 'train': self.hidden = self._make_hidden(self.batch_size) elif mode == 'generate': self.hidden = self._make_hidden(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self, batch_size: Optional[int] = 1):\n self.hidden = self.get_hidden(batch_size)", "def reset(self, batch_size: Optional[int] = 1):\n self.hidden = self.get_hidden(batch_size)", "def initHidden(self, batch_size):\n zero_hidden = torch.zeros(self.n_layers, batch_size, self.hidden...
[ "0.7795626", "0.7795626", "0.76980114", "0.74409264", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7405601", "0.7368098", "0.7276465", "0.7210777", "0.7189889", "0.7174418", "0.7104354", "0.7019515", "0.6858735", "0.6810638", ...
0.588926
73
Detach the hidden state, and optionally zero the hidden data
def detach_hidden(self, zero=False): if zero: self.hidden = self._make_hidden(self.batch_size) else: self.hidden = self.hidden.detach()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detach_hidden(self, zero=False):\n if zero:\n self.hidden = self._make_hidden(self.batch_size)\n else:\n self.hidden[0].detach()", "def reset_hidden(hidden, mask):\n if len(mask) != 0:\n hidden[:, mask, :] = 0\n \n return hid...
[ "0.8106021", "0.7248448", "0.69499934", "0.6717769", "0.669204", "0.6651705", "0.6403011", "0.6300455", "0.6255132", "0.62323743", "0.62123096", "0.61785233", "0.6158845", "0.61502695", "0.6142751", "0.61369663", "0.6118904", "0.6113743", "0.60545844", "0.6038087", "0.598468"...
0.81687796
0
Load previously saved model and optimizer state dicts from a file
def load(self, load_file, quiet=False): if not os.path.isfile(load_file): print("ERROR: File does not exist") exit(1) else: state = torch.load(load_file) self.model.load_state_dict(state['model']) self.optimizer.load_state_dict(state['optimizer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load(self, path):\n parameters = torch.load(path)\n\n if \"optimizer\" in parameters:\n parameters = parameters[\"model\"]\n\n self.load_state_dict(parameters)", "def load(self, path):\n checkpoint = torch.load(path)\n self.load_state_dict(checkpoint['model_state...
[ "0.72802347", "0.72632104", "0.72632104", "0.7248527", "0.71392095", "0.7107892", "0.7042125", "0.70391357", "0.7033937", "0.70338064", "0.7022409", "0.69461393", "0.6890558", "0.6873289", "0.6872822", "0.6860902", "0.68318963", "0.67971987", "0.67884696", "0.6788307", "0.677...
0.6782769
20
Asks user to specify a city, month, and day to analyze.
def get_filters(): print('Hello! Let\'s explore some US bikeshare data!') # TO DO: get user input for city (chicago, new york city, washington). HINT: Use a while loop to handle invalid inputs cities= ['chicago','new york city','washington'] while True: city =input("Please Enter City: ").l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Raw_Data(city,month,day):\n print(\"The city you have entered is: \",city)\n print(\"The month you have entered is: \",month)\n print(\"The day you have entered is: \",day)", "def get_filters():\n city = None\n month = None\n day = None\n while day == None:\n # TO DO: get user input f...
[ "0.66714007", "0.65354675", "0.64593667", "0.6374057", "0.6348314", "0.63097656", "0.62868035", "0.6259136", "0.62316", "0.62130964", "0.62050414", "0.6181105", "0.6171822", "0.61686903", "0.6158568", "0.61582303", "0.61532456", "0.61444426", "0.6131269", "0.610484", "0.61025...
0.60058343
28
Loads data for the specified city and filters by month and day if applicable.
def load_data(city, month, day): df=pd.read_csv(CITY_DATA[city]) df['Start Time'] = pd.to_datetime(df['Start Time']) df['month']=df['Start Time'].dt.month df['day_of_week']=df['Start Time'].dt.weekday_name if month!= 'all': months=['january','february','march','april','may','june'] m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ...
[ "0.81320685", "0.8108889", "0.8045821", "0.8042514", "0.80090284", "0.80071104", "0.79991937", "0.7998333", "0.7988789", "0.797905", "0.79737365", "0.79610896", "0.7956163", "0.7947432", "0.79463065", "0.7908287", "0.7908229", "0.7904569", "0.7900715", "0.78930074", "0.788921...
0.7718666
60
Displays statistics on the most frequent times of travel.
def time_stats(df): print('\nCalculating The Most Frequent Times of Travel...\n') start_time = time.time() df['Start Time']=pd.to_datetime(df['Start Time']) # TO DO: display the most common month df['month']=df['Start Time'].dt.month common_month=df['month'].mode()[0] g1=input("If you want ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\...
[ "0.8023676", "0.8022362", "0.79149705", "0.7825905", "0.78213924", "0.7813664", "0.7765152", "0.77395964", "0.7735777", "0.7733763", "0.76860064", "0.7668081", "0.7651128", "0.7644099", "0.7639373", "0.7636164", "0.7624668", "0.7622597", "0.76122236", "0.7599646", "0.75829977...
0.6956795
98
Displays statistics on the most popular stations and trip.
def station_stats(df): print('\nCalculating The Most Popular Stations and Trip...\n') start_time = time.time() # TO DO: display most commonly used start station t1=input("If you want to know the most common start station please press yes else no: ") if t1.lower() == 'yes': print("Most com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m...
[ "0.7815675", "0.7662213", "0.7553417", "0.74914914", "0.74748665", "0.7446617", "0.7428588", "0.74237514", "0.74177027", "0.7400495", "0.7387161", "0.7385634", "0.73647535", "0.735934", "0.73566747", "0.73548365", "0.7351854", "0.7351274", "0.735057", "0.73421645", "0.7340198...
0.7008655
75
Displays statistics on the total and average trip duration.
def trip_duration_stats(df): print('\nCalculating Trip Duration...\n') start_time = time.time() # TO DO: display total travel time total=df['Trip Duration'].sum() l2=input("If you want to know the total travel time please press yes else no: ") if l2.lower() == 'yes': print(" The total...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri...
[ "0.814274", "0.8025143", "0.80041367", "0.79496753", "0.7937415", "0.79312176", "0.7926815", "0.7915187", "0.79142886", "0.7908032", "0.79055744", "0.7900715", "0.7891682", "0.78894734", "0.7886722", "0.78851086", "0.7884266", "0.7882474", "0.78738385", "0.78686154", "0.78664...
0.7615049
85
Returns the global maximum value and position.
def globalMaximum(self): # The global maximum is at one peak's position potential_max = list() for func, pos, height, width in zip(self.peaks_function, self.peaks_position, self.peaks_height, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_max_position(self):\n raise NotImplementedError()", "def max_position(self):\n raise NotImplementedError", "def max_positions(self):\n return self.args.max_positions", "def get_max(self):\n return self.max[-1]", "def max(self):\n assert self.__stack\n retur...
[ "0.75708455", "0.7472142", "0.7386652", "0.73621035", "0.735912", "0.7274368", "0.72637445", "0.7262161", "0.7253182", "0.72366637", "0.72155946", "0.71909815", "0.7190395", "0.71811473", "0.71685374", "0.7157625", "0.71497184", "0.7140186", "0.7138031", "0.7129402", "0.71283...
0.81460285
0
The possible initial states warped walkers may assume.
def initial_states(self): return self._initial_states
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_initial_states(self):\n raise NotImplementedError()", "def initial_state(self):\n return 0", "def iter_initial_states(self):\n from six.moves import filter\n return filter(lambda s:s.is_initial, self.iter_states())", "def states_initial(self):\n return self.states(\...
[ "0.6536528", "0.63338894", "0.6325197", "0.6295865", "0.61272234", "0.6122794", "0.608243", "0.6061773", "0.60178685", "0.59641576", "0.5951884", "0.59460944", "0.59215546", "0.5918401", "0.5916066", "0.5902502", "0.589962", "0.58667886", "0.5859815", "0.5859748", "0.5859748"...
0.64018655
1
The probabilities of each initial state being chosen during a warping.
def initial_weights(self): return self._initial_weights
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_start_probs(self) -> np.ndarray:\n return self.random_state.dirichlet(np.ones(self.n_states), size=1).flatten()", "def priorProb(self, state):\n actions = []\n for i in range(0, 10):\n actions.append(((i, i+1), random.uniform(0, 1))) \n \n return actions", "def...
[ "0.7908313", "0.7426361", "0.7377109", "0.7229438", "0.7193108", "0.69650257", "0.69582117", "0.6895475", "0.6890572", "0.67658305", "0.6710186", "0.668009", "0.6658204", "0.6598303", "0.65891576", "0.6556765", "0.65317917", "0.65035456", "0.6486569", "0.6459797", "0.64467436...
0.0
-1
The indices of the atom positions in the state considered the ligand.
def ligand_idxs(self): return self._ligand_idxs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def atom_idxs(self):\n\n return np.array([atom.atom_idxs for atom in self])", "def getLandmarkindices(self):\n return self.subsetnodes_indices", "def getLandmarkindices(self):\n return self.subsetindices", "def extract_ligand_indexes(traj, ligand):\n ligand_indexes = []\n for resid...
[ "0.7631998", "0.7395858", "0.7285203", "0.7201684", "0.69681764", "0.6946488", "0.6833295", "0.6828469", "0.6820649", "0.67353374", "0.66252863", "0.6587609", "0.6586959", "0.65467286", "0.653346", "0.6422198", "0.64164", "0.6409819", "0.6397331", "0.6265197", "0.62486005", ...
0.8726919
0
The indices of the atom positions in the state considered the receptor.
def receptor_idxs(self): return self._receptor_idxs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def atom_idxs(self):\n\n return np.array([atom.atom_idxs for atom in self])", "def get_indices(self):\r\n return self._indices", "def getIndices(self):\r\n return self._indices", "def occ_indices(self):\n indices = []\n for index,item in enumerate(self):\n if ite...
[ "0.82382464", "0.727947", "0.7218753", "0.7151456", "0.7083873", "0.6969181", "0.6967562", "0.68910456", "0.6889587", "0.6860909", "0.6848452", "0.6824074", "0.67979336", "0.6595159", "0.65589255", "0.6538948", "0.65247905", "0.65097815", "0.6502098", "0.6494767", "0.64834356...
0.8276405
0
Perform the warping of a walker. Chooses an initial state to replace the walker's state with according to it's given weight. Returns a walker of the same type and weight.
def _warp(self, walker): # choose a state randomly from the set of initial states target_idx = np.random.choice(range(len(self.initial_states)), 1, p=self.initial_weights/np.sum(self.initial_weights))[0] warped_state = self.initial_states[target_idx] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build(self, w=1):\n states = self.a.states.values()\n reachedStates = set()\n remainingStates = set()\n\n _open = Heap()\n\n for s in states:\n if s.acceptingFunction is not None:\n s.h = 0\n _open.push(0, s)\n reachedSt...
[ "0.5691519", "0.5282371", "0.523244", "0.52236164", "0.5166298", "0.5165015", "0.5163046", "0.51418316", "0.5122877", "0.50620407", "0.5039045", "0.5032708", "0.5029594", "0.5018036", "0.50139284", "0.497852", "0.49433792", "0.49433264", "0.4927654", "0.49240887", "0.48710394...
0.79330695
0
The indices of the atom positions in the state considered the binding site.
def binding_site_idxs(self): return self._receptor_idxs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def atom_idxs(self):\n\n return np.array([atom.atom_idxs for atom in self])", "def agent_locs_idx(self):\n return tuple(self.agent_locs.T)", "def get_indices(self):\r\n return self._indices", "def getIndices(self):\r\n return self._indices", "def indices(self):\n i, j, _e...
[ "0.7762307", "0.73607725", "0.7259929", "0.7114606", "0.7097203", "0.7028722", "0.6852481", "0.6815367", "0.67249656", "0.6657523", "0.6605119", "0.6554097", "0.65420175", "0.65259284", "0.6498936", "0.64765036", "0.6446694", "0.6387674", "0.63860303", "0.63356364", "0.629407...
0.7760267
1
Constructor for UnbindingBC class. All the keyword arguments are necessary. The 'initial_state' should be the initial state of your simulation for proper nonequilibrium simulations. Arguments
def __init__(self, initial_state=None, cutoff_distance=1.0, topology=None, ligand_idxs=None, receptor_idxs=None, periodic=True, **kwargs): # since the super class can handle multiple initial states we ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_bn(bn):\n \n bn.bias.data.fill_(0.)\n bn.running_mean.data.fill_(0.)\n bn.weight.data.fill_(1.)\n bn.running_var.data.fill_(1.)", "def init_bn(bn):\n bn.bias.data.fill_(0.0)\n bn.weight.data.fill_(1.0)", "def init_bn(bn):\n bn.bias.data.fill_(0.)\n bn.weight.data.fill_(1.)",...
[ "0.6019453", "0.59301925", "0.5902861", "0.5902861", "0.5902861", "0.58169603", "0.57538253", "0.5629282", "0.5622405", "0.56019586", "0.5537057", "0.54863316", "0.5476952", "0.54749656", "0.546823", "0.54309404", "0.54231805", "0.5387223", "0.5345349", "0.53401494", "0.53344...
0.0
-1
Create a RegressionData object from an estimator class.
def from_object(cls, estimator, feature_matrix, property_vector, parameters=None): try: estimator_name = estimator.__class__.__name__ except AttributeError: estimator_name = estimator.__name__ return cls( module=estimator.__module__, estimator_nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_sklearn(cls, estimator, feature_matrix, property_vector):\n return cls(\n module=estimator.__module__,\n estimator_name=estimator.__class__.__name__,\n feature_matrix=feature_matrix,\n property_vector=property_vector,\n parameters=estimator.get...
[ "0.6236418", "0.6210755", "0.6024981", "0.5996527", "0.5853324", "0.5666143", "0.55975217", "0.55350024", "0.5532356", "0.5492418", "0.54356515", "0.53935504", "0.5378109", "0.5320206", "0.5292258", "0.527582", "0.5268491", "0.5250762", "0.5250071", "0.5247957", "0.52332336",...
0.597996
4
Remove fit coefficients or ECI's with small values. Removes ECI's and orbits in the ClusterSubspaces that have ECI/parameter values smaller than the given threshold. This will change the fits error metrics (i.e. RMSE) a little, but it should not be much. If they change a lot then the threshold used is probably too high...
def prune(self, threshold=0, with_multiplicity=False): coefs = self.eci if with_multiplicity else self.coefs bit_ids = [i for i, coef in enumerate(coefs) if abs(coef) < threshold] self.cluster_subspace.remove_corr_functions(bit_ids) # Update necessary attributes ids_complement =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trimCompo(self, threshold):\n newCompo = {}\n for key,value in self.m_compo.items():\n if value > threshold:\n newCompo[ key ] = value\n self.m_compo = newCompo", "def prune_outliers_from_dataset(datasets: tuple, threshold: float, verbose: bool) -> tuple:\n #...
[ "0.62536013", "0.57788783", "0.5763838", "0.5722056", "0.571018", "0.5643245", "0.5627789", "0.55441475", "0.5527665", "0.55141956", "0.5495865", "0.54696786", "0.5461309", "0.5422423", "0.53910226", "0.5389687", "0.53792", "0.5369068", "0.53648835", "0.5363127", "0.5340759",...
0.6851633
0
Create ClusterExpansion from serialized MSONable dict.
def from_dict(cls, d): reg_data_dict = deepcopy(d.get("regression_data")) if reg_data_dict is not None: reg_data_dict["feature_matrix"] = np.array( d["regression_data"]["feature_matrix"] ) reg_data_dict["property_vector"] = np.array( d[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self):\n return ClusterExpansion.from_dict(self.as_dict())", "def from_dict(cls, dikt) -> 'ShardingDescriptor':\n return util.deserialize_model(dikt, cls)", "def _from_string(cls, serialized):\r\n parse = cls.URL_RE.match(serialized)\r\n if not parse:\r\n raise I...
[ "0.5919251", "0.57916635", "0.56996584", "0.56544054", "0.54264385", "0.53941065", "0.5385412", "0.5363183", "0.52725023", "0.5242033", "0.52273315", "0.5222105", "0.52039033", "0.51954126", "0.5185823", "0.5161533", "0.51568764", "0.5140203", "0.5136915", "0.51132333", "0.51...
0.705797
0
Implements `x = self[idx]`
def __getitem__(self, idx): assert(isinstance(idx, int)) nidx = self._normalize_idx(idx) if nidx >= len(self.data): raise IndexError return self.data[nidx]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getitem__(self, idx):\n return self.getitem(idx)", "def __getitem__(self, i):\n return self.__x[i]", "def __getitem__(self, idx):\n pass", "def __getitem__(self, idx):\n pass", "def __getitem__(self, idx):\n return self._data[idx]", "def __getitem__(self, idx):\n ...
[ "0.81874526", "0.7991966", "0.7887783", "0.7887783", "0.7557735", "0.7506571", "0.7506571", "0.7489573", "0.7489573", "0.7431172", "0.74185205", "0.73753774", "0.7311485", "0.7311485", "0.7265653", "0.72426534", "0.7241175", "0.7231225", "0.720428", "0.7204184", "0.7189326", ...
0.7202193
20
Inserts value at position idx, shifting the original elements down the list, as needed. Note that inserting a value at len(self) equivalent to appending the value is permitted. Raises IndexError if idx is invalid.
def insert(self, idx, value): assert(isinstance(idx, int)) nidx = self._normalize_idx(idx) self.data.append(None) for i in range(len(self.data)-1,idx,-1): self.data[i] = self.data[i-1] self.data[idx] = value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert(self, idx, element):\n if self._length == self._capacity: # Need to increase size\n self._grow_arr()\n\n if idx < 0: # For negative indexing, convert to positive counterpart\n idx = self._convert_negative_index(idx)\n idx = min(self._length, idx) # Any index...
[ "0.76569957", "0.74387354", "0.7170466", "0.7159848", "0.6967311", "0.69386035", "0.6900636", "0.68895215", "0.6883031", "0.67318654", "0.67028767", "0.665537", "0.6628325", "0.65901107", "0.6585507", "0.6529382", "0.64873207", "0.64773446", "0.6460093", "0.6458619", "0.64099...
0.7784822
0
Returns True if this ArrayList contains the same elements (in order) as other. If other is not an ArrayList, returns False.
def __eq__(self, other): to_ret = False if (not isinstance(other, ArrayList)) or (len(other.data) != len(self.data)): return to_ret for i in range(len(self.data)): if self.data[i] != other.data[i]: return to_ret else: p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n\n for vert in self:\n if vert not in other:\n return False\n if len(self) == len(other):\n return True", "def __eq__(self, other):\n if not isinstance(other, Vector):\n return False\n elif len(self) != len(othe...
[ "0.73884636", "0.7384937", "0.71894115", "0.70885074", "0.70311356", "0.69708467", "0.6966033", "0.6947643", "0.6930064", "0.69040084", "0.690394", "0.6902855", "0.6864643", "0.6862794", "0.6860097", "0.6842636", "0.6841529", "0.6812321", "0.6763469", "0.6750699", "0.6732056"...
0.834435
0
Implements `val in self`. Returns true if value is found in this list.
def __contains__(self, value): found = False for i in range(len(self.data)): if self.data[i] == value: return True return found
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contains(self, value):\n return value in self.values", "def contains(self, val):\n return False if not self.search(val) else True", "def contains(self, val):\n\t\treturn Contains(self, val)", "def __contains__(self, v):\n for i in self:\n if v in i:\n return...
[ "0.8111839", "0.7948849", "0.7892647", "0.78413045", "0.7803638", "0.7712005", "0.77106756", "0.76756865", "0.76608175", "0.7606917", "0.76037186", "0.74805", "0.738176", "0.73603797", "0.73194665", "0.73194665", "0.72763395", "0.72592175", "0.7256962", "0.7218377", "0.720509...
0.7652571
9
Returns the minimum value in this list.
def min(self): least = self.data[0] for i in range(len(self.data)): if self.data[i] < least: least = self.data[i] return least
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_minimum_value_from_list(self, list_):\r\n return min(list_)", "def min(self):\n return min(self)", "def find_min(self):\n return self.min", "def find_min(self):\n return self.min", "def minimum(self):\n return min(self.numbers)", "def min(self):\n return ...
[ "0.85101634", "0.8486756", "0.8461137", "0.8461137", "0.843423", "0.83566856", "0.83070683", "0.8291473", "0.8291473", "0.81463844", "0.81280786", "0.8116124", "0.8106519", "0.79889494", "0.79889494", "0.7897125", "0.7897125", "0.7887265", "0.78840184", "0.78839165", "0.78566...
0.8204986
9
Returns the maximum value in this list.
def max(self): most = self.data[0] for i in range(len(self.data)): if self.data[i] > least: most = self.data[i] return most
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_max_value(self):\n max_value = max(self.values)\n return max_value", "def get_max(self):\n return self.max[-1]", "def max(self):\n return max(self)", "def max(self):\n return self.get_first()", "def get_max(self):\n return self._max", "def max(self):\n ...
[ "0.8554118", "0.85533834", "0.8471039", "0.84104866", "0.8379789", "0.835243", "0.8345974", "0.82960916", "0.82960916", "0.82618034", "0.8231", "0.8223631", "0.814503", "0.81396824", "0.8051075", "0.7980675", "0.7958217", "0.7933791", "0.7904487", "0.7897749", "0.7897749", ...
0.77562344
31
Returns a new ArrayList instance (with a separate data store), that contains the same values as this list.
def copy(self): # YOUR CODE HERE raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self):\n return List(*self.__list)", "def Clone(\n self: \"HereditaryStratumOrderedStoreList\",\n ) -> \"HereditaryStratumOrderedStoreList\":\n # shallow copy\n result = copy(self)\n # do semi-shallow clone on select elements\n # see https://stackoverflow.com...
[ "0.7230478", "0.7161604", "0.70206034", "0.69202644", "0.66281134", "0.66053754", "0.6512443", "0.63452727", "0.6308754", "0.63045657", "0.6284557", "0.620773", "0.6174145", "0.612648", "0.6125756", "0.6109205", "0.6103766", "0.60300285", "0.60257274", "0.5967417", "0.5967417...
0.0
-1
Formats the date to a string using the default, extended, calendar format.
def __str__(self): return str(self.GetCalendarString())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_date(self, date_val):\n try:\n if type(date_val) is not datetime:\n d = date.fromisoformat(date_val[0:10])\n else:\n d = date_val\n return d.strftime('%Y-%m-%d')\n except Exception as e:\n self.error((str(e)))", "d...
[ "0.73291326", "0.72577274", "0.7052602", "0.70421946", "0.70223236", "0.6985151", "0.6982515", "0.6925863", "0.6858816", "0.6836314", "0.6793936", "0.67413425", "0.6730617", "0.67195636", "0.671652", "0.6706175", "0.66934735", "0.6673684", "0.6650225", "0.66282487", "0.661164...
0.6068472
79
Formats the date to a unicode string using the default, extended, calendar format.
def __unicode__(self): return unicode(self.GetCalendarString())
{ "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 format_date(self, date_val):\n try:\n if type(date_val) is not datetime:\n d = date.fromisoformat(date_val[0:10...
[ "0.7064398", "0.67493385", "0.6631843", "0.6610992", "0.66041666", "0.65222526", "0.64971995", "0.6496007", "0.6459436", "0.6453339", "0.6427198", "0.6423656", "0.64044446", "0.6401184", "0.63916266", "0.63598615", "0.6354642", "0.6331282", "0.6302594", "0.62950677", "0.62793...
0.60486555
42
Formats this date using ordinal form, for example 1969201 basic True/False, selects basic form, e.g., 1969201.Default is False truncation
def GetOrdinalString(self, basic=False, truncation=NoTruncation): century, year, ordinalDay = self.GetOrdinalDay() if ordinalDay is None: # same as for calendar strings return self.GetCalendarString(basic, truncation) else: if truncation == NoTruncation: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __formatDate(self, num):\n if len(num) < 2:\n num = '0'+num\n return num", "def GetOrdinalString(\n self,\n basic=0,\n truncation=0,\n ndp=0,\n zonePrecision=Precision.Complete,\n dp=\",\",\n tDesignator=\"T...
[ "0.6289403", "0.57984483", "0.5790359", "0.5771288", "0.5765667", "0.5698245", "0.56042475", "0.5602178", "0.5583595", "0.5578616", "0.557785", "0.5573462", "0.55716103", "0.5546931", "0.5524471", "0.5520423", "0.5482463", "0.54753685", "0.54540724", "0.54462266", "0.54154456...
0.6125912
1
Returns a single integer representing the zone offset (in minutes) or None if this time does not have a time zone offset.
def GetZoneOffset(self): if self.zDirection is None: return None else: return self.zDirection * self.zOffset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_timezone_offset():\n timezone = get_localzone()\n offset_minutes = timezone.utcoffset(datetime.datetime.now()).total_seconds() // SECONDS_IN_MINUTE\n return parse_int(offset_minutes)", "def _tzoffset(tz, t):\n try:\n return _TZINFO[tz].info(t)[0]\n except Exception:\n if nume...
[ "0.74314886", "0.71077484", "0.7013704", "0.7008681", "0.68291694", "0.67443913", "0.67187417", "0.6421418", "0.6402421", "0.63679147", "0.6340429", "0.6337184", "0.6244579", "0.6173035", "0.6149815", "0.60688674", "0.60684615", "0.6066114", "0.60556114", "0.6002769", "0.5999...
0.635842
10
Formats the time to a string using the default, extended format.
def __str__(self): return str(self.GetString())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_time_str():\n return time.strftime(time_fmt)", "def friendly_time(time=None):\n if time is None:\n time = pass_good_until()\n return time.strftime(config.TIME_PRINT_FORMAT)", "def _time_str(self):\n try:\n if not self._time:\n raise ValueError\n ...
[ "0.7695465", "0.7607682", "0.73977983", "0.73889863", "0.73733574", "0.7325505", "0.7318838", "0.72914404", "0.72645295", "0.7248949", "0.7220562", "0.7198244", "0.71810937", "0.7135996", "0.7103767", "0.7095871", "0.70619065", "0.7001415", "0.69953537", "0.6966277", "0.69521...
0.0
-1
Formats the time to a unicode string using the default, extended format.
def __unicode__(self): return unicode(self.GetString())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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)", "def get_time_str():\n return time.strftime(time_fmt)", "def friendly_time(time=None):\n if time is None:\n time = pass_good_until()\n return time....
[ "0.7427225", "0.7310843", "0.723319", "0.7188778", "0.71704215", "0.71671116", "0.7083841", "0.7033844", "0.69707084", "0.69013506", "0.6889117", "0.6864577", "0.6854881", "0.68112296", "0.6793433", "0.6785122", "0.6776348", "0.6750391", "0.67153513", "0.66700965", "0.6646868...
0.0
-1
Formats the Timepoint to a unicode string using the default, extended, calendar format.
def __unicode__(self): return unicode(self.GetCalendarString())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strftime_to_unicode(self, fmt):\r\n return re.sub(\r\n r'(%[a-zA-Z])',\r\n lambda m: self.STRFTIME_TO_UNICODE.get(m.group(1), m.group(1)),\r\n fmt\r\n )", "def format_time(self, time):\n hh = time[0:2]\n mm = time[2:4]\n ss = time[4:]\n ...
[ "0.6320751", "0.608454", "0.6040493", "0.6032285", "0.59972614", "0.5984663", "0.5959473", "0.59275424", "0.59275424", "0.5920525", "0.58655787", "0.5861073", "0.58071417", "0.58071417", "0.58071417", "0.5800372", "0.5787172", "0.57818496", "0.57734895", "0.57526034", "0.5743...
0.53041714
82
Constructs a TimePoint from unixTime, the number of seconds since the time origin.The resulting time is in UTC. This method uses python's gmtime(0) to obtain the Unix origin time.
def FromUnixTime(cls, unixTime): utcTuple = pytime.gmtime(0) t, overflow = Time.FromStructTime(utcTuple).Offset(seconds=unixTime) d = Date.FromStructTime(utcTuple).Offset(days=overflow) return cls(date=d, time=t.WithZone(zDirection=0))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_unixtime(self):\n if not self.Complete():\n raise DateTimeError(\"get_unixtime requires complete timepoint\")\n zoffset = self.time.GetZoneOffset()\n if zoffset is None:\n raise DateTimeError(\"get_unixtime requires timezone\")\n elif zoffset == 0:\n ...
[ "0.67560035", "0.6652053", "0.66441214", "0.6569114", "0.6303727", "0.6195301", "0.6144796", "0.6135113", "0.60965097", "0.60522974", "0.6036487", "0.6026946", "0.5911802", "0.5905643", "0.58966154", "0.5851556", "0.58437127", "0.57818604", "0.57163656", "0.57139033", "0.5700...
0.706338
0
List models in a project.
def list(self, project_id): endpoint = "/project/{}/model".format(project_id) return self._get(endpoint, _ModelSchema(many=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def models_list(request):\n projects = Project.objects.filter(models=1)\n return render(request, 'screenshower/app/models_list.html', {'projects': projects})", "def ListModels(self, request, context):\n context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)", "def list(self, *args, **kwargs):\n ...
[ "0.79152936", "0.7396299", "0.71830803", "0.6951597", "0.6945092", "0.6849994", "0.67448294", "0.6668643", "0.6567901", "0.6498854", "0.64851725", "0.6481699", "0.64800274", "0.6413323", "0.64063305", "0.63729674", "0.63483864", "0.6324699", "0.6307377", "0.62619567", "0.6261...
0.7942028
0
Return a list of stations.
def stations(): Stationlist = session.query(Station.name).all() session.close() # Unravel results into a 1D array and convert to a list allstations = list(np.ravel(Stationlist)) return jsonify(allstations)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stations():\n\n return station_list", "def stations(self):\n stations = []\n f = self._fetch(Citibike.STATION_URL)\n data = json.load(f)\n if 'stationBeanList' not in data or len(data['stationBeanList']) == 0:\n raise BadResponse('Station Fetch Failed', data)\n ...
[ "0.9192397", "0.8370616", "0.83675796", "0.8231902", "0.8127559", "0.7976321", "0.7955362", "0.7948396", "0.7947632", "0.7919242", "0.7885779", "0.7872458", "0.78176624", "0.77969766", "0.7789681", "0.7738231", "0.7718514", "0.77039695", "0.76810753", "0.76784456", "0.7656394...
0.7641517
22
Return the collection's string representation.
def __str__(self) -> str: return soupify(self.html).get_text()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n collection_repr = textwrap.dedent(\"\"\"\n Collection: {{\n _id: {_id}\n name: '{name}'\n adapter: '{adapter}',\n documents: {count}\n }}\n \"\"\").format(_id=id(self),\n name=self.name,\n ...
[ "0.786813", "0.73198384", "0.728754", "0.71913844", "0.71913844", "0.71151114", "0.69658136", "0.69616055", "0.6932845", "0.68859977", "0.68855464", "0.686813", "0.6864589", "0.6859057", "0.6850459", "0.684508", "0.6802541", "0.6778003", "0.6765056", "0.676185", "0.67612416",...
0.0
-1
Creates and saves a new transaction to the database.
def add_transaction(self, bitfinex_id, bitfinex_currency, bitfinex_timestamp, bitfinex_price, bitfinex_amount): new_transaction = Transaction(bitfinex_id=bitfinex_id, bitfinex_currency=bitfinex_currency, bitfinex_timestamp=bitfinex_timestamp, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_to_db(self) -> None:\n query = '''INSERT INTO ESLReceipts(Transaction_Number, Date, Description, Memo,\n Amount_Debit, Amount_Credit, Balance, Check_Number, \n Fees, Card_Type, Is_Payment, Is_Transaction, User_id)...
[ "0.7010968", "0.6831925", "0.68078077", "0.6716217", "0.66652066", "0.6625749", "0.6624382", "0.6571374", "0.6564397", "0.65629774", "0.65436256", "0.6510388", "0.6509645", "0.6484415", "0.6431726", "0.6415176", "0.64047855", "0.6397556", "0.6397556", "0.6397556", "0.6397556"...
0.64312154
15
Return lhs < rhs
def finf(lhs, rhs, epsilon=0.00001): return rhs-lhs > epsilon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __le__(self, rhs):\n \n result = (self == rhs or self < rhs)\n return result", "def __lt__(self, other):\n return self.__le__(other) and self.__ne__(other)", "def __lt__(self, other):\n return self <= other and self != other", "def __lt__(self, other):\n return s...
[ "0.8057495", "0.79681385", "0.79528594", "0.79528594", "0.79211867", "0.7904796", "0.78264105", "0.7816736", "0.7810517", "0.7770312", "0.776228", "0.7725246", "0.7701593", "0.76877284", "0.7687484", "0.7677891", "0.7676841", "0.7662219", "0.7658638", "0.76410115", "0.7637276...
0.0
-1
Gets the id of this Listing. The unique identifier for the listing in Marketplace.
def id(self): return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def id(self):\n retu...
[ "0.70521134", "0.70521134", "0.70521134", "0.70521134", "0.70521134", "0.70521134", "0.69662994", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.6944937", "0.694493...
0.6873991
53
Sets the id of this Listing. The unique identifier for the listing in Marketplace.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listing_id(self, listing_id):\n\n self._listing_id = listing_id", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id):\n self.__id = id", "def set_id(self, id_):\n\n self.id_ = id_", "def SetId(self, id):\n self.id = int(id)", "def setID(self, idf)...
[ "0.7870872", "0.72632337", "0.71767014", "0.7151847", "0.70513093", "0.6981652", "0.6954514", "0.6954514", "0.6954514", "0.6954514", "0.6954514", "0.69390696", "0.6919306", "0.6904512", "0.68842065", "0.68842065", "0.68842065", "0.68842065", "0.68842065", "0.68842065", "0.688...
0.6961449
11
Gets the name of this Listing. The name of the listing.
def name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_name(self) -> str:\n\n return self.name_", "def get_name(self) -> str:\n return self._name", "def get_name(self) -> str:\n return self._name", "def get_name(self) -> str:\n return self.name", "def get_name(self) -> str:\n return self.name", "def get_name(self) -...
[ "0.7534676", "0.7443519", "0.7443519", "0.74420583", "0.74420583", "0.74420583", "0.7345181", "0.73309565", "0.73309565", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595", "0.7311595"...
0.0
-1
Sets the name of this Listing. The name of the listing.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, _name):\n self.name = _name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n ...
[ "0.76452434", "0.76284426", "0.76284426", "0.76284426", "0.76284426", "0.76284426", "0.75867885", "0.7580462", "0.7565813", "0.74906", "0.74563944", "0.74563944", "0.7429585", "0.7389291", "0.7389291", "0.7371562", "0.7309335", "0.7239404", "0.7239242", "0.7177325", "0.717183...
0.7127466
30
Gets the version of this Listing. The version of the listing.
def version(self): return self._version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_version(self):\n return self.http_call(\"get\", url=f\"{self.base_url}/version\").json()", "def get(self):\n return self._version", "def get_version(self):\n return self.__make_api_call('get/version')", "def get_version(self):\n return self.version", "def get_version(sel...
[ "0.7458213", "0.74178374", "0.73907965", "0.73766637", "0.7332932", "0.7332932", "0.7285163", "0.7173751", "0.7166155", "0.71653026", "0.7160124", "0.71483016", "0.7106988", "0.7092938", "0.70737225", "0.70716816", "0.7070157", "0.70602125", "0.70570946", "0.70534414", "0.705...
0.70931304
17
Gets the keywords of this Listing. Keywords associated with the listing.
def keywords(self): return self._keywords
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getKeywords(self):\n return", "def get_keywords(self):\r\n\t\treturn list(self.keyword_headlines().keys())", "def keywords(self):\n return self.__keywords", "def keywords(self):\n return list(self._kw)", "def GetKeywords(self):\n return self._code['keywords']", "def get_ke...
[ "0.8045142", "0.8027838", "0.7636264", "0.76230294", "0.75774515", "0.74492645", "0.73888415", "0.73725855", "0.7175997", "0.7062587", "0.7020952", "0.69810665", "0.69784886", "0.6859979", "0.68595296", "0.6813364", "0.66713965", "0.6647329", "0.66417086", "0.66260093", "0.65...
0.766821
3
Gets the short_description of this Listing. A short description of the listing.
def short_description(self): return self._short_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def short_description(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"short_description\")", "def short_description(self):\n return self.name", "def shortDescription(self):\n return self._line.description", "def short_description(self):\n description = self.description\n ...
[ "0.73577285", "0.72625756", "0.72026336", "0.7117337", "0.709271", "0.7026649", "0.6991476", "0.6942552", "0.6826563", "0.6826563", "0.6826563", "0.6826563", "0.6801069", "0.67609227", "0.6740555", "0.6733474", "0.6720813", "0.671257", "0.66941947", "0.66788566", "0.66788566"...
0.79243517
1
Sets the short_description of this Listing. A short description of the listing.
def short_description(self, short_description): self._short_description = short_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def short_description(self, short_description):\n\n self._short_description = short_description", "def short_description(self, short_description):\n if short_description is None:\n raise ValueError(\"Invalid value for `short_description`, must not be `None`\")\n\n self._short_desc...
[ "0.8449821", "0.80678433", "0.68069285", "0.6783612", "0.6783612", "0.6728136", "0.66674626", "0.66212046", "0.6584278", "0.6528017", "0.6505532", "0.64720845", "0.64129335", "0.64046067", "0.6326431", "0.6312329", "0.6312329", "0.6312329", "0.6312329", "0.6290732", "0.629073...
0.8429913
1
Gets the long_description of this Listing. A long description of the listing.
def long_description(self): return self._long_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def long_description(self) -> str:\n return self._long_description", "def long_description(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"long_description\")", "def long_description(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"long_description\")", "def get...
[ "0.80596477", "0.758474", "0.72378236", "0.71228004", "0.71099156", "0.71099156", "0.71099156", "0.71099156", "0.7103312", "0.7053098", "0.7048452", "0.7044788", "0.7030812", "0.6991155", "0.69771314", "0.6967502", "0.6952499", "0.6934183", "0.69313747", "0.69313747", "0.6929...
0.8087247
0
Sets the long_description of this Listing. A long description of the listing.
def long_description(self, long_description): self._long_description = long_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def long_description(self, long_description: str):\n\n self._long_description = long_description", "def set_longdescription(self, longdesc):\n self.longdescription(longdesc)", "def long_description(self) -> str:\n return self._long_description", "def long_description(self):\n retu...
[ "0.86731976", "0.8560788", "0.7149375", "0.7075606", "0.6908429", "0.68525", "0.6844741", "0.6813715", "0.6808889", "0.6801812", "0.6797638", "0.6730105", "0.6693408", "0.66631347", "0.66111076", "0.66111076", "0.66111076", "0.66111076", "0.6571146", "0.6571146", "0.6571146",...
0.8654559
1
Gets the license_model_description of this Listing. A description of the publisher's licensing model for the listing.
def license_model_description(self): return self._license_model_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def license_model_description(self, license_model_description):\n self._license_model_description = license_model_description", "def license(self): # noqa: A003\n logger.debug(\"Get license\")\n return self._raw_api.license.get()", "def license_details(self):\n if \"licenseDetails\...
[ "0.65090805", "0.63407576", "0.6327641", "0.6098437", "0.60412365", "0.5976658", "0.59197986", "0.58929926", "0.5860846", "0.5827089", "0.5769789", "0.5571917", "0.5557723", "0.55281246", "0.5523411", "0.55039614", "0.54873824", "0.5485993", "0.54852253", "0.5459995", "0.5459...
0.83493125
0
Sets the license_model_description of this Listing. A description of the publisher's licensing model for the listing.
def license_model_description(self, license_model_description): self._license_model_description = license_model_description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def license_model_description(self):\n return self._license_model_description", "def license(self, license):\n\n self._license = license", "def set_description(self, sDescription):\n\t\tcall_sdk_function('PrlVirtNet_SetDescription', self.handle, sDescription)", "def set_description(self, room_d...
[ "0.6921612", "0.6202522", "0.5927343", "0.5893093", "0.57872677", "0.5785446", "0.578273", "0.5752546", "0.5752546", "0.5742983", "0.5742669", "0.56861144", "0.5664043", "0.5637547", "0.5637547", "0.5637547", "0.5637547", "0.5637547", "0.5637547", "0.5637547", "0.5637547", ...
0.8649689
0
Gets the system_requirements of this Listing. System requirements for the listing.
def system_requirements(self): return self._system_requirements
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def system_requirements(self, system_requirements):\n self._system_requirements = system_requirements", "def requirements(self):\n requirements = []\n return requirements", "def python_requirements(self):\n try:\n dist = self.requirement.pip_requirement.get_dist()\n ...
[ "0.6756265", "0.630042", "0.6126706", "0.5784309", "0.5776431", "0.5704219", "0.5702918", "0.5696625", "0.56659317", "0.56201077", "0.5616559", "0.5568308", "0.5549997", "0.5487405", "0.5485939", "0.548016", "0.5447736", "0.5438381", "0.54212105", "0.54085964", "0.53814477", ...
0.8690019
0
Sets the system_requirements of this Listing. System requirements for the listing.
def system_requirements(self, system_requirements): self._system_requirements = system_requirements
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def system_requirements(self):\n return self._system_requirements", "def _set_system_forces(self, system):\n forces = self.results[self.force_handle]\n system.forces = forces.view(system.n_replicas, system.n_molecules,\n system.max_n_atoms,3) * \\\n ...
[ "0.6983736", "0.5838846", "0.5674688", "0.56331927", "0.56331927", "0.5464949", "0.5319611", "0.52284116", "0.52232224", "0.50656945", "0.50553805", "0.50460213", "0.5040736", "0.49555758", "0.49499926", "0.49416316", "0.49393702", "0.49228254", "0.49070564", "0.4841495", "0....
0.8679492
0
Sets the time_released of this Listing. The release date of the listing.
def time_released(self, time_released): self._time_released = time_released
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_released(self):\n return self._time_released", "def release_time(self) -> str:\n return pulumi.get(self, \"release_time\")", "def set_time_available(self, new_value):\n\n self.available_at = new_value\n self.save()", "def release_date(self):\n for item in self.prot...
[ "0.5934729", "0.58847374", "0.55999017", "0.5470613", "0.54162925", "0.52752566", "0.5228138", "0.51995313", "0.51778126", "0.51119363", "0.5065449", "0.50520337", "0.5027209", "0.500003", "0.49566588", "0.49566588", "0.49566588", "0.49566588", "0.49566588", "0.4927865", "0.4...
0.77573067
0
Gets the categories of this Listing. Categories that the listing belongs to.
def categories(self): return self._categories
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCategories(self):\n logger.debug(\"Func: getCategories\")\n\n return self._categories", "def getAllCategories(self):\n return self.categories", "def categories(self) -> List[str]:\n return self._categories", "def getCategories(self):\r\n return self.categories", "d...
[ "0.789913", "0.7834358", "0.7588943", "0.75576264", "0.743645", "0.7429961", "0.7415488", "0.7410034", "0.7404774", "0.7394403", "0.7394083", "0.73940605", "0.73926574", "0.73689085", "0.7349321", "0.73258126", "0.73108613", "0.7277099", "0.7219934", "0.7154459", "0.70007694"...
0.7517276
4
Sets the categories of this Listing. Categories that the listing belongs to.
def categories(self, categories): self._categories = categories
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def categories(self, categories):\n\n self._categories = categories", "def categories(self, categories):\n\n self._categories = categories", "def categories(self, categories):\n\n self._categories = categories", "def categories(self, categories):\n\n self._categories = categories"...
[ "0.7307259", "0.7307259", "0.7307259", "0.7307259", "0.7300853", "0.68660516", "0.66410893", "0.6177779", "0.6134643", "0.6062947", "0.60496455", "0.58617896", "0.5834949", "0.574634", "0.5729895", "0.5644923", "0.5644923", "0.5644923", "0.5644923", "0.5644923", "0.56407124",...
0.73104125
0
Gets the support_links of this Listing. Links to support resources for the listing.
def support_links(self): return self._support_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def support_links(self, support_links):\n self._support_links = support_links", "def getLinks(self):\n\n return self.links", "def documentation_links(self):\n return self._documentation_links", "def get_links(self) -> List[str]:\n return self.__links", "def support_url(self) -> ...
[ "0.63963586", "0.6201267", "0.61815244", "0.61208", "0.60785246", "0.6051551", "0.59929067", "0.59713036", "0.5868064", "0.58464664", "0.58464664", "0.58464664", "0.58464664", "0.58464664", "0.57972467", "0.5769803", "0.57259023", "0.56893015", "0.5656609", "0.55859476", "0.5...
0.7983624
0
Sets the support_links of this Listing. Links to support resources for the listing.
def support_links(self, support_links): self._support_links = support_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def support_links(self):\n return self._support_links", "def support_url(self, support_url: str):\n\n self._support_url = support_url", "def documentation_links(self, documentation_links):\n self._documentation_links = documentation_links", "def support_contacts(self, support_contacts):\...
[ "0.69751316", "0.62614554", "0.6255054", "0.61495894", "0.59559757", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5915402", "0.5883081", "0.5737501", "0.5633349", "0.5605854", "0.56031364"...
0.84397984
0
Sets the documentation_links of this Listing. Links to additional documentation provided by the publisher specifically for the listing.
def documentation_links(self, documentation_links): self._documentation_links = documentation_links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def documentation_links(self):\n return self._documentation_links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", ...
[ "0.69023544", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.66297585", "0.6629672", "0.6383643", "0.6354247", "0.6296145", "0.604916", "0.6047695", "0.58300346", "0.5776611", "0.5...
0.8419598
0
Gets the regions of this Listing. The regions where the listing is available.
def regions(self): return self._regions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_regions(self):\n return self._regions", "def regions(self) -> Sequence[str]:\n return pulumi.get(self, \"regions\")", "def regions(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"regions\")", "def regions(self):\n\n class RegionIter(object):\n ...
[ "0.80393547", "0.7805494", "0.7723249", "0.72262144", "0.7184458", "0.7143942", "0.7119229", "0.7099365", "0.706028", "0.70048416", "0.70002544", "0.6929981", "0.68779176", "0.6825818", "0.6808158", "0.6807868", "0.6655617", "0.6641144", "0.66303986", "0.657817", "0.657202", ...
0.7981078
1
Gets the package_type of this Listing. The listing's package type.
def package_type(self): return self._package_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type (self):\n return self._stype", "def type(self):\n return 'package'", "def get_type(self):\n return self._type", "def get_type(self):\n return self._type", "def type(self):\n\n return self.manifest[\"type\"]", "def get_type(self):\n return self.type",...
[ "0.6629074", "0.66246414", "0.65971076", "0.65971076", "0.6529473", "0.65072304", "0.65072304", "0.6460079", "0.6435091", "0.6430391", "0.6405827", "0.6404363", "0.64036995", "0.63900316", "0.6379892", "0.6343936", "0.63309747", "0.63023746", "0.63023746", "0.63023746", "0.63...
0.78860635
1
Sets the package_type of this Listing. The listing's package type.
def package_type(self, package_type): allowed_values = ["ORCHESTRATION", "IMAGE"] if not value_allowed_none_or_none_sentinel(package_type, allowed_values): package_type = 'UNKNOWN_ENUM_VALUE' self._package_type = package_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def package_type(self, package_type):\n\n self._package_type = package_type", "def setType(self, newType):\n self._itemType = newType", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self._type ...
[ "0.8191449", "0.6388714", "0.6379617", "0.6379617", "0.6370877", "0.6280505", "0.62801737", "0.62801737", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0.61183625", "0...
0.6474645
1
Gets the default_package_version of this Listing. The default package version.
def default_package_version(self): return self._default_package_version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDefaultPackageVersion():\n return _libsbml.CompExtension_getDefaultPackageVersion()", "def getDefaultPackageVersion():\n return _libsbml.MultiExtension_getDefaultPackageVersion()", "def getDefaultPackageVersion():\n return _libsbml.FbcExtension_getDefaultPackageVersion()", "def ge...
[ "0.83390003", "0.8327047", "0.826186", "0.8256483", "0.80970424", "0.8055716", "0.76140296", "0.7595864", "0.75897837", "0.7588637", "0.7577043", "0.75349975", "0.75328416", "0.75281364", "0.7481759", "0.7434644", "0.7396291", "0.73511976", "0.73455566", "0.725068", "0.721839...
0.8867176
0
Sets the default_package_version of this Listing. The default package version.
def default_package_version(self, default_package_version): self._default_package_version = default_package_version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_package_version(self):\n return self._default_package_version", "def getDefaultPackageVersion():\n return _libsbml.LayoutExtension_getDefaultPackageVersion()", "def getDefaultPackageVersion():\n return _libsbml.MultiExtension_getDefaultPackageVersion()", "def getDefaultPackag...
[ "0.7756795", "0.72961414", "0.7260456", "0.7226229", "0.7168602", "0.7086842", "0.70237195", "0.689463", "0.6791142", "0.67155576", "0.6561462", "0.6515818", "0.6482345", "0.64594007", "0.63910294", "0.6364691", "0.63292134", "0.6326202", "0.62639976", "0.62392294", "0.620352...
0.8982981
0
Sets the links of this Listing. Links to reference material.
def links(self, links): self._links = links
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self,...
[ "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.76569706", "0.7470207", "0.73794794", "0.7082816", "0.6771199", "0.65618646", "0.64178824", "0.61817366", "0.6178725", "0.6121204", "...
0.77638394
0
Gets the is_featured of this Listing. Indicates whether the listing is included in Featured Listings.
def is_featured(self): return self._is_featured
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_featured(self, is_featured):\n self._is_featured = is_featured", "def test_get_featured_front_page_only_returns_featured(self):\r\n\r\n featured_app = self.create_app(None)\r\n non_featured_app = self.create_app(None)\r\n non_featured_app.name = 'other_app'\r\n non_featu...
[ "0.72854847", "0.5756443", "0.54711634", "0.537165", "0.5351628", "0.53243643", "0.5320827", "0.52955836", "0.528026", "0.5253999", "0.5253999", "0.5250387", "0.5224164", "0.52167726", "0.5172859", "0.5123695", "0.50961107", "0.50507337", "0.4989964", "0.49887696", "0.4984692...
0.83817303
0
Sets the is_featured of this Listing. Indicates whether the listing is included in Featured Listings.
def is_featured(self, is_featured): self._is_featured = is_featured
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_featured(self):\n return self._is_featured", "def test_toggle_featured(self):\n story = create_story(title=\"Test Story\", summary=\"Test Summary\",\n byline=\"Test Byline\", status='published',\n on_homepage=True)\n story2 = cre...
[ "0.7416678", "0.56418395", "0.5471387", "0.5297682", "0.5234299", "0.50609577", "0.49377993", "0.49298215", "0.4823086", "0.47666132", "0.47003838", "0.4657619", "0.46520665", "0.46120566", "0.45910445", "0.4579018", "0.45746464", "0.45710957", "0.45710957", "0.4534249", "0.4...
0.85117894
0