Initialize the device adapter by removing all active connections and resetting scan and advertising to have
        a clean starting state.
173443
def _initialize_system_sync(self):
        """"""
        connected_devices = self.bable.list_connected_devices()
        for device in connected_devices:
            context = {
                'connection_id': len(self.connections.get_connections()),
                'connection_handle': device.connection_handle,
                'connection_string': device.address
            }
            self.connections.add_connection(context['connection_id'], device.address, context)
            self.disconnect_sync(context['connection_id'])

        self.stop_scan()

        try:
            self.bable.set_advertising(enabled=False)
        except bable_interface.BaBLEException:
            # If advertising is already disabled
            pass
799474
def init(self):
        

        self.target.halt()
        self.target.reset_and_halt()

        # update core register to execute the init subroutine

        result = self._call_function_and_wait(self.flash_algo['pc_init'], init=True)

        # check the return code
        if result != 0:
            logging.error('init error: %i', result)

        # erase the cookie which take up one page
        self.erase_sector(0x01000000)
        time.sleep(.5)

        #do a hardware reset which will put the pc looping in rom
        self.target.dp.reset()
        time.sleep(1.3)

        # reconnect to the board
        self.target.dp.init()
        self.target.dp.power_up_debug()

        self.target.halt()
        self.target.reset_and_halt()

        # update core register to execute the init subroutine
        result = self._call_function_and_wait(self.flash_algo['pc_init'], init=True)

        # check the return code
        if result != 0:
            logging.error('init error: %i', result)
1133148
private void initializeForTouchDevice() {
		logger.log(Level.FINE, "ZoomControl -> initializeForTouchDevice()");
		// Add touch handlers to the zoom in button:
		zoomInElement.addDomHandler(new TouchStartHandler() {

			@Override
			public void onTouchStart(TouchStartEvent event) {
				event.stopPropagation();
				event.preventDefault();

				logger.log(Level.FINE, "ZoomControl -> zoomInElement onTouchStart()");
				ViewPort viewPort = mapPresenter.getViewPort();
				int index = viewPort.getResolutionIndex(viewPort.getResolution());

				if (index < viewPort.getResolutionCount() - 1) {
					viewPort.applyResolution(viewPort.getResolution(index + 1));
					viewPort.getPosition();
				}
			}
		}, TouchStartEvent.getType());

		// Add touch handlers to the zoom out button:
		zoomOutElement.addDomHandler(new TouchStartHandler() {

			@Override
			public void onTouchStart(TouchStartEvent event) {
				logger.log(Level.FINE, "zoomOutElement -> zoomInElement onTouchStart()");
				event.stopPropagation();
				event.preventDefault();

				ViewPort viewPort = mapPresenter.getViewPort();
				int index = viewPort.getResolutionIndex(viewPort.getResolution());

				if (index > 0) {
					viewPort.applyResolution(viewPort.getResolution(index - 1));
				}
			}
		}, TouchStartEvent.getType());
	}
1309211
def initialiseDevice(self):
        
        logger.debug("Initialising device")
        self.getInterruptStatus()
        self.setAccelerometerSensitivity(self._accelerationFactor * 32768.0)
        self.setGyroSensitivity(self._gyroFactor * 32768.0)
        self.setSampleRate(self.fs)
        for loop in self.ZeroRegister:
            self.i2c_io.write(self.MPU6050_ADDRESS, loop, 0)
        # Sets clock source to gyro reference w/ PLL
        self.i2c_io.write(self.MPU6050_ADDRESS, self.MPU6050_RA_PWR_MGMT_1, 0b00000010)
        # Controls frequency of wakeups in accel low power mode plus the sensor standby modes
        self.i2c_io.write(self.MPU6050_ADDRESS, self.MPU6050_RA_PWR_MGMT_2, 0x00)
        # Enables any I2C master interrupt source to generate an interrupt
        self.i2c_io.write(self.MPU6050_ADDRESS, self.MPU6050_RA_INT_ENABLE, 0x01)
        # enable the FIFO
        self.enableFifo()
        logger.debug("Initialised device")
