:param project_id: Project object
        :returns: True if client listen this project
480102
def project_has_listeners(self, project):
        
        return project.id in self._listeners and len(self._listeners[project.id]) > 0
467376
def check(self, item_id):
        
        response = self._request("tasks/view/{id}".format(id=item_id))

        if response.status_code == 404:
            # probably an unknown task id
            return False

        try:
            content = json.loads(response.content.decode('utf-8'))
            status = content['task']["status"]
            if status == 'completed' or status == "reported":
                return True

        except ValueError as e:
            raise sandboxapi.SandboxError(e)

        return False
1326811
def update_project(id, **kwargs):
    
    content = update_project_raw(id, **kwargs)
    if content:
        return utils.format_json(content)
554876
def Get(self, project_id):
    
    if project_id in self._emulators:
      return self._emulators[project_id]

    emulator = self.Create(project_id)
    self._emulators[project_id] = emulator
    return emulator
485002
def get_project(self, project_id):
        
        try:
            result = self._request('/getproject/',
                                   {'projectid': project_id})
            return TildaProject(**result)
        except NetworkError:
            return []
143173
function fetchProject(projectId) {
	return cocoonSDK.ProjectAPI.get(projectId)
	.catch((error) => {
		console.error("Project with ID: " + projectId + " couldn't be fetched.");
		console.trace(error);
		throw error;
	});
}
1187395
def train_project(project_id, custom_headers:nil)
      response = train_project_async(project_id, custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
281548
def add_project(self, project_id=None, name=None, **kwargs):
        
        if project_id not in self._projects:

            for project in self._projects.values():
                if name and project.name == name:
                    raise aiohttp.web.HTTPConflict(text='Project name "{}" already exists'.format(name))
            project = Project(project_id=project_id, controller=self, name=name, **kwargs)
            self._projects[project.id] = project
            return self._projects[project.id]
        return self._projects[project_id]
332487
def add_project(self, path):
        

        if not foundations.common.path_exists(path):
            return False

        path = os.path.normpath(path)
        if self.__model.get_project_nodes(path):
            self.__engine.notifications_manager.warnify(
                "{0} | '{1}' project is already opened!".format(self.__class__.__name__, path))
            return False

        LOGGER.info("{0} | Adding '{1}' project!".format(self.__class__.__name__, path))
        project_node = self.__model.register_project(path)
        if not project_node:
            return False

        self.__model.set_project_nodes(project_node)
        return True
491505
def get_project(project_id, opts = {})
      data, _status_code, _headers = get_project_with_http_info(project_id, opts)
      return data
    end
236483
def get_project_name(project_id, projects):
    
    for project in projects:
        if project_id == project.id:
            return project.name
451823
def set_project_id(self, project_id):
    
    self._project_id = project_id
    if self == Context._global_context:
      du.save_project_id(self._project_id)
460305
def is_valid_project(self, path):
        """"""
        spy_project_dir = osp.join(path, '.spyproject')
        if osp.isdir(path) and osp.isdir(spy_project_dir):
            return True
        else:
            return False
482069
def find_by_id(self, project, params={}, **options): 
        
        path = "/projects/%s" % (project)
        return self.client.get(path, params, **options)
1233377
def find_by_id(self, project_status, params={}, **options): 
        
        path = "/project_statuses/%s" % (project_status)
        return self.client.get(path, params, **options)
1169630
def send_invitation(request, project_id=None):
    

    project = None
    if project_id is not None:
        project = get_object_or_404(Project, id=project_id)

    if project is None:

        if not is_admin(request):
            return HttpResponseForbidden('<h1>Access Denied</h1>')

    else:

        if not project.can_edit(request):
            return HttpResponseForbidden('<h1>Access Denied</h1>')

    return _send_invitation(request, project)
191341
def record_list_projects(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/listProjects' % object_id, input_params, always_retry=always_retry, **kwargs)