Snapshot the project

        :param name: Name of the snapshot
174542
def snapshot(self, name):
        

        if name in [snap.name for snap in self.snapshots.values()]:
            raise aiohttp.web_exceptions.HTTPConflict(text="The snapshot {} already exist".format(name))

        snapshot = Snapshot(self, name=name)
        try:
            if os.path.exists(snapshot.path):
                raise aiohttp.web_exceptions.HTTPConflict(text="The snapshot {} already exist".format(name))

            os.makedirs(os.path.join(self.path, "snapshots"), exist_ok=True)

            with tempfile.TemporaryDirectory() as tmpdir:
                zipstream = yield from export_project(self, tmpdir, keep_compute_id=True, allow_all_nodes=True)
                try:
                    with open(snapshot.path, "wb") as f:
                        for data in zipstream:
                            f.write(data)
                except OSError as e:
                    raise aiohttp.web.HTTPConflict(text="Could not write snapshot file '{}': {}".format(snapshot.path, e))
        except OSError as e:
            raise aiohttp.web.HTTPInternalServerError(text="Could not create project directory: {}".format(e))

        self._snapshots[snapshot.id] = snapshot
        return snapshot
10194
def _parse_snapshot_share(response, name):
    '''
    
    '''
    snapshot = response.headers.get('x-ms-snapshot')

    return _parse_share(response, name, snapshot)
515533
def get_project_name():
    
    setup_py_content = helpers.get_file_content('setup.py')
    ret = helpers.value_of_named_argument_in_function(
        'name', 'setup', setup_py_content, resolve_varname=True
    )
    if ret and ret[0] == ret[-1] in ('"', "'"):
        ret = ret[1:-1]
    return ret
1114197
def project_path(*names):
    """"""
    return os.path.join(os.path.dirname(__file__), *names)
631061
def snapshot(*args)
      sn = Snapshot.new self, *args
      if block_given?
        begin
          yield sn
        ensure
          sn.release
        end
      else
        sn
      end
    end
227349
public function snapshot($name, array $info = [])
    {
        return new Snapshot($this->connection, $this->projectId, $name, $this->encode, $info);
    }
335575
def setName( self, name ):
        
        self._name = projex.text.nativestring(name)
        self.setText(0, ' '.join(projex.text.words(self._name)))
1345129
def snapshot_path(cls, project, snapshot):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/snapshots/{snapshot}",
            project=project,
            snapshot=snapshot,
        )
9669
def create_project(self, name, **kwargs):
        
        data = self._wrap_dict("project", kwargs)
        data["customer"]["name"] = name
        return self.post("/projects.json", data=data)
799061
protected void snapshot(String fileName) throws Exception {
	    configuration.save(new File(fileName));
        model.snapshotSessionDb(this.fileName, fileName);
	}
165105
def get_new_project_name(self, project_name):
        
        timestamp_str = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M')
        return "{} {}".format(project_name, timestamp_str)
536829
def create(self, name):
    
    return Bucket(name, context=self._context).create(self._project_id)
1348009
def snapshot(self, mode):
        '''
        
        '''
        self._init_env()

        self._save_cfg_packages(self._get_changed_cfg_pkgs(self._get_cfg_pkgs()))
        self._save_payload(*self._scan_payload())
1114102
def snapshot             (self):
		""""""
		nextSnapshotNum  = self.nextSnapshotNum
		nextSnapshotPath = self.getFullPathToSnapshot(nextSnapshotNum)
		
		if os.path.lexists(nextSnapshotPath):
			self.rmR(nextSnapshotPath)
		self.mkdirp(os.path.join(nextSnapshotPath, ".experiment"))
		return self.dump(nextSnapshotPath).__markLatest(nextSnapshotNum)
1338782
def prepare_droplet(id, name)
      logger.debug "Droplet id: #{id} name: #{name}\n"
      droplet = api.droplet id

      return unless droplet
      logger.info "Preparing droplet id: #{droplet.id} name: #{droplet.name} to take snapshot."
      return if too_much_snapshots?(droplet)
      processed_droplet_ids << droplet.id
      thread_runner(droplet)
    end
113067
def add(self, name, path=None, **kwargs):
        
        path = path or kwargs.pop('default_path', None)

        if not self._path_is_valid(path):
            return

        if not self._is_unique(name, path):
            p = Project.select().where(
                (Project.name == name) |
                (Project.path == path)
            )[0]
            self._print(self._ERROR_PROJECT_EXISTS.format(name, p.path), 'red')
            return

        Project.create(name=name, path=path)
        self._print(self._SUCCESS_PROJECT_ADDED.format(name), 'green')
26658
def snapshot_path(cls, project, instance, cluster, snapshot):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}",
            project=project,
            instance=instance,
            cluster=cluster,
            snapshot=snapshot,
        )