Remove the Remind command with the uid from the file
9150
def remove(self, uid, filename=None):
        """"""
        if not filename:
            filename = self._filename
        elif filename not in self._reminders:
            return

        uid = uid.split('@')[0]

        with self._lock:
            rem = open(filename).readlines()
            for (index, line) in enumerate(rem):
                if uid == md5(line[:-1].encode('utf-8')).hexdigest():
                    del rem[index]
                    open(filename, 'w').writelines(rem)
                    break
562362
def rm(filename, recursive=False, force=False):
    """"""
    return auto(remove_file, filename, recursive, force)
66670
def remove(self, filename):
        """"""
        if self.list.pop(filename, None):
            self.modified_list = True
        if self.target.peer:  # otherwise `scan` command
            if self.target.is_local():
                remote_target = self.target.peer
                if remote_target.get_id() in self.dir["peer_sync"]:
                    rid = remote_target.get_id()
                    self.modified_sync = bool(
                        self.dir["peer_sync"][rid].pop(filename, None)
                    )
        return
583328
def ics2rem():
    """"""
    from argparse import ArgumentParser, FileType
    from sys import stdin, stdout

    parser = ArgumentParser(description='Converter from iCalendar to Remind syntax.')
    parser.add_argument('-l', '--label', help='Label for every Remind entry')
    parser.add_argument('-p', '--priority', type=int,
                        help='Priority for every Remind entry (0..9999)')
    parser.add_argument('-t', '--tag', action='append',
                        help='Tag(s) for every Remind entry')
    parser.add_argument('--tail',
                        help='Text to append to every remind summary, following final %%"')
    parser.add_argument('--sep', default=" ",
                        help='String to separate summary (and tail) from description')
    parser.add_argument('--postdate',
                        help='String to follow the date in every Remind entry. '
                        'Useful for entering "back" and "delta" fields (see man remind).')
    parser.add_argument('--posttime',
                        help='String to follow the time in every timed Remind entry. '
                        'Useful for entering "tdelta" and "trepeat" fields (see man remind).')
    parser.add_argument('-z', '--zone',
                        help='Timezone of Remind file (default: local timezone)')
    parser.add_argument('infile', nargs='?', type=FileType('r'), default=stdin,
                        help='Input iCalendar file (default: stdin)')
    parser.add_argument('outfile', nargs='?', type=FileType('w'), default=stdout,
                        help='Output Remind file (default: stdout)')
    args = parser.parse_args()

    zone = timezone(args.zone) if args.zone else None

    vobject = readOne(args.infile.read())
    rem = Remind(localtz=zone).to_reminders(
        vobject, args.label, args.priority, args.tag, args.tail, args.sep,
        args.postdate, args.posttime)
    args.outfile.write(rem)
100557
def replace(self, uid, ical, filename=None):
        """"""
        return self.replace_vobject(uid, readOne(ical), filename)
455408
function removeExisting ()
{
    if (fs.existsSync("web/assets"))
    {
        var stat = fs.lstatSync("web/assets");

        if (stat.isFile() || stat.isSymbolicLink())
        {
            fs.unlinkSync("web/assets");
        }
        else
        {
            wrench.rmdirSyncRecursive("web/assets");
        }
    }
}
240446
def remove(self, rel_path, propagate=False):
        ''''''
        repo_path = os.path.join(self.cache_dir, rel_path)

        c = self.database.cursor()
        c.execute("DELETE FROM  files WHERE path = ?", (rel_path,))

        if os.path.exists(repo_path):
            os.remove(repo_path)

        self.database.commit()

        if self.upstream and propagate:
            self.upstream.remove(rel_path, propagate)
1132528
def clear_stale_pids(pids, pid_dir='/tmp', prefix='', multi=False):
    ''
    if isinstance(pids, (int, float, long)):
        pids = [pids]
    pids = str2list(pids, map_=unicode)
    procs = map(unicode, os.listdir('/proc'))
    running = [pid for pid in pids if pid in procs]
    logger.warn(
        "Found %s pids running: %s" % (len(running),
                                       running))
    prefix = prefix.rstrip('.') if prefix else None
    for pid in pids:
        if prefix:
            _prefix = prefix
        else:
            _prefix = unicode(pid)
        # remove non-running procs
        if pid in running:
            continue
        if multi:
            pid_file = '%s%s.pid' % (_prefix, pid)
        else:
            pid_file = '%s.pid' % (_prefix)
        path = os.path.join(pid_dir, pid_file)
        if os.path.exists(path):
            logger.debug("Removing pidfile: %s" % path)
            try:
                remove_file(path)
            except OSError as e:
                logger.warn(e)
    return running
