_shifts dumps in /tmp directory after reboot it will drop
422997
def _dump_cache(self, _shifts):
        
        with open(self.__cache_path, 'wb') as f:
            dump(_shifts, f)
186621
def set_tmp_folder():
    
    output = "%s" % datetime.datetime.now()
    for char in [' ', ':', '.', '-']:
        output = output.replace(char, '')
    output.strip()
    tmp_folder = os.path.join(tempfile.gettempdir(), output)
    return tmp_folder
245479
def tmpdir(self):
        """"""
        if self._tmpdir is None:
            self._tmpdir = tempfile.mkdtemp(prefix="igraph.")
            atexit.register(cleanup_tmpdir, self._tmpdir)
        return self._tmpdir
934910
def cp(hdfs_src, hdfs_dst):
    
    cmd = "hadoop fs -cp %s %s" % (hdfs_src, hdfs_dst)
    rcode, stdout, stderr = _checked_hadoop_fs_command(cmd)
246909
def __dump_stack(self):
        
        maxdepth = len(self._mode_stack)
        maxdepth_strlen = len(str(maxdepth))
        index_width = 4 - (-maxdepth_strlen) % 4 + 4
        index_str = lambda i: '{:<{}d}'.format(i, index_width)

        self.stdout.write(index_str(0) + self.root_prompt)
        self.stdout.write('\n')

        tree_prefix = '└── '
        for i in range(maxdepth):
            index_prefix = index_str(i + 1)
            whitespace_prefix = ' ' * len(tree_prefix) * i
            mode = self._mode_stack[i]
            line = index_prefix + whitespace_prefix + \
                    tree_prefix + mode.prompt + \
                    ': {}@{}'.format(mode.cmd, mode.args)
            self.stdout.write(line)
            self.stdout.write('\n')
1162427
def make_tmp_dir(suffix="", prefix="tmp", dir=None):  # pylint: disable=redefined-builtin
  """"""
  if dir is None:
    return tempfile.mkdtemp(suffix, prefix, dir)
  else:
    while True:
      rand_term = random.randint(1, 9999)
      tmp_dir = os.path.join(dir, "%s%d%s" % (prefix, rand_term, suffix))
      if tf.gfile.Exists(tmp_dir):
        continue
      tf.gfile.MakeDirs(tmp_dir)
      break
    return tmp_dir
4408
def remove_temp_copy(self):
        
        if self.is_temp and self.root_dir is not None:
            shutil.rmtree(self.root_dir)
            self.root_dir = None
1104705
def _TempRootPath():
  """"""
  # `FLAGS.test_tmpdir` is defined only in test environment, so we can't expect
  # for it to be always defined.
  test_tmpdir = (
      compatibility.Environ("TEST_TMPDIR", default=None) or
      FLAGS.get_flag_value("test_tmpdir", default=None))

  if not os.path.exists(test_tmpdir):
    # TODO: We add a try-catch block to avoid rare race condition.
    # In Python 3 the exception being thrown is way more specific
    # (`FileExistsError`) but in Python 2 `OSError` is the best we can do. Once
    # support for Python 2 is dropped we can switch to catching that and remove
    # the conditional (EAFP).
    try:
      os.makedirs(test_tmpdir)
    except OSError as err:
      logging.error(err)

  # TODO(hanuszczak): Investigate whether this check still makes sense.
  if platform.system() == "Windows":
    return None

  return test_tmpdir
600984
def dumps(reset=False):
    
    debug_str = ctypes.c_char_p()
    do_reset = 1 if reset is True else 0
    check_call(_LIB.MXAggregateProfileStatsPrint(ctypes.byref(debug_str), int(do_reset)))
    return py_str(debug_str.value)
1322361
public void dumpMemory() {
    Double[] keys = memory.keySet().toArray(new Double[memory.keySet().size()]);
    Arrays.sort(keys);
    for (Double key : keys) {
      System.err.println(key + "\t" + memory.get(key));
    }
  }
334891
def dump(self):
        
        logger.warn('This function is deprecated and replaced by `dump_np_vars`.')

        ret = False

        if self.system.files.no_output:
            # return ``True`` because it did not fail
            return True

        if self.write_lst() and self.write_dat():
            ret = True

        return ret
234135
def clean_dists(self, _args):
        """"""
        ctx = self.ctx
        if exists(ctx.dist_dir):
            shutil.rmtree(ctx.dist_dir)
