text:
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System;
using System.Collections.Generic;
using System.Text;

namespace Avalonia.Controls.Primitives
{
    /// <summary>
    /// Represents a non-scrollable grid that contains <see cref="T:Avalonia.Controls.DataGrid" /> row headers.
    /// </summary>
    public class DataGridFrozenGrid : Grid
    {
        public static readonly StyledProperty<bool> IsFrozenProperty =
            AvaloniaProperty.RegisterAttached<DataGridFrozenGrid, Control, bool>("IsFrozen");

        /// <summary>
        /// Gets a value that indicates whether the grid is frozen.
        /// </summary>
        /// <param name="element">
        /// The object to get the <see cref="P:Avalonia.Controls.Primitives.DataGridFrozenGrid.IsFrozen" /> value from.
        /// </param>
        /// <returns>true if the grid is frozen; otherwise, false. The default is true.</returns>
        public static bool GetIsFrozen(Control element)
        {
            Contract.Requires<ArgumentNullException>(element != null);
            return element.GetValue(IsFrozenProperty);
        }

        /// <summary>
        /// Sets a value that indicates whether the grid is frozen.
        /// </summary>
        /// <param name="element">The object to set the <see cref="P:Avalonia.Controls.Primitives.DataGridFrozenGrid.IsFrozen" /> value on.</param>
        /// <param name="value">true if <paramref name="element" /> is frozen; otherwise, false.</param>
        /// <exception cref="T:System.ArgumentNullException"><paramref name="element" /> is null.</exception>
        public static void SetIsFrozen(Control element, bool value)
        {
            Contract.Requires<ArgumentNullException>(element != null);
            element.SetValue(IsFrozenProperty, value);
        }
    }
}


text:
// nginject-comments.js
// MIT licensed, see LICENSE file
// Copyright (c) 2013-2014 Olov Lassus <olov.lassus@gmail.com>

"use strict";

var is = require("simple-is");
var fmt = require("simple-fmt");

module.exports = {
    inspectComments: inspectComments,
    inspectCallExpression: inspectCallExpression,
};

function inspectCallExpression(node, ctx) {
    if (node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "ngInject" && node.arguments.length === 1) {
        addSuspect(node.arguments[0], ctx);
    }
}

function inspectComments(ctx) {
    var comments = ctx.comments;
    for (var i = 0; i < comments.length; i++) {
        var comment = comments[i];
        var pos = comment.value.indexOf("@ngInject");
        if (pos === -1) {
            continue;
        }

        var target = ctx.lut.findNodeFromPos(comment.range[1]);
        if (!target) {
            continue;
        }

        addSuspect(target, ctx);
    }
}

function addSuspect(target, ctx) {
    if (target.type === "ObjectExpression") {
        // /*@ngInject*/ {f1: function(a), .., {f2: function(b)}}
        addObjectExpression(target, ctx);
    } else if (target.type === "AssignmentExpression" && target.right.type === "ObjectExpression") {
        // /*@ngInject*/ f(x.y = {f1: function(a), .., {f2: function(b)}})
        addObjectExpression(target.right, ctx);
    } else if (target.type === "ExpressionStatement" && target.expression.type === "AssignmentExpression" && target.expression.right.type === "ObjectExpression") {
        // /*@ngInject*/ x.y = {f1: function(a), .., {f2: function(b)}}
        addObjectExpression(target.expression.right, ctx);
    } else if (target.type === "VariableDeclaration" && target.declarations.length === 1 && target.declarations[0].init && target.declarations[0].init.type === "ObjectExpression") {
        // /*@ngInject*/ var x = {f1: function(a), .., {f2: function(b)}}
        addObjectExpression(target.declarations[0].init, ctx);
    } else if (target.type === "Property") {
        // {/*@ngInject*/ justthisone: function(a), ..}
        ctx.addModuleContextIndependentSuspect(target.value, ctx);
    } else {
        // /*@ngInject*/ function(a) {}
        ctx.addModuleContextIndependentSuspect(target, ctx);
    }
}

