Returns the football players currently on sale
        @return: [[name, team, min_price, market_price, points, date, owner, position]]
490531
def players_onsale(self, community_id, only_computer=False):
        '''
        
        '''
        headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain",'Referer': 'http://'+self.domain+'/team_news.phtml',"User-Agent": user_agent}
        req = self.session.get('http://'+self.domain+'/teamInfo.phtml?tid=' + community_id, headers=headers).content
        soup = BeautifulSoup(req)
        
        current_year = dt.today().year
        current_month = dt.today().month
        on_sale = []
        year_flag = 0
        for i in soup.find_all('table',{'class','tablecontent03'})[2].find_all('tr')[1:]:
            name = i.find_all('td')[0].text.strip()
            team = i.find('img')['alt']
            min_price = i.find_all('td')[2].text.replace(".","").strip()
            market_price = i.find_all('td')[3].text.replace(".","").strip()
            points = i.find_all('td')[4].text.strip().strip()
            # Controlamos el cambio de año, ya que comunio no lo dá
            if current_month <= 7 and int(i.find_all('td')[5].text[3:5]) > 7:
                year_flag = 1
            date = str(current_year-year_flag)+i.find_all('td')[5].text[3:5]+i.find_all('td')[5].text[:2]
            owner = i.find_all('td')[6].text.strip()
            position = i.find_all('td')[7].text.strip()
            # Comprobamos si solamente queremos los de la computadora o no
            if (only_computer and owner == 'Computer') or not only_computer:
                on_sale.append([name, team, min_price, market_price, points, date, owner, position])

        return on_sale
1118130
def dataframe(self):
        
        if self._points_scored is None and self._points_allowed is None:
            return None
        fields_to_include = {
            'boxscore_index': self.boxscore_index,
            'date': self.date,
            'datetime': self.datetime,
            'day': self.day,
            'extra_points_attempted': self.extra_points_attempted,
            'extra_points_made': self.extra_points_made,
            'field_goals_attempted': self.field_goals_attempted,
            'field_goals_made': self.field_goals_made,
            'fourth_down_attempts': self.fourth_down_attempts,
            'fourth_down_conversions': self.fourth_down_conversions,
            'interceptions': self.interceptions,
            'location': self.location,
            'opponent_abbr': self.opponent_abbr,
            'opponent_name': self.opponent_name,
            'overtime': self.overtime,
            'pass_attempts': self.pass_attempts,
            'pass_completion_rate': self.pass_completion_rate,
            'pass_completions': self.pass_completions,
            'pass_touchdowns': self.pass_touchdowns,
            'pass_yards': self.pass_yards,
            'pass_yards_per_attempt': self.pass_yards_per_attempt,
            'points_allowed': self.points_allowed,
            'points_scored': self.points_scored,
            'punt_yards': self.punt_yards,
            'punts': self.punts,
            'quarterback_rating': self.quarterback_rating,
            'result': self.result,
            'rush_attempts': self.rush_attempts,
            'rush_touchdowns': self.rush_touchdowns,
            'rush_yards': self.rush_yards,
            'rush_yards_per_attempt': self.rush_yards_per_attempt,
            'third_down_attempts': self.third_down_attempts,
            'third_down_conversions': self.third_down_conversions,
            'time_of_possession': self.time_of_possession,
            'times_sacked': self.times_sacked,
            'type': self.type,
            'week': self.week,
            'yards_lost_from_sacks': self.yards_lost_from_sacks
        }
        return pd.DataFrame([fields_to_include], index=[self._boxscore])