1159851
def dump_all_outputs(self, job, target, abspaths=None):
        
        import os
        import shutil
        from pathlib import Path

        root = Path(native_str(target))
        true_outputs = job.get_output()

        if abspaths or len(true_outputs) < self.BULK_OUTPUT_FILE_THRESHOLD:
            return super().dump_all_outputs(job, root, abspaths)

        stagingdir = root / Path(native_str(job.workingdir)).name
        workdir = job.get_directory(job.workingdir)
        if not root.is_dir():
            root.mkdir(parents=False)
        if stagingdir.exists():
            if PY2:
                raise IOError('Path % exists' % stagingdir)
            else:
                raise FileExistsError(stagingdir)
        workdir.put(str(root))
        assert stagingdir.is_dir()
        assert root in stagingdir.parents

        for pathstr in true_outputs:
            if os.path.isabs(pathstr):
                continue
            destpath = root / pathstr
            currpath = stagingdir / pathstr
            if not destpath.parent.is_dir():
                destpath.parent.mkdir(parents=True)
            currpath.rename(destpath)

        shutil.rmtree(str(stagingdir))
329894
def get_tmpdir():
    
    global __tmpdir
    if __tmpdir is not None:
        return __tmpdir

    __tmpdir = tempfile.mkdtemp(prefix='.tmp.glerbl.', dir=".")
    atexit.register(__clean_tmpdir)

    return __tmpdir
105227
def dump(data, hdfs_path, **kwargs):
    
    kwargs["mode"] = "w" if isinstance(data, bintype) else "wt"
    with open(hdfs_path, **kwargs) as fo:
        i = 0
        bufsize = common.BUFSIZE
        while i < len(data):
            fo.write(data[i: i + bufsize])
            i += bufsize
    fo.fs.close()
102032
def reload_exports():
    '''
    
    '''
    ret = {}

    command = 'exportfs -r'

    output = __salt__['cmd.run_all'](command)
    ret['stdout'] = output['stdout']
    ret['stderr'] = output['stderr']
    # exportfs always returns 0, so retcode is useless
    # We will consider it an error if stderr is nonempty
    ret['result'] = output['stderr'] == ''

    return ret
302921
function(callback) {
        grunt.log.writeln('Push to tmp path...');
        // remove
        if (options.remove) {
          grunt.file.recurse(tmpPath, function(abs, rootdir, subdir, filename) {
            if (typeof subdir !== 'string') {
              subdir = '';
            }
            var subPath = path.join(subdir, filename);
            if (testIgnore(subPath, ['.svn', '.git'])) {
              return;
            }

            if (
              !grunt.file.exists(path.join(src, subPath)) && 
              !grunt.file.isMatch(options.removeIgnore, subPath)
            ) {
              // remove it
              grunt.log.writeln(util.format('Remove "%s"...', subPath));
              grunt.file.delete(abs);
            }
          });
        }

        // copy
        grunt.file.recurse(src, function(abs, rootdir, subdir, filename) {
          if (typeof subdir !== 'string') {
            subdir = '';
          }
          var subPath = path.join(subdir, filename),
              srcFile = abs,
              destFile = path.join(tmpPath, subPath),
              srcStats = fs.statSync(srcFile),
              destStats;

          if (testIgnore(subPath, ['.svn', '.git'])) {
            return;
          }

          if (!options.pushIgnore || !grunt.file.isMatch(options.pushIgnore, subPath)) {
            // dir
            if (grunt.file.isDir(srcFile)) {
              if (!grunt.file.isDir(destFile)) {
                if (grunt.file.exists(destFile)) {
                  grunt.file.delete(destFile);
                }
                grunt.log.writeln(util.format('Create folder "%s"...', subPath));
                grunt.file.mkdir(destFile);
              }
            }
            else {
              if (grunt.file.isDir(destFile)) {
                grunt.file.delete(destFile);
              }
              else if (grunt.file.exists(destFile)) {
                destStats = fs.statSync(destFile);

                if (srcStats.size !== destStats.size || (destStats.mtime - srcStats.mtime !== 0)) {
                  grunt.log.writeln(util.format('Push changed file "%s"...', subPath));
                  grunt.file.copy(srcFile, destFile);
                  fs.utimesSync(destFile, srcStats.atime, srcStats.mtime);
                }
              }
              else {
                grunt.log.writeln(util.format('Push new file "%s"...', subPath));
                grunt.file.copy(srcFile, destFile);
                fs.utimesSync(destFile, srcStats.atime, srcStats.mtime);
              }
            }
          }
        });
        callback(null);
      }