function addObjectExpression(node, ctx) {
    nestedObjectValues(node).forEach(function(n) {
        ctx.addModuleContextIndependentSuspect(n, ctx);
    });
}

function nestedObjectValues(node, res) {
    res = res || [];

    node.properties.forEach(function(prop) {
        var v = prop.value;
        if (is.someof(v.type, ["FunctionExpression", "ArrayExpression"])) {
            res.push(v);
        } else if (v.type === "ObjectExpression") {
            nestedObjectValues(v, res);
        }
    });

    return res;
}

redpajama_set_name: RedPajamaGithub


text:
require 'rspec'
require 'rspec/its'
require 'webmock/rspec'

require 'cleanroom/rspec'

require 'omnibus'

def windows?
  !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end

def mac?
  !!(RUBY_PLATFORM =~ /darwin/)
end

RSpec.configure do |config|
  # Custom matchers and shared examples
  require_relative 'support/examples'
  require_relative 'support/matchers'

  require_relative 'support/env_helpers'
  config.include(Omnibus::RSpec::EnvHelpers)

  require_relative 'support/file_helpers'
  config.include(Omnibus::RSpec::FileHelpers)

  require_relative 'support/git_helpers'
  config.include(Omnibus::RSpec::GitHelpers)

  require_relative 'support/logging_helpers'
  config.include(Omnibus::RSpec::LoggingHelpers)

  require_relative 'support/ohai_helpers'
  config.include(Omnibus::RSpec::OhaiHelpers)

  require_relative 'support/output_helpers'
  config.include(Omnibus::RSpec::OutputHelpers)

  require_relative 'support/path_helpers'
  config.include(Omnibus::RSpec::PathHelpers)

  require_relative 'support/shell_helpers'
  config.include(Omnibus::RSpec::ShellHelpers)

  config.filter_run(focus: true)
  config.run_all_when_everything_filtered = true

  config.filter_run_excluding(windows_only: true) unless windows?
  config.filter_run_excluding(mac_only: true) unless mac?

  if config.files_to_run.one?
    # Use the documentation formatter for detailed output,
    # unless a formatter has already been configured
    # (e.g. via a command-line flag).
    config.default_formatter = 'doc'
    config.color = true
  end

  config.before(:each) do
    # Suppress logging
    Omnibus.logger.level = :nothing

    # Reset config
    Omnibus.reset!
    Omnibus::Config.append_timestamp(false)

    # Clear the tmp_path on each run
    FileUtils.rm_rf(tmp_path)
    FileUtils.mkdir_p(tmp_path)

    # Don't run Ohai - tests can still override this
    stub_ohai(platform: 'ubuntu', version: '12.04')

    # Default to real HTTP requests
    WebMock.allow_net_connect!
  end

  config.after(:each) do
    Omnibus.reset!
  end

  # Force the expect syntax
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  # Run specs in a random order
  config.order = 'random'
end

#
# Shard example group for asserting a DSL method
#
# @example
#   it_behaves_like 'a cleanroom setter', :name, <<-EOH
#     name 'foo'
#   EOH
#
RSpec.shared_examples 'a cleanroom setter' do |id, string|
  it "for `#{id}'" do
    expect { subject.evaluate(string) }
      .to_not raise_error
  end
end

#
# Shard example group for asserting a DSL method
#
# @example
#   it_behaves_like 'a cleanroom getter', :name
#
RSpec.shared_examples 'a cleanroom getter' do |id|
  it "for `#{id}'" do
    expect { subject.evaluate("#{id}") }.to_not raise_error
  end
end


text:
'use strict';

const fs = require('fs');
const path = require('path');
const electron = require('electron');
const dateformat = require('dateformat');

const app = electron.app;
const ipcMain = electron.ipcMain;
const BrowserWindow = electron.BrowserWindow;

let config;
let mainWindow;
const configPath = path.join(process.env['HOME'], '.telepresence');

const cssStyles = `
#backdrop {
    background: #1a1a1a !important;
}

#open-sidebar-container,
#identity-menu-container,
#js-left-menu,
.room-footer,
#room-menu {
    display: none !important;
}
`;

