Sets the site of this OauthTokenReference.

        :param site: The site of this OauthTokenReference.
        :type: str
547359
def site(self, site):
        
        if site is None:
            raise ValueError("Invalid value for `site`, must not be `None`")
        if site is not None and len(site) > 255:
            raise ValueError("Invalid value for `site`, length must be less than or equal to `255`")
        if site is not None and len(site) < 3:
            raise ValueError("Invalid value for `site`, length must be greater than or equal to `3`")
        if site is not None and not re.search('(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\\.)+[a-z]{2,}(?:@[a-z0-9](?:[-.](?=[a-z0-9])|[a-z0-9]){0,29})?', site):
            raise ValueError("Invalid value for `site`, must be a follow pattern or equal to `/(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?\\.)+[a-z]{2,}(?:@[a-z0-9](?:[-.](?=[a-z0-9])|[a-z0-9]){0,29})?/`")

        self._site = site
22359
def token_address(self) -> Address:
        
        return to_canonical_address(self.proxy.contract.functions.token().call())
916033
def add_site (site)
      return nil if @sites.map{|s| s[:name]}.include? site
      raise JSS::InvalidDataError, "No site in the JSS named #{site}" unless JSS::Site.all_names(api: @api).include? site
      @sites << {:name => site}
      @need_to_update = true
    end
1052580
public function setSite($site){
        if(!$this->setModified('site', $site)->isModified()){
            return $this;
        }
        $this->site = $site;

        return $this;
    }
717215
def set_url(self, url):
        """"""
        self.url = url
        self.host, self.path = urllib.parse.urlparse(url)[1:3]
155511
public function setSite($site)
    {
        if ($site === null) {
            $this->siteId = null;
            $this->site = null;

            return;
        }
        $this->siteId = $site->getSiteId();

        $this->site = $site;
    }
219950
def get_site_url():
    
    site_url = getattr(_THREAD_LOCAL, _THREAD_SITE_URL, None)
    if site_url is None:
        site_url = SITE_URL or get_site_url_()
        setattr(_THREAD_LOCAL, _THREAD_SITE_URL, site_url)

    return site_url
731821
def with_url(self, url):
        
        self.url = URL(url)
        self.header["Host"] = self.url.host
        return self
941212
def cli(ctx, dname, site):
    
    assert isinstance(ctx, Context)

    dname = domain_parse(dname).hostname
    domain = Session.query(Domain).filter(Domain.name == dname).first()
    if not domain:
        click.secho('No such domain: {dn}'.format(dn=dname), fg='red', bold=True, err=True)
        return

    site_name = site
    site = Site.get(domain, site_name)
    if not site:
        click.secho('No such site: {site}'.format(site=site_name), fg='red', bold=True, err=True)
        return

    p = Echo('Constructing paths and configuration files...')
    site.enable()
    p.done()

    # Restart Nginx
    p = Echo('Restarting web server...')
    FNULL = open(os.devnull, 'w')
    subprocess.check_call(['service', 'nginx', 'restart'], stdout=FNULL, stderr=subprocess.STDOUT)
    p.done()
605945
def _set_url(self, url):
    
    original_url = self._url
    try:
      self._update_index(url)
    except:
      self._url = original_url
      raise
36739
def add_to_site(connection, site_id)
      params = to_json_for_add
      url    = "/api/2.0/sites/#{site_id}/tags"
      uri    = AJAX.post(connection, url, params, AJAX::CONTENT_TYPE::JSON)
      @id    = uri.split('/').last.to_i
    end
789358
def _site_login(self, repo):
        
        try:
            if not self.testmode:
                self.site.login(repo.wiki["user"], repo.wiki["password"])
        except LoginError as e:
            print(e[1]['result'])
        self.basepage = repo.wiki["basepage"]
737711
def _set_sitevisitors(self):
        
        data = self._load_response('sitevisitors').get('query')

        siteviews = data.get('siteviews')
        if siteviews:
            values = [x for x in siteviews.values() if x]
            if values:
                self.data['visitors'] = int(sum(values) / len(values))
            else:
                self.data['visitors'] = 0
480617
def set_host(self, host):
        
        if host[-1] == '/':
            host = host[:-1]

        self.host = host
        return self
1109575
public function setSite(\BiberLtd\Bundle\SiteManagementBundle\Entity\Site $site) {
        if(!$this->setModified('site', $site)->isModified()) {
            return $this;
        }
		$this->site = $site;
		return $this;
    }
756240
def init(cls, site):
        
        bash_header = ""
        for k,v in site.items():
            bash_header += "%s=%s" % (k.upper(), v)
            bash_header += '\n'
        site['bash_header'] = bash_header

        # TODO: execute before_deploy
        # P.S. running init_before seems like impossible, because the file hasn't been rendered.
        if cls.git_template:
            # do render from git repo
            print "Cloning template files..."
            repo_local_copy = utils.clone_git_repo(cls.git_template_url)
            print "Rendering files from templates..."
            target_path = os.getcwd()
            settings_dir = '/'.join(site['django_settings'].split('.')[:-1])
            site['project_name'] = settings_dir.replace('/', '.')
            settings_dir_path = target_path
            if settings_dir:
                settings_dir_path +=  '/' + settings_dir
            utils.render_from_repo(repo_local_copy, target_path, site, settings_dir_path)
        else:
            cls._create_configs(site)
        print cls.setup_instructions
        # TODO: execute after_deploy
        run_hooks('init_after')
268822
public void setWebsite(String website) {
    if(website != null) {
      website = website.trim();
    }
    this.website = website;
  }