[bookie] Show a specific rule

        :param str bmg: Betting market id
162855
def rule(ctx, rule):
    
    rule = Rule(rule, peerplays_instance=ctx.peerplays)
    t = PrettyTable([
        "id",
        "name",
    ])
    t.align = "l"
    t.add_row([
        rule["id"],
        "\n".join(["{}: {}".format(v[0], v[1]) for v in rule["name"]]),
    ])
    click.echo(str(t))
    click.echo(
        "\n".join(["{}: {}".format(v[0], v[1]) for v in rule["description"]])
    )
77769
def show(format, full):
    
    # load asset allocation
    app = AppAggregate()
    app.logger = logger
    model = app.get_asset_allocation()

    if format == "ascii":
        formatter = AsciiFormatter()
    elif format == "html":
        formatter = HtmlFormatter
    else:
        raise ValueError(f"Unknown formatter {format}")

    # formatters can display stock information with --full
    output = formatter.format(model, full=full)
    print(output)
1207488
def _rule_id(self, id: int) -> str:
        
        if id is None or id == 0 or id >= 10000000:
            return "other"

        return "gorule-{:0>7}".format(id)
928476
def show(self):
        """"""
        for rule in self.rules_list:
            result = ", ".join([str(check) for check, deny in rule])
            print(result)
626302
def rules(self, x, y):
        # type: (int, int) -> List[Type[Rule]]
        
        return [r for r in self._field[y][x]]
526140
def display_db_info(self):
        """"""
        with self.open_book() as book:
            default_currency = book.default_currency
            print("Default currency is ", default_currency.mnemonic)
266181
def rule_str2rule(rule_str, prob):
    # type: (str, float) -> Rule
    
    if rule_str == "default":
        return Rule([], prob)

    raw_rules = rule_str[1:-1].split(",")
    clauses = []
    for raw_rule in raw_rules:
        idx = raw_rule.find("=")
        if idx == -1:
            raise ValueError("No \"=\" find in the rule!")
        clauses.append(Clause(int(raw_rule[1:idx]), int(raw_rule[(idx + 1):])))
    return Rule(clauses, prob)
724061
def tictactoe(w, i, player, opponent, grid=None):
    ""
    grid = grid or empty_grid
    while True:
        w.render_to_terminal(w.array_from_text(view(grid)))
        if is_won(grid):
            print(whose_move(grid), "wins.")
            break
        if not successors(grid):
            print("A draw.")
            break
        grid = player(w, i, grid)
        player, opponent = opponent, player
670738
function (playerCards, dealerCard, handValue, handCount, dealerCheckedBlackjack, options) 
    {
        // If exactComposition isn't set, no override
        if (options.strategyComplexity != "exactComposition")
        {
            return null;
        }

        // Now look at strategies based on game options
        if ((options.numberOfDecks == 2) && (!options.hitSoft17)) 
        {
            return TwoDeckStandSoft17(playerCards, dealerCard, handValue, handCount, dealerCheckedBlackjack, options);
        }
    }
264464
def player_marks(grid):
    ""
    p, q = grid
    return 'XO' if sum(player_bits(p)) == sum(player_bits(q)) else 'OX'
1261193
def _run(self, strategy, parameters=None):
        '''
        
        '''

        choice = self.run_strategy(strategy, parameters)
        self.choices.append(choice)
        payout = self.bandits.pull(choice)
        if payout is None:
            print('Trials exhausted. No more values for bandit', choice)
            return None
        else:
            self.wins[choice] += payout
        self.pulls[choice] += 1
593844
def message(self):
        ''
        return {
            'source':
            'account',
            'frequence':
            self.frequence,
            'account_cookie':
            self.account_cookie,
            'portfolio_cookie':
            self.portfolio_cookie,
            'user_cookie':
            self.user_cookie,
            'broker':
            self.broker,
            'market_type':
            self.market_type,
            'strategy_name':
            self.strategy_name,
            'current_time':
            str(self._currenttime),
            'allow_sellopen':
            self.allow_sellopen,
            'allow_margin':
            self.allow_margin,
            'allow_t0':
            self.allow_t0,
            'margin_level':
            self.margin_level,
            'init_assets':
            self.init_assets,
            'init_cash':
            self.init_cash,
            'init_hold':
            self.init_hold.to_dict(),
            'commission_coeff':
            self.commission_coeff,
            'tax_coeff':
            self.tax_coeff,
            'cash':
            self.cash,
            'history':
            self.history,
            'trade_index':
            self.time_index_max,
            'running_time':
            str(datetime.datetime.now())
            if self.running_time is None else str(self.running_time),
            'quantaxis_version':
            self.quantaxis_version,
            'running_environment':
            self.running_environment,
            'start_date':
            self.start_date,
            'end_date':
            self.end_date,
            'frozen':
            self.frozen,
            'finished_id':
            self.finishedOrderid
        }
178157
def winning_name(self):
        
        if self.winner == HOME:
            if 'cbb/schools' not in str(self._home_name):
                return str(self._home_name)
            return self._home_name.text()
        if 'cbb/schools' not in str(self._away_name):
            return str(self._away_name)
        return self._away_name.text()
195504
def to_sp_text
      sp = opponent ? opponent.to_s : '0'
      sp << ':'
      if rateable
        sp << score
      else
        sp << case score
        when 'W' then '+'
        when 'L' then '-'
        else '='
        end
      end
    end
73847
def staking_cutoff(round_num, tournament):
    """"""
    click.echo(prettify(napi.get_staking_cutoff(round_num, tournament)))
1372717
def show(self, *args, **kwds):
        
        # Same as in __call__, arguments win over keywords
        arg = args
        if not arg:
            arg = kwds  # pylint: disable=redefined-variable-type
        return self._db.show(self._sql, arg)
885868
function(widget, data) {
            var str;
            str = 'There are more players in this waiting room ' +
                'than playslots in the game. ';
            if (widget.poolSize === 1) {
                str += 'Each player will play individually.';
            }
            else {
                str += 'Only ' + data.nGames + ' players will be selected ' +
                    'to play the game.';
            }
            return str;
        }