const ROOM_CHECKUP = `
    (function() {
        // ensure the sidebar stays hidden
        var sidebar = document.querySelector('#side-bar-room');
        if(sidebar !== null && sidebar.offsetParent !== null) {
            var menuButton = document.querySelector('.menu-icon');
            if(menuButton !== null)
                menuButton.click();
        }

        // ensure the video stream is enabled
        var enableVideoButton = document.querySelector('.camera-icon.ng-hide');
        if(enableVideoButton !== null)
            enableVideoButton.click();
    })();
`;

function createWindow() {
    if (config !== undefined && config.hasOwnProperty('conferenceId')) {
        openConferenceRoom();
    } else {
        mainWindow = new BrowserWindow({
            height: 300,
            width: 580,
            resizable: false,
            webPreferences: {
                nodeIntegration: true
            }
        });

        mainWindow.loadURL('file://' + __dirname + '/index.html');

        ipcMain.on('setup-complete', function (event, data) {
            config = data;
            fs.writeFileSync(configPath, JSON.stringify(config));

            closeWindow();
            openConferenceRoom();
        });
    }
}

function openConferenceRoom() {
    mainWindow = new BrowserWindow({
        webPreferences: {
            experimentalFeatures: true,
            webSecurity: true,
            nodeIntegration: false
        },
        kiosk: true
    });

    let checkupInterval;
    let insertedCss = false;

    mainWindow.webContents.on('did-finish-load', function () {
        setTimeout(function () {
            if (mainWindow !== null && mainWindow.webContents !== null) {
                mainWindow.webContents.insertCSS(cssStyles);
                insertedCss = true;
            } else {
                setTimeout(this, 500);
            }
        });

        checkupInterval = setInterval(function () {
            if (mainWindow !== null && mainWindow.webContents !== null) {
                mainWindow.webContents.executeJavaScript(ROOM_CHECKUP, true);
            }
        }, 3000);
    });

    mainWindow.webContents.on('did-start-loading', function () {
        clearInterval(checkupInterval);
        insertedCss = false;
    });

    // Emitted when the window is closed.
    mainWindow.on('closed', function () {
        clearInterval(checkupInterval);
        mainWindow = null;
    });

    let roomId = `rl-telepresence-${config.conferenceId}`;

    mainWindow.loadURL(`https://room.co/#/${roomId}`);
}

function closeWindow() {
    if (mainWindow !== null) {
        mainWindow.close();
    }
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function () {
    if (fs.existsSync(configPath)) {
        try {
            config = JSON.parse(fs.readFileSync(configPath));
        } catch (Error) {
            config = undefined;
        }
    }

    createWindow();

    electron.powerSaveBlocker.start('prevent-display-sleep');

    electron.powerMonitor.on('resume', function () {
        closeWindow();
        createWindow();
    });
})
;

// Quit when all windows are closed.
app.on('window-all-closed', function () {
    // On OS X it is common for applications and their menu bar
    // to stay active until the user quits explicitly with Cmd + Q
    if (process.platform !== 'darwin') {
        app.quit();
    }
});

app.on('activate', function () {
    // On OS X it's common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (mainWindow === null) {
        createWindow();
    }
});


text:
![](images/pylearn.png)

PyLearn
=======

PyLearn is a resource for Bayesian inference and machine learning in Python.

### Introduction

How do we infer and learn from experience ?

