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 |
|---|---|---|---|---|---|---|
GET / Show the home page | def home(request):
return render_to_response('index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def home():\n return response(\"OK\")",
"def home(request):\n\treturn render(request, \"compta/home.html\")",
"def home():\n payload = manager.get_payload()\n return render_template('index.html', payload=payload)",
"def get(self):\n if self.logged_in:\n self.render('home.html', {\n 'n... | [
"0.8102188",
"0.78860825",
"0.78660476",
"0.7857468",
"0.77891856",
"0.775687",
"0.77315885",
"0.77263904",
"0.7721931",
"0.7721931",
"0.7721931",
"0.7706586",
"0.769565",
"0.7681862",
"0.76753026",
"0.7672204",
"0.7658548",
"0.7657322",
"0.7646766",
"0.76302624",
"0.76005226... | 0.77063453 | 12 |
Transform input data Winsorise `X` at prefitted `quantile` and `1quantile`. Scale each variable (as long as they aren't binary in which case they are already rules) accorded to the already fitted scale factors. | def transform(self, X):
winX = X.copy()
is_lower = (winX <= self.lower)
is_higher = (winX >= self.upper)
for col in range(X.shape[1]):
winX[is_lower[:, col], col] = self.lower[col]
winX[is_higher[:, col], col] = self.upper[col]
return winX*self.scale | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fit_transform(self, X, y=None):\n self.scale = np.ones(X.shape[1])\n self.lower = np.percentile(X, self.quantile*100, axis=0)\n self.upper = np.percentile(X, (1-self.quantile)*100, axis=0)\n \n # Winsorize at `self.quantile`\n winX = X.copy()\n is_lower = (winX ... | [
"0.75867057",
"0.67999154",
"0.66214746",
"0.5967192",
"0.5888989",
"0.5855381",
"0.5718839",
"0.57124597",
"0.5695854",
"0.56935406",
"0.5588703",
"0.5585414",
"0.5556105",
"0.5542959",
"0.5531994",
"0.55186",
"0.55175906",
"0.54948944",
"0.54849446",
"0.54643995",
"0.545754... | 0.0 | -1 |
Returns offset of symbol name in loader string table. offset of symbol name in loader string table | def getNameOffset(self) -> int:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_dlsym_offset():\n import ctypes\n libdl = ctypes.PyDLL('libdl.so')\n dlopen = ctypes.cast(libdl.dlopen, ctypes.c_void_p).value\n dlsym = ctypes.cast(libdl.dlsym, ctypes.c_void_p).value\n return dlsym - dlopen",
"def get_symbol(self, name):\n if not self.ksymtab_initialized:\n self.... | [
"0.66889083",
"0.6611202",
"0.6203252",
"0.59230924",
"0.5809549",
"0.57707137",
"0.5730276",
"0.5715004",
"0.5666472",
"0.56297314",
"0.56227905",
"0.5597471",
"0.5563141",
"0.55597746",
"0.5537753",
"0.54879636",
"0.5457473",
"0.5412081",
"0.53920466",
"0.53888345",
"0.5384... | 0.6135863 | 3 |
Converts a SciPy sparse matrix to a CVXOPT sparse matrix. | def sparse2cvxopt(value):
import cvxopt
if isinstance(value, (np.ndarray, np.matrix)):
return cvxopt.sparse(cvxopt.matrix(value.astype('float64')), tc='d')
# Convert scipy sparse matrices to coo form first.
elif sp.issparse(value):
value = value.tocoo()
return cvxopt.spmatrix(val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_sparse(self):\n from divisi2.sparse import SparseMatrix\n return SparseMatrix(self, self.row_labels, self.col_labels)",
"def makesparse(matrix):\n n = matrix[0].size\n elements = []\n for i in range(n):\n for j in range(n):\n if matrix[i][j] != 0 :\n ... | [
"0.74020207",
"0.7093455",
"0.70311135",
"0.6989213",
"0.69172007",
"0.68352145",
"0.6795465",
"0.67651546",
"0.6756018",
"0.6749724",
"0.6736512",
"0.67179906",
"0.66992825",
"0.6644021",
"0.6587182",
"0.65845096",
"0.6561744",
"0.6558976",
"0.65500927",
"0.65500927",
"0.655... | 0.80747503 | 0 |
Get total current value. | def get_total(df):
last_milestone_id = df[df.cmd.notnull()].tail(1).index.get_values()[0]
total = df[last_milestone_id:].value.sum()
return total | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetTotal(self):\n return(self.total)",
"def total(self):\n\t\treturn self._total",
"def total(self) -> float:\n return self._total",
"def total_value(self):\n return self.parent.child_total_value[self.action]",
"def total(self):\n if self.dynamic:\n self._update_d... | [
"0.82439566",
"0.8206046",
"0.814501",
"0.7962158",
"0.7755605",
"0.77370954",
"0.7563143",
"0.75528264",
"0.75345725",
"0.7509995",
"0.74133193",
"0.74117213",
"0.73834187",
"0.7374968",
"0.73463064",
"0.7320118",
"0.7301672",
"0.72930855",
"0.72901803",
"0.7275583",
"0.7254... | 0.0 | -1 |
Transform user's document vector into list of tuples | def user_doc_bow(user):
user_doc = []
user_array = np.zeros(100)
nonzero_idx = [item for item in user.nonzero()[1]]
for i in nonzero_idx:
user_doc.append((i, user[0, i]))
topics = lda[user_doc]
topic_dict = {topic[0]: topic[1] for topic in topics}
np.put(user_array, topic_dict.keys()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ex_list(data):\n return tuple(data)",
"def read_tuples_list(corpus_path):\n idx = 0\n data = []\n with open(corpus_path, encoding='utf-8') as fr:\n lines = fr.readlines()\n sent_, label_h_, pos_, ner_ = [], [], [], []\n\n for line in lines:\n idx += 1\n if line.find(\"D... | [
"0.5863828",
"0.5648858",
"0.56228894",
"0.55880904",
"0.55583906",
"0.55135846",
"0.5450894",
"0.54424894",
"0.54149765",
"0.53839064",
"0.5359936",
"0.5349167",
"0.53247696",
"0.52956575",
"0.5271087",
"0.52633893",
"0.52600634",
"0.5258497",
"0.5246498",
"0.52325004",
"0.5... | 0.51671076 | 25 |
Change name on component. | def on_name_change(self, txt):
self.mdl.cmp.part_name = txt
self.refresh_svg_canvas() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_name(self, newname=\"\"):\n self.name = newname",
"def new_name(self,new_name):\n self.name = new_name",
"def update_name(self, new_name):\r\n self.__name = new_name",
"def update_name(self, new_name):\r\n self.__name = new_name",
"def updateName(self,name):\n sel... | [
"0.7760173",
"0.7759742",
"0.7747133",
"0.7747133",
"0.7532761",
"0.7531982",
"0.75248784",
"0.74675447",
"0.74527305",
"0.7436896",
"0.7427096",
"0.7427096",
"0.7427096",
"0.7427096",
"0.7427096",
"0.74243397",
"0.7422197",
"0.7418796",
"0.7418796",
"0.7418796",
"0.7418796",... | 0.0 | -1 |
Get a presigned URL for this request that expires after a given number of seconds. | def get_presigned_url2(self, timeout):
# requestbuilder 0.3
self.preprocess()
if self.__should_use_sigv4():
# UNSIGNED-PAYLOAD is a magical string used for S3 V4 query auth.
auth = requestbuilder.auth.aws.QueryHmacV4Auth.from_other(
self.auth, timeout=time... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def presigned_url(self, url, expiration=3600, force_download=False):\n force_download = \"?force_download=1\" if force_download else \"\"\n public_url = Path(self.config.get(\"public_url\", \"\"))\n resource_url = public_url / url\n return resource_url.as_posix() + force_download",
"d... | [
"0.7014345",
"0.7014051",
"0.6956774",
"0.67384046",
"0.6545521",
"0.6445912",
"0.63070875",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
"0.614691",
... | 0.6424251 | 6 |
Returns the reverse directed graph of G. | def reverse(G, copy=True):
if not G.is_directed():
raise nx.NetworkXError("Cannot reverse an undirected graph.")
else:
return G.reverse(copy=copy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_reversed_graph(directed_graph):\n\n reversed = directed_graph.__class__()\n for i in directed_graph.get_vertices().keys():\n reversed.add_vertex(i)\n\n for i in directed_graph.get_vertices().keys():\n vertex = directed_graph.get_vertex(i)\n for j in vertex.get_heads():\n ... | [
"0.7581556",
"0.75628114",
"0.7346692",
"0.70150614",
"0.6863429",
"0.65913934",
"0.64809585",
"0.64787996",
"0.643853",
"0.63429785",
"0.6326808",
"0.62946874",
"0.62814265",
"0.627383",
"0.62476474",
"0.61388195",
"0.6093543",
"0.60812247",
"0.6077702",
"0.60706794",
"0.605... | 0.83771706 | 0 |
Selects all entries such that entry.timestamp >= timestamps[entry.client] window_size | def select(self, timestamps):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def do_search_coincidences(timestamps, window=200000):\n coincidences = []\n\n # traverse all timestamps\n for i in xrange(len(timestamps)):\n\n # build coincidence, starting with the current timestamp\n c = [i]\n t0 = timestamps[i][0]\n\n # traverse the rest of the timestamps\... | [
"0.54318",
"0.5304614",
"0.5213484",
"0.50306123",
"0.5017064",
"0.50053144",
"0.4959315",
"0.49128497",
"0.48927337",
"0.48854557",
"0.48687822",
"0.48336253",
"0.48201647",
"0.47550848",
"0.47432086",
"0.47310567",
"0.4719693",
"0.4709526",
"0.46631616",
"0.4658335",
"0.465... | 0.45346963 | 33 |
Sets the esxi_host_count of this IaasUcsdManagedInfraAllOf. | def esxi_host_count(self, esxi_host_count):
self._esxi_host_count = esxi_host_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hyperv_host_count(self, hyperv_host_count):\n\n self._hyperv_host_count = hyperv_host_count",
"def hosts_every(self, hosts_every):\n\n self._hosts_every = hosts_every",
"def vcpu_set(vm_hostname, count, offline=False):\n with ExitStack() as es:\n vm = es.enter_context(_get_vm(vm_hos... | [
"0.59950227",
"0.5260858",
"0.50562745",
"0.50244135",
"0.49948582",
"0.48857233",
"0.48497176",
"0.48385507",
"0.482034",
"0.4762812",
"0.47252673",
"0.4718971",
"0.47022638",
"0.46596396",
"0.46280846",
"0.45461932",
"0.45392084",
"0.45244592",
"0.45231992",
"0.45225677",
"... | 0.8037844 | 0 |
Sets the external_group_count of this IaasUcsdManagedInfraAllOf. | def external_group_count(self, external_group_count):
self._external_group_count = external_group_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def local_group_count(self, local_group_count):\n\n self._local_group_count = local_group_count",
"def external_ids(self, external_ids):\n\n self._external_ids = external_ids",
"def esxi_host_count(self, esxi_host_count):\n\n self._esxi_host_count = esxi_host_count",
"def set_all_data_ex... | [
"0.53656894",
"0.4734468",
"0.4715213",
"0.4630498",
"0.46285418",
"0.4532851",
"0.45295992",
"0.44841346",
"0.44807005",
"0.44654495",
"0.44654495",
"0.44654495",
"0.44536784",
"0.4435368",
"0.43804",
"0.42757764",
"0.42720485",
"0.42300162",
"0.42260072",
"0.4207612",
"0.41... | 0.75556606 | 0 |
Sets the hyperv_host_count of this IaasUcsdManagedInfraAllOf. | def hyperv_host_count(self, hyperv_host_count):
self._hyperv_host_count = hyperv_host_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def esxi_host_count(self, esxi_host_count):\n\n self._esxi_host_count = esxi_host_count",
"def vcpu_set(vm_hostname, count, offline=False):\n with ExitStack() as es:\n vm = es.enter_context(_get_vm(vm_hostname))\n\n if vm.dataset_obj['datacenter_type'] != 'kvm.dct':\n raise Not... | [
"0.66588247",
"0.5818077",
"0.5640094",
"0.5640094",
"0.5394924",
"0.5279623",
"0.5277185",
"0.52716357",
"0.5202823",
"0.50858754",
"0.5027976",
"0.4993971",
"0.4947955",
"0.4938431",
"0.48995036",
"0.4849338",
"0.4816406",
"0.4814211",
"0.48059392",
"0.47629017",
"0.4759356... | 0.7839512 | 0 |
Sets the local_group_count of this IaasUcsdManagedInfraAllOf. | def local_group_count(self, local_group_count):
self._local_group_count = local_group_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def external_group_count(self, external_group_count):\n\n self._external_group_count = external_group_count",
"def _set_group_resource(self, _g):\n\n if isinstance(_g, Server):\n return\n\n for _, sg in _g.subgroups.items():\n self._set_group_resource(sg)\n _... | [
"0.5947293",
"0.509726",
"0.4911288",
"0.4911288",
"0.4911288",
"0.4881376",
"0.4801572",
"0.4801572",
"0.4801572",
"0.4801572",
"0.46374658",
"0.46280244",
"0.46024618",
"0.46024618",
"0.46024618",
"0.46024618",
"0.45948556",
"0.45816755",
"0.45816755",
"0.45816755",
"0.4581... | 0.76894385 | 0 |
Sets the standard_catalog_count of this IaasUcsdManagedInfraAllOf. | def standard_catalog_count(self, standard_catalog_count):
self._standard_catalog_count = standard_catalog_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def container_catalog_count(self, container_catalog_count):\n\n self._container_catalog_count = container_catalog_count",
"def bm_catalog_count(self, bm_catalog_count):\n\n self._bm_catalog_count = bm_catalog_count",
"def advanced_catalog_count(self, advanced_catalog_count):\n\n self._adva... | [
"0.57423514",
"0.5616781",
"0.50827426",
"0.4542607",
"0.44935066",
"0.44344246",
"0.43874955",
"0.43789217",
"0.4358185",
"0.43167907",
"0.43059853",
"0.4270202",
"0.42586276",
"0.4214198",
"0.42093727",
"0.4138831",
"0.41344634",
"0.41310257",
"0.41012546",
"0.40627837",
"0... | 0.81387305 | 0 |
Sets the vdc_count of this IaasUcsdManagedInfraAllOf. | def vdc_count(self, vdc_count):
self._vdc_count = vdc_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vm_count(self, vm_count):\n\n self._vm_count = vm_count",
"def vm_count(self, vm_count):\n\n self._vm_count = vm_count",
"def set_cpu_count(self, nVmCpuCount):\n\t\tcall_sdk_function('PrlVmCfg_SetCpuCount', self.handle, nVmCpuCount)",
"def set_count(self, count, asset=None):\n self._... | [
"0.5437181",
"0.5437181",
"0.531096",
"0.5136232",
"0.50647324",
"0.49089286",
"0.47968695",
"0.4710327",
"0.46992522",
"0.46300593",
"0.46219018",
"0.46113285",
"0.46049786",
"0.4604565",
"0.45997623",
"0.45524865",
"0.45503348",
"0.45477548",
"0.45165822",
"0.45023248",
"0.... | 0.7397312 | 0 |
Sets the vm_count of this IaasUcsdManagedInfraAllOf. | def vm_count(self, vm_count):
self._vm_count = vm_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_cpu_count(self, nVmCpuCount):\n\t\tcall_sdk_function('PrlVmCfg_SetCpuCount', self.handle, nVmCpuCount)",
"def vdc_count(self, vdc_count):\n\n self._vdc_count = vdc_count",
"def lun_count(self, lun_count):\n\n self._lun_count = lun_count",
"def vcpus(self, vcpus):\n self._vcpus = ... | [
"0.60274035",
"0.5922383",
"0.5739843",
"0.5628235",
"0.56280166",
"0.5574185",
"0.55255973",
"0.53965175",
"0.5285271",
"0.5197171",
"0.5193007",
"0.5076765",
"0.5026433",
"0.5026433",
"0.50207126",
"0.49862435",
"0.4984859",
"0.49740753",
"0.4924906",
"0.49171144",
"0.49162... | 0.7385598 | 1 |
Sets the guid of this IaasUcsdManagedInfraAllOf. | def guid(self, guid):
self._guid = guid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def guid(self, guid):\n self._guid = guid",
"def cmd_set_guid(argv,o):\n LibIBOpts.setup(o);\n (args,values) = o.parse_args(argv);\n lib = LibIBOpts(o,args,values,3,(tmpl_target,tmpl_int,tmpl_port_guid));\n\n if len(values) != 3:\n raise CmdError(\"Not enough arguments\");\n\n with l... | [
"0.5373949",
"0.5280875",
"0.46020597",
"0.45552626",
"0.4523249",
"0.45016184",
"0.43972918",
"0.4326833",
"0.42316926",
"0.42313373",
"0.4229026",
"0.42265818",
"0.4208345",
"0.4155647",
"0.41291952",
"0.41291952",
"0.41068876",
"0.4092342",
"0.40804192",
"0.40481693",
"0.4... | 0.5306522 | 3 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, IaasUcsdManagedInfraAllOf):
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, IaasUcsdManagedInfraAllOf):
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.84560555",
"0.83913696",
"0.8143685",
"0.81403786",
"0.8131871",
"0.8093231",
"0.80915105",
"0.80915105",
"0.80915105",
"0.8084564",
"0.8084564",
"0.8075547",
"0.8075547",
"0.8065006",
"0.80417657",
"0.80417657",
"0.80417657",
"0.80417657",
"0.80417657",
"0.80417657",
"0.8... | 0.0 | -1 |
Restore a checkpoint into ``state`` and returns the rng state dicts (if ``load_weights_only`` is False). | def _restore_checkpoint(
state: State,
logger: Logger,
composer_states_filepath: str,
extracted_rank_n: bool,
extracted_checkpoint_folder: Optional[str],
load_weights_only: bool,
strict_model_weights: bool,
ignore_keys: Optional[Union[List[str], Callable[[Dict], None]]],
exclude_algo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _restore_training_state(self, restore_state):\n self.load_state_dict(restore_state[\"model\"])\n self.optimizer.load_state_dict(restore_state[\"optimizer\"])\n self.lr_scheduler.load_state_dict(restore_state[\"lr_scheduler\"])\n start_iteration = restore_state[\"iteration\"] + 1\n ... | [
"0.73388803",
"0.72150517",
"0.7131705",
"0.70134574",
"0.6997281",
"0.6942888",
"0.6694779",
"0.6665034",
"0.6642213",
"0.66123784",
"0.65712357",
"0.65587157",
"0.6545347",
"0.6525875",
"0.65182793",
"0.6469714",
"0.64419687",
"0.64180094",
"0.63763607",
"0.63705903",
"0.63... | 0.6288278 | 24 |
Returns the distance between the current entity and the given (x, y) coordinate. | def distance(self, x: int, y: int) -> float:
return math.sqrt((x - self.x) ** 2 + (y - self.y) ** 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def distance_to(self, x, y):\n\t\tdx = x - self.x\n\t\tdy = y - self.y\n\t\treturn math.sqrt((dx**2)+(dy**2))",
"def distance_from_center(self, x: int, y: int) -> float:\n width, height = self.width, self.height\n dis = distance(x, y, width/2, height/2)\n return dis",
"def distance(self, x... | [
"0.81523913",
"0.7383806",
"0.72868764",
"0.7262011",
"0.7195622",
"0.7163461",
"0.7131348",
"0.71239984",
"0.71239984",
"0.71239984",
"0.71239984",
"0.71239984",
"0.71239984",
"0.71239984",
"0.7074517",
"0.70256484",
"0.7024614",
"0.70112294",
"0.68983996",
"0.6831905",
"0.6... | 0.7916495 | 1 |
Maximum output length supported by the decoder. | def max_positions(self):
if self.embed_positions is None:
return self.max_target_positions
return min(self.max_target_positions, self.embed_positions.max_positions) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def len_max(self):\n return 16 + 16 + 8 + 8 + Tools.bin_to_dec(self.get_data_size()) + Tools.bin_to_dec(self.get_verification_size())",
"def setMaxOutputLength(self, value):\n return self._set(maxOutputLength=value)",
"def setMaxOutputLength(self, value):\n return self._set(maxOutputLength... | [
"0.7432989",
"0.73925817",
"0.73925817",
"0.73925817",
"0.7161096",
"0.71449983",
"0.70124006",
"0.69647205",
"0.69551724",
"0.69273204",
"0.68699276",
"0.68549514",
"0.684077",
"0.68397105",
"0.68026745",
"0.6781775",
"0.67704415",
"0.6759464",
"0.6752665",
"0.6748612",
"0.6... | 0.0 | -1 |
Gets the assigned_user of this Workitems. | def assigned_user(self):
return self._assigned_user | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def assignee(self):\n membership = UnitMembershipFactory(unit=self.unit)\n return membership.user",
"def assigned_to(self) -> Optional[str]:\n return pulumi.get(self, \"assigned_to\")",
"def assigned_to(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"assigned_to\")... | [
"0.70582396",
"0.70253783",
"0.68387794",
"0.6594624",
"0.64337957",
"0.63194",
"0.62276447",
"0.61899453",
"0.61852264",
"0.617757",
"0.617757",
"0.6168088",
"0.6168088",
"0.6166981",
"0.612094",
"0.6104734",
"0.6104734",
"0.6104734",
"0.6104734",
"0.606838",
"0.60127085",
... | 0.8579693 | 0 |
Sets the assigned_user of this Workitems. | def assigned_user(self, assigned_user):
self._assigned_user = assigned_user | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def assigned_by_user(self, assigned_by_user):\n\n self._assigned_by_user = assigned_by_user",
"def assigned_user(self):\n return self._assigned_user",
"def assign_user_to_issue(self, issue, JIRAUsername):\r\n # TODO: Review docs\r\n self.jira.assign_issue(issue=issue, assignee=JIRAUsern... | [
"0.8350922",
"0.68189096",
"0.5876797",
"0.58575225",
"0.57323456",
"0.56373864",
"0.56373864",
"0.55778617",
"0.55627865",
"0.55390745",
"0.55118716",
"0.55098593",
"0.54444087",
"0.54271966",
"0.54271966",
"0.54271966",
"0.54271966",
"0.54271966",
"0.54271966",
"0.54271966",
... | 0.85572076 | 0 |
Gets the author of this Workitems. | def author(self):
return self._author | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_author(self):\n return self.author",
"def get_author(self):\n return self.author",
"def author(self):\n return self._changeset.get('author', None)",
"def author(self):\r\n return self.user",
"def author(self) -> str:\n return self._author",
"def author(self) -> ... | [
"0.81033164",
"0.81033164",
"0.7832732",
"0.7830362",
"0.77745897",
"0.77745897",
"0.7709737",
"0.766907",
"0.76471317",
"0.7558222",
"0.7392863",
"0.7310641",
"0.7100226",
"0.7055616",
"0.69088775",
"0.68823814",
"0.6879495",
"0.68097967",
"0.667739",
"0.6604308",
"0.6585194... | 0.7929328 | 4 |
Sets the author of this Workitems. | def author(self, author):
self._author = author | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_author (self, author):\n self.author = author",
"def set_author(self, author):\n self.author = author\n self.opf.author = author",
"def author(self, author):\n\n self._author = author",
"def author(self, author):\n\n self._author = author",
"def author(self, autho... | [
"0.7831896",
"0.7744839",
"0.7661029",
"0.7661029",
"0.76171625",
"0.7417469",
"0.73834866",
"0.723238",
"0.7022792",
"0.69591576",
"0.69440097",
"0.6846459",
"0.6799037",
"0.6625127",
"0.654796",
"0.6416991",
"0.6416991",
"0.64145887",
"0.6382336",
"0.6332261",
"0.6310402",
... | 0.7739136 | 2 |
Gets the developer of this Workitems. | def developer(self):
return self._developer | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def developer(self):\n return self.proto.creator",
"def get_maintainer(self):\n return self.paragraphs[0].get(\"Maintainer\")",
"def technical_owner(self):\n return self._technical_owner",
"def user(self):\n return self._project.user",
"def is_developer(self):\n\n return ... | [
"0.6467594",
"0.6383037",
"0.59011614",
"0.58858037",
"0.5882263",
"0.58464813",
"0.58373034",
"0.58373034",
"0.58332425",
"0.5788284",
"0.5727513",
"0.5696962",
"0.5679556",
"0.5662634",
"0.56608135",
"0.5650917",
"0.5645489",
"0.5638031",
"0.56320435",
"0.5630453",
"0.56304... | 0.77347624 | 0 |
Sets the developer of this Workitems. | def developer(self, developer):
self._developer = developer | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def developer_certificate_identity(self, developer_certificate_identity):\n\n self._developer_certificate_identity = developer_certificate_identity",
"def developer(self):\n return self._developer",
"def set_maintainer(self, maintainer):\n self.paragraphs[0][\"Maintainer\"] = maintainer",
... | [
"0.6069986",
"0.6056044",
"0.5680614",
"0.5558243",
"0.5480942",
"0.5418043",
"0.53070056",
"0.5263238",
"0.51771384",
"0.51729125",
"0.5170096",
"0.51270753",
"0.50323236",
"0.50323236",
"0.5031481",
"0.49122766",
"0.48889783",
"0.4874513",
"0.48558733",
"0.4839325",
"0.4819... | 0.78007984 | 0 |
Gets the module of this Workitems. | def module(self):
return self._module | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_module(self):\n return self.module",
"def module(self):\n return self.lib.module",
"def module(self) -> Optional[Module]:\n return self._module",
"def get_module_name(self):\n return self.module_name",
"def get_module(self, name: str) -> ModuleInstance:\n return s... | [
"0.7658881",
"0.7166972",
"0.7157267",
"0.66238433",
"0.6583515",
"0.6492179",
"0.6423812",
"0.63698703",
"0.63572747",
"0.6329867",
"0.63244796",
"0.6299108",
"0.62677187",
"0.62471384",
"0.62409633",
"0.6178302",
"0.61514336",
"0.6147349",
"0.6082053",
"0.603593",
"0.597129... | 0.7441217 | 5 |
Gets the status of this Workitems. | def status(self):
return self._status | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def status(self) -> pulumi.Output['outputs.JobStatus']:\n return pulumi.get(self, \"status\")",
"def getStatus(self):\n return self._status",
"def get_status(self):\n return self._status",
"def getStatus(self):\n return self.__status",
"def status(self):\n return self._ge... | [
"0.7593097",
"0.75146943",
"0.74803483",
"0.74482",
"0.74374527",
"0.74322176",
"0.742835",
"0.7412562",
"0.73759395",
"0.73736787",
"0.7371924",
"0.7368407",
"0.7368407",
"0.7368407",
"0.73665434",
"0.73664135",
"0.73664135",
"0.73664135",
"0.7341932",
"0.7341932",
"0.731509... | 0.73683554 | 34 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, Workitems):
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.80886984",
"0.80886984",
"0.8055307",
"0.7983415",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
"0.79673034",
... | 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 |
Set up the X axis, including scaling, labels and max/min values | def setupXAxis(plot, minVal, maxVal, label, logarithmic):
plot.set_xlabel(label)
if logarithmic:
plot.set_xscale("log")
plot.set_xlim(minVal, maxVal)
# plot.set_xscale('log', basex=2)
# tickLabels = [1]
# labelValue = minVal
# while labelValue <= maxVal:
# ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __draw_xaxis(self):\n self.ax.set_xlim(self.xlims)\n # put x ticks on top\n xticks = [1]\n xticks.extend(range(5, self.xmax+5, 5))\n fs = self.settings.rcParams[\"axes.labelsize\"] if self.settings.otherParams[\n \"xlabel.fontsize\"] is None else self.settings.othe... | [
"0.76962334",
"0.7142678",
"0.70777565",
"0.7023679",
"0.6677621",
"0.66705173",
"0.6669855",
"0.66405183",
"0.65903085",
"0.6455307",
"0.64306533",
"0.64306533",
"0.6370854",
"0.6364356",
"0.62985694",
"0.6293797",
"0.6283952",
"0.62325585",
"0.6220945",
"0.61975974",
"0.617... | 0.7718785 | 0 |
Format a number in engineering format, where the exponent is a multiple of 3 | def engFormat(f):
if f == 0.0:
value = 0.0
exponent = 0
else:
exponent = math.log10(-f if f < 0 else f)
if exponent < 0:
exponent = -int(math.ceil(-exponent))
else:
exponent = int(math.floor(exponent))
for i in range(3):
if (exp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_engineering( number, unit = \"\" ):\n if math.isnan(number):\n return \"nan\"\n if number == 0.0:\n return 0\n\n convert_table = {-18:'a', -15:'f', -12:'p', -9:'n', -6:'u',\n -3:'m', -2:'c', -1:'d', 0:'', 3:'k',\n 6:'M', 9:'G', 12... | [
"0.7254678",
"0.6709356",
"0.65849704",
"0.6535096",
"0.64507467",
"0.64036494",
"0.63798475",
"0.6357471",
"0.6309954",
"0.6143084",
"0.61399496",
"0.6122176",
"0.61172795",
"0.6037605",
"0.59719115",
"0.5958524",
"0.58732384",
"0.5864186",
"0.5839863",
"0.5835042",
"0.58245... | 0.6764551 | 1 |
Find a good value for the maximum on the Y axis | def computeGoodMax(totalTimes, noerrs):
# Could allow a small amount of space above the top, but it's annnoying for percentages!
# return None
factor = 1.00
maxReading = factor * max(
[max([v for v in l if v != None]) for l in list(totalTimes.values())]
)
if maxReading == 0:
maxR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y_max(self):\n return self.get_max_value(self.Y_INDEX)",
"def get_y_max(self):\n if len(self._statDict) == 0:\n return -1E10\n\n line_id_list = self._statDict.keys()\n max_y = self._statDict[line_id_list[0]][3]\n for i_plot in range(1, len(line_id_list)):\n ... | [
"0.8277419",
"0.8052967",
"0.78747857",
"0.7690648",
"0.7672491",
"0.7557933",
"0.74574304",
"0.7440886",
"0.7161742",
"0.70999867",
"0.69315743",
"0.6918759",
"0.6918502",
"0.6871075",
"0.68578976",
"0.68520427",
"0.6791778",
"0.67885953",
"0.6769947",
"0.67635864",
"0.67626... | 0.62784785 | 86 |
Turn runs of bad characters to have in a filename into a single underscore, remove any trailing underscore | def cleanFilename(fname):
return re.sub("_$", "", re.sub("[ _\n\t/()*,&:;@.]+", "_", fname)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scrub_underscore_suffix(filename):\n scrubbed = re.sub(r\"_[^_]+\\.\", \".\", filename)\n return scrubbed",
"def safe_filename(filename):\n string = str(filename).strip().replace(\" \", \"_\")\n string = re.sub(r\"(?u)[^-\\w.]\", \"_\", string)\n return re.sub(r\"_+\", \"_\", string)",
"def ... | [
"0.84402937",
"0.8271259",
"0.79155785",
"0.78541076",
"0.7842436",
"0.7829296",
"0.7724186",
"0.76734734",
"0.76034737",
"0.75659907",
"0.75494283",
"0.75451845",
"0.75305706",
"0.7522911",
"0.74923533",
"0.7423959",
"0.742056",
"0.7403071",
"0.73820186",
"0.7378246",
"0.737... | 0.8063518 | 2 |
Performs mutations on the children, stochastically, based on the mutation probability. | def _mutate(self, p_mutate, mutation):
self.children = mutation(self.children, p_mutate) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mutation(child_weights):\n for index, _ in enumerate(child_weights):\n # Add a chance for random mutation\n has_mutation = random.uniform(0, 1)\n if has_mutation <= .1:\n child_weights[index] *= random.randint(0, 5)",
"def __mutate(self, chromosomes, mutation_probability):\... | [
"0.7766687",
"0.7341522",
"0.7289419",
"0.7230715",
"0.7209466",
"0.7037261",
"0.6843733",
"0.674903",
"0.6699263",
"0.65760726",
"0.6472517",
"0.61829436",
"0.6166081",
"0.61597234",
"0.6155939",
"0.60983205",
"0.6072234",
"0.60406685",
"0.6036837",
"0.598226",
"0.5959217",
... | 0.71829987 | 5 |
Initialize the spacecraft and set its initial position | def __init__(self, ai_settings, screen):
super(Ship, self).__init__()
self.screen = screen
self.ai_settings = ai_settings
# Loading spacecraft image and obtaining its external rectangle
self.image = pygame.transform.rotate(pygame.image.load('images/soldier.png'), 90)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def init_position():\n __maze.init_position()",
"def _init(self, position):\n\t\tself._position = position",
"def __init__(self):\n self.position = 0",
"def __init__(self):\r\n self.position=(0,0)\r\n self.direction = 0.\r\n self.speed = 0\r\n self.state = 0\r\n p... | [
"0.73910457",
"0.6936796",
"0.69150186",
"0.6890182",
"0.6856978",
"0.6777854",
"0.6660125",
"0.66269314",
"0.6598146",
"0.65341693",
"0.6520882",
"0.64898777",
"0.6488802",
"0.6433804",
"0.6430992",
"0.6425387",
"0.63644",
"0.63239896",
"0.63174313",
"0.63057685",
"0.6294312... | 0.60956055 | 43 |
Center the ship on the screen | def center_ship(self):
self.center = self.screen_rect.centerx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def center_ship(self):\n self.center = self.screen_rect.centerx",
"def center_ship(self):\n self.center = self.screen_rect.centerx",
"def center_ship(self):\n self.center = self.screen_rect.centerx",
"def center_ship(self):\n # Start each new ship at the bottom center\n sel... | [
"0.90181214",
"0.90181214",
"0.90181214",
"0.8599386",
"0.77910644",
"0.761576",
"0.7553747",
"0.7458518",
"0.7252782",
"0.72375983",
"0.7168899",
"0.71423084",
"0.7113291",
"0.7064254",
"0.7018259",
"0.6994591",
"0.6934956",
"0.69271857",
"0.6910503",
"0.69049215",
"0.690492... | 0.90641564 | 1 |
Attach a lot of summaries to a Tensor (for Tensorboard visualization). | def variable_summaries(var):
with tf.name_scope('summaries'):
mean = tf.reduce_mean(var)
tf.summary.scalar('mean', mean)
with tf.name_scope('stddev'):
stddev = tf.sqrt(tf.reduce_mean(tf.square(var - mean)))
tf.summary.scalar('stddev', stddev)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_summary(self):\n for k, v in self.metrics.items():\n tf.summary.scalar(k, v)\n \n self.summary_op = tf.summary.merge_all()",
"def build_summaries(self):\n\n # Loss summary.\n tf.summary.scalar('loss', self.loss)\n\n merged = tf.summary.merge_all()\n self.summary_op = merged\n ... | [
"0.7055453",
"0.69594884",
"0.69594884",
"0.679989",
"0.6766926",
"0.67630017",
"0.6671678",
"0.6671673",
"0.6623029",
"0.6601337",
"0.6584152",
"0.6577044",
"0.6568252",
"0.65088475",
"0.6503359",
"0.6411265",
"0.64072824",
"0.63004506",
"0.6281558",
"0.62347925",
"0.6217481... | 0.56149787 | 77 |
Computes the average precision at k. This function computes the average prescision at k between two lists of items. | def apk(actual, predicted, k=10):
if len(predicted) > k:
predicted = predicted[:k]
score = 0.0
num_hits = 0.0
for i, p in enumerate(predicted):
if p in actual and p not in predicted[:i]:
num_hits += 1.0
score += num_hits / (i + 1.0)
# if not actual:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def precision_at_k(r, k):\n assert k >= 1\n r = np.asarray(r)[:k] != 0\n if r.size != k:\n raise ValueError('Relevance score length < k')\n return np.mean(r)",
"def precision_at_k(r, k):\n assert k >= 1\n r = np.asarray(r)[:k] != 0\n if r.size != k:\n raise ValueError('Relevance sco... | [
"0.7475594",
"0.74314404",
"0.7328193",
"0.7280659",
"0.7271064",
"0.7129832",
"0.7087148",
"0.6987466",
"0.69284856",
"0.6889254",
"0.68219167",
"0.6814678",
"0.68059695",
"0.6796172",
"0.6774947",
"0.6767025",
"0.6767025",
"0.676344",
"0.66914594",
"0.6675632",
"0.66103244"... | 0.6196564 | 36 |
Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. | def add_header(r):
r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
r.headers["Pragma"] = "no-cache"
r.headers["Expires"] = "0"
r.headers['Cache-Control'] = 'public, max-age=0'
return r | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_header(response):\n response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n response.headers['Cache-Control'] = 'public, max-age=60'\n return response",
"def add_header(response):\n response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n response.headers['Cache-Control'] = 'public, m... | [
"0.82235825",
"0.82227623",
"0.82227623",
"0.82227623",
"0.82227623",
"0.8196081",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",
"0.81635857",... | 0.712861 | 62 |
Removes the object from this world. | def remove_object(self, object_to_be_removed):
Map.remove_object(object_to_be_removed)
object_to_be_removed.query.delete() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_obj(self, obj_name):\n self.scene.remove_world_object(obj_name)",
"def remove(self):\n self._world.remove_mob(self)",
"def remove_object(self, name):\n if name in self._objects:\n del self._objects[name]\n else:\n raise ValueError('Object {} not in s... | [
"0.8095782",
"0.7762199",
"0.7431813",
"0.7195679",
"0.7184229",
"0.7052576",
"0.69814664",
"0.6966261",
"0.6925698",
"0.69233143",
"0.6888144",
"0.6798792",
"0.673691",
"0.6721849",
"0.6594416",
"0.65179706",
"0.65097326",
"0.6495488",
"0.6477363",
"0.6472084",
"0.6472084",
... | 0.6862572 | 11 |
Invalidates the canvas to allow cairo to redraw | def invalidate_canvas(self):
if self.window:
x, y, w, h = self.get_allocation()
self.window.invalidate_rect((0,0,w,h), False)
self.cr = self.window.cairo_create()
self.cr.update_layout(self.pg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def undraw(self):\n \n if not self.canvas: return\n if not self.canvas.isClosed():\n #self.canvas.delete(self.id)\n _tkExec(self.canvas.delete, self.id)\n if self.canvas.autoflush:\n #_root.update()\n _tkCall(_root.update)\n ... | [
"0.7170448",
"0.70177877",
"0.6811474",
"0.67474014",
"0.6741104",
"0.65798086",
"0.6572473",
"0.651364",
"0.64646524",
"0.6450033",
"0.64039034",
"0.6386848",
"0.6327218",
"0.62746847",
"0.62502813",
"0.6237061",
"0.6207101",
"0.612459",
"0.6124122",
"0.6107939",
"0.6056458"... | 0.8453374 | 0 |
Test if notes are sorted by start time. | def testSortedNotes(self):
for simple_score in self.simple_scores.values():
notes = simple_score.sorted_notes
assert all(notes[i].start_time <= notes[i + 1].start_time
for i in range(len(notes) - 1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _can_add_note(self, start_step):\n return self.last_on is None or start_step - self.offset > self.last_on",
"def order_by_start(self):\n return self.order_by(\"start_time\")",
"def cmpBeginDate(artist1, artist2):\n return int(artist1['BeginDate']) < int(artist2['BeginDate'])",
"def cmpArtist... | [
"0.61224854",
"0.5865765",
"0.57295513",
"0.55280834",
"0.5441577",
"0.5399074",
"0.53915083",
"0.5378046",
"0.5370285",
"0.53318506",
"0.53177214",
"0.52837706",
"0.52716595",
"0.52472234",
"0.5236269",
"0.52277195",
"0.52230084",
"0.5207091",
"0.5160097",
"0.51134276",
"0.5... | 0.74918807 | 0 |
Return a table with model metrics as columns | def metrics_dt(m, datasets, add_eval_metrics={"auc": cem.auc, "auprc": cem.auprc}):
data = [{"dataset": k, **eval_model(m, d, add_eval_metrics)} for k, d in datasets.items()]
colorder = ["dataset"] + m.metrics_names + list(add_eval_metrics.keys())
return pd.DataFrame(data)[colorder] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_performance_table(self):\n table = Table()\n table.add_column(\"Classifier\", ratio=25)\n table.add_column(\"Score\", ratio=10, justify=\"center\", no_wrap=True)\n table.add_column(\"Params\", ratio=25, no_wrap=False)\n table.add_column(\"Model ID\",ratio=40, no_wrap=... | [
"0.68475515",
"0.67694277",
"0.6301734",
"0.62993044",
"0.6283047",
"0.6254017",
"0.6179174",
"0.6083647",
"0.6063116",
"0.6007498",
"0.60040426",
"0.5994601",
"0.5992395",
"0.5990162",
"0.5973742",
"0.5968707",
"0.59684587",
"0.5965415",
"0.595515",
"0.59278136",
"0.59160846... | 0.56586915 | 53 |
From a filename, extracts the first part of the filename as the possible name of a family of files; e.g. from 'ts_Amon_bcccsm11_amip_r1i1p1_197901200812.nc' extract and return 'ts_Amon_bcccsm11_amip_r1i1p1'. To distinguish between the end of a file family name and the beginning of the filespecific part of the filename,... | def extract_filefamilyname( self, filename ):
matchobject = re.search( r"^.*_\d\d", filename )
if matchobject is None:
return filename
else:
familyname = filename[0:(matchobject.end()-3)]
return familyname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reFileName(str_):\n rv = 'None', str_\n m = re.match(r'((?:[a-zA-Z0-9-]){4,})_(.*)$', str_)\n if m:\n rv = m.group(1), m.group(2)\n else:\n m = re.match(r'(\\d+-\\d+)\\.-\\.(.*)$', str_)\n if m:\n rv = m.group(1), m.group(2)\n return rv",
"def parse_rarefaction_... | [
"0.7018564",
"0.68886405",
"0.6759327",
"0.6749364",
"0.6716706",
"0.6699516",
"0.6672866",
"0.66605604",
"0.6640363",
"0.65921485",
"0.6585",
"0.65480256",
"0.6478625",
"0.64543766",
"0.64543766",
"0.6446561",
"0.6443001",
"0.64351195",
"0.6385604",
"0.6374533",
"0.6354233",... | 0.7713043 | 0 |
Return objects for the current authenticated user only | def get_queryset(self):
assigned_only = bool(
int(self.request.query_params.get('assigned_only', 0))
)
queryset = self.queryset
if assigned_only:
queryset = queryset.filter(recipe__isnull=False)
return queryset.filter(user=self.request.user).order_by('-na... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_queryset(self):\n return super().get_queryset().filter(user=self.request.user)",
"def get_queryset(self, request):\n qs = super().get_queryset(request)\n return qs.filter(user=request.user)",
"def get_queryset(self, *args, **kwargs):\n qs = super().get_queryset(*args, **kwar... | [
"0.8128217",
"0.81258285",
"0.7882456",
"0.78440523",
"0.7745406",
"0.7604245",
"0.7604245",
"0.7497975",
"0.7315406",
"0.7285781",
"0.7250722",
"0.7198163",
"0.71906906",
"0.71667135",
"0.7160965",
"0.7144866",
"0.7118433",
"0.7115828",
"0.7115828",
"0.7115828",
"0.71137464"... | 0.0 | -1 |
the number of rows in table | def rowCount(self, index):
return len(self._data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getNumRows(self) -> int:\n ...",
"def num_rows(self):\n return (len(self.rows))",
"def row_count(self) -> int:\n return len(self.rows)",
"def row_count(self) -> int:\n return len(self.rows)",
"def num_rows(self):\n return len(self.rows)",
"def rows_count(self):\n ... | [
"0.8705973",
"0.8478985",
"0.84346503",
"0.84346503",
"0.837452",
"0.8211421",
"0.8197341",
"0.81781596",
"0.8164352",
"0.8141076",
"0.8087774",
"0.80864626",
"0.807266",
"0.8067912",
"0.8066846",
"0.79875976",
"0.79777974",
"0.7970405",
"0.79507315",
"0.7892005",
"0.7889868"... | 0.7413387 | 47 |
the number of rows in table | def rowCount(self, index):
return 3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getNumRows(self) -> int:\n ...",
"def num_rows(self):\n return (len(self.rows))",
"def row_count(self) -> int:\n return len(self.rows)",
"def row_count(self) -> int:\n return len(self.rows)",
"def num_rows(self):\n return len(self.rows)",
"def rows_count(self):\n ... | [
"0.8705973",
"0.8478985",
"0.84346503",
"0.84346503",
"0.837452",
"0.8211421",
"0.8197341",
"0.81781596",
"0.8164352",
"0.8141076",
"0.8087774",
"0.80864626",
"0.807266",
"0.8067912",
"0.8066846",
"0.79875976",
"0.79777974",
"0.7970405",
"0.79507315",
"0.7892005",
"0.7889868"... | 0.7160755 | 63 |
returns the number of vertices of a graph | def num_vertices(self):
return len(self.__graph_dict.keys()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_num_vertices(self):\n\n return self._graph_state.get_num_vertices()",
"def num_vertices(self):\n return self._top_exp.number_of_vertices()",
"def n_vertices(self):\n try: \n return self._n_vertices\n except AttributeError:\n self._n_vertices = 0\n ... | [
"0.8294428",
"0.82162774",
"0.8099264",
"0.8084873",
"0.8084873",
"0.80744034",
"0.80422086",
"0.7976934",
"0.79424685",
"0.79383194",
"0.7920504",
"0.7877179",
"0.7767539",
"0.7748465",
"0.7637932",
"0.75549054",
"0.74742794",
"0.7297782",
"0.72895753",
"0.7250115",
"0.72318... | 0.8577807 | 0 |
returns the number of edges of a graph | def num_edges(self):
return len(self.__generate_edges()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_num_edges(graph):\n # return the number of edges\n return sum([len(graph[source_node].keys()) for source_node in graph.keys()]) / 2",
"def num_of_edge(self):\n try:\n return self.edges\n except:\n print(\"ERROR: No graph exists\")",
"def number_of_e... | [
"0.8555402",
"0.84465003",
"0.83987844",
"0.8311189",
"0.8286456",
"0.825919",
"0.8178529",
"0.8159551",
"0.8123871",
"0.8040028",
"0.80336994",
"0.8014446",
"0.8012517",
"0.79744923",
"0.7944467",
"0.78664666",
"0.78160673",
"0.7815068",
"0.775783",
"0.77435327",
"0.7735299"... | 0.8191377 | 6 |
If the vertex "vertex" is not in self.__graph_dict, a key "vertex" with an empty list as a value is added to the dictionary. Otherwise nothing has to be done. | def add_vertex(self, vertex):
if vertex not in self.__graph_dict:
self.__graph_dict[vertex] = {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_vertex(self, vertex):\n if vertex not in self.graph_dict:\n self.graph_dict[vertex] = []",
"def add_vertex(self, vertex):\n if vertex not in self.__graph_dict:\n self.__graph_dict[vertex] = []",
"def add_vertex(self, vertex):\n if vertex not in self.__graph_di... | [
"0.8620155",
"0.85858893",
"0.85858893",
"0.8486344",
"0.8405291",
"0.77837217",
"0.7466885",
"0.74570274",
"0.7251097",
"0.719812",
"0.71429664",
"0.70753896",
"0.70753896",
"0.6962258",
"0.6887333",
"0.68829846",
"0.6833113",
"0.67997783",
"0.6796253",
"0.67158026",
"0.6710... | 0.8476053 | 4 |
Check whether `obj` inherits from Boost.Python.enum. | def is_boost_enum(obj: Any) -> bool:
for cls in type(obj).__bases__:
if "Boost.Python.enum" in str(cls):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_enum(schema_obj):\n\n return (isinstance(schema_obj, schema.Enum) or\n (isinstance(schema_obj, schema.Field) and schema_obj.enum_type))",
"def is_enum(self):\n return False",
"def is_enum(self):\n return self.is_complex and not self.is_class",
"def inherits_from(obj, a_class):\... | [
"0.7379043",
"0.6682498",
"0.6575283",
"0.63988435",
"0.6314002",
"0.63092816",
"0.6300783",
"0.62994534",
"0.62766397",
"0.6261479",
"0.6242206",
"0.6231385",
"0.6226024",
"0.62231505",
"0.6219832",
"0.6219832",
"0.6207228",
"0.61851394",
"0.61775",
"0.6171979",
"0.6163057",... | 0.8621327 | 0 |
Check whether `obj` is instance of Boost.Python.enum. | def is_boost_class(obj: Any) -> bool:
return "Boost.Python.class" in str(type(obj)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_boost_enum(obj: Any) -> bool:\n for cls in type(obj).__bases__:\n if \"Boost.Python.enum\" in str(cls):\n return True\n return False",
"def is_enum(schema_obj):\n\n return (isinstance(schema_obj, schema.Enum) or\n (isinstance(schema_obj, schema.Field) and schema_obj.enum_... | [
"0.84022284",
"0.76667625",
"0.67724174",
"0.66248685",
"0.63890505",
"0.63192445",
"0.61951196",
"0.6047925",
"0.60392463",
"0.6001024",
"0.59998184",
"0.59177816",
"0.5839826",
"0.58214223",
"0.5817479",
"0.5814377",
"0.5801613",
"0.5796566",
"0.5784162",
"0.5746553",
"0.57... | 0.6009498 | 9 |
Returns a random part of a string. Returns a random part of a string s that has a given length. | def get_random_string(string, length):
words = string.split()
random_part = random.randint(0, len(words) - length)
return "".join(words[random_part : random_part + length]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def my_random_string(string_length=17):\n random = str(uuid.uuid4())\n random = random.upper() \n random = random.replace(\"-\",\"\")\n return random[0:string_length]",
"def random_string(length=8, chars=string.ascii_letters + string.digits):\n return ''.join([chars[random.randint(0, len(chars) - ... | [
"0.72976446",
"0.7289028",
"0.72863644",
"0.7257486",
"0.7251793",
"0.7228094",
"0.7225105",
"0.72134733",
"0.72119886",
"0.72024626",
"0.72024626",
"0.72007173",
"0.71958107",
"0.7194601",
"0.7194079",
"0.7183809",
"0.7183112",
"0.7173273",
"0.7160337",
"0.7153696",
"0.71514... | 0.7963441 | 0 |
Return a string representation of a given parameter. | def get_parameter_string(self, parameter):
if not self.has_converged or self.parameters is None:
return None
if parameter not in self.parameters:
return None
fmt = self.get_parameter_format(parameter)
unit = self.get_parameter_unit(parameter)
value = fmt ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n\n return \"<ExoParameter>: {0}\".format(self.__dict__)",
"def __repr_parameter__(self, name: str, value: Any) -> str:\n return f\"{name}={value!r}\"",
"def format_parameter(param, required):\n\n param_string = check_param(flatten_param(param))\n if not required:\n ... | [
"0.7343561",
"0.71605086",
"0.710844",
"0.69979465",
"0.69655436",
"0.6828032",
"0.67813796",
"0.6732115",
"0.67217475",
"0.6646251",
"0.66266364",
"0.65682906",
"0.656694",
"0.6539286",
"0.639672",
"0.63439494",
"0.6307336",
"0.62920564",
"0.628318",
"0.6257743",
"0.62439185... | 0.7855388 | 0 |
Method to return a custom logger with the given name and level | def my_custom_logger(logger_name, level=logging.INFO):
logger = logging.getLogger(logger_name)
logger.setLevel(level)
format_string = ('%(asctime)s, %(levelname)s, %(filename)s, %(message)s')
log_format = logging.Formatter(format_string)
# Creating and adding the console handler
console_handler ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_logger(name: str, level: str = LOG_LEVEL) -> logging.Logger:\n logger = logging.getLogger(name)\n logger.propagate = False\n logger.setLevel(level)\n coloredlogs.install(\n level=level, logger=logger, fmt='%(asctime)s %(name)s: %(lineno)s %(levelname)s: %(message)s', field_styles=FIELD_S... | [
"0.81156564",
"0.80115414",
"0.79588497",
"0.774673",
"0.77105635",
"0.7634092",
"0.7624498",
"0.76038194",
"0.75276273",
"0.74171513",
"0.73107415",
"0.7245147",
"0.72039235",
"0.71859866",
"0.71816105",
"0.7040017",
"0.7033277",
"0.6987893",
"0.69791347",
"0.69768167",
"0.6... | 0.73898995 | 10 |
Returns True if the server is running | def is_running(self):
return self._running | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ServerIsRunning( self ):\n return utils.ProcessIsRunning( self._gocode_handle )",
"def status(self):\n # process running ?\n pid = self.get_pidfile()\n \n running = True\n \n # process is not running\n if pid is None:\n running = False\n ... | [
"0.8809185",
"0.8009785",
"0.8002331",
"0.7958592",
"0.7890142",
"0.7879066",
"0.78770465",
"0.7851644",
"0.7850044",
"0.78008723",
"0.77929753",
"0.77749777",
"0.7774173",
"0.7757005",
"0.77514684",
"0.77514684",
"0.77514684",
"0.77452874",
"0.7717644",
"0.7717644",
"0.77032... | 0.7632167 | 26 |
Returns the quantization config for transformerbased models. | def _get_transformer_quantization_config(subset_size: int) -> Dict[str, Any]:
return {
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {"num_init_samples": subset_size, "type": DEFAULT_RANGE_TYPE},
"batchnorm_adaptation": {"num_bn_adaptation_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_default_quantization_config(preset: QuantizationPreset, subset_size: int) -> Dict[str, Any]:\n return {\n \"algorithm\": \"quantization\",\n \"preset\": preset.value,\n \"initializer\": {\n \"range\": {\"num_init_samples\": subset_size, \"type\": DEFAULT_RANGE_TYPE},\n ... | [
"0.66286147",
"0.5942934",
"0.5907931",
"0.5872018",
"0.5804783",
"0.57093644",
"0.56935316",
"0.5644522",
"0.56273764",
"0.5596549",
"0.5582015",
"0.55781955",
"0.5568165",
"0.5547753",
"0.5484123",
"0.54839206",
"0.54510504",
"0.5421256",
"0.54176253",
"0.5367854",
"0.53125... | 0.780377 | 0 |
Given positive int n and array P representing probabilities corresponding to an allel frequency, returns array B representing the expected allele frequency of the next generation | def ExpectedVal():
input = f.LoadFile('\\rosalind_ebin.txt').splitlines()
n = int(input[0])
P = [float(x) for x in input[1].split()]
B = [str(round(i*n,4)) for i in P]
f.ExportToFile('rosalind_ebin_output.txt',' '.join(B))
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def binomial(n: int, p: float) -> int:\n return sum(bernoulli_trial(p) for _ in range(n))",
"def bpmfln(k, n, p):\n bnm = np.empty_like(n, dtype=np.float64)\n logp = math.log(p)\n one_logp = math.log(1 - p)\n for i in range(len(k)):\n bnm[i] = math.exp(combinln(n[i], k[i... | [
"0.6789287",
"0.67728233",
"0.65926576",
"0.6576568",
"0.6520024",
"0.6460622",
"0.6324361",
"0.6279238",
"0.62723196",
"0.6234605",
"0.6230018",
"0.62065023",
"0.6202986",
"0.6180209",
"0.61650026",
"0.6157465",
"0.61489534",
"0.6131866",
"0.6128808",
"0.60880065",
"0.608400... | 0.0 | -1 |
Ensure that pytest's config.option.verbose is <= 0. | def nonverbose_config(config) -> Generator[None, None, None]:
if config.option.verbose <= 0:
yield
else:
saved = config.option.verbose
config.option.verbose = 0
yield
config.option.verbose = saved | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_valid_verbose(verbose: Any) -> None:\n check_verbose(verbose)",
"def test_verbose_non_bool_error(self):\n\n with pytest.raises(ValueError):\n\n BaseTransformer(verbose=1)",
"def test_invalid_verbose(verbose: Any) -> None:\n with pytest.raises(ValueError, match=r\".*Invalid verb... | [
"0.72909325",
"0.7116359",
"0.69435227",
"0.67122096",
"0.6585893",
"0.65532297",
"0.65245336",
"0.6418826",
"0.62999177",
"0.62315834",
"0.62073755",
"0.6173831",
"0.6169409",
"0.61526793",
"0.6150769",
"0.6149129",
"0.6140586",
"0.61110395",
"0.6096457",
"0.6042438",
"0.604... | 0.66538364 | 4 |
Return a copy of the dynamics estimate. | def copy(self):
dyn = type(self)(self._hyperparams)
dyn.Fm = np.copy(self.Fm)
dyn.fv = np.copy(self.fv)
dyn.dyn_covar = np.copy(self.dyn_covar)
return dyn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def copy(self):\n return MultivariateDerivative(self.variables.copy())",
"def get_estimate(self) -> np.ndarray:\n return self.fit_function(self.x, self.coefficients)",
"def estimate(self) -> None:\n pass",
"def derivative ( self ):\n return self.__derivative",
"def copy(self):\n... | [
"0.65137255",
"0.62424964",
"0.61908615",
"0.59357244",
"0.5865188",
"0.58616906",
"0.58283806",
"0.57059515",
"0.5626296",
"0.562039",
"0.56190413",
"0.56190413",
"0.56011146",
"0.5548338",
"0.5543138",
"0.5528686",
"0.54649377",
"0.54125106",
"0.5405548",
"0.540251",
"0.539... | 0.5863494 | 6 |
Compute curvature using 'triangle's circumscribed circle ' method. | def threeptscurv(x, y):
length = x.size
R = np.zeros(length)
cur = np.zeros(length)
for i in range(1, length-1):
a = np.sqrt((x[i+1]-x[i])**2 + (y[i+1]-y[i])**2)
b = np.sqrt((x[i+1]-x[i-1])**2 + (y[i+1]-y[i-1])**2)
c = np.sqrt((x[i]-x[i-1])**2 + (y[i]-y[i-1])**2)
p = (a+b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def curvature(self):\n return self.circle().curvature(self.o, self.r, p = self.a)",
"def curvature(self, t):\n dx = self.dx(t)\n dy = self.dy(t)\n dxx = self.dxx(t)\n dyy = self.dyy(t)\n return np.abs(dx * dyy - dy * dxx) / np.power(dx * dx + dy * dy, 1.5)",
"def curva... | [
"0.7887616",
"0.7790393",
"0.74798626",
"0.7411039",
"0.7347205",
"0.7338861",
"0.72747785",
"0.7150064",
"0.69930804",
"0.697757",
"0.6951256",
"0.6819586",
"0.6756915",
"0.6693438",
"0.6556853",
"0.64711803",
"0.64556247",
"0.63826823",
"0.63458794",
"0.6335935",
"0.6330669... | 0.56674206 | 41 |
Makes a dict that accumulates the values for each key in an iterator of doubles | def group_dict_set(iterator):
d = defaultdict(set)
for key, value in iterator:
d[key].add(value)
return dict(d) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_densities(densities):\n\n return {spin: sum(np.array(dens[spin]) for dens in densities) \n for spin in densities[0].keys()}",
"def build_histogram(iterator, key):\n buckets = defaultdict(int)\n values = {}\n\n num_objects = 0\n for obj in iterator:\n num_objects += 1\n\n ... | [
"0.6195448",
"0.5842633",
"0.5762505",
"0.5756769",
"0.5659886",
"0.5645777",
"0.5627008",
"0.5534746",
"0.5509884",
"0.55032265",
"0.54376537",
"0.54350764",
"0.54216063",
"0.5409323",
"0.540671",
"0.5402735",
"0.53859186",
"0.53531986",
"0.53487366",
"0.5334113",
"0.5327092... | 0.61645067 | 1 |
The set of arguments for constructing a BucketLifecycleConfigurationV2 resource. | def __init__(__self__, *,
bucket: pulumi.Input[str],
rules: pulumi.Input[Sequence[pulumi.Input['BucketLifecycleConfigurationV2RuleArgs']]],
expected_bucket_owner: Optional[pulumi.Input[str]] = None):
pulumi.set(__self__, "bucket", bucket)
pulumi.set(__s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__, *,\n bucket: Optional[pulumi.Input[str]] = None,\n expected_bucket_owner: Optional[pulumi.Input[str]] = None,\n rules: Optional[pulumi.Input[Sequence[pulumi.Input['BucketLifecycleConfigurationV2RuleArgs']]]] = None):\n if bucket is not N... | [
"0.5992038",
"0.5966955",
"0.5840128",
"0.564464",
"0.5369499",
"0.5274274",
"0.5194183",
"0.5058795",
"0.5053266",
"0.5050231",
"0.5019062",
"0.5004931",
"0.49637008",
"0.49507582",
"0.49400494",
"0.48740724",
"0.48440862",
"0.4800399",
"0.47935998",
"0.47795483",
"0.4777908... | 0.57040656 | 3 |
Name of the source S3 bucket you want Amazon S3 to monitor. | def bucket(self) -> pulumi.Input[str]:
return pulumi.get(self, "bucket") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s3_bucket_name(self):\n return self._get_param(\"ResourcesS3Bucket\")",
"def bucket_name(self) -> str:\n ...",
"def bucket_name(self) -> str:\n return pulumi.get(self, \"bucket_name\")",
"def s3_bucket(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"s3_bucket\")",
"d... | [
"0.7696654",
"0.7252698",
"0.7064286",
"0.70079666",
"0.6968253",
"0.6968253",
"0.6959447",
"0.6959447",
"0.6959447",
"0.6959447",
"0.6959447",
"0.67862225",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.676... | 0.6067084 | 47 |
Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error. | def expected_bucket_owner(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "expected_bucket_owner") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def expected_bucket_owner(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"expected_bucket_owner\")",
"def owner_account_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"owner_account_id\")",
"def owner_account_id(self) -> Optional[pulumi.Input[str]]:\n return ... | [
"0.7146499",
"0.6446139",
"0.6384591",
"0.6065642",
"0.5860553",
"0.5854814",
"0.58411705",
"0.581899",
"0.57273",
"0.57180434",
"0.5700793",
"0.5700793",
"0.5690769",
"0.5674292",
"0.5650694",
"0.56504285",
"0.5646915",
"0.5642213",
"0.5625961",
"0.5623262",
"0.56102705",
... | 0.70394754 | 1 |
Name of the source S3 bucket you want Amazon S3 to monitor. | def bucket(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "bucket") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s3_bucket_name(self):\n return self._get_param(\"ResourcesS3Bucket\")",
"def bucket_name(self) -> str:\n ...",
"def bucket_name(self) -> str:\n return pulumi.get(self, \"bucket_name\")",
"def s3_bucket(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"s3_bucket\")",
"d... | [
"0.7696654",
"0.7252698",
"0.7064286",
"0.70079666",
"0.6968253",
"0.6968253",
"0.6959447",
"0.6959447",
"0.6959447",
"0.6959447",
"0.6959447",
"0.67862225",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.676... | 0.5758498 | 98 |
Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error. | def expected_bucket_owner(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "expected_bucket_owner") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def expected_bucket_owner(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"expected_bucket_owner\")",
"def owner_account_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"owner_account_id\")",
"def owner_account_id(self) -> Optional[pulumi.Input[str]]:\n return ... | [
"0.7147683",
"0.6445131",
"0.63837475",
"0.6061159",
"0.5858455",
"0.5852843",
"0.583966",
"0.5817529",
"0.5723972",
"0.5716804",
"0.5698139",
"0.5698139",
"0.5686788",
"0.5675481",
"0.5651604",
"0.565157",
"0.564837",
"0.5641776",
"0.562609",
"0.5620628",
"0.5610478",
"0.5... | 0.7040738 | 2 |
Get an existing BucketLifecycleConfigurationV2 resource's state with the given name, id, and optional extra properties used to qualify the lookup. | def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
bucket: Optional[pulumi.Input[str]] = None,
expected_bucket_owner: Optional[pulumi.Input[str]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.I... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None,\n minimal_action: Optional[pulumi.Input[str]] = None,\n most_disruptive_allowed_action: Optional[pulumi.Input[str]] = None,\n name: Optional[pulumi.Input[str]... | [
"0.58018064",
"0.5353829",
"0.5117951",
"0.51060236",
"0.50312877",
"0.49301392",
"0.48632613",
"0.4778881",
"0.47655228",
"0.47473097",
"0.4707761",
"0.4704642",
"0.46908763",
"0.46863323",
"0.4678712",
"0.46439952",
"0.46264488",
"0.46231508",
"0.46105427",
"0.455522",
"0.4... | 0.7716009 | 0 |
Name of the source S3 bucket you want Amazon S3 to monitor. | def bucket(self) -> pulumi.Output[str]:
return pulumi.get(self, "bucket") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s3_bucket_name(self):\n return self._get_param(\"ResourcesS3Bucket\")",
"def bucket_name(self) -> str:\n ...",
"def bucket_name(self) -> str:\n return pulumi.get(self, \"bucket_name\")",
"def s3_bucket(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"s3_bucket\")",
"d... | [
"0.7696654",
"0.7252698",
"0.7064286",
"0.70079666",
"0.6968253",
"0.6968253",
"0.6959447",
"0.6959447",
"0.6959447",
"0.6959447",
"0.6959447",
"0.67862225",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.67652977",
"0.676... | 0.5934818 | 73 |
Account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error. | def expected_bucket_owner(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "expected_bucket_owner") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def expected_bucket_owner(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"expected_bucket_owner\")",
"def expected_bucket_owner(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"expected_bucket_owner\")",
"def owner_account_id(self) -> pulumi.Output[str]:\n ... | [
"0.7040738",
"0.7040738",
"0.6445131",
"0.63837475",
"0.6061159",
"0.5858455",
"0.5852843",
"0.583966",
"0.5817529",
"0.5723972",
"0.5716804",
"0.5698139",
"0.5698139",
"0.5686788",
"0.5675481",
"0.5651604",
"0.565157",
"0.564837",
"0.5641776",
"0.562609",
"0.5620628",
"0.5... | 0.7147683 | 0 |
Convert the bbox record to BBox2D objects. | def _convert_to_bbox2d(single_bbox):
label = single_bbox["label_id"]
bbox = single_bbox["bbox"]
canonical_bbox = BBox2D(
x=bbox[0], y=bbox[1], w=bbox[2], h=bbox[3], label=label
)
return canonical_bbox | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bbox2fields():\n bbox2label = {\n 'gt_bboxes': 'gt_labels',\n 'gt_bboxes_ignore': 'gt_labels_ignore'\n }\n bbox2mask = {\n 'gt_bboxes': 'gt_masks',\n 'gt_bboxes_ignore': 'gt_masks_ignore'\n }\n bbox2seg = {\n 'gt_bboxes': 'gt_semantic_seg',\n }\n return b... | [
"0.6832664",
"0.6783777",
"0.6691991",
"0.63218105",
"0.6319875",
"0.6284736",
"0.6246083",
"0.6223461",
"0.61668444",
"0.6120401",
"0.6079261",
"0.6019865",
"0.6007134",
"0.59077746",
"0.5902924",
"0.5898657",
"0.58965296",
"0.5879593",
"0.5847342",
"0.58367205",
"0.58200914... | 0.75232357 | 0 |
Return the average duration in seconds of a Python Bytes episode, as | def get_average_duration_episode_in_seconds(self) -> NamedTuple:
times = [ep.itunes_duration for ep in self.entries]
format_times = []
for time in times:
if not time.startswith('00'):
time = '0' + time
format_times.append(time)
dts = [datetime.st... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_wav_duration(wav_bytes: bytes) -> float:\n with io.BytesIO(wav_bytes) as wav_buffer:\n wav_file: wave.Wave_read = wave.open(wav_buffer, \"rb\")\n with wav_file:\n frames = wav_file.getnframes()\n rate = wav_file.getframerate()\n return frames / float(rate)"... | [
"0.67595243",
"0.65047795",
"0.64271915",
"0.64189667",
"0.6367844",
"0.6341444",
"0.6284898",
"0.6283205",
"0.6277745",
"0.62206906",
"0.62178415",
"0.6192925",
"0.6191467",
"0.6185916",
"0.61730164",
"0.6169899",
"0.61567783",
"0.6137445",
"0.6130938",
"0.6128692",
"0.61263... | 0.71605974 | 0 |
Construct a new BlockScanner object. | def __init__(self, current_char, source):
self.current_char = current_char
self.source = source | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, tokenGenerator):\r\n\r\n\t\tself._iterator = iter(tokenGenerator)\r\n\t\tself._stack = []\r\n\t\tself._tokenMarker = None\r\n\r\n\t\tstartToken = next(self._iterator)\r\n\t\tstartBlock = StartOfDocumentBlock(startToken)\r\n\r\n\t\tif (not isinstance(startToken, StartOfDocu... | [
"0.597456",
"0.5563696",
"0.53400904",
"0.5296141",
"0.52921337",
"0.5256663",
"0.52089673",
"0.5207816",
"0.5177261",
"0.51647526",
"0.51439065",
"0.51185596",
"0.5116297",
"0.50943065",
"0.507248",
"0.50681114",
"0.5063206",
"0.5055973",
"0.5041467",
"0.5037778",
"0.5036207... | 0.0 | -1 |
Play the next song in the queue. | def _next(verbose=0, quiet=False):
Spotify.request('me/player/next', method='POST')
if not quiet:
from cli.commands.status import status
status.callback(verbose=verbose)
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_media_next_track(self) -> None:\n cur_track_index = self._get_current_track_index()\n\n await self._table.active_playlist.play(\n self._table.active_playlist.tracks[cur_track_index + 1]\n )",
"async def next(self):\n await self._pytheos.api.player.play_next(... | [
"0.7804286",
"0.756156",
"0.7519215",
"0.7317698",
"0.7314149",
"0.72888863",
"0.713351",
"0.70998675",
"0.7088512",
"0.690234",
"0.68884444",
"0.6880905",
"0.68629616",
"0.6795466",
"0.67567676",
"0.6732975",
"0.6704325",
"0.6688262",
"0.6659063",
"0.66365665",
"0.6595123",
... | 0.57869184 | 94 |
Initialize a model object. | def __init__(self, classific_method="LogisticRegression"):
self.classific_method = classific_method | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_model(self):\n pass",
"def init_model(self):\n pass",
"def initialize_model(self):\n model = self.model_class()\n return model",
"def initialize(self, model):\n pass",
"def __init__(self, model):\n self._model = model",
"def __init__(self, model: o... | [
"0.8386426",
"0.82832724",
"0.81248385",
"0.8097535",
"0.80893433",
"0.78528905",
"0.77985805",
"0.7795144",
"0.7786414",
"0.7762771",
"0.7762771",
"0.7762771",
"0.7762771",
"0.7587415",
"0.7512679",
"0.7500231",
"0.7500231",
"0.7455408",
"0.736257",
"0.736257",
"0.730667",
... | 0.0 | -1 |
Returns the arm's desired velocity in workspace coordinates at time t. You should NOT simply take a finite difference of self.target_position() | def target_velocity(self, time):
x_v = self.w*self.r*cos(self.w*time)
y_v = -self.w*self.r*sin(self.w*time)
z_v = 0
# raise NotImplementedError
return np.array([x_v,y_v,z_v]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def target_velocity(self, time):\n return self.target(time, self.velocities, self.dt, self.num_way)",
"def target_velocity(self, time):\n return self.target(time, self.velocities, self.dt, self.num_way)",
"def target_velocity(self, time):\n path, path_time = self.get_current_path(time)\n ... | [
"0.7068331",
"0.7068331",
"0.70444334",
"0.7034289",
"0.6955907",
"0.68580544",
"0.6856776",
"0.6856776",
"0.67172503",
"0.6685114",
"0.66773754",
"0.6674364",
"0.66353154",
"0.66283923",
"0.6606402",
"0.65924555",
"0.65924555",
"0.6582541",
"0.6543292",
"0.6520295",
"0.65179... | 0.72390187 | 0 |
Reduce this Dataset's data by applying ``prod`` along some dimension(s). | def prod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.prod,
dim=dim,
skipna=ski... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prod(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.multiply.reduce(\n self, out=out, axis=axis, keepdims=keepdims, dtype=dtype\n )",
"def prod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | N... | [
"0.7481061",
"0.735098",
"0.714532",
"0.714532",
"0.700226",
"0.700226",
"0.6688766",
"0.65455145",
"0.65137213",
"0.64294696",
"0.6274849",
"0.6176995",
"0.6066634",
"0.59346235",
"0.5929033",
"0.591033",
"0.591033",
"0.591033",
"0.58753616",
"0.5752229",
"0.5747925",
"0.5... | 0.74074686 | 1 |
Reduce this Dataset's data by applying ``sum`` along some dimension(s). | def sum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.sum,
dim=dim,
skipna=skipn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.sum,\n dim=dim,\n ... | [
"0.69223887",
"0.68643904",
"0.68584",
"0.68099666",
"0.6725604",
"0.6725604",
"0.66675615",
"0.6634007",
"0.6546494",
"0.6546494",
"0.6421243",
"0.64142853",
"0.63628495",
"0.63059735",
"0.62661374",
"0.62658197",
"0.6225546",
"0.6212655",
"0.61623865",
"0.6143209",
"0.60457... | 0.70593727 | 0 |
Reduce this Dataset's data by applying ``cumsum`` along some dimension(s). | def cumsum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.cumsum,
dim=dim,
skipna=skipna,
numeric_only=True... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumsum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.cumsum,\n dim=dim,\n skipna=skipna,\n ... | [
"0.7537239",
"0.7537239",
"0.7537239",
"0.67484677",
"0.67069674",
"0.66436154",
"0.63819385",
"0.6350921",
"0.6343282",
"0.62725073",
"0.6268484",
"0.6268484",
"0.6268484",
"0.6262665",
"0.6262446",
"0.62461925",
"0.61838704",
"0.61838704",
"0.61838704",
"0.61028945",
"0.606... | 0.769945 | 2 |
Reduce this Dataset's data by applying ``cumprod`` along some dimension(s). | def cumprod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.cumprod,
dim=dim,
skipna=skipna,
numeric_only=Tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumprod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.cumprod,\n dim=dim,\n skipna=skipna,\n ... | [
"0.78994447",
"0.78994447",
"0.78994447",
"0.70834005",
"0.7032063",
"0.69815505",
"0.6964613",
"0.6532074",
"0.62200755",
"0.6205164",
"0.62014854",
"0.61457735",
"0.6142508",
"0.6083153",
"0.60304993",
"0.59804726",
"0.59804726",
"0.5861358",
"0.5861358",
"0.5861358",
"0.58... | 0.8054797 | 2 |
Reduce this DataArray's data by applying ``prod`` along some dimension(s). | def prod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
return self.reduce(
duck_array_ops.prod,
dim=dim,
skipna=s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prod(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.multiply.reduce(\n self, out=out, axis=axis, keepdims=keepdims, dtype=dtype\n )",
"def prod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | N... | [
"0.75356025",
"0.69897264",
"0.69897264",
"0.69731647",
"0.68985814",
"0.6810773",
"0.6810773",
"0.6472493",
"0.63539034",
"0.6327443",
"0.6250724",
"0.6143561",
"0.60524917",
"0.6012047",
"0.5895768",
"0.58667177",
"0.58586097",
"0.58586097",
"0.58586097",
"0.58337677",
"0.5... | 0.72356445 | 1 |
Reduce this DataArray's data by applying ``sum`` along some dimension(s). | def sum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
return self.reduce(
duck_array_ops.sum,
dim=dim,
skipna=ski... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(x, reduce_instance_dims=True, name=None): # pylint: disable=redefined-builtin\n return _numeric_combine(x, np.sum, reduce_instance_dims, name)",
"def sum(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.add.reduce(self, out=out, axis=axis, keepdims=keepdims, dtype=dtype)",
"... | [
"0.708487",
"0.70516545",
"0.6916435",
"0.6822894",
"0.6715113",
"0.6715113",
"0.670114",
"0.6623486",
"0.6535948",
"0.6535948",
"0.65142673",
"0.6508816",
"0.65004647",
"0.6484067",
"0.6447339",
"0.64389634",
"0.6429189",
"0.6414335",
"0.63769716",
"0.63616836",
"0.6263026",... | 0.70296186 | 2 |
Reduce this DataArray's data by applying ``cumsum`` along some dimension(s). | def cumsum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
return self.reduce(
duck_array_ops.cumsum,
dim=dim,
skipna=skipna,
keep_attrs=keep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumsum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> Dataset:\n return self.reduce(\n duck_array_ops.cumsum,\n dim=dim,\n skipna=skipna,\n ... | [
"0.7601719",
"0.7601719",
"0.7601719",
"0.71929914",
"0.70374393",
"0.6974349",
"0.6739214",
"0.6690532",
"0.6560123",
"0.64532024",
"0.6444809",
"0.6434722",
"0.6355989",
"0.6352609",
"0.6270605",
"0.6270605",
"0.6270605",
"0.62120354",
"0.6194247",
"0.6184793",
"0.6179344",... | 0.7733504 | 2 |
Reduce this DataArray's data by applying ``cumprod`` along some dimension(s). | def cumprod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
return self.reduce(
duck_array_ops.cumprod,
dim=dim,
skipna=skipna,
keep_attrs=ke... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumprod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> Dataset:\n return self.reduce(\n duck_array_ops.cumprod,\n dim=dim,\n skipna=skipna,\n ... | [
"0.78693175",
"0.78693175",
"0.78693175",
"0.74438745",
"0.73570323",
"0.72512066",
"0.71616554",
"0.6794507",
"0.66913575",
"0.6365985",
"0.6155289",
"0.60739994",
"0.6059755",
"0.60538614",
"0.602666",
"0.59202105",
"0.57904106",
"0.57707596",
"0.57707596",
"0.57707596",
"0... | 0.8048191 | 2 |
Reduce this Dataset's data by applying ``prod`` along some dimension(s). | def prod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
if (
flox_available
and OPTIONS["use_flox"]
and contains_onl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prod(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.multiply.reduce(\n self, out=out, axis=axis, keepdims=keepdims, dtype=dtype\n )",
"def prod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | N... | [
"0.7481061",
"0.74074686",
"0.735098",
"0.700226",
"0.700226",
"0.6688766",
"0.65455145",
"0.65137213",
"0.64294696",
"0.6274849",
"0.6176995",
"0.6066634",
"0.59346235",
"0.5929033",
"0.591033",
"0.591033",
"0.591033",
"0.58753616",
"0.5752229",
"0.5747925",
"0.5747925",
"... | 0.714532 | 4 |
Reduce this Dataset's data by applying ``sum`` along some dimension(s). | def sum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
if (
flox_available
and OPTIONS["use_flox"]
and contains_only... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> Dataset:\n return self.reduce(\n duck_array_ops.sum,\n dim=dim,\n ... | [
"0.70600945",
"0.6923307",
"0.68674266",
"0.686163",
"0.68115973",
"0.66666335",
"0.6637249",
"0.6547622",
"0.6547622",
"0.64223146",
"0.6413984",
"0.636318",
"0.63100564",
"0.6269711",
"0.626921",
"0.62295324",
"0.62160474",
"0.61654747",
"0.614655",
"0.60469216",
"0.6013805... | 0.6726549 | 5 |
Reduce this Dataset's data by applying ``cumsum`` along some dimension(s). | def cumsum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.cumsum,
dim=dim,
skipna=skipna,
numeric_only=True... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumsum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.cumsum,\n dim=dim,\n skipna=skipna,\n ... | [
"0.75369805",
"0.75369805",
"0.75369805",
"0.6748461",
"0.67054296",
"0.66430676",
"0.63819027",
"0.63511914",
"0.63409925",
"0.6273229",
"0.62687963",
"0.62687963",
"0.62687963",
"0.62631625",
"0.62614137",
"0.624574",
"0.61842084",
"0.61842084",
"0.61842084",
"0.60996747",
... | 0.7699135 | 1 |
Reduce this Dataset's data by applying ``cumprod`` along some dimension(s). | def cumprod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.cumprod,
dim=dim,
skipna=skipna,
numeric_only=Tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumprod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.cumprod,\n dim=dim,\n skipna=skipna,\n ... | [
"0.78994447",
"0.78994447",
"0.78994447",
"0.70834005",
"0.7032063",
"0.69815505",
"0.6964613",
"0.6532074",
"0.62200755",
"0.6205164",
"0.62014854",
"0.61457735",
"0.6142508",
"0.6083153",
"0.60304993",
"0.59804726",
"0.59804726",
"0.5861358",
"0.5861358",
"0.5861358",
"0.58... | 0.8054797 | 1 |
Reduce this Dataset's data by applying ``prod`` along some dimension(s). | def prod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
if (
flox_available
and OPTIONS["use_flox"]
and contains_onl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prod(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.multiply.reduce(\n self, out=out, axis=axis, keepdims=keepdims, dtype=dtype\n )",
"def prod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | N... | [
"0.74812174",
"0.7406539",
"0.7350262",
"0.7001044",
"0.7001044",
"0.6689062",
"0.65455264",
"0.65116835",
"0.64301413",
"0.6273224",
"0.6176157",
"0.6064172",
"0.5933759",
"0.59290385",
"0.5911163",
"0.5911163",
"0.5911163",
"0.58762074",
"0.57524556",
"0.57490146",
"0.57490... | 0.7143918 | 3 |
Reduce this Dataset's data by applying ``sum`` along some dimension(s). | def sum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
if (
flox_available
and OPTIONS["use_flox"]
and contains_only... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> Dataset:\n return self.reduce(\n duck_array_ops.sum,\n dim=dim,\n ... | [
"0.70600945",
"0.6923307",
"0.68674266",
"0.686163",
"0.68115973",
"0.66666335",
"0.6637249",
"0.6547622",
"0.6547622",
"0.64223146",
"0.6413984",
"0.636318",
"0.63100564",
"0.6269711",
"0.626921",
"0.62295324",
"0.62160474",
"0.61654747",
"0.614655",
"0.60469216",
"0.6013805... | 0.6726549 | 6 |
Reduce this Dataset's data by applying ``cumsum`` along some dimension(s). | def cumsum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.cumsum,
dim=dim,
skipna=skipna,
numeric_only=True... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumsum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.cumsum,\n dim=dim,\n skipna=skipna,\n ... | [
"0.7537239",
"0.7537239",
"0.7537239",
"0.67484677",
"0.67069674",
"0.66436154",
"0.63819385",
"0.6350921",
"0.6343282",
"0.62725073",
"0.6268484",
"0.6268484",
"0.6268484",
"0.6262665",
"0.6262446",
"0.62461925",
"0.61838704",
"0.61838704",
"0.61838704",
"0.61028945",
"0.606... | 0.769945 | 0 |
Reduce this Dataset's data by applying ``cumprod`` along some dimension(s). | def cumprod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> Dataset:
return self.reduce(
duck_array_ops.cumprod,
dim=dim,
skipna=skipna,
numeric_only=Tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumprod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> DataArray:\n return self.reduce(\n duck_array_ops.cumprod,\n dim=dim,\n skipna=skipna,\n ... | [
"0.7896212",
"0.7896212",
"0.7896212",
"0.70786357",
"0.7026533",
"0.6977891",
"0.6960451",
"0.6529018",
"0.62155104",
"0.620573",
"0.6204624",
"0.61433333",
"0.61382365",
"0.6083183",
"0.6030813",
"0.59799564",
"0.59799564",
"0.5859764",
"0.5859764",
"0.5859764",
"0.5842625"... | 0.8052243 | 0 |
Reduce this DataArray's data by applying ``prod`` along some dimension(s). | def prod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
if (
flox_available
and OPTIONS["use_flox"]
and contains_o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prod(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.multiply.reduce(\n self, out=out, axis=axis, keepdims=keepdims, dtype=dtype\n )",
"def prod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n min_count: int | N... | [
"0.75356025",
"0.72356445",
"0.69731647",
"0.68985814",
"0.6810773",
"0.6810773",
"0.6472493",
"0.63539034",
"0.6327443",
"0.6250724",
"0.6143561",
"0.60524917",
"0.6012047",
"0.5895768",
"0.58667177",
"0.58586097",
"0.58586097",
"0.58586097",
"0.58337677",
"0.58119243",
"0.5... | 0.69897264 | 3 |
Reduce this DataArray's data by applying ``sum`` along some dimension(s). | def sum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
min_count: int | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
if (
flox_available
and OPTIONS["use_flox"]
and contains_on... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(x, reduce_instance_dims=True, name=None): # pylint: disable=redefined-builtin\n return _numeric_combine(x, np.sum, reduce_instance_dims, name)",
"def sum(self, axis=None, keepdims=False, dtype=None, out=None):\n return np.add.reduce(self, out=out, axis=axis, keepdims=keepdims, dtype=dtype)",
"... | [
"0.70844406",
"0.70525146",
"0.70310706",
"0.6917323",
"0.68248296",
"0.67027587",
"0.66225314",
"0.6537938",
"0.6537938",
"0.6512875",
"0.6508079",
"0.65030366",
"0.64850044",
"0.644632",
"0.64397097",
"0.6430089",
"0.6415773",
"0.637861",
"0.6360291",
"0.6263903",
"0.619573... | 0.67166716 | 5 |
Reduce this DataArray's data by applying ``cumsum`` along some dimension(s). | def cumsum(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
return self.reduce(
duck_array_ops.cumsum,
dim=dim,
skipna=skipna,
keep_attrs=keep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumsum(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> Dataset:\n return self.reduce(\n duck_array_ops.cumsum,\n dim=dim,\n skipna=skipna,\n ... | [
"0.7601719",
"0.7601719",
"0.7601719",
"0.71929914",
"0.70374393",
"0.6974349",
"0.6739214",
"0.6690532",
"0.6560123",
"0.64532024",
"0.6444809",
"0.6434722",
"0.6355989",
"0.6352609",
"0.6270605",
"0.6270605",
"0.6270605",
"0.62120354",
"0.6194247",
"0.6184793",
"0.6179344",... | 0.7733504 | 1 |
Reduce this DataArray's data by applying ``cumprod`` along some dimension(s). | def cumprod(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
) -> DataArray:
return self.reduce(
duck_array_ops.cumprod,
dim=dim,
skipna=skipna,
keep_attrs=ke... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumprod(\n self,\n dim: Dims = None,\n *,\n skipna: bool | None = None,\n keep_attrs: bool | None = None,\n **kwargs: Any,\n ) -> Dataset:\n return self.reduce(\n duck_array_ops.cumprod,\n dim=dim,\n skipna=skipna,\n ... | [
"0.78693175",
"0.78693175",
"0.78693175",
"0.74438745",
"0.73570323",
"0.72512066",
"0.71616554",
"0.6794507",
"0.66913575",
"0.6365985",
"0.6155289",
"0.60739994",
"0.6059755",
"0.60538614",
"0.602666",
"0.59202105",
"0.57904106",
"0.57707596",
"0.57707596",
"0.57707596",
"0... | 0.8048191 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.