918249
@SuppressWarnings("UnusedReturnValue")
	private boolean initialize() {
		// For API level 18 and above, get a reference to BluetoothAdapter through
		// BluetoothManager.
		final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
		if (bluetoothManager == null) {
			loge("Unable to initialize BluetoothManager.");
			return false;
		}

		mBluetoothAdapter = bluetoothManager.getAdapter();
		if (mBluetoothAdapter == null) {
			loge("Unable to obtain a BluetoothAdapter.");
			return false;
		}

		return true;
	}
611754
def initialize(self, index_name=None):
        ''''''
        index_name = index_name or self.index_name
        index = Index(index_name, using=es.client)
        for adapter_class in adapter_catalog.values():
            index.doc_type(adapter_class)
        index.create()
1320998
def init_hardware(self, serial=None, device_number=ANY_MODULE):
        
        if not self._hw_is_initialized:
            # initialize hardware either by device number or serial
            if serial is None:
                UcanInitHardwareEx(byref(self._handle), device_number, self._callback_ref, None)
            else:
                UcanInitHardwareEx2(byref(self._handle), serial, self._callback_ref, None)
            self._hw_is_initialized = True
1318562
def init_layout(self):
        
        super(AndroidListView, self).init_layout()
        d = self.declaration
        w = self.widget

        # Prepare adapter
        adapter = self.adapter = BridgedRecyclerAdapter(w)

        # I'm sure this will make someone upset haha
        adapter.setRecyleListener(adapter.getId())
        adapter.onRecycleView.connect(self.on_recycle_view)
        #adapter.onVisibleCountChanged.connect(self.on_visible_count_changed)
        #adapter.onScrollStateChanged.connect(self.on_scroll_state_changed)
        self.set_items(d.items)
        w.setAdapter(adapter)
        #self.set_selected(d.selected)
        self.refresh_views()
688945
function init(configuration){
    var self = {
        config : configuration,
        adapters : [],
        getWhenCurrentWritesDone : getWhenCurrentWritesDone
    };

    _.each(self.config.adapters, function(adapter){
        var adapterInstance;

        try {
            adapterInstance = require('./adapters/' + adapter.type).init(adapter);
        } catch (e) {
            console.log(chalk.red('Initialization Error: '), e);
            throw e;
        }

        adapterInstance.writeQueue = BB.resolve();

        self.adapters.push(adapterInstance);
    });

    [
        'error',
        'info',
        'debug',
        'warn',
        'trace',
        'critical'
    ].forEach(function (type) {
        /**
         * Create a TYPE log entry
         * @param category Categorize your error with a user defined label
         * @param args Include your customized messages. This should be a comma separated list just like `console.log`
         */
        self[type] = function () {
            // If we are still logging and there are messages to write
            if(arguments.length > 0){
                var category = (arguments.length > 1 && _.isString(arguments[0])) ? arguments[0] : '',
                    startIdx = (arguments.length > 1) ? 1 : 0;

                _write.call(self, type, category, Array.prototype.slice.call(arguments, startIdx));
            }
        };
    });

    return self;
}
802414
def _initialize_system_sync(self):
        """"""
        connected_devices = self.bable.list_connected_devices()
        for device in connected_devices:
            self.disconnect_sync(device.connection_handle)

        self.stop_scan()

        self.set_advertising(False)

        # Register the GATT table to send the right services and characteristics when probed (like an IOTile device)
        self.register_gatt_table()
37794
def reset(self):
        
        logger.debug('resetting dongle state')

        self._clear()

        if self.api is not None:
            self._set_state(Dongle._STATE_RESET)
            self.api.ble_cmd_gap_set_mode(gap_discoverable_mode['gap_non_discoverable'], gap_connectable_mode['gap_non_connectable'])
            self._wait_for_state(self._STATE_RESET)

            for i in range(self.supported_connections):
                self._set_conn_state(i, self._STATE_DISCONNECTING)
                self.api.ble_cmd_connection_disconnect(i)	
                self._wait_for_conn_state(i, self._STATE_DISCONNECTING)

        logger.debug('reset completed')