Edwin Jaynes, in his influential [How does the brain do plausible reasoning ?](http://bayes.wustl.edu/etj/articles/brain.pdf), wrote

> One of the most familiar facts of our experience is this: that there *is* such a thing as common sense, which enables us to do plausible reasoning in a fairly consistent
way. People who have the same background of experience and the same amount
of information about a proposition come to pretty much the same conclusions as to
its plausibility. No jury has ever reached a verdict on the basis of pure deductive
reasoning. Therefore the human brain must contain some fairly definite mechanism
for plausible reasoning, undoubtedly much more complex than that required for
deductive reasoning. But in order for this to be possible, *there must exist consistent
rules for carrying out plausible reasoning, in terms of operations so definite that
they can be programmed on the computing machine which is the human brain*.

Jaynes went on to show that these "consistent rules" are just the rules of Bayesian probability theory, supplemented by Laplace's principle of indifference and, its generalization, Shannon's principle of maximum entropy. This key observation implies that a computer can be programmed to "reason", or, update probabilities based on data. Given some very minimal desiderata, the rules of Bayesian probability are the only ones which conform to what, intuitively, we recognize as *rationality*. Such probability update rules can be used recursively to impute causal relationships between observations, that is, a machine can be programmed to "learn".

**Inference and machine learning, then, is the creative application of Bayesian probability to problems of rational inference and causal knowledge discovery based on data.**

I wrote a [short article in The Hindu](http://www.thehindu.com/sci-tech/science/article2747042.ece) about learning from experience, together with my colleague at [The Institute of Mathematical Sciences](https://www.imsc.res.in),  [Rahul Siddharthan](https://www.imsc.res.in/~rsidd). We jointly organized the [Bayes by the Bay](http://imsc50.imsc.res.in/article/bayes) where distinguished international colleagues lectured on applications of Bayesian inference to physics, biology, earth sciene, brain function and more. These [lectures are available on YouTube](https://www.youtube.com/playlist?list=PLhkiT_RYTEU2dnkJVZ8Tvr9QQx6xVuL30).

Here, I list [reading material](https://github.com/ronojoy/pylearn#reading-list), [algorithms and software](https://github.com/ronojoy/pylearn#algorithms-and-software), and [tutorial slides](https://github.com/ronojoy/pylearn/tree/master/presentations) with [example codes](https://github.com/ronojoy/pylearn/tree/master/scripts) from the ongoing [workshop series](valuefromdata.net/events) co-organized with [Dorai Thodla](https://github.com/dorait).

I welcome contributions - clone this repository and send me a pull request!

## Inference and machine learning quotes

- "The goal of a Bayesian artificial intelligence is to produce a thinking agent which does as well or better than humans in such tasks, which can adapt to stochastic and changing environments, recognize its own limited knowledge and cope sensibly with these varied sources of uncertainty." - [Korb](http://www.csse.monash.edu.au/~korb/) and [Nicholson](http://www.csse.monash.edu.au/~annn/)

- "Graphical models are a marriage between probability theory and graph theory. They provide a natural tool for dealing with two problems that occur throughout applied mathematics and engineering -- uncertainty and complexity -- and in particular they are playing an increasingly important role in the design and analysis of machine learning algorithms. Fundamental to the idea of a graphical model is the notion of modularity -- a complex system is built by combining simpler parts. Probability theory provides the glue whereby the parts are combined, ensuring that the system as a whole is consistent, and providing ways to interface models to data. The graph theoretic side of graphical models provides both an intuitively appealing interface by which humans can model highly-interacting sets of variables as well as a data structure that lends itself naturally to the design of efficient general-purpose algorithms." - [Michael Jordan](https://www.eecs.berkeley.edu/Faculty/Homepages/jordan.html)

- "Many of the classical multivariate probabalistic systems studied in fields such as statistics, systems engineering, information theory, pattern recognition and statistical mechanics are special cases of the general graphical model formalism -- examples include mixture models, factor analysis, hidden Markov models, Kalman filters and Ising models. The graphical model framework provides a way to view all of these systems as instances of a common underlying formalism. This view has many advantages -- in particular, specialized techniques that have been developed in one field can be transferred between research communities and exploited more widely. Moreover, the graphical model formalism provides a natural framework for the design of new systems." - [Michael Jordan](https://www.eecs.berkeley.edu/Faculty/Homepages/jordan.html)

- "... how do we take core inferential ideas and turn them into engineering systems that can work under whatever requirements that one has in mind (time, accuracy, cost, etc), that reflect assumptions that are appropriate for the domain, that are clear on what inferences and what decisions are to be made (does one want causes, predictions, variable selection, model selection, ranking, A/B tests, etc, etc), can allow interactions with humans (input of expert knowledge, visualization, personalization, privacy, ethical issues, etc, etc), that scale, that are easy to use and are robust. Indeed, with all due respect to bridge builders (and rocket builders, etc), but I think that we have a domain here that is more complex than any ever confronted in human society." - [Michael Jordan](https://www.eecs.berkeley.edu/Faculty/Homepages/jordan.html)

- "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E" - [Tom Mitchell](https://www.cs.cmu.edu/~tom/)

- "...from now on we can compare our data with the model we actually want to use rather than with a model which has some mathematical convenient form. This is surely a revolution." - [Peter Clifford](http://www.stats.ox.ac.uk/~clifford/) on **Metropolis sampling**.

## Online courses

- [Probabilistic graphical models](https://www.coursera.org/course/pgm) - by Daphne Koller on Coursera

## Slide decks

- [Probabilistic programming : what, why, how, when ?](http://www.slideshare.net/salesforceeng/probabalistic-programming-why-what-how-when) by Beau Cronin.

## Reading list

This is my reading list for Bayesian probability and its application to machine learning problems. The sections covered in this list are:

- [Classics of Bayesian probability](https://github.com/ronojoy/pylearn#classics-of-bayesian-probability)
- [Bayesian inference in statistical analysis](https://github.com/ronojoy/pylearn#bayesian-inference-in-statistical-analysis)
- [Bayesian networks](https://github.com/ronojoy/pylearn#bayesian-networks)
- [Bayesian decision theory](https://github.com/ronojoy/pylearn#bayesian-decision-theory)
- [Bayesian risk analysis](https://github.com/ronojoy/pylearn#bayesian-risk-analysis)

### Classics of Bayesian probability
- Philosophical Essay on Probabilities - Pierre-Simon Laplace
- A Treatise on Probability - John Maynard Keynes
- Probability Theory - Harold Jeffreys
- Probability Theory : the logic of science - Edwin Jaynes

### Bayesian inference in statistical analysis
- Bayesian statistics - P. M. Lee
- Bayesian inference in statistical analysis - Box and Tiao
- Data analysis : a Bayesian tutorial - Devinder Sivia
- Bayesian data analysis - Gelman, Karlin, Stern and Rubin

### Bayesian networks
- Probabilistic Reasoning in Intelligent Systems - Judea Pearl
- Probabilistic Reasoning in Expert Systems : theory and algorithms - R. E. Neapolitan
- Bayesian Artificial Intelligence - Korb and Nicholson
- Probabilistic Graphical Models - Koller and Friedman
- Inovations in Bayesian Networks - Holmes and Jain

The last reference includes the classic **Tutorial on Learning with Bayesian Networks** by David Heckerman.

### Bayesian decision theory
- Statistical decision theory - J. O. Berger
- The Bayesian choice: From decision-theoretic foundations to computational implementation - C. P. Robert

### Bayesian risk analysis
- [Wash-1400](https://en.wikipedia.org/wiki/WASH-1400): The Reactor Safety Study - N. Rasmussen et al.
- [On the quantitative definition of risk](http://onlinelibrary.wiley.com/doi/10.1111/j.1539-6924.1981.tb01350.x/abstract;jsessionid=825CCFCF2B25EA36D722BB7B6E8EF3CB.f01t02) -  Garrick and Kaplan
- Probabilistic risk analysis - Bedford and Cooke

### Antecedents
- The Science of Proof - J. H. Wigmore
- [Correlation and Causation](http://www.ssc.wisc.edu/soc/class/soc952/Wright/Wright_Correlation%20and%20Causation.pdf) - Sewall Wright
- The Analysis of Evidence: How to Do Things with Facts Based on Wigmore's Science of Judicial Proof - Anderson and Twining
- [Using a graphical method to assist the evaluation of complicated patterns of evidence](http://www.ncjrs.gov/App/abstractdb/AbstractDBDetails.aspx?id=168682) - Dawid and Evett

## Algorithms and software

Since this is a resource for machine learning in Python, this basic toolchain is *sine qua non*!
- [Numpy](www.numpy.scipy.org) - N-dimensional arrays for Python
- [Scipy](www.scipy.org) - basic numerical algorithms, built on top of Numpy
- [Pandas](www.pandas.pydata.org) - data structures and tools for data analysis
- [Matplotlib](matplotlib.org) - 2d plotting library
- [Ipython](ipython.org) - an enhanced Python shell and notebook interface

The most popular machine learning library in Python is scikits-learn but few of its algorithms are explicitly probablistic. Probablistic graphical models (PGMs) are implemented in three good Python libraries listed below.

- [scikit-learn](http://scikit-learn.sourceforge.net/) - regression, clustering, classification and more.
- [libpgm](http://pythonhosted.org/libpgm/) - representation, inference and learning of PGMs.
- [pgmpy](https://github.com/pgmpy) - same as above but has a NetworkX interface to visualize PGMs.
- [pomegranate](https://github.com/jmschrei/pomegranate) - PGM module with nice syntax and Cython for speed.
- [Lea](https://code.google.com/p/lea/) - probability distributions with encapsulated probabilistic programming language.
- [Daft](https://github.com/dfm/daft) - rendering of probabilistic graphical models.
- [MIT Probabilistic Computing Project](http://probcomp.csail.mit.edu/) - Venture, BayesDB, Picture and CrossCat.
- [UnBBayes](http://sourceforge.net/projects/unbbayes/) - the only non-Python code to make the list. Has Bayesian networks, probabilistic ontologies, and more!

Python has a several good IDEs. Two of my favourites are
- [Spyder](spyderlib.org) - inspired by the Matlab IDE
- [Rodeo](https://github.com/yhat/rodeo) - a data-centric IDE for Python


text:
package com.microsoft.azure.management.labservices.v2018_10_15;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Details of the backing virtual machine.
 */
public class VirtualMachineDetails {
    /**
     * Provisioning state of the Dtl VM.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /**
     * Connection information for Windows.
     */
    @JsonProperty(value = "rdpAuthority", access = JsonProperty.Access.WRITE_ONLY)
    private String rdpAuthority;

    /**
     * Connection information for Linux.
     */
    @JsonProperty(value = "sshAuthority", access = JsonProperty.Access.WRITE_ONLY)
    private String sshAuthority;

    /**
     * PrivateIp address of the compute VM.
     */
    @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY)
    private String privateIpAddress;

    /**
     * Compute VM login user name.
     */
    @JsonProperty(value = "userName", access = JsonProperty.Access.WRITE_ONLY)
    private String userName;

    /**
     * Last known compute power state captured in DTL.
     */
    @JsonProperty(value = "lastKnownPowerState", access = JsonProperty.Access.WRITE_ONLY)
    private String lastKnownPowerState;

    /**
     * Get provisioning state of the Dtl VM.
     *
     * @return the provisioningState value
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get connection information for Windows.
     *
     * @return the rdpAuthority value
     */
    public String rdpAuthority() {
        return this.rdpAuthority;
    }

    /**
     * Get connection information for Linux.
     *
     * @return the sshAuthority value
     */
    public String sshAuthority() {
        return this.sshAuthority;
    }

    /**
     * Get privateIp address of the compute VM.
     *
     * @return the privateIpAddress value
     */
    public String privateIpAddress() {
        return this.privateIpAddress;
    }

    /**
     * Get compute VM login user name.
     *
     * @return the userName value
     */
    public String userName() {
        return this.userName;
    }

    /**
     * Get last known compute power state captured in DTL.
     *
     * @return the lastKnownPowerState value
     */
    public String lastKnownPowerState() {
        return this.lastKnownPowerState;
    }

}


text:
package jdepend.knowledge.architectpattern.identifyer;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import jdepend.framework.exception.JDependException;
import jdepend.knowledge.architectpattern.AbstractArchitectPatternIdentifyer;
import jdepend.knowledge.architectpattern.domain.IdealComponent;
import jdepend.model.Component;
import jdepend.model.MetricsMgr;
import jdepend.model.result.AnalysisResult;
import jdepend.model.util.JDependUnitByMetricsComparator;

public final class CoreComponentIdentifyer extends AbstractArchitectPatternIdentifyer {

	@Override
	public void identify(AnalysisResult result) throws JDependException {

		List<Component> components = new ArrayList<Component>();
		for(Component component : result.getComponents()){
			components.add(new IdealComponent(component));
		}
		Collections.sort(components, new JDependUnitByMetricsComparator(MetricsMgr.I));
		// 计算不是孤立的组件个数
		int componentSize = 0;
		for (Component component : components) {
			if (component.getAfferents().size() > 0 || component.getEfferents().size() > 0) {
				componentSize++;
			}
		}
		int size;
		for (Component component : components) {
			// 传入净值占整个组件个数的六成以上
			size = component.getAfferents().size() - component.getEfferents().size();
			if (size * 1F / componentSize > 0.6F) {
				this.getWorker().addCoreComponent(component);
			}
		}
	}

}


text:
import Input from 'ember-advanced-form/components/time/input';

export default Input;


text:
@node Stdio
@chapter Input and Output (@file{stdio.h})

This chapter comprises functions to manage files
or other input/output streams. Among these functions are subroutines
to generate or scan strings according to specifications from a format string.

The underlying facilities for input and output depend on the host
system, but these functions provide a uniform interface.

The corresponding declarations are in @file{stdio.h}.

The reentrant versions of these functions use macros

@example
_stdin_r(@var{reent})
_stdout_r(@var{reent})
_stderr_r(@var{reent})
@end example

@noindent
instead of the globals @code{stdin}, @code{stdout}, and
@code{stderr}.  The argument @var{reent} is a pointer to a reentrancy
structure.

@menu
* clearerr::    Clear file or stream error indicator
* diprintf::    Print to a file descriptor (integer only)
* dprintf::     Print to a file descriptor
* fclose::      Close a file
* fcloseall::   Close all files
* fdopen::      Turn an open file into a stream
* feof::        Test for end of file
* ferror::      Test whether read/write error has occurred
* fflush::      Flush buffered file output
* fgetc::       Get a character from a file or stream
* fgetpos::     Record position in a stream or file
* fgets::       Get character string from a file or stream
* fgetwc::      Get a wide character from a file or stream
* fgetws::      Get a wide character string from a file or stream
* fileno::      Get file descriptor associated with stream
* fmemopen::    Open a stream around a fixed-length buffer
* fopen::       Open a file
* fopencookie:: Open a stream with custom callbacks
* fpurge::      Discard all pending I/O on a stream
* fputc::       Write a character on a stream or file
* fputs::       Write a character string in a file or stream
* fputwc::      Write a wide character to a file or stream
* fputws::      Write a wide character string to a file or stream
* fread::       Read array elements from a file
* freopen::     Open a file using an existing file descriptor
* fseek::       Set file position
* __fsetlocking::	Set or query locking mode on FILE stream
* fsetpos::     Restore position of a stream or file
* ftell::       Return position in a stream or file
* funopen::     Open a stream with custom callbacks
* fwide::	Set and determine the orientation of a FILE stream
* fwrite::      Write array elements from memory to a file or stream
* getc::        Get a character from a file or stream (macro)
* getc_unlocked::	Get a character from a file or stream (macro)
* getchar::     Get a character from standard input (macro)
* getchar_unlocked::	Get a character from standard input (macro)
* getdelim::    Get character string from a file or stream
* getline::     Get character string from a file or stream
* gets::        Get character string from standard input (obsolete)
* getw::        Get a word (int) from a file or stream
* getwchar::    Get a wide character from standard input
* mktemp::      Generate unused file name
* open_memstream::	Open a write stream around an arbitrary-length buffer
* perror::      Print an error message on standard error
* putc::        Write a character on a stream or file (macro)
* putc_unlocked::	Write a character on a stream or file (macro)
* putchar::     Write a character on standard output (macro)
* putchar_unlocked::	Write a character on standard output (macro)
* puts::        Write a character string on standard output
* putw::        Write a word (int) to a file or stream
* putwchar::    Write a wide character to standard output
* remove::      Delete a file's name
* rename::      Rename a file
* rewind::      Reinitialize a file or stream
* setbuf::      Specify full buffering for a file or stream
* setbuffer::   Specify full buffering for a file or stream with size
* setlinebuf::  Specify line buffering for a file or stream
* setvbuf::     Specify buffering for a file or stream
* siprintf::    Write formatted output (integer only)
* siscanf::     Scan and format input (integer only)
* sprintf::     Write formatted output
* sscanf::      Scan and format input
* stdio_ext::	Access internals of FILE structure
* swprintf::    Write formatted wide character output
* swscanf::     Scan and format wide character input
* tmpfile::     Create a temporary file
* tmpnam::      Generate name for a temporary file
* ungetc::      Push data back into a stream
* ungetwc::     Push wide character data back into a stream
* vfprintf::    Format variable argument list
* vfscanf::     Scan variable argument list
* vfwprintf::   Format variable wide character argument list
* vfwscanf::    Scan and format argument list from wide character input
* viprintf::    Format variable argument list (integer only)
* viscanf::     Scan variable format list (integer only)
@end menu

@page
@include stdio/clearerr.def

@page
@include stdio/diprintf.def

@page
@include stdio/dprintf.def

@page
@include stdio/fclose.def

@page
@include stdio/fcloseall.def

@page
@include stdio/fdopen.def

@page
@include stdio/feof.def

@page
@include stdio/ferror.def

@page
@include stdio/fflush.def

@page
@include stdio/fgetc.def

@page
@include stdio/fgetpos.def

@page
@include stdio/fgets.def

@page
@include stdio/fgetwc.def

@page
@include stdio/fgetws.def

@page
@include stdio/fileno.def

@page
@include stdio/fmemopen.def

@page
@include stdio/fopen.def

@page
@include stdio/fopencookie.def

@page
@include stdio/fpurge.def

@page
@include stdio/fputc.def

@page
@include stdio/fputs.def

@page
@include stdio/fputwc.def

@page
@include stdio/fputws.def

@page
@include stdio/fread.def

@page
@include stdio/freopen.def

@page
@include stdio/fseek.def

@page
@include stdio/fsetlocking.def

@page
@include stdio/fsetpos.def

@page
@include stdio/ftell.def

@page
@include stdio/funopen.def

@page
@include stdio/fwide.def

@page
@include stdio/fwrite.def

@page
@include stdio/getc.def

@page
@include stdio/getc_u.def

@page
@include stdio/getchar.def

@page
@include stdio/getchar_u.def

@page
@include stdio/getdelim.def

@page
@include stdio/getline.def

@page
@include stdio/gets.def

@page
@include stdio/getw.def

@page
@include stdio/getwchar.def

@page
@include stdio/mktemp.def

@page
@include stdio/open_memstream.def

@page
@include stdio/perror.def

@page
@include stdio/putc.def

@page
@include stdio/putc_u.def

@page
@include stdio/putchar.def

@page
@include stdio/putchar_u.def

@page
@include stdio/puts.def

@page
@include stdio/putw.def

@page
@include stdio/putwchar.def

@page
@include stdio/remove.def

@page
@include stdio/rename.def

@page
@include stdio/rewind.def

@page
@include stdio/setbuf.def

@page
@include stdio/setbuffer.def

@page
@include stdio/setlinebuf.def

@page
@include stdio/setvbuf.def

@page
@include stdio/siprintf.def

@page
@include stdio/siscanf.def

@page
@include stdio/sprintf.def

@page
@include stdio/sscanf.def

@page
@include stdio/stdio_ext.def

@page
@include stdio/swprintf.def

@page
@include stdio/swscanf.def

@page
@include stdio/tmpfile.def

@page
@include stdio/tmpnam.def

@page
@include stdio/ungetc.def

@page
@include stdio/ungetwc.def

@page
@include stdio/vfprintf.def

@page
@include stdio/vfscanf.def

@page
@include stdio/vfwprintf.def

@page
@include stdio/vfwscanf.def

@page
@include stdio/viprintf.def

@page
@include stdio/viscanf.def