Return a list of empty slot numbers
542036
def get_available_positions(self):
        
        available_positions = ["new"]
        layout = self.context.getLayout()
        used_positions = [int(slot["position"]) for slot in layout]
        if used_positions:
            used = [
                pos for pos in range(1, max(used_positions) + 1) if
                pos not in used_positions]
            available_positions.extend(used)
        return available_positions
109916
def _get_all_slots(self):
        """"""
        all_slots = (getattr(cls, '__slots__', [])
                         for cls in self.__class__.__mro__)
        return set(slot for slots in all_slots for slot in slots)
449171
def items(self, limit=0):
        """"""
        i = ItemIterator(self.iterator)
        i.limit = limit
        return i
544936
def _create_empty_array(self, frames, always_2d, dtype):
        """"""
        import numpy as np
        if always_2d or self.channels > 1:
            shape = frames, self.channels
        else:
            shape = frames,
        return np.empty(shape, dtype, order='C')
852741
function getSlots(children) {
  var slots = {};
  if (children == null) {
    return slots
  }
  if (!Array.isArray(children)) {
    children = [children];
  }
  children = children.filter(function (v) { return v != null; });
  children.forEach(function (v, _i) {
    if (typeof v === 'string' || typeof v === 'number' || v === null) {
      slots.default = slots.default || [];
      slots.default.push(v);
    } else if (v.type === COMMON.template.type) {
      slots[v['data-slot']] = slots[v['data-slot']] || [];
      slots[v['data-slot']].push(v.render);
    } else if (v.props) {
      var dataSlot = v.props['data-slot'];
      if (dataSlot == null) {
        slots.default = slots.default || [];
        slots.default.push(v);
      } else {
        slots[dataSlot] = slots[dataSlot] || [];
        slots[dataSlot].push(v);
      }
    }
  });
  return slots
}
1273465
def list(self, search_from=None, search_to=None, limit=None):
        
        l = []
        for i in self._list():
            l.append(i['data']['data'])
        return l[0:limit]
716285
def as_list(self, fs_type=None):
        """"""
        entries = self._entries
        if fs_type:
            entries = filter(lambda a: a.fs_type == fs_type, entries)
        return entries
228398
def blank(*objs):
    """"""
    for o in objs:
        if isinstance(o, Boolean):
            is_blank = not o
        elif isinstance(o, String):
            is_blank = not len(o.value.strip())
        elif isinstance(o, List):
            is_blank = all(blank(el) for el in o)
        else:
            is_blank = False

        if not is_blank:
            return Boolean(False)

    return Boolean(True)
869728
function slotsAPIObject(vueObj) {
  slotsObj = vueObj["slots"] || {}
  let slots = []
  
  for (const slot in slotsObj) {
    if (slotsObj.hasOwnProperty(slot)) {
      const ele = {
        "name": `${slot}`,
        "description": `${slotsObj[slot]["description"] || 'MISSING DESCRIPTION'}`
      }
      slots.push(ele)
    }
  }
  return slots.length > 0 ? {slots} : null
}
1268592
def _get_data_from_empty_list(source, fields='*', first_row=0, count=-1, schema=None):
  
  fields = get_field_list(fields, schema)
  return {'cols': _get_cols(fields, schema), 'rows': []}, 0
780249
def slots(self):
        """"""
        if self.implied:
            return ()

        data = clips.data.DataObject(self._env)

        lib.EnvDeftemplateSlotNames(self._env, self._tpl, data.byref)

        return tuple(
            TemplateSlot(self._env, self._tpl, n.encode()) for n in data.value)
163378
def get_slot_nio_bindings(self, slot_number):
        

        nio_bindings = yield from self._hypervisor.send('vm slot_nio_bindings "{name}" {slot_number}'.format(name=self._name,
                                                                                                             slot_number=slot_number))
        return nio_bindings
396509
def _clear_empty_values(args):
    '''
    
    '''
    result = {}
    for param in args:
        if args[param] is not None:
            result[param] = args[param]
    return result
731398
function tableFromSlots(slotsObj) {
  const headers = ["Slot", "Description"]
  let rows = []

  for(const slot in slotsObj) {
    let cols = []
    cols.push(`${slot}`) // name of the slot
    cols.push(`${slotsObj[slot]["description"] || ''}`) // description of the slot

    rows.push(cols)
  }

  return rows.length > 0 ? {table: {headers, rows}} : null
}
979735
def slot_obj_dict(o):
    
    d = {}
    for f in o.__slots__:
        d[f] = getattr(o, f, None)
    return d
1071231
def __get_item_sh_fields_empty(self, rol, undefined=False):
        
        # If empty_field is None, the fields do not appear in index patterns
        empty_field = '' if not undefined else '-- UNDEFINED --'
        return {
            rol + "_id": empty_field,
            rol + "_uuid": empty_field,
            rol + "_name": empty_field,
            rol + "_user_name": empty_field,
            rol + "_domain": empty_field,
            rol + "_gender": empty_field,
            rol + "_gender_acc": None,
            rol + "_org_name": empty_field,
            rol + "_bot": False
        }
79392
function empty() {
  return {
    language: null,
    extendedLanguageSubtags: [],
    script: null,
    region: null,
    variants: [],
    extensions: [],
    privateuse: [],
    irregular: null,
    regular: null
  }
}