Is down optional.
pre:   this is kind of reduced (e.g. results from createReduced
431557
public boolean isDownOptional() {
        int i;
        int max;
        Alternative ab;

        max = alternatives.size();
        for (i = 0; i < max; i++) {
            ab = alternatives.get(i);
            if (ab.getArgCount() == 0) {
                return true;
            }
        }
        return false;
    }
581264
@Override
    public DMatrixRMaj getLower(DMatrixRMaj lower )
    {
        int numRows = LU.numRows;
        int numCols = LU.numRows < LU.numCols ? LU.numRows : LU.numCols;

        lower = UtilDecompositons_DDRM.checkZerosUT(lower,numRows,numCols);

        for( int i = 0; i < numCols; i++ ) {
            lower.unsafe_set(i,i,1.0);

            for( int j = 0; j < i; j++ ) {
                lower.unsafe_set(i,j, LU.unsafe_get(i,j));
            }
        }

        if( numRows > numCols ) {
            for( int i = numCols; i < numRows; i++ ) {
                for( int j = 0; j < numCols; j++ ) {
                    lower.unsafe_set(i,j, LU.unsafe_get(i,j));
                }
            }
        }
        return lower;
    }
581035
def down(self, down_uid):
        '''
        
        '''
        down_url = MPost.get_by_uid(down_uid).extinfo.get('tag__file_download', '')
        print('=' * 40)
        print(down_url)
        str_down_url = str(down_url)[15:]


        if down_url:
            ment_id = MEntity.get_id_by_impath(str_down_url)
            if ment_id:
                MEntity2User.create_entity2user(ment_id, self.userinfo.uid)
            return True
        else:
            return False
939712
public void reduce(K2 key, Iterator<V2> values, 
                     OutputCollector<K3, V3> output, Reporter reporter
                     ) throws IOException {
    isOk = false;
    startApplication(output, reporter);
    downlink.reduceKey(key);
    while (values.hasNext()) {
      downlink.reduceValue(values.next());
    }
    if(skipping) {
      //flush the streams on every record input if running in skip mode
      //so that we don't buffer other records surrounding a bad record.
      downlink.flush();
    }
    isOk = true;
  }
1353748
private Tree<Row> down( Element token ){
        return current = current.addSibling( Tree.of( new Row( token ) ) );
    }
528294
function flattenDown (array, result) {
  for (var i = 0; i < array.length; i++) {
    var value = array[i]

    if (Array.isArray(value)) {
      flattenDown(value, result)
    } else {
      result.push(value)
    }
  }

  return result
}
792544
function lower (value) {
  if (value === null || value === undefined) {
    return value
  }
  return String.prototype.toLowerCase.call(value)
}
1082401
private void transformRollupQueryToDownSampler()  {
    
    if (rollup_query != null) {
      // TODO - clean up and handle fill
      downsampler = new DownsamplingSpecification(
          rollup_query.getRollupInterval().getIntervalSeconds() * 1000, 
          rollup_query.getRollupAgg(),
          (downsampler != null ? downsampler.getFillPolicy() : 
            FillPolicy.ZERO));
      rollup_query = null;
    }
  }
1233694
def strictly_decreasing(values):
    """"""
    return all(x > y for x, y in zip(values, values[1:]))
1334973
function isDropAllowed(itemType) {
        if (listSettings.disabled) return false;
        if (!listSettings.externalSources && !dndState.isDragging) return false;
        if (!listSettings.allowedTypes || itemType === null) return true;
        return itemType && listSettings.allowedTypes.indexOf(itemType) != -1;
      }
1177362
void prepareShutdown() {
        int oldState, newState;
        do {
            oldState = state;
            if ((oldState & CLOSED) != 0) {
                return;
            }
            newState = oldState | CLOSED;
        } while (!stateUpdater.compareAndSet(this, oldState, newState));
        // If there no active requests notify listeners directly
        if (newState == CLOSED) {
            handleCompleted();
        }
    }
922609
private <K> void decrease(Map<K, Integer> map, K key) {
        map.put(key, map.getOrDefault(key, 0)-1);
    }
395403
private Tree<Row> downLeft( Element token ){
        return current = current.getParent().addSibling( Tree.of( new Row( token ) ) );
    }
873017
def optional_install():
    """"""
    # reduce
    print('{BOLD}Setting up Reduce (optional){END_C}'.format(**text_colours))
    reduce = {}
    reduce_path = get_user_path('Please provide a path to your reduce executable.', required=False)
    reduce['path'] = str(reduce_path)
    reduce['folder'] = str(reduce_path.parent) if reduce_path else ''
    settings['reduce'] = reduce

    # naccess
    print('{BOLD}Setting up naccess (optional){END_C}'.format(**text_colours))
    naccess = {}
    naccess_path = get_user_path('Please provide a path to your naccess executable.', required=False)
    naccess['path'] = str(naccess_path)
    settings['naccess'] = naccess

    # profit
    print('{BOLD}Setting up ProFit (optional){END_C}'.format(**text_colours))
    profit = {}
    profit_path = get_user_path('Please provide a path to your ProFit executable.', required=False)
    profit['path'] = str(profit_path)
    settings['profit'] = profit
    return
907303
def linear_scheduler_up_down(init_value, target_value, final_value,
                             duration_up, t_decrease, duration_down):
    

    value = init_value
    t = 0

    while True:
        yield value
        t += 1
        if t < duration_up:
            value = init_value + t * (target_value - init_value) / \
                    float(duration_up)
        elif t > t_decrease:
            value = target_value - (t - t_decrease) * \
                    (target_value - final_value) / \
                    float(duration_down)
        else:
            value = target_value
283807
def do_down(self, arg):
        
        if self.curindex + 1 == len(self.stack):
            self.error('Newest frame')
            return
        try:
            count = int(arg or 1)
        except ValueError:
            self.error('Invalid frame count (%s)' % arg)
            return
        if count < 0:
            newframe = len(self.stack) - 1
        else:
            newframe = min(len(self.stack) - 1, self.curindex + count)
        self._select_frame(newframe)
693109
private void reduceResults(final List<AnalysisResultFuture> results,
            final Map<ComponentJob, AnalyzerResult> resultMap,
            final List<AnalysisResultReductionException> reductionErrors) {

        if (_hasRun.get()) {
            // already reduced
            return;
        }
        
        _hasRun.set(true);

        for (AnalysisResultFuture result : results) {
            if (result.isErrornous()) {
                logger.error("Encountered errorneous slave result. Result reduction will stop. Result={}", result);
                final List<Throwable> errors = result.getErrors();
                if (!errors.isEmpty()) {
                    final Throwable firstError = errors.get(0);
                    logger.error(
                            "Encountered error before reducing results (showing stack trace of invoking the reducer): "
                                    + firstError.getMessage(), new Throwable());
                    _analysisListener.errorUknown(_masterJob, firstError);
                }

                // error occurred!
                return;
            }
        }

        final Collection<AnalyzerJob> analyzerJobs = _masterJob.getAnalyzerJobs();
        for (AnalyzerJob masterAnalyzerJob : analyzerJobs) {
            final Collection<AnalyzerResult> slaveResults = new ArrayList<AnalyzerResult>();
            logger.info("Reducing {} slave results for component: {}", results.size(), masterAnalyzerJob);
            for (AnalysisResultFuture result : results) {

                final Map<ComponentJob, AnalyzerResult> slaveResultMap = result.getResultMap();
                final List<AnalyzerJob> slaveAnalyzerJobs = CollectionUtils2.filterOnClass(slaveResultMap.keySet(),
                        AnalyzerJob.class);
                final AnalyzerJobHelper analyzerJobHelper = new AnalyzerJobHelper(slaveAnalyzerJobs);
                final AnalyzerJob slaveAnalyzerJob = analyzerJobHelper.getAnalyzerJob(masterAnalyzerJob);
                if (slaveAnalyzerJob == null) {
                    throw new IllegalStateException("Could not resolve slave component matching [" + masterAnalyzerJob
                            + "] in slave result: " + result);
                }

                final AnalyzerResult analyzerResult = result.getResult(slaveAnalyzerJob);
                slaveResults.add(analyzerResult);
            }

            reduce(masterAnalyzerJob, slaveResults, resultMap, reductionErrors);
        }
    }