192163
def init(self):
        
        devid = self.ap.read32(self.address + TPIU.DEVID)
        self._has_swo_uart = (devid & TPIU.DEVID_NRZ_MASK) != 0
347373
def initial(self, request, *args, **kwargs):
        
        super(BaseInterfaceList, self).initial(request, *args, **kwargs)

        # ensure device exists
        try:
            self.device = Device.objects.accessible_to(request.user)\
                        .get(pk=self.kwargs.get('pk', None))
        except Device.DoesNotExist:
            raise Http404(_('Device not found.'))

        # check permissions on device (for interface creation)
        self.check_object_permissions(request, self.device)

        # return only interfaces of current device
        self.queryset = self.model.objects.filter(device_id=self.device.id)\
                        .accessible_to(self.request.user)
841740
public void initialize(){
    thread = new Thread(collectorProcessor);
    thread.start();
    for (DriverNode dn : this.children){
      dn.initialize();
    }
  }
426286
private synchronized void init() {

		if (!initialized.compareAndSet(false, true)) {
			return;
		}

		LOG.debug("GStreamer webcam device initialization");

		pipe = new Pipeline(getName());
		source = ElementFactory.make(GStreamerDriver.getSourceBySystem(), "source");

		if (Platform.isWindows()) {
			source.set("device-index", deviceIndex);
		} else if (Platform.isLinux()) {
			source.set("device", videoFile.getAbsolutePath());
		} else if (Platform.isMacOSX()) {
			throw new IllegalStateException("not yet implemented");
		}

		sink = new RGBDataSink(getName(), this);
		sink.setPassDirectBuffer(true);
		sink.getSinkElement().setMaximumLateness(LATENESS, TimeUnit.MILLISECONDS);
		sink.getSinkElement().setQOSEnabled(true);

		filter = ElementFactory.make("capsfilter", "capsfilter");

		jpegdec = ElementFactory.make("jpegdec", "jpegdec");

		pipelineReady();
		resolutions = parseResolutions(source.getPads().get(0));
		pipelineStop();
	}
641285
public void init() {
        // load the filter mappings (copy of the list in case add is called while we iterate)
        List fMappings = new ArrayList(webAppConfig.getFilterMappings());

        // if the list isn't empty, show that this web app has filters
        if (!fMappings.isEmpty()) {
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                logger.logp(Level.FINE, CLASS_NAME, "init", "filter mappings at init time ->" + fMappings);

            _filtersDefined = true;

            // add the filter mappings to the uri or servlet mapping lists
            Iterator iter = fMappings.iterator();

            while (iter.hasNext()) {
                FilterMapping fMapping = (FilterMapping) iter.next();

                addFilterMapping(fMapping);

                //PK86553 - start
                if (WCCustomProperties.INVOKE_FILTER_INIT_AT_START_UP){
                    String filterName = fMapping.getFilterConfig().getFilterName();
                    if (_filterWrappers.get(filterName) == null){
                        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
                            logger.logp(Level.FINE, CLASS_NAME,"init", "load filter init at startup, filter ->"+ filterName);
                        try{
                            loadFilter(filterName);
                        }
                        catch (Throwable th) {
                            //logger.logp(Level.FINE, CLASS_NAME, "init", "Can not initialize filter ["+filterName+"] at startup.");//596191
                            LoggerHelper.logParamsAndException(logger, Level.SEVERE, CLASS_NAME,"init", "init.exception.thrown.by.filter.at.startup", new Object[]{filterName} , th );

                        }
                    }
                }
                //PK86553 - end
            }
        } else if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, "init", "no filter mappings at init time");
        }

    }
105550
def initialize():
    
    for pin in sorted(OUTPUT_PINS.values()):
        _enable_pin(pin, OUT)

    for pin in sorted(INPUT_PINS.values()):
        _enable_pin(pin, IN)