Run each one at a time for all models in such a way that it won't disturb the other
@return
333615
public ModelDef[] correct(){
		for(ModelDef m : modelList){
			this.model = m;
			correct1to1Detail();
		}
		for(ModelDef m : modelList){
			this.model = m;
			removeUnnecessaryHasOneToSelf();
		}
		for(ModelDef m : modelList){
			this.model = m;
			removeUnnecessaryHasManyToSelf();
		}
		for(ModelDef m : modelList){
			this.model = m;
			crossOutLinkerTables();
		}
		for(ModelDef m : modelList){
			this.model = m;
			removeHasOneToBothPrimaryAndForeignKey();
		}
		return modelList;
	}
1031793
public static Schedulers stopAll() {
        createSingleton();
        if (instance.runningSchedullers.isEmpty()) {
            throw new IllegalStateException("No schedulers available.");
        }

        for (Entry<String, ScheduledFuture<?>> entry : instance.runningSchedullers.entrySet()) {
            ScheduledFuture<?> future = entry.getValue();
            future.cancel(true);
            Schedulers.decreaseNoOfSchedullers();
            Schedulers.decreaseNoOfRunningSchedullers();
        }

        return instance;
    }
682239
def run
      done = []

      queues.each_with_object([]) {|(fqdn, queue), workers|
        @thread_limit.times.map.with_index {|i|
          workers << Thread.start {
            Thread.current[:id] = i+1
            done.push *worker_class(fqdn).new(fqdn, queue(fqdn), cache(fqdn), &@block).run(@thread_limit)
          }
        }
      }.each {|t| t.join }

      done
    end
1202269
public Set<GraphObject> run()
	{
		// result set of neighborhood query
		Set<GraphObject> queryResult = new HashSet<GraphObject>();

		// if upstream is selected
		if (direction == Direction.UPSTREAM || direction == Direction.BOTHSTREAM)
		{
			// run BFS in upstream direction
			BFS bfsBackward = new BFS(sourceNodes, null, Direction.UPSTREAM, this.limit);

			/*
	  Maps to hold forward and backward BFS results
	 */
			Map<GraphObject, Integer> mapBackward = bfsBackward.run();

			// add result of BFS to result Set
			queryResult.addAll(mapBackward.keySet());
		}

		// if downstream is selected
		if (direction == Direction.DOWNSTREAM || direction == Direction.BOTHSTREAM)
		{
			// run BFS in downstream direction
			BFS bfsForward = new BFS(sourceNodes, null, Direction.DOWNSTREAM, this.limit);

			Map<GraphObject, Integer> mapForward = bfsForward.run();

			// add result of BFS to result Set
			queryResult.addAll(mapForward.keySet());
		}
		
		// return the result of query
		return queryResult;
	}
287680
def run_all_commits
      commits = get_commits
      
      until commits.empty? do
        commits.each {|c| run_commit(c)}
        
        commits = get_commits
      end
    end
607682
function(models){
        var currentLen = this.length;

        // Cloning after converting to an Array because it should be dereferenced
        // in order to continue the while loop when erasing from this._models
        models = Array.from(models).slice();

        this.act(function(){
            var l = models.length,
                i = 0;

            while(l--){
                this._remove(models[i++]);
            }
        });

        // Signal change when the collection of models change
        if (!this.isActive() && this._changed) {
             this.signalChange();

             this.resetChange();
        }

        return this;
    }
562501
function () {
        // make a copy of the array for comparisons
        var existingModels = slice.call(this.models);
        var rootModels = slice.call(this.collection.models);
        var newIndexes = {};
        var newModels, toAdd, toRemove;

        this._resetIndexes(newIndexes);

        // reduce base model set by applying filters
        if (this._filters.length) {
            newModels = reduce(this._filters, function (startingArray, filterFunc) {
                return startingArray.filter(filterFunc);
            }, rootModels);
        } else {
            newModels = slice.call(rootModels);
        }

        // sort it
        if (this.comparator) newModels = this._sortModels(newModels, this.comparator);

        newModels.forEach(function (model) {
            this._addIndex(newIndexes, model);
        }, this);

        // Cache a reference to the full filtered set to allow this._filtered.length. Ref: #6
        if (rootModels.length) {
            this._filtered = newModels;
            this._indexes = newIndexes;
        } else {
            this._filtered = [];
            this._resetIndexes(this._indexes);
        }

        // now we've got our new models time to compare
        toAdd = difference(newModels, existingModels);
        toRemove = difference(existingModels, newModels);

        // save 'em
        this.models = newModels;

        forEach(toRemove, bind(function (model) {
            this.trigger('remove', model, this);
        }, this));

        forEach(toAdd, bind(function (model) {
            this.trigger('add', model, this);
        }, this));

        // unless we have the same models in same order trigger `sort`
        if (!isEqual(existingModels, newModels) && this.comparator) {
            this.trigger('sort', this);
        }
    }
