Episode number.

        Unique for an anime and episode type, but not unique across episode
        types for the same anime.
778911
def number(self) -> int:
        
        match = self._NUMBER_SUFFIX.search(self.epno)
        return int(match.group(1))
1022893
public function getEpisodeByNumber($ID, $season, $episode)
	{
		$ep = false;
		$url = self::APIURL . '/shows/' . $ID . '/episodebynumber?season='. $season . '&number=' . $episode;
		$response = $this->getFile($url);
		if (is_array($response)) {
			$ep = new Episode($response);
		}
		return $ep;
	}
186541
def episode_info(self, cosmoid, season, episode, **kwargs):
        

        resource = 'season/%d/episode/%d/info' % (season, episode)

        return self._cosmoid_request(resource, cosmoid, **kwargs)
217255
def anime(self, item_id):
        
        query_string = """\
            query ($id: Int) {
                Media(id: $id, type: ANIME) {
                    title {
                        romaji
                        english
                    }
                    startDate {
                        year
                        month
                        day
                    }
                    endDate {
                        year
                        month
                        day
                    }
                    coverImage {
                        large
                    }
                    bannerImage
                    format
                    status
                    episodes
                    season
                    description
                    averageScore
                    meanScore
                    genres
                    synonyms
                    nextAiringEpisode {
                        airingAt
                        timeUntilAiring
                        episode
                    }
                }
            }
        """
        vars = {"id": item_id}
        r = requests.post(self.settings['apiurl'],
                         headers=self.settings['header'],
                         json={'query': query_string, 'variables': vars})
        jsd = r.text

        try:
            jsd = json.loads(jsd)
        except ValueError:
            return None
        else:
            return jsd
441249
def get_episode_title(episode: Episode) -> int:
    
    for title in episode.titles:
        if title.lang == 'ja':
            return title.title
    else:
        return episode.titles[0].title
362549
def set_status(
        db,
        aid: int,
        complete: Any,
        watched_episodes: int,
) -> None:
    """"""
    upsert(db, 'cache_anime', ['aid'], {
        'aid': aid,
        'complete': 1 if complete else 0,
        'watched_episodes': watched_episodes,
    })
401910
public boolean isNumber() {
		if (type == Byte.TYPE || type == Short.TYPE || type == Integer.TYPE
				|| type == Long.TYPE || type == Float.TYPE
				|| type == Double.TYPE) {
			return true;
		} else {
			return isRawTypeSubOf(Number.class);
		}
	}
190412
def _unpack_episode_title(element: ET.Element):
    """"""
    return EpisodeTitle(title=element.text,
                        lang=element.get(f'{XML}lang'))
1361216
private static int getEpisodeValue(Element eEpisode, String key) {
        int episodeValue;
        try {
            String value = DOMHelper.getValueFromElement(eEpisode, key);
            episodeValue = NumberUtils.toInt(value, 0);
        } catch (WebServiceException ex) {
            LOG.trace("Failed to read episode value", ex);
            episodeValue = 0;
        }

        return episodeValue;
    }
705314
def file_size(path, rel = nil)
      return 0 if path.nil?
      path = path =~ /\// ? path : File.join('episodes', path)
      path = rel + path if rel
      File.size(path)
    end
630083
function __isNumber(number) {
			if (!isChar(number)) invaildCharacter(number);
			var code = number.charCodeAt(0);
			return code >= ZERO && code <= NINE;
		}
210135
def get_ratings(data):
    """"""
    episodes = data['episodes']
    ratings = {}
    for season in episodes:
        ratings[season] = collapse(episodes[season])
    return co.OrderedDict(sorted(ratings.items()))
56381
def episodes(self):
        

        for sk, season in iteritems(self.seasons):
            # Yield each episode in season
            for ek, episode in iteritems(season.episodes):
                yield (sk, ek), episode
127269
function getISOWeekNumber (date) {
  var wn = getWeekNumber(date, 1, 1);
  var d1_1 = new Date(date.getFullYear(), 0, 1);
  var w1_1 = d1_1.getDay();
  // 初週の日数が少ない場合は週番号がひとつ前にずれる
  if (!w1_1 || 4 < w1_1) {
    wn--;
  }
  if (wn === 0) {
    return 53;
  } else if (wn === 53) {
    // 最終週の場合も多いほうの年の週番号とする
    var d12_31 = new Date(date.getFullYear(), 11, 31);
    var w12_31 = d12_31.getDay();
    return w12_31 && w12_31 < 4 ? 1 : wn;
  } else {
    return wn;
  }
}
454443
def episode_information(self):
        
        return [
            info.get('episode') for infolist in self.environment_information for info in infolist if 'episode' in info
        ]
406185
private function getEpisodeTitle($each_episode, $type = false)
    {
        $title = $each_episode->find('.episode-title', 0);
        if ($type) {
            if ($title->find('span', 1)) {
                return trim($title->find('span', 1)->plaintext);
            }

            return trim($title->find('span', 0)->plaintext);
        } else {
            return $title->find('a', 0)->plaintext;
        }
    }
468485
public static int numDigits(int number) {
		if( number == 0 )
			return 1;
		int adjustment = 0;
		if( number < 0 ) {
			adjustment = 1;
			number = -number;
		}
		return adjustment + (int)Math.log10(number)+1;
	}