query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Verify that the k8s job succeeded
def _ensure_successful_job(k8s_ctx: str, k8s_job_file: pathlib.Path, dry_run: bool = False) -> None: if not k8s_job_file.exists(): raise FileNotFoundError(str(k8s_job_file)) cmd = f'kubectl --context={k8s_ctx} get -f {k8s_job_file} -o json' if dry_run: logging.info(cmd) return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _job_succeeded(k8s_ctx: str, k8s_job_file: pathlib.Path, dry_run: bool = False) -> bool:\n if not k8s_job_file.exists():\n raise FileNotFoundError(str(k8s_job_file))\n\n cmd = f'kubectl --context={k8s_ctx} get -f {k8s_job_file} -o json'\n\n if dry_run:\n logging.info(cmd)\n return...
[ "0.7243436", "0.6838614", "0.6621957", "0.661534", "0.6345359", "0.6335698", "0.6323335", "0.6229853", "0.62206024", "0.61564785", "0.6155526", "0.6098027", "0.6045814", "0.6034818", "0.6030602", "0.60113835", "0.6005282", "0.59931767", "0.5990048", "0.59655994", "0.59544134"...
0.71603185
1
Check whether persistent volume snapshot is ready
def _snapshot_ready(k8s_ctx: str, k8s_spec_file: pathlib.Path, dry_run: bool = False) -> bool: if not k8s_spec_file.exists(): raise FileNotFoundError(str(k8s_spec_file)) cmd = f'kubectl --context={k8s_ctx} get -f {k8s_spec_file} -o json' if dry_run: logging.info(cmd) return True ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def snapshot_volumes(self) -> bool:\n return pulumi.get(self, \"snapshot_volumes\")", "def _IsReady(self):\n return self._GetPod()['status']['phase'] != 'Pending'", "def _wait_until_volume_available(self, volume, maybe_in_use=False):\n ok_states = [\"creating\"] # it's ok to wait if the volum...
[ "0.6778808", "0.6521101", "0.63207036", "0.6315146", "0.6265592", "0.622958", "0.61976886", "0.61875296", "0.6180802", "0.6176623", "0.61693776", "0.61398023", "0.6051415", "0.6027882", "0.60233265", "0.60011977", "0.5982842", "0.5962757", "0.5861081", "0.5847211", "0.5834819...
0.68950456
0
Wait for the PVC snapshot to be ready or raise a TimeoutError after specified number of attempts.
def _wait_for_snapshot(k8s_ctx: str, spec_file: pathlib.Path, attempts: int = 30, secs2wait: int = 20, dry_run: bool = False) -> None: for counter in range(attempts): if _snapshot_ready(k8s_ctx, spec_file, dry_run): break time.sleep(secs2wait) else: raise TimeoutError(f'{spec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_for_pvc(k8s_ctx: str, pvc_name: str, attempts: int = 30, secs2wait: int = 20, dry_run: bool = False) -> None:\n for counter in range(attempts):\n if _pvc_bound(k8s_ctx, pvc_name, dry_run):\n break\n time.sleep(secs2wait)\n else:\n raise TimeoutError(f'Waiting for PVC ...
[ "0.68641895", "0.65287995", "0.6082232", "0.60197186", "0.6005225", "0.59622586", "0.5947616", "0.5915617", "0.58709437", "0.57942975", "0.57836044", "0.57385135", "0.5725081", "0.5724657", "0.56830114", "0.5620255", "0.5616016", "0.55936587", "0.5574639", "0.5546054", "0.552...
0.76268655
0
Check whether a persistent volume claim is bound to a kubernetes node
def _pvc_bound(k8s_ctx: str, pvc_name: str, dry_run: bool = False) -> bool: cmd = f'kubectl --context={k8s_ctx} get pvc {pvc_name} -o json' if dry_run: logging.info(cmd) return True p = safe_exec(cmd) if not p.stdout: return False json_output = json.loads(p.stdout.decode(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_booted_from_volume(self, instance, disk_mapping=None):\n return not bool(instance.get('image_ref'))", "def can_handle(self, rsm_ctx):\n return rsm_ctx.instance.type == NODE_TYPE_QUOTA", "def can_reach_metadata_server():\n try:\n http_client = _obtain_http_client(hostname=_METADA...
[ "0.57044387", "0.55365884", "0.551062", "0.54884076", "0.5434074", "0.54069275", "0.5402176", "0.5394375", "0.53685576", "0.5321871", "0.5291866", "0.5244603", "0.52340746", "0.52208585", "0.52021044", "0.5195634", "0.5176338", "0.5152459", "0.50973433", "0.50880367", "0.5085...
0.63240516
0
Wait for the persistent volume claim to be bound to an instance. A bound PVC means that a persistent disk has been created.
def wait_for_pvc(k8s_ctx: str, pvc_name: str, attempts: int = 30, secs2wait: int = 20, dry_run: bool = False) -> None: for counter in range(attempts): if _pvc_bound(k8s_ctx, pvc_name, dry_run): break time.sleep(secs2wait) else: raise TimeoutError(f'Waiting for PVC {pvc_name} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _wait_until_volume_available(self, volume, maybe_in_use=False):\n ok_states = [\"creating\"] # it's ok to wait if the volume is in this\n tries = 0\n if maybe_in_use:\n ok_states.append(\"in_use\")\n logger.info(\"Volume: %s is in state: %s\", volume.name, volume.state)\...
[ "0.5896992", "0.5781035", "0.5712666", "0.56834656", "0.56729543", "0.56464386", "0.5645018", "0.5619778", "0.55979586", "0.55502456", "0.53824466", "0.5378539", "0.5355347", "0.5350618", "0.53472906", "0.5329603", "0.53034407", "0.5259739", "0.5248038", "0.5234132", "0.52156...
0.630798
0
Initialize storage for ElasticBLAST cluster
def initialize_storage(cfg: ElasticBlastConfig, query_files: List[str] = [], wait=ElbExecutionMode.WAIT) -> None: use_local_ssd = cfg.cluster.use_local_ssd if use_local_ssd: initialize_local_ssd(cfg, query_files, wait) else: initialize_persistent_disk(cfg, query_files, wait)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_beeswax_db(cls):\n global _INITIALIZED\n if _INITIALIZED:\n return\n\n make_query(cls.client, 'CREATE DATABASE IF NOT EXISTS %(db)s' % {'db': cls.db_name}, wait=True)\n make_query(cls.client, 'CREATE DATABASE IF NOT EXISTS %(db)s_other' % {'db': cls.db_name}, wait=True)\n\n if cls.load...
[ "0.61822534", "0.61604846", "0.61142486", "0.61103785", "0.6019239", "0.600666", "0.59842885", "0.59343857", "0.57664347", "0.5744994", "0.57356334", "0.5724775", "0.57101536", "0.57081795", "0.5696668", "0.56931335", "0.5670077", "0.56564623", "0.5631872", "0.5608877", "0.56...
0.74047345
0
Initialize local SSDs for ElasticBLAST cluster
def initialize_local_ssd(cfg: ElasticBlastConfig, query_files: List[str] = [], wait=ElbExecutionMode.WAIT) -> None: db, db_path, _ = get_blastdb_info(cfg.blast.db, cfg.gcp.get_project_for_gcs_downloads()) if not db: raise ValueError("Config parameter 'db' can't be empty") dry_run = cfg.cluster.dry_r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_storage(cfg: ElasticBlastConfig, query_files: List[str] = [], wait=ElbExecutionMode.WAIT) -> None:\n use_local_ssd = cfg.cluster.use_local_ssd\n if use_local_ssd:\n initialize_local_ssd(cfg, query_files, wait)\n else:\n initialize_persistent_disk(cfg, query_files, wait)", "d...
[ "0.66219467", "0.6232512", "0.59862846", "0.5774646", "0.57388014", "0.5706254", "0.5698521", "0.5565083", "0.5551789", "0.5548251", "0.5548236", "0.5532527", "0.55006236", "0.54399735", "0.5400785", "0.5354679", "0.533072", "0.532619", "0.5325551", "0.5290499", "0.5258854", ...
0.60757315
2
Initialize Persistent Disk for ElasticBLAST execution
def initialize_persistent_disk(cfg: ElasticBlastConfig, query_files: List[str] = [], wait=ElbExecutionMode.WAIT) -> None: # ${LOGDATETIME} setup_pd start >>${ELB_LOGFILE} db, db_path, _ = get_blastdb_info(cfg.blast.db, cfg.gcp.get_project_for_gcs_downloads()) if not db...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_storage(cfg: ElasticBlastConfig, query_files: List[str] = [], wait=ElbExecutionMode.WAIT) -> None:\n use_local_ssd = cfg.cluster.use_local_ssd\n if use_local_ssd:\n initialize_local_ssd(cfg, query_files, wait)\n else:\n initialize_persistent_disk(cfg, query_files, wait)", "d...
[ "0.69325453", "0.6751443", "0.6751443", "0.6653742", "0.6350506", "0.63132924", "0.5965553", "0.5893428", "0.588529", "0.58253783", "0.58102304", "0.5791366", "0.57175225", "0.5694924", "0.5682932", "0.56052977", "0.5575009", "0.5567323", "0.5530617", "0.54932505", "0.5454839...
0.71941566
0
Label disk with given claim with standard labels
def label_persistent_disk(cfg: ElasticBlastConfig, pv_claim: str) -> None: use_local_ssd = cfg.cluster.use_local_ssd if use_local_ssd: return dry_run = cfg.cluster.dry_run cluster_name = cfg.cluster.name labels = cfg.cluster.labels get_pv_cmd = f'kubectl --context={cfg.appstate.k8s_ctx}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_base_image_labels(driver, user_disk, img_name, branch, target):\n\n dashes = [i for i, c in enumerate(img_name) if c=='-']\n cf_version = img_name[dashes[0]+1:dashes[3]]\n build_id = img_name[dashes[-1]+1:]\n\n driver.ex_set_volume_labels(user_disk,\n {'cf_version': cf_version, 'branch':...
[ "0.5758011", "0.56702936", "0.5651301", "0.54146427", "0.5399197", "0.53988075", "0.5323684", "0.52344555", "0.5222524", "0.52210075", "0.51896286", "0.51797324", "0.515616", "0.51407397", "0.5139695", "0.51392925", "0.5135739", "0.5114927", "0.50736207", "0.50625324", "0.505...
0.6934975
0
Check that server set after gcp.get_gke_credentials is alive
def check_server(k8s_ctx: str, dry_run: bool = False): cmd = f'kubectl --context={k8s_ctx} version --short' if dry_run: logging.info(cmd) else: safe_exec(cmd)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ft_credential_server():\n ensure_credential_server_running( run_once=True, foreground=True )", "def check_server():\n\n url='{url}/auth'.format(url=config.SERVER_URL)\n while True:\n\n try:\n res=request.urlopen(url,timeout=5).read()\n res=str(res,encoding='utf8')\n ...
[ "0.6182946", "0.6138832", "0.5968581", "0.5966169", "0.59497523", "0.5877434", "0.5827503", "0.58103245", "0.57660997", "0.5742771", "0.5707626", "0.5705608", "0.565789", "0.5629737", "0.56063974", "0.5598198", "0.5525763", "0.5518381", "0.5509588", "0.548903", "0.54651225", ...
0.0
-1
Collect logs from Kubernetes.
def get_logs(k8s_ctx: str, label: str, containers: List[str], dry_run: bool = False): for c in containers: cmd = f'kubectl --context={k8s_ctx} logs -l {label} -c {c} --timestamps --since=24h --tail=-1' if dry_run: logging.info(cmd) else: try: # kubectl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collect_k8s_logs(cfg: ElasticBlastConfig):\n dry_run = cfg.cluster.dry_run\n k8s_ctx = cfg.appstate.k8s_ctx\n if not k8s_ctx:\n raise RuntimeError(f'kubernetes context is missing for {cfg.cluster.name}')\n # TODO use named constants for labels and containers\n # also modify corresponding ...
[ "0.7308022", "0.7177128", "0.70522076", "0.64065844", "0.6268711", "0.6268711", "0.61853147", "0.61756486", "0.6170662", "0.6147985", "0.60778475", "0.6039634", "0.60380864", "0.6027567", "0.5917655", "0.58830225", "0.5881376", "0.583538", "0.5802469", "0.5768473", "0.5762911...
0.6624328
3
Collect logs from Kubernetes logs for several label/container combinations.
def collect_k8s_logs(cfg: ElasticBlastConfig): dry_run = cfg.cluster.dry_run k8s_ctx = cfg.appstate.k8s_ctx if not k8s_ctx: raise RuntimeError(f'kubernetes context is missing for {cfg.cluster.name}') # TODO use named constants for labels and containers # also modify corresponding YAML templa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collect_logs_from_pod(namespace, pod, logs_dir, k8s_cli):\n containers = get_list_of_containers_from_pod(namespace, pod, k8s_cli)\n init_containers = get_list_of_init_containers_from_pod(namespace, pod, k8s_cli)\n containers.extend(init_containers)\n if containers is None:\n logger.warning(\...
[ "0.7182909", "0.71400505", "0.6958383", "0.6778838", "0.6523679", "0.6264228", "0.622623", "0.61939454", "0.59845686", "0.5965813", "0.59611726", "0.59611726", "0.5935786", "0.59302646", "0.5916675", "0.5870155", "0.58109695", "0.5809834", "0.57496893", "0.5732803", "0.562136...
0.6977004
2
Assign default service account cluster admin priveleges. Necessary for proper functioning of janitor and cloud submit jobs
def enable_service_account(cfg: ElasticBlastConfig): dry_run = cfg.cluster.dry_run logging.debug(f"Enabling service account") with TemporaryDirectory() as d: set_extraction_path(d) rbac_yaml = resource_filename('elastic_blast', 'templates/elb-janitor-rbac.yaml') cmd = f"kubectl --con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ensure_initial_admin(config):\n if get_api_version() > 2:\n manager = get_manager()\n default_domain_id = create_or_show_domain(DEFAULT_DOMAIN)\n leader_set({'default_domain_id': default_domain_id})\n admin_domain_id = create_or_show_domain(ADMIN_DOMAIN)\n ...
[ "0.58965456", "0.5454678", "0.5446887", "0.5400099", "0.53879905", "0.5352295", "0.53448015", "0.5342162", "0.5328383", "0.52938116", "0.526896", "0.5231793", "0.51919377", "0.51914835", "0.51685226", "0.51562625", "0.5155733", "0.51304394", "0.5110545", "0.51001656", "0.5099...
0.5189528
14
Creates a k8s cronjob to delete GCP cluster once the jobs are done
def submit_janitor_cronjob(cfg: ElasticBlastConfig): dry_run = cfg.cluster.dry_run janitor_schedule = ELB_DFLT_JANITOR_SCHEDULE_GCP if ELB_JANITOR_SCHEDULE in os.environ: janitor_schedule = os.environ[ELB_JANITOR_SCHEDULE] logging.debug(f'Overriding janitor schedule to "{janitor_schedule}"'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_job_schedule(self):\n job_schedule_delete = netapp_utils.zapi\\\n .NaElement.create_node_with_children(\n 'job-schedule-cron-destroy',\n **{'job-schedule-name': self.name})\n try:\n self.server.invoke_successfully(job_schedule_delete,\n ...
[ "0.6107607", "0.6002564", "0.59531444", "0.5917263", "0.5882619", "0.58595407", "0.5802002", "0.5662835", "0.55701196", "0.5563007", "0.5515092", "0.54493976", "0.54372144", "0.5400792", "0.5393199", "0.5387648", "0.5379455", "0.53551286", "0.5343901", "0.53183055", "0.531234...
0.5830477
6
Creates a k8s job to submit BLAST jobs
def submit_job_submission_job(cfg: ElasticBlastConfig): dry_run = cfg.cluster.dry_run subs = { 'K8S_JOB_SUBMIT_JOBS' : K8S_JOB_SUBMIT_JOBS, 'ELB_DOCKER_IMAGE' : ELB_CJS_DOCKER_IMAGE_GCP, 'ELB_GCP_PROJECT' : cfg.gcp.project, 'ELB_GCP_ZONE' : cfg.gcp.zone, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_job(api_instance, job):\n api_response = api_instance.create_namespaced_job(\n body=job, namespace=\"default\", pretty=True\n )\n logger.info(\"Job created with status='%s'\" % str(api_response.status))\n return api_response", "def _create_job(self,\n name,\n ...
[ "0.65601635", "0.6456106", "0.64101607", "0.62889904", "0.60392916", "0.5989142", "0.59834176", "0.59480613", "0.59373564", "0.5935629", "0.5929065", "0.58854586", "0.58693117", "0.5855808", "0.5849256", "0.579629", "0.5764425", "0.5734367", "0.5733252", "0.5725296", "0.57196...
0.67617774
0
Compute balanced seed loss
def __init__(self, eps: float=1e-5): self.eps = eps
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_dice_crossentropy_loss():\n assert dice_dice_crossentropy_loss() == expected_dice_crossentropy_loss", "def compute_loss(self):\n self.test_logits = self.compute_logits()\n loss = tf.nn.sparse_softmax_cross_entropy_with_logits(\n labels=self.data.test_labels, logits=self.test_logits)\n ...
[ "0.6412278", "0.62036204", "0.6196435", "0.6195581", "0.61794907", "0.61794907", "0.6134663", "0.6116744", "0.60979277", "0.60830367", "0.6067807", "0.6030138", "0.6020347", "0.59942544", "0.5973485", "0.5926284", "0.5905612", "0.5888543", "0.5878932", "0.5864883", "0.584793"...
0.0
-1
Compute balanced seed loss
def __call__(self, score_map, one_hot_label) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: assert not one_hot_label.requires_grad pi = one_hot_label.to(torch.float) assert not torch.any(torch.isinf(score_map)) assert not torch.any(torch.isnan(score_map)) log_qi = torch.lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_dice_crossentropy_loss():\n assert dice_dice_crossentropy_loss() == expected_dice_crossentropy_loss", "def compute_loss(self):\n self.test_logits = self.compute_logits()\n loss = tf.nn.sparse_softmax_cross_entropy_with_logits(\n labels=self.data.test_labels, logits=self.test_logits)\n ...
[ "0.6412278", "0.62036204", "0.6196435", "0.6195581", "0.61794907", "0.61794907", "0.6134663", "0.6116744", "0.60979277", "0.60830367", "0.6067807", "0.6030138", "0.6020347", "0.59942544", "0.5973485", "0.5926284", "0.5905612", "0.5888543", "0.5878932", "0.5864883", "0.584793"...
0.0
-1
Create a new product for the scenario It would be deleted at the tearDown
def setUp(self): super().setUp() list_of_product_types = [ 'default_product_variant', 'multiple_product_variants', 'ceo_title' ] self.new_product = eval(f"get_new_product_with_" \ f"{list_of_product_types[randint(0, len(list_of_product_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_01_product_create(self):\n # Create new product with a replacement product\n product = self.create_product()\n\n # Check recently was created product with default 'In Development'\n # value state and that the replacement was assigned. This case also\n # check the read te...
[ "0.7601618", "0.752833", "0.7353155", "0.72841406", "0.7263181", "0.7074391", "0.7024802", "0.699035", "0.69720995", "0.69443333", "0.6904304", "0.684024", "0.6830409", "0.6829515", "0.68056715", "0.68019325", "0.6705739", "0.6702876", "0.66581947", "0.6651187", "0.66456455",...
0.75885576
1
Create a new product and buy it along with existing one
def test_buy_now(self): catalog_page = CatalogPage(self.driver) product_page = ProductPage(self.driver) payment_page = PaymentPage(self.driver) payment_review_page = PaymentReviewPage(self.driver) payment_info_page = PaymentInfoPage(self.driver) success_page = SuccessPage...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def buy(self, product_id: int):\n ee = self.request.request(\n url=f'https://economy.roblox.com/v2/user-products/{product_id}/purchase',\n method='post')\n return ee", "def add_product(self):\n self.owner.new_product(self.barcode, self.description, self.price, sel...
[ "0.735359", "0.71443206", "0.71084017", "0.7047093", "0.7040663", "0.7022442", "0.69806325", "0.6965997", "0.6953303", "0.6949329", "0.6932501", "0.6912224", "0.6905006", "0.68999946", "0.68712866", "0.6832764", "0.6787224", "0.67799085", "0.67761487", "0.6768781", "0.6768526...
0.62568086
59
in addition to default tearDown delete new product that was created in setUp
def tearDown(self): ProcessRequest(f"products/{self.product_id}.json").send_request( 'DELETE', continue_on_error=True) super().tearDown()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tearDownClass(self):\n self.product_id = None", "def tearDown(self):\n del self.new", "def tearDown(self):\n util.delete_mocks()", "def tearDown(self):\n util.delete_mocks()", "def tearDown(self):\n util.delete_mocks()", "def tearDown(self):\n util.delete_moc...
[ "0.7673542", "0.76476455", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7402727", "0.7268774", "0.7223385", "0.72121155", "0.7198862", "0.7184747", "0.7164011", "0.7163723", "0.7111245", "0.71104", "0.71104", "0.71104", "0.70951384", "0.7086183", "0.7...
0.7786658
0
Tests the performance of the agent
def evaluate(self, runs = 5, use_gui = False): self.env.render(use_gui) evaluation_results = { "runs" : runs, "unfinished_runs" : 0, "average_delay" : [], "episode_mean_delays" : [], "episode_delay_lists" : [] } for i in range...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_agent(AgentFactory, steps, envs, percepts):\n print ('RUN TEST AGENT')\n envs.add_thing(AgentFactory)\n #envs.run(steps)\n \n agent = AgentFactory\n agent.program(percept)\n #envs.run(steps)\n envs.runPLWumpus(agent, steps)\n #envs.runPLWumpus(steps)\n print(' ------------PLW...
[ "0.6791763", "0.6692284", "0.6472564", "0.6311555", "0.63058454", "0.6276679", "0.6257189", "0.62086666", "0.62048584", "0.61926913", "0.6175451", "0.61510926", "0.6126369", "0.61106914", "0.60962504", "0.60887414", "0.6077805", "0.6060409", "0.6053641", "0.60355383", "0.6023...
0.0
-1
Incrementar ciclo de la simulacion
def OnNuevoCiclo(self, event): if self.clipsFile != "": clips.Assert("(Seguir S)") clips.Run() self.office.updatePeopleLocation() self.Refresh() error = clips.ErrorStream.Read() if error != None: print(error) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def increment_counter(self) -> None:", "def increase_counter(self):\n self.values = self.values + 1", "def increment_number(self):\n # self.number += 1\n print('fuckwit')\n # print(self.number)", "def increment(self):\r\n return self.add(1)", "def increment(self) -> global___...
[ "0.7661288", "0.7241211", "0.723567", "0.71288633", "0.7114365", "0.7087606", "0.70840394", "0.70431554", "0.7006013", "0.6944731", "0.693673", "0.6839732", "0.68132", "0.67405885", "0.668815", "0.66852885", "0.66219515", "0.66219515", "0.65973246", "0.65261966", "0.6499437",...
0.0
-1
Lanzar toda la simulacion
def OnLanzarSimulacion(self, event): if self.clipsFile != "": clips.Assert("(Seguir S)") clips.Run() self.office.updatePeopleLocation() self.Refresh() else: dlg = wx.MessageDialog(self, "No se ha cargado fichero .clp", "Error en ASSERT", wx.OK)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exo2():", "def mezclar_bolsa(self):", "def substantiate():", "def falcon():", "def sth():", "def simple():", "def simple():", "def regular(self):", "def _regr_basic():", "def g():", "def result(self):", "def result(self):", "def exercise_b2_53():\r\n pass", "def exercise_b2_113():\...
[ "0.69584775", "0.6749619", "0.6713742", "0.64656717", "0.6359033", "0.6328706", "0.6328706", "0.62757856", "0.6218919", "0.61349535", "0.5964754", "0.5964754", "0.59394264", "0.5912193", "0.5887806", "0.58347887", "0.5828976", "0.5822087", "0.5822087", "0.5822087", "0.5822087...
0.0
-1
Takes the original JSON data structure and generates a stream of data items as dictionaries made of key/value pairs.
def load_input(raw): columns = [(column, column['dataTypeName'] == 'text') for column in raw['meta']['view']['columns']] print('') print("[COLUMNS]") for column, selected in columns: if selected: try: description = column['description'].strip()[:50] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def json2dict(data):\n sub_all = data.get(\"values\")\n keys = data.get(\"fields\")\n dic_all = []\n for sub in sub_all:\n x = dict(zip(keys, sub))\n if not x['datastring'] is None:\n x['datastring'] = json.loads(x.get('datastring'))\n dic_all.append(x)\n return dic_a...
[ "0.65098023", "0.62888145", "0.6237558", "0.6040369", "0.6006107", "0.5962079", "0.5920561", "0.59005207", "0.581828", "0.57504183", "0.5685113", "0.561694", "0.55845666", "0.55844814", "0.5577096", "0.5543952", "0.5540783", "0.5534506", "0.5531823", "0.54926765", "0.5492299"...
0.0
-1
It rakes an input file with the source data and converts it to a stream of JSON documents.
def main(arguments): # The input file can be optionally encoded with gzip format: input_file = arguments.input_file[0] assert isinstance(input_file, str) if input_file.endswith(".gz"): _open = gzip.open else: _open = open with _open(input_file, "rt", encoding='utf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transform_file(input_file_path: str, output_file_path: str):\n\n # Open json\n with open(input_file_path, mode=\"r\") as in_file:\n input_data = json.load(in_file)\n\n # Transform and write\n with jsonlines.open(output_file_path, mode=\"w\", compact=True) as out_file:\n for item in in...
[ "0.6293595", "0.6250602", "0.62383056", "0.62383056", "0.6183641", "0.6183641", "0.6145613", "0.60405284", "0.59711635", "0.59660596", "0.5911783", "0.59033376", "0.58587277", "0.5830733", "0.5830733", "0.5815685", "0.5783476", "0.5749292", "0.5749292", "0.5746732", "0.554991...
0.5998158
8
Function that reads an image file and convert it into a given representation
def read_image(filename, representation): color_flag = True #if RGB image image = imread(filename) float_image = image.astype(np.float64) if not np.all(image <= 1): float_image /= NORMALIZE #Normalized to range [0,1] if len(float_image.shape) != 3 : #Checks if RGB or Grayscale co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_image(filename, representation):\n image = imread(filename)\n new_image = image.astype(np.float64)\n new_image /= 255\n if representation == 1:\n new_image = rgb2gray(new_image)\n return new_image", "def read_image(filename, representation):\n img = imread(filename)\n img = i...
[ "0.7449107", "0.72581416", "0.7177248", "0.7115413", "0.7029074", "0.70162386", "0.6951657", "0.69001406", "0.689829", "0.68941265", "0.6855205", "0.67252743", "0.665023", "0.66493964", "0.66025174", "0.657016", "0.6519702", "0.6510978", "0.64749444", "0.6460991", "0.64137334...
0.7181966
2
That function displays an image in a given representation
def imdisplay(filename, representation): image = read_image(filename, representation) plt.imshow(image, cmap="gray") plt.show()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display(self, image):\n raise NotImplementedError()", "def display(self):\n display(self.image)", "def display_image(mat):\n\timg = Image.fromarray(mat)\n\timg.show()", "def showimage(image):\n mplt.figure()\n mplt.imshow(image)\n mplt.show()", "def display_image ( X ):\r\n\t# on...
[ "0.7702066", "0.7678106", "0.7630015", "0.7384051", "0.72779155", "0.72562844", "0.725237", "0.72513103", "0.7247135", "0.7241654", "0.7196195", "0.7185689", "0.71471035", "0.70569164", "0.7045489", "0.7034913", "0.70256436", "0.70256436", "0.6965478", "0.6949715", "0.6930488...
0.73751575
4
This function transforms an RGB image to the YIQ color space
def rgb2yiq(imRGB): return np.dot(imRGB, np.array(MATRIX).T)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transformYIQ2RGB(imgYIQ: np.ndarray) -> np.ndarray:\r\n yiq_from_rgb = np.array([[0.299, 0.587, 0.114],\r\n [0.59590059, -0.27455667, -0.32134392],\r\n [0.21153661, -0.52273617, 0.31119955]])\r\n rgb_from_yiq = np.linalg.inv(yiq_from_rgb)\r\n\r\n ...
[ "0.8075077", "0.7972723", "0.78853625", "0.7761124", "0.7719949", "0.768193", "0.7594159", "0.7592578", "0.7579149", "0.7546962", "0.75089204", "0.7505258", "0.70519155", "0.69547826", "0.6946691", "0.69057375", "0.6859484", "0.679065", "0.65877485", "0.630929", "0.6295286", ...
0.7133341
12
This function transforms an YIQ color space to a RGB image
def yiq2rgb(imYIQ): return np.dot(imYIQ, np.linalg.inv(np.array(MATRIX).T))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transformYIQ2RGB(imgYIQ: np.ndarray) -> np.ndarray:\r\n yiq_from_rgb = np.array([[0.299, 0.587, 0.114],\r\n [0.59590059, -0.27455667, -0.32134392],\r\n [0.21153661, -0.52273617, 0.31119955]])\r\n rgb_from_yiq = np.linalg.inv(yiq_from_rgb)\r\n\r\n ...
[ "0.80520254", "0.8039881", "0.7962519", "0.7937877", "0.7900755", "0.73019373", "0.730139", "0.7127854", "0.71096927", "0.6935564", "0.6876887", "0.68677354", "0.68543035", "0.67816305", "0.672084", "0.6647167", "0.66198665", "0.6539262", "0.65241694", "0.64449745", "0.634743...
0.76489943
5
This function performs an histogram equalization of a given image
def histogram_equalize(im_orig): color_flag = False image = im_orig if len(im_orig.shape) == 3: #RGB image color_flag = True y_im = rgb2yiq(im_orig) image = y_im[:, :, 0] image *= NORMALIZE hist_orig, bins = np.histogram(image, range(BINS)) hist_cum = np.cumsum(hist_o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def equalise_hist(image, bin_count=256):\n # TODO: your histogram equalization code\n #define arrays\n image = img_as_ubyte(image)\n row,col = image.shape\n new_image = np.zeros((row,col),dtype='uint8') \n\n # compute the value of each grayscale,and save in image_hist \n image_hist = np.bincount(image.flatt...
[ "0.81590986", "0.8098537", "0.8089895", "0.79471034", "0.7874277", "0.7826743", "0.7749235", "0.769595", "0.76528543", "0.7423789", "0.7374871", "0.7359829", "0.735687", "0.7356559", "0.73502856", "0.73391485", "0.7225304", "0.722211", "0.72127074", "0.7191898", "0.7184982", ...
0.81297153
1
This function performs optimal quantization of a given grayscale or RGB image
def quantize(im_orig, n_quant, n_iter): color_flag = False image = im_orig error = list() if len(im_orig.shape) == 3: #RGB image color_flag = True y_im = rgb2yiq(im_orig) image = y_im[:, :, 0] if np.all(image <= 1): image *= NORMALIZE my_hist, bins = np.histog...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quantize(im_orig, n_quant, n_iter):\n shape_len = len(im_orig.shape)\n if shape_len == 2: # grayscale\n return quantization_helper(im_orig, n_quant, n_iter)\n\n elif shape_len == 3: # rgb\n im_yiq = rgb2yiq(im_orig)\n y = im_yiq[:, :, 0]\n y_quant, error = quantization_hel...
[ "0.67629147", "0.67326945", "0.64545953", "0.6432401", "0.63289773", "0.60762316", "0.60647696", "0.5980381", "0.5804083", "0.5782493", "0.5782493", "0.5782493", "0.57392335", "0.5699688", "0.56758535", "0.561525", "0.55881965", "0.5586545", "0.5531348", "0.5517089", "0.55085...
0.641383
4
Determines if natural number N is prime by trial division.
def trial_div(n: int) -> bool: if n == 1: return False i = 2 while i**2 <= n: if n % i == 0: return False i += 1 return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isprime(n):\r\n\treturn is_prime(n)", "def prime_t(n: int) -> bool:\n tests = set(range(2, int(math.sqrt(n) + 1)))\n non_factors = set(takewhile(lambda i: n % i != 0, tests))\n return tests == non_factors", "def prime_t(n: int) -> bool:\n tests = set(range(2, int(math.sqrt(n) + 1)))\n non_fa...
[ "0.75904524", "0.7572783", "0.7572783", "0.7533633", "0.75022924", "0.74241966", "0.73947245", "0.73647577", "0.73487324", "0.7345413", "0.7342212", "0.72686034", "0.7251062", "0.72339666", "0.7232719", "0.72271216", "0.72271216", "0.7186987", "0.71865153", "0.7166788", "0.71...
0.7699925
0
Generates the LucasLehmer sequence.
def lucas_lehmer() -> Generator[int, None, None]: seed = 4 while True: yield seed seed = seed**2 - 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lucas(input) :\n\n # if input == 0 :\n\n # return 2\n # elif input == 1 :\n\n # return 1\n\n # else :\n\n # return Lucas(input-1) + Lucas(input-2)\n\n\n return sum_series(input,2,1)", "def generate_random_MT_Lune_samp():\n # 1. Get randomly varied Lune parameters (g...
[ "0.5769175", "0.57630914", "0.5601627", "0.55063254", "0.5457792", "0.54477936", "0.53614664", "0.5287758", "0.5262873", "0.52039135", "0.5178368", "0.51434594", "0.5132669", "0.51296896", "0.508006", "0.50615644", "0.50557595", "0.50262654", "0.5007828", "0.5002165", "0.4987...
0.68218356
0
Determines if Mersenne number 2^N 1 is prime via the LucasLehmer primality test.
def ll_primality(n: int) -> bool: if n <= 2 or not trial_div(n): return False luc_leh = lucas_lehmer() for _ in range(n - 1): ll = next(luc_leh) return ll % (2**n - 1) == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_prime(n):\n return mr_prime(n)", "def test_prime(n):\n if SIEVE[n]:\n return True\n else:\n return False", "def isprime(n):\r\n\treturn is_prime(n)", "def isprime(n=936):\n if n < 3: return False\n for i in range(2, n):\n if n % i == 0:\n return False\n ...
[ "0.7239062", "0.7073942", "0.7019739", "0.70070904", "0.7005515", "0.6946308", "0.6864864", "0.68361056", "0.678722", "0.6734504", "0.6730105", "0.6687569", "0.66823626", "0.667622", "0.6668467", "0.6650945", "0.6643008", "0.6626922", "0.661976", "0.66106534", "0.6610468", ...
0.7341868
0
Yields all primes below N using the Sieve of Eratosthenes.
def sieve(n: int) -> Generator[int, None, None]: primes, p = [i for i in range(2, n + 1)], 2 while p**2 < n: for i in primes: if i % p == 0 and i != p: primes.remove(i) p += 1 yield from primes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def primes(n):\n\tsieve = [True] * n\n\tyield 2\n\tfor i in xrange(3,int(n**0.5)+1,2):\n\t\tif sieve[i]:\n\t\t\tyield i\n\t\t\tsieve[i*i::2*i] = [False]*((n-i*i-1)/(2*i)+1)\n\tfor i in xrange(i+2,n,2):\n\t\tif sieve[i]: yield i", "def primes(n):\n sieve = [True]*n\n for p in range(2, n):\n if sieve[...
[ "0.8024125", "0.8002254", "0.7932262", "0.7904185", "0.78591853", "0.7638811", "0.75153947", "0.75153947", "0.75134873", "0.7506634", "0.7475689", "0.74711454", "0.74352396", "0.74297386", "0.7427221", "0.74193126", "0.74012053", "0.7400942", "0.74002695", "0.7398897", "0.733...
0.77653205
5
calculates a gradient step with a CNN
def NN_gradienten_step(LEP,model): original_mesh = LEP.mesh # backup current mesh LEP.updateMesh(targetmesh) # project current solution on reference mesh # get phi and u as arrays ([:-1] because of lambda in the last coordinate) phi_val = LEP.phi_n.vector()[:] phi_coor = LEP.F.tabulate_dof_coordina...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gd(x0,gradient,learning_rate=1.0,min_step=1e-16,max_iters=1000,**kwargs):\n x = x0; i = 0; step_size = np.Inf\n while step_size > min_step and i < max_iters:\n x0 = x\n grad = gradient(x0)\n x = x0 - learning_rate*grad\n step_size = np.linalg.norm(x-x0)\n i += 1\n\n ...
[ "0.6585613", "0.653625", "0.65349156", "0.6519607", "0.6512883", "0.65008676", "0.6488376", "0.648457", "0.6452228", "0.6450012", "0.6432286", "0.6313621", "0.6273695", "0.62098813", "0.6192474", "0.61888814", "0.6185899", "0.6185899", "0.6180109", "0.61712617", "0.61653495",...
0.0
-1
Deterministic solvemethod for an Linear Elasticity Problem
def deterministic_NN_solve(LEP,model): # solve state equation SE = LEP.SE(LEP.u, LEP.phi_n[0], LEP.v_u, LEP.g) solve(lhs(SE) == rhs(SE), LEP.u_n, bcs=LEP.bcSE, solver_parameters={"linear_solver": "umfpack", "preconditioner": "default"}, form_compiler_parameters=None) # solve adjoint equation LEP.p_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solve(self):", "def get_sol(self):", "def solve(self):\n ...", "def solve(self):\n \n raise NotImplementedError(\"not implemented!\")", "def solve(self):\n pass", "def solve(self):\n pass", "def solve_elas(self,x,E_p=None):\n \n if x['Crystal_Structu...
[ "0.7224722", "0.69912314", "0.6899648", "0.66831875", "0.6625148", "0.6625148", "0.6569677", "0.65169144", "0.64995986", "0.64433146", "0.6418878", "0.64093494", "0.6375208", "0.6360713", "0.6352544", "0.6352544", "0.63449115", "0.6279814", "0.61759114", "0.61729276", "0.6145...
0.6131261
23
Deterministic solvemethod for an Linear Elasticity Problem
def deterministic_solve(LEP): # solve state equation SE = LEP.SE(LEP.u, LEP.phi_n[0], LEP.v_u, LEP.g) solve(lhs(SE) == rhs(SE), LEP.u_n, bcs=LEP.bcSE, solver_parameters={"linear_solver": "umfpack", "preconditioner": "default"}, form_compiler_parameters=None) # solve adjoint equation LEP.p_n.assign(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solve(self):", "def get_sol(self):", "def solve(self):\n ...", "def solve(self):\n \n raise NotImplementedError(\"not implemented!\")", "def solve(self):\n pass", "def solve(self):\n pass", "def solve_elas(self,x,E_p=None):\n \n if x['Crystal_Structu...
[ "0.7224722", "0.69912314", "0.6899648", "0.66831875", "0.6625148", "0.6625148", "0.6569677", "0.65169144", "0.64995986", "0.64433146", "0.6418878", "0.64093494", "0.6375208", "0.6360713", "0.6352544", "0.6352544", "0.63449115", "0.6279814", "0.61759114", "0.61729276", "0.6145...
0.5781621
66
Converts a NumPy image to a tf.Summary.Value object.
def image_to_tf_summary_value(image, tag): curr_image = np.asarray(image, dtype=np.uint8) height, width, n_channels = curr_image.shape # If monochrome image, then reshape to [height, width] if n_channels == 1: curr_image = np.reshape(curr_image, [height, width]) s = io.BytesIO() matplotlib_pyplot().imsa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def array_to_image_summary(array, format=\"png\"):\n height, width, channels = array.shape\n image = Image.fromarray(array)\n\n with io.BytesIO() as memf:\n image.save(memf, format=format)\n image_string = memf.getvalue()\n return tf.Summary.Image(\n height=height,\n width=w...
[ "0.6867479", "0.65719885", "0.64364594", "0.6324988", "0.6231608", "0.6231608", "0.6148279", "0.6141953", "0.6138373", "0.61298656", "0.6080713", "0.6017898", "0.60149074", "0.60149074", "0.60149074", "0.60122037", "0.59977126", "0.5987593", "0.59382886", "0.5902842", "0.5889...
0.8311787
0
Optionally converts images from hooks_args to image summaries.
def convert_predictions_to_image_summaries(hook_args): decode_hparams = hook_args.decode_hparams if not decode_hparams.display_decoded_images: return [] predictions = hook_args.predictions[0] # Display ten random inputs and outputs so that tensorboard does not hang. all_summaries = [] rand_predictions ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_stage(self, images):\n\n for i, image in enumerate(images):\n pass\n # logging_tags = logs.image_config_to_tags(image, self.group_by_keywords)", "def multi_run_wrapper(args):\n\treturn img_preprocessing(*args)", "def __call__(self, images, targets):\n pass", "def pr...
[ "0.57442975", "0.57011163", "0.5521036", "0.53856045", "0.5378818", "0.5378818", "0.5353799", "0.531765", "0.52791244", "0.52719086", "0.5230224", "0.52281237", "0.52281237", "0.5207086", "0.5201962", "0.5174777", "0.51720655", "0.51613", "0.5155435", "0.51528734", "0.5152154...
0.69051784
0
image resize function used by quite a few image problems.
def resize_by_area(img, size): return tf.to_int64( tf.image.resize_images(img, [size, size], tf.image.ResizeMethod.AREA))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_image(image):\n image = resize(image)\n return image", "def FlyResize( image, log_mess, nimages, method = Image.ANTIALIAS ):\n oldw, oldh = image.size\n resl = [8, 10, 14, 16, 20, 22, 24, 32, 40, 48, 64, 96, 128, 256]\n \n if oldw > 256 or oldh > 256:\...
[ "0.7521358", "0.74610686", "0.7421938", "0.73141485", "0.7142209", "0.7142209", "0.71145546", "0.71056485", "0.7080996", "0.7078732", "0.7073116", "0.7058495", "0.6986709", "0.69650143", "0.6933278", "0.6913644", "0.69086534", "0.690373", "0.6900538", "0.6889671", "0.68864405...
0.0
-1
Returns list of scaled images, one for each resolution.
def make_multiscale(image, resolutions, resize_method=tf.image.ResizeMethod.BICUBIC, num_channels=3): scaled_images = [] for height in resolutions: scaled_image = tf.image.resize_images( image, size=[height, height], # assuming that height = width ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scales(self):\n scales = queryMultiAdapter((self, self.request), name=\"images\")\n return scales", "def scale(img, scales):\n outputs = []\n for sc in scales:\n outputs.append(\n cv2.resize(img, None, fx=sc, fy=sc, interpolation=cv2.INTER_CUBIC)\n )\n return o...
[ "0.7400567", "0.6925044", "0.68059033", "0.6721329", "0.66487384", "0.6625194", "0.6619865", "0.6577308", "0.6562258", "0.6527271", "0.6507845", "0.6345303", "0.6319713", "0.63128996", "0.6248099", "0.6236228", "0.61226034", "0.61199546", "0.6042438", "0.6025261", "0.5975142"...
0.67498195
3
Returns list of scaled images, one for each resolution. Resizes by skipping every nth pixel.
def make_multiscale_dilated(image, resolutions, num_channels=3): image_height = common_layers.shape_list(image)[0] scaled_images = [] for height in resolutions: dilation_rate = image_height // height # assuming height = width scaled_image = image[::dilation_rate, ::dilation_rate] scaled_image = tf.to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resize_images(self, images):\n \n img_list = []\n \n for img in images:\n \n yield np.resize(img, (64, 64, 3))", "def resize_images(imgs, size=(720, 720)):\n res = []\n for img in imgs:\n\n factor = max(1, size[0]/float(img.shape[0]), size[1]/float(img.shape...
[ "0.6965899", "0.6890647", "0.6819921", "0.6661743", "0.6544926", "0.6532967", "0.6431577", "0.64254856", "0.6387828", "0.6340229", "0.6289193", "0.62139636", "0.61322016", "0.61032397", "0.60858595", "0.6070303", "0.6048841", "0.6043469", "0.6002986", "0.5975552", "0.59419584...
0.6684896
3
Number of color channels.
def num_channels(self): return 3
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_of_channels(self) -> int:\n return len(self.non_zero_channels())", "def n_channels(self):\n return len(self.channels)", "def n_channels(self):\n return self._n_channels", "def channels(self) -> int:\n return len(self._channel_arrays)", "def queryNumberOfColors(self):\n ...
[ "0.79698837", "0.7782575", "0.77616227", "0.74364847", "0.7303962", "0.72801465", "0.7276568", "0.7234011", "0.71893704", "0.7163125", "0.7106633", "0.71035886", "0.70540285", "0.7002933", "0.6996827", "0.6929145", "0.69025093", "0.68789124", "0.68253195", "0.6736472", "0.671...
0.75154245
3
Number of pixel values.
def vocab_size(self): return 256
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def numPixels(self):\n self._logger.debug(\"numPixels\")\n return self.count", "def numPixels(self):\n\t\treturn self.size", "def numPixels(self):\n\t\treturn self.size", "def count(self):\n \n return len(self.img_lst)", "def get_num_of_images(self):", "def GetNumberOfComponen...
[ "0.86553746", "0.86169404", "0.86169404", "0.73817253", "0.73454994", "0.7130761", "0.71236366", "0.7103836", "0.70961624", "0.70860696", "0.70763683", "0.70628375", "0.70424324", "0.7030204", "0.7015081", "0.7007118", "0.6998215", "0.69781816", "0.69707894", "0.6957646", "0....
0.0
-1
Yield images encoded as pngs.
def encode_images_as_png(images): if tf.executing_eagerly(): for image in images: yield tf.image.encode_png(image).numpy() else: (height, width, channels) = images[0].shape with tf.Graph().as_default(): image_t = tf.placeholder(dtype=tf.uint8, shape=(height, width, channels)) encoded_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _iter_images(self):\n for image in self._images:\n yield np.array(image.convert('RGB'))", "def _iter_images(self):\n for image in self._images:\n yield image", "def _iter_images(self):\n raise NotImplementedError", "def image_generator(images, labels):\n if not...
[ "0.74284726", "0.7120368", "0.70620733", "0.7001267", "0.6647991", "0.6641262", "0.65364003", "0.644897", "0.63591933", "0.6352729", "0.63406384", "0.63015574", "0.62920284", "0.62758785", "0.62565166", "0.6213246", "0.6183164", "0.615228", "0.6151142", "0.6129787", "0.612291...
0.64094543
8
Generator for images that takes image and labels lists and creates pngs.
def image_generator(images, labels): if not images: raise ValueError("Must provide some images for the generator.") width, height, _ = images[0].shape for (enc_image, label) in zip(encode_images_as_png(images), labels): yield { "image/encoded": [enc_image], "image/format": ["png"], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def image_generator(img_list):\n while True:\n img = random.choice(img_list)\n label = os.path.basename(os.path.dirname(img)) # add label function according to the dataset tree\n img = preprocess_image(img)\n yield img, label", "def batch(img_path, gt_path,img_list, batch, total_s...
[ "0.8013157", "0.7169892", "0.71564656", "0.702399", "0.68695503", "0.6713235", "0.6668822", "0.66558856", "0.6632258", "0.65799594", "0.65589684", "0.6515779", "0.65155697", "0.65101016", "0.64978045", "0.6496326", "0.64884", "0.6485673", "0.64815027", "0.6465144", "0.6454243...
0.80332494
0
Image augmentation suitable for CIFAR10/100.
def cifar_image_augmentation(images): images = tf.image.resize_image_with_crop_or_pad(images, 40, 40) images = tf.random_crop(images, [32, 32, 3]) images = tf.image.random_flip_left_right(images) return images
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_augmentation_sequence():\n # Macro to apply something with 50% chance\n sometimes = lambda aug: iaa.Sometimes(0.5, aug) # 50%\n rarely = lambda aug: iaa.Sometimes(0.1, aug) # 10%\n\n # Augmentation applied to every image\n # Augmentors sampled one value per channel\n aug_sequence = iaa.Se...
[ "0.7163005", "0.7071261", "0.7014249", "0.7005597", "0.6739197", "0.6528979", "0.6500406", "0.63945806", "0.63873875", "0.635612", "0.628733", "0.6277283", "0.62339985", "0.61770326", "0.61731637", "0.616266", "0.6130412", "0.61154556", "0.6099443", "0.6072942", "0.60591555",...
0.6585125
5
Apply random horizontal and vertical shift to images. This is the default dataaugmentation strategy used on CIFAR in Glow.
def random_shift(image, wsr=0.1, hsr=0.1): height, width, _ = common_layers.shape_list(image) width_range, height_range = wsr*width, hsr*height height_translations = tf.random_uniform((1,), -height_range, height_range) width_translations = tf.random_uniform((1,), -width_range, width_range) translations = tf.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shift_augmentation():\n shift = np.random.randint(-200, 201, size=2)\n return lambda image: shift_with_extension(image, shift)", "def random_shifts(self, image, label, h_shift, v_shift):\n\n rows = image.shape[0]\n cols = image.shape[1]\n\n horizontal = uniform(- h_shift / ...
[ "0.7565832", "0.68828964", "0.6849282", "0.67500216", "0.66608775", "0.6658838", "0.6638471", "0.65298706", "0.6441347", "0.6437689", "0.64301574", "0.6396851", "0.63864475", "0.63639367", "0.63604707", "0.6309984", "0.6303468", "0.62520194", "0.62459886", "0.61901236", "0.61...
0.6359114
15
Inserts the handle into the base object to prevent memory corruption in certain cases
def register_handle(handle, base_object): try: if base_object.IsKind("Standard_Transient"): base_object.thisHandle = handle base_object.thisown = False except: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new_handle(self):\n\n raise NotImplementedError('new_handle')", "def appendPhandle(self, obj):\n # Create a bogus state because we only need the Phandle dictionary\n state = FdtState(addr_cells=1, size_cells=1, cpu_cells=1)\n\n phandle = state.phandle(obj)\n self.append(Fdt...
[ "0.6344074", "0.6075597", "0.58665854", "0.5793248", "0.5771051", "0.5582377", "0.5384124", "0.531869", "0.52723384", "0.52723384", "0.52723384", "0.52709585", "0.52696466", "0.5216243", "0.5204256", "0.5171028", "0.51665926", "0.515439", "0.51379216", "0.5128355", "0.5126797...
0.66234106
6
this method makes a wire whose edges are C1 from a Wire whose edges could be G1. It removes a vertex between G1 edges. Option can be G1 or C1.
def ConcatenateWire(*args): return _BRepAlgo.brepalgo_ConcatenateWire(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _build_graph2(self, g1):\n g2 = g1.copy()\n for source, target, weight in self._remaining_edges:\n if weight == -1:\n self._gt_edges.append((source, target))\n if g2.has_edge(source, target):\n g2.remove_edge(source, target)\n ret...
[ "0.548062", "0.54205805", "0.5287949", "0.51086205", "0.48842067", "0.48342565", "0.4824531", "0.48094237", "0.47528753", "0.47327384", "0.472759", "0.47229192", "0.47211432", "0.4712262", "0.47049093", "0.46987176", "0.4694659", "0.4678394", "0.4678394", "0.4674186", "0.4642...
0.0
-1
this method makes an edge from a wire. Junction points between edges of wire may be sharp, resulting curve of the resulting edge may be C0.
def ConcatenateWireC0(*args): return _BRepAlgo.brepalgo_ConcatenateWireC0(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_edge(self, a, b):\n try: e = self.G.new_edge(a, b)\n except: return self.G.new_edge(a,b)\n\n try: self.G.set_edge_attribute(e, \"arrow\", \"true\")\n except: return self.G.new_edge(a,b)\n\n try: self.G.set_edge_attribute(e, \"spline\", \"false\")\n except: return ...
[ "0.61174107", "0.60685146", "0.57434285", "0.56741333", "0.5600909", "0.5600067", "0.5582746", "0.5530568", "0.5528883", "0.54733944", "0.54462737", "0.54074967", "0.53542346", "0.5343363", "0.5315694", "0.5315531", "0.52983046", "0.52760667", "0.5260912", "0.5250793", "0.523...
0.0
-1
Checks if the shape is 'correct'. If not, returns , else returns .
def IsValid(*args): return _BRepAlgo.brepalgo_IsValid(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_shape(placeholder_shape, data_shape):\n\n return True", "def _check_shape(shape):\n if type(shape) == int:\n shape = (shape, shape)\n check_odd(shape, 'psf shape')\n return shape", "def _check_shape(input_shape):\n msg = ('Input to SpatialExpansion must be 4D with dimension...
[ "0.6993668", "0.66536385", "0.65772355", "0.64655465", "0.64077026", "0.6379204", "0.6362978", "0.62955195", "0.62610215", "0.6260291", "0.6246603", "0.62193215", "0.6180648", "0.61409706", "0.6115868", "0.60293645", "0.601427", "0.5950285", "0.59175324", "0.5911704", "0.5911...
0.0
-1
Checks if the shape is 'correct'. If not, returns , else returns . This method differs from the previous one in the fact that no geometric contols (intersection of wires, pcurve validity) are performed.
def IsTopologicallyValid(*args): return _BRepAlgo.brepalgo_IsTopologicallyValid(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValidPcbShape(g):\n return g.GetShape() != pcbnew.S_SEGMENT or g.GetLength() > 0", "def is_valid(self):\n if len(self.exterior) < 3:\n return False\n return self.to_shapely_polygon().is_valid", "def _check_curve(layer: ogr.Layer) -> None:\n # Check if the feature geomet...
[ "0.65879864", "0.6473084", "0.60748625", "0.5991389", "0.5924151", "0.5896834", "0.5865766", "0.5848998", "0.583442", "0.580154", "0.57394546", "0.5724047", "0.57233506", "0.57214564", "0.5621533", "0.56186867", "0.5612514", "0.559289", "0.55808973", "0.5569833", "0.55482334"...
0.0
-1
this method makes a wire whose edges are C1 from a Wire whose edges could be G1. It removes a vertex between G1 edges. Option can be G1 or C1.
def brepalgo_ConcatenateWire(*args): return _BRepAlgo.brepalgo_ConcatenateWire(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _build_graph2(self, g1):\n g2 = g1.copy()\n for source, target, weight in self._remaining_edges:\n if weight == -1:\n self._gt_edges.append((source, target))\n if g2.has_edge(source, target):\n g2.remove_edge(source, target)\n ret...
[ "0.548062", "0.54205805", "0.5287949", "0.51086205", "0.48842067", "0.48342565", "0.4824531", "0.48094237", "0.47528753", "0.47327384", "0.472759", "0.47229192", "0.47211432", "0.4712262", "0.47049093", "0.46987176", "0.4694659", "0.4678394", "0.4678394", "0.4674186", "0.4642...
0.0
-1
this method makes an edge from a wire. Junction points between edges of wire may be sharp, resulting curve of the resulting edge may be C0.
def brepalgo_ConcatenateWireC0(*args): return _BRepAlgo.brepalgo_ConcatenateWireC0(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_edge(self, a, b):\n try: e = self.G.new_edge(a, b)\n except: return self.G.new_edge(a,b)\n\n try: self.G.set_edge_attribute(e, \"arrow\", \"true\")\n except: return self.G.new_edge(a,b)\n\n try: self.G.set_edge_attribute(e, \"spline\", \"false\")\n except: return ...
[ "0.61174107", "0.60685146", "0.57434285", "0.56741333", "0.5600909", "0.5600067", "0.5582746", "0.5530568", "0.5528883", "0.54733944", "0.54462737", "0.54074967", "0.53542346", "0.5343363", "0.5315694", "0.5315531", "0.52983046", "0.52760667", "0.5260912", "0.5250793", "0.523...
0.0
-1
Checks if the shape is 'correct'. If not, returns , else returns .
def brepalgo_IsValid(*args): return _BRepAlgo.brepalgo_IsValid(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_shape(placeholder_shape, data_shape):\n\n return True", "def _check_shape(shape):\n if type(shape) == int:\n shape = (shape, shape)\n check_odd(shape, 'psf shape')\n return shape", "def _check_shape(input_shape):\n msg = ('Input to SpatialExpansion must be 4D with dimension...
[ "0.6993668", "0.66536385", "0.65772355", "0.64655465", "0.64077026", "0.6379204", "0.6362978", "0.62955195", "0.62610215", "0.6260291", "0.6246603", "0.62193215", "0.6180648", "0.61409706", "0.6115868", "0.60293645", "0.601427", "0.5950285", "0.59175324", "0.5911704", "0.5911...
0.0
-1
Checks if the shape is 'correct'. If not, returns , else returns . This method differs from the previous one in the fact that no geometric contols (intersection of wires, pcurve validity) are performed.
def brepalgo_IsTopologicallyValid(*args): return _BRepAlgo.brepalgo_IsTopologicallyValid(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValidPcbShape(g):\n return g.GetShape() != pcbnew.S_SEGMENT or g.GetLength() > 0", "def is_valid(self):\n if len(self.exterior) < 3:\n return False\n return self.to_shapely_polygon().is_valid", "def _check_curve(layer: ogr.Layer) -> None:\n # Check if the feature geomet...
[ "0.65879864", "0.6473084", "0.60748625", "0.5991389", "0.5924151", "0.5896834", "0.5865766", "0.5848998", "0.583442", "0.580154", "0.57394546", "0.5724047", "0.57233506", "0.57214564", "0.5621533", "0.56186867", "0.5612514", "0.559289", "0.55808973", "0.5569833", "0.55482334"...
0.0
-1
Creates an empty AsDes.
def __init__(self, *args): _BRepAlgo.BRepAlgo_AsDes_swiginit(self,_BRepAlgo.new_BRepAlgo_AsDes(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_empty_trace(self):\n self.data = np.zeros(0, dtype=np.float32)\n self.header = SEGYTraceHeader(header=None, endian=self.endian)", "def _create_empty_segy_file_object(self):\n self.textual_file_header = b''\n self.binary_file_header = None\n self.traces = []", "def...
[ "0.5758801", "0.5586419", "0.5519884", "0.5494886", "0.5454309", "0.54006606", "0.53879", "0.5323445", "0.52917165", "0.528022", "0.5211821", "0.51626563", "0.5152615", "0.51504207", "0.51392835", "0.5120089", "0.5102294", "0.5096787", "0.5087933", "0.5048822", "0.5039879", ...
0.5758028
1
Stores as a futur subshape of .
def Add(self, *args): return _BRepAlgo.BRepAlgo_AsDes_Add(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shape(self):", "def shape(self):", "def _settle_shape(self, shape):\n if shape:\n for block in shape.blocks:\n self.array[block.row_position][block.column_position] = block\n self.remove_completed_lines()", "def predataShape(self):\n self._predatashape['name...
[ "0.6075055", "0.6075055", "0.59390676", "0.59037286", "0.58740383", "0.57528335", "0.5671366", "0.56450456", "0.53267777", "0.5302478", "0.5295207", "0.5285361", "0.5209979", "0.5204615", "0.51952237", "0.5167934", "0.51644427", "0.51629305", "0.51255596", "0.51195276", "0.51...
0.0
-1
Returns the Shape containing .
def Ascendant(self, *args): return _BRepAlgo.BRepAlgo_AsDes_Ascendant(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shape(self) -> Shape:", "def locate_shape(shape):", "def shape(self):", "def shape(self):", "def shape(self):\n return self._shape", "def shape(self):\n return None", "def interior(self):\n return Shape(self - self.edge('inner'))", "def shape(self) -> str:\n return \"box\"...
[ "0.7659576", "0.7153201", "0.71205145", "0.71205145", "0.68296224", "0.67433995", "0.66680634", "0.6657945", "0.6656064", "0.6634446", "0.661535", "0.64803284", "0.64801484", "0.6447151", "0.6447151", "0.6438147", "0.64115214", "0.62910223", "0.62553567", "0.62410337", "0.622...
0.0
-1
Returns futur subhapes of .
def Descendant(self, *args): return _BRepAlgo.BRepAlgo_AsDes_Descendant(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XCAFDoc_ShapeTool_GetSubShapes(*args):\n return _XCAFDoc.XCAFDoc_ShapeTool_GetSubShapes(*args)", "def GetSubShapes(*args):\n return _XCAFDoc.XCAFDoc_ShapeTool_GetSubShapes(*args)", "def reshape(x, shape):\n return Reshape(shape)(x)", "def sliceshape(slicetuple, totshape):\n res = []\n fo...
[ "0.57035416", "0.56229824", "0.5592263", "0.55720997", "0.55593735", "0.5515692", "0.54992557", "0.54937744", "0.5476747", "0.5476747", "0.54289174", "0.54163265", "0.5404519", "0.54007506", "0.53987753", "0.53804696", "0.53761375", "0.53140134", "0.53051925", "0.5304505", "0...
0.0
-1
Returns futur subhapes of .
def ChangeDescendant(self, *args): return _BRepAlgo.BRepAlgo_AsDes_ChangeDescendant(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XCAFDoc_ShapeTool_GetSubShapes(*args):\n return _XCAFDoc.XCAFDoc_ShapeTool_GetSubShapes(*args)", "def GetSubShapes(*args):\n return _XCAFDoc.XCAFDoc_ShapeTool_GetSubShapes(*args)", "def reshape(x, shape):\n return Reshape(shape)(x)", "def sliceshape(slicetuple, totshape):\n res = []\n fo...
[ "0.57035416", "0.56229824", "0.5592263", "0.55720997", "0.55593735", "0.5515692", "0.54992557", "0.54937744", "0.5476747", "0.5476747", "0.54289174", "0.54163265", "0.5404519", "0.54007506", "0.53987753", "0.53804696", "0.53761375", "0.53140134", "0.53051925", "0.5304505", "0...
0.0
-1
Replace by . disapear from .
def Replace(self, *args): return _BRepAlgo.BRepAlgo_AsDes_Replace(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_dot(data):\n data = re.sub(\"[.]\", \" . \", data)\n return data", "def rm_dot(item):\n if len(str(item).split('.')) > 2:\n return item.replace('.', '', 1)\n else:\n return item", "def _remove_dot_from_extension(\n extensions\n):\n if isinstance(extensions, str):\n ...
[ "0.694087", "0.6739121", "0.6405482", "0.63316286", "0.6185834", "0.617668", "0.617281", "0.61466223", "0.6135448", "0.6116209", "0.60985905", "0.6085858", "0.6023782", "0.59829724", "0.59341085", "0.5888144", "0.58224416", "0.5703905", "0.5689685", "0.5688758", "0.5656561", ...
0.0
-1
Returns True if (S1> and has common Descendants. Stores in the Commons Descendants.
def HasCommonDescendant(self, *args): return _BRepAlgo.BRepAlgo_AsDes_HasCommonDescendant(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isAllIncluded(S1, S2):\n return False if len(set(S1).intersection(S2)) != len(set(S1)) else True", "def is_found_in_parents(mcs, name, parents):\n for parent in parents:\n\n for cls in reversed(parent.__mro__):\n\n if hasattr(cls, name):\n return True\n\...
[ "0.58216304", "0.57693666", "0.56457704", "0.54126", "0.53150624", "0.53035873", "0.5301044", "0.5265569", "0.5263396", "0.5238863", "0.52369124", "0.5216553", "0.5201471", "0.51886964", "0.5182887", "0.5174848", "0.5164969", "0.5162364", "0.5154515", "0.5146251", "0.5138688"...
0.5984507
0
Returns the first shape involved in this Boolean operation.
def Shape1(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperation_Shape1(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ShapeFrom(self, *args):\n return _BRepAlgo.BRepAlgo_BooleanOperations_ShapeFrom(self, *args)", "def shape(self):\n return self.active.shape", "def Shape(self, *args):\n return _BRepAlgo.BRepAlgo_BooleanOperations_Shape(self, *args)", "def get_output_shape(self):\n return self....
[ "0.69976586", "0.67969745", "0.6770878", "0.6766901", "0.6766901", "0.6725859", "0.67074716", "0.67057925", "0.66768235", "0.6671902", "0.6587406", "0.6587406", "0.65293986", "0.65240335", "0.64601064", "0.6452454", "0.6452454", "0.6452454", "0.64200085", "0.6357087", "0.6352...
0.6905269
1
Returns the second shape involved in this Boolean operation.
def Shape2(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperation_Shape2(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ShapeFrom(self, *args):\n return _BRepAlgo.BRepAlgo_BooleanOperations_ShapeFrom(self, *args)", "def Shape(self, *args):\n return _BRepAlgo.BRepAlgo_BooleanOperations_Shape(self, *args)", "def Shape1(self, *args):\n return _BRepAlgo.BRepAlgo_BooleanOperation_Shape1(self, *args)", "def...
[ "0.7164068", "0.70292205", "0.696538", "0.6760701", "0.6375149", "0.6258295", "0.6258295", "0.6172665", "0.61283445", "0.6042824", "0.60409766", "0.60409766", "0.60409766", "0.60370505", "0.6007792", "0.6001082", "0.5968415", "0.59486276", "0.59486276", "0.5940918", "0.588824...
0.7778657
0
S1 is a Shell with ALL faces supported by the SAME S2 is an Edge INCLUDED in that surface with pcurve. this avoids a timeconsuming 3D operation, compared to Shapes.
def Shapes2d(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Shapes2d(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CreateCurve1DMeshfrom2DMesh(self):\n\n self.__do_memebers_exist__()\n\n p = self.InferPolynomialDegree()\n mm = Mesh()\n unique_edges, inv_edges = np.unique(self.edges,return_inverse=True)\n mm.points = self.points[unique_edges,:]\n mm.nnode = mm.points.shape[0]\n ...
[ "0.58741635", "0.5715788", "0.5693927", "0.56503993", "0.56048983", "0.5515899", "0.55102676", "0.54814833", "0.54200506", "0.5375164", "0.53727293", "0.53232086", "0.5315329", "0.5283123", "0.5282904", "0.52738345", "0.5272365", "0.5220711", "0.5219027", "0.52072", "0.519925...
0.0
-1
returns the common part of the shapes.
def Common(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Common(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def commonbeam(self):\n return _image.image_commonbeam(self)", "def common(self):\n return self._common", "def common(self):", "def common(self, other):\n last = None\n for x, y in zip(self.parts(), other.parts()):\n if x != y:\n return last\n ...
[ "0.6230063", "0.6022561", "0.6008241", "0.5993487", "0.59818494", "0.5967463", "0.59326553", "0.5864632", "0.58553815", "0.58179706", "0.58179706", "0.57640815", "0.57613176", "0.5748849", "0.57426405", "0.57311636", "0.5704641", "0.5704629", "0.56948143", "0.568224", "0.5669...
0.0
-1
returns the fuse part of the shapes.
def Fus(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Fus(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fuse(self):\n # TODO: Don't fuse unless they have None as the end slants?\n i = 0\n while i < len(self.segments) - 1:\n left = self.segments[i]\n right = self.segments[i + 1]\n if (\n isinstance(left, LineSegment)\n and isinsta...
[ "0.5748058", "0.55704474", "0.55694354", "0.5541534", "0.54904336", "0.54904336", "0.54525256", "0.5400547", "0.539064", "0.53859663", "0.5384255", "0.53695667", "0.5342205", "0.5335079", "0.525432", "0.5212678", "0.5192541", "0.5192125", "0.5191531", "0.518714", "0.518714", ...
0.0
-1
returns the cut part of the shapes.
def Cut(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Cut(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cuts(self) -> list[list[int]]:\n if self._cuts is not None:\n return self._cuts\n width = self.width\n height = self.height\n screen_region = Region(0, 0, width, height)\n cuts_sets = [{0, width} for _ in range(height)]\n\n if self.map is not None:\n ...
[ "0.6406902", "0.6294918", "0.6268585", "0.62640405", "0.61140466", "0.60826236", "0.5990929", "0.5919687", "0.588759", "0.5864538", "0.5862589", "0.5862589", "0.58487844", "0.5839845", "0.5816513", "0.5800285", "0.5751268", "0.5747535", "0.5705699", "0.5686229", "0.56849027",...
0.52482724
82
returns the intersection of the shapes.
def Section(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Section(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def intersection(self, other):\n return self._geomgen(capi.geom_intersection, other)", "def intersection(self, other):\n \n self_corners = self.corners\n\n other_corners = get_2d_false_corners(other)\n\n #shell()\n\n return planar_intersection_polygon(self_corners,other_...
[ "0.7315705", "0.7097444", "0.70627666", "0.7027862", "0.69971836", "0.68884236", "0.67736405", "0.6743636", "0.6635209", "0.66342473", "0.6617631", "0.65977013", "0.657614", "0.6560498", "0.65414494", "0.6511421", "0.64712614", "0.6467776", "0.64660656", "0.64551896", "0.6419...
0.0
-1
returns the result of the boolean operation.
def Shape(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Shape(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __bool__(self):\n return bool(self.get_value())", "def get_bool2(self):\n pass", "def __bool__(self):\n return bool(self._value)", "def __bool__(self):\n return self is TRUE", "def bool(self):\n return bool(self.int(2))", "def _true(*args):\n # pylint:disable=unu...
[ "0.7540962", "0.73034054", "0.7231144", "0.722943", "0.7205474", "0.71799725", "0.71602803", "0.7127289", "0.7101453", "0.70738816", "0.7039228", "0.703541", "0.6967901", "0.6967901", "0.6967901", "0.69588107", "0.69455975", "0.69328094", "0.691385", "0.6885347", "0.68823045"...
0.0
-1
Returns the shape(s) resulting of the boolean operation issued from the shape .
def ShapeFrom(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_ShapeFrom(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Shape(self, *args):\n return _BRepAlgo.BRepAlgo_BooleanOperations_Shape(self, *args)", "def _check_shape(placeholder_shape, data_shape):\n\n return True", "def shape(self):\n\n result = list(self.data.shape)\n included = np.count_nonzero(self.mask.to_array(dtype=bool))\n #it...
[ "0.6819105", "0.67962897", "0.67651623", "0.66086906", "0.660517", "0.65323514", "0.6515616", "0.6495337", "0.6495337", "0.64884543", "0.64880997", "0.6476348", "0.6467666", "0.6467654", "0.64491105", "0.6449074", "0.63928175", "0.6381001", "0.6355569", "0.6325708", "0.632415...
0.65076053
7
Returns the list of the descendant shapes of the shape .
def Modified(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_Modified(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shapes(self):\n return [load_node(item) for item in self.get_attribute('shapes')]", "def shapes(self):\n return self.container['shapes']", "def XCAFDoc_ShapeTool_GetSubShapes(*args):\n return _XCAFDoc.XCAFDoc_ShapeTool_GetSubShapes(*args)", "def type_shapes(self):\n return self._type_sh...
[ "0.7335689", "0.7056765", "0.6670955", "0.6620322", "0.65096456", "0.6487307", "0.6474483", "0.6366075", "0.63453704", "0.6228035", "0.61771905", "0.61771905", "0.6141498", "0.6123635", "0.6072071", "0.6023066", "0.60074574", "0.5974856", "0.59430003", "0.5921462", "0.5908138...
0.0
-1
Returns the fact that the shape has been deleted or not by the boolean operation.
def IsDeleted(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_IsDeleted(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isSetDeletion(self):\n return _libsbml.ReplacedElement_isSetDeletion(self)", "def is_deleted(self):\n if self.deleted:\n return True\n return False", "def deleted(self) -> bool:\n return pulumi.get(self, \"deleted\")", "def checkTrueArrayIsDeleted(node):\n if (no...
[ "0.6678011", "0.65664494", "0.6531786", "0.64280504", "0.6359463", "0.6359463", "0.62985015", "0.62773854", "0.62599415", "0.62015194", "0.6054305", "0.59900373", "0.5980353", "0.586673", "0.5838913", "0.583038", "0.5804918", "0.5689249", "0.5687188", "0.5682833", "0.5672811"...
0.6039284
11
returns the member myDSA. It is useful to then access the method GetSectionEdgeSet (wich is a member of DSAccess)
def DataStructureAccess(self, *args): return _BRepAlgo.BRepAlgo_BooleanOperations_DataStructureAccess(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _dsa_key(self,private_key):\n numbers = private_key.private_numbers()\n content = WriteMessage()\n content.write_string('ssh-dss')\n content.write_mpint(numbers.public_numbers.parameter_numbers.p)\n content.write_mpint(numbers.public_numbers.parameter_numbers.q)\n cont...
[ "0.56260055", "0.5464349", "0.5435241", "0.53704", "0.5287761", "0.5128341", "0.5128341", "0.51013947", "0.5087422", "0.50863296", "0.50863296", "0.50863296", "0.50863296", "0.50863296", "0.50863296", "0.5081519", "0.50691783", "0.5043424", "0.504146", "0.5022155", "0.5000575...
0.0
-1
Clears the internal data structure, including the
def Init(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_Init(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear(self) -> None:\n self.data = {} # defaultdict fails (T282865)\n self.size = 0", "def clear(self):\n self._data = []", "def clear(self):\n self._data = []", "def clear(self):\n for key in self.__data.keys():\n del self.__data[key]", "def clear(self):\...
[ "0.87491065", "0.84816325", "0.84816325", "0.84703386", "0.8418484", "0.826198", "0.82451874", "0.8211007", "0.8152963", "0.81437767", "0.81424785", "0.81424785", "0.81424785", "0.8130953", "0.8130953", "0.8130953", "0.8130953", "0.8130953", "0.8130953", "0.8130953", "0.81195...
0.0
-1
Loads the shape in DS.
def Load(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_Load(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _load(self, pkgpart, part_dict):\n # call parent to do generic aspects of load\n super(BaseSlide, self)._load(pkgpart, part_dict)\n # unmarshal shapes\n self._shapes = ShapeCollection(self._element.cSld.spTree, self)\n # return self-reference to allow generative calling\n ...
[ "0.66357905", "0.64954376", "0.63588953", "0.6266509", "0.6103227", "0.60606235", "0.6031602", "0.59880817", "0.59817374", "0.59817374", "0.59817374", "0.59817374", "0.59773034", "0.5931885", "0.5918622", "0.5911345", "0.5911345", "0.5896537", "0.5884401", "0.58312875", "0.58...
0.0
-1
Intersects two shapes at input and loads the DS with their intersection. Clears the TopOpeBRepBuild_HBuilder if necessary
def Intersect(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_Intersect(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mergePolyShapefiles(input1Filename, input2Filename, mergedFilename,field_names = [cc.DEV_LAYER_ATTRIBUTE_NAME,]):\n\n input1Ds = ogr.Open(input1Filename)\n if not input1Ds:\n sys.exit(\"Unable to open input file '{0}'\".format(input1Filename))\n input1lyr = input1Ds.GetLayer()\n inp1SRS = in...
[ "0.54987395", "0.5441911", "0.5406553", "0.5404014", "0.53096396", "0.51874185", "0.5181753", "0.517855", "0.51533735", "0.515292", "0.5128276", "0.5125197", "0.51138943", "0.5113446", "0.5102353", "0.5057921", "0.5054311", "0.5013443", "0.4999361", "0.4991658", "0.49792105",...
0.0
-1
This method does the same thing as the previous, but faster. There is no intersection face/face 3D. The faces have the same support(surface). No test of tangency (that is why it is faster). Intersects in 2d the faces tangent F1 anf F2.
def SameDomain(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_SameDomain(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_x_intersection_2d(self):\n\n f_1 = np.array([[0, 2], [1, 1]])\n f_2 = np.array([[1, 1], [0, 2]])\n\n f_set = [f_1, f_2]\n nx = [3, 3]\n\n grids = meshing.cart_grid(f_set, nx, physdims=nx)\n\n # 2D grid:\n g_2d = grids.grids_of_dimension(2)[0]\n\n f_t...
[ "0.66358507", "0.6470757", "0.5942164", "0.5913264", "0.5904449", "0.5815683", "0.5782105", "0.5723379", "0.57060015", "0.5683652", "0.56676096", "0.5646296", "0.5637886", "0.5632924", "0.56150067", "0.55646557", "0.5564056", "0.5550254", "0.55085504", "0.55046755", "0.550392...
0.0
-1
returns compounds of Edge connected with section, which contains sections between faces contained in S1 and S2. returns an empty list of Shape if S1 or S2 do not contain face. calls GetSectionEdgeSet() if it has not already been done
def GetSectionEdgeSet(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_GetSectionEdgeSet(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shared_edges(self, face_selector1: _face_selector_types,\n face_selector2: _face_selector_types) -> Sequence[Edge]:\n other_faces = self.find_faces(face_selector2)\n\n result_edges = []\n for face in self.find_faces(face_selector1):\n for edge in face.edges:\...
[ "0.6410287", "0.55884326", "0.55351377", "0.5522345", "0.55068785", "0.5343045", "0.5311352", "0.53073007", "0.5303514", "0.5291458", "0.52785116", "0.52631366", "0.52371", "0.5231882", "0.5201273", "0.51927465", "0.51717657", "0.5161595", "0.512026", "0.51042163", "0.5084441...
0.56942534
1
NYI returns the vertex of section, which contains the section between face S1 and edge S2 (returns an empty Shape if S1 is not a face or if S2 is not an edge)
def SectionVertex(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_SectionVertex(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interior(self):\n return Shape(self - self.edge('inner'))", "def edge(self, which='inner'):\n def edge_shape(site):\n def in_shape(x): return self.shape(Site(site.family, site.tag + x))\n sites = [in_shape(x) for x in self._directions]\n if which == 'inner':\n ...
[ "0.5541395", "0.5489833", "0.5383749", "0.5357461", "0.5332824", "0.5327966", "0.5252265", "0.5224318", "0.5198802", "0.5197832", "0.5191145", "0.5147392", "0.51444155", "0.5139365", "0.51293975", "0.512021", "0.5118103", "0.51166993", "0.511586", "0.51152444", "0.5114294", ...
0.5469
2
Invalidates a complete line of section. All Edges connected by Vertex or a Wire. Can be a group of connected Edges, which do not form a standard Wire.
def SuppressEdgeSet(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_SuppressEdgeSet(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def repair_lines(self) -> None:\n if len(self.lines) == 0:\n self.create_lines()\n else:\n for line in self.lines:\n connection = line.connection\n start_component = self.components[connection.start_entity]\n end_component = self.comp...
[ "0.5473867", "0.5382009", "0.5166588", "0.50958604", "0.5034876", "0.4909096", "0.48637462", "0.48626918", "0.48165956", "0.4806414", "0.4795987", "0.4752227", "0.47336608", "0.47117722", "0.47117722", "0.46954763", "0.4666305", "0.46530327", "0.4650531", "0.46436208", "0.463...
0.0
-1
Modifies a line of section. should be a Group of Edges connected by Vertex. Can be a Wire. Can be a group of connected Edges that do not form a standard Wire. should be subgroupn of
def ChangeEdgeSet(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_ChangeEdgeSet(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(self, line):", "def _write_line(\n self,\n shape: LineString,\n emission: float,\n info: EmissionInfo,\n source_group: int,\n ):\n # split the line string in single lines\n previous_coord = shape.coords[0]\n\n lines = [LineString([previous_coo...
[ "0.6074737", "0.5583487", "0.55022883", "0.5488069", "0.54185945", "0.5411359", "0.5380621", "0.5375459", "0.5367733", "0.5354074", "0.5351168", "0.5344226", "0.53420377", "0.5332318", "0.5319096", "0.52651125", "0.5257836", "0.5232933", "0.521354", "0.521354", "0.521354", ...
0.0
-1
NYI Make invalid a Vertex of section. The Vertex shoud be reconstructed from a point.
def SuppressSectionVertex(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_SuppressSectionVertex(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_vertex(self): \n return False", "def _validateVertex(self, v):\n if v < 0 or v >= self._V:\n raise Exception(\"vertex {} is not between 0 and {}\".format(v, (self._V-1)))", "def agregar_vertice(self, v):\n if not v in self.vertices.keys():\n self.vertices[v] = {}"...
[ "0.59776235", "0.591074", "0.56486434", "0.562389", "0.5610807", "0.5493077", "0.5428685", "0.54126817", "0.5402887", "0.53902274", "0.53565663", "0.5349987", "0.53480065", "0.53480065", "0.5347004", "0.53421235", "0.5341217", "0.53389066", "0.53311205", "0.53235525", "0.5322...
0.57575715
2
SectionShape est soit un Vertex de section(NYI), soit une Edge de section. Propagation des shapes de section en partant de SectionShape. return un Compound de section.
def PropagateFromSection(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_PropagateFromSection(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_compound_stiffened_isection():\n uc = steel_sections.i_section(d=400, b=400, t_f=25, t_w=25, r=30, n_r=8)\n plate1 = (\n sections.rectangular_section(b=500, d=10).align_center(uc).align_to(uc, \"top\")\n )\n plate2 = (\n sections.rectangular_section(b=500, d=10)\n .align_c...
[ "0.57629484", "0.57139105", "0.55810535", "0.53494585", "0.5339676", "0.53303343", "0.5307979", "0.52796847", "0.5153275", "0.5118574", "0.50900316", "0.50871176", "0.50563085", "0.5051936", "0.5004477", "0.5000257", "0.5000257", "0.49977192", "0.49440226", "0.49164158", "0.4...
0.0
-1
Returns the list of the descendant shapes of the shape .
def Modified(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_Modified(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shapes(self):\n return [load_node(item) for item in self.get_attribute('shapes')]", "def shapes(self):\n return self.container['shapes']", "def XCAFDoc_ShapeTool_GetSubShapes(*args):\n return _XCAFDoc.XCAFDoc_ShapeTool_GetSubShapes(*args)", "def type_shapes(self):\n return self._type_sh...
[ "0.73384356", "0.7060281", "0.6672472", "0.662404", "0.65109956", "0.64910746", "0.6474879", "0.63651323", "0.6347653", "0.6231355", "0.618104", "0.618104", "0.6144639", "0.6126819", "0.6074737", "0.6026544", "0.6010485", "0.59775174", "0.59462196", "0.59245396", "0.5912519",...
0.0
-1
NYI coherence of the internal Data Structure.
def Check(self, *args): return _BRepAlgo.BRepAlgo_DSAccess_Check(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nits(self):", "def __init__(self):\n # set of lists of nodal differences\n self.di = {}\n # self of upper boudns\n self.i = {}", "def n_cs(self):\n pass", "def COMBI(self):\n\n self.FB()\n self.LAT()\n self.ROT()", "def CL(self):", "def centrali...
[ "0.63208634", "0.6317959", "0.5812783", "0.57412237", "0.5726633", "0.5572401", "0.5542451", "0.5523592", "0.5466767", "0.5457007", "0.54446673", "0.54446673", "0.5427072", "0.5396151", "0.538998", "0.5379538", "0.5379538", "0.5344213", "0.5321583", "0.5319438", "0.53033674",...
0.0
-1
GetValue(BRepAlgo_DataMapNodeOfDataMapOfShapeBoolean self) > Standard_Boolean
def GetValue(self): return _BRepAlgo.BRepAlgo_DataMapNodeOfDataMapOfShapeBoolean_GetValue(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __bool__(self):\n return bool(self.get_value())", "def __bool__(self):\n raise RuntimeError(\"Cannot evaluate CrypTensors to boolean values\")", "def __bool__(self):\n raise RuntimeError(\"Cannot evaluate BinarySharedTensors to boolean values\")", "def SetValue(self, *args):\n ...
[ "0.6632537", "0.65650076", "0.6527329", "0.64361316", "0.6419467", "0.6400087", "0.6373707", "0.637024", "0.6366055", "0.63470244", "0.6285019", "0.62832886", "0.62286204", "0.62076914", "0.62011594", "0.6153996", "0.6111137", "0.6075253", "0.60686135", "0.60634077", "0.60227...
0.7905299
0
SetValue(BRepAlgo_DataMapNodeOfDataMapOfShapeBoolean self, Standard_Boolean value)
def SetValue(self, *args): return _BRepAlgo.BRepAlgo_DataMapNodeOfDataMapOfShapeBoolean_SetValue(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetValue(self):\n return _BRepAlgo.BRepAlgo_DataMapNodeOfDataMapOfShapeBoolean_GetValue(self)", "def test_setitem_bool(self):\n random.seed(12345)\n nside_coverage = 32\n nside_map = 128\n pxnums = np.arange(0, 2000)\n pxvalues = np.ones(pxnums.size, dtype=bool)\n ...
[ "0.74341255", "0.67324233", "0.668604", "0.63878953", "0.63041806", "0.63035727", "0.62389475", "0.62142", "0.619102", "0.61905813", "0.6144637", "0.60952264", "0.6080537", "0.6070081", "0.60686034", "0.59739524", "0.59568506", "0.59503865", "0.59209836", "0.5920271", "0.5913...
0.8526055
0
returns a list of wire non standard
def MakeBlock(self, *args): return _BRepAlgo.BRepAlgo_EdgeConnector_MakeBlock(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def non_zero_components(self) :\n return list(self.parent().characters())", "def test_show_all_wires_false(self):\n\n ops = [qml.PauliX(\"a\"), qml.PauliY(\"c\")]\n wire_order = [\"a\", \"b\", \"c\", \"d\"]\n\n wire_map = convert_wire_order(ops, wire_order, show_all_wires=False)\n ...
[ "0.6052848", "0.5989274", "0.5908896", "0.59033775", "0.58206475", "0.5755208", "0.5742159", "0.5671657", "0.56207526", "0.5596734", "0.5553147", "0.5512436", "0.5506076", "0.5496295", "0.54956263", "0.54736805", "0.54546434", "0.5410878", "0.5403076", "0.5399878", "0.5390138...
0.0
-1
NYI returns true if proceeded to MakeBlock()
def IsDone(self, *args): return _BRepAlgo.BRepAlgo_EdgeConnector_IsDone(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_block(self, block):\n pass", "def test_34(self):\n assert 'False' == Api.requestBlock('test-34')", "def test_13(self):\n assert 'False' == Api.requestBlock('test-13')", "def test_03(self):\n assert 'False' == Api.requestBlock('test-03')", "def test_33(self):\n a...
[ "0.7251698", "0.7021523", "0.70073795", "0.6960257", "0.6946966", "0.69168705", "0.6913372", "0.6911039", "0.69050634", "0.69032633", "0.68848264", "0.68548423", "0.6844301", "0.6840599", "0.68374604", "0.6833395", "0.68182987", "0.6814433", "0.6800926", "0.67845434", "0.6770...
0.0
-1
NYI returns true if W is a Wire standard. W must belong to the list returned by MakeBlock.
def IsWire(self, *args): return _BRepAlgo.BRepAlgo_EdgeConnector_IsWire(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isWatt(self):\n return _libsbml.Unit_isWatt(self)", "def test_wireable_object(self):\n result = attributeAsLDIF(\"dn\", WireableObject())\n self.assertEqual(result, b\"dn: wire\\n\")", "def wwn(self) -> SmartSsdWwn:\n return self._wwn", "def CanBalanceWithWater(self):\n ...
[ "0.5597362", "0.55873543", "0.5548783", "0.55013156", "0.54576916", "0.53746676", "0.5354919", "0.5347618", "0.52789843", "0.5266089", "0.51734984", "0.51449096", "0.513721", "0.50930214", "0.50891733", "0.5074785", "0.5068847", "0.50615853", "0.5049344", "0.50426847", "0.504...
0.6148025
0
the surface of will be the the surface of each new faces built. is used to update pcurves on edges if necessary. See Add().
def Init(self, *args): return _BRepAlgo.BRepAlgo_FaceRestrictor_Init(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, initial_surfaces):\n\n nsurf = len(initial_surfaces)\n nvert, nedge, ngroup, \\\n surf_ptrs, edge_ptrs, \\\n surf_group, edge_group \\\n = self._compute_topology(initial_surfaces)\n\n self._num = {\n 'surf': len(initial_surfaces),\...
[ "0.6337671", "0.62322086", "0.6138106", "0.60926324", "0.60289365", "0.6019346", "0.59726006", "0.58784676", "0.58642536", "0.5785459", "0.5726048", "0.5694008", "0.5689473", "0.568601", "0.56728286", "0.56689453", "0.56689453", "0.56234235", "0.56112266", "0.5610793", "0.560...
0.0
-1
Removes all the Wires
def Clear(self, *args): return _BRepAlgo.BRepAlgo_FaceRestrictor_Clear(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_all_wells(self):\n self.wells = []", "def remove_all(self):\n # Post a delete all notice to the manager\n self._remove_all()", "def remove_all(self):\n # Post a delete all notice to the manager\n self._remove_all()", "def deleteAll(self):\n for tlight in s...
[ "0.6894521", "0.68552023", "0.68552023", "0.67969257", "0.6740532", "0.6709369", "0.66663945", "0.66131437", "0.65450144", "0.6478279", "0.64725685", "0.6429976", "0.64166206", "0.63693064", "0.63480186", "0.6325027", "0.63126177", "0.63076156", "0.63052785", "0.6294209", "0....
0.0
-1
Evaluate all the faces limited by the set of Wires.
def Perform(self, *args): return _BRepAlgo.BRepAlgo_FaceRestrictor_Perform(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WiresToFaces(self, *args):\n return _BRepAlgo.BRepAlgo_Loop_WiresToFaces(self, *args)", "def findFaces(self):\n\t\trects = self.detectAll()\n\t\tif len(rects)==0:\n\t\t\trects = []\n\t\telse:\n\t\t\trects[:, 2:] += rects[:, :2]\n\t\tself.analyzeFrame(rects)", "def get_filtered_faces(self, faces):\n ...
[ "0.6536707", "0.5573983", "0.54805946", "0.54441386", "0.54284626", "0.53461635", "0.5334527", "0.53106356", "0.530548", "0.5246779", "0.51937175", "0.516544", "0.516158", "0.5131471", "0.51164645", "0.51044893", "0.5103975", "0.5064539", "0.5041223", "0.50377566", "0.5032868...
0.5327577
7
Links as image of .
def Bind(self, *args): return _BRepAlgo.BRepAlgo_Image_Bind(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def image(self, link, title, alt):\n if not link.startswith(('http://', 'https://')):\n source_dir = os.path.dirname(self.source_path)\n link = os.path.abspath(os.path.join(source_dir, link))\n return '<img src=\"%s\" title=\"%s\" alt=\"%s\" />' % (link, title, alt)", "def cre...
[ "0.73077035", "0.7028345", "0.69006294", "0.6725073", "0.65269893", "0.6412301", "0.62754714", "0.6242181", "0.6159993", "0.6141473", "0.6111284", "0.60934657", "0.6057731", "0.6022648", "0.59900016", "0.5979915", "0.5953369", "0.5953369", "0.59277457", "0.59261954", "0.58778...
0.0
-1
Add to the image of .
def Add(self, *args): return _BRepAlgo.BRepAlgo_Image_Add(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def imageAdd(img, num):\n return myimg.imageAdd(img.tolist(), num)", "def boutton(self,img1,x,y):\r\n self.button.append(self.creat_image(img1,x,y))", "def add_image(self, id, arr):\n\t\t## remove original image and add new one\n\t\tif self.cells[id].image:\n\t\t\tself.cells[id].v.removeItem(self.cel...
[ "0.71930027", "0.7081216", "0.6968564", "0.6821934", "0.6807955", "0.6542881", "0.6534922", "0.6530329", "0.648896", "0.6469324", "0.6455258", "0.64521104", "0.6431994", "0.6423373", "0.6371444", "0.6369241", "0.63576514", "0.63544565", "0.6354122", "0.6349464", "0.63464147",...
0.69936126
2
Remove to set of images.
def Remove(self, *args): return _BRepAlgo.BRepAlgo_Image_Remove(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_images(self):\n hardware_components.log_method(self, \"remove_images\")\n communication_object = self._get_control_software().connection\n communication_object.remove_all()", "def remove(self, done=False, verbose=True):\n return _image.image_remove(self, done, verbose)", ...
[ "0.75192356", "0.73298836", "0.7317633", "0.72680634", "0.70345575", "0.70180535", "0.6974491", "0.694794", "0.6942505", "0.6920568", "0.6883206", "0.6673236", "0.6662014", "0.66038215", "0.66038215", "0.66038215", "0.65617543", "0.6498469", "0.6489149", "0.64788216", "0.6478...
0.7645537
0