134760
def get_agents(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.AgentList(self._results, runtime=self._runtime)
819008
def football_data(season='1314', data_set='football_data'):
    
    def league2num(string):
        league_dict = {'E0':0, 'E1':1, 'E2': 2, 'E3': 3, 'EC':4}
        return league_dict[string]

    def football2num(string):
        if string in football_dict:
            return football_dict[string]
        else:
            football_dict[string] = len(football_dict)+1
            return len(football_dict)+1

    data_set_season = data_set + '_' + season
    data_resources[data_set_season] = copy.deepcopy(data_resources[data_set])
    data_resources[data_set_season]['urls'][0]+=season + '/'
    start_year = int(season[0:2])
    end_year = int(season[2:4])
    files = ['E0.csv', 'E1.csv', 'E2.csv', 'E3.csv']
    if start_year>4 and start_year < 93:
        files += ['EC.csv']
    data_resources[data_set_season]['files'] = [files]
    if not data_available(data_set_season):
        download_data(data_set_season)
    from matplotlib import pyplot as pb
    for file in reversed(files):
        filename = os.path.join(data_path, data_set_season, file)
        # rewrite files removing blank rows.
        writename = os.path.join(data_path, data_set_season, 'temp.csv')
        input = open(filename, 'rb')
        output = open(writename, 'wb')
        writer = csv.writer(output)
        for row in csv.reader(input):
            if any(field.strip() for field in row):
                writer.writerow(row)
        input.close()
        output.close()
        table = np.loadtxt(writename,skiprows=1, usecols=(0, 1, 2, 3, 4, 5), converters = {0: league2num, 1: pb.datestr2num, 2:football2num, 3:football2num}, delimiter=',')
        X = table[:, :4]
        Y = table[:, 4:]
    return data_details_return({'X': X, 'Y': Y}, data_set)
1024550
def value(self):
        
        now = time.time()
        cutoff = now - self.window
        while self.points and self.points[0][0] < cutoff:
            self.points.pop(0)
        return sum([p[1] for p in self.points])
1046279
@Override
    public Iterable<Team> getAllTeams() {
        // Get all available teams
        Iterable<Team> teams = teamRepository.findAll();

        for (Team team : teams) {
            Collector collector = collectorRepository
                    .findOne(team.getCollectorId());
            team.setCollector(collector);
        }

        return teams;
    }
982571
def _read_objects(cls, soup, game):
        
        players = Players()
        players.game = Players.Game()
        # game data
        players.game.venue = soup.game['venue']
        players.game.date = soup.game['date']
        # players & team data
        for team in soup.find_all('team'):
            team_object = cls._get_team(team)
            if team['type'] == Game.TEAM_TYPE_HOME:
                # team data(home)
                players.home_team = team_object
            elif team['type'] == Game.TEAM_TYPE_AWAY:
                # team data(away)
                players.away_team = team_object
            # player data
            players.rosters.update(
                    {player['id']: cls.Player(player, game.retro_game_id) for player in team.find_all('player')}
            )
            # coach data
            players.coaches.update(
                    {coach['id']: cls.Coach(coach, game.retro_game_id, team_object) for coach in team.find_all('coach')}
            )
        # umpire data
        umpires = soup.find('umpires')
        players.umpires.update(
                {umpire['id']: cls.Umpire(umpire, game.retro_game_id) for umpire in umpires.find_all('umpire')}
        )
        return players
521355
def getBuyerInfo(self, auction_id, buyer_id):
        """"""
        # TODO: add price from getBids
        rc = self.__ask__('doGetPostBuyData', itemsArray=self.ArrayOfLong([auction_id]), buyerFilterArray=self.ArrayOfLong([buyer_id]))
        rc = rc[0]['usersPostBuyData']['item'][0]['userData']
        return {'allegro_aid': auction_id,
                'allegro_uid': rc['userId'],
                'allegro_login': magicDecode(rc['userLogin']),
                'name': magicDecode(rc['userFirstName']),
                'surname': magicDecode(rc['userLastName']),
                'company': magicDecode(rc['userCompany']),
                'postcode': magicDecode(rc['userPostcode']),
                'city': magicDecode(rc['userCity']),
                'address': magicDecode(rc['userAddress']),
                'email': magicDecode(rc['userEmail']),
                'phone': rc['userPhone']}
1080894
def get_bids(self, n_points=6):
        
        from pyreto.smart_market import Bid

        qtyprc = self._get_qtyprc(n_points)
        return [Bid(self, qty, prc) for qty, prc in qtyprc]
97294
def values(self):
        
        if self.root.stale:
            self.root.update(self.now, None)
        return self._values.loc[:self.now]
1079571
def get_athlete_clubs(self):
        
        club_structs = self.protocol.get('/athlete/clubs')
        return [model.Club.deserialize(raw, bind_client=self) for raw in club_structs]
965928
def related(self):
        
        if self._related is None:
            if self.athlete_count - 1 > 0:
                self.assert_bind_client()
                self._related = self.bind_client.get_related_activities(self.id)
            else:
                self._related = []
        return self._related
1058689
public function getSaleProductsAttributeList()
    {
        $saleProducts = SaleProductQuery::create()->filterBySaleId($this->getId())->orderByProductId()->find();

        $selectedAttributes = [];

        $currentProduct = false;

        /** @var SaleProduct $saleProduct */
        foreach ($saleProducts as $saleProduct) {
            if ($currentProduct != $saleProduct->getProductId()) {
                $currentProduct = $saleProduct->getProductId();

                $selectedAttributes[$currentProduct] = [];
            }

            $selectedAttributes[$currentProduct][] = $saleProduct->getAttributeAvId();
        }

        return $selectedAttributes;
    }
1184759
def team_players(self, team):
        """"""
        players = sorted(team, key=lambda d: d['shirtNumber'])
        click.secho("%-4s %-25s    %-20s    %-20s    %-15s" %
                    ("N.",  "NAME", "POSITION", "NATIONALITY", "BIRTHDAY"),
                    bold=True,
                    fg=self.colors.MISC)
        fmt = (u"{shirtNumber:<4} {name:<28} {position:<23} {nationality:<23}"
               u" {dateOfBirth:<18}")
        for player in players:
            click.secho(fmt.format(**player), bold=True)
257945
def owned_objects(self):
        
        return (
            [
                self,
                self.__dict__,
                self._head,
                self._tail,
                self._out_edges,
                self._out_edges._keys,
                self._out_edges._values,
                self._in_edges,
                self._in_edges._keys,
                self._in_edges._values,
                self._vertices,
                self._vertices._elements,
                self._edges,
            ] +
            list(six.itervalues(self._out_edges)) +
            list(six.itervalues(self._in_edges))
        )
1232313
def team_players(self, team):
        """"""
        headers = ['Jersey Number', 'Name', 'Position', 'Nationality',
                   'Date of Birth']
        result = [headers]

        result.extend([player['shirtNumber'],
                       player['name'],
                       player['position'],
                       player['nationality'],
                       player['dateOfBirth']]
                      for player in team)
        self.generate_output(result)
1070178
public function listTeams(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/teams', $this->getOwner(),
            $this->getRepo()));
    }