当前位置: 首页>>代码示例>>Python>>正文


Python Institution.find方法代码示例

本文整理汇总了Python中website.models.Institution.find方法的典型用法代码示例。如果您正苦于以下问题:Python Institution.find方法的具体用法?Python Institution.find怎么用?Python Institution.find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在website.models.Institution的用法示例。


在下文中一共展示了Institution.find方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: index

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
def index():
    try:
        #TODO : make this way more robust
        institution = Institution.find_one(Q('domains', 'eq', request.host.lower()))
        inst_dict = view_institution(institution._id)
        inst_dict.update({
            'home': False,
            'institution': True,
            'redirect_url': '/institutions/{}/'.format(institution._id)
        })

        return inst_dict
    except NoResultsFound:
        pass

    all_institutions = Institution.find().sort('name')
    dashboard_institutions = [
        {'id': inst._id, 'name': inst.name, 'logo_path': inst.logo_path_rounded_corners}
        for inst in all_institutions
    ]

    return {
        'home': True,
        'dashboard_institutions': dashboard_institutions
    }
开发者ID:cslzchen,项目名称:osf.io,代码行数:27,代码来源:views.py

示例2: test_institution_find_doesnt_find_deleted

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
    def test_institution_find_doesnt_find_deleted(self):
        self.institution.node.is_deleted = True
        self.institution.node.save()

        insts = list(Institution.find())

        assert_equal(len(insts), 0)
开发者ID:atelic,项目名称:osf.io,代码行数:9,代码来源:test_institution_model.py

示例3: test_find_deleted

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
    def test_find_deleted(self):
        self.institution.node.is_deleted = True
        self.institution.node.save()

        insts = list(Institution.find(deleted=True))

        assert_equal(len(insts), 1)
        assert_equal(insts[0], self.institution)
开发者ID:atelic,项目名称:osf.io,代码行数:10,代码来源:test_institution_model.py

示例4: main

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]

