V is a table of states
482288
function(buf, V) {
    var M = Array(8);
    var a = Array(8);
    var b = Array(8);
    M[0] = buf[0];
    M[1] = buf[1];
    M[2] = buf[2];
    M[3] = buf[3];
    M[4] = buf[4];
    M[5] = buf[5];
    M[6] = buf[6];
    M[7] = buf[7];
    o.xORTable(a, V[0], V[1], 8);
    o.xORTable(b, V[2], V[3], 8);
    o.xORTable(a, a, b, 8);
    o.xORTable(a, a, V[4], 8);
    M2(a, a);
    o.xORTable(V[0], a, V[0], 8);
    o.xORTable(V[1], a, V[1], 8);
    o.xORTable(V[2], a, V[2], 8);
    o.xORTable(V[3], a, V[3], 8);
    o.xORTable(V[4], a, V[4], 8);
    M2(b, V[0]);
    o.xORTable(b, b, V[1], 8);
    M2(V[1], V[1]);
    o.xORTable(V[1], V[1], V[2], 8);
    M2(V[2], V[2]);
    o.xORTable(V[2], V[2], V[3], 8);
    M2(V[3], V[3]);
    o.xORTable(V[3], V[3], V[4], 8);
    M2(V[4], V[4]);
    o.xORTable(V[4], V[4], V[0], 8);
    M2(V[0], b);
    o.xORTable(V[0], V[0], V[4], 8);
    M2(V[4], V[4]);
    o.xORTable(V[4], V[4], V[3], 8);
    M2(V[3], V[3]);
    o.xORTable(V[3], V[3], V[2], 8);
    M2(V[2], V[2]);
    o.xORTable(V[2], V[2], V[1], 8);
    M2(V[1], V[1]);
    o.xORTable(V[1], V[1], b, 8);
    o.xORTable(V[0], V[0], M, 8);
    M2(M, M);
    o.xORTable(V[1], V[1], M, 8);
    M2(M, M);
    o.xORTable(V[2], V[2], M, 8);
    M2(M, M);
    o.xORTable(V[3], V[3], M, 8);
    M2(M, M);
    o.xORTable(V[4], V[4], M, 8);
}
522704
function parseNotificationDetails(kvpList) {
    const ret = {};
    for (const kvp of kvpList) {
        const parts = kvp.split("=");
        ret[parts[0]] = parts[1];
    }
    return ret;
}
395317
def workflow_states_column(self, obj):
        
        workflow_states = models.WorkflowState.objects.filter(
            content_type=self._get_obj_ct(obj),
            object_id=obj.pk,
        )
        return ', '.join([unicode(wfs) for wfs in workflow_states])
1257386
def _build_table(self) -> Dict[State, Tuple[Multiplex, ...]]:
        
        result: Dict[State, Tuple[Multiplex, ...]] = {}
        for state in self.influence_graph.all_states():
            result[state] = tuple(multiplex for multiplex in self.influence_graph.multiplexes 
                                  if multiplex.is_active(state))
        return result
372713
def _generate_states_report(sorted_data):
    '''
    
    '''
    states = []
    for state, data in sorted_data:
        module, stateid, name, function = state.split('_|-')
        module_function = '.'.join((module, function))
        result = data.get('result', '')
        single = [
            {'function': module_function},
            {'name': name},
            {'result': result},
            {'duration': data.get('duration', 0.0)},
            {'comment': data.get('comment', '')}
        ]

        if not result:
            style = 'failed'
        else:
            changes = data.get('changes', {})
            if changes and isinstance(changes, dict):
                single.append({'changes': _dict_to_name_value(changes)})
                style = 'changed'
            else:
                style = 'unchanged'

        started = data.get('start_time', '')
        if started:
            single.append({'started': started})

        states.append({stateid: single, '__style__': style})
    return states
662895
def _setup_states(state_definitions, prev=()):
    """"""
    states = list(prev)
    for state_def in state_definitions:
        if len(state_def) != 2:
            raise TypeError(
                "The 'state' attribute of a workflow should be "
                "a two-tuple of strings; got %r instead." % (state_def,)
            )
        name, title = state_def
        state = State(name, title)
        if any(st.name == name for st in states):
            # Replacing an existing state
            states = [state if st.name == name else st for st in states]
        else:
            states.append(state)
    return StateList(states)
562879
def _collect_state_names(self, variable):
        ""
        states = sorted(list(self.data.ix[:, variable].dropna().unique()))
        return states
12913
function mapToValues(v){
        function mapRec(e){
            if(!isAVector(e)) return e;
            return mapRec(e.get(0));
        }
        return v.map(mapRec);
    }
