借贷账户详情,支持查询单个币种
        :param symbol:
        :return:
770014
def get_margin_balance(self, symbol=None, _async=False):
        
        params = {}
        path = '/v1/margin/accounts/balance'
        if symbol:
            params['symbol'] = symbol

        return api_key_get(params, path, _async=_async)
1016640
def symbol(self, ident, bp=0):
        '''
        
        '''
        try:
            s = self.symbols[ident]
        except KeyError:
            class s(SymbolBase):
                pass
            s.__name__ = 'symbol-%s' % (ident,)
            s.ident = ident
            s.lbp = bp
            self.symbols[ident] = s
        else:
            s.lbp = max(bp, s.lbp)
        return s
983952
def escape_symbols(txt)
			esc = ''
			txt.to_s.each_byte { |byte|
				esc << if(entity = @@symbol_entities[byte])
					'&' << entity << ';'
				else
          byte
				end
			}
			esc
		end
1045542
function (symbol) {
  var parentheticals;

  if (symbol === '') return 'M'; // No symbol means major triad

  symbol = symbol.replace(/maj/i, 'M')
                 .replace(/∆/, 'M')
                 .replace(/min/i, 'm')
                 .replace(/^-/, 'm')
                 .replace(/dom/, '')
                 .replace(/^o/, 'dim')
                 .replace(/1\/2dim/, 'ø');

  // Remove parentheses unless they are significant, i.e. they contain an 11, or 13
  parentheticals = symbol.match(/\([^\)]*\)/g);
  _.each(parentheticals, function (parenthetical) {
    if (parenthetical.indexOf('11') === -1 && parenthetical.indexOf('13') === -1) {
      symbol = symbol.replace(parenthetical, parenthetical.slice(1, -1));
    }
  });

  return symbol;
}
1084527
def _imported_symbol(import_path):
    
    module_name, symbol_name = import_path.rsplit('.', 1)
    module = import_module(module_name)
    return getattr(module, symbol_name)
1349119
def insert_symbol(self, sname, skind, stype):
        
        self.table.append(SymbolTableEntry(sname, skind, stype))
        self.table_len = len(self.table)
        return self.table_len-1
10668
def read_symbol
      logger.debug "  read symbol"
      skip_whitespace
      r = ""
      while !empty? && (c = text[position]) =~ /[-a-zA-Z_0-9]/
        r << c
        increase
      end
      s = STRING_TO_TOKEN[r]
      s = r.to_sym unless s
      s = true if s == :true
      s = false if s == :false
      logger.debug "  resulting symbol: #{s}"
      s
    end
1159387
def _translate_symbols(string):
    """"""
    res = []
    string = str(string)
    for s in re.split(r'(\W+)', string, flags=re.UNICODE):
        tex_str = _GREEK_DICTIONARY.get(s)
        if tex_str:
            res.append(tex_str)
        elif s.lower() in _GREEK_DICTIONARY:
            res.append(_GREEK_DICTIONARY[s])
        else:
            res.append(s)
    return "".join(res)
795227
def declared_symbols(self):
        

        return self.local_declared_symbols | (
            self.parent.declared_symbols if self.parent else set())
932756
def convert_symbol(prototxt_fname):
    
    sym, output_name, input_dim = _parse_proto(prototxt_fname)
    exec(sym)                   # pylint: disable=exec-used
    _locals = locals()
    exec("ret = " + output_name, globals(), _locals)  # pylint: disable=exec-used
    ret = _locals['ret']
    return ret, input_dim
964421
def export_symbols(*path):
    
    lines = open(os.path.join(*path), 'r').readlines()[2:]
    return [s.strip() for s in lines if s.strip() != '']
1285509
def format_symbol(self, symbol, link_resolver):
        
        if not symbol:
            return ''

        if isinstance(symbol, FieldSymbol):
            return ''

        # pylint: disable=unused-variable
        out = self._format_symbol(symbol)
        template = self.get_template('symbol_wrapper.html')

        return template.render(
            {'symbol': symbol,
             'formatted_doc': out})
114486
def symbol_for_inspector_line(self, lineno):
        
        def indent(line):
            n = 0
            for char in line:
                if char == ' ':
                    n += 1
                else:
                    break
            return n / 2

        lines = self._vim.current.buffer[:lineno]
        i = indent(lines[-1])
        fqn = [lines[-1].split()[-1]]

        for line in reversed(lines):
            if indent(line) == i - 1:
                i -= 1
                fqn.insert(0, line.split()[-1])

        return ".".join(fqn)
703775
def strip_symbols(s, pass_symbols=(u'й', u'Й', u'\n')):
    
    result = []
    for char in s:
        # Pass these symbols without processing
        if char in pass_symbols:
            result.append(char)
            continue
        for c in unicodedata.normalize('NFKC', char):
            if unicodedata.category(c) == 'Zs':
                result.append(u' ')
                continue
            if unicodedata.category(c) not in ['So', 'Mn', 'Lo', 'Cn', 'Co', 'Cf', 'Cc']:
                result.append(c)
    return u"".join(result)
103323
def extract_symbol_app(parser, _, args):  # pragma: no cover
    

    parser.add_argument('file', help='ELF file to extract a symbol from')
    parser.add_argument('symbol', help='the symbol to extract')
    args = parser.parse_args(args)
    return ELF(args.file).get_symbol(args.symbol).content
1131099
def dither_symbol(value, dither):
    
    dither = DITHER_TYPES[dither][1]
    return dither[int(round(value * (len(dither) - 1)))]
448731
def remove(self, symbol):
        
        self._unit_system_id = None

        if symbol not in self.lut:
            raise SymbolNotFoundError(
                "Tried to remove the symbol '%s', but it does not exist "
                "in this registry." % symbol
            )

        del self.lut[symbol]