131291
def run(self):
        
        self._runtime_initialize()

        if len(self._flattened_nodes) == 0:
            logger.warning("WARNING: Nothing to do. Try checking your model "
                           "configs and model specification args")
            return []
        else:
            logger.info("")

        selected_uids = frozenset(n.unique_id for n in self._flattened_nodes)
        result = self.execute_with_hooks(selected_uids)

        result.write(self.result_path())

        self.task_end_messages(result.results)
        return result.results
1359963
public List<ModelServiceInstance> getAllInstances(){

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.GetAllServices);
        GetAllServicesResponse resp = (GetAllServicesResponse) connection.submitRequest(header, null,  null);
        return resp.getInstances();
    }
109713
public function run()
    {

         //Get The Models To put In Database
        $models = collect([
                    'Post' => Post::class,
                    'Tag' => Tag::class,
                    'Category' => Category::class
                     ]);

        //Each Model Got His Attribues
        $columns = collect([
               'Post' => [
                    'title' => [
                        'required|max:150',
                        'text',
                        true,
                        null
                    ],
                    'slug' => [
                        'required|unique:posts,slug',
                        'text',
                        true,
                        null
                    ],
                    'content' => [
                        'required',
                        'rich_text_box',
                        false,
                        null
                    ],
                    'description' => [
                        'required|max:250',
                        'text_area',
                        false,
                        null
                    ],
                    'featured' => [
                        null,
                        'checkbox',
                        false,
                        null
                    ],
                    'tags' => [
                        null,
                        'tags',
                        false,
                        null
                    ],
                    'category' => [
                        'required',
                        'category',
                        false,
                        null
                    ],
                    'image' => [
                        'required|mimes:jpeg,bmp,png',
                        'image',
                        true,
                        null
                    ],
                    'status' => [
                        null,
                        'status',
                        true,
                        [
                            [
                                'value' => 'PUBLISHED',
                                'option' => 'PUBLISHED'
                            ],
                            [
                                'value' => 'PENDING',
                                'option' => 'PENDING'
                            ],
                            [
                                'value' => 'DRAFT',
                                'option' => 'DRAFT'
                            ]
                        ],
                    ]
                ],
               'Tag' => [
                    'name' => [
                        'required|max:156',
                        'text',
                        true,
                        null
                    ],
                    'slug' => [
                        'required|max:100|unique:tags,slug',
                        'string',
                        true,
                        null
                    ]
                ],
               'Category' => [
                    'name' => [
                        'required|max:156',
                        'text',
                        true,
                        null
                    ],
                    'slug' => [
                        'required|max:100|unique:categories,slug',
                        'string',
                        true,
                        null
                    ]
                ]
               ]);
      $settings = collect([
        'title' => [
            'Site Title',
            'text'
        ],
        'description' => [
            'Site Description',
            'text'
        ],
        'logo' => [
            'Site Logo',
            'image'
        ],
        'google_analytics_client_id' => [
            'Google Api Id',
            'text'
        ]
      ]);


        $this->command->info('Laramin Data Seeder');

        $this->command->info('Seed Settings');
        $settings->each(function($value,$index) {
            $this->command->info('Creating Settings for '.$index);
            Settings::create([
                    'key' => $index,
                    'display_name' => $value[0],
                    'type' => $value[1],
            ]);
        });


        $models->each(function ($model, $index) use ($columns) {
            $this->command->info('Creating Data Type to '.$index);

            $res = DataType::create([
                        'name' => $index,
                        'menu' => true,
                        'model' =>  $index,
                        'slug' => strtolower($index),
                    ]);
            $id = $res->id;
            $columns->filter(function ($item, $key) use ($index, $id) {
                return $key == $index;
            })->Flatmap(function ($item, $key) use ($id) {
                return $item;
            })->each(function ($item, $key) use ($id) {
                $this->command->info('Creating Data Info '.$key.' for '.DataType::find($id)->name);

                DataInfo::create([
                        'data_types_id' => $id,
                        'column' => $key,
                        'type' => $item[1],
                        'validation' => $item[0] == null ? NULL : json_encode($item[0]),
                        'details' => $item[3] == null ? NULL : json_encode($item[3]),
                        'display' => $item[2]
                    ]);
            });
        });
    }
