in future in favour of Actuator endpoints
422853
@Get("/health")
  public HttpResponse getHealth() throws JsonProcessingException {
    Health health = healthEndpoint.health();

    Map<String, Object> healthJson = new LinkedHashMap<>();
    healthJson.put("status", health.getStatus().getCode());
    healthJson.put("zipkin", health.getDetails().get("zipkin"));
    byte[] body = mapper.writer().writeValueAsBytes(healthJson);

    HttpHeaders headers = HttpHeaders.of(statusMapper.mapStatus(health.getStatus()))
      .contentType(MediaType.JSON)
      .setInt(HttpHeaderNames.CONTENT_LENGTH, body.length);
    return HttpResponse.of(headers, HttpData.of(body));
  }
995208
function loadEndpoints(endpoints, options, auth) {
	if (Array.isArray(endpoints)) {
		endpoints.forEach(function(endpoint) {
			if (auth !== Boolean(endpoint.authenticated)) {
				//after endpoints refactored, remove this check
				return;
			}
			const conditional = endpoint.hasOwnProperty("ifProp");
			if (conditional && options.configParams.get(endpoint.ifProp) || !conditional) {
				tryLoadRouter(endpoint, options);
			}
		});
	}
}
101523
public synchronized void changeEndpoints(Endpoints endpoints) {
        context().getPreferences().putBytes("custom_endpoints", endpoints.toByteArray());
        actorApi.changeEndpoints(endpoints);
    }
588772
def _get_action_endpoint(action):
    
    _endpoint = None
    if is_method(action):
        if hasattr(action, "_rule_cache"):
            rc = action._rule_cache
            if rc:
                k = list(rc.keys())[0]
                rules = rc[k]
                len_rules = len(rules)
                if len_rules == 1:
                    rc_kw = rules[0][1]
                    _endpoint = rc_kw.get("endpoint", None)
                    if not _endpoint:
                        _endpoint = _build_endpoint_route_name(action)
                elif len_rules > 1:
                    _prefix = _build_endpoint_route_name(action)
                    for r in Mocha._app.url_map.iter_rules():
                        if ('GET' in r.methods or 'POST' in r.methods) \
                                and _prefix in r.endpoint:
                            _endpoint = r.endpoint
                            break
    return _endpoint
150090
function _pointMouseUp(e) {
        var self = e.target;

        self.focus();

        if (self.bezierEditor.dragElement) {
            self.bezierEditor.dragElement = null;
            self.bezierEditor._commitTimingFunction();
            self.bezierEditor._updateCanvas();
        }
    }
368464
function activator (fn) {
    var fallback = function () {
      var args
      var cbIdx = arguments.length - 1
      if (typeof arguments[cbIdx] === 'function') {
        args = Array(arguments.length)
        for (var i = 0; i < arguments.length - 1; i++) {
          args[i] = arguments[i]
        }
        args[cbIdx] = ins.bindFunction(arguments[cbIdx])
      }
      return fn.apply(this, args || arguments)
    }
    // Preserve function length for small arg count functions.
    switch (fn.length) {
      case 1:
        return function (cb) {
          if (arguments.length !== 1) return fallback.apply(this, arguments)
          if (typeof cb === 'function') cb = ins.bindFunction(cb)
          return fn.call(this, cb)
        }
      case 2:
        return function (a, cb) {
          if (arguments.length !== 2) return fallback.apply(this, arguments)
          if (typeof cb === 'function') cb = ins.bindFunction(cb)
          return fn.call(this, a, cb)
        }
      case 3:
        return function (a, b, cb) {
          if (arguments.length !== 3) return fallback.apply(this, arguments)
          if (typeof cb === 'function') cb = ins.bindFunction(cb)
          return fn.call(this, a, b, cb)
        }
      case 4:
        return function (a, b, c, cb) {
          if (arguments.length !== 4) return fallback.apply(this, arguments)
          if (typeof cb === 'function') cb = ins.bindFunction(cb)
          return fn.call(this, a, b, c, cb)
        }
      case 5:
        return function (a, b, c, d, cb) {
          if (arguments.length !== 5) return fallback.apply(this, arguments)
          if (typeof cb === 'function') cb = ins.bindFunction(cb)
          return fn.call(this, a, b, c, d, cb)
        }
      case 6:
        return function (a, b, c, d, e, cb) {
          if (arguments.length !== 6) return fallback.apply(this, arguments)
          if (typeof cb === 'function') cb = ins.bindFunction(cb)
          return fn.call(this, a, b, c, d, e, cb)
        }
      default:
        return fallback
    }
  }
