Return the path in the "Start Active Players" button
971329
def start_active_players_path(page):
    
    soup = BeautifulSoup(page)
    try:
        return soup.find('a', href=True, text='Start Active Players')['href']
    except:
        return None
1127753
function () {
    if (player.playing) player.pause()
    else player.play()
    if (player.playing) {
      clickToPlay.style.display = 'none'
    } else {
      clickToPlay.textContent = 'Paused'
      clickToPlay.style.display = 'block'
    }
  }
1267872
def updatePlayer(name, settings):
    """"""
    player = delPlayer(name) # remove the existing record
    _validate(settings)
    player.update(settings)
    player.save()
    getKnownPlayers()[player.name] = player
    return player
1346502
function WaitScreen(options) {
        options = options || {};

        /**
         * ### WaitScreen.id
         *
         * The id of _waitingDiv_. Default: 'ng_waitScreen'
         *
         * @see WaitScreen.waitingDiv
         */
        this.id = options.id || 'ng_waitScreen';

        /**
         * ### WaitScreen.root
         *
         * Reference to the root element under which _waitingDiv is appended
         *
         * @see WaitScreen.waitingDiv
         */
        this.root = options.root || null;

        /**
         * ### WaitScreen.waitingDiv
         *
         * Reference to the HTML Element that actually locks the screen
         */
        this.waitingDiv = null;

        /**
         * ### WaitScreen.beforePauseText
         *
         * Flag if the screen should stay locked after a RESUMED event
         *
         * Contains the value of the innerHTML attribute of the waiting div.
         */
        this.beforePauseInnerHTML = null;

        /**
         * ### WaitScreen.enabled
         *
         * Flag is TRUE if the listeners are registered
         *
         * @see WaitScreen.enable
         */
        this.enabled = false;

        /**
         * ### WaitScreen.contentDiv
         *
         * Div containing the main content of the wait screen
         */
        this.contentDiv = null;

        /**
         * ### WaitScreen.countdownDiv
         *
         * Div containing the countdown span and other text
         *
         * @see WaitScreen.countdown
         * @see WaitScreen.countdownSpan
         */
        this.countdownDiv = null;

        /**
         * ### WaitScreen.countdownSpan
         *
         * Span containing a countdown timer for the max waiting
         *
         * @see WaitScreen.countdown
         * @see WaitScreen.countdownDiv
         */
        this.countdownSpan = null;

        /**
         * ### WaitScreen.countdown
         *
         * Countdown of max waiting time
         *
         * @see WaitScreen.countdown
         */
        this.countdown = null;

        /**
         * ### WaitScreen.text
         *
         * Default texts for default events
         */
        this.defaultTexts = {
            waiting: options.waitingText ||
                'Waiting for other players to be done...',
            stepping: options.steppingText ||
                'Initializing game step, will be ready soon...',
            paused: options.pausedText ||
                'Game is paused. Please wait.'
        };

        /**
         * ## WaitScreen.lockedInputs
         *
         * List of locked inputs by the _lock_ method
         *
         * @see WaitScreen.lock
         */
        this.lockedInputs = [];

        // Registers the event listeners.
        this.enable();
    }
1368371
def _detect_running_player(self):
        
        supported_players = self.supported_players.split(",")
        running_players = []
        for pid in os.listdir("/proc"):
            if not pid.isdigit():
                continue

            fn = os.path.join("/proc", pid, "comm")
            try:
                with open(fn, "rb") as f:
                    player_name = f.read().decode().rstrip()
            except:  # noqa e722
                # (IOError, FileNotFoundError):  # (assumed py2, assumed py3)
                continue

            if player_name in supported_players:
                running_players.append(player_name)

        # Pick which player to use based on the order in self.supported_players
        for player_name in supported_players:
            if player_name in running_players:
                if self.debug:
                    self.py3.log("found player: %s" % player_name)

                # those players need the dbus module
                if player_name in ("vlc") and not dbus_available:
                    self.py3.log("%s requires the dbus python module" % player_name)
                    return None

                return player_name

        return None
1109141
def set_path(self, path, is_user=False):
        
        self.clear_buttons()
        pathlist = util.rec_split_path(path)
        for (abspath, name) in pathlist:
            self.append_button(abspath, name)

        if is_user:
            self.add_view_history(path)

        self.back_button.set_sensitive(self.can_back())
        self.forward_button.set_sensitive(self.can_forward())

        self.show_all()
408018
public List<String> getPlayerNames() {
        return lastGameState.getPlayers().stream().map(Player::getUsername).collect(Collectors.toList());
    }
516723
private void doStopPlaying()
	{
		if (playerThread!=null)
		{
			playerThread.stopMod();
			getSoundOutputStream().closeAllDevices();
			playerThread = null;
			removeMixer();
		}
	}
498222
def team_path(self, team=None):
        
        if team is None:
            team = DEFAULT_TEAM
        return os.path.join(self._path, self.PKG_DIR, team)
295213
def _players(self):
        """"""
        for i in range(1, self._header.replay.num_players):
            yield i, self._header.initial.players[i].attributes
243851
def play_by_play(
        game_id,
        start_period=0,
        end_period=0
    )
      NbaStats::Resources::PlayByPlay.new(
          get(PLAY_BY_PLAY_PATH, {
              :GameID => game_id,
              :StartPeriod => start_period,
              :EndPeriod => end_period
          })
      )
    end