852648
function removePIDFile(name) {
  var pidFilePath = pidDir + name + '.pid';
  fs.exists(pidFilePath, function(exists) {
    if (exists) {
      fs.unlinkSync(pidFilePath);
    }
  });
}
1254129
synchronized int removeAllDocuments(String uuid) throws IOException
   {
      synchronized (updateMonitor)
      {
         //updateInProgress = true;
         indexUpdateMonitor.setUpdateInProgress(true, false);
      }
      int num;
      try
      {
         Term idTerm = new Term(FieldNames.UUID, uuid.toString());
         executeAndLog(new Start(Action.INTERNAL_TRANSACTION));
         num = volatileIndex.removeDocument(idTerm);
         if (num > 0)
         {
            redoLog.append(new DeleteNode(getTransactionId(), uuid));
         }
         for (int i = 0; i < indexes.size(); i++)
         {
            PersistentIndex index = indexes.get(i);
            // only remove documents from registered indexes
            if (indexNames.contains(index.getName()))
            {
               int removed = index.removeDocument(idTerm);
               if (removed > 0)
               {
                  redoLog.append(new DeleteNode(getTransactionId(), uuid));
               }
               num += removed;
            }
         }
         executeAndLog(new Commit(getTransactionId()));
      }
      finally
      {
         synchronized (updateMonitor)
         {
            //updateInProgress = false;
            indexUpdateMonitor.setUpdateInProgress(false, false);
            updateMonitor.notifyAll();
            releaseMultiReader();
         }
      }
      return num;
   }
1235820
def remove(self, auto_confirm=False, verbose=False):
        """"""

        if not self.paths:
            logger.info(
                "Can't uninstall '%s'. No files were found to uninstall.",
                self.dist.project_name,
            )
            return

        dist_name_version = (
            self.dist.project_name + "-" + self.dist.version
        )
        logger.info('Uninstalling %s:', dist_name_version)

        with indent_log():
            if auto_confirm or self._allowed_to_proceed(verbose):
                moved = self._moved_paths

                for_rename = compress_for_rename(self.paths)

                for path in sorted(compact(for_rename)):
                    moved.stash(path)
                    logger.debug('Removing file or directory %s', path)

                for pth in self.pth.values():
                    pth.remove()

                logger.info('Successfully uninstalled %s', dist_name_version)
1100382
def _removeLru(self):
        
        (dataFile, handle) = self._cache.pop()
        handle.close()
        return dataFile
182005
def cli(ctx):
    """"""
    dir_path = os.path.join(os.path.expanduser('~'), '.keep')
    if os.path.exists(dir_path):
        if click.confirm('[CRITICAL] Remove everything inside ~/.keep ?', abort=True):
            shutil.rmtree(dir_path)
    utils.first_time_use(ctx)
609755
def remove_uid(self, uid):
        
        for sid in self.get('uid2sid', uid):
            self.remove('sid2uid', sid, uid)
        self.delete('uid2sid', uid)
828292
function removeDir(dirPath, cleanOnly) {
  var files;

  try {
    files = fs.readdirSync(dirPath);
  } catch(e) {
    return;
  }

  if (files.length > 0) {
    for (var i = 0; i < files.length; i++) {
      var filePath = path.join(dirPath, files[i]);
      if (fs.statSync(filePath).isFile())
        fs.unlinkSync(filePath);
      else
        rmDir(filePath);
    }
  }

  !cleanOnly && fs.rmdirSync(dirPath);
}
454926
def remove(config, username, filename, force):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = UserApi(client)
        key_api = API(client)
        key_api.remove(username, user_api, filename, force)
897700
function removeUnsynced(fs, path, callback) {
  removeAttr(fs, path, constants.attributes.unsynced, callback);
}