Fix the variable device to colocate its ops.
323231
def variable_device(device, name):
  """"""
  if callable(device):
    var_name = tf.get_variable_scope().name + '/' + name
    var_def = tf.NodeDef(name=var_name, op='Variable')
    device = device(var_def)
  if device is None:
    device = ''
  return device
1150482
def put_device(self, pin, state, momentary=None, times=None, pause=None):
        
        url = self.base_url + '/device'

        payload = {
            "pin": pin,
            "state": state
        }

        if momentary is not None:
            payload["momentary"] = momentary

        if times is not None:
            payload["times"] = times

        if pause is not None:
            payload["pause"] = pause

        try:
            r = requests.put(url, json=payload, timeout=10)
            return r.json()
        except RequestException as err:
            raise Client.ClientError(err)
736066
public void put_device_alias(String devname, String aliasname) throws DevFailed {
		databaseDAO.put_device_alias(this, devname, aliasname);
	}
382174
function Device (client, opts) {
  var self = this
  if (!(self instanceof Device)) return new Device(client, opts)
  if (!opts) opts = {}

  self.client = client
}
612807
def patch():
    """"""
    import pynamodb

    if hasattr(botocore.vendored.requests.sessions, '_xray_enabled'):
        return
    setattr(botocore.vendored.requests.sessions, '_xray_enabled', True)

    wrapt.wrap_function_wrapper(
        'botocore.vendored.requests.sessions',
        'Session.send',
        _xray_traced_pynamodb,
    )
1262017
private void updatePoolConf() throws DevFailed {
        if (!polledDevices.contains(deviceName)) {
            polledDevices.add(deviceName);
            final Map<String, String[]> properties = new HashMap<String, String[]>();
            properties.put(POLLING_THREADS_POOL_CONF, polledDevices.toArray(new String[0]));
            DatabaseFactory.getDatabase().setDeviceProperties(ServerManager.getInstance().getAdminDeviceName(),
                    properties);
        }
    }
1049277
def fix(h, i):
    """"""
    down(h, i, h.size())
    up(h, i)
323251
public void situateDevice(Device d, double x, double y, double z) {
        devices.setObjectLocation(d, new Double3D(x, y, z));
    }
1243776
def _fix_key(self, key):
        
        if not key.startswith(self.GCONF_DIR):
            return self.GCONF_DIR + key
        else:
            return key
159132
public void fixate() {
		ransac = FactoryMultiViewRobust.trifocalRansac(configTriRansac,configError,configRansac);
		sba = FactoryMultiView.bundleSparseProjective(configSBA);
	}
954557
def setSystemVariable(self, remote, name, value):
        """"""
        if self._server is not None:
            return self._server.setSystemVariable(remote, name, value)
47451
def _lock(self):
        """"""
        if not self.locked:
            self.device.cu.lock()
            self.locked = True
490258
def _fix_callback_item(self, item):
        ''
        item.component_id = self._fix_id(item.component_id)
        return item
895345
@Deprecated
    public Report setDeviceInfo(String key, Object value) {
        diagnostics.device.put(key, value);
        return this;
    }
1329443
def intialize(self):
        """"""
        print '%s call intialize' % self.port
        try:
            # init serial port
            self.deviceConnected = False
            self._connect()

            if self.deviceConnected:
                self.UIStatusMsg = self.getVersionNumber()
                if self.firmwarePrefix not in self.UIStatusMsg:
                    self.deviceConnected = False
                    self.UIStatusMsg = 'Firmware Not Matching Expecting ' + self.firmwarePrefix + ' Now is ' + self.UIStatusMsg
                    raise Exception('Err: OpenThread device Firmware not matching..')
                self.__sendCommand(WPANCTL_CMD + 'leave')
                self.__sendCommand(WPANCTL_CMD + 'dataset erase')
            else:
                raise Exception('Err: Device not connected ..')

        except Exception, e:
            ModuleHelper.WriteIntoDebugLogger('intialize() Error: ' + str(e))
1336231
function Device (device, sp) {
  if (!(device && sp))
    throw new Error('a Device and a SerialPort must be passed');

  for (var i in device)
    this[i] = device[i];

  this._open = false;
  this._sp = sp;

  EventEmitter.call(this);
}
353650
def fix(self, value=None):
        

        if value is None:
            self._impl.fix()
        else:
            self._impl.fix(value)