928876
def replay_paths(self, replay_dir):
    """"""
    replay_dir = self.abs_replay_path(replay_dir)
    if replay_dir.lower().endswith(".sc2replay"):
      yield replay_dir
      return
    for f in gfile.ListDir(replay_dir):
      if f.lower().endswith(".sc2replay"):
        yield os.path.join(replay_dir, f)
264255
function () {
        var gamepads = navigator.getGamepads();
        var e = {};

        // Trigger button bindings
        Object.keys(bindings).forEach(function (index) {
            var gamepad = gamepads[index];
            if (!gamepad) {
                return;
            }

            var mapping = null;
            if (gamepad.mapping !== "standard") {
                mapping = remap.get(gamepad.id);
            }

            var binding = bindings[index];

            // Iterate all buttons that have active bindings
            Object.keys(binding.buttons).forEach(function (button) {
                var last = binding.buttons[button];
                var mapped_button = button;
                var mapped_axis = -1;

                // Remap buttons if necessary
                if (mapping) {
                    mapped_button = mapping.buttons[button];
                    mapped_axis = mapping.analog[button];
                    if (mapped_button < 0 && mapped_axis < 0) {
                        // Button is not mapped
                        return;
                    }
                }

                // Get mapped button
                var current = gamepad.buttons[mapped_button] || {};

                // Remap an axis to an analog button
                if (mapping) {
                    if (mapped_axis >= 0) {
                        var value = mapping.normalize_fn(gamepad.axes[mapped_axis], -1, +button);

                        // Create a new object, because GamepadButton is read-only
                        current = {
                            "value" : value,
                            "pressed" : current.pressed || (Math.abs(value) >= deadzone)
                        };
                    }
                }

                me.event.publish(me.event.GAMEPAD_UPDATE, [ index, "buttons", +button, current ]);

                // Edge detection
                if (!last.pressed && current.pressed) {
                    api._keydown(e, last.keyCode, mapped_button + 256);
                }
                else if (last.pressed && !current.pressed) {
                    api._keyup(e, last.keyCode, mapped_button + 256);
                }

                // Update last button state
                last.value = current.value;
                last.pressed = current.pressed;
            });

            // Iterate all axes that have active bindings
            Object.keys(binding.axes).forEach(function (axis) {
                var last = binding.axes[axis];
                var mapped_axis = axis;

                // Remap buttons if necessary
                if (mapping) {
                    mapped_axis = mapping.axes[axis];
                    if (mapped_axis < 0) {
                        // axe is not mapped
                        return;
                    }
                }

                // retrieve the current value and normalize if necessary
                var value = gamepad.axes[mapped_axis];
                if (typeof(value) === "undefined") {
                    return;
                }
                if (mapping) {
                    value = mapping.normalize_fn(value, +axis, -1);
                }
                // normalize value into a [-1, 1] range value (treat 0 as positive)
                var range = Math.sign(value) || 1;
                if (last[range].keyCode === 0) {
                    return;
                }
                var pressed = (Math.abs(value) >= (deadzone + Math.abs(last[range].threshold)));

                me.event.publish(me.event.GAMEPAD_UPDATE, [ index, "axes", +axis, value ]);

                // Edge detection
                if (!last[range].pressed && pressed) {
                    // Release the opposite direction, if necessary
                    if (last[-range].pressed) {
                        api._keyup(e, last[-range].keyCode, mapped_axis + 256);
                        last[-range].value = 0;
                        last[-range].pressed = false;
                    }

                    api._keydown(e, last[range].keyCode, mapped_axis + 256);
                }
                else if ((last[range].pressed || last[-range].pressed) && !pressed) {
                    range = last[range].pressed ? range : -range;
                    api._keyup(e, last[range].keyCode, mapped_axis + 256);
                }

                // Update last axis state
                last[range].value = value;
                last[range].pressed = pressed;
            });
        });
    }
611247
def abspath(self):
        ""
        return Path(os.path.abspath(os.path.expanduser(str(self.path))))
738875
def bot_config(player_config_path: Path, team: Team) -> 'PlayerConfig':
        
        bot_config = PlayerConfig()
        bot_config.bot = True
        bot_config.rlbot_controlled = True
        bot_config.team = team.value
        bot_config.config_path = str(player_config_path.absolute()) # TODO: Refactor to use Path's
        config_bundle = get_bot_config_bundle(bot_config.config_path)
        bot_config.name = config_bundle.name
        bot_config.loadout_config = load_bot_appearance(config_bundle.get_looks_config(), bot_config.team)
        return bot_config
928240
def record_path(self):
        '''
        
        '''
        if self.record_button.get_property('active') and (self.record_path_selector
                                                          .selected_path):
            return self.record_path_selector.selected_path
        else:
            return None
158815
function ( action ) {
			var clear = function () {
					clearTimeout(F.player.timer);
				},
				set = function () {
					clear();

					if (F.current && F.player.isActive) {
						F.player.timer = setTimeout(F.next, F.current.playSpeed);
					}
				},
				stop = function () {
					clear();

					D.unbind('.player');

					F.player.isActive = false;

					F.trigger('onPlayEnd');
				},
				start = function () {
					if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
						F.player.isActive = true;

						D.bind({
							'onCancel.player beforeClose.player' : stop,
							'onUpdate.player'   : set,
							'beforeLoad.player' : clear
						});

						set();

						F.trigger('onPlayStart');
					}
				};

			if (action === true || (!F.player.isActive && action !== false)) {
				start();
			} else {
				stop();
			}
		}