991821
def update(self):
        
        pos = self._amp * numpy.sin(self._freq * 2.0 * numpy.pi * self.elapsed_time +
                                    self._phase * numpy.pi / 180.0) + self._offset

        for m in self.motor_list:
            m.goal_position = pos
551870
protected void obtainEndpoints(List<Node> nodes, List<EndpointInfo> endpoints) {
        for (int i = 0; i < nodes.size(); i++) {
            Node node = nodes.get(i);

            if (node.getUri() != null) {
                EndpointInfo ei=new EndpointInfo();
                ei.setEndpoint(EndpointUtil.encodeEndpoint(node.getUri(), node.getOperation()));

                if (!endpoints.contains(ei)) {
                    initEndpointInfo(ei);
                    endpoints.add(ei);
                }
            }

            if (node instanceof ContainerNode) {
                obtainEndpoints(((ContainerNode) node).getNodes(), endpoints);
            }
        }
    }
150805
def add_to_current_action(self, controller):
        """"""
        item = self.current_item
        self._history[self._index] = item + (controller,)
326492
def process_allow_action(processors, action, argument):
    """"""
    for processor in processors:
        processor(action, argument)
    db.session.commit()
1277731
def _attach_endpoints(self):
        """"""
        for name, endpoint in inspect.getmembers(self):
            if inspect.isclass(endpoint) and issubclass(endpoint, self._Endpoint) and (endpoint is not self._Endpoint):
                endpoint_instance = endpoint(self.base_requester)
                setattr(self, endpoint_instance.endpoint, endpoint_instance)
1278715
def set_vel_setpoint(self, velocity_x, velocity_y, velocity_z, rate_yaw):
        """"""
        self._queue.put((velocity_x, velocity_y, velocity_z, rate_yaw))
1047035
def sync_state(self):
        

        # sync IK robot state to the current robot joint positions
        self.sync_ik_robot(self.robot_jpos_getter())

        # make sure target pose is up to date
        pos_r, orn_r, pos_l, orn_l = self.ik_robot_eef_joint_cartesian_pose()

        self.ik_robot_target_pos_right = pos_r
        self.ik_robot_target_orn_right = orn_r
        self.ik_robot_target_pos_left = pos_l
        self.ik_robot_target_orn_left = orn_l
889214
private void enableActions() {
        restoreAction.setEnabled(isParentMaximum() || isParentIcon());
        maximizeAction.setEnabled((isParentMaximizable() && !isParentMaximum() && !isParentIcon())
                                      || (isParentMaximizable() && isParentIcon()));
        iconifyAction.setEnabled(isParentIconifiable() && !isParentIcon());
        closeAction.setEnabled(isParentClosable());
        sizeAction.setEnabled(false);
        moveAction.setEnabled(false);
    }
829310
private List<EndpointInterceptor> adaptInterceptors(List<Object> interceptors) {
        List<EndpointInterceptor> endpointInterceptors = new ArrayList<EndpointInterceptor>();

        if (interceptors != null) {
            for (Object interceptor : interceptors) {
                if (interceptor instanceof EndpointInterceptor) {
                    endpointInterceptors.add((EndpointInterceptor) interceptor);
                }
            }
        }

        return endpointInterceptors;
    }
120253
function setOptions(endpoint) {
	var options = {
		url: baseURL + endpoint,
		headers: {
			'trak-api-key': process.env.TRAK_KEY
		},
		json: true
	};

	return options;
}
10587
def _post_action(self, action):
        """"""
        ret = super()._post_action(action)
        self._gripper_visualization()
        return ret