1321430
function createVirtualTable() {
            var rows = domTable.rows;
            for (var rowIndex = 0; rowIndex < rows.length; rowIndex++) {
                var cells = rows[rowIndex].cells;
                for (var cellIndex = 0; cellIndex < cells.length; cellIndex++) {
                    addCellInfoToVirtual(rows[rowIndex], cells[cellIndex]);
                }
            }
        }
1119913
private static void vecswap(Quicksortable q, int a, int b, int n) {
        for (int i = 0; i < n; i++, a++, b++)
            q.swap(a, b);
    }
892628
private ValFrame fast_table(Vec v1, int ncols, String colname) {
    if (ncols != 1 || !v1.isInt()) return null;
    long spanl = (long) v1.max() - (long) v1.min() + 1;
    if (spanl > 1000000) return null; // Cap at decent array size, for performance

    // First fast-pass counting
    AstTable.FastCnt fastCnt = new AstTable.FastCnt((long) v1.min(), (int) spanl).doAll(v1);
    final long cnts[] = fastCnt._cnts;
    final long minVal = fastCnt._min;

    // Second pass to build the result frame, skipping zeros
    Vec dataLayoutVec = Vec.makeCon(0, cnts.length);
    Frame fr = new MRTask() {
      @Override
      public void map(Chunk cs[], NewChunk nc0, NewChunk nc1) {
        final Chunk c = cs[0];
        for (int i = 0; i < c._len; ++i) {
          int idx = (int) (i + c.start());
          if (cnts[idx] > 0) {
            nc0.addNum(idx + minVal);
            nc1.addNum(cnts[idx]);
          }
        }
      }
    }.doAll(new byte[]{Vec.T_NUM, Vec.T_NUM}, dataLayoutVec).outputFrame(new String[]{colname, "Count"},
        new String[][]{v1.domain(), null});
    dataLayoutVec.remove();
    return new ValFrame(fr);
  }
1079884
function(state,roundKey)
		{
			state = this.shiftRows(state,true);
			state = this.subBytes(state,true);
			state = this.addRoundKey(state, roundKey);
			state = this.mixColumns(state,true);
			return state;
		}
56937
function(state) {
      if (state.parent && state.parent.data) {
        state.data = state.self.data = inherit(state.parent.data, state.data);
      }
      return state.data;
    }
57103
function hasList(type, state) {
  if (hasMultiLineSelection(state)) {
    for (let i = 0; i < state.texts.size; i++) {
      if (!hasListLine(type, state, i)) {
        return false;
      }
    }
    return true;
  } else {
    return hasListLine(type, state)
  }
}
620553
function PossibleStatesContainer({current, allStates, data}) {
  return {
    caseOf(clauses) {
      const casesCovered = Object.keys(clauses)
      const notCovered = allStates.map(({name}) => name).filter(state => !casesCovered.includes(state))

      if (notCovered.length > 0 && !casesCovered.includes('_')) {
        throw Error('All cases are not covered in a "caseOf" clause')
      }

      const cb = clauses[current.name] || clauses['_']

      return cb instanceof Function ? cb(data) : cb
    },

    current() {
      return current.name
    },

    data() {
      return {...data}
    },

    ...generateTransitionHelpers(current, allStates),
    ...generateWhenAndNotHelpers(current, data, allStates),
  }
}
629944
function loadAll() {
      var allStates = 'Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware,\
              Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana,\
              Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana,\
              Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina,\
              North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina,\
              South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia,\
              Wisconsin, Wyoming';

      return allStates.split(/, +/g).map(function (state) {
        return {
          value: state.toLowerCase(),
          display: state
        };
      });
    }
850862
function gameOfLife() {
  for (var i=0; i<grid.columns; i++) {
    buffer[i] = []; // reset row

    for (var k=0; k<grid.rows; k++) {
      var cnt = 0; // counter

      for ( var m=i-1; m<i+2; m++) { // get the states of surrounding cells
        var mm = (m<0) ? grid.columns-1 : ( (m>=grid.columns) ? m-grid.columns : m );

        for ( var n=k-1; n<k+2; n++) {
          var nn = (n<0) ? grid.rows-1 : ( (n>=grid.rows) ? n-grid.rows : n );
          if (mm===i && nn===k) continue;
          else if ( !grid.canFit(mm, nn, 1, 1) ) cnt++;
        }
      }
      buffer[i][k] = (grid.canFit(i, k, 1, 1) && cnt==3) || (!grid.canFit(i, k, 1, 1) && cnt>=2 && cnt<=3);
    }
  }
}