Parse only the home faceoffs
        
        :returns: ``self`` on success, ``None`` otherwise
490022
def parse_home_face_offs(self):
        
        self.__set_team_docs()
        self.face_offs['home'] = FaceOffRep.__read_team_doc(self.__home_doc)
        return self
399730
def _parse_coords(self,opts):
        
        # The coordinates are mutually exclusive, so
        # shouldn't have to worry about over-writing them.
        if 'coords' in vars(opts): return
        radius = vars(opts).get('radius',0)
        gal = None
        if vars(opts).get('gal') is not None: 
            gal = opts.gal
        elif vars(opts).get('cel') is not None: 
            gal = cel2gal(*opts.cel)
        elif vars(opts).get('hpx') is not None: 
            gal = pix2ang(*opts.hpx)

        if gal is not None:
            opts.coords = [(gal[0],gal[1],radius)]
            opts.names = [vars(opts).get('name','')]
        else:
            opts.coords = None
            opts.names = None

        if vars(opts).get('targets') is not None:
            opts.names,opts.coords = self.parse_targets(opts.targets)
            if vars(opts).get('radius') is not None:
                opts.coords['radius'] = vars(opts).get('radius')
509112
def get_domain_home_from_url(url):
    
    p = parse.urlparse(url)
    if p.netloc:
        return '{}://{}'.format(p.scheme, p.netloc), p.netloc
    else:
        return '', ''
1193483
def from_top_left(from_layer=nil, f=nil)
      if from_layer.is_a?(Hash)
        f = from_layer
        from_layer = nil
      end
      f ||= {}
      from_layer ||= target.superlayer
      _calculate_frame(f, from: from_layer, relative_to: { x: :min, y: :min })
    end
726773
def parse_selfsm(self, f):
		
		#create a dictionary to populate from this sample's file
		parsed_data = dict()
		# set a empty variable which denotes if the headers have been read
		headers = None
		# for each line in the file
		for l in f['f'].splitlines():
			# split the line on tab
			s = l.split("\t")
			# if we haven't already read the header line
			if headers is None:
				# assign this list to headers variable
				headers = s
			# for all rows after the first
			else:
				# clean the sample name (first column) and assign to s_name
				s_name = self.clean_s_name(s[0], f['root'])
				# create a dictionary entry with the first column as a key (sample name) and empty dictionary as a value
				parsed_data[s_name] = {}
				# for each item in list of items in the row
				for i, v in enumerate(s):
					# if it's not the first element (if it's not the name)
					if i != 0:
						# see if CHIP is in the column header and the value is not NA
						if "CHIP" in [headers[i]] and v != "NA":
							# set hide_chip_columns = False so they are not hidden
							self.hide_chip_columns=False
						# try and convert the value into a float
						try:
							# and add to the dictionary the key as the corrsponding item from the header and the value from the list
							parsed_data[s_name][headers[i]] = float(v)
						#if can't convert to float...
						except ValueError:
							# add to the dictionary the key as the corrsponding item from the header and the value from the list
							parsed_data[s_name][headers[i]] = v

		# else return the dictionary
		return parsed_data
251893
def _IsHomeDir(self, subject, token):
    """"""
    h = CheckAccessHelper("IsHomeDir")
    h.Allow("aff4:/users/%s" % token.username)
    h.Allow("aff4:/users/%s/*" % token.username)
    try:
      return h.CheckAccess(subject, token)
    except access_control.UnauthorizedAccess:
      raise access_control.UnauthorizedAccess(
          "User can only access their "
          "home directory.", subject=subject)
1330951
def guess_home():
    ''''''
    global freesurfer_home
    if freesurfer_home != None:
        return True
    # if we already have it in the path, use that
    fv = nl.which('freeview')
    if fv:
        freesurfer_home = parpar_dir(os.path.realpath(fv))
        return True
    for guess_dir in guess_locations:
        if os.path.exists(guess_dir):
            freesurfer_home = guess_dir
            return True
    return False
1024584
def _finish_filter(self, lst, key, include_self, exclusive, biggest_first):
        """"""
        key = self._actual_key(key)
        locations = [x[0] for x in lst]

        if not include_self and key in locations:
            lst.pop(locations.index(key))

        lst.sort(key=lambda x: x[1], reverse=biggest_first)
        lst = [x for x, y in lst]

        # RoW in both key and lst, but not defined; only RoW remains if exclusive
        if key == 'RoW' and 'RoW' not in self and exclusive:
            return ['RoW'] if 'RoW' in lst else []
        elif exclusive:
            removed, remaining = set(), []
            while lst:
                current = lst.pop(0)
                faces = self[current]
                if not faces.intersection(removed):
                    removed.update(faces)
                    remaining.append(current)
            lst = remaining

        # If RoW not resolved, make it the smallest
        if 'RoW' not in self and 'RoW' in lst:
            lst[-1 if biggest_first else 0] = lst.pop(lst.index('RoW'))

        return lst
513132
def parse_netloc(scheme, netloc):
    """"""
    auth, _netloc = netloc.split('@')
    sender, token = auth.split(':')
    if ':' in _netloc:
        domain, port = _netloc.split(':')
        port = int(port)
    else:
        domain = _netloc
        if scheme == 'https':
            port = 443
        else:
            port = 80
    return dict(sender=sender, token=token, domain=domain, port=port)
61001
def find_home
      ['HOME', 'USERPROFILE'].each {|e| return ENV[e] if ENV[e] }
      return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" if ENV['HOMEDRIVE'] && ENV['HOMEPATH']
      File.expand_path("~")
    rescue
      File::ALT_SEPARATOR ? "C:/" : "/"
    end
459071
private static int getOffsetY(Collision collision, Mirror mirror)
    {
        if (mirror == Mirror.VERTICAL)
        {
            return -collision.getOffsetY();
        }
        return collision.getOffsetY();
    }
750574
def extract(self, disp):
        
        res = copy.deepcopy(self)
        for i in range(self.ndims):
            d = disp[i]
            s = self.domain[i]
            if d > 0:
                res.domain[i] = slice(s.start, d)
            elif d < 0:
                res.domain[i] = slice(d, s.stop)
        return res
542391
def parents(self, p_todo, p_only_direct=False):
        
        parents = self._depgraph.incoming_neighbors(
            hash(p_todo), not p_only_direct)
        return [self._tododict[parent] for parent in parents]
968479
def parse_scratches(self):
        
        lx_doc = self.html_doc()
        if not self.__blocks:
            self.__pl_blocks(lx_doc)

        for t in ['aw_scr', 'h_scr']:
            ix = 'away' if t == 'aw_scr' else 'home'
            self.scratches[ix] = self.__clean_pl_block(self.__blocks[t])

        return self if self.scratches else None
1336894
def _get_self_bounds(self):
        
        bounds = [[None, None], [None, None]]
        for point in self.data:
            bounds = [
                [
                    none_min(bounds[0][0], point[0]),
                    none_min(bounds[0][1], point[1]),
                ],
                [
                    none_max(bounds[1][0], point[0]),
                    none_max(bounds[1][1], point[1]),
                ],
            ]
        return bounds
678534
def getOverlayAlpha(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayAlpha
        pfAlpha = c_float()
        result = fn(ulOverlayHandle, byref(pfAlpha))
        return result, pfAlpha.value
461210
def xmoe2_v1_l4k_global_only():
  """"""
  hparams = xmoe2_v1_l4k()
  hparams.decoder_layers = [
      "att" if l == "local_att" else l for l in hparams.decoder_layers]
  return hparams