#.........这里部分代码省略.........
                'banner_name': 'busara-banner.png',
                'logo_name': 'busara-shield.png',
                'auth_url': None,
                'domains': [],
                'email_domains': ['busaracenter.org'],
            },
            {
                '_id': 'cos',
                'name': 'Center For Open Science [Test]',
                'description': 'COS is a non-profit technology company providing free and open services to increase inclusivity and transparency of research. Find out more at <a href="https://cos.io">cos.io</a>.',
                'banner_name': 'cos-banner.png',
                'logo_name': 'cos-shield.png',
                'auth_url': None,
                'domains': ['test-osf.cos.io'],
                'email_domains': ['cos.io'],
            },
            {
                '_id': 'esip',
                'name': 'Federation of Earth Science Information Partners (ESIP) [Test]',
                'description': '<a href="http://www.esipfed.org/">ESIP\'s</a> mission is to support the networking and data dissemination needs of our members and the global Earth science data community by linking the functional sectors of observation, research, application, education and use of Earth science.',
                'banner_name': 'esip-banner.png',
                'logo_name': 'esip-shield.png',
                'auth_url': None,
                'domains': [],
                'email_domains': ['esipfed.org'],
            },
            {
                '_id': 'nd',
                'name': 'University of Notre Dame [Test]',
                'description': 'In <a href="https://research.nd.edu/news/64035-notre-dame-center-for-open-science-partner-to-advance-open-science-initiatives/">partnership</a> with the <a href="https://crc.nd.edu">Center for Research Computing</a>, <a href="http://esc.nd.edu">Engineering &amp; Science Computing</a>, and the <a href="https://library.nd.edu">Hesburgh Libraries</a>',
                'banner_name': 'nd-banner.png',
                'logo_name': 'nd-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('https://login-test.cc.nd.edu/idp/shibboleth')),
                'domains': ['test-osf-nd.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'nyu',
                'name': 'New York University [Test]',
                'description': 'New York University [Test]',
                'banner_name': 'nyu-banner.png',
                'logo_name': 'nyu-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('https://shibbolethqa.es.its.nyu.edu/idp/shibboleth')),
                'domains': ['test-osf-nyu.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'ucr',
                'name': 'University of California Riverside [Test]',
                'description': 'Policy prohibits storing PII or HIPAA data on this site, please see C&amp;C\'s <a href="http://cnc.ucr.edu/security/researchers.html">security site</a> for more information.',
                'banner_name': 'ucr-banner.png',
                'logo_name': 'ucr-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('urn:mace:incommon:ucr.edu')),
                'domains': ['test-osf-ucr.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'ugent',
                'name': 'Universiteit Gent [Test]',
                'description': 'Universiteit Gent [Test]',
                'banner_name': 'ugent-banner.png',
                'logo_name': 'ugent-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('https://identity.ugent.be/simplesaml/saml2/idp/metadata.php')),
                'domains': ['test-osf-ugent.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'usc',
                'name': 'University of Southern California [Test]',
                'description': 'Projects must abide by <a href="http://policy.usc.edu/info-security/">USC\'s Information Security Policy</a>. Data stored for human subject research repositories must abide by <a href="http://policy.usc.edu/biorepositories/">USC\'s Biorepository Policy</a>. The OSF may not be used for storage of Personal Health Information that is subject to <a href="http://policy.usc.edu/hipaa/">HIPPA regulations</a>.',
                'banner_name': 'usc-banner.png',
                'logo_name': 'usc-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('urn:mace:incommon:usc.edu')),
                'domains': ['test-osf-usc.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'uva',
                'name': 'University of Virginia [Test]',
                'description': 'Projects must abide by the University <a href="http://www.virginia.edu/informationpolicy/security.html">Security and Data Protection Policies</a>',
                'banner_name': 'uva-banner.png',
                'logo_name': 'uva-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('https://shibidp-test.its.virginia.edu/idp/shibboleth')),
                'domains': ['test-osf-virginia.cos.io'],
                'email_domains': [],
            },
        ]

    init_app(routes=False)
    with TokuTransaction():
        for inst_data in INSTITUTIONS:
            new_inst, inst_created = update_or_create(inst_data)
            # update the nodes elastic docs, to have current names of institutions. This will
            # only work properly if this file is the only thing changing institution attributes
            if not inst_created:
                nodes = Node.find_by_institutions(new_inst, query=Q('is_deleted', 'ne', True))
                for node in nodes:
                    update_node(node, async=False)
        for extra_inst in Institution.find(Q('_id', 'nin', [x['_id'] for x in INSTITUTIONS])):
            logger.warn('Extra Institution : {} - {}'.format(extra_inst._id, extra_inst.name))
开发者ID:caspinelli,项目名称:osf.io,代码行数:104,代码来源:populate_institutions.py

示例5: main

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]

#.........这里部分代码省略.........
                'name': 'Oklahoma State University [Test]',
                'description': '<a href="http://www.library.okstate.edu/research-support/research-data-services/">OSU Library Research Data Services</a>',
                'banner_name': 'okstate-banner.png',
                'logo_name': 'okstate-shield.png',
                'auth_url': None,  # https://stwcas.okstate.edu/cas/login?service=...
                'logout_url': None,
                'domains': ['test-osf-library-okstate.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'ucsd',
                'name': 'University of California San Diego [Test]',
                'description': 'This service is supported on campus by the UC San Diego Library for our research community. Do not use this service to store or transfer personally identifiable information, personal health information, or any other controlled unclassified information. For assistance please contact the Library\'s Research Data Curation Program at <a href="mailto:[email protected]">[email protected]</a>.',
                'banner_name': 'ucsd-banner.png',
                'logo_name': 'ucsd-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('urn:mace:incommon:ucsd.edu')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['test-osf-ucsd.cos.io'],
                'email_domains': [],
            }, 
            {
                '_id': 'ucr',
                'name': 'University of California Riverside [Test]',
                'description': 'Policy prohibits storing PII or HIPAA data on this site, please see C&amp;C\'s <a href="http://cnc.ucr.edu/security/researchers.html">security site</a> for more information.',
                'banner_name': 'ucr-banner.png',
                'logo_name': 'ucr-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('urn:mace:incommon:ucr.edu')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['test-osf-ucr.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'ugent',
                'name': 'Universiteit Gent [Test]',
                'description': 'Universiteit Gent [Test]',
                'banner_name': 'ugent-banner.png',
                'logo_name': 'ugent-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('https://identity.ugent.be/simplesaml/saml2/idp/metadata.php')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['test-osf-ugent.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'usc',
                'name': 'University of Southern California [Test]',
                'description': 'Projects must abide by <a href="http://policy.usc.edu/info-security/">USC\'s Information Security Policy</a>. Data stored for human subject research repositories must abide by <a href="http://policy.usc.edu/biorepositories/">USC\'s Biorepository Policy</a>. The OSF may not be used for storage of Personal Health Information that is subject to <a href="http://policy.usc.edu/hipaa/">HIPPA regulations</a>.',
                'banner_name': 'usc-banner.png',
                'logo_name': 'usc-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('urn:mace:incommon:usc.edu')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['test-osf-usc.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'uva',
                'name': 'University of Virginia [Test]',
                'description': 'In partnership with the <a href="http://www.virginia.edu/vpr/">Vice President for Research</a>, <a href="http://dsi.virginia.edu">Data Science Institute</a>, <a href="https://www.hsl.virginia.edu">Health Sciences Library</a>, and <a href="http://data.library.virginia.edu">University Library</a>. Learn more about <a href="http://cadre.virginia.edu">UVA resources for computational and data-driven research</a>. Projects must abide by the <a href="http://www.virginia.edu/informationpolicy/security.html">University Security and Data Protection Policies</a>.',
                'banner_name': 'uva-banner.png',
                'logo_name': 'uva-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('https://shibidp-test.its.virginia.edu/idp/shibboleth')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['test-osf-virginia.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'vcu',
                'name': 'Virginia Commonwealth University [Test]',
                'description': 'This service is supported by the VCU Libraries and the VCU Office of Research and Innovation for our research community. Do not use this service to store or transfer personally identifiable information (PII), personal health information (PHI), or any other controlled unclassified information (CUI). VCU\'s policy entitled "<a href="http://www.policy.vcu.edu/sites/default/files/Research%20Data%20Ownership,%20Retention,%20Access%20and%20Securty.pdf">Research Data Ownership, Retention, Access and Security</a>" applies. For assistance please contact the <a href="https://www.library.vcu.edu/services/data/">VCU Libraries Research Data Management Program</a>.',
                'banner_name': 'vcu-banner.png',
                'logo_name': 'vcu-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('https://shibboleth.vcu.edu/idp/shibboleth')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['test-osf-research-vcu.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'vt',
                'name': 'Virginia Tech [Test]',
                'description': None,
                'banner_name': 'vt-banner.png',
                'logo_name': 'vt-shield.png',
                'auth_url': SHIBBOLETH_SP_LOGIN.format(encode_uri_component('https://shib-pprd.middleware.vt.edu')),
                'logout_url': SHIBBOLETH_SP_LOGOUT.format(encode_uri_component('https://test.osf.io/goodbye')),
                'domains': ['osf.vt.edu'],
                'email_domains': [],
            },
        ]

    init_app(routes=False)
    with TokuTransaction():
        for inst_data in INSTITUTIONS:
            new_inst, inst_created = update_or_create(inst_data)
            # update the nodes elastic docs, to have current names of institutions. This will
            # only work properly if this file is the only thing changing institution attributes
            if not inst_created:
                nodes = Node.find_by_institutions(new_inst, query=Q('is_deleted', 'ne', True))
                for node in nodes:
                    update_node(node, async=False)
        for extra_inst in Institution.find(Q('_id', 'nin', [x['_id'] for x in INSTITUTIONS])):
            logger.warn('Extra Institution : {} - {}'.format(extra_inst._id, extra_inst.name))
开发者ID:baylee-d,项目名称:osf.io,代码行数:104,代码来源:populate_institutions.py

示例6: get_queryset

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
 def get_queryset(self):
     return Institution.find(self.get_query_from_request())
开发者ID:545zhou,项目名称:osf.io,代码行数:4,代码来源:views.py

示例7: main

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]

#.........这里部分代码省略.........
                'description': 'Projects must abide by <a href="http://policy.usc.edu/info-security/">USC\'s Information Security Policy</a>. Data stored for human subject research repositories must abide by <a href="http://policy.usc.edu/biorepositories/">USC\'s Biorepository Policy</a>. The OSF may not be used for storage of Personal Health Information that is subject to <a href="http://policy.usc.edu/hipaa/">HIPPA regulations</a>.',
                'banner_name': 'usc-banner.png',
                'logo_name': 'usc-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('urn:mace:incommon:usc.edu')),
                'domains': ['osf.usc.edu'],
                'email_domains': [],
            },
        ]
    if env == 'stage':
        INSTITUTIONS = [
            {
                '_id': 'cos',
                'name': 'Center For Open Science [Stage]',
                'description': 'Center for Open Science [Stage]',
                'banner_name': 'cos-banner.png',
                'logo_name': 'cos-shield.png',
                'auth_url': None,
                'domains': ['staging-osf.cos.io'],
                'email_domains': ['cos.io'],
            },
            {
                '_id': 'nd',
                'name': 'University of Notre Dame [Stage]',
                'description': 'University of Notre Dame [Stage]',
                'banner_name': 'nd-banner.png',
                'logo_name': 'nd-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('https://login-test.cc.nd.edu/idp/shibboleth')),
                'domains': ['staging-osf-nd.cos.io'],
                'email_domains': [],
            },
        ]
    if env == 'stage2':
        INSTITUTIONS = [
            {
                '_id': 'cos',
                'name': 'Center For Open Science [Stage2]',
                'description': 'Center for Open Science [Stage2]',
                'banner_name': 'cos-banner.png',
                'logo_name': 'cos-shield.png',
                'auth_url': None,
                'domains': ['staging2-osf.cos.io'],
                'email_domains': ['cos.io'],
            },
        ]
    elif env == 'test':
        INSTITUTIONS = [
            {
                '_id': 'cos',
                'name': 'Center For Open Science [Test]',
                'description': 'Center for Open Science [Test]',
                'banner_name': 'cos-banner.png',
                'logo_name': 'cos-shield.png',
                'auth_url': None,
                'domains': ['test-osf.cos.io'],
                'email_domains': ['cos.io'],
            },
            {
                '_id': 'nd',
                'name': 'University of Notre Dame [Test]',
                'description': 'University of Notre Dame [Test]',
                'banner_name': 'nd-banner.png',
                'logo_name': 'nd-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('https://login-test.cc.nd.edu/idp/shibboleth')),
                'domains': ['test-osf-nd.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'ucr',
                'name': 'University of California Riverside [Test]',
                'description': 'University of California Riverside [Test]',
                'banner_name': 'ucr-banner.png',
                'logo_name': 'ucr-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('urn:mace:incommon:ucr.edu')),
                'domains': ['test-osf-ucr.cos.io'],
                'email_domains': [],
            },
            {
                '_id': 'usc',
                'name': 'University of Southern California [Test]',
                'description': 'University of Southern California [Test]',
                'banner_name': 'usc-banner.png',
                'logo_name': 'usc-shield.png',
                'auth_url': SHIBBOLETH_SP.format(encode_uri_component('urn:mace:incommon:usc.edu')),
                'domains': ['test-osf-usc.cos.io'],
                'email_domains': [],
            },
        ]

    init_app(routes=False)
    with TokuTransaction():
        for inst_data in INSTITUTIONS:
            new_inst, inst_created = update_or_create(inst_data)
            # update the nodes elastic docs, to have current names of institutions. This will
            # only work properly if this file is the only thign changing institution attributes
            if not inst_created:
                nodes = Node.find_by_institution(new_inst, query=Q('is_deleted', 'ne', True))
                for node in nodes:
                    update_node(node, async=False)
        for extra_inst in Institution.find(Q('_id', 'nin', [x['_id'] for x in INSTITUTIONS])):
            logger.warn('Extra Institution : {} - {}'.format(extra_inst._id, extra_inst.name))
开发者ID:mrphishxxx,项目名称:osf.io,代码行数:104,代码来源:populate_institutions.py

示例8: get_institutions

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
 def get_institutions(self):
     institutions = Institution.find(Q('_id', 'ne', None))
     return institutions
开发者ID:cslzchen,项目名称:osf.io,代码行数:5,代码来源:institution_summary.py

示例9: origin_not_found_in_white_lists

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
 def origin_not_found_in_white_lists(self, origin, url):
     not_found = super(CorsMiddleware, self).origin_not_found_in_white_lists(origin, url)
     if not_found:
         not_found = Institution.find(Q('domains', 'eq', url.netloc.lower())).count() == 0
     return not_found
开发者ID:DanielSBrown,项目名称:osf.io,代码行数:7,代码来源:middleware.py

示例10: test_institution_find

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
    def test_institution_find(self):
        insts = list(Institution.find())

        assert_equal(len(insts), 1)
        assert_equal(insts[0], self.institution)
开发者ID:atelic,项目名称:osf.io,代码行数:7,代码来源:test_institution_model.py

示例11: get_globals

# 需要导入模块: from website.models import Institution [as 别名]
# 或者: from website.models.Institution import find [as 别名]
def get_globals():
    """Context variables that are available for every template rendered by
    OSFWebRenderer.
    """
    user = _get_current_user()
    user_institutions = [{'id': inst._id, 'name': inst.name, 'logo_path': inst.logo_path} for inst in user.affiliated_institutions] if user else []
    all_institutions = [{'id': inst._id, 'name': inst.name, 'logo_path': inst.logo_path} for inst in Institution.find().sort('name')]
    if request.host_url != settings.DOMAIN:
        try:
            inst_id = (Institution.find_one(Q('domains', 'eq', request.host.lower())))._id
            request_login_url = '{}institutions/{}'.format(settings.DOMAIN, inst_id)
        except NoResultsFound:
            request_login_url = request.url.replace(request.host_url, settings.DOMAIN)
    else:
        request_login_url = request.url
    return {
        'private_link_anonymous': is_private_link_anonymous_view(),
        'user_name': user.username if user else '',
        'user_full_name': user.fullname if user else '',
        'user_id': user._primary_key if user else '',
        'user_locale': user.locale if user and user.locale else '',
        'user_timezone': user.timezone if user and user.timezone else '',
        'user_url': user.url if user else '',
        'user_gravatar': profile_views.current_user_gravatar(size=25)['gravatar_url'] if user else '',
        'user_email_verifications': user.unconfirmed_email_info if user else [],
        'user_api_url': user.api_url if user else '',
        'user_entry_point': metrics.get_entry_point(user) if user else '',
        'user_institutions': user_institutions if user else None,
        'all_institutions': all_institutions,
        'display_name': get_display_name(user.fullname) if user else '',
        'use_cdn': settings.USE_CDN_FOR_CLIENT_LIBS,
        'piwik_host': settings.PIWIK_HOST,
        'piwik_site_id': settings.PIWIK_SITE_ID,
        'sentry_dsn_js': settings.SENTRY_DSN_JS if sentry.enabled else None,
        'dev_mode': settings.DEV_MODE,
        'allow_login': settings.ALLOW_LOGIN,
        'cookie_name': settings.COOKIE_NAME,
        'status': status.pop_status_messages(),
        'domain': settings.DOMAIN,
        'api_domain': settings.API_DOMAIN,
        'disk_saving_mode': settings.DISK_SAVING_MODE,
        'language': language,
        'noteworthy_links_node': settings.NEW_AND_NOTEWORTHY_LINKS_NODE,
        'popular_links_node': settings.POPULAR_LINKS_NODE,
        'web_url_for': util.web_url_for,
        'api_url_for': util.api_url_for,
        'api_v2_url': util.api_v2_url,  # URL function for templates
        'api_v2_base': util.api_v2_url(''),  # Base url used by JS api helper
        'sanitize': sanitize,
        'sjson': lambda s: sanitize.safe_json(s),
        'webpack_asset': paths.webpack_asset,
        'waterbutler_url': settings.WATERBUTLER_URL,
        'login_url': cas.get_login_url(request_login_url),
        'reauth_url': util.web_url_for('auth_logout', redirect_url=request.url, reauth=True),
        'profile_url': cas.get_profile_url(),
        'enable_institutions': settings.ENABLE_INSTITUTIONS,
        'keen_project_id': settings.KEEN_PROJECT_ID,
        'keen_write_key': settings.KEEN_WRITE_KEY,
        'maintenance': maintenance.get_maintenance(),
    }
开发者ID:terroni,项目名称:osf.io,代码行数:62,代码来源:routes.py


注:本文中的website.models.Institution.find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。