List available types for 'smudge'
355329
def available():
    

    db = smudge_db.get()

    click.echo('{:<6} {:<6} {:<50}'.format('Type', 'Offset', 'Magic'))
    for k, v in db.items():
        click.echo('{type:<6} {offset:<6} {magic}'.format(
            type=k, magic=v['magic'].encode('hex'), offset=v['offset']))
1006860
def _build_color_variants(cls):
    
    # Get the basic frame types first.
    frametypes = cls.sets(registered=False)

    _colornames = [
        # 'black', disabled for now, it won't show on my terminal.
        'red',
        'green',
        'yellow',
        'blue',
        'magenta',
        'cyan',
        'white',
    ]
    _colornames.extend('light{}'.format(s) for s in _colornames[:])
    for colorname in _colornames:
        for framesobj in frametypes:
            framename = '{}_{}'.format(framesobj.name, colorname)
            cls.register(
                framesobj.as_colr(fore=colorname),
                name=framename,
            )
1045034
def _get_css_classes(self, ttype):
        """"""
        cls = self._get_css_class(ttype)
        while ttype not in STANDARD_TYPES:
            ttype = ttype.parent
            cls = self._get_css_class(ttype) + ' ' + cls
        return cls
289392
def type_map(gtype, fn):
    """"""

    cb = ffi.callback('VipsTypeMap2Fn', fn)
    return vips_lib.vips_type_map(gtype, cb, ffi.NULL, ffi.NULL)
26385
def available():
    
    font_dir = os.path.dirname(__file__)
    names = [os.path.basename(os.path.splitext(f)[0])
            for f in glob(os.path.join(font_dir, '*.pil'))]
    return sorted(names)
34199
def _find_types(pkgs):
    ''''''
    return sorted({pkg.split(':', 1)[0] for pkg in pkgs
                   if len(pkg.split(':', 1)) == 2})
220656
function listRender(choices, pointer) {
    var output = '';
    var separatorOffset = 0;

    choices.forEach(function (choice, index) {
        if (choice.type === 'separator') {
            separatorOffset++;
            output += "  " + choice + "\n";
            return;
        }

        var isSelected = (index - separatorOffset === pointer);
        var line = (isSelected ? figures.pointer + ' ' : '  ');

        if (choice.isDirectory) {
          if (choice.name === '.') {
            line += '📂  ';
          } else {
            line += '📁  ';
          }
        }
        if (choice.isFile) {
          line += '📄  ';
        }
        line += choice.name;
        if (isSelected) {
          line = chalk.cyan(line);
        }
        output += line + ' \n';
    });

    return output.replace(/\n$/, '');
}
500940
def choose_type(cls, content_type):
        """"""
        return cls.type_cls.SUBDIR if content_type in cls.subdir_types \
            else cls.type_cls.FILE
1003564
function getCurrentActiveType (version) {
  let typelist = TypeList
  for (let i = 0; i < typelist.length; i++) {
    if (semver[typelist[i]](version)) {
      return typelist[i]
    }
  }
}
661699
async def get_types(self):
        """"""
        async with aiohttp.ClientSession() as session:
            async with session.get('https://api.weeb.sh/images/types', headers=self.__headers) as resp:
                if resp.status == 200:
                    return (await resp.json())['types']
                else:
                    raise Exception((await resp.json())['message'])
500838
def striter(self):
        """"""
        pad = self.padding or 0
        for i in self._sorted():
            yield "%0*d" % (pad, i)
780741
def fingerprint type=DEFAULT_FINGERPRINT
      unless fingerprints[type]
        return [] unless self.smiles
        #http://openbabel.org/docs/dev/FileFormats/MolPrint2D_format.html#molprint2d-format
        if type == "MP2D"
          fp = obconversion(smiles,"smi","mpd").strip.split("\t")
          name = fp.shift # remove Title
          fingerprints[type] = fp.uniq # no fingerprint counts
        #http://openbabel.org/docs/dev/FileFormats/Multilevel_Neighborhoods_of_Atoms_(MNA).html
        elsif type== "MNA"
          level = 2 # TODO: level as parameter, evaluate level 1, see paper
          fp = obconversion(smiles,"smi","mna","xL\"#{level}\"").split("\n")
          fp.shift # remove Title
          fingerprints[type] = fp
        else # standard fingerprints
          fp = OpenBabel::OBFingerprint.find_fingerprint(type)
          obmol = OpenBabel::OBMol.new
          obconversion = OpenBabel::OBConversion.new
          obconversion.set_in_format "smi"
          obconversion.read_string obmol, self.smiles
          result = OpenBabel::VectorUnsignedInt.new
          fp.get_fingerprint(obmol,result)
          # TODO: %ignore *::DescribeBits @ line 163 openbabel/scripts/openbabel-ruby.i
          #p OpenBabel::OBFingerprint.describe_bits(result)
          # convert result to a list of the bits that are set
          # from openbabel/scripts/python/pybel.py line 830
          # see also http://openbabel.org/docs/dev/UseTheLibrary/Python_Pybel.html#fingerprints
          result = result.to_a
          bitsperint = OpenBabel::OBFingerprint.getbitsperint()
          bits_set = []
          start = 1
          result.each do |x|
            i = start
            while x > 0 do
              bits_set << i if (x % 2) == 1
              x >>= 1
              i += 1
            end
            start += bitsperint
          end
          fingerprints[type] = bits_set
        end
        save
      end
      fingerprints[type]
    end
585125
def _monitoring_resource_types_list(args, _):
  """"""
  project_id = args['project']
  pattern = args['type'] or '*'
  descriptors = gcm.ResourceDescriptors(context=_make_context(project_id))
  dataframe = descriptors.as_dataframe(pattern=pattern)
  return _render_dataframe(dataframe)
502316
def font_list(text="test", test=False):
    
    fonts = set(FONT_MAP.keys())
    if test:
        fonts = fonts - set(TEST_FILTERED_FONTS)
    for item in sorted(list(fonts)):
        print(str(item) + " : ")
        text_temp = text
        try:
            tprint(text_temp, str(item))
        except Exception:
            print(FONT_ENVIRONMENT_WARNING)
31281
def get_suitable_vis_classes(obj):
    """"""

    ret = []
    for class_ in classes_vis():
        if isinstance(obj, class_.input_classes):
            ret.append(class_)
    return ret
1368867
def available_styles(self):
        
        styles = self._schema_item.get("styles", [])

        return list(map(operator.itemgetter("name"), styles))
1099088
def help(cls):
        """"""
        print("for named colors use :")
        for c in sorted(list(cls.colors.items())):
            print("{:10} {}".format(*c))