Utility function to remove a .plist file and unload it

    :param label: job label
500576
def uninstall(label):
    '''
    
    '''
    if launchd.LaunchdJob(label).exists():
        fname = launchd.plist.discover_filename(label)
        launchd.unload(fname)
        os.unlink(fname)
979376
def cleanup_local_labels(block):
    
    global PROC_COUNTER

    stack = [[]]
    hashes = [{}]
    stackprc = [PROC_COUNTER]
    used = [{}]  # List of hashes of unresolved labels per scope

    MEMORY = block.mem

    for cell in MEMORY:
        if cell.inst.upper() == 'PROC':
            stack += [[]]
            hashes += [{}]
            stackprc += [PROC_COUNTER]
            used += [{}]
            PROC_COUNTER += 1
            continue

        if cell.inst.upper() == 'ENDP':
            if len(stack) > 1:  # There might be unbalanced stack due to syntax errors
                for label in used[-1].keys():
                    if label in stack[-1]:
                        newlabel = hashes[-1][label]
                        for cell in used[-1][label]:
                            cell.replace_label(label, newlabel)

                stack.pop()
                hashes.pop()
                stackprc.pop()
                used.pop()
            continue

        tmp = cell.asm.strip()
        if tmp.upper()[:5] == 'LOCAL':
            tmp = tmp[5:].split(',')
            for lbl in tmp:
                lbl = lbl.strip()
                if lbl in stack[-1]:
                    continue
                stack[-1] += [lbl]
                hashes[-1][lbl] = 'PROC%i.' % stackprc[-1] + lbl
                if used[-1].get(lbl, None) is None:
                    used[-1][lbl] = []

            cell.asm = ';' + cell.asm  # Remove it
            continue

        if cell.is_label:
            label = cell.inst
            for i in range(len(stack) - 1, -1, -1):
                if label in stack[i]:
                    label = hashes[i][label]
                    cell.asm = label + ':'
                    break
            continue

        for label in cell.used_labels:
            labelUsed = False
            for i in range(len(stack) - 1, -1, -1):
                if label in stack[i]:
                    newlabel = hashes[i][label]
                    cell.replace_label(label, newlabel)
                    labelUsed = True
                    break

            if not labelUsed:
                if used[-1].get(label, None) is None:
                    used[-1][label] = []

                used[-1][label] += [cell]

    for i in range(len(MEMORY) - 1, -1, -1):
        if MEMORY[i].asm[0] == ';':
            MEMORY.pop(i)

    block.mem = MEMORY
    block.asm = [x.asm for x in MEMORY if len(x.asm.strip())]
971192
def removeContainer(tag):
    '''
    '''
    container = getContainerByTag(tag)

    if container:
        # Build an Image using the dockerfile in the path
        try:
            container.remove(force=True)
            #print("Removed container", tag, "...")
        except APIError as exc:
            eprint("Unhandled error while removing container", tag)
            raise exc
1030817
public static function remove_label(
		$project,
		$issue,
		$label,
		$args = []
	) {
		$request_url = sprintf(
			self::API_ROOT . 'repos/%s/issues/%s/labels/%s',
			$project,
			$issue,
			$label
		);

		$headers['http_verb'] = 'DELETE';

		list( $body, $headers ) = self::request( $request_url, $args, $headers );

		return $body;
	}
1164134
def enabled(job_label, runas=None):
    '''
    
    '''
    overrides_data = dict(plistlib.readPlist(
        '/var/db/launchd.db/com.apple.launchd/overrides.plist'
    ))
    if overrides_data.get(job_label, False):
        if overrides_data[job_label]['Disabled']:
            return False
        else:
            return True
    else:
        return False
106020
def remove(in_bam):
    
    if utils.file_exists(in_bam):
        utils.remove_safe(in_bam)
    if utils.file_exists(in_bam + ".bai"):
        utils.remove_safe(in_bam + ".bai")
667422
def unload(self, source: Source) -> None:
        
        logger.info('unloading source: %s', source.name)
        try:
            contents = self.contents(source)
            del self.__contents[source.name]
            del self.__sources[source.name]

            for name in contents.bugs:
                bug = self.__installation.bugs[name]
                self.__installation.bugs.remove(bug)
            for name in contents.blueprints:
                blueprint = self.__installation.build[name]
                self.__installation.build.remove(blueprint)
            for name in contents.tools:
                tool = self.__installation.tools[name]
                self.__installation.tools.remove(tool)
        except KeyError:
            pass
        logger.info('unloaded source: %s', source.name)
509107
def unload_module(self, path):
        '''

        '''
        with self._mutex:
            if self._obj.unload_module(path) != RTC.RTC_OK:
                raise FailedToUnloadModuleError(path)
265169
def remove(self, item):
        
        self.items.pop(item)
        self._remove_dep(item)
        self.order = None
        self.changed(code_changed=True)
1361263
def _cleanup_container(self, cinfo):
        
        # I'm not a fan of doing this again here.
        env = cinfo['Config']['Env']
        if (env and '_ATOMIC_TEMP_CONTAINER' not in env) or not env:
            return

        iid = cinfo['Image']
        self.client.remove_container(cinfo['Id'])
        try:
            labels = self.client.inspect_image(iid)['Config']['Labels']
        except TypeError:
            labels = {}
        if labels and 'io.projectatomic.Temporary' in labels:
            if labels['io.projectatomic.Temporary'] == 'true':
                self.client.remove_image(iid)
490469
function(label) {
			var forkContext = this.forkContext;

			if (!forkContext.reachable) {
				return;
			}

			var context = getBreakContext(this, label);

			/* istanbul ignore else: foolproof (syntax error) */
			if (context) {
				context.brokenForkContext.add(forkContext.head);
			}

			forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
		}
1121403
def remove_label(self, label):
        
        works_to_delete = []
        for work, work_label in self.items():
            if work_label == label:
                works_to_delete.append(work)
        for work in works_to_delete:
            del self[work]
        if self._ordered_labels:
            self._ordered_labels.remove(label)
945470
def _cleanup_pods(namespace, labels):
    
    api = kubernetes.client.CoreV1Api()
    pods = api.list_namespaced_pod(namespace, label_selector=format_labels(labels))
    for pod in pods.items:
        try:
            api.delete_namespaced_pod(pod.metadata.name, namespace)
            logger.info('Deleted pod: %s', pod.metadata.name)
        except kubernetes.client.rest.ApiException as e:
            # ignore error if pod is already removed
            if e.status != 404:
                raise
691036
def clear_display_label(self):
        
        if (self.get_display_label_metadata().is_read_only() or
                self.get_display_label_metadata().is_required()):
            raise errors.NoAccess()
        self._my_map['displayLabel'] = self._display_label_metadata['default_string_values'][0]
302143
def install(label, plist):
    '''
    
    '''
    fname = launchd.plist.write(label, plist)
    launchd.load(fname)
538434
def remove(self, key):
        

        data = self._load_file()
        del data[key]
        self._save_file(data)
65288
def load(self, label):
        

        objloc = '{0}/{1}'.format(self.statedir, label)

        try:
            obj = pickle.load(open(objloc, 'r')) 
        except (KeyError, IndexError, EOFError):
            obj = open(objloc, 'r').read()
            try:
                obj = float(obj)
            except ValueError:
                pass
        except IOError:
            obj = None

        return obj