deserialize 1 or more actions; return a list of
    Action* objects
339744
def _unpack_actions(raw):
    '''
    
    '''
    actions = []

    while len(raw) > 0:
        atype, alen = struct.unpack('!HH', raw[:4])
        atype = OpenflowActionType(atype)
        action = _ActionClassMap.get(atype)()
        action.from_bytes(raw[:alen])
        raw = raw[alen:]
        actions.append(action)
    return actions
991872
public List<Action> getActions() {
        List<Action> result = new ArrayList<>();
        result.addAll(getOwner().getViewActions());
        result.addAll(TransientViewActionFactory.createAllFor(this));
        return result;
    }
991246
def get_steps_for_actions(self, actions: list):
        
        actions_copy = actions[:]
        steps = [[]]
        count = 0
        for action in actions_copy:
            count += 1
            if count > 10000:  # TODO: hard code
                raise Exception("Impossible to find dependencies of action", actions)
            last_action = action
            action_dependencies = action.get_dependencies()
            if action_dependencies:
                try:
                    step_index = self._get_step_index_for_dependencies(steps, action_dependencies)
                    if step_index is not None:
                        try:
                            steps[step_index+1].append(action)
                        except IndexError:
                            steps.append([action])
                    else:
                        step = []
                        step.extend(action_dependencies)
                        steps.append(step)
                # Si une des dependences n'est pas encore dans les steps, on s'occupera de cette action plus tard
                except NotFoundError:
                    # TODO: Prevoir le cas ou la dependance n'existera jamais dans la liste et lever une erreur
                    actions_copy.append(action)
            else:
                steps[0].append(action)
        return steps
1058442
def _list_items(action, key, profile=None, subdomain=None, api_key=None):
    '''
    
    '''
    items = _query(
        profile=profile,
        subdomain=subdomain,
        api_key=api_key,
        action=action
    )
    ret = {}
    for item in items[action]:
        ret[item[key]] = item
    return ret
1205953
function remapActions(actions) {
    return Object.keys(actions)
        .map(name => {
            let action = (val) => {
                actions[name].next(val);
                return action;
            };

            action.hook = (id) =>  actions[name].hook.filter(([idB, _]) => idB === id);
            action.error = (err) => {
                actions[name].error(err);
                return actions[name];
            };

            return [name, action]
        })
        .reduce((acc, [name, action]) => ({ ...acc, [name]: action  }), {});
}
142480
def actions(self, state):
        ''
        actions = []
        for index, char in enumerate(state):
            if char == '_':
                actions.append(index)
        return actions
32547
def all_possible_actions(self) -> List[str]:
        
        all_actions = set()
        for _, action_list in self.valid_actions.items():
            for action in action_list:
                all_actions.add(action)
        return sorted(all_actions)
120734
def load(cls, v):
        """"""
        if v is None:
            return []
        if isinstance(v, list):
            return [ Action(s) for s in v ]
        elif isinstance(v, str):
            return [Action(v)]
        else:
            raise ParseError("Couldn't parse action: %r" % v)
808357
async def get_actions(self, schema=False):
        
        actions = {}
        entity = [{"tag": self.tag}]
        action_facade = client.ActionFacade.from_connection(self.connection)
        results = (
            await action_facade.ApplicationsCharmsActions(entity)).results
        for result in results:
            if result.application_tag == self.tag and result.actions:
                actions = result.actions
                break
        if not schema:
            actions = {k: v['description'] for k, v in actions.items()}
        return actions
761388
def process_actions(action_ids=None):
    
    actions_taken = 0
    action_list = PublishAction.objects.prefetch_related(
        'content_object',
    ).filter(
        scheduled_time__lte=timezone.now(),
    )

    if action_ids is not None:
        action_list = action_list.filter(id__in=action_ids)

    for action in action_list:
        action.process_action()
        action.delete()
        actions_taken += 1

    return actions_taken
1149191
def action(self, name, pk):
        
        pk = self._deserialize_pk_if_composite(pk)
        if self.appbuilder.sm.has_access(name, self.__class__.__name__):
            action = self.actions.get(name)
            return action.func(self.datamodel.get(pk))
        else:
            flash(as_unicode(FLAMSG_ERR_SEC_ACCESS_DENIED), "danger")
            return redirect(".")
177254
function initWithActions (actionType, actions) {
    var prev = actions[0].copy()
      , now
      , i
    for (i=1; i<actions.length; i++) {
        now = actions[i].copy()
        if (now) {
            prev = new actionType({one: prev, two: now})
        } else {
            break
        }
    }

    return prev
}
1195613
public java.util.List<alluxio.grpc.PAclAction> getActionsList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, alluxio.grpc.PAclAction>(actions_, actions_converter_);
  }
18319
def get_top_n_action_types(self, top_n):
        """"""
        # Count action types
        action_type_to_counts = dict()
        for action in self.actions:
            actiontype = action.actiontype
            if actiontype not in action_type_to_counts:
                action_type_to_counts[actiontype] = 1
            else:
                action_type_to_counts[actiontype] = \
                        action_type_to_counts[actiontype] + 1

        # Convert the dictionary representation into a pair of lists
        action_types = list()
        counts = list()
        for actiontype in action_type_to_counts.keys():
            action_types.append(actiontype)
            counts.append(action_type_to_counts[actiontype])

        # How many actions in total?
        num_actions = len(self.actions)
        num_actions2 = 0
        for count in counts:
            num_actions2 = num_actions2 + count
        if num_actions != num_actions2:
            raise(Exception('Problem counting everything up!'))

        # Sort action types by count (lowest to highest)
        sorted_inds = np.argsort(counts)
        last_ind = len(sorted_inds)-1

        # Return the top N actions
        top_actions = list()
        if top_n > len(sorted_inds):
            raise Exception('Asked for top %d action types, ' +
                            'but there are only %d action types'
                            % (top_n, len(sorted_inds)))
        for i in range(top_n):
            top_actions.append(action_types[sorted_inds[last_ind-i]])
        return top_actions
1043441
def all_actions(type=nil)
      all_actions = actions(type)
      all_actions += invocations.map { |i| i.all_actions(type) }
      all_actions.flatten
    end
1267922
def action_get(key=None):
    """"""
    cmd = ['action-get']
    if key is not None:
        cmd.append(key)
    cmd.append('--format=json')
    action_data = json.loads(subprocess.check_output(cmd).decode('UTF-8'))
    return action_data
1216635
def _deserialize_list(cls, type_item, list_):
        

        list_deserialized = []

        for item in list_:
            item_deserialized = cls.deserialize(type_item, item)
            list_deserialized.append(item_deserialized)

        return list_deserialized