Calls the draftcombinedrillresults API and returns a DraftCombineDrillResults resource.

 @param season_year [String]
 @param league_id [String]
 @return [NbaStats::Resources::DraftCombineDrillResults]
496728
def draft_combine_drill_results(
        season_year,
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::DraftCombineDrillResults.new(
          get(DRAFT_COMBINE_DRILL_RESULTS_PATH, {
              :LeagueID => league_id,
              :SeasonYear => season_year
          })
      )
    end
58016
def draft_combine_spot_shooting(
        season_year,
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::DraftCombineSpotShooting.new(
          get(DRAFT_COMBINE_SPOT_SHOOTING_PATH, {
              :LeagueID => league_id,
              :SeasonYear => season_year
          })
      )
    end
1242809
def parse_standings(opt={})
      begin
        url = ParamsBuilder.build_link(opt)
        xml = fetch(url,"standings")
        data = []
        xml.xpath("//team").each do |inf|
        c = ScheduleLine.new

        inf.children.each do |child|
          if(child.is_a?(Nokogiri::XML::Element))
            #puts "#{child.name} - #{child.text}"
            #c.create_line({:name => child.name, :text => child.text})
            c.send("create_#{child.name}", child.text)

          end

          #c.send("#{child.name.to_s}=",child['data'])
        end
        data << c

        end
        return data
      rescue => e
        raise e
      end
    end
1131268
def get_injuries_by_team(self, season, week, team_id):
        
        result = self._method_call("Injuries/{season}/{week}/{team_id}", "stats", season=season, week=week, team_id=team_id)
        return result
607992
def get_box_score_by_team(self, season, week, team_id):
        
        result = self._method_call("BoxScoreV3/{season}/{week}/{team_id}", "stats", season=season, week=week, team_id=team_id)
        return result
1239214
def get_projected_player_game_stats_by_team(self, season, week, team_id):
        
        result = self._method_call("PlayerGameProjectionStatsByTeam/{season}/{week}/{team_id}", "projections", season=season, week=week, team_id=team_id)
        return result
1013802
def get_standings(self, league):
        """"""
        league_id = self.league_ids[league]
        try:
            req = self._get('competitions/{id}/standings'.format(
                        id=league_id))
            self.writer.standings(req.json(), league)
        except APIErrorException:
            # Click handles incorrect League codes so this will only come up
            # if that league does not have standings available. ie. Champions League
            click.secho("No standings availble for {league}.".format(league=league),
                        fg="red", bold=True)
771311
def all_star_final_vote(league_id, season = nil, options = {})
      options[:season] = season || Time.now.year

      get "/league/#{league_id}/allStarFinalVote", options
    end
702782
def get_player_results(id = nil)
      return unless id.to_i.positive?
      uri = URI::HTTP.build(
        host: SquashMatrix::Constants::SQUASH_MATRIX_URL,
        path: SquashMatrix::Constants::PLAYER_RESULTS_PATH.gsub(':id', id.to_s),
        query: SquashMatrix::Constants::PLAYER_RSULTS_QUERY
      )
      success_proc = lambda do |res|
        SquashMatrix::NokogiriParser.get_player_results(res.body)
      end
      handle_http_request(uri, success_proc)
    end
1359632
def get_players(self, team):
        
        team_id = self.__get_team_id(team)
        self.logger.debug(f'Getting players of team {team_id}.')
        return self._request('teams', team_id, 'players')
377462
def get_all_team_ids():
    """"""
    df = get_all_player_ids("all_data")
    df = pd.DataFrame({"TEAM_NAME": df.TEAM_NAME.unique(),
                       "TEAM_ID": df.TEAM_ID.unique()})
    return df
307120
def get_season_team(self, season_key, season_team_key,stats_type=None):
        
        params = {"stats_type": stats_type}
        season_team_url = self.api_path + 'season/' +  season_key + '/team/' + season_team_key + '/'
        response = self.get_response(season_team_url, params=params)
        return response
199823
def get_player_stats(self, player_key, board_key):
        
        player_stats_url = self.api_path + 'player/' + player_key + '/league/' + board_key + '/stats/'
        response = self.get_response(player_stats_url)
        return response
1167121
public function GetLiveLeagueGamesV1($league_id = null, $match_id = null)
    {
        return $this->_call(__METHOD__, 'GET', array('league_id' => $league_id, 'match_id' => $match_id));
    }
1271025
def update_rosters(game, away_id, home_id)
        game_id = find_or_create_game(game, nil, nil)
      
        gameday_info = GamedayUtil.parse_gameday_id('gid_' + game.gid)
        active_date = "#{gameday_info['year']}/#{gameday_info['month']}/#{gameday_info['day']}"
      
        away_res = @db.query("select id from rosters where team_id = '#{away_id}' and active_date = '#{active_date}'")
        away_roster_id=0
      
        found = false
        away_res.each do |row|
          found = true
          away_roster_id = row['id']
        end

        @db.query("UPDATE rosters SET game_id = '#{game_id}', home_or_away = 'a' WHERE id = '#{away_roster_id}'")

        home_res = @db.query("select id from rosters where team_id = '#{home_id}' and active_date = '#{active_date}'")
        home_roster_id=0
      
      
        found = false
        home_res.each do |row|
          found = true
          home_roster_id = row['id']
        end
      
        @db.query("UPDATE rosters SET game_id = '#{game_id}', home_or_away = 'h' WHERE id = '#{home_roster_id}'")
      end
1363271
public ApiKey createApiKey(final Team team) {
        final List<Team> teams = new ArrayList<>();
        teams.add(team);
        pm.currentTransaction().begin();
        final ApiKey apiKey = new ApiKey();
        apiKey.setKey(ApiKeyGenerator.generate());
        apiKey.setTeams(teams);
        pm.makePersistent(apiKey);
        pm.currentTransaction().commit();
        return pm.getObjectById(ApiKey.class, apiKey.getId());
    }
1101987
def football_data(season='1617', data_set='football_data'):
    
    league_dict = {'E0':0, 'E1':1, 'E2': 2, 'E3': 3, 'EC':4}
    def league2num(string):
        if isinstance(string, bytes):
            string = string.decode('utf-8')
        return league_dict[string]

    def football2num(string):
        if isinstance(string, bytes):
            string = string.decode('utf-8')
        if string in football_dict:
            return football_dict[string]
        else:
            football_dict[string] = len(football_dict)+1
            return len(football_dict)+1

    def datestr2num(s):
        import datetime
        from matplotlib.dates import date2num
        return date2num(datetime.datetime.strptime(s.decode('utf-8'),'%d/%m/%y'))
    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)
    start = True
    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, encoding='ISO-8859-1')
        output = open(writename, 'w')
        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: datestr2num, 2:football2num, 3:football2num}, delimiter=',')
        if start:
            X = table[:, :4]
            Y = table[:, 4:]
            start=False
        else:
            X = np.append(X, table[:, :4], axis=0)
            Y = np.append(Y, table[:, 4:], axis=0)
    return data_details_return({'X': X, 'Y': Y, 'covariates': [discrete(league_dict, 'league'), datenum('match_day'), discrete(football_dict, 'home team'), discrete(football_dict, 'away team')], 'response': [integer('home score'), integer('away score')]}, data_set)