todo push to what ops?
549935
public static double computeWeightedError(GrayF32 imgA, GrayF32 imgB ,
											  GrayF32 imgWeight ) {
		final int h = imgA.getHeight();
		final int w = imgA.getWidth();

		double total = 0;
		double totalWeight = 0;

		for (int y = 0; y < h; y++) {
			for (int x = 0; x < w; x++) {
				float weight = imgWeight.get(x,y);
				double difference =  Math.abs(imgA.get(x,y)-imgB.get(x,y));
				total += difference*weight;
				totalWeight += weight;
			}
		}

		return total / totalWeight;
	}
532717
function (list, e, item) {
			this.options.todos.push(item);
			// Reset the filter so that you always see your new todo
			this.options.state.attr('filter', '');
		}
619857
def push_event(self, event_name, event_type, block_id):
        """"""
        self._db.rpush(event_name, dict(type=event_type, id=block_id))
861690
function applyBatch(ops) {
  return db.batch(ops)
    .then(() => bus.publish('save', ops))
    .then(() => {
      const lastOp = _.last(ops);

      return lastOp && JSON.parse(lastOp.value);
    });
}
61132
function gitPush () {
      var branch = options.branch;
      var withForce = options.force ? ' --force ' : '';

      if (options.remoteBranch) branch += ':' + options.remoteBranch;

      log.subhead('Pushing ' + options.branch + ' to ' + options.remote + withForce);
      execWrap('git push ' + withForce + remoteName + ' ' + branch, false, true);

      if (options.tag) {
        execWrap('git push ' + remoteName + ' ' + options.tag);
      }
    }
216964
def send(self, op, cmd, integration_id, *args):
    """"""
    out_cmd = ",".join(
        (cmd, str(integration_id)) + tuple((str(x) for x in args)))
    self._conn.send(op + out_cmd)
1129748
private void addOp(String op, String path, String value) {
        if (this.operations == null) {
            this.operations = new JsonArray();
        }

        this.operations.add(new JsonObject()
                .add("op", op)
                .add("path", path)
                .add("value", value));
    }
910324
function pushTo(array) {
	return map(function (file, cb) {
		array.push(file);
		cb(null, file);
	});
}
208078
def apply_operation(op_stack, out_stack):
    
    out_stack.append(calc(out_stack.pop(), out_stack.pop(), op_stack.pop()))
930711
public void pushAllChangesToGit() throws IOException {
        if (localRepository == null) {
            throw new IOException("Git has not been created, call createGitRepositoryFirst");
        }
        try {
            UserService userService = new UserService();
            userService.getClient().setOAuth2Token(oAuthToken);
            User user = userService.getUser();
            String name = user.getLogin();
            String email = user.getEmail();
            if (email == null) {
                // This is the e-mail addressed used by GitHub on web commits where the users mail is private. See:
                // https://github.com/settings/emails
                email = name + "@users.noreply.github.com";
            }

            localRepository.add().addFilepattern(".").call();
            localRepository.commit()
                    .setMessage("Initial commit")
                    .setCommitter(name, email)
                    .call();
            PushCommand pushCommand = localRepository.push();
            addAuth(pushCommand);
            pushCommand.call();
        } catch (GitAPIException e) {
            throw new IOException("Error pushing changes to GitHub", e);
        }
    }
896421
private void push(Construct construct) {
        // Make sure we don't blow the stack.
        check(m_stackPos < MAX_STACK_DEPTH, "Too many JSON nested levels (maximum=" + MAX_STACK_DEPTH + ")");
        m_stack[m_stackPos++] = construct;
    }
424427
function (payload) {
        var pendingList = pendings[payload.type];
        if (pendingList) {
            pendingList.push(payload);
        }
        else {
            payload.dispatchAction = dispatchAction;
            api.dispatchAction(payload);
        }
    }
607672
def push_only?
      chunks.each do |c|
        return false if !c.opcode.nil? && c.opcode > OP_16
      end
      true
    end
785196
def op_at_on(operation: ops.Operation,
                 time: Timestamp,
                 device: Device):
        """"""
        return ScheduledOperation(time,
                                  device.duration_of(operation),
                                  operation)
620703
def push_or_pull(self, conf, action=None, ignore_missing=False):
        """"""
        if action not in ("push", "pull"):
            raise ProgrammerError("Should have called push_or_pull with action to either push or pull, got {0}".format(action))

        if not conf.image_index:
            raise BadImage("Can't {0} without an image_index configuration".format(action), image=conf.name)

        if conf.image_name == "scratch":
            log.warning("Not pulling/pushing scratch, this is a reserved image!")
            return

        sync_stream = SyncProgressStream()

        for attempt in range(3):
            if attempt > 0:
                log.info("Attempting sync again\taction=%s\tattempt=%d", action, attempt)

            # Login before pulling or pushing
            # Have this in the for loop incase it fails and the push/pull also fails as a result
            conf.login(conf.image_name, is_pushing=action=='push')

            try:
                for line in getattr(conf.harpoon.docker_api, action)(
                        conf.image_name
                        , tag = None if conf.tag is NotSpecified else conf.tag
                        , stream = True
                        ):

                    for line in line.split(six.binary_type("\r\n", "utf-8")):
                        if not line:
                            continue

                        try:
                            sync_stream.feed(line)
                        except Failure as error:
                            if ignore_missing and action == "pull":
                                log.error("Failed to %s an image\timage=%s\timage_name=%s\tmsg=%s", action, conf.name, conf.image_name, error)
                                break
                            else:
                                raise FailedImage("Failed to {0} an image".format(action), image=conf.name, image_name=conf.image_name, msg=error)
                        except Unknown as error:
                            log.warning("Unknown line\tline=%s", error)

                        for part in sync_stream.printable():
                            if six.PY3:
                                conf.harpoon.stdout.write(part)
                            else:
                                conf.harpoon.stdout.write(part.encode('utf-8', 'replace'))
                        conf.harpoon.stdout.flush()

                # And stop the loop!
                break

            except KeyboardInterrupt:
                raise
            except FailedImage as error:
                log.exception(error)
                if attempt == 2:
                    raise
1018277
function (opt) {

			var actions = [];
			var handler = function () {
				actions.push(arguments);
			};
			include(opt, handler);
			return actions;
		}
1060107
def push(params={})
      uri = 'api/send'
      params.merge!({
        appkey: @appkey,
        timestamp: Time.now.to_i
      })
      request(uri, params)
    end