1326263
@Override
    public MultiDataSet next() {
        counter.incrementAndGet();

        INDArray[] features = new INDArray[baseFeatures.length];
        System.arraycopy(baseFeatures, 0, features, 0, baseFeatures.length);
        INDArray[] labels = new INDArray[baseLabels.length];
        System.arraycopy(baseLabels, 0, labels, 0, baseLabels.length);

        MultiDataSet ds = new MultiDataSet(features, labels);

        return ds;
    }
404092
def run_all(scopes = {})
      UI.clear(force: true)
      UI.action_with_scopes("Run", scopes)
      Runner.new.run(:run_all, scopes)
    end
1270730
@Override
  public void run() {
    List<CompactionVerifier> verifiers = this.suite.getMapReduceVerifiers();
    for (CompactionVerifier verifier : verifiers) {
      if (!verifier.verify(dataset).isSuccessful()) {
        log.error("Verification {} for {} is not passed.", verifier.getName(), dataset.datasetURN());
        this.onMRTaskComplete (false, new IOException("Compaction verification for MR is failed"));
        return;
      }
    }

    super.run();
  }
855204
@Override
    public void run() {
	try {
	    try {
		turnsControl.waitTurns(1, "Robot starting"); // block at the beginning so that all
							     // robots start at the
		// same time
	    } catch (BankInterruptedException exc) {
		log.trace("[run] Interrupted before starting");
	    }

	    assert getData().isEnabled() : "Robot is disabled";

	    mainLoop();

	    log.debug("[run] Robot terminated gracefully");
	} catch (Exception | Error all) {
	    log.error("[run] Problem running robot " + this, all);
	    die("Execution Error -- " + all);
	}
    }
1044361
def run_actions
        catch_exceptions do
          @success = if block_given?
            result = yield
            actions.each {|action| results[action] = result}
            !!result
          else
            actions.compact.each {|action| !skip_actions && results[action] = object.send(action)}
            results.values.all?
          end
        end
      end
670133
public List<Model> getModels() {
        ArrayList<Model> list = new ArrayList<>(mItems.size());
        for (Item item : mItems.getItems()) {
            if (mReverseInterceptor != null) {
                list.add(mReverseInterceptor.intercept(item));
            } else if (item instanceof IModelItem) {
                list.add((Model) ((IModelItem) item).getModel());
            } else {
                throw new RuntimeException("to get the list of models, the item either needs to implement `IModelItem` or you have to provide a `reverseInterceptor`");
            }
        }
        return list;
    }
1320446
def each
      @model.transaction do
        begin
          declare_cursor
          if @join_dependency
            rows = Array.new
            last_id = nil

            while row = fetch_forward
              instantiated_row = @join_dependency.instantiate([row], @join_dependency.aliases).first

              current_id = instantiated_row[@join_dependency.join_root.primary_key]
              last_id ||= current_id
              if last_id == current_id
                rows << row
                last_id = current_id
              else
                yield @join_dependency.instantiate(rows, @join_dependency.aliases).first
                rows = [ row ]
              end
              last_id = current_id
            end

            if !rows.empty?
              yield @join_dependency.instantiate(rows, @join_dependency.aliases).first
            end
          else
            while row = fetch_forward
              yield @model.instantiate(row)
            end
          end
        ensure
          close_cursor
        end
      end
      nil
    end