query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Compute the heuristic for a given state in the current problem. | def compute_heuristic(self, state):
if self._shape_reward_mode == "optimal":
problem = self.problems[self._problem_idx]
# Add action literals to state to enable planning
state_lits = set(state.literals)
action_lits = set(
self.action_space.all_gro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def myHeuristic(state, problem=None):\n #print(\"myHeuristic\")\n #print(problem.isGoalState((1,1)))\n xy2 = problem.goal\n return abs(state[0] - xy2[0]) + abs(state[1] - xy2[1])",
"def heuristic(state, problem):\n # It would take a while for Flat Earther's to get accustomed to this paradigm\n ... | [
"0.77781177",
"0.76758313",
"0.74438214",
"0.7409058",
"0.7408299",
"0.7377791",
"0.7353731",
"0.7306439",
"0.71683395",
"0.7154942",
"0.70938486",
"0.6993468",
"0.6966539",
"0.6902104",
"0.679804",
"0.6768399",
"0.6738102",
"0.67237085",
"0.67138356",
"0.67086256",
"0.669070... | 0.77858466 | 0 |
build your pelican project | def build():
click.echo("start build your pelican project...")
# copy_mathjax(PUBLISHDIR)
cmd = "pelican {INPUTDIR} -o {PUBLISHDIR} -s {PUBLISHCONF}".format(
INPUTDIR=INPUTDIR,
PUBLISHCONF=PUBLISHCONF,
PUBLISHDIR=PUBLISHDIR
)
click.echo('start run cmd: {0}'.format(cmd))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build():\n local('pelican -o {} -s pelicanconf.py'.format(env.deploy_path))",
"def build():\n clean()\n jekyll('build')",
"def project():",
"def project():",
"def project():",
"def build():",
"def run():\n build_no_documentation()\n build_sphinx_build()\n #build_sphinx_pdf()\n ... | [
"0.80022466",
"0.76572293",
"0.68546736",
"0.68546736",
"0.68546736",
"0.65780234",
"0.65661544",
"0.6554463",
"0.65237135",
"0.65101284",
"0.64570844",
"0.6430345",
"0.63182557",
"0.6287498",
"0.6280133",
"0.62259513",
"0.6225236",
"0.621028",
"0.6172018",
"0.61336464",
"0.6... | 0.8624505 | 0 |
clean your dev output | def devclean():
click.echo("start clean your output folder...")
rm(OUTPUTDIR, recursive=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scrub():\n\n\tlocal(\"rm -fr dist build\")\n\tlocal(\"find . -name \\\"*.pyc\\\" -exec rm '{}' ';'\")",
"def dev_clean():\n clean_files(\"csv\", True)\n clean_files(\"jsontxt\", True)",
"def clean():\n clean_flatbuffer_binaries()\n clean_webp_textures()",
"def cleanup(self):\n\n print \"Cl... | [
"0.7364518",
"0.73120457",
"0.6837923",
"0.668494",
"0.6623341",
"0.6565975",
"0.6446505",
"0.64446104",
"0.6430147",
"0.64125884",
"0.6406645",
"0.634509",
"0.6311887",
"0.6290972",
"0.62885344",
"0.6266827",
"0.6263163",
"0.6248267",
"0.6231171",
"0.6220711",
"0.62099195",
... | 0.7988176 | 0 |
Funcion que nos permite evaluar si el elemento que buscamos se encuentra dentro de la lista de colas o pilas | def EnLista(lista,valor):
temp=0
for e in lista:
if e.name==valor:
temp=e
else:
continue
if temp==0:
return "El elemento no esta en lista"
else:
return temp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_obstacle(lst):\n for x in lst:\n if x.tag is not None and x.tag == OBSTACLE:\n return True\n else:\n return False",
"def feasible(individual):\n val=0;\n for i in individual:\n if viajes[val][6]==True and False==vehiculos_esp[i]:\n return False\n ... | [
"0.5994727",
"0.57970995",
"0.5789697",
"0.5787256",
"0.57191974",
"0.5712903",
"0.55769116",
"0.5566167",
"0.55592275",
"0.5538156",
"0.5452695",
"0.54103845",
"0.5394359",
"0.5392133",
"0.53865606",
"0.53802097",
"0.5375944",
"0.5356791",
"0.53450143",
"0.5326142",
"0.53155... | 0.60702896 | 0 |
Creacion de un arbol | def crear_arbol():
print ("En este programa te brindamos 2 opciones para crear arboles, elige la que mas se adapte a tu objetivo")
try:
crear=int(input("1. Crear un arbol de manera aleatoria\n2. Introducir los datos en forma de arreglo\n"))
except:
print("Valor Invalido")
if cr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def representarArbolAutomatico(self):\n if not self.stepByStep:\n print(\"Pintar paredes en auto\")\n # Reinicio la matrix\n self.reiniciarMatrix()\n if self.arbol.raiz != None:\n # Capturo todos los valores\n for i in self.arbol.returnArbolComoVector():... | [
"0.6128758",
"0.6128119",
"0.6116085",
"0.5917543",
"0.58856267",
"0.58242875",
"0.58242875",
"0.57394975",
"0.5717106",
"0.5597258",
"0.553514",
"0.5517653",
"0.54746145",
"0.5417761",
"0.539726",
"0.52740854",
"0.5264729",
"0.5256027",
"0.5253974",
"0.52365226",
"0.52185285... | 0.6605578 | 0 |
Display popup message confirming submission. | def popup():
msg = messagebox.askyesno('Warning', 'Are you sure you would like to submit?')
if msg: # if user clicked yes
save_txt()
save_db()
root.destroy() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def confirm(self, action):\n title = \"%s : P L E A S E C O N F I R M\" % action\n question_text = \"<html><b>%s - PLEASE CONFIRM.</b><br/>\"\\\n \"<br/>Do you want to %s %s recordings for the following project?\"\\\n \"<br/><br/>PROJECT : %s\"\\\n \"<br/... | [
"0.66260684",
"0.6539852",
"0.6471161",
"0.6355524",
"0.62557465",
"0.62470835",
"0.62312436",
"0.62009865",
"0.61841303",
"0.61515397",
"0.60815936",
"0.60523564",
"0.60348475",
"0.60276926",
"0.60237217",
"0.59910464",
"0.59775865",
"0.59559107",
"0.5943642",
"0.59316874",
... | 0.6604227 | 1 |
Constructor. Loads the config file and logs in the user. | def __init__(self):
self.load_config()
self.login() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, config_file_name=\"config.json\"):\n self.config_file_name = config_file_name\n self._config = self._open_config_file()",
"def __init__(self):\n\n self.config = load_config()\n self.set_env_var()",
"def __init__(self):\n\n self.path = os.path.dirname(os.pat... | [
"0.71448416",
"0.7128583",
"0.7090821",
"0.70454407",
"0.69694275",
"0.69450074",
"0.6912936",
"0.6841834",
"0.68410355",
"0.6786883",
"0.67843455",
"0.67697686",
"0.6765324",
"0.67577565",
"0.6755933",
"0.6753951",
"0.6733729",
"0.6719248",
"0.6701679",
"0.6699646",
"0.66834... | 0.8298619 | 0 |
Downloads the website zip for the given id. | def download(self, website_id):
print("Attempting to download website with id: " +
str(website_id))
# Construct download URL
download_url = self.config["base_url"] + "websites/" + \
str(website_id) + "/pages/?action=download-confirm"
# Open download ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def download_data():\n url = 'https://www.dropbox.com/s/h9ubx22ftdkyvd5/ml-latest-small.zip?dl=1'\n urllib.request.urlretrieve(url, 'ml-latest-small.zip')\n zfile = zipfile.ZipFile('ml-latest-small.zip')\n zfile.extractall()\n zfile.close()",
"def download():\n response = requests.get(URL, stre... | [
"0.6472666",
"0.63869995",
"0.6373792",
"0.6268572",
"0.62413114",
"0.6234404",
"0.621077",
"0.61712956",
"0.61457485",
"0.61367536",
"0.6053691",
"0.6003016",
"0.60026824",
"0.5947067",
"0.59446025",
"0.5937266",
"0.593035",
"0.5923485",
"0.5918078",
"0.59045106",
"0.5882042... | 0.6989046 | 0 |
Downloads all websites from the configured account. | def download_all(self):
# Fetch website list
self.fetch_website_list()
for website in self.website_list:
self.download(website['id']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def download_files(self) -> None:\n\n for name, url in self.files.items():\n print(f\"Download {name.split('/')[-1]}\")\n wget.download(url, os.path.join(\"data\", name))",
"def run(self):\n urls_to_download = self._get_links()\n results = ThreadPool(8).imap_unordered(s... | [
"0.64588964",
"0.631406",
"0.61965954",
"0.61314225",
"0.6050799",
"0.6036285",
"0.5998617",
"0.59446806",
"0.59381914",
"0.5903098",
"0.5895737",
"0.5842743",
"0.5808646",
"0.5772056",
"0.56775916",
"0.5641498",
"0.56260294",
"0.56127065",
"0.5600516",
"0.5599381",
"0.559229... | 0.7973969 | 0 |
Fetches the list of websites attached to the configured Blockwise account. | def fetch_website_list(self):
# Clear list
self.website_list = []
# Open websites overview
self.browser.open(self.config["base_url"] + "websites")
# Find table and iterate over rows
for table_row in self.browser.get_current_page().select("table tr"):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_websites(self):\r\n\r\n # Fetch websites\r\n self.fetch_website_list()\r\n\r\n # Print website data\r\n for website in self.website_list:\r\n print(\"ID: {0} | Domain: {1} | Name: {2}\".format(\r\n website['id'], website['domain'], website['name']))",
... | [
"0.69705415",
"0.64496094",
"0.6446523",
"0.64379936",
"0.62966555",
"0.62397087",
"0.60914624",
"0.602921",
"0.5997532",
"0.59600747",
"0.58935297",
"0.5880731",
"0.5796163",
"0.5705958",
"0.56971353",
"0.5683009",
"0.5682644",
"0.5670518",
"0.56336397",
"0.5607247",
"0.5604... | 0.7163119 | 0 |
Returns the website id for a given domain name. | def get_website_id_by_domain(self, domain):
# Fetch website list
self.fetch_website_list()
# Loop through website list
for website in self.website_list:
if(domain == website['domain']):
return website['id'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_domain_id_by_domainurl(domain_url):\r\n db = connect()\r\n cursor = db.cursor()\r\n sql_statement = \"\"\"\r\n SELECT domain_id FROM `domains` WHERE domain_url = %(d)s\r\n \"\"\"\r\n try:\r\n cursor.execute(sql_statement, {'d':domain_url})\r\n ... | [
"0.7317684",
"0.72144324",
"0.7035157",
"0.6873132",
"0.67911625",
"0.671376",
"0.6644109",
"0.6644109",
"0.63495004",
"0.63495004",
"0.6290365",
"0.62296623",
"0.6202188",
"0.61872786",
"0.61872786",
"0.61608726",
"0.6145458",
"0.613091",
"0.61277753",
"0.6094865",
"0.607450... | 0.8120632 | 0 |
Prints a list of websites associated with this account. | def list_websites(self):
# Fetch websites
self.fetch_website_list()
# Print website data
for website in self.website_list:
print("ID: {0} | Domain: {1} | Name: {2}".format(
website['id'], website['domain'], website['name'])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fetch_website_list(self):\r\n # Clear list\r\n self.website_list = []\r\n\r\n # Open websites overview\r\n self.browser.open(self.config[\"base_url\"] + \"websites\")\r\n\r\n # Find table and iterate over rows\r\n for table_row in self.browser.get_current_page().select... | [
"0.6325658",
"0.61330944",
"0.6077588",
"0.5747504",
"0.5638724",
"0.5555112",
"0.54735076",
"0.54468036",
"0.54066414",
"0.5361679",
"0.53399676",
"0.533175",
"0.5329514",
"0.53192073",
"0.53176737",
"0.530204",
"0.5280976",
"0.52705723",
"0.52683234",
"0.52613914",
"0.52573... | 0.8044255 | 0 |
Saves the .zip file in the HTTP response locally | def save_file(self, response):
# Extract filename from response url
filename = re.search('[^/]+(?=/$|$)', response.url).group(0)
# Prepend download folder name to the filename
filename = self.config["folder"] + filename
os.makedirs(os.path.dirname(filename), exist_ok=True)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def save_downloaded_zip(self, dict_entry_to_download):\n\tif self.download_subtitle_zip(dict_entry_to_download) == True:\n\t try:\n\t\tzip_file = open(self.ZipFilePath,\"wb\")\n\t\tzip_file.write(self.zip_string)\n\t\tzip_file.close\t\t\n\t\tprint \"Zipfile: %s saved on hdd.\" % self.ZipFilePath\n\t\tdel self.z... | [
"0.6902448",
"0.66956294",
"0.6688759",
"0.6579057",
"0.64489156",
"0.6448732",
"0.6447668",
"0.64060974",
"0.6402421",
"0.6393668",
"0.63743347",
"0.63736063",
"0.6360812",
"0.6353195",
"0.6339755",
"0.6324033",
"0.6292607",
"0.620836",
"0.611196",
"0.6065431",
"0.6061819",
... | 0.70878065 | 0 |
Returns the powerset of an iterable as a list of lists. Much nicer to do this than write out the powerset manually | def powerset(iterable):
set_list = list(iterable)
return list(chain.from_iterable(combinations(set_list, r)
for r in range(len(set_list)+1))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _powerset(iterable: Iterable) -> Iterator:\n s = list(iterable)\n return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))",
"def powerset(iterable):\n s = list(iterable)\n return chain.from_iterable(combinations(s, r) for r in range(2, len(s)+1))",
"def powerset(iterable... | [
"0.7995444",
"0.78815496",
"0.78390735",
"0.7773861",
"0.7773861",
"0.7773861",
"0.7755637",
"0.7737819",
"0.7729828",
"0.77127105",
"0.7662994",
"0.7636652",
"0.73878515",
"0.73080266",
"0.73064476",
"0.72044474",
"0.71921253",
"0.71921253",
"0.71921253",
"0.7172043",
"0.716... | 0.7981444 | 1 |
The fixture consists of a Host (stub) and a few instances ov Vm (Stub). | def setUp(self):
self.vmNoQuestion = Vm(name='noQuestion',
runtime=Struct(question=None))
self.vmQuestion = Vm(name='Question',
runtime=Struct(
question=Struct(
id='someQuestionId',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_vms_host(self):\n testflow.step(\"Check if VM's started on different hosts\")\n assert (\n ll_vms.get_vm_host(vm_name=conf.VM_NAME[0]) !=\n ll_vms.get_vm_host(vm_name=conf.VM_NAME[1])\n )",
"def test_vms_host(self):\n testflow.step(\"Check if VM's starte... | [
"0.66935045",
"0.66935045",
"0.65910363",
"0.6503906",
"0.6503906",
"0.65038544",
"0.6283813",
"0.62837225",
"0.62711096",
"0.62626857",
"0.62473446",
"0.616982",
"0.6159366",
"0.6158614",
"0.61422443",
"0.6120313",
"0.6091523",
"0.6073946",
"0.607355",
"0.6051192",
"0.601715... | 0.697521 | 0 |
When the `answer` operation is invoked on a vm with no question pending, then we simply print an error message on stderr. | def test_answer_noQuestion(self):
try:
## Capture what the SUT is writing to stderr so that we can
## verify it later.
sys.stderr = FileWriteCapture(sys.stderr).StartCapture()
result = Answer().DoIt(self.host, self.vmNoQuestion.name)
expectOnStderr = 'No questions p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_answer_unknownVm(self):\n\n self.failUnlessRaises(pyVmomi.vim.fault.NotFound,\n Answer().DoIt, self.host, 'unknownVm')",
"def test__answer_error(\n self,\n actual_answer,\n answer,\n result,\n ):\n test_result = _answe... | [
"0.6581796",
"0.6179263",
"0.59570175",
"0.5787004",
"0.5782204",
"0.5757554",
"0.5593964",
"0.5580374",
"0.55507004",
"0.54772305",
"0.5444757",
"0.54236877",
"0.54154277",
"0.54102695",
"0.54041255",
"0.538641",
"0.5381535",
"0.53778833",
"0.53630346",
"0.5362562",
"0.53480... | 0.75920427 | 0 |
Verify that we raise an appropriate exception if the operation is invoked with an unknown vm name. | def test_answer_unknownVm(self):
self.failUnlessRaises(pyVmomi.vim.fault.NotFound,
Answer().DoIt, self.host, 'unknownVm') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def operation_not_found(self, name):\n raise OperationError(\"Operation '%s' not found\" % name)",
"def test_vmfactory_fail(self):\n self.command.output = \"foo.vmx\"\n with self.assertRaises(VMInitError):\n self.command.package = self.input_ovf",
"def test_will_not_get_instance... | [
"0.653822",
"0.6389487",
"0.608852",
"0.6059318",
"0.60320866",
"0.5987542",
"0.59446174",
"0.5939153",
"0.59103185",
"0.5847701",
"0.5841957",
"0.58180857",
"0.58157957",
"0.5758776",
"0.5726958",
"0.57252586",
"0.5693958",
"0.56661975",
"0.5659771",
"0.56591505",
"0.5638999... | 0.7320924 | 0 |
Load and parse manifest file. Instances with durations outside [min_duration, max_duration] will be filtered out. | def read_manifest(manifest_path, max_duration=float('inf'), min_duration=0.0):
manifest = []
for json_line in codecs.open(manifest_path, 'r', 'utf-8'):
try:
json_data = json.loads(json_line)
except Exception as e:
raise IOError("Error reading manifest: %s" % str(e))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(\n self,\n manifest_filepath: Union[str, Path, List[str], List[Path]],\n sample_rate: int,\n n_segments: Optional[int] = None,\n max_duration: Optional[float] = None,\n min_duration: Optional[float] = None,\n ignore_file: Optional[Union[str, Path]] = No... | [
"0.6479079",
"0.5563037",
"0.55493927",
"0.5548722",
"0.55397034",
"0.54406977",
"0.5430423",
"0.53386045",
"0.5299497",
"0.51943964",
"0.5189001",
"0.5177665",
"0.5169128",
"0.50688326",
"0.50077266",
"0.49894947",
"0.49510708",
"0.49487224",
"0.49368173",
"0.49202508",
"0.4... | 0.75650334 | 0 |
Download file from url to target_dir, and check md5sum. | def download(url, md5sum, target_dir):
if not os.path.exists(target_dir): os.makedirs(target_dir)
filepath = os.path.join(target_dir, url.split("/")[-1])
if not (os.path.exists(filepath) and md5file(filepath) == md5sum):
print("Downloading %s ..." % url)
os.system("wget -c " + url + " -P " +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def download_from_url(\n url, output_path, overwrite=False, reference_md5=None, is_retry=False\n):\n\n output_filename = Path(output_path).name\n output_filename_bold = f\"{bcolors.BOLD}{output_filename}{bcolors.ENDC}\"\n\n if file_exists(output_path):\n\n if not overwrite:\n\n if ref... | [
"0.7383906",
"0.70156795",
"0.68874884",
"0.6856614",
"0.68482125",
"0.68470967",
"0.6844774",
"0.68265927",
"0.67949075",
"0.67949075",
"0.67949075",
"0.67853165",
"0.6783589",
"0.6757384",
"0.67429924",
"0.67119014",
"0.6668384",
"0.6666795",
"0.66464406",
"0.6635062",
"0.6... | 0.842353 | 0 |
Unpack the file to the target_dir. | def unpack(filepath, target_dir, rm_tar=False):
print("Unpacking %s ..." % filepath)
tar = tarfile.open(filepath)
tar.extractall(target_dir)
tar.close()
if rm_tar == True:
os.remove(filepath) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def extract_file(self):\n# path_destination = os.path.join(\n# self.root, self.resources.replace(\".zip\", \"\"))\n# os.makedirs(path_destination, exist_ok=True)\n shutil.unpack_archive(os.path.join(\n self.root, self.resources), self.root)\n os.remove(os.path.j... | [
"0.65952206",
"0.63666075",
"0.6340507",
"0.6295044",
"0.6253198",
"0.6219203",
"0.61759305",
"0.61541903",
"0.6142236",
"0.61058134",
"0.6083396",
"0.6045192",
"0.5964464",
"0.59374434",
"0.5909122",
"0.590736",
"0.5891017",
"0.58708346",
"0.5853136",
"0.58025235",
"0.576775... | 0.70915407 | 0 |
Gets information about MS Exchange library. | def getExchangeDllInfo(self, fileName):
return self.session.request('exchangedll/%s/'
% (fileName)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def exchange_information(self):\n uri = \"/fapi/v1/exchangeInfo\"\n success, error = await self.request(\"GET\", uri)\n return success, error",
"def get_exchange_info(self):\n return self.request.get(path=\"/info\")",
"def library():\n finder = LibraryFinder()\n p = find... | [
"0.6323647",
"0.5877237",
"0.5318434",
"0.53097844",
"0.52070016",
"0.51987547",
"0.5139076",
"0.50803375",
"0.50536937",
"0.50494665",
"0.50386095",
"0.5036896",
"0.49667156",
"0.49667156",
"0.4962237",
"0.49371502",
"0.49032816",
"0.4902186",
"0.4895918",
"0.4878535",
"0.48... | 0.6277932 | 1 |
Starts new file transmit session. | def startNewFileTransmitSession(self, data):
return self.session.request('exchangedll/newsession/', 'POST',
self.getXML(data, 'fileTransmitRequest')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def starting_new_file(self):",
"def start(self):\n\t\tself.stream.start_stream()",
"def startFile(self, newFileName):\n \n pass",
"def continueTransmitFile(self, fileTransmitSessionId, bytesToRead):\n return self.session.request('exchangedll/sessions/%s/data/%s'\n % (fileTrans... | [
"0.6833207",
"0.6166744",
"0.615599",
"0.59899586",
"0.5922031",
"0.5889781",
"0.5888008",
"0.5856077",
"0.5812332",
"0.5720518",
"0.5714976",
"0.562695",
"0.5606064",
"0.55556095",
"0.55144775",
"0.5506584",
"0.5506519",
"0.5501701",
"0.5500204",
"0.54865944",
"0.54702425",
... | 0.8039896 | 0 |
Convert parsed lines into a string of HTML format for the body text to be displayed on the GUI. | def __init_body_html(self) -> str:
html_str = ''
is_first = True
unseen_idx = self._parsed.unseen
for i, parsed_line in enumerate(self._parsed.parsed):
line = ''
for j, e in enumerate(parsed_line):
token = e
if isinstance(e, ZHEntit... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plain_to_html(plain_text):\n if plain_text is None:\n return \"\"\n\n # We remove trailing whitespace - most notably newlines - so we\n # don't end up with unexpected vertical whitespace in the output.\n html = str(plain_text).rstrip().replace(\"&\", \"&\"). \\\n replace(\"<\", \"... | [
"0.6257783",
"0.6228069",
"0.61329705",
"0.5867111",
"0.58233273",
"0.57864743",
"0.57727003",
"0.5770009",
"0.5743729",
"0.5741245",
"0.5707351",
"0.5702982",
"0.5681599",
"0.56545305",
"0.56531656",
"0.5639295",
"0.56326145",
"0.5613993",
"0.560777",
"0.5583388",
"0.5548615... | 0.6581994 | 0 |
Returns a stream consisting of the items of this stream that match the given predicate. | def filter(self, predicate):
def _filter(iterator):
while True:
item = next(iterator)
if predicate(item):
return item
return self.__class__(self, _filter) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filter(iterable, predicate):\n\n for x in iterable:\n if predicate(x):\n yield x",
"def find(self, predicate):\n return [d for d in self.iter_tree if predicate(d)]",
"def filter(self, fn: Callable[[Tuple[K, List[V]]], bool]) -> Iterator[Tuple[K, List[V]]]:\n return (entry... | [
"0.64449394",
"0.62587917",
"0.608575",
"0.59240955",
"0.5681202",
"0.5598102",
"0.5537146",
"0.5505054",
"0.5501148",
"0.5482622",
"0.5466368",
"0.5431415",
"0.5402325",
"0.5402325",
"0.53616846",
"0.5353132",
"0.5352811",
"0.53181934",
"0.5312445",
"0.5301627",
"0.5300709",... | 0.7530016 | 0 |
Returns a stream consisting of the flattened items of this stream. | def flatten(self):
return self.__class__(itertools.chain.from_iterable(self)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flattened(self):\n return [item for inner in self.__items for item in inner]",
"def flatten(self) -> List:\n return self._flatten_more(iterable=self, output=type(self)())",
"def flatten_stream(chunk_stream: collections.Iterable) -> collections.Iterable:\r\n return chain.from_iterable(chunk... | [
"0.7224654",
"0.708998",
"0.6988089",
"0.6864672",
"0.6841566",
"0.67606384",
"0.67018443",
"0.6637012",
"0.6624998",
"0.6537779",
"0.6518443",
"0.6412482",
"0.6339062",
"0.63334167",
"0.63313913",
"0.623318",
"0.6137314",
"0.61183965",
"0.6106794",
"0.6099815",
"0.6076354",
... | 0.7229144 | 0 |
Returns a stream consisting of the distinct items of this stream. | def distinct(self):
memory = set()
def _distinct(iterator):
while True:
item = next(iterator)
if item in memory:
continue
memory.add(item)
return item
return self.__class__(self, _distinct) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def distinct(self):\n return DistinctQuery(self)",
"def distinct(self):\n qs = copy(self)\n qs._distinct = True\n return qs",
"def unique(self):\n return self.element_wise(lambda seqs: list(set(seqs)))",
"def distinct(self):\n self.distinct_ = True\n\n return ... | [
"0.6983475",
"0.6915483",
"0.6780482",
"0.64765984",
"0.63660026",
"0.6359798",
"0.6213019",
"0.5897391",
"0.5876457",
"0.58733404",
"0.58576953",
"0.5810534",
"0.57947123",
"0.5721542",
"0.57094973",
"0.56463784",
"0.56267685",
"0.5607414",
"0.5602389",
"0.5584928",
"0.55782... | 0.76015234 | 0 |
Returns a stream consisting of items of this stream, truncated to be no longer than max_size in length. | def limit(self, max_size):
return self.__class__(itertools.islice(self, max_size)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _truncate(self):\n dif = len(self) - self._maxLen\n if dif > 0:\n #return\n self[:dif] = []",
"def _limit_helper(stream: Union[BinaryIO, Generator, List], limit: int) -> Generator:\n for value in stream:\n yield value\n if limit == 1:\n return\n... | [
"0.61745995",
"0.58200085",
"0.57398564",
"0.5702165",
"0.5623146",
"0.56076515",
"0.55688864",
"0.55473465",
"0.55255014",
"0.5505975",
"0.5426797",
"0.54205805",
"0.54120886",
"0.5398848",
"0.5391275",
"0.53815204",
"0.53634936",
"0.53267366",
"0.53238416",
"0.5316794",
"0.... | 0.7333502 | 0 |
Returns True if all items of this stream match the given predicate, otherwise False. | def all(self, predicate):
return all(predicate(item) for item in self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def any(self, predicate):\n return any(predicate(item) for item in self)",
"def every(predicate: Predicate[_O]) -> Predicate[Iterable]:\n\n def compare(iterable: Iterable, /) -> bool:\n return all(predicate(item) for item in iterable)\n\n return compare",
"def contains_all(self, *items):\n ... | [
"0.77382594",
"0.68936706",
"0.6524452",
"0.6436115",
"0.64340085",
"0.62692904",
"0.6232027",
"0.61800313",
"0.61774355",
"0.6063142",
"0.5975139",
"0.5963174",
"0.5950858",
"0.5746089",
"0.57256246",
"0.5699829",
"0.5647988",
"0.56100446",
"0.56100446",
"0.5606734",
"0.5571... | 0.8018688 | 0 |
Returns True if any items of this stream match the given predicate, otherwise False. | def any(self, predicate):
return any(predicate(item) for item in self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def all(self, predicate):\n return all(predicate(item) for item in self)",
"def any(seq, pred=None):\n for elem in itertools.ifilter(pred, seq):\n return True\n return False",
"def contains_any(self, *items):\n return any(item in self for item in items)",
"def every(predicate: Pred... | [
"0.7588194",
"0.68950456",
"0.66434777",
"0.6561551",
"0.641269",
"0.64065003",
"0.6393193",
"0.62992823",
"0.626012",
"0.6255414",
"0.6212287",
"0.6013655",
"0.5888474",
"0.58565855",
"0.58562446",
"0.5783889",
"0.57825863",
"0.57219315",
"0.56716853",
"0.5659902",
"0.564959... | 0.8048223 | 0 |
Returns True if no items of this stream match the given predicate, otherwise False. | def none(self, predicate):
return not self.any(predicate) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def any(self, predicate):\n return any(predicate(item) for item in self)",
"def all(self, predicate):\n return all(predicate(item) for item in self)",
"def no(seq, pred=None):\n for elem in ifilter(pred, seq):\n return False\n return True",
"def all(seq, pred=None):\n for elem i... | [
"0.66968435",
"0.6578743",
"0.6485255",
"0.6245035",
"0.62410504",
"0.61962926",
"0.6189238",
"0.6089569",
"0.6053107",
"0.6053107",
"0.5953874",
"0.58961457",
"0.58409333",
"0.583326",
"0.5788164",
"0.5788164",
"0.5745407",
"0.5716643",
"0.570402",
"0.567105",
"0.5656919",
... | 0.7476168 | 0 |
Performs an action for each items of this stream. | def foreach(self, action):
for item in self:
action(item) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def act(self, timestep):\n for listwriter in self._listwriters:\n listwriter.act(timestep)",
"def bulk_process(self):\n\n def actions():\n try:\n task = self.queue.get(block=False, timeout=None)\n\n if task['action'] == 'index':\n ... | [
"0.62833196",
"0.6251297",
"0.6223325",
"0.61298406",
"0.6001018",
"0.59882206",
"0.59653026",
"0.59495246",
"0.58906627",
"0.58894193",
"0.58095604",
"0.5779752",
"0.57670933",
"0.57375664",
"0.5698702",
"0.5692092",
"0.56511533",
"0.5648216",
"0.5644593",
"0.562101",
"0.558... | 0.8300826 | 0 |
Returns a collection of items collected by given collector. | def collect(self, collector):
return collector(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def collect(self, item, collector_set):\n\t\tpass",
"def generator_sends_collector():\n def w(collect_list):\n def collector(*a, **kw):\n item = yield\n while item is not None:\n collect_list.append(item)\n item = yield\n collect_list.appen... | [
"0.7062182",
"0.6238775",
"0.62127477",
"0.6085421",
"0.5568038",
"0.54260415",
"0.5394952",
"0.5348385",
"0.52863944",
"0.5280602",
"0.5253309",
"0.5215131",
"0.5201584",
"0.51625365",
"0.513643",
"0.5104146",
"0.50596243",
"0.5026734",
"0.50245863",
"0.50178623",
"0.4997005... | 0.7430312 | 0 |
Returns concatenated stream of given streams. | def chain(*streams):
return Stream(itertools.chain(*streams)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def concatenate_from_streams(cls, streams, schema, **kwargs):\n if 'taxon_set' not in kwargs:\n taxon_set = TaxonSet()\n kwargs[\"taxon_set\"] = taxon_set\n else:\n taxon_set = kwargs[\"taxon_set\"]\n char_matrices = []\n for stream in streams:\n ... | [
"0.7202589",
"0.66483635",
"0.63785625",
"0.6352309",
"0.6278003",
"0.6186486",
"0.61308485",
"0.61265486",
"0.6086431",
"0.580553",
"0.5698017",
"0.5645479",
"0.56218",
"0.54383713",
"0.5383753",
"0.5369233",
"0.53659254",
"0.5361231",
"0.5355483",
"0.53350115",
"0.5286327",... | 0.78553116 | 0 |
Replaces this instance's method with specified name with passed method. | def replace_method(self, method_name, method):
if not callable(getattr(self, method_name, None)):
raise ValueError(f"No method with name '{method_name}'")
setattr(self, method_name, types.MethodType(method, self)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def replaces_method(func: Callable[..., Tuple[str]], classname: str, method_name: str):\n Replacements._method_rep[(classname, method_name)] = func\n return func",
"def _override_command_method(self, name):\n method=getattr(self,name,None)\n if method is not None:\n @func_utils.get... | [
"0.7471502",
"0.6672633",
"0.6672284",
"0.6640323",
"0.66057575",
"0.65453744",
"0.6527196",
"0.6520483",
"0.64873147",
"0.6427852",
"0.639384",
"0.63288766",
"0.6258245",
"0.6235818",
"0.6152616",
"0.61291534",
"0.60626507",
"0.60151434",
"0.6005935",
"0.5988945",
"0.5977686... | 0.82818156 | 0 |
Split text into chunks with specified length. | def split_large_text(text, length=4096):
text = str(text)
yield text[0: length]
for i in range(length, len(text), length):
yield text[i: i + length] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def chunk_split(cls, text):\n parts = []\n current = []\n for line in text.splitlines():\n size = sum(len(part) + 1 for part in current)\n extra = len(line)\n if size + extra >= 2000:\n if current:\n # The message is full, spli... | [
"0.7383811",
"0.69554186",
"0.6950578",
"0.6878057",
"0.65951",
"0.65605026",
"0.6474294",
"0.6446131",
"0.6441423",
"0.6360656",
"0.6346665",
"0.63384575",
"0.63274455",
"0.63134134",
"0.6289246",
"0.6232736",
"0.6232736",
"0.61928964",
"0.6154149",
"0.6089452",
"0.60799557"... | 0.82328856 | 0 |
Reply with specified message and attachments. Other kwargs are passed to the backend. Often as additional arguments to sending the message. If message is too long it will be splitted. | async def reply(self, message, attachments=(), **kwargs):
return await self.send_message(
self.default_target_id,
message,
attachments,
**kwargs
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reply(self, *content, **kwargs):\n return self.message.reply(*content, **kwargs)",
"def Reply_With_Attchment(service, userId, receiver, subject, message, attachments, threadId, message_id):\n # Create email message\n emailMsg = message\n mimeMessage = MIMEMultipart()\n mimeMessage['to'] = receiver... | [
"0.65980136",
"0.64945555",
"0.61485016",
"0.5996543",
"0.590376",
"0.58438814",
"0.5796048",
"0.57734615",
"0.5757795",
"0.5730796",
"0.5721487",
"0.5720016",
"0.57094204",
"0.5687314",
"0.5680167",
"0.5676434",
"0.5666405",
"0.5598512",
"0.55501354",
"0.55411804",
"0.553382... | 0.7515483 | 0 |
Send message to specified target_id with specifiend message and attachments. Other kwargs are passed to the backend. Often as additional arguments to sending the message. If message is too long it will be splitted. | async def send_message(self, target_id, message, attachments=(), **kwargs):
responses = []
parts = tuple(self.split_large_text(message))
for part in parts[:-1]:
responses.append(await self.backend.execute_send(
target_id,
part,
(),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def send_message_to_target(\n message: str,\n sessionId: Optional[SessionID] = None,\n targetId: Optional[TargetID] = None,\n) -> dict:\n return {\n \"method\": \"Target.sendMessageToTarget\",\n \"params\": filter_none(\n {\n \"message\": message,\n ... | [
"0.6636919",
"0.65982866",
"0.63353294",
"0.61850524",
"0.61734605",
"0.60913",
"0.58138454",
"0.5768072",
"0.5706319",
"0.5661404",
"0.5604912",
"0.55760515",
"0.5503068",
"0.55023414",
"0.54777795",
"0.5473992",
"0.5461167",
"0.5453858",
"0.5446829",
"0.54394525",
"0.535112... | 0.7016827 | 0 |
Register the NSXV3 QoS driver. | def register():
global DRIVER
if not DRIVER:
DRIVER = NSXv3QosDriver.create(agent_rpc=None)
LOG.debug('NSXv3QosDriver QoS driver registered') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def register(self):\n\n @asyncio.coroutine\n def on_prepare(xact_info, action, ks_path, msg):\n \"\"\" prepare callback from dts \"\"\"\n self._log.debug(\n \"Got vnfr on_prepare callback (xact_info: %s, action: %s): %s\",\n xact_info, action, msg\n... | [
"0.5284315",
"0.51736283",
"0.5088734",
"0.49640363",
"0.4955186",
"0.49492526",
"0.48222563",
"0.47500452",
"0.47391933",
"0.4716713",
"0.46789974",
"0.46687174",
"0.46618465",
"0.46448204",
"0.46002236",
"0.44792214",
"0.44595623",
"0.44356644",
"0.4349463",
"0.4303832",
"0... | 0.86845803 | 0 |
Find hilight for item. If item does not have an explicit hilight, check subitems, in order, for one that has an explicit or implicit hilight. | def _find_hilight(self):
traverse = deque([self.item])
while traverse:
item = traverse.popleft()
if item.hilight:
return item.hilight
traverse.extendleft(reversed(item.subitems)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _find(self, item):\n stack = [self.root]\n while stack:\n node = stack.pop()\n if node.items and item in node.items:\n return True, node.active[node.items.index(item)], node\n elif not node.items:\n axis = node.cutdim\n ... | [
"0.58067036",
"0.5193684",
"0.5138478",
"0.51258224",
"0.5124072",
"0.5008926",
"0.49733815",
"0.49026772",
"0.48955747",
"0.4875211",
"0.4851098",
"0.48247287",
"0.48153755",
"0.48101473",
"0.4797423",
"0.47863838",
"0.47824356",
"0.4755184",
"0.47521403",
"0.4747824",
"0.47... | 0.8131971 | 0 |
Object constructor. (couch.Client) client (str) name (Exception) | def __init__(self, client, name):
if not isinstance(client, couch.Client):
raise Exception("'client' arg must be instance of couch.Client")
self.client = client
self.name = name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, name, client):\n self.name = name\n self.client = client",
"def __init__(self, client, name):\n self._client = client\n self._attr_name = name",
"def __init__(self, client, db_name):\n self.client = client\n self.db_name = db_name",
"def __init__(s... | [
"0.79376125",
"0.7793737",
"0.7756333",
"0.765076",
"0.76003",
"0.75791806",
"0.7549555",
"0.71095353",
"0.699044",
"0.68987614",
"0.68522894",
"0.685037",
"0.68476003",
"0.68101704",
"0.6764563",
"0.67382616",
"0.6712658",
"0.6706904",
"0.6615811",
"0.6611911",
"0.6610059",
... | 0.901303 | 0 |
Replicate database. (str) target (bool) targetCreate (mixed) | def replicate(self, target, targetCreate = True):
return self.client.post("/_replicate", None, {
"source" : self.name,
"target" : target,
"create_target": targetCreate,
}).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def replicate(self, source, target, **params):\n replicator = cloudant.replicator.Replication(self.cloudant_client)\n source_db = Database(self.cloudant_client, source)\n target_db = Database(self.cloudant_client, target)\n return replicator.create_replication(source_db, target_db, **pa... | [
"0.7249406",
"0.68904024",
"0.64122343",
"0.60974616",
"0.5874705",
"0.5838073",
"0.5760138",
"0.56065917",
"0.5582746",
"0.5554158",
"0.5514307",
"0.5511637",
"0.5496934",
"0.5466124",
"0.54082936",
"0.54078144",
"0.5349957",
"0.5330608",
"0.5330608",
"0.5318922",
"0.5315699... | 0.75178003 | 0 |
Get all documents by given query options. If keys params provided, request for documents by given keys. (dict) query (list) keys (mixed) | def getDocumentAll(self, query = {}, keys = []):
query = query or {}
if "include_docs" not in query:
query["include_docs"] = True
if not keys:
return self.client.get(self.name +"/_all_docs", query)
else:
return self.client.post(self.name +"/_all_docs", query,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _getQuery(self, keys, any):\n operator = 'or' if any else 'and'\n def _and(lhs, rhs): return (lhs & rhs)\n def _or(lhs, rhs): return (lhs | rhs)\n join = {'and': _and, 'or': _or}[operator]\n iter = keys.iteritems()\n key, val = iter.next()\n query = (where(key) == val)\n for key, value ... | [
"0.63462067",
"0.6236286",
"0.61819315",
"0.6042806",
"0.5950434",
"0.5912153",
"0.5910383",
"0.58933896",
"0.58612514",
"0.5856646",
"0.58252406",
"0.57792425",
"0.5764174",
"0.5743013",
"0.5715739",
"0.5676636",
"0.5655873",
"0.5646454",
"0.5639526",
"0.5632748",
"0.5625158... | 0.74887514 | 0 |
Create a document. (mixed) document (mixed|dict|None) | def createDocument(self, document):
data = self.createDocumentAll([document])
try:
return data[0]
except: pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_document(self):\n # set single values\n if len(self.field_values) > 0:\n self._set_field_values()\n\n # set multi values\n if len(self.block_field_values) > 0:\n self._set_multi_field_values()\n\n self.field_values = {}\n self.block_field_v... | [
"0.77244157",
"0.7691563",
"0.76078093",
"0.75448394",
"0.7497625",
"0.74059784",
"0.7292055",
"0.6920336",
"0.6887969",
"0.6811379",
"0.67622185",
"0.6626416",
"0.65347296",
"0.6533986",
"0.6524472",
"0.64461523",
"0.64386547",
"0.6436524",
"0.6423536",
"0.63911057",
"0.6388... | 0.7777444 | 0 |
Create multiple documents. (list) documents (mixed) | def createDocumentAll(self, documents):
docs = []
for document in documents:
if isinstance(document, couch.Document):
document = document.getData()
# this is create method, no update allowed
if "_rev" in document: del document["_rev"]
if "_deleted" in doc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def createMultipleDocuments(cred, payload):\n url = cred.base_url + \"documents:commit\"\n data = { 'writes': [] }\n\n for path, fieldData in payload.iteritems():\n pathData = createFirestoreDataObject(cred, path, fieldData)\n del pathData['updateMask']\n data['writes'].append(pathDat... | [
"0.78010774",
"0.7073005",
"0.68392444",
"0.66553426",
"0.6612657",
"0.6597123",
"0.65874046",
"0.651352",
"0.64082724",
"0.64022493",
"0.6401017",
"0.635387",
"0.6344267",
"0.6334641",
"0.63181096",
"0.62612283",
"0.6239612",
"0.622958",
"0.62243754",
"0.6214315",
"0.6211875... | 0.75502867 | 1 |
Update multiple documents. (list) documents (mixed) (Exception) | def updateDocumentAll(self, documents):
docs = []
for document in documents:
if isinstance(document, couch.Document):
document = document.getData()
# these are required params
if "_id" not in document or "_rev" not in document:
raise Exception("Both _id & ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def updateMultipleDocuments(cred, payload):\n\n url = cred.base_url + \"documents:commit\"\n data = { 'writes': [] }\n\n for path, fieldData in payload.iteritems():\n pathData = createFirestoreDataObject(cred, path, fieldData)\n data['writes'].append(pathData)\n \n makeRequest(cred, ur... | [
"0.78099144",
"0.7534766",
"0.75062966",
"0.7235758",
"0.7190231",
"0.7041025",
"0.6973437",
"0.68992174",
"0.68857944",
"0.6773296",
"0.6708585",
"0.6685556",
"0.6675647",
"0.65449",
"0.65124184",
"0.6472734",
"0.6444656",
"0.64238936",
"0.64129144",
"0.63841826",
"0.6369809... | 0.7975772 | 0 |
Delete a document. (mixed) document (mixed|dict|None) (Exception) | def deleteDocument(self, document):
data = self.deleteDocumentAll([document])
try:
return data[0]
except: pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_document(self):\n pass",
"def delete_document(self, document):\n assert isinstance(document, pylastica.document.Document), \"document must be a Document object: %r\" % document\n options = document.get_options([\n 'version',\n 'version_type',\n 'ro... | [
"0.854854",
"0.7985816",
"0.79602367",
"0.77905333",
"0.7671771",
"0.76135665",
"0.7500454",
"0.7358197",
"0.720484",
"0.7169715",
"0.71652853",
"0.7159339",
"0.7127536",
"0.71197265",
"0.7083857",
"0.70511234",
"0.70165825",
"0.7002135",
"0.69746053",
"0.6959095",
"0.6949389... | 0.83614945 | 1 |
Delete multiple documents. (list) documents (mixed) (Exception) | def deleteDocumentAll(self, documents):
docs = []
for document in documents:
if isinstance(document, couch.Document):
document = document.getData()
# just add "_deleted" param into document
document["_deleted"] = True
docs.append(document)
return self... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deleteDocument(cred, documentPaths):\n for documentPath in documentPaths:\n url = cred.base_url + \"documents/\" + documentPath\n\n makeRequest(cred, url, 'DELETE')",
"def delete(self, docs: DocumentArray, *args, **kwargs):\n cursor = self.connection.cursor()\n psycopg2.extras.... | [
"0.75507",
"0.7483352",
"0.7301912",
"0.7285418",
"0.72843164",
"0.72680336",
"0.7206066",
"0.70919824",
"0.7041331",
"0.703872",
"0.6864328",
"0.6850383",
"0.68409914",
"0.6829072",
"0.6810127",
"0.67259806",
"0.67087394",
"0.6707566",
"0.66987157",
"0.6647907",
"0.6610914",... | 0.76793355 | 0 |
Get database changes. (dict|None) query (list) docIds (mixed) | def getChanges(self, query = {}, docIds = []):
if not docIds:
return self.client.get(self.name +"/_changes", query).getBodyData()
query = query or {}
# ensure query filter
if "filter" not in query:
query["filter"] = "_doc_ids"
return self.client.post(self.name +"/_chang... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def all_changes(db):\n changes = db['changes']\n\n for c in changes.find():\n yield Change(c)",
"def get_documents() -> list[Document]:\n g.ledger.changed()\n return [e for e in g.filtered.entries if isinstance(e, Document)]",
"def changelog(database: Database, nr_changes: int, **uuids):\n ... | [
"0.6487273",
"0.64745814",
"0.62022734",
"0.6122241",
"0.6058865",
"0.6057436",
"0.5836886",
"0.580801",
"0.57459617",
"0.56311685",
"0.56311685",
"0.561473",
"0.5611481",
"0.5547698",
"0.55470645",
"0.5528323",
"0.5522995",
"0.5508942",
"0.5460746",
"0.5379281",
"0.5360777",... | 0.75472516 | 0 |
Compact database. (str) ddoc mixed | def compact(self, ddoc = ""):
return self.client.post(self.name +"/_compact/"+ ddoc).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_DB(self, doc_files):\n\t\tcompteur=0\n\t\tdoc_name=doc_files+'doc_'+str(compteur)+'.txt'\n\t\twhile os.path.exists(doc_name):\n\t\t doc=Doc(doc_name)\n\t\t self.DB.add_doc(doc)\n\t\t compteur+=1\n\t\t doc_name=doc_files+'doc_'+str(compteur)+'.txt'\n\t\tprint \"Number of documents in the Data Base: \"... | [
"0.55888885",
"0.55718595",
"0.5545751",
"0.5450331",
"0.5441021",
"0.53697366",
"0.52911764",
"0.52885437",
"0.52682585",
"0.5236551",
"0.5206599",
"0.52048665",
"0.518499",
"0.5125269",
"0.5121712",
"0.5114919",
"0.51134604",
"0.5107076",
"0.5075558",
"0.50194037",
"0.50088... | 0.675761 | 0 |
View cleanup, so remove unneded view index files. (mixed) | def viewCleanup(self):
return self.client.post(self.name +"/_view_cleanup").getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clearViews(request):\n return redirect(\"home\")",
"def cleanup(self):\n index_id = self.params[\"index_id\"]\n\n # Remove the index document from the database.\n self.db.indexes.delete_one({\"_id\": index_id})\n\n self.dispatch(\"indexes\", \"delete\", [index_id])\n\n q... | [
"0.6842255",
"0.6781138",
"0.6723472",
"0.6611905",
"0.6464315",
"0.63532996",
"0.6257693",
"0.6242239",
"0.61868984",
"0.6119992",
"0.6114376",
"0.60640466",
"0.6026558",
"0.6004134",
"0.6001217",
"0.5975733",
"0.59358555",
"0.58973235",
"0.58761585",
"0.5762732",
"0.5712189... | 0.7383045 | 0 |
Create (and execute) a temporary view. (string) map (string|None) reduce (mixed) | def viewTemp(self, map, reduce = None):
return self.client.post(self.name +"/_temp_view", None,
{"map":map, "reduce":reduce}).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_map_reduce(self):\n outfile = cStringIO.StringIO()\n var_order = [2,1,0]\n\n \n # Write out in the order 2, 1, 0. In a normal program those constants\n # would come from an enum indicating the order in which the fields\n # appear in schema\n aggregator = lr... | [
"0.50765437",
"0.50461334",
"0.48576868",
"0.48564032",
"0.48163113",
"0.47419778",
"0.47339833",
"0.47279567",
"0.4608937",
"0.4591241",
"0.45833737",
"0.4578122",
"0.4565904",
"0.44983184",
"0.44623956",
"0.44551846",
"0.44538876",
"0.44160914",
"0.44105223",
"0.44015622",
... | 0.6233113 | 0 |
Set the security object for the database. (dict) admins (dict) members (mixed) (Exception) | def setSecurity(self, admins = {}, members = {}):
admins, members = admins or {}, members or {}
if ("names" not in admins or "roles" not in admins
or "names" not in members or "roles" not in members):
raise Exception("Specify admins and/or members with names=>roles fields!")
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_security(self, secobj):\n with SecurityDocument(self.cloudant_database) as sec_doc:\n # context manager saves\n for key in sec_doc:\n del sec_doc[key]\n for k, v in secobj.items():\n sec_doc[k] = v\n return self.get_security()",
... | [
"0.71343416",
"0.6238021",
"0.5764386",
"0.5729426",
"0.5572113",
"0.555214",
"0.5530345",
"0.55035365",
"0.54517037",
"0.5408705",
"0.5408705",
"0.53911316",
"0.5369847",
"0.53649384",
"0.5352794",
"0.53076476",
"0.5307175",
"0.53050363",
"0.5276571",
"0.52599055",
"0.524271... | 0.71073496 | 1 |
Permanently remove the references to deleted documents from the database. (str) docId (list) docRevs (mixed) | def purge(self, docId, docRevs):
return self.client.post(self.name +"/_purge", None,
{docId: docRevs}).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete(self, doc_id, doc_rev):\n headers = {'If-Match': doc_rev}\n url = '/'.join([self.url, self.db, doc_id])\n r = requests.delete(url, headers=headers)\n if r.status_code != 200:\n raise Exception(\"HTTP \" + str(r.status_code))",
"def delete_docs(self, docs, empty_o... | [
"0.68039834",
"0.65360206",
"0.6525212",
"0.6505973",
"0.6444762",
"0.6378858",
"0.6366382",
"0.6346002",
"0.6328677",
"0.6302514",
"0.6301834",
"0.6259889",
"0.62486005",
"0.61599386",
"0.6085523",
"0.60242635",
"0.6024021",
"0.6020497",
"0.5949303",
"0.585777",
"0.5822132",... | 0.70110476 | 0 |
Get the document revisions that do not exist in the database. (str) docId (list) docRevs (mixed) | def getMissingRevisions(self, docId, docRevs):
return self.client.post(self.name +"/_missing_revs", None,
{docId: docRevs}).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getMissingRevisionsDiff(self, docId, docRevs):\n return self.client.post(self.name +\"/_revs_diff\", None,\n {docId: docRevs}).getBodyData()",
"def getREVIssues(db):\n return map(trimmedREVDoc,\n db.reviews.find({\"done\": False, \"lgtms\": {\"$exists\": False}}))",
"def get_d... | [
"0.77465665",
"0.64262056",
"0.5819118",
"0.57928604",
"0.5722721",
"0.55840975",
"0.54831105",
"0.5478584",
"0.5419591",
"0.5378559",
"0.5261083",
"0.5253438",
"0.52523065",
"0.5240468",
"0.519454",
"0.5144665",
"0.5143659",
"0.514143",
"0.5111656",
"0.50992197",
"0.508413",... | 0.82235867 | 0 |
Get the subset of those that do not correspond to revisions stored in the database. (str) docId (list) docRevs (mixed) | def getMissingRevisionsDiff(self, docId, docRevs):
return self.client.post(self.name +"/_revs_diff", None,
{docId: docRevs}).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getMissingRevisions(self, docId, docRevs):\n return self.client.post(self.name +\"/_missing_revs\", None,\n {docId: docRevs}).getBodyData()",
"def get_unlabelled_documents_queryset(self):\n queryset = self.get_queryset()\n\n # Retrieve labelled IDs\n labelled_ids = self.get_... | [
"0.6968676",
"0.62757945",
"0.6029085",
"0.60112655",
"0.5796243",
"0.5786746",
"0.5634135",
"0.56114686",
"0.54787636",
"0.5477941",
"0.5468216",
"0.54656684",
"0.5433515",
"0.53004605",
"0.52851826",
"0.52675676",
"0.52418417",
"0.50862885",
"0.5062252",
"0.49948937",
"0.49... | 0.65350854 | 1 |
Get the current "revs_limit" (revision limit) setting. (int) | def getRevisionLimit(self):
return self.client.get(self.name +"/_revs_limit").getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setRevisionLimit(self, limit):\n return self.client.put(self.name +\"/_revs_limit\", None, limit).getBodyData()",
"def get_limit(self):\n return self.limit",
"def get_limit(self):\n return self._limit",
"def get_limit(self):\n return self._limit",
"def limit(self):\n re... | [
"0.77255625",
"0.7021097",
"0.6959421",
"0.6959421",
"0.6694741",
"0.6694741",
"0.6430344",
"0.6255963",
"0.6254812",
"0.61720395",
"0.6131563",
"0.6104614",
"0.60650253",
"0.59897816",
"0.59867847",
"0.5967378",
"0.5967092",
"0.59318274",
"0.5925763",
"0.59253764",
"0.592110... | 0.826944 | 0 |
Set the current "revs_limit" (revision limit) setting. (int) limit (mixed) | def setRevisionLimit(self, limit):
return self.client.put(self.name +"/_revs_limit", None, limit).getBodyData() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_limit(self, limit):\n self.limit = limit\n self._prune()",
"def getRevisionLimit(self):\n return self.client.get(self.name +\"/_revs_limit\").getBodyData()",
"def SetLimit(self, *args):\n return _BRepAlgo.BRepAlgo_NormalProjection_SetLimit(self, *args)",
"def limit(self, lim... | [
"0.6917625",
"0.6857605",
"0.66053945",
"0.6602822",
"0.6602822",
"0.6602822",
"0.6594543",
"0.6535649",
"0.65266085",
"0.64890593",
"0.6478399",
"0.63712174",
"0.6257707",
"0.60748005",
"0.6017279",
"0.6012214",
"0.5952001",
"0.5936896",
"0.59314567",
"0.59136355",
"0.590478... | 0.87726605 | 0 |
Scans a physical disk at disk_url, creates a scan file and saves it at scan_file_dir Scan file can be converted into a SemanticDiskEngine object, but only NTFS volumes will have any data at all, and only metadata. | def scan_disk(disk_url, scan_file_dir):
# make the dir if it doesn't exist
if not os.path.exists(scan_file_dir):
os.makedirs(scan_file_dir)
# open up the image
img = pytsk3.Img_Info(url=disk_url)
# get the volume info
VOL_INFO = pytsk3.Volume_Info(img)
# print out some i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scan_disks():\n disks = get_disks()\n\n # Get disk details\n for disk in disks:\n # Get partition style\n disk['Table'] = get_table_type(disk)\n\n # Get disk name/model and physical details\n disk.update(get_disk_details(disk))\n\n # Get partition info for disk\n disk['Partitions'] = get_p... | [
"0.5176828",
"0.5053886",
"0.4732638",
"0.47221076",
"0.4695053",
"0.4614912",
"0.45604998",
"0.45434868",
"0.4539425",
"0.4539425",
"0.45263734",
"0.45119947",
"0.45113498",
"0.45068026",
"0.446161",
"0.4457252",
"0.44203302",
"0.44179124",
"0.4412884",
"0.43939742",
"0.4379... | 0.7032303 | 0 |
Sparse files for unallocated space or unsupported filesystems | def save_sparse(sparse_number, scan_file_dir, len_bytes):
logger.info("Saving sparse data.")
fname = os.path.join(scan_file_dir, "sparse"+str(sparse_number))
f = open(fname, 'ab')
f.truncate(len_bytes)
f.close()
return fname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_sparse(f, vol=DMG_VOLUME_NAME, fs=DMG_DEFAULT_FS, mountpoint=DMG_MOUNT, dry_run=ARGS.dry_run):\n result = None\n sparseimage = Path('{f}.sparseimage'.format(f=f)) if not str(f).endswith('.sparseimage') else Path(f)\n\n if not isinstance(mountpoint, Path):\n mountpoint = Path(mountpoint)\... | [
"0.60973555",
"0.58297205",
"0.5687104",
"0.5451819",
"0.54395884",
"0.5424618",
"0.5384249",
"0.5364704",
"0.5326901",
"0.53123873",
"0.51812476",
"0.5156405",
"0.51373065",
"0.5120344",
"0.51124233",
"0.50768536",
"0.506891",
"0.50668067",
"0.50525",
"0.50525",
"0.5042461",... | 0.60911804 | 1 |
Computes the Euclidean distance between rows of 'X' and rows of 'Xtest' | def euclidean_dist_squared(X, Xtest):
return np.sum(X**2, axis=1)[:,None] + np.sum(Xtest**2, axis=1)[None] - 2 * np.dot(X,Xtest.T)
# without broadcasting:
# n,d = X.shape
# t,d = Xtest.shape
# D = X**2@np.ones((d,t)) + np.ones((n,d))@(Xtest.T)**2 - 2*X@Xtest.T | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_distances(self, X):\n num_test = X.shape[0]\n num_train = self.X_train.shape[0]\n dists = np.zeros((num_test, num_train))\n \n sum_test_square = np.sum(np.square(X), axis=1).reshape(-1, 1)\n sum_train_square = np.sum(np.square(self.X_train), axis=1).reshape(-1, 1... | [
"0.7366164",
"0.73052317",
"0.7162334",
"0.7152637",
"0.7010976",
"0.6955845",
"0.6955845",
"0.69257826",
"0.6906152",
"0.6888624",
"0.6838205",
"0.67319787",
"0.67113405",
"0.6625997",
"0.6581194",
"0.65710795",
"0.65633863",
"0.6519284",
"0.6498425",
"0.6447752",
"0.6427021... | 0.7961684 | 0 |
Update Stack's currency with a given value. | def updateCurrency(self, currency: str, value: str) -> None:
if currency == "USDT":
self._USDT = float(value)
elif currency == "ETH":
self._ETH = float(value)
elif currency == "BTC":
self._BTC = float(value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def change_price(self, value): \n value = self.price",
"def format_currency(value, currency=\"USD\"):\n symbol = CURRENCIES[currency][\"symbol\"]\n\n return \"%s%s\" % (symbol, round(value) / 100)",
"async def set_currency(self, currency: str):\n json = {**self.get_data(), \"currencyId\": c... | [
"0.60010123",
"0.5893632",
"0.57380164",
"0.57254374",
"0.57075036",
"0.56984043",
"0.56984043",
"0.56984043",
"0.56984043",
"0.56679785",
"0.56300604",
"0.54938513",
"0.5454203",
"0.5446152",
"0.543147",
"0.5414669",
"0.5411957",
"0.5407819",
"0.5390974",
"0.53639185",
"0.53... | 0.7322223 | 0 |
Update Stack's currencies from the given command. | def update_s(self, updateCommand: str) -> None:
currenciesUpdate = updateCommand.split(sep=",")
if len(currenciesUpdate) is not 3:
Logger("Might update the three currencies.")
return
for currencyUpdate in currenciesUpdate:
update = currencyUpdate.split(sep="... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_settings(command):\n namespace = app.main(command)\n assert namespace.command == 'u' or namespace.command == \"updatesettings\"",
"def update_stock(option, stock):\n lowered_opt = option.lower()\n if lowered_opt == 'f':\n stock[\"five\"]+=1\n elif lowered_opt == 'o':\n sto... | [
"0.5118964",
"0.50880444",
"0.5078902",
"0.50084573",
"0.50015914",
"0.49701083",
"0.49340314",
"0.49003208",
"0.48828048",
"0.48751676",
"0.48618007",
"0.48497853",
"0.48473632",
"0.4832575",
"0.48187694",
"0.48165464",
"0.48111126",
"0.4809619",
"0.4794288",
"0.4759543",
"0... | 0.64856386 | 0 |
Returns a value in Sublime Text's settings file | def get_sublime(self, key, default=None):
return self.sublime_settings.get(key, default) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def settings():\n return _get_settings()[1]",
"def get_setting_value(self, title, setting):\r\n return self.parser.get(title, setting)",
"def file_name(self):\n return self.name + '.sublime-settings'",
"def get_setting(which, default=None):\n settings = QSettings('USGS', 'guanoeditor')\n ... | [
"0.71429825",
"0.68833137",
"0.6775958",
"0.65221494",
"0.6432501",
"0.6207987",
"0.6183132",
"0.6104724",
"0.6102577",
"0.59805095",
"0.5975891",
"0.589315",
"0.5880934",
"0.58360827",
"0.5832989",
"0.5815088",
"0.5803238",
"0.5793106",
"0.57881093",
"0.5786521",
"0.57713073... | 0.7707067 | 0 |
Returns the processed view's group and index | def get_view_index(self, key):
group_settings = self.get(key)
view_group = -1
view_index = -1
window = sublime.active_window()
view = window.active_view()
current_group, current_index = window.get_view_index(view)
for group_setting in group_settings:
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _getGroupIndex(self):\n return copy.deepcopy(self._group_index)",
"def _getGroupIndex(self):\n return copy.deepcopy(self._group_index)",
"def get_debug_index(name=None):\r\n # Set group and index for each debug view\r\n breakpoint_group = get_value(S.KEY_BREAKPOINT_GROUP, -1)\r\n bre... | [
"0.6900552",
"0.6900552",
"0.65036124",
"0.638696",
"0.6258358",
"0.6208498",
"0.6133117",
"0.60072374",
"0.58788896",
"0.5853668",
"0.5841622",
"0.5803315",
"0.576409",
"0.5723506",
"0.5682181",
"0.56816834",
"0.56425756",
"0.5614514",
"0.5609213",
"0.55979174",
"0.55827665"... | 0.74922854 | 0 |
Returns whether settings are ready to be used | def ready(self):
return self.settings is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_settings(self):\n pass",
"def check_settings(self):\r\n pass",
"def is_setup(self):\n return self._market_data_sock_info.ready.is_set() and \\\n self._orders_sock_info.ready.is_set()",
"def configured(self):\n return self._optional or self.ready()",
"def ... | [
"0.76344365",
"0.76162714",
"0.7299227",
"0.7269583",
"0.7183383",
"0.7121698",
"0.70650893",
"0.7056003",
"0.703516",
"0.69944656",
"0.69864106",
"0.6983592",
"0.69819415",
"0.6971682",
"0.6948749",
"0.6941797",
"0.69299155",
"0.6927403",
"0.69120926",
"0.68935144",
"0.67944... | 0.86375195 | 0 |
Exception.with_traceback(tb) set self.__traceback__ to tb and return self. | def with_traceback(self, tb): # real signature unknown; restored from __doc__
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WrappedException(self) -> object:",
"def reraise(exception_class, e, traceback=None):\n try:\n e = exception_class(\"\" if e is None else e)\n if e.__traceback__ is not traceback:\n raise e.with_traceback(traceback)\n raise e\n finally:\n ... | [
"0.5987309",
"0.5953781",
"0.59018964",
"0.5863477",
"0.5807588",
"0.58008033",
"0.572044",
"0.57091415",
"0.569477",
"0.56432295",
"0.556439",
"0.537897",
"0.5359169",
"0.53149515",
"0.5295616",
"0.5262731",
"0.5262731",
"0.5257782",
"0.52253854",
"0.5209788",
"0.5207411",
... | 0.7416604 | 0 |
A move is valid if the chosen cell is empty | def valid_move(x, y):
if [x, y] in empty_cells(board):
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isLegalMove(self, column, state):\n \n for i in range(6):\n if state[i][column] == ' ':\n # once we find the first empty, we know it's a legal move\n return True\n \n # if we get here, the column is full\n return False",
"def move_va... | [
"0.74975675",
"0.72044504",
"0.7123773",
"0.70122266",
"0.6999459",
"0.698641",
"0.6952747",
"0.69518375",
"0.6944301",
"0.69423324",
"0.69382113",
"0.69361067",
"0.6933988",
"0.69228756",
"0.69140935",
"0.68995947",
"0.6898277",
"0.68812275",
"0.68639076",
"0.68425095",
"0.6... | 0.7653947 | 0 |
Set the move on board, if the coordinates are valid | def set_move(x, y, player, xi, yi):
if valid_move(x, y):
board[x][y] = player
board[xi][yi] = 0
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_move(self, board):\n user_input = self.get_user_input(\n 'coordinates of next move (x,y): '\n )\n move = self.transform_user_input(user_input)\n\n valid = board.move_is_valid(move)\n while not valid:\n user_input = self.get_user_input(\n ... | [
"0.7428019",
"0.71092373",
"0.7015963",
"0.70088",
"0.6936503",
"0.692291",
"0.68933105",
"0.688197",
"0.6787634",
"0.6764633",
"0.67580676",
"0.6747932",
"0.66932666",
"0.66889393",
"0.66844594",
"0.6678542",
"0.66688395",
"0.66686535",
"0.66652036",
"0.66585314",
"0.6657071... | 0.75921804 | 0 |
get_csas ciscoToken auth token from Cisco API Oauth csaParam search by what csaParamValue search parameter value | def get_csas(ciscoToken,csaParam,csaParamValue):
date = str(datetime.date.today())
ciscoTokenHeader = "Bearer " + ciscoToken
csaBaseUrl = 'https://api.cisco.com/security'
csaUrlY = '/advisories/cvrf/year/' # <YYYY - year>
csaUrlAll = '/advisories/cvrf/all'
csaUrlCve = '/advisories/cvrf/cve/'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def psirt_get_token():\n creds = json.load(open('creds.json'))\n psirt_headers = {'Content-Type': 'application/x-www-form-urlencoded'}\n psirt_payload = {\n 'client_id': creds['CLIENT_ID'],\n 'client_secret': creds['CLIENT_SECRET'],\n 'grant_type': 'client_credentials'\n }\n url... | [
"0.6010371",
"0.5442733",
"0.5332393",
"0.52155715",
"0.5119013",
"0.50927144",
"0.5004644",
"0.498877",
"0.4980103",
"0.49789926",
"0.48310238",
"0.48263535",
"0.48007572",
"0.47805667",
"0.47256306",
"0.4725277",
"0.46955785",
"0.46931717",
"0.4689277",
"0.46836177",
"0.465... | 0.6577107 | 0 |
Returns the output tensor at the given index. | def get_output_tensor(index):
output_details = interpreter.get_output_details()[index]
tensor = np.squeeze(interpreter.get_tensor(output_details['index']))
return tensor | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_output_tensor(self, index):\n output_details = self.model.get_output_details()[index]\n tensor = np.squeeze(self.model.get_tensor(output_details['index']))\n return tensor",
"def get_output_tensor(self, index):\n output_details = self.interpreter.get_output_details()[index]\n ... | [
"0.8773681",
"0.87153566",
"0.86581725",
"0.8473132",
"0.8446493",
"0.8446493",
"0.8446493",
"0.75534517",
"0.7171569",
"0.68134344",
"0.6715133",
"0.6542007",
"0.65397805",
"0.65058136",
"0.6436549",
"0.6430624",
"0.63161963",
"0.6215072",
"0.6104049",
"0.6095873",
"0.608248... | 0.88110566 | 0 |
Returns a list of detection results, each a dictionary of object info. If classes is None, return all | def detect_objects(image, threshold, classes_incl=None):
set_input_tensor(image)
interpreter.invoke()
# Get all output details
boxes = get_output_tensor(0)
classes = get_output_tensor(1)
scores = get_output_tensor(2)
count = int(get_output_tensor(3))
results = []
for i in range(cou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def detect_objects(interpreter, image):\n set_input_tensor(interpreter, image)\n interpreter.invoke()\n\n # Get all output details\n boxes = get_output_tensor(interpreter, 0)\n classes = get_output_tensor(interpreter, 1)\n scores = get_output_tensor(interpreter, 2)\n count = int(get_output_ten... | [
"0.678076",
"0.6609013",
"0.6485807",
"0.6481792",
"0.64596814",
"0.6415124",
"0.63866055",
"0.6221281",
"0.6165529",
"0.6160837",
"0.6160301",
"0.6133809",
"0.60750854",
"0.59835714",
"0.5975361",
"0.5961792",
"0.59229106",
"0.5864082",
"0.5837682",
"0.5833264",
"0.58326215"... | 0.69507647 | 0 |
Callback will execute upon a creation of a new station | def on_new_station(self, func):
self._set_event_handler("stations")
self._events.on_new_station(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_station(self, station_id=None, time=None, location=None):",
"def on_station_member_member_added(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_member_added(func)",
"def on_station_member_station_updated(\n self, func,\n ):\n self._se... | [
"0.679513",
"0.62780607",
"0.6241043",
"0.6100334",
"0.60837287",
"0.6062058",
"0.60402775",
"0.60220957",
"0.5858145",
"0.5814468",
"0.5761134",
"0.5739674",
"0.5734084",
"0.5680822",
"0.56590843",
"0.56186336",
"0.5609303",
"0.5603253",
"0.5589692",
"0.5564803",
"0.55043507... | 0.77319133 | 0 |
Callback will execute upon an invite sent Emitted to admin of a station | def on_station_admin_invite_sent(self, func):
self._set_event_handler("stations")
self._events.on_station_admin_invite_sent(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_accepted(func)",
"def on_station_user_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_accepted(fu... | [
"0.7862821",
"0.72521",
"0.70023113",
"0.6733019",
"0.66984695",
"0.6528772",
"0.62504756",
"0.61556804",
"0.6079399",
"0.6075541",
"0.60602736",
"0.6042864",
"0.5990507",
"0.59235895",
"0.584231",
"0.5645996",
"0.55794823",
"0.5565687",
"0.5527262",
"0.5505544",
"0.55029124"... | 0.80180174 | 0 |
Callback will execute upon a user receiving an invite to a station Emitted to the user that receives the invite | def on_station_user_invite_received(self, func):
self._set_event_handler("stations")
self._events.on_station_user_invite_received(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_user_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_accepted(func)",
"def on_station_admin_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_accepted(fu... | [
"0.81320995",
"0.7638876",
"0.74999964",
"0.7029182",
"0.68845016",
"0.68583107",
"0.6756366",
"0.6501223",
"0.6459037",
"0.6394603",
"0.6124593",
"0.59051687",
"0.585066",
"0.5805171",
"0.5777452",
"0.5753945",
"0.5743887",
"0.5603031",
"0.5583114",
"0.5568773",
"0.55654657"... | 0.80623764 | 1 |
Callback will execute upon an invite to a station being accepted Emitted to admin of station | def on_station_admin_invite_accepted(self, func):
self._set_event_handler("stations")
self._events.on_station_admin_invite_accepted(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_invite_sent(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_sent(func)",
"def on_station_user_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_accepted(func)",
... | [
"0.79052866",
"0.77318126",
"0.7097689",
"0.7077527",
"0.67795974",
"0.65844184",
"0.6377679",
"0.6272416",
"0.61911255",
"0.6121152",
"0.610797",
"0.6050859",
"0.5862195",
"0.5843526",
"0.584177",
"0.5809505",
"0.57833284",
"0.57717896",
"0.5746687",
"0.57142836",
"0.5685872... | 0.82094496 | 0 |
Callback will execute upon a member has been added (request has been approved or invitation has been accepted) Emitted to all members of a station | def on_station_member_member_added(self, func):
self._set_event_handler("stations")
self._events.on_station_member_member_added(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_accepted(func)",
"def on_station_admin_invite_sent(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_sent(func)",
... | [
"0.6841414",
"0.6628625",
"0.64575094",
"0.6273292",
"0.6245261",
"0.62287843",
"0.6219931",
"0.5960429",
"0.59503126",
"0.5925391",
"0.59035707",
"0.58338773",
"0.58319974",
"0.580299",
"0.57956725",
"0.57725805",
"0.5745193",
"0.5730113",
"0.57162654",
"0.5690115",
"0.56886... | 0.68647575 | 0 |
Callback will execute upon a user accepting an invite to a station Emitted to user who has accepted the invitation | def on_station_user_invite_accepted(self, func):
self._set_event_handler("stations")
self._events.on_station_user_invite_accepted(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_user_invite_received(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_received(func)",
"def on_station_admin_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_accepted(fu... | [
"0.78580874",
"0.7703749",
"0.7360052",
"0.7022292",
"0.6522973",
"0.6501082",
"0.6446508",
"0.642123",
"0.63783103",
"0.61350745",
"0.6080096",
"0.6079129",
"0.6003704",
"0.5899242",
"0.5853112",
"0.5750894",
"0.5734992",
"0.56970996",
"0.5684728",
"0.5667676",
"0.5656933",
... | 0.8246524 | 0 |
Callback will execute when an invite to a station has been rejected Emitted to admin of station | def on_station_admin_invite_rejected(self, func):
self._set_event_handler("stations")
self._events.on_station_admin_invite_rejected(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_user_invite_rejected(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_rejected(func)",
"def on_station_admin_request_rejected(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_... | [
"0.78471124",
"0.7169883",
"0.6917644",
"0.6909588",
"0.66046244",
"0.65094304",
"0.63467664",
"0.6090597",
"0.6034777",
"0.593315",
"0.5861387",
"0.58386743",
"0.5782971",
"0.5741078",
"0.5646873",
"0.56354505",
"0.56138223",
"0.55414087",
"0.55413914",
"0.55212015",
"0.5496... | 0.81823933 | 0 |
Callback will execute when an invite to a station has been rejected Emitted to admin of station | def on_station_user_invite_rejected(self, func):
self._set_event_handler("stations")
self._events.on_station_user_invite_rejected(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_invite_rejected(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_rejected(func)",
"def on_station_admin_request_rejected(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admi... | [
"0.8182359",
"0.71699804",
"0.69147366",
"0.69103426",
"0.66014355",
"0.650725",
"0.63464254",
"0.6092195",
"0.6032582",
"0.5933349",
"0.58619887",
"0.58406657",
"0.5785721",
"0.57378733",
"0.5648342",
"0.56360805",
"0.561547",
"0.5544359",
"0.55401415",
"0.5521986",
"0.54966... | 0.78478223 | 1 |
Callback will execute when a request to join the station has been received Emitted to admin of station | def on_station_admin_request_received(self, func):
self._set_event_handler("stations")
self._events.on_station_admin_request_received(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_request_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_request_accepted(func)",
"def on_station_admin_invite_sent(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_sent(func)"... | [
"0.68466026",
"0.66937715",
"0.6670364",
"0.646025",
"0.64006436",
"0.6288368",
"0.6053946",
"0.6022353",
"0.5994483",
"0.58155864",
"0.5807389",
"0.5659682",
"0.56535447",
"0.5645651",
"0.5607143",
"0.5590763",
"0.55168384",
"0.5516614",
"0.54948854",
"0.54890245",
"0.545305... | 0.68960047 | 0 |
Callback will execute when a request to join the station has been sent Emitted to user requesting to join the station | def on_station_user_request_sent(self, func):
self._set_event_handler("stations")
self._events.on_station_user_request_sent(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_join(data):\n username = request.sid\n room = data\n join_room(room)\n logging.info(username + ' has entered the room.')\n send(username + ' has entered the room.', room=room)",
"def on_station_user_request_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._... | [
"0.66841453",
"0.6485123",
"0.62627167",
"0.6253512",
"0.61368406",
"0.6130546",
"0.61215",
"0.61135936",
"0.6058494",
"0.6054133",
"0.5874718",
"0.5859308",
"0.5694417",
"0.5681543",
"0.56435835",
"0.55247724",
"0.5517709",
"0.54644835",
"0.5449132",
"0.544854",
"0.5442675",... | 0.65409917 | 1 |
Callback will execute when a request to join a station has been accepted Emitted to admin of station | def on_station_admin_request_accepted(self, func):
self._set_event_handler("stations")
self._events.on_station_admin_request_accepted(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_accepted(func)",
"def on_station_admin_invite_sent(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_sent(func)",
... | [
"0.7303009",
"0.6945661",
"0.6935645",
"0.690319",
"0.6659846",
"0.6527142",
"0.6212868",
"0.58979154",
"0.5848147",
"0.58288276",
"0.575778",
"0.5556925",
"0.5516092",
"0.5484132",
"0.54261506",
"0.53491837",
"0.5336381",
"0.53317463",
"0.5302548",
"0.5281141",
"0.5278474",
... | 0.74382514 | 0 |
Callback will execute when a request to join a station has been accepted Emitted to user who sent the request | def on_station_user_request_accepted(self, func):
self._set_event_handler("stations")
self._events.on_station_user_request_accepted(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_user_invite_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_accepted(func)",
"def on_station_admin_request_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_request_accepted(... | [
"0.6955949",
"0.6827532",
"0.6813382",
"0.67880994",
"0.65492254",
"0.63253266",
"0.6229898",
"0.6229525",
"0.5894921",
"0.5725823",
"0.57227594",
"0.5636143",
"0.5626334",
"0.55548686",
"0.55215067",
"0.54907984",
"0.5421875",
"0.5383727",
"0.5361264",
"0.53532314",
"0.53511... | 0.72116745 | 0 |
Callback will execute when a request to join a station has been rejected Emitted to admin of station | def on_station_admin_request_rejected(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_admin_request_rejected(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_invite_rejected(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_invite_rejected(func)",
"def on_station_user_request_rejected(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_... | [
"0.7508049",
"0.7241212",
"0.69624627",
"0.64785105",
"0.6446646",
"0.616859",
"0.6132982",
"0.58746403",
"0.5815561",
"0.5778777",
"0.5693765",
"0.5642176",
"0.5598876",
"0.5520983",
"0.5473266",
"0.54699033",
"0.54599476",
"0.5319745",
"0.5295449",
"0.5279028",
"0.52723986"... | 0.7643505 | 0 |
Callback will execute when a request to join a station has been rejected Emitted to user who sent the request | def on_station_user_request_rejected(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_user_request_rejected(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_request_rejected(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_request_rejected(func)",
"def on_station_user_invite_rejected(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user... | [
"0.72242796",
"0.7169859",
"0.71093756",
"0.62692106",
"0.6162381",
"0.6093102",
"0.6071127",
"0.6063276",
"0.6037017",
"0.58516705",
"0.5825428",
"0.5823648",
"0.5689596",
"0.5682142",
"0.5650242",
"0.5580757",
"0.5561729",
"0.5425182",
"0.54223937",
"0.53186864",
"0.5317048... | 0.7520852 | 0 |
Callback will execute when a member has been removed from a station Emitted to admin of station | def on_station_admin_member_removed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_admin_member_removed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_member_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_member_removed(func)",
"def on_station_member_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_s... | [
"0.8090614",
"0.72844404",
"0.7180372",
"0.7098552",
"0.6893531",
"0.6693755",
"0.6601275",
"0.6580021",
"0.6401644",
"0.62114555",
"0.62074566",
"0.6165935",
"0.6130952",
"0.6130265",
"0.6118406",
"0.6112828",
"0.6060032",
"0.59372896",
"0.59356517",
"0.5895339",
"0.58849907... | 0.8322047 | 0 |
Callback will execute when a machine has been removed from a station Emitted to admin of station | def on_station_admin_lz_removed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_admin_machine_removed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_member_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_member_removed(func)",
"def on_station_member_member_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.o... | [
"0.74925554",
"0.7185477",
"0.71297985",
"0.71214736",
"0.6928152",
"0.68192637",
"0.6769653",
"0.6763081",
"0.6616809",
"0.6492403",
"0.6285061",
"0.62381095",
"0.6017558",
"0.6000559",
"0.58863384",
"0.58476645",
"0.5845622",
"0.5812123",
"0.57870406",
"0.5757434",
"0.57293... | 0.80288905 | 0 |
Callback will execute when a member has been removed from a station Emitted to members of a station | def on_station_member_member_removed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_member_member_removed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_member_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_member_removed(func)",
"def on_station_member_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_sta... | [
"0.78925335",
"0.7475585",
"0.74634963",
"0.72404945",
"0.71363336",
"0.68487024",
"0.63081086",
"0.6298412",
"0.6183536",
"0.61618805",
"0.60892916",
"0.60709155",
"0.6061602",
"0.6021408",
"0.6017846",
"0.59470177",
"0.5895361",
"0.57695997",
"0.57521033",
"0.5735757",
"0.5... | 0.83721423 | 0 |
Callback will execute when a lz has been removed from a station Emitted to members of a station | def on_station_member_lz_removed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_member_lz_removed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_member_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_member_removed(func)",
"def on_station_admin_member_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.... | [
"0.7467587",
"0.7158304",
"0.70554227",
"0.705402",
"0.6673115",
"0.645907",
"0.6301589",
"0.61691844",
"0.6152636",
"0.6126467",
"0.6068689",
"0.6062918",
"0.58316433",
"0.58020496",
"0.57546675",
"0.57270175",
"0.5691494",
"0.5670227",
"0.56700915",
"0.56591135",
"0.5659113... | 0.8013014 | 0 |
Callback will execute when a user has withdrawn from the station Emitted to user that is withdrawing | def on_station_user_withdrawn(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_user_withdrawn(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def withdrawn(self, withdrawn):\n\n self._withdrawn = withdrawn",
"def withdraw(self, responder):\n self._apply_decision(self.Status.WITHDRAWN, responder)",
"def register_withdraw(self, withdraw_intent): \n if withdraw_intent > 0:\n self.teo.register_withdraw(self, withdr... | [
"0.6280947",
"0.6161329",
"0.60593873",
"0.59035903",
"0.58503324",
"0.5846078",
"0.5838894",
"0.56733334",
"0.56080455",
"0.5599047",
"0.55697167",
"0.5512106",
"0.5434457",
"0.54135007",
"0.54083556",
"0.5343418",
"0.53159446",
"0.52895343",
"0.5268842",
"0.5216583",
"0.520... | 0.75991595 | 0 |
Callback will execute when a user has been expelled from the station Emitted to user that has been expelled | def on_station_user_expelled(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_user_expelled(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_user_invite_received(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_invite_received(func)",
"def on_station_user_request_sent(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_user_request_sent(func)",
... | [
"0.6032986",
"0.60228616",
"0.6012655",
"0.5971325",
"0.5862614",
"0.5816621",
"0.57896817",
"0.5784432",
"0.5752986",
"0.57082874",
"0.5644239",
"0.56391656",
"0.5633405",
"0.56310546",
"0.5574033",
"0.55336314",
"0.5490777",
"0.5488117",
"0.53740114",
"0.5361506",
"0.535511... | 0.7557197 | 0 |
Callback will execute when a station has been destroyed Emitted to admin of station | def on_station_admin_destroyed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_admin_destroyed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_destroyed(func)",
"def on_station_user_request_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_stati... | [
"0.8119965",
"0.7651988",
"0.70316553",
"0.70093346",
"0.6988427",
"0.69162315",
"0.6827265",
"0.6782444",
"0.6442174",
"0.63427293",
"0.6286415",
"0.6148036",
"0.61342084",
"0.6057831",
"0.5978917",
"0.596644",
"0.5874533",
"0.5806393",
"0.5776957",
"0.5764307",
"0.57577187"... | 0.82311636 | 0 |
Callback will execute when a station has been destroyed Emitted to member of station | def on_station_member_destroyed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_member_destroyed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_destroyed(func)",
"def on_station_user_request_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station... | [
"0.78202033",
"0.75016516",
"0.72711587",
"0.72461313",
"0.7081167",
"0.6945979",
"0.67467195",
"0.66403705",
"0.6390623",
"0.6238821",
"0.60153306",
"0.5947399",
"0.59003234",
"0.58888316",
"0.5882677",
"0.58649814",
"0.58599377",
"0.58599377",
"0.5857766",
"0.5851037",
"0.5... | 0.86095256 | 0 |
Callback will execute when a station has been destroyed Emitted to anyone who received an invite to join the station | def on_station_user_invite_destroyed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_user_invite_destroyed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_destroyed(func)",
"def on_station_user_request_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_stati... | [
"0.7774978",
"0.7354801",
"0.7010772",
"0.6798138",
"0.67609",
"0.6598042",
"0.65846235",
"0.6543447",
"0.61129767",
"0.5965243",
"0.5905298",
"0.5861055",
"0.5828097",
"0.5757637",
"0.5714835",
"0.5710986",
"0.56373346",
"0.5623654",
"0.5599341",
"0.55976605",
"0.55884725",
... | 0.78109205 | 0 |
Callback will execute when a station has been destroyed Emitted to anyone who sent a request to join to the station | def on_station_user_request_destroyed(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_user_request_destroyed(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_destroyed(func)",
"def on_station_admin_destroyed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admi... | [
"0.7938453",
"0.7332709",
"0.7107509",
"0.6903696",
"0.67589515",
"0.653213",
"0.64212835",
"0.6412175",
"0.6031238",
"0.6008196",
"0.59244275",
"0.58895844",
"0.5883974",
"0.5865049",
"0.57975787",
"0.5796525",
"0.57758373",
"0.57524854",
"0.571541",
"0.5638192",
"0.5600419"... | 0.7689759 | 1 |
Callback will execute when a lz has been added to the station Emitted to admin of station | def on_station_admin_lz_added(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_admin_lz_added(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_lz_added(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_lz_added(func)",
"def on_station_admin_request_accepted(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_request_ac... | [
"0.7202812",
"0.67835104",
"0.6777509",
"0.66383225",
"0.6385432",
"0.6299666",
"0.6266086",
"0.6250439",
"0.62372637",
"0.6170564",
"0.60402745",
"0.6015254",
"0.6008367",
"0.5960361",
"0.5904323",
"0.5803821",
"0.5748409",
"0.5697951",
"0.56553054",
"0.56054586",
"0.5587225... | 0.7767337 | 0 |
Callback will execute when a lz has been added to the station Emitted to members of station | def on_station_member_lz_added(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_member_lz_added(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_lz_added(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_lz_added(func)",
"def on_station_member_member_added(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_member_added(f... | [
"0.721138",
"0.6940183",
"0.6660081",
"0.642822",
"0.6207639",
"0.6136572",
"0.6130722",
"0.6065644",
"0.6048055",
"0.59229004",
"0.5910956",
"0.5905538",
"0.5896204",
"0.5871022",
"0.5846699",
"0.5839158",
"0.5759173",
"0.5727858",
"0.5689695",
"0.5646457",
"0.5568246",
"0... | 0.77562016 | 0 |
Callback will execute when a volume has been added to the station Emitted to admin of station | def on_station_admin_volume_added(self, func):
self._set_event_handler("stations")
self._events.on_station_admin_volume_added(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_volume_added(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_volume_added(func)",
"def on_station_admin_volume_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_s... | [
"0.7859221",
"0.72667104",
"0.696747",
"0.6805496",
"0.6788688",
"0.65589756",
"0.64129627",
"0.6382112",
"0.6334093",
"0.6064404",
"0.60157835",
"0.5939194",
"0.59246176",
"0.587847",
"0.5875471",
"0.5869398",
"0.5828167",
"0.5781829",
"0.5688935",
"0.5655154",
"0.56378186",... | 0.8197018 | 0 |
Callback will execute when a volume has been added to the station Emitted to members of station | def on_station_member_volume_added(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_member_volume_added(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_admin_volume_added(self, func):\n self._set_event_handler(\"stations\")\n self._events.on_station_admin_volume_added(func)",
"def on_station_member_volume_removed(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_volu... | [
"0.7613187",
"0.7274015",
"0.6893663",
"0.66773164",
"0.6530562",
"0.6248589",
"0.6238693",
"0.62022597",
"0.6062868",
"0.6047132",
"0.5972762",
"0.5931559",
"0.5906756",
"0.57900226",
"0.5726604",
"0.5689329",
"0.56803286",
"0.5656226",
"0.56335336",
"0.5633369",
"0.56183165... | 0.8199039 | 0 |
Callback will execute when a volume host path has been added Emitted to admin of station | def on_station_admin_volume_host_path_added(
self, func,
):
self._set_event_handler("stations")
self._events.on_station_admin_volume_host_path_added(func) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_station_member_volume_host_path_added(\n self, func,\n ):\n self._set_event_handler(\"stations\")\n self._events.on_station_member_volume_host_path_added(func)",
"def on_station_admin_volume_host_path_removed(\n self, func,\n ):\n self._set_event_handler(\"stations... | [
"0.805942",
"0.75566065",
"0.71610796",
"0.70932186",
"0.6492289",
"0.6430323",
"0.6325891",
"0.5912592",
"0.5764045",
"0.57638437",
"0.5752357",
"0.5739366",
"0.5607364",
"0.55918765",
"0.5553969",
"0.5551826",
"0.55396825",
"0.5520093",
"0.5482749",
"0.5459397",
"0.53581035... | 0.8371554 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.