hexsha stringlengths 40 40 | size int64 5 1.05M | ext stringclasses 588 values | lang stringclasses 305 values | max_stars_repo_path stringlengths 3 363 | max_stars_repo_name stringlengths 5 118 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringdate 2015-01-01 00:00:35 2022-03-31 23:43:49 ⌀ | max_stars_repo_stars_event_max_datetime stringdate 2015-01-01 12:37:38 2022-03-31 23:59:52 ⌀ | max_issues_repo_path stringlengths 3 363 | max_issues_repo_name stringlengths 5 118 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count float64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 363 | max_forks_repo_name stringlengths 5 135 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringdate 2015-01-01 00:01:02 2022-03-31 23:27:27 ⌀ | max_forks_repo_forks_event_max_datetime stringdate 2015-01-03 08:55:07 2022-03-31 23:59:24 ⌀ | content stringlengths 5 1.05M | avg_line_length float64 1.13 1.04M | max_line_length int64 1 1.05M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
671b3dc352fed0eff79b46e43c7ba09ac540a337 | 12,984 | rst | reStructuredText | docs/getting-started-eclipse.rst | rixwwd/doma | 5b02ea197c1a4846129dbb0351c68608b2ffd47f | [
"Apache-2.0"
] | null | null | null | docs/getting-started-eclipse.rst | rixwwd/doma | 5b02ea197c1a4846129dbb0351c68608b2ffd47f | [
"Apache-2.0"
] | null | null | null | docs/getting-started-eclipse.rst | rixwwd/doma | 5b02ea197c1a4846129dbb0351c68608b2ffd47f | [
"Apache-2.0"
] | null | null | null | ===============================
Get started!(Eclipse)
===============================
.. contents::
:depth: 3
Summary
========
Introduce how to setting up development environment and how to executing basic database access.
Install JDK
============
.. _JDK 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
You install `JDK 8`_ .
.. note::
Doma supports JDK 8 and later.
See also :ref:`Which version of JDK does Doma support?<which-version-of-jdk-does-doma-support>`.
Install Eclipse
===============
.. _Eclipse: http://www.eclipse.org/downloads/
You install `Eclipse`_ .
.. note::
Running on Eclipse IDE for Java EE Developers and so on other
but checking of running by Eclipse Standard 4.4 in this document.
It seems to that it is running at higher version.
Install Doma Tools that is Eclipse plugin
============================================
Doma tool is plugin that enable mutual transition between Java file and SQL file.
This plugin is not required to using Doma, but if you use this plugin then productivity is growth.
You select Help > Install New Software... from menu bar and
input next url to 'Work With' textbox.
::
http://dl.bintray.com/domaframework/eclipse/
Install enable plugin candidate is shown like below
then you check to Doma tool latest version
and go on dialog to finish installing.
.. image:: images/install-doma-tools.png
Associate to file
------------------
Doma tools execute annotation processing by hook the file updating.
In order to do that , you need to open SQL file in Eclipse.
You select Eclipse > Preference... or Window > Preference from menu bar and open preference dialog.
You associate file that has ``.sql`` extensions to Text Editor like shown below figure.
.. image:: images/sql-file-association.png
:width: 80 %
Similarly you associate file that has ``.script`` extensions to Text Editor.
.. image:: images/script-file-association.png
:width: 80 %
.. note::
You can skip this setting
if you use Eclipse IDE for Java EE Developers
because SQL file is associated to specialized editor by default.
.. _Oracle SQL Developer: http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
.. _pgAdmin: http://www.pgadmin.org/
.. note::
We recommend to you development style that
you create SQL by RDBMS specific tools (`Oracle SQL Developer`_ and `pgAdmin`_) and
copy accomplished SQL to Eclipse editor.
Import template project
============================
You clone simple-boilerplate from GitHub.
.. code-block:: bash
$ git clone https://github.com/domaframework/simple-boilerplate.git
Move to the cloned directory.
.. code-block:: bash
$ cd simple-boilerplate
Create config file for Eclipse by next command.
.. code-block:: bash
$ ./gradlew eclipse
.. note::
You input ``gradlew eclipse`` instead of ``./gradlew eclipse`` in Windows environment.
.. note::
Please set JDK 8 (or JDK 9 and 10) installed directory to environment variable ``JAVA_HOME``.
It is needed for executing gradlew.
.. note::
The config that is for annotation processing config is included in Eclipse config file.
Reference :ref:`eclipse-build` if configure by manual.
You select File > Import... from Eclipse menu bar and
select 'Existing Projects into Workspace' and import simple-boilerplate.
.. image:: images/import.png
:width: 80 %
You select project and execute JUnit for confirming the accomplished the importing.
If one test case is success then importing was finished normally.
Structure of template project
=============================
The project source code's structure is like next.
::
─ src
├── main
│ ├── java
│ │ └── boilerplate
│ │ ├── AppConfig.java
│ │ ├── dao
│ │ │ ├── AppDao.java
│ │ │ └── EmployeeDao.java
│ │ └── entity
│ │ └── Employee.java
│ └── resources
│ └── META-INF
│ └── boilerplate
│ └── dao
│ ├── AppDao
│ │ ├── create.script
│ │ └── drop.script
│ └── EmployeeDao
│ ├── selectAll.sql
│ └── selectById.sql
└── test
├── java
│ └── boilerplate
│ ├── DbResource.java
│ └── dao
│ └── EmployeeDaoTest.java
└── resources
Explain about important file.
AppConfig.java
The :doc:`config` that is needed for executing Doma.
AppDao.java
Utility that create/drop the database schema that is using in this application.
This is not need in production environment.
The script file is under ``META-INF/boilerplate/dao/AppDao/`` and is used for creating and dropping schema.
Employee.java
The :doc:`entity` that correspond to `EMPLOYEE` table within database.
EmployeeDao.java
The :doc:`dao` that is execute getting and updating ``Employee`` class.
The SQL file is under ``META-INF/boilerplate/dao/EmployeeDao/`` and is used.
EmployeeDaoTest.java
The test that is using ``EmployeeDao``.
You can learn about Doma by adding test case to this file.
Other test is not affected by updating data because database schema is created and disposed per test method.
Mutual transition between Java file and SQL file
=================================================
``EmployeeDao.java`` is defined like next.
.. code-block:: java
@Dao(config = AppConfig.class)
public interface EmployeeDao {
@Select
List<Employee> selectAll();
@Select
Employee selectById(Integer id);
@Insert
int insert(Employee employee);
@Update
int update(Employee employee);
@Delete
int delete(Employee employee);
}
You move cursor to ``selectById`` method and do right click at Eclipse editor and show context menu.
You can transition to ``META-INF/boilerplate/dao/EmployeeDao/selectById.sql`` file by selecting Doma > Jum to SQL in menu.
Next, you put cursor to arbitrary place in ``META-INF/boilerplate/dao/EmployeeDao/selectById.sql`` file and show context menu.
You can back to ``EmployeeDao.java`` file by selecting Doma > Jump to Java in menu.
SQL File
============
You open ``META-INF/boilerplate/dao/EmployeeDao/selectById.sql`` file.
This file is described like next.
.. code-block:: sql
select
/*%expand*/*
from
employee
where
id = /* id */0
The ``/*%expand*/`` show that expansioning column list by referencing entity class that is mapped at Java method.
The ``/* id */`` show that Java method parameter value is binding to this SQL.
The ``0`` that is placed at behind is test data.
By including this test data, you can confirm easily that there is not mistake in SQL at executing by tool.
Test data is not used at executing Java program.
About detail you reference :doc:`sql`.
Search
=========
You call Dao method that is annotated ``@Select`` for executing :doc:`query/select` process.
Add searching process
----------------------
Show how to adding process that searching young employee than arbitrary age.
You add next program code to ``EmployeeDao``.
.. code-block:: java
@Select
List<Employee> selectByAge(Integer age);
At this time, next error message is shown on Eclipse by annotation process.
::
[DOMA4019] The file[META-INF/boilerplate/dao/EmployeeDao/selectByAge.sql] is is not found from the classpath.
You move cursor to ``selectByAge`` method and show context menu by doing right click,
and you select Doma > Jump to SQL in menu.
The dialog that is for creating SQL file is show like next.
.. image:: images/new-sql-file.png
:width: 80 %
You push 'Finish' and create file.
After creating file, you save the file that state is empty and back to ``EmployeeDao`` then error message is changed.
::
[DOMA4020] The SQL template is empty. PATH=[META-INF/boilerplate/dao/EmployeeDao/selectByAge.sql].
You back to ``selectByAge.sql`` file and describe next SQL.
.. code-block:: sql
select
/*%expand*/*
from
employee
where
age < /* age */0
Then error is resolved.
Execute searching process
--------------------------
Actually execute the created searching process at the above.
You add next code to ``EmployeeDaoTest``.
.. code-block:: java
@Test
public void testSelectByAge() {
TransactionManager tm = AppConfig.singleton().getTransactionManager();
tm.required(() -> {
List<Employee> employees = dao.selectByAge(35);
assertEquals(2, employees.size());
});
}
You execute JUnit and confirm that this code is run.
At that time, created for the searching SQL is next.
.. code-block:: sql
select
age, id, name, version
from
employee
where
age < 35
Insert
=======
For executing :doc:`query/insert` process, you call Dao method that is annotated ``@Insert`` annotation.
Execute insert process
-----------------------
You confirm that next code is exists at ``EmployeeDao``.
.. code-block:: java
@Insert
int insert(Employee employee);
Execute insert process by using this code.
You add next code to ``EmployeeDaoTest``.
.. code-block:: java
@Test
public void testInsert() {
TransactionManager tm = AppConfig.singleton().getTransactionManager();
Employee employee = new Employee();
// First transaction
// Execute inserting
tm.required(() -> {
employee.name = "HOGE";
employee.age = 20;
dao.insert(employee);
assertNotNull(employee.id);
});
// Second transaction
// Confirm that inserting is success
tm.required(() -> {
Employee employee2 = dao.selectById(employee.id);
assertEquals("HOGE", employee2.name);
assertEquals(Integer.valueOf(20), employee2.age);
assertEquals(Integer.valueOf(1), employee2.version);
});
}
You execute JUnit and confirm that this code is run.
At that time, created for the inserting SQL is next.
.. code-block:: sql
insert into Employee (age, id, name, version) values (20, 100, 'HOGE', 1)
Identifier and version number is automatically setting.
Update
========
For executing :doc:`query/update` process, you call Dao method that is annotated ``@Update`` annotation.
Execute update process
-----------------------
You confirm that next code is exists at ``EmployeeDao``.
.. code-block:: java
@Update
int update(Employee employee);
Execute update process by using this code.
You add next code to ``EmployeeDaoTest``.
.. code-block:: java
@Test
public void testUpdate() {
TransactionManager tm = AppConfig.singleton().getTransactionManager();
// First transaction
// Search and update age field
tm.required(() -> {
Employee employee = dao.selectById(1);
assertEquals("ALLEN", employee.name);
assertEquals(Integer.valueOf(30), employee.age);
assertEquals(Integer.valueOf(0), employee.version);
employee.age = 50;
dao.update(employee);
assertEquals(Integer.valueOf(1), employee.version);
});
// Second transaction
// Confirm that updating is success
tm.required(() -> {
Employee employee = dao.selectById(1);
assertEquals("ALLEN", employee.name);
assertEquals(Integer.valueOf(50), employee.age);
assertEquals(Integer.valueOf(1), employee.version);
});
}
You execute JUnit and confirm that this code is run.
At that time, created for the updating SQL is next.
.. code-block:: sql
update Employee set age = 50, name = 'ALLEN', version = 0 + 1 where id = 1 and version = 0
The version number that is for optimistic concurrency control is automatically increment.
Delete
=======
For executing :doc:`query/delete` process, you call Dao method that is annotated ``@Delete`` annotation.
Execute delete process
-----------------------
You confirm that next code is exists at ``EmployeeDao``.
.. code-block:: java
@Delete
int delete(Employee employee);
Execute delete process by using this code.
You add next code to ``EmployeeDaoTest``.
.. code-block:: java
@Test
public void testDelete() {
TransactionManager tm = AppConfig.singleton().getTransactionManager();
// First transaction
// Execute deleting
tm.required(() -> {
Employee employee = dao.selectById(1);
dao.delete(employee);
});
// Second transaction
// Confirm that deleting is success
tm.required(() -> {
Employee employee = dao.selectById(1);
assertNull(employee);
});
}
You execute JUnit and confirm that this code is run.
At that time, created for the deleting SQL is next.
.. code-block:: sql
delete from Employee where id = 1 and version = 0
Identifier and version number is specified in search condition.
| 26.124748 | 126 | 0.657733 |
c96848755265cb940400e82a539434a9a9e71f84 | 4,269 | rst | reStructuredText | source/install.rst | Dell-Networking/puppet-dellos10-docs | c859439995f2dcc01574e1cd99d6cd1f706a0a7c | [
"Apache-2.0"
] | null | null | null | source/install.rst | Dell-Networking/puppet-dellos10-docs | c859439995f2dcc01574e1cd99d6cd1f706a0a7c | [
"Apache-2.0"
] | 1 | 2018-05-08T06:47:29.000Z | 2018-05-08T06:47:29.000Z | source/install.rst | Dell-Networking/puppet-dellos10-docs | c859439995f2dcc01574e1cd99d6cd1f706a0a7c | [
"Apache-2.0"
] | 1 | 2018-06-21T03:51:18.000Z | 2018-06-21T03:51:18.000Z | ############
Installation
############
Puppet Master
*************
Puppet Master needs to be installed on a standalone server that has connectivity to all the Dell EMC Networking devices to be managed under Puppet. The dellemcnetworking-dellos10 Puppet module is tested against Puppet Enterprise Edition version 5.3. The dellos10 module needs to be installed on the Puppet Master server.
.. code-block:: bash
$ puppet module install dellemcnetworking-dellos10
See `Puppet Labs: Installing Modules <https://puppet.com/docs/puppet/5.3/modules_installing.html>`_ for more information.
Puppet Agent
************
Each network device to be managed by Puppet requires a one-time installation of the Puppet agent. The ``os10_devops_infra_install.sh`` script installs the Puppet client and it's dependencies.
The user os10devops must be created with the role of sysadmin (use the ``username`` command in CONF mode in the OS10 CLI).
.. code-block:: bash
OS10(config)# username os10devops password <password_str> role sysadmin
Download the `os10_devops_infra_install.sh <https://raw.githubusercontent.com/Dell-Networking/dellos10-ruby-utils/master/os10_devops_infra_install.sh>`_ script.
After downloading the script, change the permissions using ``chmod +x os10_devops_infra_install.sh``. Execute the ``os10_devops_infra_install.sh`` script to install Puppet and the devops Ruby utilities Debian package.
Usage
=====
.. code-block:: bash
$ os10_devops_infra_install.sh puppet active_partition/standby_partition local/remote <puppet_client_url> local/remote <os10_devops_ruby_utils_url>
$ os10_devops_infra_install.sh puppet_ruby_utils active_partition/standby_partition local/remote <os10_devops_ruby_utils_url>
**Options**
- puppet: used to install both puppet and devops infra module
- puppet_ruby_utils: used to install only devops Ruby utilities Debian package for Puppet; Puppet client should be already installed in the switch before installing devops Ruby utilities Debian package for the ``puppet_ruby_utils`` option
- active_partition: denotes current partition
- standby_partition: denotes standby partition; prerequisites for this option:
- OS10 image should be upgraded in the standby partition
- Puppet client should also be installed in the loaded or active partition
- local: denotes the relative path in the switch
- remote: denotes the relative path in the remote machine using protocols such as https, ftp, and so on
- <*puppet_client_url*>: Puppet URL should be an HTTPS/FTP path if previous option is remote (for example, https://apt.puppetlabs.com/puppet5-release-jessie.deb)
- <*puppet_client_url*>: download the ``puppet5-release-jessie.deb`` package in the local path of the switch if previous option is local (for example, /home/admin/)
- <*os10_devops_ruby_utils_url*>: devops Ruby utilies URL link from GitHub if previous option is remote (for example, https://raw.githubusercontent.com/Dell-Networking/dellos10-ruby-utils/master/os10-devops-ruby-utils-1.0.0.deb)
- <*os10_devops_ruby_utils_url*>: download the ``os10-devops-ruby-utils-1.0.0.deb`` package in the local path of the switch if previous option is local (for example, /home/admin/)
**Sample usage**
./os10_devops_infra_install.sh puppet standby_partition remote https://apt.puppetlabs.com/puppet5-release-jessie.deb local /home/admin
OR
./os10_devops_infra_install.sh puppet active_partition remote https://apt.puppetlabs.com/puppet5-release-jessie.deb remote https://raw.githubusercontent.com/Dell-Networking/dellos10-ruby-utils/master/os10-devops-ruby-utils-1.0.0.deb
OR
./os10_devops_infra_install.sh puppet active_partition local /home/admin/ local /home/admin/
OR
./os10_devops_infra_install.sh puppet_ruby_utils standby_partition local /home/admin
OR
./os10_devops_infra_install.sh puppet_ruby_utils active_partition remote https://raw.githubusercontent.com/Dell-Networking/dellos10-ruby-utils/master/os10-devops-ruby-utils-1.0.0.deb
> **NOTE**: After the image upgrade and reload, execute the Puppet client. If the Puppet client throws the "cannot load such file -- xml/libxml" error, execute the /opt/puppetlabs/puppet/bin/gem install libxml-ruby command in root/sudo mode.
| 54.730769 | 320 | 0.781916 |
b6bb489b1515048fd4af6db4a24739e20d7316d0 | 967 | rst | reStructuredText | src/Filtering/FastMarching/ComputeGeodesicDistanceOnMesh/Documentation.rst | mseng10/ITKExamples | b352a57491b6e387c49417d6863f035b5be70209 | [
"Apache-2.0"
] | null | null | null | src/Filtering/FastMarching/ComputeGeodesicDistanceOnMesh/Documentation.rst | mseng10/ITKExamples | b352a57491b6e387c49417d6863f035b5be70209 | [
"Apache-2.0"
] | null | null | null | src/Filtering/FastMarching/ComputeGeodesicDistanceOnMesh/Documentation.rst | mseng10/ITKExamples | b352a57491b6e387c49417d6863f035b5be70209 | [
"Apache-2.0"
] | null | null | null | Compute Geodesic Distance on Mesh
=================================
.. index::
single: FastMarchingQuadEdgeMeshFilterBase
single: FastMarchingThresholdStoppingCriterion
Synopsis
--------
Compute the geodesic distance from a provided seed vertex on a mesh.
Results
-------
.. figure:: Input.png
:scale: 100%
:alt: Input mesh
Input mesh
.. figure:: Output.png
:scale: 100%
:alt: Output mesh
Output mesh
.. raw:: html
<div class="figure">
<iframe src="genusZeroSurface01.html" width="200" height="225" seamless></iframe>
<p class="caption">Interactive input mesh</p>
</div>
<div class="figure">
<iframe src="ComputeGeodesicDistanceOnMeshOutput.html" width="200" height="225" seamless></iframe>
<p class="caption">Interactive output mesh</p>
</div>
Code
----
C++
...
.. literalinclude:: Code.cxx
:lines: 18-
Classes demonstrated
--------------------
.. breathelink:: itk::FastMarchingQuadEdgeMeshFilterBase
| 17.267857 | 102 | 0.650465 |
53fd3486c0224c552a607ba3180b81855b9960e1 | 852 | rst | reStructuredText | docs/source/examples/example2.rst | toddrme2178/acoular | 2c5fc3ca1250ecd7dadd24e365a47bec4a25aa38 | [
"BSD-3-Clause"
] | 1 | 2019-08-30T22:45:09.000Z | 2019-08-30T22:45:09.000Z | docs/source/examples/example2.rst | toddrme2178/acoular | 2c5fc3ca1250ecd7dadd24e365a47bec4a25aa38 | [
"BSD-3-Clause"
] | null | null | null | docs/source/examples/example2.rst | toddrme2178/acoular | 2c5fc3ca1250ecd7dadd24e365a47bec4a25aa38 | [
"BSD-3-Clause"
] | 1 | 2019-08-30T03:29:09.000Z | 2019-08-30T03:29:09.000Z | Example 2
=========
This example demonstrates a simple approach to beamforming on a rotating source.
Download: :download:`example2.py <../../../examples/example2.py>`
The script produces three figures:
.. list-table::
:widths: 25 25 50
* - .. figure:: example2_1.png
:align: center
:width: 100%
:figwidth: 80%
Results for a time domain beamformer with fixed focus
- .. figure:: example2_2.png
:align: center
:width: 100%
:figwidth: 80%
Results for a time domain beamformer with focus moving along a circle trajectory
- .. figure:: example2_3.png
:align: center
:width: 100%
:figwidth: 80%
Time-averaged results for different beamformers
The script example2.py:
.. literalinclude:: ../../../examples/example2.py
| 23.027027 | 92 | 0.610329 |
3d408228452c0e64ec65b4a608e6294a6eb6b5f1 | 6,183 | rst | reStructuredText | docs/client.rst | wrndlb/WeRoBot | c23c003a8d425c74bc65c71ed92fdcfe68f0a813 | [
"MIT"
] | 1,904 | 2018-04-26T02:05:13.000Z | 2022-03-31T11:38:46.000Z | docs/client.rst | wongjanwei/WeRoBot | 63a868172ad992658185c024d6c2f33b95ec3687 | [
"MIT"
] | 422 | 2018-05-02T14:56:00.000Z | 2022-03-29T00:20:01.000Z | docs/client.rst | wongjanwei/WeRoBot | 63a868172ad992658185c024d6c2f33b95ec3687 | [
"MIT"
] | 393 | 2018-04-28T15:02:09.000Z | 2022-03-25T16:24:16.000Z | ``WeRoBot.Client`` —— 微信 API 操作类
=====================================
有部分接口暂未实现,可自行调用微信接口。
.. module:: werobot.client
开始开发
------------
获取 access token
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/14/9f9c82c1af308e3b14ba9b973f99a8ba.html
.. automethod:: Client.grant_token
.. automethod:: Client.get_access_token
.. note:: Client 的操作都会自动进行 `access token` 的获取和过期刷新操作,如果有特殊需求(如多进程部署)可重写 ``get_access_token``。
获取微信服务器IP地址
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/4/41ef0843d6e108cf6b5649480207561c.html
.. automethod:: Client.get_ip_list
自定义菜单
------------
自定义菜单创建接口
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/10/0234e39a2025342c17a7d23595c6b40a.html
.. automethod:: Client.create_menu
自定义菜单查询接口
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/5/f287d1a5b78a35a8884326312ac3e4ed.html
.. automethod:: Client.get_menu
自定义菜单删除接口
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/3/de21624f2d0d3dafde085dafaa226743.html
.. automethod:: Client.delete_menu
个性化菜单接口
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/0/c48ccd12b69ae023159b4bfaa7c39c20.html
.. automethod:: Client.create_custom_menu
.. automethod:: Client.delete_custom_menu
.. automethod:: Client.match_custom_menu
获取自定义菜单配置接口
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/14/293d0cb8de95e916d1216a33fcb81fd6.html
.. automethod:: Client.get_custom_menu_config
消息管理
------------
客服接口
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/11/c88c270ae8935291626538f9c64bd123.html
发送卡券接口暂时未支持。可自行实现。
.. automethod:: Client.add_custom_service_account
.. automethod:: Client.update_custom_service_account
.. automethod:: Client.delete_custom_service_account
.. automethod:: Client.upload_custom_service_account_avatar
.. automethod:: Client.get_custom_service_account_list
.. automethod:: Client.get_online_custom_service_account_list
.. automethod:: Client.send_text_message
.. automethod:: Client.send_image_message
.. automethod:: Client.send_voice_message
.. automethod:: Client.send_video_message
.. automethod:: Client.send_music_message
.. automethod:: Client.send_article_message
.. automethod:: Client.send_news_message
.. automethod:: Client.send_miniprogrampage_message
群发接口
``````````````````````````````
.. automethod:: Client.send_mass_msg
.. automethod:: Client.delete_mass_msg
.. automethod:: Client.send_mass_preview_to_user
.. automethod:: Client.get_mass_msg_status
.. automethod:: Client.get_mass_msg_speed
用户管理
------------
用户分组管理
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/8/d6d33cf60bce2a2e4fb10a21be9591b8.html
.. automethod:: Client.create_group
.. automethod:: Client.get_groups
.. automethod:: Client.get_group_by_id
.. automethod:: Client.update_group
.. automethod:: Client.move_user
.. automethod:: Client.move_users
.. automethod:: Client.delete_group
设置备注名
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/16/528098c4a6a87b05120a7665c8db0460.html
.. automethod:: Client.remark_user
获取用户基本信息
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/1/8a5ce6257f1d3b2afb20f83e72b72ce9.html
.. automethod:: Client.get_user_info
.. automethod:: Client.get_users_info
账户管理
------------
长链接转短链接接口和微信认证事件推送暂未添加,可自行实现。
生成带参数的二维码
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/18/167e7d94df85d8389df6c94a7a8f78ba.html
.. automethod:: Client.create_qrcode
.. automethod:: Client.show_qrcode
获取用户列表
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/12/54773ff6da7b8bdc95b7d2667d84b1d4.html
.. automethod:: Client.get_followers
素材管理
------------
新增临时素材
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/15/2d353966323806a202cd2deaafe8e557.html
.. automethod:: Client.upload_media
获取临时素材
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/9/677a85e3f3849af35de54bb5516c2521.html
.. automethod:: Client.download_media
新增永久素材
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/10/10ea5a44870f53d79449290dfd43d006.html
.. automethod:: Client.add_news
.. automethod:: Client.upload_news_picture
.. automethod:: Client.upload_permanent_media
.. automethod:: Client.upload_permanent_video
获取永久素材
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/12/3c12fac7c14cb4d0e0d4fe2fbc87b638.html
.. automethod:: Client.download_permanent_media
删除永久素材
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/7/2212203f4e17253b9aef77dc788f5337.html
.. automethod:: Client.delete_permanent_media
上传图文消息素材
``````````````````````````````
.. automethod:: Client.upload_news
修改永久图文素材
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/10/c7bad9a463db20ff8ccefeedeef51f9e.html
.. automethod:: Client.update_news
获取素材总数
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/5/a641fd7b5db7a6a946ebebe2ac166885.html
.. automethod:: Client.get_media_count
获取素材列表
``````````````````````````````
详细请参考 http://mp.weixin.qq.com/wiki/15/8386c11b7bc4cdd1499c572bfe2e95b3.html
.. automethod:: Client.get_media_list
用户标签管理
------------
详细请参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140837
创建标签
``````````````````````````````
.. automethod:: Client.create_tag
获取公众号已创建的标签
``````````````````````````````
.. automethod:: Client.get_tags
编辑标签
``````````````````````````````
.. automethod:: Client.update_tag
删除标签
``````````````````````````````
.. automethod:: Client.delete_tag
获取标签下粉丝列表
``````````````````````````````
.. automethod:: Client.get_users_by_tag
批量为用户打标签
``````````````````````````````
.. automethod:: Client.tag_users
批量为用户取消标签
``````````````````````````````
.. automethod:: Client.untag_users
获取用户身上的标签列表
``````````````````````````````
.. automethod:: Client.get_tags_by_user
模板消息
------------
.. automethod:: Client.send_template_message
返回码都是什么意思?
--------------------------
参考 https://mp.weixin.qq.com/wiki/10/6380dc743053a91c544ffd2b7c959166.html
48001 -- API Unauthorized
---------------------------
如果你遇到了这个错误,请检查你的微信公众号是否有调用该接口的权限。
参考: https://mp.weixin.qq.com/wiki/13/8d4957b72037e3308a0ca1b21f25ae8d.html
| 25.032389 | 93 | 0.656316 |
e3b90f6671078c7ae17122addd068fe67012eaf8 | 1,746 | rst | reStructuredText | docs/source/api.rst | almonds0166/pk.py | 3f3676511f323293fdae332df8ef4eefb6fbef67 | [
"MIT"
] | 2 | 2021-06-17T22:20:40.000Z | 2021-06-20T22:06:24.000Z | docs/source/api.rst | almonds0166/pk.py | 3f3676511f323293fdae332df8ef4eefb6fbef67 | [
"MIT"
] | null | null | null | docs/source/api.rst | almonds0166/pk.py | 3f3676511f323293fdae332df8ef4eefb6fbef67 | [
"MIT"
] | 3 | 2021-06-13T02:14:36.000Z | 2021-06-22T18:06:23.000Z |
.. currentmodule:: pluralkit
API reference
=============
Client
------
.. autoclass:: Client
:members:
Models
------
Birthday
~~~~~~~~
.. autoclass:: Birthday
:members:
Color
~~~~~
.. autoclass:: Color
:members:
Member
~~~~~~
.. autoclass:: Member
:members:
Message
~~~~~~~
.. autoclass:: Message
:members:
ProxyTag
~~~~~~~~
.. autoclass:: ProxyTag
:members:
ProxyTags
~~~~~~~~~
.. autoclass:: ProxyTags
:members:
Switch
~~~~~~
.. autoclass:: Switch
:members:
System
~~~~~~
.. autoclass:: System
:members:
Timestamp
~~~~~~~~~
.. autoclass:: Timestamp
:members:
Timezone
~~~~~~~~
.. autoclass:: Timezone
:members:
Enumerations
------------
Privacy
~~~~~~~
.. autoclass:: Privacy
.. autoattribute:: Privacy.PUBLIC
Represents a public PluralKit privacy setting.
.. autoattribute:: Privacy.PRIVATE
Represents a private PluralKit privacy setting.
.. autoattribute:: Privacy.UNKNOWN
Equivalent to `Privacy.PUBLIC` in effect. Returned for member and system privacy fields if the client does not have an authorization token set.
.. _exceptions:
Exceptions
----------
PluralKitException
~~~~~~~~~~~~~~~~~~
.. autoclass:: errors.PluralKitException
AccessForbidden
~~~~~~~~~~~~~~~
.. autoclass:: errors.AccessForbidden
AuthorizationError
~~~~~~~~~~~~~~~~~~
.. autoclass:: errors.AuthorizationError
DiscordUserNotFound
~~~~~~~~~~~~~~~~~~~
.. autoclass:: errors.DiscordUserNotFound
InvalidBirthday
~~~~~~~~~~~~~~~
.. autoclass:: errors.InvalidBirthday
InvalidKwarg
~~~~~~~~~~~~
.. autoclass:: errors.InvalidKwarg
SystemNotFound
~~~~~~~~~~~~~~
.. autoclass:: errors.SystemNotFound
MemberNotFound
~~~~~~~~~~~~~~
.. autoclass:: errors.MemberNotFound
| 12.471429 | 149 | 0.616266 |
ea342533000a5cf79c5435efcd1688c808f3d5b8 | 194 | rst | reStructuredText | code/Fortran/miniWeather/README.rst | grnydawn/GPUPerf | 90717bc13b45ff2e37af18993f509b4c9c9942df | [
"Apache-2.0"
] | 1 | 2021-04-30T13:33:29.000Z | 2021-04-30T13:33:29.000Z | code/Fortran/miniWeather/README.rst | grnydawn/GPUPerf | 90717bc13b45ff2e37af18993f509b4c9c9942df | [
"Apache-2.0"
] | null | null | null | code/Fortran/miniWeather/README.rst | grnydawn/GPUPerf | 90717bc13b45ff2e37af18993f509b4c9c9942df | [
"Apache-2.0"
] | 1 | 2021-07-22T15:36:29.000Z | 2021-07-22T15:36:29.000Z | miniWeather_acc.f90
===========================
This program is modifed from Matthew Norman's original work (https://github.com/mrnorman/miniWeather/blob/master/fortran/miniWeather_serial.F90)
| 38.8 | 144 | 0.716495 |
c20ed298f825d5b10760f4736edc1fc11cd596f8 | 2,734 | rst | reStructuredText | doc/developer-guide/api/functions/TSHttpTxnOutgoingAddrGet.en.rst | zhaorun/trafficserver | 757256129811441f29eea288b1d7e19bc54fab9c | [
"Apache-2.0"
] | 2 | 2020-12-05T03:28:25.000Z | 2021-07-10T06:03:57.000Z | doc/developer-guide/api/functions/TSHttpTxnOutgoingAddrGet.en.rst | zhaorun/trafficserver | 757256129811441f29eea288b1d7e19bc54fab9c | [
"Apache-2.0"
] | 3 | 2017-09-22T19:18:56.000Z | 2021-06-21T18:07:14.000Z | doc/developer-guide/api/functions/TSHttpTxnOutgoingAddrGet.en.rst | zhaorun/trafficserver | 757256129811441f29eea288b1d7e19bc54fab9c | [
"Apache-2.0"
] | 1 | 2021-02-15T08:09:17.000Z | 2021-02-15T08:09:17.000Z | .. Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright
ownership. The ASF licenses this file to you under the Apache
License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
.. include:: ../../../common.defs
.. default-domain:: c
Local outbound address
========================
Get or set the local IP address for outbound connections.
Synopsis
--------
`#include <ts/ts.h>`
.. c:function:: sockaddr const* TSHttpTxnOutgoingAddrGet(TSHttpTxn txnp)
.. c:function:: TSReturnCode TSHttpTxnOutgoingAddrSet(TSHttpTxn txnp, sockaddr const* addr)
Description
-----------
These functions concern the local IP address and port, that is the address and port on the |TS| side
of outbound connections (network connections *from* |TS| *to* another socket).
The address and optional the port can be set with :func:`TSHttpTxnOutgoingAddrSet`. This must be
done before the outbound connection is made, that is, earlier than the :macro:`TS_HTTP_SEND_REQUEST_HDR_HOOK`.
A good choice is the :macro:`TS_HTTP_POST_REMAP_HOOK`, since it is a hook that is always called, and it
is the latest hook that is called before the connection is made.
The :arg:`addr` must be populated with the IP address and port to be used. If the port is not
relevant it can be set to zero, which means use any available local port. This function returns
:macro:`TS_SUCCESS` on success and :macro:`TS_ERROR` on failure.
Even on a successful call to :func:`TSHttpTxnOutgoingAddrSet`, the local IP address may not match
what was passing :arg:`addr` if :ts:cv:`session sharing <proxy.config.http.server_session_sharing.match>` is enabled.
Conversely :func:`TSHttpTxnOutgoingAddrGet` retrieves the local address and must be called in the
:macro:`TS_HTTP_SEND_REQUEST_HDR_HOOK` or later, after the outbound connection has been established. It returns a
pointer to a :code:`sockaddr` which contains the local IP address and port. If there is no valid
outbound connection, :arg:`addr` will be :code:`NULL`. The returned pointer is a transient pointer
and must not be referenced after the callback in which :func:`TSHttpTxnOutgoingAddrGet` was called.
| 47.964912 | 117 | 0.763716 |
be341ad2b08e0ea61c3422f7726154e56cc75524 | 4,604 | rst | reStructuredText | README.rst | Edinburgh-Genome-Foundry/genedom | 71797d580ceba58c3a775e18a863dc5506644174 | [
"MIT"
] | 14 | 2018-04-17T06:33:20.000Z | 2021-04-11T22:36:12.000Z | README.rst | Edinburgh-Genome-Foundry/genedom | 71797d580ceba58c3a775e18a863dc5506644174 | [
"MIT"
] | 2 | 2020-04-03T14:59:34.000Z | 2020-09-06T18:31:20.000Z | README.rst | Edinburgh-Genome-Foundry/genedom | 71797d580ceba58c3a775e18a863dc5506644174 | [
"MIT"
] | 2 | 2019-04-12T14:17:19.000Z | 2021-11-11T01:18:57.000Z | .. raw:: html
<p align="center">
<img alt="logo" title="genedom Logo" src="https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/genedom/master/docs/_static/images/logo.png" width="550">
<br /><br />
</p>
.. image:: https://travis-ci.org/Edinburgh-Genome-Foundry/genedom.svg?branch=master
:target: https://travis-ci.org/Edinburgh-Genome-Foundry/genedom
:alt: Travis CI build status
.. image:: https://coveralls.io/repos/github/Edinburgh-Genome-Foundry/genedom/badge.svg?branch=master
:target: https://coveralls.io/github/Edinburgh-Genome-Foundry/genedom?branch=master
GeneDom is a python library for managing the domestication of genetic parts
(i.e. the modification of their sequence so as to make them compatible with a
given genetic assembly standard). Genedom binds together a
`sequence optimizer <https://github.com/Edinburgh-Genome-Foundry/DnaChisel>`_,
genetic standards informations, and a reporting routine, to automate the
domestication of large batches in an easy and human-friendly way.
.. raw:: html
<p align="center">
<img alt="schema" title="schema" src="https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/genedom/master/docs/_static/images/domestication_schema.png" width="800">
<br /><br />
</p>
Features include:
- Possibility to define part domesticators with added right-hand and left-hand
nucleotide, hard constraints on the sequence (such as absence of a restriction
site) and optimization objectives (such as codon optimization).
- Built-in pre-defined domesticators for popular genetic assembly standards
(well, only EMMA at the moment).
- Possibility to generate and attribute barcodes that will be added to the
sequence (but won't be in final constructs) in order to easily check
that this is the right part in the future in case of label mix-up.
- Routine for mass-domesticating sequences with report generation, including
reports on each sequence optimization, spreadsheets of parts, ready-to-order FASTA
records of the parts, and a summary report to quickly verify everything, with a
list of every domesticator used, for traceability.
Here is an example of summary report:
.. raw:: html
<p align="center">
<img alt="report" title="report" src="https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/genedom/master/docs/_static/images/report_screenshot.png" width="600">
<br /><br />
</p>
You can also use Genedom online via `this web app <https://cuba.genomefoundry.org/domesticate_part_batches>`_.
Usage examples
---------------
Simple domestication of one part
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: python
from genedom import (GoldenGateDomesticator, random_dna_sequence,
write_record)
sequence = random_dna_sequence(2000, seed=123)
domesticator = GoldenGateDomesticator("ATTC", "ATCG", enzyme='BsmBI')
domestication_results = domesticator.domesticate(sequence, edit=True)
print (domestication_results.summary())
write_record(domestication_results.record_after, 'domesticated.gb')
Generating a collection of 20bp barcodes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(see docs for more potions)
.. code:: python
from genedom import BarcodesCollection
barcodes_collection = BarcodesCollection.from_specs(
n_barcodes=96, barcode_length=20,
forbidden_enzymes=('BsaI', 'BsmBI', 'BbsI'))
barcodes_collection.to_fasta('example_barcodes_collection.fa')
Domesticating a batch of parts with PDF report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code :: python
from genedom import BUILTIN_STANDARDS, load_record, batch_domestication
records = [
load_record(filepath, name=filename)
for filepath in records_filepaths
]
barcodes_collection = BarcodesCollection.from_specs(n_barcodes=10)
batch_domestication(records, 'domestication_report.zip',
barcodes=barcodes, # optional
standard=BUILTIN_STANDARDS.EMMA)
Installation
-------------
You can install Genedom through PIP
.. code:: shell
sudo pip install genedom
Alternatively, you can unzip the sources in a folder and type
.. code:: shell
sudo python setup.py install
Licence
--------
Genedom is an open-source software originally written at the `Edinburgh Genome Foundry
<http://www.genomefoundry.org>`_ by `Zulko <https://github.com/Zulko>`_
and `released on Github <https://github.com/Edinburgh-Genome-Foundry/genedom>`_ under the MIT licence (Copyright 2018 Edinburgh Genome Foundry).
Everyone is welcome to contribute !
| 35.415385 | 174 | 0.720026 |
445b33dc6603711d1866df68c63c32b0ccb74ebf | 116 | rest | reStructuredText | part3/phonebookbackend/requests/create_one.rest | davidlunadeleon/fullstackOpen2020 | 8f8330ebee1a27a94c0d60dd44c1eb3952feae8b | [
"MIT"
] | null | null | null | part3/phonebookbackend/requests/create_one.rest | davidlunadeleon/fullstackOpen2020 | 8f8330ebee1a27a94c0d60dd44c1eb3952feae8b | [
"MIT"
] | 1 | 2021-09-02T14:38:56.000Z | 2021-09-02T14:38:56.000Z | part3/phonebookbackend/requests/create_one.rest | davidlunadeleon/fullstackOpen2020 | 8f8330ebee1a27a94c0d60dd44c1eb3952feae8b | [
"MIT"
] | null | null | null | POST http://localhost:3001/api/persons
Content-Type: application/json
{
"name": "Mike",
"number": "12345-54321"
} | 16.571429 | 38 | 0.698276 |
67811169a85f4ec2a51aa8afb444b67b2026adee | 3,642 | rst | reStructuredText | api/autoapi/Microsoft/AspNetCore/Razor/Text/LocationTagged-TValue/index.rst | JakeGinnivan/Docs | 2e8d94b77a6a4197a8a1ad820085fbcadca65cf9 | [
"Apache-2.0"
] | 1 | 2021-03-17T19:22:59.000Z | 2021-03-17T19:22:59.000Z | api/autoapi/Microsoft/AspNetCore/Razor/Text/LocationTagged-TValue/index.rst | JakeGinnivan/Docs | 2e8d94b77a6a4197a8a1ad820085fbcadca65cf9 | [
"Apache-2.0"
] | null | null | null | api/autoapi/Microsoft/AspNetCore/Razor/Text/LocationTagged-TValue/index.rst | JakeGinnivan/Docs | 2e8d94b77a6a4197a8a1ad820085fbcadca65cf9 | [
"Apache-2.0"
] | 1 | 2021-09-28T12:49:08.000Z | 2021-09-28T12:49:08.000Z |
LocationTagged<TValue> Class
============================
Namespace
:dn:ns:`Microsoft.AspNetCore.Razor.Text`
Assemblies
* Microsoft.AspNetCore.Razor
----
.. contents::
:local:
Inheritance Hierarchy
---------------------
* :dn:cls:`System.Object`
* :dn:cls:`Microsoft.AspNetCore.Razor.Text.LocationTagged\<TValue>`
Syntax
------
.. code-block:: csharp
[DebuggerDisplay("({Location})\"{Value}\"")]
public class LocationTagged<TValue> : IFormattable
.. dn:class:: Microsoft.AspNetCore.Razor.Text.LocationTagged`1
:hidden:
.. dn:class:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>
Properties
----------
.. dn:class:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.Location
:rtype: Microsoft.AspNetCore.Razor.SourceLocation
.. code-block:: csharp
public SourceLocation Location
{
get;
}
.. dn:property:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.Value
:rtype: TValue
.. code-block:: csharp
public TValue Value
{
get;
}
Constructors
------------
.. dn:class:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.LocationTagged(TValue, Microsoft.AspNetCore.Razor.SourceLocation)
:type value: TValue
:type location: Microsoft.AspNetCore.Razor.SourceLocation
.. code-block:: csharp
public LocationTagged(TValue value, SourceLocation location)
.. dn:constructor:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.LocationTagged(TValue, System.Int32, System.Int32, System.Int32)
:type value: TValue
:type offset: System.Int32
:type line: System.Int32
:type col: System.Int32
.. code-block:: csharp
public LocationTagged(TValue value, int offset, int line, int col)
Methods
-------
.. dn:class:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.Equals(System.Object)
:type obj: System.Object
:rtype: System.Boolean
.. code-block:: csharp
public override bool Equals(object obj)
.. dn:method:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.GetHashCode()
:rtype: System.Int32
.. code-block:: csharp
public override int GetHashCode()
.. dn:method:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.ToString()
:rtype: System.String
.. code-block:: csharp
public override string ToString()
.. dn:method:: Microsoft.AspNetCore.Razor.Text.LocationTagged<TValue>.ToString(System.String, System.IFormatProvider)
:type format: System.String
:type formatProvider: System.IFormatProvider
:rtype: System.String
.. code-block:: csharp
public string ToString(string format, IFormatProvider formatProvider)
| 18.773196 | 144 | 0.568369 |
0ee6d3063e23620ad1c54630cc837d5bfe2f9753 | 3,178 | rst | reStructuredText | scan/README.rst | lmolas-sadosky/misfortune-cookie | b9097a02a6a75264f00453357bb3d65e69fc9d2e | [
"BSD-2-Clause"
] | 3 | 2017-07-27T17:47:47.000Z | 2021-07-13T08:12:25.000Z | scan/README.rst | lmolas-sadosky/misfortune-cookie | b9097a02a6a75264f00453357bb3d65e69fc9d2e | [
"BSD-2-Clause"
] | null | null | null | scan/README.rst | lmolas-sadosky/misfortune-cookie | b9097a02a6a75264f00453357bb3d65e69fc9d2e | [
"BSD-2-Clause"
] | null | null | null | ***************************
Scan of Argentina IP blocks
***************************
Using the `masscan <https://github.com/robertdavidgraham/masscan>`_ tool, a scan for the vulnerable version of the RomPager server was done for all IPv4 argentinian addresses, as reported from:
http://www.ipdeny.com/ipblocks/data/countries/ar.zone
From the search space of 19M addresses of the possible IPs that had been leased to argentina (as reported by the `LACNIC <http://www.lacnic.net>`_ `whois <./whois/>`_), the standard 7547 port and the non standard 30005 port were scanned, finding 2.863.653 open ports. Then a banner grabbing was performed to find the vulnerable version of the HTTP server (``RomPager/4.07``), reporting 220.738 devices with this vulnerable version.
All the logic is summarized in `main.py <../src/scan/main.py>`_. The scan results, in an ``sqlite`` database, are available for `download <https://github.com/programa-stic/misfortune-cookie/releases/download/0.1.0/scan.sqlite.tar.gz>`_.
Setup
-----
Ubuntu 14.04 (64 bits) with a 100Mbps connection.
Masscan
-------
With a clear documentation, the installation was performed according to the README without any issues.
::
sudo ../masscan/bin/masscan -c scan/scan.conf
All the configuration options used are in the configuration file (including the IPs range) in `scan.conf <./scan.conf>`_.
A rate of 3000 packets per second (with 2 retries) was chosen, to balance scan speed with avoiding network saturation (the scan lasted several hours which was acceptable for the current target).
Banner grabbing
---------------
Masscan provides a banner grabbing feature but it didn't work as expected (missing many banners, probably due to a misconfiguration issue). The banner grabbing functionality was implemented with a `custom python script <../src/scan/banner_grabber.py>`_ using the `requests <https://github.com/requests/requests>`_ package.
SQLite
------
All the results were parsed from the masscan generated xml file and stored in an database (``sqlite``).
To find the vulnerable devices in the database:
.. code-block:: SQL
SELECT * FROM scan where scan.http_banner like '%RomPager/4.07%'
/* Simple command to list all vulnerable modems. (Actually the
vulnerable versions range is 4.07-4.34, but in practice all
were either 4.07 or 4.51.) */
/* Aggregate all modems grouped by the port number (standard 7547 or
custom 30005) and owner of the IP block (providing also totals.) */
SELECT
count(*) as Total,
sum(port_7547) as "Port 7547", /* Defined in the */
sum(port_30005) as "Port 30005", /* nested SELECT. */
owner,
country
FROM (
SELECT
ip_blocks.ownerid, /* Group by owner of IP block. */
ip_blocks.owner,
ip_blocks.country,
case scan.port when 7547 then 1 else 0 end as port_7547,
case scan.port when 30005 then 1 else 0 end as port_30005
FROM scan
INNER JOIN ip_blocks ON scan.ip_block_id == ip_blocks.id
WHERE scan.http_banner like '%RomPager/4.07%'
)
GROUP BY ownerid
ORDER BY total DESC
| 42.373333 | 431 | 0.697609 |
a62be1d198d66bab6425bf6d76fc631f69695595 | 2,044 | rst | reStructuredText | doc/collaboration/code/error_code_conventions.rst | gemtara/z | 74dbbcac6139211b8f2d5893bc90fce536939ca3 | [
"Apache-2.0"
] | null | null | null | doc/collaboration/code/error_code_conventions.rst | gemtara/z | 74dbbcac6139211b8f2d5893bc90fce536939ca3 | [
"Apache-2.0"
] | null | null | null | doc/collaboration/code/error_code_conventions.rst | gemtara/z | 74dbbcac6139211b8f2d5893bc90fce536939ca3 | [
"Apache-2.0"
] | 1 | 2019-10-02T16:45:19.000Z | 2019-10-02T16:45:19.000Z | .. _error_code_conventions:
Returning Code Conventions
##########################
Zephyr uses the standard codes in :file:`errno.h` for all APIs.
As a general rule, ``0`` indicates success; a negative errno.h code indicates
an error condition. The table below shows the error code conventions based on
device driver use cases, but they can also be applied to other kernel
components.
+-----------------+------------------------------------------------+
| Code | Meaning |
+=================+================================================+
| 0 | Success. |
+-----------------+------------------------------------------------+
| -EIO | General failure. |
+-----------------+------------------------------------------------+
| -ENOTSUP | Operation is not supported or operation is |
| | invalid. |
+-----------------+------------------------------------------------+
| -EINVAL | Device configuration is not valid or function |
| | argument is not valid. |
+-----------------+------------------------------------------------+
| -EBUSY | Device controller is busy. |
+-----------------+------------------------------------------------+
| -EACCES | Device controller is not accessible. |
+-----------------+------------------------------------------------+
| -ENODEV | Device type is not supported. |
+-----------------+------------------------------------------------+
| -EPERM | Device is not configured or operation is not |
| | permitted. |
+-----------------+------------------------------------------------+
| -ENOSYS | Function is not implemented. |
+-----------------+------------------------------------------------+
| 55.243243 | 77 | 0.297456 |
8b83184b82230924d5e1e863b08790f408492b96 | 940 | rst | reStructuredText | ChangeLog.rst | ubccr/iquota | 77e37be419c439ecbe8ff888ad2f2a78aa9fecf8 | [
"BSD-3-Clause"
] | 3 | 2016-04-21T09:23:45.000Z | 2018-11-08T23:34:02.000Z | ChangeLog.rst | ubccr/iquota | 77e37be419c439ecbe8ff888ad2f2a78aa9fecf8 | [
"BSD-3-Clause"
] | null | null | null | ChangeLog.rst | ubccr/iquota | 77e37be419c439ecbe8ff888ad2f2a78aa9fecf8 | [
"BSD-3-Clause"
] | 3 | 2016-04-21T09:23:47.000Z | 2020-08-11T18:32:33.000Z | ===============================================================================
ChangeLog
===============================================================================
v0.0.6
----------------------
- Add support in client for vast mounts
- Major refactor to support directory based quotas
- Remove isilon onefs support
v0.0.5
----------------------
- Add support in client for panfs mounts
v0.0.4
----------------------
- OneFS sessions not working. Just use basic auth
v0.0.3
----------------------
- Add support for detecting nfsv4 mounts in iquota client
v0.0.2
----------------------
- Add option to fetch all quotas that have exceeded one or more thresholds
- Add support for multiple user/group admins in config
- Add option to print default user/group quotas. Do not show by default
- Add support for resume parameter to continue fetching results from previous
request
v0.0.1
----------------------
- Initial release
| 23.5 | 79 | 0.525532 |
a272de11ee2602a11d00bea6644aa4175119e6bd | 3,828 | rst | reStructuredText | wrappers/LibreOffice/Readme.rst | tobias-loew/CoolProp | ea3a957701f587c8033b4f194401915992f73d68 | [
"MIT"
] | 1 | 2021-02-13T03:00:51.000Z | 2021-02-13T03:00:51.000Z | wrappers/LibreOffice/Readme.rst | tobias-loew/CoolProp | ea3a957701f587c8033b4f194401915992f73d68 | [
"MIT"
] | 1 | 2021-07-12T19:35:24.000Z | 2021-07-13T04:18:23.000Z | wrappers/LibreOffice/Readme.rst | tobias-loew/CoolProp | ea3a957701f587c8033b4f194401915992f73d68 | [
"MIT"
] | 3 | 2020-05-29T17:44:16.000Z | 2020-06-17T15:21:55.000Z | CoolProp wrapper for LibreOffice
================================
This is a LibreOffice extension, that makes the CoolProp High-Level Interface functions available in LibreOffice Calc. All functions and their parameters contains descriptions, that are available in the function wizard.
The LibreOffice extension itself is platform-independent. In the background the extension uses the Python CoolProp package for all calculations. Thus, the CoolProp Python package must be installed for the Python interpreter that is used by LibreOffice.
The extension contains a helper function to automate the installation of the Python package. This function installs the package inside the LibreOffice extension directory, e.g.::
# on Windows
C:\Users\user\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu376486is.tmp_\CoolProp.oxt\pythonpath
# on Linux
/home/user/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu18931y72pq5.tmp_/CoolProp.oxt/pythonpath
# on macOS
/Users/user/Library/Application Support/LibreOffice/4/user/uno_packages/cache/uno_packages/lu104274oq0.tmp_/CoolProp.oxt/pythonpath
Building the extension
----------------------
To build the extension, the LibreOffice SDK must be installed. The tools from the SDK are needed to rebuild the registry database file (rdb) after changing Interface functions. Besides this, building the extension mainly means packing all files into a zip archive.
Run these commands from the CoolProp repository root directory with the correct paths set::
cmake -DCOOLPROP_LIBREOFFICE_MODULE=ON -DLO_PROGRAM_PATH=/usr/lib/libreoffice/program -DLO_SDK_PATH=/usr/lib/libreoffice/sdk
make CoolPropLibreOfficeAddin
Dependencies (build only):
* LibreOffice SDK
* 7zip
* pip (for downloading dependencies)
Installation
------------
1. Download the CoolProp.oxt Extension for LibreOffice (don't rename the file) and the example spreadsheet file ``TestLibreOffice.ods``
2. On Linux systems that split the LibreOffice package, install the necessary python script provider. On Ubuntu this can be done by::
sudo apt-get install libreoffice-script-provider-python
3. Install the CoolProp Extension by double-clicking the oxt-file (install only for user)
4. Test the installation with the ``TestLibreOffice.ods`` file
5. If the CoolProp functions don't work, install the CoolProp Python package:
a. In LibreOffice go to the menu Tools | Options | CoolProp | Installation
b. Click the „Install CoolProp“ button
c. The helper function checks if the CoolProp package is already installed. Otherwise it tries to download and install the Python package.
6. Open the file ``TestLibreOffice.ods``. All CoolProp formulas should be working.
Manual installation of the CoolProp Python package
--------------------------------------------------
Alternatively, you can also install the CoolProp Python package by yourself. If your LibreOffice installation uses the system Python (e.g. on Linux) then you can easily install the CoolProp Python package with pip::
# system wide installation
sudo pip3 install coolprop
# install in user directory
pip3 install coolprop --user
Another options is to download the CoolProp Python package at pypi.org. First check which Python version is used be LibreOffice. On Windows LibreOffice contains a bundled Python interpreter::
# e.g. c:\programs\LibreOffice\program\python-core-3.5.5 --> python 3.5
Download the CoolProp wheel file for that python version from and unzip it to the ``pythonpath`` folder in the extension directory (please see above)::
# choose win32 or amd64 depending on your Python interpreter
# e.g. CoolProp-6.2.1-cp35-cp35m-win_amd64.whl for python 3.5 and 64bit LibreOffice
https://pypi.org/project/CoolProp/#files
| 46.682927 | 264 | 0.76698 |
d7c4c49b8d110b6b0c08acbe145cb7eab39291da | 5,223 | rst | reStructuredText | doc/upgrading-a-package-install.rst | opendata-ee/ckan | 8169b60db1b72bfe942781777902bd0667c56c27 | [
"Apache-2.0"
] | null | null | null | doc/upgrading-a-package-install.rst | opendata-ee/ckan | 8169b60db1b72bfe942781777902bd0667c56c27 | [
"Apache-2.0"
] | null | null | null | doc/upgrading-a-package-install.rst | opendata-ee/ckan | 8169b60db1b72bfe942781777902bd0667c56c27 | [
"Apache-2.0"
] | null | null | null | ===========================
Upgrading a package install
===========================
----------------------------
Upgrading to a patch release
----------------------------
.. note::
*Patch releases* of CKAN are releases that increment the third digit in the
version number. For example, if you're upgrading from CKAN ``2.0`` to CKAN
``2.0.1`` then you're upgrading to a new patch release. Patch releases
should not contain any backwards-incompatible changes.
See :doc:`release-cycle` for more detail about the different types CKAN release.
Patch releases are distributed in the same package as the minor release they
belong to, so for example CKAN ``2.0``, ``2.0.1``, ``2.0.2``, etc. will all be
installed using the CKAN ``2.0`` package (``python-ckan_2.0_amd64.deb``):
#. Download the CKAN package::
wget http://packaging.ckan.org/python-ckan_2.0_amd64.deb
You can check the actual CKAN version from a package running the following
command::
dpkg --info python-ckan_2.0_amd64.deb
Look for the ``Version`` field in the output::
...
Package: python-ckan
Version: 2.0.1-3
...
#. Install the package with the following command::
sudo dpkg -i python-ckan_2.0_amd64.deb
This will **not** replace or modify any configuration files that you already
have on the server, including the CKAN config file or any |apache| or
|nginx| configuration files.
Your CKAN instance should be upgraded straight away.
.. note::
When upgrading from 2.0 to 2.0.1 you may see some vdm related warnings when
installing the package::
dpkg: warning: unable to delete old directory '/usr/lib/ckan/default/src/vdm': Directory not empty
These are due to vdm not longer being installed from source. You can ignore
them and delete the folder manually if you want.
-------------------------------------------
Upgrading a 1.X Package Install to CKAN 2.0
-------------------------------------------
.. note::
If you want to upgrade to a 1.X version of CKAN rather than to CKAN 2.0, see
the `documentation
<http://docs.ckan.org/en/ckan-1.8/install-from-package.html#upgrading-a-package-install>`_
relevant to the old CKAN packaging system.
The CKAN 2.0 package requires Ubuntu 12.04 64-bit, whereas previous CKAN
packages used Ubuntu 10.04. CKAN 2.0 also introduces many
backwards-incompatible feature changes (see :ref:`the changelog <changelog>`).
So it's not possible to automatically upgrade to a CKAN 2.0 package install.
However, you can install CKAN 2.0 (either on the same server that contained
your CKAN 1.x site, or on a different machine) and then manually migrate your
database and any custom configuration, extensions or templates to your new CKAN
2.0 site. We will outline the main steps for migrating below.
#. Create a dump of your CKAN 1.x database::
sudo -u ckanstd /var/lib/ckan/std/pyenv/bin/paster --plugin=ckan db dump db-1.x.dump --config=/etc/ckan/std/std.ini
#. If you want to install CKAN 2.0 on the same server that your CKAN 1.x site
was on, uninstall the CKAN 1.x package first::
sudo apt-get autoremove ckan
#. Install CKAN 2.0, either from a :doc:`package install <install-from-package>`
if you have Ubuntu 12.04 64-bit, or from a
:doc:`source install <install-from-source>` otherwise.
#. Load your database dump from CKAN 1.x into CKAN 2.0. This will migrate all
of your datasets, resources, groups, tags, user accounts, and other data to
CKAN 2.0. Your database schema will be automatically upgraded, and your
search index rebuilt.
First, activate your CKAN virtual environment and change to the ckan dir:
.. parsed-literal::
|activate|
cd |virtualenv|/src/ckan
Now, load your database. **This will delete any data already present in your
new CKAN 2.0 database**. If you've installed CKAN 2.0 on a different
machine from 1.x, first copy the database dump file to that machine.
Then run these commands:
.. parsed-literal::
paster db clean -c |production.ini|
paster db load -c |production.ini| db-1.x.dump
#. If you had any custom config settings in your CKAN 1.x instance that you
want to copy across to your CKAN 2.0 instance, then update your CKAN 2.0
|production.ini| file with these config settings. Note that not all CKAN 1.x
config settings are still supported in CKAN 2.0, see :doc:`configuration`
for details.
In particular, CKAN 2.0 introduces an entirely new authorization system
and any custom authorization settings you had in CKAN 1.x will have to be
reconsidered for CKAN 2.0. See :doc:`authorization` for details.
#. If you had any extensions installed in your CKAN 1.x instance that you also
want to use with your CKAN 2.0 instance, install those extensions in CKAN
2.0. Not all CKAN 1.x extensions are compatible with CKAN 2.0. Check each
extension's documentation for CKAN 2.0 compatibility and install
instructions.
#. If you had any custom templates in your CKAN 1.x instance, these will need
to be adapted before they can be used with CKAN 2.0. CKAN 2.0 introduces
an entirely new template system based on Jinja2 rather than on Genshi.
See :doc:`theming` for details.
| 38.404412 | 119 | 0.704002 |
c5bd01e88ddb23d86e83af6c46f82941bfc15a76 | 218 | rst | reStructuredText | docs/source/installation.rst | djm/python-scrapyd-api | 42f287cf83c3a5bd46795f4f85cce02a56829921 | [
"BSD-2-Clause"
] | 233 | 2015-01-22T13:24:13.000Z | 2022-03-31T11:46:35.000Z | docs/source/installation.rst | hokedo/python-scrapyd-api | 7a1226d89b55f7268808e08659c43bf60e24f864 | [
"BSD-2-Clause"
] | 17 | 2015-01-14T09:56:07.000Z | 2021-09-09T21:12:05.000Z | docs/source/installation.rst | hokedo/python-scrapyd-api | 7a1226d89b55f7268808e08659c43bf60e24f864 | [
"BSD-2-Clause"
] | 50 | 2015-01-15T17:38:02.000Z | 2021-08-10T10:05:21.000Z | ============
Installation
============
The package is available via the Python Package Index and can be installed in
the usual ways::
$ easy_install python-scrapyd-api
or::
$ pip install python-scrapyd-api
| 16.769231 | 77 | 0.66055 |
51dbbe904a25738998e6ea45cbefd11f63ac9c87 | 6,491 | rst | reStructuredText | docs/guides/authoring/transforms.rst | mjtitchener-fn/OpenColorIO | 00b5362442b9fe954c4b1161fe0cec621fcf1915 | [
"BSD-3-Clause"
] | 628 | 2018-08-11T02:18:36.000Z | 2022-03-31T15:05:23.000Z | docs/guides/authoring/transforms.rst | mjtitchener-fn/OpenColorIO | 00b5362442b9fe954c4b1161fe0cec621fcf1915 | [
"BSD-3-Clause"
] | 655 | 2019-04-16T15:15:31.000Z | 2022-03-31T18:05:52.000Z | docs/guides/authoring/transforms.rst | mjtitchener-fn/OpenColorIO | 00b5362442b9fe954c4b1161fe0cec621fcf1915 | [
"BSD-3-Clause"
] | 181 | 2018-12-22T15:39:52.000Z | 2022-03-22T09:52:27.000Z | ..
SPDX-License-Identifier: CC-BY-4.0
Copyright Contributors to the OpenColorIO Project.
.. _transforms:
.. _config-transforms:
Available transforms
********************
``AllocationTransform``
^^^^^^^^^^^^^^^^^^^^^^^
Transforms from reference space to the range specified by the
``vars:``
Keys:
* ``allocation``
* ``vars``
* ``direction``
``BuiltInTransform``
^^^^^^^^^^^^^^^^^^^^
Builds one of a known set of transforms, on demand
Keys:
* ``style``
* ``direction``
``CDLTransform``
^^^^^^^^^^^^^^^^
Applies an ASC CDL compliant grade
Keys:
* ``slope``
* ``offset``
* ``power``
* ``sat``
* ``style``
* ``name``
* ``direction``
``ColorSpaceTransform``
^^^^^^^^^^^^^^^^^^^^^^^
Transforms from ``src`` colorspace to ``dst`` colorspace.
Keys:
* ``src``
* ``dst``
* ``data_bypass``
* ``direction``
``DisplayViewTransform``
^^^^^^^^^^^^^^^^^^^^^^^^
Applies a View from one of the displays.
Keys:
* ``src``
* ``display``
* ``view``
* ``looks_bypass``
* ``data_bypass``
* ``direction``
``ExponentTransform``
^^^^^^^^^^^^^^^^^^^^^
Raises pixel values to a given power (often referred to as "gamma")
.. code-block:: yaml
!<ExponentTransform> {value: [1.8, 1.8, 1.8, 1]}
Keys:
* ``value``
* ``style``
* ``name``
* ``direction``
``ExponentWithLinearTransform``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Applies a power but with a linear section near black. May be used to
implement sRGB, CIE L*, and the Rec.709 camera OETF (not the display!).
Keys:
* ``gamma``
* ``offset``
* ``style``
* ``name``
* ``direction``
``ExposureContrastTransform``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Applies an exposure, contrast, or gamma adjustment. Uses dynamic properties
for optimal live adjustments (e.g., in viewports).
.. code-block:: yaml
!<ExposureContrastTransform> {style: linear, exposure: -1.5,
contrast: 0.5, gamma: 1.1, pivot: 0.18}
Keys:
* ``exposure``
* ``contrast``
* ``pivot``
* ``gamma``
* ``style``
* ``log_exposure_step``
* ``log_midway_gray``
* ``name``
* ``direction``
``FileTransform``
^^^^^^^^^^^^^^^^^
Applies a lookup table (LUT)
Keys:
* ``src``
* ``cccid``
* ``cdl_style``
* ``interpolation``
* ``direction``
``FixedFunctionTransform``
^^^^^^^^^^^^^^^^^^^^^^^^^^
Applies one of a set of fixed, special purpose, mathematical operators.
Keys:
* ``style``
* ``params``
* ``name``
* ``direction``
``GradingPrimaryTransform``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Applies primary color correction.
Keys:
* ``style``
* ``brightness``
* ``contrast``
* ``pivot``
* ``offset``
* ``exposure``
* ``lift``
* ``gamma``
* ``gain``
* ``saturation``
* ``clamp``
* ``name``
* ``direction``
``GradingRGBCurveTransform``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Applies a spline-based curve.
Keys:
* ``style``
* ``red``
* ``green``
* ``blue``
* ``master``
* ``lintolog_bypass``
* ``name``
* ``direction``
``GradingToneTransform``
^^^^^^^^^^^^^^^^^^^^^^^^
Applies an adjustment to various tonal ranges.
Keys:
* ``style``
* ``blacks``
* ``shadows``
* ``midtones``
* ``highlights``
* ``whites``
* ``s_contrast``
* ``name``
* ``direction``
``GroupTransform``
^^^^^^^^^^^^^^^^^^
Combines multiple transforms into one.
.. code-block:: yaml
colorspaces:
- !<ColorSpace>
name: adx10
[...]
to_reference: !<GroupTransform>
children:
- !<FileTransform> {src: adx_adx10_to_cdd.spimtx}
- !<FileTransform> {src: adx_cdd_to_cid.spimtx}
A group transform is accepted anywhere a "regular" transform is.
Keys:
* ``children``
* ``name``
* ``direction``
``LogAffineTransform``
^^^^^^^^^^^^^^^^^^^^^^
Applies a logarithm as well as a scale and offset on both the linear and
log sides. May be used to implement Cineon or Pivoted (Josh Pines) style
lin-to-log transforms.
Keys:
* ``base``
* ``lin_side_offset``
* ``lin_side_slope``
* ``log_side_offset``
* ``log_side_slope``
* ``name``
* ``direction``
``LogCameraTransform``
^^^^^^^^^^^^^^^^^^^^^^
Similar to LogAffineTransform but also allows a linear section near black.
May be used to implement the ACEScct non-linearity as well as many camera
vendor lin-to-log transforms.
Keys:
* ``base``
* ``lin_side_offset``
* ``lin_side_slope``
* ``log_side_offset``
* ``log_side_slope``
* ``lin_side_break``
* ``linear_slope``
* ``name``
* ``direction``
``LogTransform``
^^^^^^^^^^^^^^^^
Applies a mathematical logarithm with a given base to the pixel values.
Keys:
* ``base``
* ``name``
* ``direction``
``LookTransform``
^^^^^^^^^^^^^^^^^
Applies a named look
Keys:
* ``src``
* ``dst``
* ``looks``
* ``direction``
``MatrixTransform``
^^^^^^^^^^^^^^^^^^^
Applies a matrix transform to the pixel values
Keys:
* ``matrix``
* ``offset``
* ``name``
* ``direction``
``RangeTransform``
^^^^^^^^^^^^^^^^^^
Applies an affine transform (scale & offset) and clamps values to min/max bounds.
Keys:
* ``min_in_value``
* ``max_in_value``
* ``min_out_value``
* ``max_out_value``
* ``style``
* ``name``
* ``direction``
.. note::
If a min_in_value is present, then min_out_value must also be present and the result
is clamped at the low end. Similarly, if max_in_value is present, then max_out_value
must also be present and the result is clamped at the high end.
Named Transforms
****************
Sometimes it is helpful to include one or more transforms in a config that are essentially
stand-alone transforms that do not have a fixed relationship to a reference space or a
process space. An example would be a "utility curve" transform where the intent is to
simply apply a LUT1D without any conversion to a reference space. In these cases, a
``named_transforms`` section may be added to the config with one or more named transforms.
Note that named transforms do not show up in color space menus by default, so the
application developer must implement support to make them available to users.
This feature may be used to emulate older methods of color management that ignored the
RGB primaries and simply applied one-dimensional transformations. However, config authors
are encouraged to implement transforms as normal OCIO color spaces wherever possible.
Named transforms support the keys:
* ``name``
* ``aliases``
* ``description``
* ``family``
* ``categories``
* ``encoding``
* ``transform``
* ``inverse_transform``
.. code-block:: yaml
named_transforms:
- !<NamedTransform>
name: Utility Curve -- Cineon Log to Lin
transform: !<FileTransform> {src: logtolin_curve.spi1d}
| 17.036745 | 91 | 0.617008 |
a3b4558195bb153bb3c4e2af9c7aa2bc87e10ff4 | 1,626 | rst | reStructuredText | README.rst | SumiTomohiko/fawm | 3375ed9b1f30e602b88292ae144a1e1947f97f1c | [
"MIT"
] | 1 | 2018-07-18T21:55:40.000Z | 2018-07-18T21:55:40.000Z | README.rst | SumiTomohiko/fawm | 3375ed9b1f30e602b88292ae144a1e1947f97f1c | [
"MIT"
] | null | null | null | README.rst | SumiTomohiko/fawm | 3375ed9b1f30e602b88292ae144a1e1947f97f1c | [
"MIT"
] | null | null | null |
fawm
****
fawm is similar to a fawn. Both of them are small and light. But there is single
difference. A fawn is a baby deer, but fawm is an window manager.
Screenshots
===========
.. image:: http://neko-daisuki.ddo.jp/~SumiTomohiko/fawm-thumbnail.png
Features
========
* Popup menu
* Taskbar
* MIT Lisence
* (fawm is not a tiling window manager)
Requirements
============
* FreeBSD 10.3/amd64
Install
=======
fawm needs Python 3.x to compile. You will get ``fawm/fawm`` and
``__fawm_config__/__fawm_config__`` with the following command::
$ ./configure --prefix=${HOME}/.local && make
How to Use
==========
.xinitrc
--------
Write in your ``~/.xinitrc``::
exec fawm
Popup Menu
----------
Clicking the root window show you the popup menu. The popup menu appears by
clicking the most left box of the taskbar.
You can define items of this menu in ``~/.fawm.conf`` (below).
Wallpaper
---------
fawm cannot set a wallpaper. Please use ``xloadimage -onroot``.
``~/.fawm.conf``
================
fawm reads ``~/.fawm.conf`` at starting to define items of the popup menu.
Syntax of this file likes::
# A line starting with "#" is a comment.
menu
exec "Firefox" "firefox"
exec "mlterm" "mlterm"
:
exec <caption> <command>
:
reload # reloads the configuration file.
exit
end
Known Bugs
==========
* Close/maximize/minimize buttons have no image. They are only three dark boxes.
* Maximize button does not work.
Author
======
The author is `Tomohiko Sumi <http://neko-daisuki.ddo.jp/~SumiTomohiko/>`_.
.. vim: tabstop=2 shiftwidth=2 expandtab softtabstop=2 filetype=rst
| 18.906977 | 80 | 0.657442 |
846b9a7ee3d4b38baaeb34b53ca75f3c4a862c1e | 48 | rst | reStructuredText | docs/source/api/normalizer.rst | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | null | null | null | docs/source/api/normalizer.rst | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | 3 | 2020-12-09T09:29:29.000Z | 2022-02-04T16:49:49.000Z | docs/source/api/normalizer.rst | adriaat/quantnn | 5248c240b931fa113120e3564605638095e5278f | [
"MIT"
] | 5 | 2020-12-11T03:18:32.000Z | 2022-02-14T10:32:09.000Z | .. automodule:: quantnn.normalizer
:members:
| 16 | 34 | 0.708333 |
c7651bf2c675dce5b8f4d7169e31b4d5b0abf67a | 1,963 | rst | reStructuredText | docs/locale/en/source/ipfs/ipfs-api.rst | Asvin-io/Documentation | 31e913c4f6673fc57103615d9b0f0b0bf3d19138 | [
"Apache-2.0"
] | 1 | 2020-09-15T08:08:53.000Z | 2020-09-15T08:08:53.000Z | docs/locale/en/source/ipfs/ipfs-api.rst | Asvin-io/Documentation | 31e913c4f6673fc57103615d9b0f0b0bf3d19138 | [
"Apache-2.0"
] | null | null | null | docs/locale/en/source/ipfs/ipfs-api.rst | Asvin-io/Documentation | 31e913c4f6673fc57103615d9b0f0b0bf3d19138 | [
"Apache-2.0"
] | 2 | 2020-09-15T08:08:36.000Z | 2020-09-24T09:51:45.000Z | IPFS APIs
=========
This section shows the Rest API end-points of IPFS.
.. contents:: Table of contents
:local:
:backlinks: none
:depth: 3
Download Firmware
+++++++++++++++++
.. http:get:: /firmware:id
Get a device.
:reqheader Content-Type: application/json
:reqheader x-access-token: JWT-TOKEN
**Example request**:
.. tabs::
.. code-tab:: bash cURL
$ curl -X GET 'https://ipfs-server/firmware/:cid' \
-H 'x-access-token: <JWT-TOKEN>' \
--header 'Content-Type: application/json'
.. code-tab:: js
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://ipfs-server/firmware/:cid',
'headers': {
'x-access-token': '<JWT-TOKEN>',
},
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
.. code-tab:: python
import requests
url = "https://ipfs-server/firmware/:cid"
headers = {
'x-access-token': '<JWT-TOKEN>',
}
response = requests.request("GET", url, headers=headers)
print(response.text)
.. code-tab:: php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://ipfs-server/firmware/:cid');
$request->setRequestMethod('GET');
$body = new http\Message\Body;
$request->setOptions(array());
$request->setHeaders(array(
'x-access-token' => '<JWT-TOKEN>',
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
**Example response**:
.. sourcecode:: byte
:resheader Content-Type: application/json
:statuscode 200: OK
:statuscode 404: Not Found
| 23.094118 | 70 | 0.530311 |
68b1ff7239a2e33229a11c8e2733af090f568bd3 | 1,851 | rst | reStructuredText | doc/source/reference/plugin_documentation/plugins/filters/find_peaks.rst | jacob720/Savu | 7afc9e10ea4944ceb39a83574f3142f025cf81e1 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | doc/source/reference/plugin_documentation/plugins/filters/find_peaks.rst | jacob720/Savu | 7afc9e10ea4944ceb39a83574f3142f025cf81e1 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | doc/source/reference/plugin_documentation/plugins/filters/find_peaks.rst | jacob720/Savu | 7afc9e10ea4944ceb39a83574f3142f025cf81e1 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | Find Peaks
########################################################
Description
--------------------------
This plugin uses peakutils to find peaks in spectra and add them to the metadata.
Parameter definitions
--------------------------
.. code-block:: yaml
in_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to process.
verbose: A list of strings, where each string gives the name of a dataset that was either specified by a loader plugin or created as output to a previous plugin. The length of the list is the number of input datasets requested by the plugin. If there is only one dataset and the list is left empty it will default to that dataset.
default: "[]"
out_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to create.
verbose: A list of strings, where each string is a name to be assigned to a dataset output by the plugin. If there is only one input dataset and one output dataset and the list is left empty, the output will take the name of the input dataset. The length of the list is the number of output datasets created by the plugin.
default: "['Peaks']"
thresh:
visibility: basic
dtype: float
description: Threshold for peak detection
default: "0.03"
min_distance:
visibility: basic
dtype: int
description: Minimum distance for peak detection.
default: "15"
Key
^^^^^^^^^^
.. literalinclude:: /../source/files_and_images/plugin_guides/short_parameter_key.yaml
:language: yaml
| 39.382979 | 348 | 0.58617 |
cf8ab43eae7de8ae19e866cc020d7e3b75537728 | 455 | rst | reStructuredText | docs/docsource/reference/cloudserver/bucket_operations/bucket_website_operations/index.rst | thomasgafner/Zenko | 724a063d6446bd5c8f7889098cf69fec8628877e | [
"Apache-2.0"
] | 1 | 2020-01-11T14:31:45.000Z | 2020-01-11T14:31:45.000Z | docs/docsource/reference/cloudserver/bucket_operations/bucket_website_operations/index.rst | bulkzooi/Zenko | 31f4f550b32854e7c94389c90e9b8701d3afdebf | [
"Apache-2.0"
] | null | null | null | docs/docsource/reference/cloudserver/bucket_operations/bucket_website_operations/index.rst | bulkzooi/Zenko | 31f4f550b32854e7c94389c90e9b8701d3afdebf | [
"Apache-2.0"
] | null | null | null | Bucket Website Operations
=========================
Bucket Website operations enable S3 Buckets to host static websites,
with web pages that include static content and potentially client-side
scripts. To host a static website, configure an S3 bucket for website
hosting and then upload the website content to the bucket.
.. toctree::
:maxdepth: 1
bucket_website_specification
put_bucket_website
get_bucket_website
delete_bucket_website
| 26.764706 | 70 | 0.76044 |
dc2b3b47bf863fd1d4ce68726260799f2b5d63c9 | 166 | rst | reStructuredText | docs/source/helpers/cache/asyncx/asyncsqlitecache/privex.helpers.cache.asyncx.AsyncSqliteCache.AsyncSqliteCache.last_purged_expired.rst | Privex/python-helpers | 1c976ce5b0e2c5241ea0bdf330bd6701b5e31153 | [
"X11"
] | 12 | 2019-06-18T11:17:41.000Z | 2021-09-13T23:00:21.000Z | docs/source/helpers/cache/asyncx/asyncsqlitecache/privex.helpers.cache.asyncx.AsyncSqliteCache.AsyncSqliteCache.last_purged_expired.rst | Privex/python-helpers | 1c976ce5b0e2c5241ea0bdf330bd6701b5e31153 | [
"X11"
] | 1 | 2019-10-13T07:34:44.000Z | 2019-10-13T07:34:44.000Z | docs/source/helpers/cache/asyncx/asyncsqlitecache/privex.helpers.cache.asyncx.AsyncSqliteCache.AsyncSqliteCache.last_purged_expired.rst | Privex/python-helpers | 1c976ce5b0e2c5241ea0bdf330bd6701b5e31153 | [
"X11"
] | 4 | 2019-10-10T10:15:09.000Z | 2021-05-16T01:55:48.000Z | last\_purged\_expired
=====================
.. currentmodule:: privex.helpers.cache.asyncx.AsyncSqliteCache
.. autoattribute:: AsyncSqliteCache.last_purged_expired | 27.666667 | 63 | 0.722892 |
32ea742a37ae483ebb08cf8cd3553c403c429d0b | 840 | rst | reStructuredText | docs/index.rst | instasck/pyminitouch | 2a938e35174ee1ea3de68f0a30fb02840fa794d8 | [
"MIT"
] | 87 | 2018-12-23T05:34:54.000Z | 2022-03-31T12:04:06.000Z | docs/index.rst | lycfr/pyminitouch | cefeab762277626b5a8167454467971a4c376e31 | [
"MIT"
] | 14 | 2019-01-03T02:38:46.000Z | 2022-02-16T08:34:04.000Z | docs/index.rst | lycfr/pyminitouch | cefeab762277626b5a8167454467971a4c376e31 | [
"MIT"
] | 17 | 2018-12-24T05:07:24.000Z | 2022-01-04T07:03:38.000Z | .. pyminitouch documentation master file, created by
sphinx-quickstart on Thu Feb 21 20:25:39 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pyminitouch's documentation!
=======================================
.. toctree::
:maxdepth: 2
:caption: Contents:
CommandBuilder
==============
.. autoclass:: pyminitouch.actions.CommandBuilder
:members:
:show-inheritance:
:undoc-members:
MNTDevice
=========
.. autoclass:: pyminitouch.actions.MNTDevice
:members:
:show-inheritance:
:undoc-members:
MNTConnection
=============
.. autoclass:: pyminitouch.connection.MNTConnection
:members:
:show-inheritance:
:undoc-members:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| 19.534884 | 76 | 0.640476 |
60ad64aa8a19fb7d7f47f14303ff4b98345e5782 | 928 | rst | reStructuredText | pos_multi_session_sync/doc/changelog.rst | ShaheenHossain/itpp-labs_pos-addons | 8c5047af10447eb3d137c84111127fae1a8970b6 | [
"MIT"
] | null | null | null | pos_multi_session_sync/doc/changelog.rst | ShaheenHossain/itpp-labs_pos-addons | 8c5047af10447eb3d137c84111127fae1a8970b6 | [
"MIT"
] | null | null | null | pos_multi_session_sync/doc/changelog.rst | ShaheenHossain/itpp-labs_pos-addons | 8c5047af10447eb3d137c84111127fae1a8970b6 | [
"MIT"
] | 4 | 2020-08-25T01:49:14.000Z | 2021-04-04T10:29:04.000Z | `1.0.7`
-------
- **Fix:** Updated 'update_revision_ID' message
`1.0.6`
-------
- **Fix:** Possible error with multiple multi sessions with the same multi session ID
`1.0.5`
-------
- **Fix:** Cross multi-sesion messaging in case the same pos was assigned to a different multi-session
- **Fix:** Possible loss of orders for multiple multi-sessions working simultaneously when another new one starts
`1.0.4`
-------
- **Fix:** Random sync problems
`1.0.3`
-------
- **Fix:** Complete synchronization raised conflict error in case of slow connection and receiving new updates on waiting finishing synchronization. Fix it by using the same updates queue (longpolling) for complete synchronization as for small updates.
`1.0.2`
-------
- **IMP:** Refactoring the code to fix screen hanging when synchronization
`1.0.1`
-------
- **IMP:** Refactoring the code to fix a slow POS synchronization
`1.0.0`
-------
- Init version
| 27.294118 | 252 | 0.690733 |
de14bf6c6bb29d659d643c0a32a386b1555332fa | 193 | rst | reStructuredText | doc/maintainer/FAQ.rst | pfernique/StatisKit | e22f6dc752c59d46c9052bd1ab89b48a8d7494b5 | [
"Apache-2.0"
] | 6 | 2016-05-20T21:18:00.000Z | 2018-05-13T08:43:58.000Z | doc/maintainer/FAQ.rst | pfernique/StatisKit | e22f6dc752c59d46c9052bd1ab89b48a8d7494b5 | [
"Apache-2.0"
] | 17 | 2016-05-09T14:21:38.000Z | 2018-11-19T09:34:25.000Z | doc/maintainer/FAQ.rst | pfernique/StatisKit | e22f6dc752c59d46c9052bd1ab89b48a8d7494b5 | [
"Apache-2.0"
] | 7 | 2016-04-27T06:31:24.000Z | 2021-03-15T18:15:17.000Z | .. _section-maintainer-faq:
Frequently Asked Questions
==========================
Here we try to give some answers to questions that regularly pop up or that could pop up on the mailing list. | 32.166667 | 109 | 0.683938 |
c7fa1f8503c89a421a71285ba9989192a08a84cc | 9,607 | rst | reStructuredText | docs/AeonDigital/Collection/BasicCollection.rst | AeonDigital/PHP-Core | 986ae9da676e1627a3ea4a3703ec1efe7e6014dd | [
"MIT"
] | null | null | null | docs/AeonDigital/Collection/BasicCollection.rst | AeonDigital/PHP-Core | 986ae9da676e1627a3ea4a3703ec1efe7e6014dd | [
"MIT"
] | null | null | null | docs/AeonDigital/Collection/BasicCollection.rst | AeonDigital/PHP-Core | 986ae9da676e1627a3ea4a3703ec1efe7e6014dd | [
"MIT"
] | null | null | null | .. rst-class:: phpdoctorst
.. role:: php(code)
:language: php
BasicCollection
===============
.. php:namespace:: AeonDigital\Collection
.. php:class:: BasicCollection
.. rst-class:: phpdoc-description
| Implementa a interface ``iBasicCollection``.
| Esta classe traz componentes que permitem implementar quaisquer das interfaces do namespace
| ``AeonDigital\Interfaces\Collection`` no entando APENAS ``iBasicCollection`` está devidamente
| implementada, restando às classes concretas que herdem esta se especializarem em cada uma
| destas capacidades.
|
| A partir desta classe as seguintes interfaces podem ser implementadas imediatamente:
|
| - iProtectedCollection
| - iAppendOnlyCollection
| - iReadOnlyCollection
| - iCaseInsensitiveCollection
|
| Na documentação de cada método ou propriedade desta classe vem especificado de que forma
| a implementação de uma destas interfaces deve alterar o comportamento do mesmo.
:Parent:
:php:class:`AeonDigital\\BObject`
:Implements:
:php:interface:`AeonDigital\\Interfaces\\Collection\\iBasicCollection`
Properties
----------
Methods
-------
.. rst-class:: public
.. php:method:: public isProtected()
.. rst-class:: phpdoc-description
| Indica se a coleção implementa a interface ``iProtectedCollection``.
:Returns: ‹ bool ›|br|
Quando ``true`` indica que a coleção manterá o estado de todos os seus
objetos não permitindo que eles sejam alterados, no entanto os valores uma
vez definidos PODEM ser excluídos.
.. rst-class:: public
.. php:method:: public isAppendOnly()
.. rst-class:: phpdoc-description
| Indica se a coleção implementa a interface ``iAppendOnlyCollection``.
:Returns: ‹ bool ›|br|
Quando ``true`` indica que a coleção pode ser apenas incrementada mas jamais
modificada nem reduzida.
.. rst-class:: public
.. php:method:: public isReadOnly()
.. rst-class:: phpdoc-description
| Indica se a coleção implementa a interface ``iReadOnlyCollection``.
:Returns: ‹ bool ›|br|
Quando ``true`` indica que a coleção não pode ser alterada após ser definida
durante a construção da instância.
.. rst-class:: public
.. php:method:: public isCaseInsensitive()
.. rst-class:: phpdoc-description
| Indica se a coleção implementa a interface ``iCaseInsensitiveCollection``.
:Returns: ‹ bool ›|br|
Quando ``true`` indica que os nomes das chaves de cada entrada de dados será
tratado de forma ``case insensitive``, ou seja, ``KeyName = keyname = KEYNAME``.
.. rst-class:: public
.. php:method:: public isAutoIncrement()
.. rst-class:: phpdoc-description
| Uma instância com a característica ``autoincrement`` deve permitir que seja omitido o nome
| das chaves no método ``set`` pois este deve ser controlado internamente como se fosse um
| ``array`` iniciado em zero.
| Ainda assim o tratamento das chaves sempre se dará como se fossem ``strings`` e não
| numerais inteiros como ocorre em um ``array comum``.
|
| As implementações desta caracteristica devem também controlar os índices quando estes são
| removidos. A regra geral é que TODOS os itens existentes mantenham como chave o índice
| correspondente a sua real posição.
|
| \`\`\` php
| // Neste caso uma coleção com 10 itens que execute 5 vezes a instrução:
| $collection->remove("0");
| // Ficará, ao final com 5 itens cada qual ocupando uma posição entre 0 e 4.
| \`\`\`
:Returns: ‹ bool ›|br|
Retorna ``true`` quando a coleção é do tipo ``autoincrement``.
.. rst-class:: public
.. php:method:: public has( $key)
.. rst-class:: phpdoc-description
| Indica se a chave de nome indicado existe entre os itens da coleção.
:Parameters:
- ‹ string › **$key** |br|
Nome da chave que será identificada.
:Returns: ‹ bool ›|br|
Retorna ``true`` caso a chave indicada existir entre os itens da coleção ou
``false`` se não existir.
.. rst-class:: public
.. php:method:: public set( $key, $value)
.. rst-class:: phpdoc-description
| Insere um novo item chave/valor para a coleção de dados.
| Se já existe um valor com chave de mesmo nome então, o valor antigo será substituído.
:Parameters:
- ‹ string › **$key** |br|
Nome da chave.
Pode ser usado ``''`` caso a instância seja do tipo ``autoincrement``.
- ‹ mixed › **$value** |br|
Valor que será associado a esta chave.
:Returns: ‹ bool ›|br|
Retorna ``true`` quando a insersão/atualização do item foi bem sucedido.
.. rst-class:: public
.. php:method:: public get( $key)
.. rst-class:: phpdoc-description
| Resgata um valor da coleção a partir do nome da chave indicada.
:Parameters:
- ‹ string › **$key** |br|
Nome da chave cujo valor deve ser retornado.
:Returns: ‹ ?mixed ›|br|
Valor armazenado na ``collection`` que correspondente a chave passada.
DEVE retornar ``null`` quando a chave de nome indicado não existir.
.. rst-class:: public
.. php:method:: public remove( $key)
.. rst-class:: phpdoc-description
| Remove da coleção o item com a chave indicada.
:Parameters:
- ‹ string › **$key** |br|
Nome da chave do valor que será excluído.
:Returns: ‹ bool ›|br|
Retornará ``true`` se a chave foi removida, ou, se, ela não existia dentro
da coleção atual e ``false`` caso por algum motivo não seja possível executar
este método.
.. rst-class:: public
.. php:method:: public __construct( $initialValues=[], $autoincrement=false)
.. rst-class:: phpdoc-description
| Inicia uma nova coleção de dados.
:Parameters:
- ‹ ?array › **$initialValues** |br|
Valores com os quais a instância deve iniciar.
- ‹ bool › **$autoincrement** |br|
Quando ``true`` permite que seja omitido o nome da chave dos valores pois eles
serão definidos internamente conforme fosse um ``array`` começando em zero.
:Throws: ‹ \InvalidArgumentException ›|br|
Caso algum dos valores iniciais a serem definidos não seja aceito.
.. rst-class:: public
.. php:method:: public offsetExists( $key)
.. rst-class:: phpdoc-description
| Método que permite a verificação da existência de um valor usando a notação de
| ``array associativo`` em conjunto com as funções ``isset()`` e ``empty()`` do PHP:
| \`\`\` php
| $oCollect = new iBasicCollection();
| ...
| if (isset($oCollect["keyName"])) { ... }
| \`\`\`
:Parameters:
- ‹ string › **$key** |br|
Chave que será verificada.
:Returns: ‹ bool ›|br|
.. rst-class:: public
.. php:method:: public offsetGet( $key)
.. rst-class:: phpdoc-description
| Método que permite resgatar o valor de um item da coleção da instância usando a
| notação de ``array associativo``.
| \`\`\` php
| $oCollect = new iBasicCollection();
| if ($oCollect["keyName"] == $value) { ... }
| \`\`\`
:Parameters:
- ‹ string › **$key** |br|
Nome da chave cujo valor deve ser retornado.
:Returns: ‹ mixed | null ›|br|
.. rst-class:: public
.. php:method:: public offsetSet( $key, $value)
.. rst-class:: phpdoc-description
| Método que permite inserir um novo valor para a coleção de dados da instância usando a
| notação de um ``array associativo``.
| \`\`\` php
| $oCollect = new iBasicCollection();
| $oCollect["keyName"] = $value;
| \`\`\`
:Parameters:
- ‹ string › **$key** |br|
Nome da chave.
- ‹ mixed › **$value** |br|
Valor que será associado.
:Returns: ‹ void ›|br|
.. rst-class:: public
.. php:method:: public offsetUnset( $key)
.. rst-class:: phpdoc-description
| Método que permite remover o valor de um item da coleção da instância usando a notação
| de ``array associativo`` em conjunto com a função ``unset()`` do PHP:
| \`\`\` php
| $oCollect = new iBasicCollection();
| unset($oCollect["keyName"]);
| \`\`\`
:Parameters:
- ‹ string › **$key** |br|
Nome da chave cujo valor deve ser retornado.
:Returns: ‹ mixed | null ›|br|
.. rst-class:: public
.. php:method:: public count()
.. rst-class:: phpdoc-description
| Método que permite a verificação da quantidade de itens na coleção atual usando a função
| ``count()`` do PHP.
| \`\`\` php
| $oCollect = new iBasicCollection();
| ...
| if (count($oCollect) > 1) { ... }
| \`\`\`
:Returns: ‹ int ›|br|
.. rst-class:: public
.. php:method:: public getIterator()
.. rst-class:: phpdoc-description
| Método que permite a iteração sobre os valores armazenados na coleção de dados da instância
| usando ``foreach()`` do PHP.
| \`\`\` php
| $oCollect = new iBasicCollection();
| ...
| foreach($oCollect as $key => $value) { ... }
| \`\`\`
:Returns: ‹ \\Traversable ›|br|
.. rst-class:: public
.. php:method:: public __set( $name, $value)
.. rst-class:: phpdoc-description
| Desabilita a função mágica ``__set`` para assegurar a que apenas alterações dentro das
| regras definidas para a classe sejam possíveis.
| 21.983982 | 97 | 0.622151 |
e97651bfb81392b532bb6873ecc7ad083004945f | 100,344 | rst | reStructuredText | venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ntp_global_module.rst | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ntp_global_module.rst | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ntp_global_module.rst | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | .. _cisco.iosxr.iosxr_ntp_global_module:
****************************
cisco.iosxr.iosxr_ntp_global
****************************
**Manages ntp resource module**
Version added: 2.5.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module configures and manages the attributes of ntp on Cisco IOSXR platforms.
Parameters
----------
.. raw:: html
<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="5">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
<td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>config</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>A dictionary of ntp options</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>access_group</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Control NTP access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ipv4</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure IPv4 access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>peer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide full access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>query_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Allow only control queries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide server and query access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide only server access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ipv6</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure IPv6 access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>peer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide full access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>query_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Allow only control queries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide server and query access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide only server access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>vrfs</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Specify non-default VRF.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ipv4</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure IPv4 access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>peer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide full access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>query_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Allow only control queries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide server and query access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide only server access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ipv6</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure IPv6 access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>peer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide full access</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>query_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Allow only control queries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide server and query access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>serve_only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Provide only server access.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>name</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Specify non-default VRF.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>authenticate</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Authenticate time sources</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>authentication_keys</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Authentication key for trusted time sources</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>encryption</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Type of key encrypted or clear-text.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div><1-65535> Key number</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>key</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Authentication key.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>broadcastdelay</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Estimated round-trip delay in microseconds.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>drift</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Drift(cisco-support)</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>aging_time</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Aging time in hours.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>file</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>File for drift values.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>interfaces</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure NTP on an interface.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>broadcast_client</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Listen to NTP broadcasts</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>broadcast_destination</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure broadcast destination address.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>broadcast_key</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Broadcast key number.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>broadcast_version</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div><2-4> NTP version number.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>multicast_client</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure multicast client</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>multicast_destination</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure multicast destination</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>multicast_key</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure multicast authentication key.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>multicast_ttl</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure TTL to use.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>multicast_version</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div><2-4> NTP version number.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>name</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Name of the interface.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Name of the vrf.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ipv4</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Mark the dscp/precedence bit for ipv4 packets.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dscp</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>precedence</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>critical</li>
<li>flash</li>
<li>flash-override</li>
<li>immediate</li>
<li>internet</li>
<li>network</li>
<li>priority</li>
<li>routine</li>
</ul>
</td>
<td>
<div>Set precedence Please refer vendor document for valid entries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>ipv6</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Mark the dscp/precedence bit for ipv4 packets.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dscp</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>precedence</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>critical</li>
<li>flash</li>
<li>flash-override</li>
<li>immediate</li>
<li>internet</li>
<li>network</li>
<li>priority</li>
<li>routine</li>
</ul>
</td>
<td>
<div>Set precedence Please refer vendor document for valid entries.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>log_internal_sync</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Logs internal synchronization changes.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>master</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Act as NTP master clock</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>stratum</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Use NTP as clock source with stratum number <1-15></div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>max_associations</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div><0-4294967295> Number of associations.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>passive</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Enable the passive associations.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>peers</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure NTP peer.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>burst</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Use burst mode.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>iburst</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Use initial burst mode.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>key_id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>SConfigure peer authentication key</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>maxpoll</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>configure Maximum poll interval.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>minpoll</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>configure Minimum poll interval.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>peer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
/ <span style="color: red">required</span>
</div>
</td>
<td>
</td>
<td>
<div>Hostname or A.B.C.D or A:B:C:D:E:F:G:H.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>prefer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Prefer this peer when possible</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>source</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Interface for source address.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>version</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>NTP version.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>vrf name.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>servers</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure NTP server.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>burst</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Use burst mode.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>iburst</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Use initial burst mode.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>key_id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>SConfigure peer authentication key</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>maxpoll</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>configure Maximum poll interval.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>minpoll</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>configure Minimum poll interval.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>prefer</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Prefer this peer when possible</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>server</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
/ <span style="color: red">required</span>
</div>
</td>
<td>
</td>
<td>
<div>Hostname or A.B.C.D or A:B:C:D:E:F:G:H.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>source</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Interface for source address.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>version</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>NTP version.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>vrf name.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>source_interface</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure default interface.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>source_vrfs</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>Configure default interface.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>name</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Name of source interface.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>vrf name.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>trusted_keys</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
/ <span style="color: purple">elements=dictionary</span>
</div>
</td>
<td>
</td>
<td>
<div>list of Key numbers for trusted time sources.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td class="elbow-placeholder"></td>
<td colspan="3">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>key_id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>Key numbers for trusted time sources.</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="4">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>update_calendar</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>no</li>
<li>yes</li>
</ul>
</td>
<td>
<div>Periodically update calendar with NTP time.</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>running_config</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>This option is used only with state <em>parsed</em>.</div>
<div>The value of this option should be the output received from the IOSXR device by executing the command <b>show running-config ntp</b>.</div>
<div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>state</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li>deleted</li>
<li><div style="color: blue"><b>merged</b> ←</div></li>
<li>overridden</li>
<li>replaced</li>
<li>gathered</li>
<li>rendered</li>
<li>parsed</li>
</ul>
</td>
<td>
<div>The state the configuration should be left in.</div>
</td>
</tr>
</table>
<br/>
Notes
-----
.. note::
- Tested against IOSXR 7.0.2.
- This module works with connection ``network_cli``.
Examples
--------
.. code-block:: yaml
# Using state: merged
# Before state:
# -------------
# RP/0/0/CPU0:10#show running-config ntp
# --------------------- EMPTY -----------------
# Merged play:
# ------------
- name: Merge the provided configuration with the existing running configuration
cisco.iosxr.iosxr_ntp_global:
config:
access_group:
ipv4:
peer: PeerAcl1
query_only: QueryOnlyAcl1
serve: ServeAcl1
serve_only: ServeOnlyAcl1
vrfs:
- ipv4:
peer: PeerAcl3
serve: ServeAcl2
name: siteA
authenticate: true
broadcastdelay: 1
drift:
aging_time: 0
file: apphost
interfaces:
- name: GigabitEthernet0/0/0/0
multicast_client: 224.0.0.8
multicast_destination: 224.0.0.8
broadcast_client: true
ipv4:
dscp: af11
ipv6:
precedence: routine
log_internal_sync: true
master: 1
max_associations: 10
passive: true
peers:
- iburst: true
peer: 192.0.2.1
vrf: siteC
servers:
- burst: true
server: 192.0.2.2
vrf: siteD
source: GigabitEthernet0/0/0/0
source_vrfs:
- name: GigabitEthernet0/0/0/0
vrf: siteE
trusted_keys:
- key_id: 1
update_calendar: true
# Commands Fired:
# ------------
# "commands": [
# "ntp peer vrf siteC 192.0.2.1 iburst ",
# "ntp server vrf siteD 192.0.2.2 burst ",
# "ntp trusted-key 1",
# "ntp interface GigabitEthernet0/0/0/0 broadcast client",
# "ntp interface GigabitEthernet0/0/0/0 multicast destination 224.0.0.8",
# "ntp interface GigabitEthernet0/0/0/0 multicast client 224.0.0.8",
# "ntp vrf siteE source GigabitEthernet0/0/0/0",
# "ntp access-group vrf siteA ipv4 serve ServeAcl2",
# "ntp access-group vrf siteA ipv4 peer PeerAcl3",
# "ntp access-group ipv4 peer PeerAcl1",
# "ntp access-group ipv4 serve ServeAcl1",
# "ntp access-group ipv4 serve-only ServeOnlyAcl1",
# "ntp access-group ipv4 query-only QueryOnlyAcl1",
# "ntp authenticate",
# "ntp log-internal-sync",
# "ntp broadcastdelay 1",
# "ntp drift aging time 0",
# "ntp drift file apphost",
# "ntp ipv4 dscp af11",
# "ntp ipv6 precedence routine",
# "ntp max-associations 10",
# "ntp master 1",
# "ntp passive",
# "ntp update-calendar",
# "ntp source GigabitEthernet0/0/0/0"
# ],
# After state:
# ------------
# RP/0/0/CPU0:10#show running-config ntp
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/0
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authenticate
# trusted-key 1
# ipv4 dscp af11
# ipv6 precedence routine
# peer vrf siteC 192.0.2.1 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl1
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/0
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Using state: deleted
# Before state:
# -------------
# RP/0/0/CPU0:10#show running-config ntp
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/0
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authenticate
# trusted-key 1
# ipv4 dscp af11
# ipv6 precedence routine
# peer vrf siteC 192.0.2.1 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl1
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/0
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Deleted play:
# -------------
- name: Remove all existing configuration
cisco.iosxr.iosxr_ntp_global:
state: deleted
# Commands Fired:
# ---------------
# "commands": [
# "no ntp peer vrf siteC 192.0.2.1 iburst ",
# "no ntp server vrf siteD 192.0.2.2 burst ",
# "no ntp trusted-key 1",
# "no ntp interface GigabitEthernet0/0/0/0",
# "no ntp vrf siteE source GigabitEthernet0/0/0/0",
# "no ntp access-group vrf siteA ipv4 serve ServeAcl2",
# "no ntp access-group vrf siteA ipv4 peer PeerAcl3",
# "no ntp access-group ipv4 peer PeerAcl1",
# "no ntp access-group ipv4 serve ServeAcl1",
# "no ntp access-group ipv4 serve-only ServeOnlyAcl1",
# "no ntp access-group ipv4 query-only QueryOnlyAcl1",
# "no ntp authenticate",
# "no ntp log-internal-sync",
# "no ntp broadcastdelay 1",
# "no ntp drift aging time 0",
# "no ntp drift file apphost",
# "no ntp ipv4 dscp af11",
# "no ntp ipv6 precedence routine",
# "no ntp max-associations 10",
# "no ntp master 1",
# "no ntp passive",
# "no ntp update-calendar",
# "no ntp source GigabitEthernet0/0/0/0"
# ],
# After state:
# ------------
# RP/0/0/CPU0:10#show running-config ntp
# --------------------- EMPTY -----------------
# Using state: overridden
# Before state:
# -------------
# RP/0/0/CPU0:10#show running-config ntp
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/0
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authenticate
# trusted-key 1
# ipv4 dscp af11
# ipv6 precedence routine
# peer vrf siteC 192.0.2.1 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl1
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/0
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Overridden play:
# ----------------
- name: Override BGP configuration with provided configuration
cisco.iosxr.iosxr_ntp_global:
state: overridden
config:
access_group:
ipv4:
peer: PeerAcl1
query_only: QueryOnlyAcl1
serve: ServeAcl4
serve_only: ServeOnlyAcl1
vrfs:
- ipv4:
peer: PeerAcl3
serve: ServeAcl2
name: siteA
authenticate: true
broadcastdelay: 1
drift:
aging_time: 0
file: apphost
interfaces:
- name: GigabitEthernet0/0/0/1
multicast_client: 224.0.0.8
multicast_destination: 224.0.0.8
broadcast_client: true
ipv4:
dscp: af12
ipv6:
precedence: routine
log_internal_sync: true
master: 1
max_associations: 10
passive: true
peers:
- iburst: true
peer: 192.0.2.3
vrf: siteC
servers:
- burst: true
server: 192.0.2.2
vrf: siteD
source: GigabitEthernet0/0/0/1
source_vrfs:
- name: GigabitEthernet0/0/0/0
vrf: siteE
trusted_keys:
- key_id: 1
update_calendar: true
# Commands Fired:
# ---------------
# "commands": [
# "no ntp peer vrf siteC 192.0.2.1 iburst ",
# "no ntp interface GigabitEthernet0/0/0/0",
# "ntp peer vrf siteC 192.0.2.3 iburst ",
# "ntp interface GigabitEthernet0/0/0/1 broadcast client",
# "ntp interface GigabitEthernet0/0/0/1 multicast destination 224.0.0.8",
# "ntp interface GigabitEthernet0/0/0/1 multicast client 224.0.0.8",
# "ntp access-group ipv4 serve ServeAcl4",
# "ntp ipv4 dscp af12",
# "ntp source GigabitEthernet0/0/0/1"
# ],
# After state:
# ------------
# RP/0/RP0/CPU0:ios#show running-config ntp
# Mon Sep 13 10:38:22.690 UTC
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/1
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authentication-key 1 md5 encrypted testkey
# authenticate
# trusted-key 1
# ipv4 dscp af12
# ipv6 precedence routine
# peer vrf siteC 192.0.2.3 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl4
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/1
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
#
# Using state: replaced
# Before state:
# -------------
# RP/0/0/CPU0:10#show running-config ntp
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/0
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authenticate
# trusted-key 1
# ipv4 dscp af11
# ipv6 precedence routine
# peer vrf siteC 192.0.2.1 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl1
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/0
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Replaced play:
# ----------------
- name: Replaced BGP configuration with provided configuration
cisco.iosxr.iosxr_ntp_global:
state: replaced
config:
access_group:
ipv4:
peer: PeerAcl1
query_only: QueryOnlyAcl1
serve: ServeAcl4
serve_only: ServeOnlyAcl1
vrfs:
- ipv4:
peer: PeerAcl3
serve: ServeAcl2
name: siteA
authenticate: true
broadcastdelay: 1
drift:
aging_time: 0
file: apphost
interfaces:
- name: GigabitEthernet0/0/0/1
multicast_client: 224.0.0.8
multicast_destination: 224.0.0.8
broadcast_client: true
ipv4:
dscp: af12
ipv6:
precedence: routine
log_internal_sync: true
master: 1
max_associations: 10
passive: true
peers:
- iburst: true
peer: 192.0.2.3
vrf: siteC
servers:
- burst: true
server: 192.0.2.2
vrf: siteD
source: GigabitEthernet0/0/0/1
source_vrfs:
- name: GigabitEthernet0/0/0/0
vrf: siteE
trusted_keys:
- key_id: 1
update_calendar: true
# Commands Fired:
# ---------------
# "commands": [
# "no ntp peer vrf siteC 192.0.2.1 iburst ",
# "no ntp interface GigabitEthernet0/0/0/0",
# "ntp peer vrf siteC 192.0.2.3 iburst ",
# "ntp interface GigabitEthernet0/0/0/1 broadcast client",
# "ntp interface GigabitEthernet0/0/0/1 multicast destination 224.0.0.8",
# "ntp interface GigabitEthernet0/0/0/1 multicast client 224.0.0.8",
# "ntp access-group ipv4 serve ServeAcl4",
# "ntp ipv4 dscp af12",
# "ntp source GigabitEthernet0/0/0/1"
# ],
# After state:
# ------------
# RP/0/RP0/CPU0:ios#show running-config ntp
# Mon Sep 13 10:38:22.690 UTC
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/1
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authentication-key 1 md5 encrypted testkey
# authenticate
# trusted-key 1
# ipv4 dscp af12
# ipv6 precedence routine
# peer vrf siteC 192.0.2.3 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl4
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/1
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Using state: gathered
# Before state:
# -------------
# RP/0/0/CPU0:10#show running-config ntp
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/0
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authenticate
# trusted-key 1
# ipv4 dscp af11
# ipv6 precedence routine
# peer vrf siteC 192.0.2.1 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl1
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/0
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Gathered play:
# --------------
- name: Gather listed ntp config
cisco.iosxr.iosxr_ntp_global:
state: gathered
# Module Execution Result:
# ------------------------
# "gathered":{
# "access_group": {
# "ipv4": {
# "peer": "PeerAcl1",
# "query_only": "QueryOnlyAcl1",
# "serve": "ServeAcl1",
# "serve_only": "ServeOnlyAcl1"
# },
# "vrfs": [
# {
# "ipv4": {
# "peer": "PeerAcl3",
# "serve": "ServeAcl2"
# },
# "name": "siteA"
# }
# ]
# },
# "authenticate": true,
# "broadcastdelay": 1,
# "drift": {
# "aging_time": 0,
# "file": "apphost"
# },
# "interfaces": [
# {
# "broadcast_client": true,
# "multicast_client": "224.0.0.8",
# "multicast_destination": "224.0.0.8",
# "name": "GigabitEthernet0/0/0/0"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "ipv6": {
# "precedence": "routine"
# },
# "log_internal_sync": true,
# "master": 1,
# "max_associations": 10,
# "passive": true,
# "peers": [
# {
# "iburst": true,
# "peer": "192.0.2.1",
# "vrf": "siteC"
# }
# ],
# "servers": [
# {
# "burst": true,
# "server": "192.0.2.2",
# "vrf": "siteD"
# }
# ],
# "source": "GigabitEthernet0/0/0/0",
# "source_vrfs": [
# {
# "name": "GigabitEthernet0/0/0/0",
# "vrf": "siteE"
# }
# ],
# "trusted_keys": [
# {
# "key_id": 1
# }
# ],
# "update_calendar": true
# }
# Using state: rendered
# Rendered play:
# --------------
- name: Render platform specific configuration lines with state rendered (without connecting to the device)
cisco.iosxr.iosxr_ntp_global:
state: rendered
config:
access_group:
ipv4:
peer: PeerAcl1
query_only: QueryOnlyAcl1
serve: ServeAcl1
serve_only: ServeOnlyAcl1
vrfs:
- ipv4:
peer: PeerAcl3
serve: ServeAcl2
name: siteA
authenticate: true
broadcastdelay: 1
drift:
aging_time: 0
file: apphost
interfaces:
- name: GigabitEthernet0/0/0/0
multicast_client: 224.0.0.8
multicast_destination: 224.0.0.8
broadcast_client: true
ipv4:
dscp: af11
ipv6:
precedence: routine
log_internal_sync: true
master: 1
max_associations: 10
passive: true
peers:
- iburst: true
peer: 192.0.2.1
vrf: siteC
servers:
- burst: true
server: 192.0.2.2
vrf: siteD
source: GigabitEthernet0/0/0/0
source_vrfs:
- name: GigabitEthernet0/0/0/0
vrf: siteE
trusted_keys:
- key_id: 1
update_calendar: true
register: result
# Module Execution Result:
# ------------------------
# "rendered": [
# "ntp peer vrf siteC 192.0.2.1 iburst ",
# "ntp server vrf siteD 192.0.2.2 burst ",
# "ntp trusted-key 1",
# "ntp interface GigabitEthernet0/0/0/0 broadcast client",
# "ntp interface GigabitEthernet0/0/0/0 multicast destination 224.0.0.8",
# "ntp interface GigabitEthernet0/0/0/0 multicast client 224.0.0.8",
# "ntp vrf siteE source GigabitEthernet0/0/0/0",
# "ntp access-group vrf siteA ipv4 serve ServeAcl2",
# "ntp access-group vrf siteA ipv4 peer PeerAcl3",
# "ntp access-group ipv4 peer PeerAcl1",
# "ntp access-group ipv4 serve ServeAcl1",
# "ntp access-group ipv4 serve-only ServeOnlyAcl1",
# "ntp access-group ipv4 query-only QueryOnlyAcl1",
# "ntp authenticate",
# "ntp log-internal-sync",
# "ntp broadcastdelay 1",
# "ntp drift aging time 0",
# "ntp drift file apphost",
# "ntp ipv4 dscp af11",
# "ntp ipv6 precedence routine",
# "ntp max-associations 10",
# "ntp master 1",
# "ntp passive",
# "ntp update-calendar",
# "ntp source GigabitEthernet0/0/0/0"
# ],
# Using state: parsed
# File: parsed.cfg
# ----------------
# ntp
# max-associations 10
# interface GigabitEthernet0/0/0/0
# broadcast client
# multicast client 224.0.0.8
# multicast destination 224.0.0.8
# !
# authenticate
# trusted-key 1
# ipv4 dscp af11
# ipv6 precedence routine
# peer vrf siteC 192.0.2.1 iburst
# server vrf siteD 192.0.2.2 burst
# drift file apphost
# drift aging time 0
# master 1
# access-group vrf siteA ipv4 peer PeerAcl3
# access-group vrf siteA ipv4 serve ServeAcl2
# access-group ipv4 peer PeerAcl1
# access-group ipv4 serve ServeAcl1
# access-group ipv4 serve-only ServeOnlyAcl1
# access-group ipv4 query-only QueryOnlyAcl1
# source vrf siteE GigabitEthernet0/0/0/0
# source GigabitEthernet0/0/0/0
# passive
# broadcastdelay 1
# update-calendar
# log-internal-sync
# !
# Parsed play:
# ------------
- name: Parse the provided configuration with the existing running configuration
cisco.iosxr.iosxr_ntp_global:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
# "parsed":{
# "access_group": {
# "ipv4": {
# "peer": "PeerAcl1",
# "query_only": "QueryOnlyAcl1",
# "serve": "ServeAcl1",
# "serve_only": "ServeOnlyAcl1"
# },
# "vrfs": [
# {
# "ipv4": {
# "peer": "PeerAcl3",
# "serve": "ServeAcl2"
# },
# "name": "siteA"
# }
# ]
# },
# "authenticate": true,
# "broadcastdelay": 1,
# "drift": {
# "aging_time": 0,
# "file": "apphost"
# },
# "interfaces": [
# {
# "broadcast_client": true,
# "multicast_client": "224.0.0.8",
# "multicast_destination": "224.0.0.8",
# "name": "GigabitEthernet0/0/0/0"
# }
# ],
# "ipv4": {
# "dscp": "af11"
# },
# "ipv6": {
# "precedence": "routine"
# },
# "log_internal_sync": true,
# "master": 1,
# "max_associations": 10,
# "passive": true,
# "peers": [
# {
# "iburst": true,
# "peer": "192.0.2.1",
# "vrf": "siteC"
# }
# ],
# "servers": [
# {
# "burst": true,
# "server": "192.0.2.2",
# "vrf": "siteD"
# }
# ],
# "source": "GigabitEthernet0/0/0/0",
# "source_vrfs": [
# {
# "name": "GigabitEthernet0/0/0/0",
# "vrf": "siteE"
# }
# ],
# "trusted_keys": [
# {
# "key_id": 1
# }
# ],
# "update_calendar": true
# }
Return Values
-------------
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
.. raw:: html
<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Key</th>
<th>Returned</th>
<th width="100%">Description</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>after</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>when changed</td>
<td>
<div>The resulting configuration after module execution.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>before</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td>
<td>
<div>The configuration prior to the module execution.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>commands</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
</div>
</td>
<td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td>
<td>
<div>The set of commands pushed to the remote device.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['sample command 1', 'sample command 2', 'sample command 3']</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>gathered</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
</div>
</td>
<td>when <em>state</em> is <code>gathered</code></td>
<td>
<div>Facts about the network resource gathered from the remote device as structured data.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>parsed</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
</div>
</td>
<td>when <em>state</em> is <code>parsed</code></td>
<td>
<div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>rendered</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">list</span>
</div>
</td>
<td>when <em>state</em> is <code>rendered</code></td>
<td>
<div>The provided configuration in the task rendered in device-native format (offline).</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['sample command 1', 'sample command 2', 'sample command 3']</div>
</td>
</tr>
</table>
<br/><br/>
Status
------
Authors
~~~~~~~
- Ashwini Mhatre (@amhatre)
| 39.882353 | 290 | 0.410448 |
601ed19f9b1f6401904640cbd7faa7b9ecb4ec9f | 816 | rst | reStructuredText | doc/examples/multiple_markers.rst | kenhys/sphinxcontrib-openstreetmap | e759069255a73dc69035bae604580d6668b9478c | [
"BSD-2-Clause"
] | 1 | 2017-03-24T20:23:53.000Z | 2017-03-24T20:23:53.000Z | doc/examples/multiple_markers.rst | kenhys/sphinxcontrib-openstreetmap | e759069255a73dc69035bae604580d6668b9478c | [
"BSD-2-Clause"
] | 1 | 2016-03-30T14:26:34.000Z | 2016-03-30T15:13:57.000Z | doc/examples/multiple_markers.rst | kenhys/sphinxcontrib-openstreetmap | e759069255a73dc69035bae604580d6668b9478c | [
"BSD-2-Clause"
] | null | null | null |
Multiple markers example
------------------------
Here is the simple markup which shows multiple markers::
.. openstreetmap:: Example OpenStreetMap
:id: example_openstreetmap1
:location: 40.790278,-73.959722
:zoom: 14
"Metropolitan Museum of Art, New York, United States", location: 40.779437,-73.963244
"Central Park, New York, United States", location: 40.782865,-73.965355
This markup shows following map. There are two markers about Metropolitan Museum of Art and Central Park in New York.
.. openstreetmap:: Example OpenStreetMap
:id: example_openstreetmap1
:location: 40.790278,-73.959722
:zoom: 14
"Metropolitan Museum of Art, New York, United States", location: 40.779437,-73.963244
"Central Park, New York, United States", location: 40.782865,-73.965355
| 30.222222 | 117 | 0.708333 |
1f09ec117ae5cb09af95957ff9fd0367c6ad90e3 | 1,331 | rst | reStructuredText | docs/bugs.rst | pundiramit/external-mesa3d | c342483c57fa185ff67bd5ab7d82cb884e42684e | [
"MIT"
] | null | null | null | docs/bugs.rst | pundiramit/external-mesa3d | c342483c57fa185ff67bd5ab7d82cb884e42684e | [
"MIT"
] | null | null | null | docs/bugs.rst | pundiramit/external-mesa3d | c342483c57fa185ff67bd5ab7d82cb884e42684e | [
"MIT"
] | null | null | null | Report a Bug
============
The Mesa bug database is hosted on
`freedesktop.org <https://freedesktop.org>`__. The old bug database on
SourceForge is no longer used.
To file a Mesa bug, go to `GitLab on
freedesktop.org <https://gitlab.freedesktop.org/mesa/mesa/-/issues>`__
Please follow these bug reporting guidelines:
- Check if a new version of Mesa is available which might have fixed
the problem.
- Check if your bug is already reported in the database.
- Monitor your bug report for requests for additional information, etc.
- Attach the output of running glxinfo or wglinfo. This will tell us
the Mesa version, which device driver you're using, etc.
- If you're reporting a crash, try to use your debugger (gdb) to get a
stack trace. Also, recompile Mesa in debug mode to get more detailed
information.
- Describe in detail how to reproduce the bug, especially with games
and applications that the Mesa developers might not be familiar with.
- Provide an `apitrace <https://github.com/apitrace/apitrace>`__ or
simple GLUT-based test program if possible.
The easier a bug is to reproduce, the sooner it will be fixed. Please do
everything you can to facilitate quickly fixing bugs. If your bug report
is vague or your test program doesn't compile easily, the problem may
not be fixed very quickly.
| 42.935484 | 72 | 0.759579 |
b88c3f288fca000684d2728e46601e2ba4f14179 | 4,133 | rst | reStructuredText | doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst | heroku-miraheze/trafficserver | b4c9cf1668c5b464064c336800e049c11e659929 | [
"Apache-2.0"
] | 2 | 2020-12-05T03:28:25.000Z | 2021-07-10T06:03:57.000Z | doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst | heroku-miraheze/trafficserver | b4c9cf1668c5b464064c336800e049c11e659929 | [
"Apache-2.0"
] | 3 | 2017-09-22T19:18:56.000Z | 2021-06-21T18:07:14.000Z | doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst | heroku-miraheze/trafficserver | b4c9cf1668c5b464064c336800e049c11e659929 | [
"Apache-2.0"
] | 1 | 2020-06-17T11:31:22.000Z | 2020-06-17T11:31:22.000Z | .. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
.. include:: ../../../../common.defs
.. _developer-plugins-examples-blacklist:
Blacklist Plugin
****************
The sample blacklisting plugin included in the Traffic Server SDK is
``blacklist_1.c``. This plugin checks every incoming HTTP client request
against a list of blacklisted web sites. If the client requests a
blacklisted site, then the plugin returns an ``Access forbidden``
message to the client.
The flow of HTTP processing with the blacklist plugin is illustrated in
the figure titled :ref:`BlackListPlugin`.
This example also contains a simple configuration management interface.
It can read a list of blacklisted sites from a file (``blacklist.txt``)
that can be updated by a Traffic Server administrator. When the
configuration file is updated, Traffic Server sends an event to the
plugin that wakes it up to do some work.
Creating the Parent Continuation
================================
You create the static parent continuation in the mandatory
``TSPluginInit`` function. This parent continuation effectively **is**
the plugin: the plugin executes only when this continuation receives an
event from Traffic Server. Traffic Server passes the event as an
argument to the continuation's handler function. When you create
continuations, you must create and specify their handler functions.
You can specify an optional mutex lock when you create continuations.
The mutex lock protects data shared by asynchronous processes. Because
Traffic Server has a multi-threaded design, race conditions can occur if
several threads try to access the same continuation's data.
Here is how the static parent continuation is created in
``blacklist_1.c``:
.. code-block:: c
void
TSPluginInit (int argc, const char *argv[])
{
// ...
TSCont contp;
contp = TSContCreate (blacklist_plugin, NULL);
// ...
}
The handler function for the plugin is ``blacklist_plugin``, and the
mutex is null. The continuation handler function's job is to handle the
events that are sent to it; accordingly, the ``blacklist_plugin``
routine consists of a switch statement that covers each of the events
that might be sent to it:
.. code-block:: c
static int
blacklist_plugin (TSCont contp, TSEvent event, void *edata)
{
TSHttpTxn txnp = (TSHttpTxn) edata;
switch (event) {
case TS_EVENT_HTTP_OS_DNS:
handle_dns (txnp, contp);
return 0;
case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
handle_response (txnp);
return 0;
default:
TSDebug ("blacklist_plugin", "This event was unexpected: %d", );
break;
}
return 0;
}
When you write handler functions, you have to anticipate any events that
might be sent to the handler by hooks or by other functions. In the
Blacklist plugin, ``TS_EVENT_OS_DNS`` is sent because of the global hook
established in ``TSPluginInit``, ``TS_EVENT_HTTP_SEND_RESPONSE_HDR`` is
sent because the plugin contains a transaction hook
(see :ref:`developer-plugins-examples-blacklist-txn-hook`).
It is good practice to have a default case in your switch statements.
.. toctree::
:maxdepth: 2
setting-a-global-hook.en
accessing-the-transaction-being-processed.en
setting-up-a-transaction-hook.en
working-with-http-header-functions.en
source-code.en
| 36.901786 | 76 | 0.735301 |
890eee875d95dce87672a0eb10408a7b219edf7a | 199 | rst | reStructuredText | doc/source/example/async_tornado_client.rst | vmacari/pymodbus | ec97e2f2b50c6db0a932f44e550a5dee60bf0970 | [
"BSD-3-Clause"
] | 1,125 | 2017-05-11T06:11:36.000Z | 2022-03-31T02:59:45.000Z | doc/source/example/async_tornado_client.rst | vmacari/pymodbus | ec97e2f2b50c6db0a932f44e550a5dee60bf0970 | [
"BSD-3-Clause"
] | 575 | 2017-05-12T02:46:55.000Z | 2022-03-31T16:00:33.000Z | doc/source/example/async_tornado_client.rst | vmacari/pymodbus | ec97e2f2b50c6db0a932f44e550a5dee60bf0970 | [
"BSD-3-Clause"
] | 516 | 2017-05-19T14:06:06.000Z | 2022-03-31T06:10:13.000Z | ==================================================
Async Tornado Client Example
==================================================
.. literalinclude:: ../../../examples/common/async_tornado_client.py | 49.75 | 68 | 0.376884 |
471873929c91432a15d99ac65897f06bd8bbe608 | 56 | rst | reStructuredText | src/source/02.conbas/10.texto/05.ejercicios.rst | sio2sio2/doc-linux | 4cd387e3dbd1b595eeee1dff200ed6d57ab668ef | [
"MIT"
] | 2 | 2021-10-19T10:18:53.000Z | 2022-03-31T07:20:10.000Z | src/source/02.conbas/10.texto/05.ejercicios.rst | sio2sio2/doc-linux | 4cd387e3dbd1b595eeee1dff200ed6d57ab668ef | [
"MIT"
] | null | null | null | src/source/02.conbas/10.texto/05.ejercicios.rst | sio2sio2/doc-linux | 4cd387e3dbd1b595eeee1dff200ed6d57ab668ef | [
"MIT"
] | null | null | null | .. _ej-texto:
.. include:: /99-ejercicios/10-texto.rst
| 14 | 40 | 0.660714 |
684df02ca857c93965bff6dc2162d677ad464ed4 | 1,254 | rst | reStructuredText | docs/index.rst | mberaha/bayesmix | 4448f0e9f69ac71f3aacc11a239e3114790c1aaa | [
"BSD-3-Clause"
] | null | null | null | docs/index.rst | mberaha/bayesmix | 4448f0e9f69ac71f3aacc11a239e3114790c1aaa | [
"BSD-3-Clause"
] | null | null | null | docs/index.rst | mberaha/bayesmix | 4448f0e9f69ac71f3aacc11a239e3114790c1aaa | [
"BSD-3-Clause"
] | null | null | null | .. bayesmix documentation master file, created by
sphinx-quickstart on Sun Jun 27 08:35:53 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
bayesmix: a nonparametric C++ library for mixture models
============
.. image:: ../resources/logo_full.svg
:width: 250px
:alt: bayesmix full logo
.. image::
https://readthedocs.org/projects/bayesmix/badge/?version=latest
:target: https://bayesmix.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
``bayesmix`` is a C++ library for running MCMC simulations in Bayesian mixture models.
It uses the ``Eigen`` library for vector-matrix manipulation and linear algebra, and ``protobuf`` (Protocol Buffers) for communication and storage of structured data.
Submodules
==========
There are currently three submodules to the ``bayesmix`` library, represented by three classes of objects:
- ``Algorithms``
- ``Hierarchies``
- ``Mixings``.
.. toctree::
:maxdepth: 1
:caption: API: library submodules
algorithms
hierarchies
mixings
collectors
utils
Tutorials
=========
:doc:`tutorial`
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| 22 | 166 | 0.696172 |
fca2077bae1ee67fbd27c54ff7dd9bbcc39f6c8b | 1,388 | rst | reStructuredText | source/android/snippets/sms.rst | pkimber/my-memory | 2ab4c924f1d2869e3c39de9c1af81094b368fb4a | [
"Apache-2.0"
] | null | null | null | source/android/snippets/sms.rst | pkimber/my-memory | 2ab4c924f1d2869e3c39de9c1af81094b368fb4a | [
"Apache-2.0"
] | null | null | null | source/android/snippets/sms.rst | pkimber/my-memory | 2ab4c924f1d2869e3c39de9c1af81094b368fb4a | [
"Apache-2.0"
] | null | null | null | SMS
***
Send
====
Minimal
-------
`Minimal code to send a SMS from Google Android`_
- This code assumes you're in an Activity, which is where it gets ``this``:
::
PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, new Intent(), 0)
SmsManager smsManager = SmsManager.getDefault();
String receiver = "5556"; // the phone number of the device to send the SMS message to.
String message = "This is the SMS message I want to sending";
smsManager.sendTextMessage(receiver, null, message, pendingIntent, null);
What it requires from this is actually just the interface to the ``Context``.
- Also, add the following to your ``AndroidManifest.xml`` file:
::
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
Application
-----------
`SMS Messaging in Android`_
To use the built in SMS application:
::
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "Content of the SMS goes here...");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
Try the following for the mobile number:
::
intent.putExtra("address", recipient);
.. _`Minimal code to send a SMS from Google Android`: http://www.threaded.com/2009/02/sending-sms-from-google-android.html
.. _`SMS Messaging in Android`: http://mobiforge.com/developing/story/sms-messaging-android
| 25.703704 | 122 | 0.717579 |
4ffd194bbdf1aa9ebc41a2fb0b6fa478630258a0 | 1,963 | rst | reStructuredText | docs/operations/find_files.rst | tonysyu/qwikstart | d942c486a7d4362354e95a11e3797c42a982c891 | [
"BSD-3-Clause"
] | 1 | 2020-04-10T01:55:51.000Z | 2020-04-10T01:55:51.000Z | docs/operations/find_files.rst | tonysyu/qwikstart | d942c486a7d4362354e95a11e3797c42a982c891 | [
"BSD-3-Clause"
] | 112 | 2019-12-24T20:04:05.000Z | 2022-01-25T19:05:20.000Z | docs/operations/find_files.rst | tonysyu/qwikstart | d942c486a7d4362354e95a11e3797c42a982c891 | [
"BSD-3-Clause"
] | null | null | null | ==========
find_files
==========
.. include:: aliases.rst
Operation to search for text within files and return match file paths. Matching files
are stored in a list of `matching_files`, but the name can be specified using
`output_name`.
Example
=======
The following example searches for qwikstart examples that use the :doc:`shell`
operation:
.. literalinclude:: ../../examples/operations/find_files.yml
:language: yaml
:emphasize-lines: 3-7
:caption: `examples/operations/find_files.yml`
In addition to searching, this example takes the output of the search and passes it to
the :doc:`prompt` operation. Using the `prompt` input's `choices_from` option allows the
user to select one of the `matching_files` found by `find_files`.
In order to use the `matching_files` output from the `find_files` operation, it's saved
to the `template_variables` namespace by defining
`output_namespace = "template_variables"`. See :doc:`../understanding_operations` and
the docs for the :doc:`prompt` operation for more info.
To complete the example, the :doc:`shell` operation is used to print the contents of the
file to the terminal.
Optional context
================
`regex`
default: `''`
Regex to search for in files
`directory`
default: `'.'`
Root directory for search (defaults to working directory).
`output_name`
default: `'matching_files'`
Variable name where list of matching files is stored.
`path_filter`
default: `None`
File filter string passed to `fnmatch` before searching. This can be used
to speed up searching for large repositories.
For example, you can limit text search to json files using `"*.json"`.
`regex_flags`
|regex_flags description|
Output
======
This operation returns a list of file paths in a variable defined by `output_name`.
See also
========
- :doc:`find_tag_and_insert_text`
- :doc:`find_tagged_line`
- :doc:`prompt`
- :doc:`search_and_replace`
- :doc:`shell`
| 25.493506 | 88 | 0.720326 |
23b766ea153143fa946be5e71582561d995763b9 | 219 | rst | reStructuredText | docs/index.rst | TerryLines/gnssmapper | 6a6e051612642e3b131a5c0b0a0041b1e070c35d | [
"MIT"
] | 6 | 2021-03-09T12:01:52.000Z | 2021-12-28T12:24:44.000Z | docs/index.rst | Indicative-Data-Science/gnssmapper | 6a6e051612642e3b131a5c0b0a0041b1e070c35d | [
"MIT"
] | 11 | 2021-03-11T10:11:54.000Z | 2021-07-22T06:27:54.000Z | docs/index.rst | TerryLines/gnssmapper | 6a6e051612642e3b131a5c0b0a0041b1e070c35d | [
"MIT"
] | 2 | 2021-03-04T08:32:23.000Z | 2021-03-04T08:56:49.000Z | ==========
GnssMapper
==========
.. toctree::
:maxdepth: 2
Getting started <getting_started>
User Manual <manual>
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| 11.526316 | 36 | 0.538813 |
d5b50ca2f3c8f5566d7796806945eef1d7988655 | 272 | rst | reStructuredText | docs/software/index.rst | andypalmer9669/74_series_computer | 0b8a4776b49a2380a51863634b48bcc441bf74ec | [
"MIT"
] | null | null | null | docs/software/index.rst | andypalmer9669/74_series_computer | 0b8a4776b49a2380a51863634b48bcc441bf74ec | [
"MIT"
] | 46 | 2019-02-22T16:46:02.000Z | 2020-03-08T20:26:37.000Z | docs/software/index.rst | andypalmer9669/74_series_computer | 0b8a4776b49a2380a51863634b48bcc441bf74ec | [
"MIT"
] | null | null | null | Software
========
.. toctree::
:maxdepth: 2
:caption: Key functionality:
assembler
.. toctree::
:maxdepth: 2
:caption: Command line utilities:
command_line
.. toctree::
:maxdepth: 3
:caption: Source Documentation:
source/eight_bit_computer | 13.6 | 36 | 0.650735 |
a19a814f0b6621d169e20512800f8d13b744aeb1 | 246 | rst | reStructuredText | docs/source/king_phisher/xor.rst | 1ndy/king-phisher | 937706a22d17ca01428f0edee48b9d60a20b33d9 | [
"BSD-3-Clause"
] | 3 | 2018-12-17T02:54:18.000Z | 2021-07-07T15:46:04.000Z | docs/source/king_phisher/xor.rst | 1ndy/king-phisher | 937706a22d17ca01428f0edee48b9d60a20b33d9 | [
"BSD-3-Clause"
] | null | null | null | docs/source/king_phisher/xor.rst | 1ndy/king-phisher | 937706a22d17ca01428f0edee48b9d60a20b33d9 | [
"BSD-3-Clause"
] | 4 | 2017-09-14T03:02:40.000Z | 2019-06-25T02:58:50.000Z | :mod:`xor`
==========
.. module:: xor
:synopsis:
This module provides basic support for XOR encoding and decoding operations.
Functions
---------
.. autofunction:: king_phisher.xor.xor_decode
.. autofunction:: king_phisher.xor.xor_encode
| 16.4 | 76 | 0.695122 |
d75b18a8607bae743aca2429ff2eb1a82aa68e41 | 1,430 | rst | reStructuredText | source/99-appendix/08-important-files.rst | ShadowRZ/abs-guide | b47f8d9e6d2ab63f9c8d180782e34da8320444e2 | [
"CC0-1.0"
] | null | null | null | source/99-appendix/08-important-files.rst | ShadowRZ/abs-guide | b47f8d9e6d2ab63f9c8d180782e34da8320444e2 | [
"CC0-1.0"
] | null | null | null | source/99-appendix/08-important-files.rst | ShadowRZ/abs-guide | b47f8d9e6d2ab63f9c8d180782e34da8320444e2 | [
"CC0-1.0"
] | null | null | null | 附录 H. 重要文件
==================================================
.. rubric:: 启动文件
这些文件包含系统启动后所有作为用户 Shell 的 Bash 及所有 Bash 脚本的都可用的别名和环境变量。
.. glossary::
:file:`/etc/profile`
系统全局默认值,多数是设置好环境的 (所有类 Bourne Shell,不只是 Bash [#]_)
:file:`/etc/bashrc`
Bash 的系统全局函数和别名。
:file:`$HOME/.bash_profile`
特定于用户的环境默认设置,能在每个用户的主目录里找到 (:file:`/etc/profile` 的本地版)。
:file:`$HOME/.bashrc`
特定于用户的 Bash 载入文件,能在每个用户的主目录里找到 (:file:`/etc/bashrc` 的本地版)。只有交互 Shell 和用户脚本读取该文件。示例 :file:`~/.bashrc` 文件见附录 M。
.. rubric:: 登出文件
.. glossary::
:file:`$HOME/.bash_logout`
特定于用户的指令文件,能在每个用户的主目录里找到。只有交互 Shell 和用户脚本读取该文件。退出登录 (Bash) Shell 时,会执行该文档里的指令。
.. rubric:: 数据文件
.. glossary::
:file:`/etc/passwd`
系统上所有用户,及他们的身份、主目录、所属组、和默认 Shell 的列表。注意用户密码 *并没有* 被存储在这个文件 [#]_ ,而是加密存储在 :file:`/etc/shadow` 中。
.. rubric:: 系统配置文件
.. glossary::
:file:`/etc/sysconfig/hwconf`
已连接的硬件设备的列表和描述。该信息为文本形式,并可以提取和解析。
.. code-block:: console
$ grep -A 5 AUDIO /etc/sysconfig/hwconf
class: AUDIO
bus: PCI
detached: 0
driver: snd-intel8x0
desc: "Intel Corporation 82801CA/CAM AC'97 Audio Controller"
vendorId: 8086
.. note:: 该文件存在于 Red Hat 和 Fedora Core 安装中,但可能在其他发行版中不存在。
.. rubric:: 脚注
.. [#] 这不适用于 **csh**, **tcsh**, 及其他与经典 Bourne Shell (**sh**) 无关或不衍生的 Shell。
.. [#] UNIX 早期版本中,密码 *确实* 存储在 :file:`/etc/passwd` 中,这便解释了文件的命名。
| 24.237288 | 114 | 0.606294 |
3d38c5cc3336a82181bb369b48625f2710348e96 | 1,418 | rst | reStructuredText | docs/data_sources/epacems.rst | cschloer/pudl | 32705ecc77443eb0d8c1d460df428f6f5f5b5037 | [
"MIT"
] | null | null | null | docs/data_sources/epacems.rst | cschloer/pudl | 32705ecc77443eb0d8c1d460df428f6f5f5b5037 | [
"MIT"
] | 18 | 2021-03-31T06:48:46.000Z | 2022-03-30T13:08:06.000Z | docs/data_sources/epacems.rst | cschloer/pudl | 32705ecc77443eb0d8c1d460df428f6f5f5b5037 | [
"MIT"
] | null | null | null | ===============================================================================
EPA CEMS Hourly
===============================================================================
=================== ===========================================================
Source URL ftp://newftp.epa.gov/dmdnload/emissions/hourly/monthly
Source Format Comma Separated Value (.csv)
Source Years 1995-2018
Size (Download) 7.6 GB
Size (Uncompressed) ~100 GB
PUDL Code ``epacems``
Years Liberated 1995-2018
Records Liberated ~1 billion
Issues `Open EPA CEMS issues <https://github.com/catalyst-cooperative/pudl/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aepacems>`__
=================== ===========================================================
All of the EPA's hourly Continuous Emissions Monitoring System (CEMS) data is
available. It is by far the largest dataset in PUDL at the moment, with hourly
records for thousands of plants covering decades. Note that the ETL process
can easily take all day for the full dataset. PUDL also provides a script that
converts the raw EPA CEMS data into Apache Parquet files, which can be read
and queried very efficiently from disk. For usage details run:
.. code-block:: console
$ epacems_to_parquet --help
Thanks to `Karl Dunkle Werner <https://github.com/karldw>`_ for contributing
much of the EPA CEMS Hourly ETL code.
| 47.266667 | 152 | 0.576869 |
7e74fc55e71b18095878641dc2596cd57f4aa4f2 | 4,791 | rst | reStructuredText | includes_private_chef_1x/includes_private_chef_1x_admin_configure_general_log_retention.rst | trinitronx/chef-docs | 948d76fc0c0cffe17ed6b010274dd626f53584c2 | [
"CC-BY-3.0"
] | 1 | 2020-02-02T21:57:47.000Z | 2020-02-02T21:57:47.000Z | includes_private_chef_1x/includes_private_chef_1x_admin_configure_general_log_retention.rst | trinitronx/chef-docs | 948d76fc0c0cffe17ed6b010274dd626f53584c2 | [
"CC-BY-3.0"
] | null | null | null | includes_private_chef_1x/includes_private_chef_1x_admin_configure_general_log_retention.rst | trinitronx/chef-docs | 948d76fc0c0cffe17ed6b010274dd626f53584c2 | [
"CC-BY-3.0"
] | null | null | null | .. The contents of this file may be included in multiple topics.
.. This file should not be changed in a way that hinders its ability to appear in multiple documentation sets.
This configuration file has the following settings for log retention:
.. list-table::
:widths: 200 300
:header-rows: 1
* - Setting
- Description
* - ``log_retention['couchdb']``
- For configuration file retention times on the /var/log/opscode/couchdb directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['couchdb'] = 14
* - ``log_retention['postgresql']``
- For configuration file retention times on the /var/log/opscode/postgresql directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['postgresql'] = 14
* - ``log_retention['rabbitmq']``
- For configuration file retention times on the /var/log/opscode/rabbitmq directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['rabbitmq'] = 14
* - ``log_retention['redis']``
- For configuration file retention times on the /var/log/opscode/redis directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['redis'] = 14
* - ``log_retention['opscode-authz']``
- For configuration file retention times on the /var/log/opscode/opscode-authz directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-authz'] = 14
* - ``log_retention['opscode-certificate']``
- For configuration file retention times on the /var/log/opscode/opscode-certificate directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-certificate'] = 14
* - ``log_retention['opscode-account']``
- For configuration file retention times on the /var/log/opscode/opscode-account directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-account'] = 14
* - ``log_retention['opscode-solr']``
- For configuration file retention times on the /var/log/opscode/opscode-solr directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-solr'] = 14
* - ``log_retention['opscode-expander']``
- For configuration file retention times on the /var/log/opscode/opscode-expander directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-expander'] = 14
* - ``log_retention['opscode-org-creator']``
- For configuration file retention times on the /var/log/opscode/opscode-org-creator directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-org-creator'] = 14
* - ``log_retention['opscode-chef']``
- For configuration file retention times on the /var/log/opscode/opscode-chef directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-chef'] = 14
* - ``log_retention['opscode-erchef']``
- For configuration file retention times on the /var/log/opscode/opscode-erchef directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-erchef'] = 14
* - ``log_retention['opscode-webui']``
- For configuration file retention times on the /var/log/opscode/opscode-webui directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['opscode-webui'] = 14
* - ``log_retention['nagios']``
- For configuration file retention times on the /var/log/opscode/nagios directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['nagios'] = 14
* - ``log_retention['nginx']``
- For configuration file retention times on the /var/log/opscode/nginx directory. And files with mtimes older than this number of days will be deleted. Default value: ``14``. For example:
::
log_retention['nginx'] = 14
| 46.514563 | 206 | 0.683365 |
542acb4c20cf56e31ea84092d1ace2ef858883e2 | 1,442 | rst | reStructuredText | README.rst | dead-beef/cytube-bot | 3e96d4dcf755363d69e2dcbcad9f34f388ff7510 | [
"MIT"
] | 1 | 2018-11-16T14:52:03.000Z | 2018-11-16T14:52:03.000Z | README.rst | dead-beef/cytube-bot | 3e96d4dcf755363d69e2dcbcad9f34f388ff7510 | [
"MIT"
] | null | null | null | README.rst | dead-beef/cytube-bot | 3e96d4dcf755363d69e2dcbcad9f34f388ff7510 | [
"MIT"
] | 1 | 2022-02-22T22:00:02.000Z | 2022-02-22T22:00:02.000Z | cytube-bot
==========
.. image:: https://img.shields.io/pypi/v/cytube-bot.svg
:target: https://pypi.python.org/pypi/cytube-bot
.. image:: https://img.shields.io/pypi/status/cytube-bot.svg
:target: https://pypi.python.org/pypi/cytube-bot
.. image:: https://img.shields.io/pypi/format/cytube-bot.svg
:target: https://pypi.python.org/pypi/cytube-bot
.. image:: https://img.shields.io/librariesio/github/dead-beef/cytube-bot.svg
:target: https://libraries.io/pypi/cytube-bot
.. image:: https://img.shields.io/pypi/pyversions/cytube-bot.svg
:target: https://python.org
.. image:: https://img.shields.io/pypi/l/cytube-bot.svg
:target: https://github.com/dead-beef/cytube-bot/blob/master/LICENSE
Overview
--------
AsyncIO `CyTube <https://github.com/calzoneman/sync>`__ bot
Requirements
------------
- `Python >=3.4 <https://www.python.org/>`__
Installation
------------
.. code:: bash
pip install cytube-bot
pip install cytube-bot[proxy]
.. code:: bash
git clone https://github.com/dead-beef/cytube-bot
cd cytube-bot
pip install -e .[dev]
Building
--------
.. code:: bash
./build.sh
Testing
-------
.. code:: bash
./test
Usage
-----
- `Module documentation <https://dead-beef.github.io/cytube-bot/>`__
- `Examples <https://github.com/dead-beef/cytube-bot/blob/master/examples>`__
Licenses
--------
- `cytube-bot <https://github.com/dead-beef/cytube-bot/blob/master/LICENSE>`__
| 21.848485 | 79 | 0.661581 |
14c96e40de2c9e7f9d1c438aaf735187b9fafe05 | 325 | rst | reStructuredText | doc/index.rst | kellrott/synapsePythonClient | 8af4b89a95140fafca2e98af2768423c3ea949fc | [
"Apache-2.0"
] | null | null | null | doc/index.rst | kellrott/synapsePythonClient | 8af4b89a95140fafca2e98af2768423c3ea949fc | [
"Apache-2.0"
] | null | null | null | doc/index.rst | kellrott/synapsePythonClient | 8af4b89a95140fafca2e98af2768423c3ea949fc | [
"Apache-2.0"
] | null | null | null | ===================================
Synapse Python Client documentation
===================================
.. toctree::
:maxdepth: 1
_static/Client
_static/Entity
_static/Evaluation
_static/Activity
_static/Annotations
_static/Wiki
_static/Utilities
.. automodule:: synapseclient
:members: | 20.3125 | 35 | 0.556923 |
5d6c9c9a79e9c2a763685da38b22421fbb3596ca | 807 | rst | reStructuredText | content/freemedia-in-australia.rst | sanjayankur31/sanjayankur31.github.io | 2719cd7290e440abeae8d0ad9ac3bd487dbb5440 | [
"CC-BY-4.0"
] | null | null | null | content/freemedia-in-australia.rst | sanjayankur31/sanjayankur31.github.io | 2719cd7290e440abeae8d0ad9ac3bd487dbb5440 | [
"CC-BY-4.0"
] | null | null | null | content/freemedia-in-australia.rst | sanjayankur31/sanjayankur31.github.io | 2719cd7290e440abeae8d0ad9ac3bd487dbb5440 | [
"CC-BY-4.0"
] | null | null | null | Free-media in Australia
#######################
:date: 2013-02-10 16:59
:author: ankur
:category: Tech
:tags: Fedora
:slug: free-media-in-australia
I haven't been active with the free-media programme since moving to
Australia towards the end of last year. I've been quite busy with
university and settling down. Now that I'm no more new here, I'm going
to try and restart my contribution to the free-media program and send out
DVDs here. The demands here are quite small if you compare them to the
volume of requests that India receives. If you're in Australia and need
a home burnt Fedora DVD, drop me an email at **ankursinha AT
fedoraproject DOT org** and I'll get back to you.
I'm glad to see Frank and the other free-media folks working to keep the
free-media program running. Thanks guys, you rock!
| 40.35 | 73 | 0.753408 |
50877ad7e9fc9961fc06d3cae2d80b3c15f3770a | 465 | rst | reStructuredText | apcdocs/index.rst | lino-framework/lino_book | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | [
"BSD-2-Clause"
] | 3 | 2016-08-25T05:58:09.000Z | 2019-12-05T11:13:45.000Z | apcdocs/index.rst | lino-framework/lino_book | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | [
"BSD-2-Clause"
] | 18 | 2016-11-12T21:38:58.000Z | 2019-12-03T17:54:38.000Z | apcdocs/index.rst | lino-framework/lino_book | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | [
"BSD-2-Clause"
] | 9 | 2016-10-15T11:12:33.000Z | 2021-09-22T04:37:37.000Z | ====================
The apc demo project
====================
This is an example of a **local documentation tree**, that is, a doctree
maintained by a :term:`site operator` for their internal documentation. It may
expose real data from your database as static html.
Not sure whether somebody will ever use this. But here are some thoughts and
experiments.
These are our journals:
.. django2rst::
# from lino.api.doctest import *
rt.show(ledger.Journals)
| 27.352941 | 79 | 0.692473 |
092ee72e10c2516d5368ce72421dd5ec0d7d44a7 | 480 | rst | reStructuredText | robot_activity_tutorials/CHANGELOG.rst | snt-robotics/robot_process | a2b0324b0a458d6c2c4225abfeccc3dfdeaf1214 | [
"BSD-3-Clause"
] | 7 | 2018-04-25T12:37:16.000Z | 2021-12-28T07:00:21.000Z | robot_activity_tutorials/CHANGELOG.rst | snt-robotics/robot_process | a2b0324b0a458d6c2c4225abfeccc3dfdeaf1214 | [
"BSD-3-Clause"
] | 4 | 2020-03-07T07:59:15.000Z | 2020-04-07T20:15:22.000Z | robot_activity_tutorials/CHANGELOG.rst | AutoModality/robot_activity | 37a89d91a01834af8373b468bbbb910270894036 | [
"BSD-3-Clause"
] | 3 | 2018-10-20T20:07:04.000Z | 2021-09-27T17:26:10.000Z | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package robot_activity_tutorials
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.1.1 (2018-04-18)
------------------
* package renamed to robot_activity_tutorials
* Contributors: Maciej Zurad
0.1.0 (2018-04-13)
-------------------
* adding minimal robot_activity example impl in a single C++ file
* adding minimal robot_activity example as library and node executable
* adding roslint
* Contributors: Maciej Zurad
| 30 | 70 | 0.575 |
72cec2bb6d970a3ac753a1986373db48f6908ee6 | 2,360 | rst | reStructuredText | source/guides/transaction/signing-announced-aggregate-bonded-transactions.rst | zer063/nem2-docs | ffb0417e7990deda2443b4da6fa5a5a081c7fdda | [
"Apache-2.0"
] | null | null | null | source/guides/transaction/signing-announced-aggregate-bonded-transactions.rst | zer063/nem2-docs | ffb0417e7990deda2443b4da6fa5a5a081c7fdda | [
"Apache-2.0"
] | null | null | null | source/guides/transaction/signing-announced-aggregate-bonded-transactions.rst | zer063/nem2-docs | ffb0417e7990deda2443b4da6fa5a5a081c7fdda | [
"Apache-2.0"
] | null | null | null | :orphan:
###############################################
Signing announced aggregate bonded transactions
###############################################
You probably have announced an :ref:`aggregate bonded transaction <aggregate-transaction>`, but all cosigners have not signed it yet.
This guide will show you how to cosign aggregate bonded transactions that require being signed by your account.
*************
Prerequisites
*************
- Finish :doc:`creating an escrow with aggregate bonded transaction guide <creating-an-escrow-with-aggregate-bonded-transaction>`
- Received some aggregate bonded transaction
- NEM2-SDK
- A text editor or IDE
- An account with XEM
************************
Let’s get into some code
************************
Create a function to cosign any aggregate bonded transaction.
.. example-code::
.. literalinclude:: ../../resources/examples/typescript/transaction/SigningAnnouncedAggregateBondedTransactions.ts
:language: typescript
:lines: 24-27
.. literalinclude:: ../../resources/examples/javascript/transaction/SigningAnnouncedAggregateBondedTransactions.js
:language: javascript
:lines: 26-30
Fetch all aggregate bonded transactions pending to be signed by your account.
.. note:: To fetch aggregate bonded transactions that should be signed by multisig cosignatories, refer to the multisig public key instead. See :ref:`how to get multisig accounts where an account is cosignatory<guide-get-multisig-account-info>`.
For each transaction, check if you have not already signed it. Cosign each pending transaction using the previously created function.
Did you realise that we are using RxJS operators intensively? Announce ``CosignatureSignedTransaction`` to the network using the ``TransactionHttp`` repository.
.. example-code::
.. literalinclude:: ../../resources/examples/typescript/transaction/SigningAnnouncedAggregateBondedTransactions.ts
:language: typescript
:lines: 28-
.. literalinclude:: ../../resources/examples/java/src/test/java/nem2/guides/examples/transaction/SigningAnnouncedAggregateBondedTransactions.java
:language: java
:lines: 37-57
.. literalinclude:: ../../resources/examples/javascript/transaction/SigningAnnouncedAggregateBondedTransactions.js
:language: javascript
:lines: 31- | 41.403509 | 245 | 0.711441 |
2a9e0398cd2b4c5051bab931ee8a1bf574ea390d | 3,227 | rst | reStructuredText | docs/source/naming-convention.rst | darwinli/buylowsellhigh_catalyst | f7a143cb78c614d2d347742375e8bb4d76221d5c | [
"Apache-2.0"
] | 1 | 2018-01-25T23:49:06.000Z | 2018-01-25T23:49:06.000Z | docs/source/naming-convention.rst | darwinli/buylowsellhigh_catalyst | f7a143cb78c614d2d347742375e8bb4d76221d5c | [
"Apache-2.0"
] | null | null | null | docs/source/naming-convention.rst | darwinli/buylowsellhigh_catalyst | f7a143cb78c614d2d347742375e8bb4d76221d5c | [
"Apache-2.0"
] | null | null | null | Naming Convention
=================
Catalyst introduces a standardized naming convention for all asset pairs
trading on any exchange in the following form:
**{market_currency}_{base_currency}**
Where {market_currency} is the asset to be traded using {base_currency} as
the reference, both written in lowercase and separated with an underscore.
This standardization is needed to overcome the lack of consistency in the
naming of assets across different exchanges, and making it easier to the user
to refer to the asset pairs that you want to trade.
Catalyst maintains a `Market Coverage Overview <https://www.enigma.co/catalyst/status>`_
where you can check the mapping between Catalyst naming pairs and that of each
exchange. Catalyst will always expect in all its functions that you will refer to
the asset pairs by using the Catalyst naming convention.
If at any point, you input the wrong name for an asset pair, you will get an error
of that pair not found in the given exchange, and a list of pairs available on that exchange:
.. code-block:: bash
$ catalyst ingest-exchange -x poloniex -i btc_usd
.. parsed-literal::
Ingesting exchange bundle poloniex...
Error traceback: /Volumes/Data/Users/victoris/Desktop/Enigma/user-install/catalyst-dev/catalyst/exchange/exchange.py (line 175)
SymbolNotFoundOnExchange: Symbol btc_usd not found on exchange Poloniex.
Choose from: ['rep_usdt', 'gno_btc', 'xvc_btc', 'pink_btc', 'sys_btc',
'emc2_btc', 'rads_btc', 'note_btc', 'maid_btc', 'bch_btc', 'gnt_btc',
'bcn_btc', 'rep_btc', 'bcy_btc', 'cvc_btc', 'nxt_xmr', 'zec_usdt',
'fct_btc', 'gas_btc', 'pot_btc', 'eth_usdt', 'btc_usdt', 'lbc_btc',
'dcr_btc', 'etc_usdt', 'omg_eth', 'amp_btc', 'xpm_btc', 'nxt_btc',
'vtc_btc', 'steem_eth', 'blk_xmr', 'pasc_btc', 'zec_xmr', 'grc_btc',
'nxc_btc', 'btcd_btc', 'ltc_btc', 'dash_btc', 'naut_btc', 'zec_eth',
'zec_btc', 'burst_btc', 'zrx_eth', 'bela_btc', 'steem_btc', 'etc_btc',
'eth_btc', 'huc_btc', 'strat_btc', 'lsk_btc', 'exp_btc', 'clam_btc',
'rep_eth', 'dash_xmr', 'cvc_eth', 'bch_usdt', 'zrx_btc', 'dash_usdt',
'blk_btc', 'xrp_btc', 'nxt_usdt', 'neos_btc', 'omg_btc', 'bts_btc',
'doge_btc', 'gnt_eth', 'sbd_btc', 'gno_eth', 'xcp_btc', 'ltc_usdt',
'btm_btc', 'xmr_usdt', 'lsk_eth', 'omni_btc', 'nav_btc', 'fldc_btc',
'ppc_btc', 'xbc_btc', 'dgb_btc', 'sc_btc', 'btcd_xmr', 'vrc_btc',
'ric_btc', 'str_btc', 'maid_xmr', 'xmr_btc', 'sjcx_btc', 'via_btc',
'xem_btc', 'nmc_btc', 'etc_eth', 'ltc_xmr', 'ardr_btc', 'gas_eth',
'flo_btc', 'xrp_usdt', 'game_btc', 'bch_eth', 'bcn_xmr', 'str_usdt']
In the example above, exchange Poloniex does not use USD, but uses instead the
USDT cryptocurrency asset that is issued on the Bitcoin blockchain via the Omni
Layer Protocol. Each USDT unit is backed by a U.S Dollar held in the reserves of
Tether Limited. USDT can be transferred, stored, and spent, just like bitcoins
or any other cryptocurrency. Given its 1:1 mapping to the USD, is a viable alternative.
.. code-block:: bash
$ catalyst ingest-exchange -x poloniex -i btc_usdt
.. parsed-literal::
Ingesting exchange bundle poloniex...
[====================================] Fetching poloniex daily candles: : 100%
| 48.164179 | 128 | 0.711807 |
5bf45e5fe87eea37de8855ee3b7977bc62a88eb7 | 3,779 | rst | reStructuredText | dk62_serhiienko/lab3_kernel_threads/README.rst | AKyianytsia/embedded-linux | 1d82046c9b282620f0b292a692a8d157d28c6991 | [
"DOC"
] | null | null | null | dk62_serhiienko/lab3_kernel_threads/README.rst | AKyianytsia/embedded-linux | 1d82046c9b282620f0b292a692a8d157d28c6991 | [
"DOC"
] | null | null | null | dk62_serhiienko/lab3_kernel_threads/README.rst | AKyianytsia/embedded-linux | 1d82046c9b282620f0b292a692a8d157d28c6991 | [
"DOC"
] | null | null | null | Лабораторна робота №3. Потоки, списки, та їх синхронізація у ядрі Linux.
-----------------------------------------------------------
Задание на третью лабораторную:
- Изучить принципы работы со списками в ядре, потоки и механизмы синхронизации
Написать модуль ядра, который:
- содержит переменную
- запускает M потоков на одновременное выполнение
- каждый поток инкрементирует переменную N раз, кладет значение переменной в список и завершается
- при выгрузке модуль выводит значение переменной и содержимое списка
- использовать параметры модуля для задания инкремента N и количества потоков M (в коде параметры должны называться осмысленно)
- для переменной, списка, потоков использовать динамическую аллокацию. Переменную передавать в поток по ссылке аргументом
- Проверить на x86 и BBXM. Продемонстрировать, что без синхронизации итоговое значение глобальной переменной неправильное
- Реализовать функции lock() и unlock() с использованием атомарных операций ядра (asm/atomic.h, отличается в зависимости от архитектуры). Предусмотреть возможность работы как на x86, так и на BBXM (например, можно использовать макроопределения ядра для условной компиляции). Продемонстрировать работоспособность.
Теоретичний матеріал
--------------------
*Потоки у просторі ядра.*
Вони мають деяку відмінність від потоків у юзерспейсі, а саме те що потоки в просторі ядра ``kthread`` не мають адресного простору ``mm = NULL`` .
Ці потоки працюють тільки в просторі ядра, і їх контекст не переходить в простір користувача. Проте потоки в просторі ядра плануються і витісняються так само, як і звичайні процеси.
взято `звідси <https://wm-help.net/lib/b/book/1662500978/47>`__
*Зв'язні списки*
Ядро лінукса передбачає API, яке має у собі зв'язні списки, але такі списки не прості (**есть один нюанс**). Ця структура імплементована як opaque-type,
тобто реалізація списків не дозволяє використовувати поля структури напряму, тому що вони недоступні(приховані) для юзера.
Якби дивно це не звучало, але в процесі користування ми маємо вказівник на список списків..
*Примітиви синхронізації*
Можна виділити декілька примітивів синхронізації, а саме ``mutex`` , ``semaphore`` та більш низькорівневий примітив ``spinlock``. В процесі лаб роботи, було визначено схожість ``spinlock`` та ``lock()`` який було реалізовано використовуючи атомарну змінну ``atomic_t``.
Тому є сенс описати ций примітив синхронізації детальніше. Логіка роботи доволі проста, тий процес який першим захопив ``spinlock`` має можливість доступатись до загального участку пам'яті, та не може бути перерваним іншими потоками.
Після виконання усіх запланованих дій, процес повинен відпустити ``spinlock``. Далі, тий процес який знову перший захопить ``spinlock`` тий виконує свої операції, всі інші - крутяться (``spin``) в циклі, чекаючи на дозвіл захоплення ``spinlock'а``.
Хід роботи
----------
Було написано модуль ядра, який приймає декілька параметрів як аргументи, а саме : ``кількість потоків`` , та ``кількість інкрементів глобальної змінної у потоці``.
Модифіковано ``Makefile``. Тепер є можливість встановити на процесі компіляції присутність/відсутність примітиву синхронізації в програмі.
Для цього потрібно при компіляції за допомогою ``make`` передати деяку команду : `` make CFLAGS+= KCPPFLAGS+= -DLOCK `` .
Результат роботи без примітиву синхронізації х86:
.. image:: img/without_lock.png
Результат роботи з примітивом синхронізації х86:
.. image:: img/with_lock.png
Висновки
--------
Як можна побачити з рисунків, потоки безцеремонно намагаються урвати ласий шмат пам'яті, але через те, що вони постійно переривають друг друга, нічого не виходить(див. лаб1).
Але як тільки з'являється наглядач(``spinlock``), все стає на свої місця, ми отримуємо результат, який і очікували.
| 59.046875 | 312 | 0.773485 |
f00a8083099364e96d08d41c32fe6a7ddbea68c6 | 939 | rst | reStructuredText | README.rst | bskinn/opan | 0b1b21662df6abc971407a9386db21a8796fbfe5 | [
"MIT"
] | 7 | 2015-08-28T02:14:39.000Z | 2021-03-30T11:09:18.000Z | README.rst | bskinn/opan | 0b1b21662df6abc971407a9386db21a8796fbfe5 | [
"MIT"
] | 108 | 2015-09-09T13:00:54.000Z | 2019-10-04T14:37:14.000Z | README.rst | bskinn/opan | 0b1b21662df6abc971407a9386db21a8796fbfe5 | [
"MIT"
] | null | null | null | .. README for PyPI display
opan (Open Anharmonic)
======================
Open Anharmonic is a Python 3 wrapper for computational chemistry
software packages intended to enable VPT2 computation of anharmonic
vibrational constants. No VPT2 functionality is implemented as yet.
Other types of calculations are under consideration.
An adjunct goal of the project is to expose an API providing
convenient access to various results of standalone calculations, as well
as tools to manipulate those results.
The project source can be found at GitHub:
`bskinn/opan <https://www.github.com/bskinn/opan>`__
(`v0.4rc1 CHANGELOG
<https://github.com/bskinn/opan/blob/v0.4rc1/CHANGELOG.txt>`__)
Documentation can be found at `readthedocs.org
<http://www.readthedocs.org>`__:
.. image:: https://readthedocs.org/projects/opan/badge/?version=latest
:target: http://opan.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
|
| 29.34375 | 72 | 0.763578 |
da376eabf4da40688a009169f69d3cf3fedf86ee | 106 | rst | reStructuredText | docsrc/source/dir_tools.rst | wils0ns/codebox | a255dbd877568ec67df283700722b64a70398514 | [
"MIT"
] | null | null | null | docsrc/source/dir_tools.rst | wils0ns/codebox | a255dbd877568ec67df283700722b64a70398514 | [
"MIT"
] | null | null | null | docsrc/source/dir_tools.rst | wils0ns/codebox | a255dbd877568ec67df283700722b64a70398514 | [
"MIT"
] | null | null | null | codebox: Directory utilities
============================
.. automodule:: codebox.dir_tools
:members:
| 17.666667 | 33 | 0.54717 |
baf974db5da412e5532a91f853a3b203c7ec94e9 | 50 | rst | reStructuredText | doc/source/configuration/index.rst | faucetsdn/python3-os-ken | 31037f6388b7885c859391802451b867c30f1694 | [
"Apache-2.0"
] | 4 | 2018-10-25T08:42:56.000Z | 2019-04-24T04:01:26.000Z | doc/source/configuration/index.rst | faucetsdn/python3-os-ken | 31037f6388b7885c859391802451b867c30f1694 | [
"Apache-2.0"
] | 1 | 2021-05-09T06:14:16.000Z | 2021-05-09T06:14:18.000Z | doc/source/configuration/index.rst | faucetsdn/python3-os-ken | 31037f6388b7885c859391802451b867c30f1694 | [
"Apache-2.0"
] | 5 | 2019-04-24T04:01:01.000Z | 2020-06-20T14:38:04.000Z | =============
Configuration
=============
T.B.D.
| 8.333333 | 13 | 0.32 |
be78dbb65a94392918a057c96554245797d2f234 | 183 | rst | reStructuredText | docs/src/python/index.rst | wild-flame/rafiki | 08f44bc2f2f036183658366889b9513cc967c39d | [
"Apache-2.0"
] | 1 | 2018-12-19T13:14:34.000Z | 2018-12-19T13:14:34.000Z | docs/src/python/index.rst | wild-flame/rafiki | 08f44bc2f2f036183658366889b9513cc967c39d | [
"Apache-2.0"
] | null | null | null | docs/src/python/index.rst | wild-flame/rafiki | 08f44bc2f2f036183658366889b9513cc967c39d | [
"Apache-2.0"
] | 1 | 2019-10-14T03:39:18.000Z | 2019-10-14T03:39:18.000Z | Python Documentation
====================================================================
.. toctree::
:maxdepth: 2
rafiki.client.Client
rafiki.model
rafiki.constants | 20.333333 | 68 | 0.431694 |
817b2cb02f5ebd8ac90cba83dccead2ab1553597 | 11,531 | rst | reStructuredText | content/device-discovery.rst | ENCCS/sycl | 96f991cb6309ccd13199da70aa95e7c336b7d55e | [
"CC-BY-4.0",
"MIT"
] | 6 | 2021-11-11T18:51:24.000Z | 2022-03-21T10:14:53.000Z | content/device-discovery.rst | ENCCS/sycl | 96f991cb6309ccd13199da70aa95e7c336b7d55e | [
"CC-BY-4.0",
"MIT"
] | 8 | 2021-09-03T13:04:54.000Z | 2022-02-22T09:58:29.000Z | content/device-discovery.rst | ENCCS/sycl | 96f991cb6309ccd13199da70aa95e7c336b7d55e | [
"CC-BY-4.0",
"MIT"
] | 1 | 2022-03-21T10:14:24.000Z | 2022-03-21T10:14:24.000Z | .. _device-discovery:
Device discovery
================
.. questions::
- How can we make SYCL_ aware of the available hardware?
- Is it possible to specialize our code for the available hardware?
.. objectives::
- Learn how to query device information with ``get_info``.
- Learn how to use and write :term:`selectors`.
The examples in the :ref:`what-is-sycl` episode highlighted the importance of
the :term:`queue` abstraction in SYCL_. All device code is **submitted** to a
:term:`queue` as *actions*:
.. code:: c++
queue Q;
Q.submit(
/* device code action */
);
the runtime **schedules** the actions and executes them **asynchronously**.
We will discuss queues in further detail in :ref:`queues-cgs-kernels`. At this
point, it is important to stress that a queue can be mapped to one device only.
The mapping happens at queue construction and cannot be changed afterwards.
We have five strategies to run our device code:
Somewhere
This is what we have done so far and it's achieved by simply using the
``queue`` object default constructor:
.. code:: c++
queue Q;
Most likely you want to have more control on what device queues in your code
will use, especially as your SYCL code matures.
In order to gain more control, we will use the following constructor:
.. signature:: ``queue`` constructor
.. code:: c++
template <typename DeviceSelector>
explicit queue(const DeviceSelector &deviceSelector,
const property_list &propList = {});
The **selector** passed as first parameter lets us specify *how* the runtime
should go about mapping the queue to a device.
On the *host device*
A standards-compliant SYCL implementation will always define a host device
and we can bind a queue to it by passing the ``host_selector`` object to its
constructor:
.. code:: c++
queue Q{host_selector{}};
The host device makes the host CPU "look like" an *independent* device, such
that device code will run regardless of whether the hardware is available.
This is especially useful in three scenarios:
1. Developing heterogeneous code on a machine without hardware.
2. Debugging device code using CPU tooling.
3. Fallback option to guarantee functional portability.
On a *specific* class of devices
Such as GPUs or FPGAs. The SYCL_ standard defines a few *selectors* for this
use case.
.. code:: c++
queue Q_cpu{default_selector{}};
queue Q_cpu{cpu_selector{}};
queue Q_device{gpu_selector{}};
queue Q_accelerator{accelerator_selector{}};
- ``default_selector`` is the implementation-defined default device. This is
not portable between SYCL compilers.
- ``cpu_selector`` a CPU device.
- ``gpu_selector`` a GPU device.
- ``accelerator_selector`` an accelerator device, including FPGAs.
On a *specific* device in a *specific* class
For example on a GPU with well-defined compute capabilities. SYCL_ defines
the ``device_selector`` base class, which we can inherit from and customize
to our needs.
.. code:: c++
class special_device_selector : public device_selector {
/* we will look at what goes here soon! */
};
queue Q{special_device_selector{}};
Coincidentally, this is the most flexible and portable way of
*parameterizing* our code to work on a diverse set of devices.
.. exercise:: hipSYCL and ``HIPSYCL_TARGETS``
SYCL_ is all about being able to write code *once* and execute it on
different hardware. The sample code in folder
``content/code/day-1/01_hello-selectors`` used the default queue constructor:
essentially, the runtime decides which device will be used for us.
Let us explore how that works with hipSYCL_. When
configuring the code we can set the ``HIPSYCL_TARGETS`` CMake
option to influence the behavior.
1. Compile to target the GPU, using ``-DHIPSYCL_TARGETS="cuda:sm_80"`` in the
configuration step. What output do you see? Is the code running on the
device you expect?
2. Compile to target the GPU *and* the host device using OpenMP with
``-DHIPSYCL_TARGETS="cuda:sm_80;omp"``. What output do you see now?
3. Extend the code to create multiple queues, each using one of the standard
selectors, and compile with ``-DHIPSYCL_TARGETS="cuda:sm_80;omp"``.
What output do you expect to see?
.. note::
``accelerator_selector`` is not implemented in hipSYCL_ 0.9.1
To learn more about the compilation model in hipSYCL_, check out `its
documentation
<https://github.com/illuhad/hipSYCL/blob/develop/doc/compilation.md>`_.
Writing your own selector
-------------------------
Using inheritance
~~~~~~~~~~~~~~~~~
All the standard selectors are derived types of the abstract ``device_selector``
class. This class defines, among other things, a pure virtual overload of the
function-call operator:
.. code:: c++
virtual int operator()(const device &dev) const = 0;
The method takes a ``device`` object and return a **score** for it, an integer
value, and the highest score gets selected.
The runtime will call this method exactly once for each device that it has
access to, in order to build the ranking of device scores.
Devices might be completely excluded from the ranking if their score is a
*negative* number.
We can write our own selector by simply inheriting from this abstract base class
and implementing our own custom logic for scoring devices:
.. literalinclude:: code/snippets/inherit-device_selector.cpp
:language: c++
.. exercise:: Write a custom selector
It's not that far of a stretch to imagine that in a not-so-distant future, a
node in a cluster might be equipped with accelarators from different vendors.
In this exercise, you'll write a selector to score GPUs from different
vendors according to your preferences.
You can find a scaffold for the code in the
``content/code/day-1/02_custom-selectors/custom-selectors.cpp`` file,
alongside the CMake script to build the executable. You will have to complete
the source code to compile and run correctly: follow the hints in the source
file. A working solution is in the ``solution`` subfolder.
#. Load the necessary modules:
.. code:: console
$ module load CMake hipSYCL
#. Configure, compile, and run the code:
.. code:: console
$ cmake -S. -Bbuild -DHIPSYCL_TARGETS="omp"
$ cmake --build build -- VERBOSE=1
$ ./build/custom-selectors
Try compiling and executing on a non-GPU node. What happens? How can you make
the code more robust?
Using aspects
~~~~~~~~~~~~~
The standard defines the ``aspect_selector`` free function, which
return a selectors based on desired device **aspects**:
.. signature:: ``aspect_selector``
.. code:: c++
template <class... aspectListTN>
auto aspect_selector(aspectListTN... aspectList);
Available aspects are defined in the ``aspect`` enumeration and can be probed
using the ``has`` method of the ``device`` class. For example,
``dev.has(aspect::gpu)`` is equivalent to ``dev.is_gpu()``.
A selector for GPUs supporting half-precision floating-point numbers (FP16) and :term:`USM` device allocations can be implemented with a one-liner:
.. code:: c++
auto my_selector = aspect_selector(aspect::usm_device_allocations, aspect::fp16);
The aspects available, according to the standard, are `available here
<https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:device-aspects>`_.
Currently, we cannot use aspects to filter devices based on vendors.
Introspection with ``get_info``
-------------------------------
It is not a good idea to depend explicitly on vendor and/or device names in our
program: for maximum portability, our device code should rather be parameterized
on *compute capabilities*, *available memory*, and so forth.
Introspection into such parameters is achieved with the ``get_info`` template function:
.. signature:: ``get_info``
.. code:: c++
template <typename param>
typename param::return_type get_info() const;
This is a method available for many of the classes defined by the SYCL standard
including ``device``, of course. The template parameter specifies which
information we would like to obtain.
In the previous examples, we have used ``info::device::vendor`` and
``info::device::name`` to build our selectors.
Valid ``get_info`` queries for devices are in the ``info::device`` namespace
and can be roughly classified in two groups of queries, which can:
#. decide whether a kernel can run correctly on a given device. For example,
querying for ``info::device::global_mem_size`` and
``info::device::local_mem_size`` would return the size, in bytes, of the
global and local memory, respectively.
#. help tune kernel code to a given device. For example, querying
``info::device::local_mem_type`` would return which kind of local memory is
available on the device: none, dedicated local storage, or an abstraction
built using global memory.
We will not list all possible device queries here: a complete list is `available
on the webpage of the standard
<https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_device_information_descriptors>`_.
.. exercise:: Nosing around on our system
We will write a chatty program to report properties of all devices available
on our system. We will have to keep the `list of queries
<https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_device_information_descriptors>`_
at hand for this task.
You can find a scaffold for the code in the
``content/code/day-1/03_platform-devices/platform-devices.cpp`` file,
alongside the CMake script to build the executable. You will have to complete
the source code to compile and run correctly: follow the hints in the source
file. A working solution is in the ``solution`` subfolder.
The code is a double loop:
#. First over all *platforms*
.. code:: c++
for (const auto & p : platform::get_platforms()) {
...
}
A ``platform`` is an abstraction mapping to a backend.
#. Then over all *devices* available on each platform:
.. code:: c++
for (const auto& d: p.get_devices()) {
...
}
#. We will query the device with ``get_info`` in the inner loop. For example:
.. code:: c++
std::cout << "name: " << d.get_info<info::device::name>() << std::endl;
#. Add queries and print out information on global and local memory, work
items, and work groups.
The ``info::`` namespace is **vast!** You can query many aspects of a SYCL code
at runtime using ``get_info``, not just devices. The classes ``platform``,
``context``, ``queue``, ``event``, and ``kernel`` also offer a ``get_info``
method. The queries in the ``info::kernel_device_specific`` `namespace
<https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#table.kernel.devicespecificinfo>`_
can be helpful with performance tuning.
.. keypoints::
- Device selection is essential to tailor execution to the available hardware
and is achieved using the ``device_selector`` abstraction.
- Custom selectors with complex logic can be implemented with inheritance.
- You should use ``get_info`` to probe your system. Device selection should
be done based on compute capabilities, not on vendor and/or device names.
| 35.69969 | 147 | 0.713208 |
0d9a0da218688f69f20204f1a3c06c0ed371e4c4 | 161 | rst | reStructuredText | doc/trtools.utils.mergeutils.rst | richyanicky/TRTools | 6582912ad3fade6e905b78b08c991a08baca8649 | [
"MIT"
] | null | null | null | doc/trtools.utils.mergeutils.rst | richyanicky/TRTools | 6582912ad3fade6e905b78b08c991a08baca8649 | [
"MIT"
] | null | null | null | doc/trtools.utils.mergeutils.rst | richyanicky/TRTools | 6582912ad3fade6e905b78b08c991a08baca8649 | [
"MIT"
] | null | null | null | trtools.utils.mergeutils module
--------------------------------
.. automodule:: trtools.utils.mergeutils
:members:
:undoc-members:
:show-inheritance:
| 20.125 | 40 | 0.583851 |
43ced255bc0208e24af66e008355c3704a43f278 | 680 | rst | reStructuredText | docs/rules.rst | realKD/realkd.py | 475d46fcfe6b4b5b7ca45b7701105b2072d633f0 | [
"MIT"
] | 2 | 2021-01-25T02:31:02.000Z | 2021-09-16T10:43:43.000Z | docs/rules.rst | realKD/realkd.py | 475d46fcfe6b4b5b7ca45b7701105b2072d633f0 | [
"MIT"
] | null | null | null | docs/rules.rst | realKD/realkd.py | 475d46fcfe6b4b5b7ca45b7701105b2072d633f0 | [
"MIT"
] | 3 | 2021-05-23T19:35:35.000Z | 2021-09-16T10:43:54.000Z | Rules
=====
.. automodule:: realkd.rules
Overview
--------
.. autosummary::
realkd.rules.AdditiveRuleEnsemble
realkd.rules.logistic_loss
realkd.rules.Rule
realkd.rules.RuleBoostingEstimator
realkd.rules.squared_loss
realkd.rules.XGBRuleEstimator
.. _loss_functions:
Details
-------
.. autodata:: logistic_loss
.. autodata:: loss_functions
.. autodata:: squared_loss
.. autoclass:: realkd.rules.AdditiveRuleEnsemble
:special-members: __call__
:members:
.. autoclass:: realkd.rules.Rule
:special-members: __call__
:members:
.. autoclass:: realkd.rules.RuleBoostingEstimator
:members:
.. autoclass:: XGBRuleEstimator
:members:
| 18.378378 | 49 | 0.711765 |
a5110010e2e5417a81ce87e9a3d22933b874782e | 1,313 | rst | reStructuredText | doc/source/fileshim.rst | hroncok/py3c | 52951e6481afefef8211e3da3f72b9b297e66545 | [
"MIT"
] | 51 | 2015-03-27T08:09:56.000Z | 2022-02-02T08:39:44.000Z | doc/source/fileshim.rst | hroncok/py3c | 52951e6481afefef8211e3da3f72b9b297e66545 | [
"MIT"
] | 39 | 2015-04-09T14:26:52.000Z | 2021-10-15T14:54:08.000Z | doc/source/fileshim.rst | hroncok/py3c | 52951e6481afefef8211e3da3f72b9b297e66545 | [
"MIT"
] | 22 | 2016-01-23T07:32:56.000Z | 2021-09-13T17:50:05.000Z | ..
Copyright (c) 2015, Red Hat, Inc. and/or its affiliates
Licensed under CC-BY-SA-3.0; see the license file
.. highlight:: c
.. index::
double: Porting; PyFile
The PyFile API
==============
In Python 3, the PyFile API was reduced to a few functions, and is now
meant for internal interpreter use.
Python files (and file-like objects) should be manipulated with the API defined
by the :py:mod:`py3:io` module.
But, in the real world, some C libraries only provide debugging output to
``FILE*``. For cases like this, py3c provides a quick-and-dirty replacement
for :c:func:`py2:PyFile_AsFile`:
.. c:function:: FILE* py3c_PyFile_AsFileWithMode(PyObject *py_file, const char *mode)
Open a (file-backed) Python file object as ``FILE*``.
:param py_file: The file object, which must have a working ``fileno()`` method
:param mode: A mode appropriate for ``fdopen``, such as ``'r'`` or ``'w'``
This function presents several caveats:
* Only works on file-like objects backed by an actual file
* All C-level writes should be done before additional
Python-level writes are allowed (e.g. by running Python code).
* Though the function tries to flush, due to different layers of buffering
there is no guarantee that reads and writes will be ordered correctly.
| 34.552632 | 85 | 0.708302 |
7f23d43bd35aa036832b047398db9ace05b81f40 | 8,284 | rst | reStructuredText | biasd/docs/examples.rst | KorakRay/biasd-temperature | 2f062387f6a73bfc8994bd29c50c13f23e2c556c | [
"MIT"
] | null | null | null | biasd/docs/examples.rst | KorakRay/biasd-temperature | 2f062387f6a73bfc8994bd29c50c13f23e2c556c | [
"MIT"
] | null | null | null | biasd/docs/examples.rst | KorakRay/biasd-temperature | 2f062387f6a73bfc8994bd29c50c13f23e2c556c | [
"MIT"
] | 2 | 2018-10-15T17:11:10.000Z | 2020-08-03T01:10:12.000Z | .. _examples:
BIASD Examples
==============
Here are some example Python scripts to perform BIASD. They can be found in `./example_data`, along with simulated data in a tab-delimited format (`./example_data/example_data.dat`), and an example HDF5 SMD dataset containing this data and some analysis results (`./example_data/example_dataset.hdf5`).
Creating a new SMD file
-----------------------
This script loads the example data, and then creates an HDF5 SMD data file to contain this data. Future analysis performed with BIASD can also be saved into this file.
.. code-block:: python
## Imports
import numpy as np
import biasd as b
## Create a new SMD file
filename = './example_dataset.hdf5'
dataset = b.smd.new(filename)
## Load example trajectories (N,T)
example_data = b.smd.loadtxt('example_data.dat')
n_molecules, n_datapoints = example_data.shape
## These signal versus time trajectories were simulated to be like smFRET data.
## The simulation parameters were:
tau = 0.1 # seconds
e1 = 0.1 # E_{FRET}
e2 = 0.9 # E_{FRET}
sigma = 0.05 #E_{FRET}
k1 = 3. # s^{-1}
k2 = 8. # s^{-1}
truth = np.array((e1,e2,sigma,k1,k2))
## Create a vector with the time of each datapoint
time = np.arange(n_datapoints) * tau
## Add the trajectories to the SMD file automatically
b.smd.add.trajectories(dataset, time, example_data, x_label='time', y_label='E_{FRET}')
## Add some metadata about the simulation to each trajectory
for i in range(n_molecules):
# Select the group of interest
trajectory = dataset['trajectory ' + str(i)]
# Add an attribute called tau to the data group.
# This group contains the time and signal vectors.
trajectory['data'].attrs['tau'] = tau
# Add a new group called simulation in the data group
simulation = trajectory['data'].create_group('simulation')
# Add relevant simulation paramters
simulation.attrs['tau'] = tau
simulation.attrs['e1'] = e1
simulation.attrs['e2'] = e2
simulation.attrs['sigma'] = sigma
simulation.attrs['k1'] = k1
simulation.attrs['k2'] = k2
# Add an array of simulation parameters for easy access
simulation.attrs['truth'] = truth
## Save the changes, and close the HDF5 file
b.smd.save(dataset)
Sample the posterior with MCMC
------------------------------
This script loads the example data from above, sets some priors, and then uses the Markov chain Monte Carlo (MCMC) technique to sample the posterior.
.. code-block:: python
## Imports
import matplotlib.pyplot as plt
import numpy as np
import biasd as b
#### Setup the analysis
## Load the SMD example dataset
filename = './example_dataset.hdf5'
dataset = b.smd.load(filename)
## Select the data from the first trajectory
trace = dataset['trajectory 0']
time = trace['data/time'].value
fret = trace['data/E_{FRET}'].value
## Parse meta-data to load time resolution
tau = trace['data'].attrs['tau']
## Get the simulation ground truth values
truth = trace['data/simulation'].attrs['truth']
## Close the dataset
dataset.close()
#### Perform a Calculation
## Make the prior distribution
## set means to ground truths: (.1, .9, .05, 3., 8.)
e1 = b.distributions.normal(0.1, 0.2)
e2 = b.distributions.normal(0.9, 0.2)
sigma = b.distributions.gamma(1., 1./0.05)
k1 = b.distributions.gamma(1., 1./3.)
k2 = b.distributions.gamma(1., 1./8.)
priors = b.distributions.parameter_collection(e1,e2,sigma,k1,k2)
## Setup the MCMC sampler to use 100 walkers and 4 CPUs
nwalkers = 100
ncpus = 4
sampler, initial_positions = b.mcmc.setup(fret, priors, tau, nwalkers, threads = ncpus)
## Burn-in 100 steps and then remove them form the sampler,
## but keep the final positions
sampler, burned_positions = b.mcmc.burn_in(sampler,initial_positions,nsteps=100)
## Run 100 steps starting at the burned-in positions. Timing data will provide an idea of how long each step takes
sampler = b.mcmc.run(sampler,burned_positions,nsteps=100,timer=True)
## Continue on from step 100 for another 900 steps. Don't display timing.
sampler = b.mcmc.continue_run(sampler,900,timer=False)
## Get uncorrelated samples from the chain by skipping samples according to the autocorrelation time of the variable with the largest autocorrelation time
uncorrelated_samples = b.mcmc.get_samples(sampler,uncorrelated=True)
## Make a corner plot of these uncorrelated samples
fig = b.mcmc.plot_corner(uncorrelated_samples)
fig.savefig('example_mcmc_corner.png')
#### Save the analysis
## Create a new group to hold the analysis in 'trajectory 0'
dataset = b.smd.load(filename)
trace = dataset['trajectory 0']
mcmc_analysis = trace.create_group("MCMC analysis 20170106")
## Add the priors
b.smd.add.parameter_collection(mcmc_analysis,priors,label='priors')
## Extract the relevant information from the sampler, and save this in the SMD file.
result = b.mcmc.mcmc_result(sampler)
b.smd.add.mcmc(mcmc_analysis,result,label='MCMC posterior samples')
## Save and close the dataset
b.smd.save(dataset)
Laplace approximation and computing the predictive posterior
---------------------------------------------------------------
This script loads the example data, sets some priors, and then finds the Laplace approximation to the posterior distribution. After this, it uses samples from this posterior to calculate the predictive posterior, which is the probability distribution for where you would expect to find new data.
.. code-block:: python
## Imports
import matplotlib.pyplot as plt
import numpy as np
import biasd as b
#### Setup the analysis
## Load the SMD example dataset
filename = './example_dataset.hdf5'
dataset = b.smd.load(filename)
## Select the data from the first trajectory
trace = dataset['trajectory 0']
time = trace['data/time'].value
fret = trace['data/E_{FRET}'].value
## Parse meta-data to load time resolution
tau = trace['data'].attrs['tau']
## Get the simulation ground truth values
truth = trace['data/simulation'].attrs['truth']
## Close the dataset
dataset.close()
#### Perform a Calculation
## Make the prior distribution
## set means to ground truths: (.1, .9, .05, 3., 8.)
e1 = b.distributions.normal(0.1, 0.2)
e2 = b.distributions.normal(0.9, 0.2)
sigma = b.distributions.gamma(1., 1./0.05)
k1 = b.distributions.gamma(1., 1./3.)
k2 = b.distributions.gamma(1., 1./8.)
priors = b.distributions.parameter_collection(e1,e2,sigma,k1,k2)
## Find the Laplace approximation to the posterior
posterior = b.laplace.laplace_approximation(fret,priors,tau)
## Calculate the predictive posterior distribution for visualization
x = np.linspace(-.2,1.2,1000)
samples = posterior.samples(100)
predictive = b.likelihood.predictive_from_samples(x,samples,tau)
#### Save this analysis
## Load the dataset file
dataset = b.smd.load(filename)
## Create a new group to hold the analysis in 'trajectory 0'
trace = dataset['trajectory 0']
laplace_analysis = trace.create_group("Laplace analysis 20161230")
## Add the priors
b.smd.add.parameter_collection(laplace_analysis,priors,label='priors')
## Add the posterior
b.smd.add.laplace_posterior(laplace_analysis,posterior,label='posterior')
## Add the predictive
laplace_analysis.create_dataset('predictive x',data = x)
laplace_analysis.create_dataset('predictive y',data = predictive)
## Save and close the dataset
b.smd.save(dataset)
#### Visualize the results
## Plot a histogram of the data
plt.hist(fret, bins=71, range=(-.2,1.2), normed=True, histtype='stepfilled', alpha=.6, color='blue', label='Data')
## Plot the predictive posterior of the Laplace approximation solution
plt.plot(x, predictive, 'k', lw=2, label='Laplace')
## We know the data was simulated, so:
## plot the probability distribution used to simulate the data
plt.plot(x, np.exp(b.likelihood.nosum_log_likelihood(truth, x, tau)), 'r', lw=2, label='Truth')
## Label Axes and Curves
plt.ylabel('Probability',fontsize=18)
plt.xlabel('Signal',fontsize=18)
plt.legend()
## Make the Axes Pretty
a = plt.gca()
a.spines['right'].set_visible(False)
a.spines['top'].set_visible(False)
a.yaxis.set_ticks_position('left')
a.xaxis.set_ticks_position('bottom')
# Save the figure, then show it
plt.savefig('example_laplace_predictive.png')
plt.show()
| 32.486275 | 302 | 0.719218 |
6fae00ee2a470cc5f731c7892117b69a0f1f4c4c | 331 | rst | reStructuredText | doc/source/mapdl_commands/graphics/views.rst | da1910/pymapdl | 305b70b30e61a78011e974ff4cb409ee21f89e13 | [
"MIT"
] | 194 | 2016-10-21T08:46:41.000Z | 2021-01-06T20:39:23.000Z | doc/source/mapdl_commands/graphics/views.rst | da1910/pymapdl | 305b70b30e61a78011e974ff4cb409ee21f89e13 | [
"MIT"
] | 463 | 2021-01-12T14:07:38.000Z | 2022-03-31T22:42:25.000Z | doc/source/mapdl_commands/graphics/views.rst | da1910/pymapdl | 305b70b30e61a78011e974ff4cb409ee21f89e13 | [
"MIT"
] | 66 | 2016-11-21T04:26:08.000Z | 2020-12-28T09:27:27.000Z | .. _ref_views_api:
*****
Views
*****
.. currentmodule:: ansys.mapdl.core
These GRAPHICS commands are used to control the view of the model.
.. autosummary::
:toctree: _autosummary/
Mapdl.angle
Mapdl.auto
Mapdl.dist
Mapdl.focus
Mapdl.user
Mapdl.vcone
Mapdl.view
Mapdl.vup
Mapdl.xfrm
Mapdl.zoom
| 13.791667 | 66 | 0.670695 |
5ec904182cfa4846b2daf21a9126247a95904511 | 28,339 | rst | reStructuredText | boards/riscv/rv32m1_vega/doc/index.rst | maxvankessel/zephyr | 769d91b922b736860244b22e25328d91d9a17657 | [
"Apache-2.0"
] | 6,224 | 2016-06-24T20:04:19.000Z | 2022-03-31T20:33:45.000Z | boards/riscv/rv32m1_vega/doc/index.rst | Conexiotechnologies/zephyr | fde24ac1f25d09eb9722ce4edc6e2d3f844b5bce | [
"Apache-2.0"
] | 32,027 | 2017-03-24T00:02:32.000Z | 2022-03-31T23:45:53.000Z | boards/riscv/rv32m1_vega/doc/index.rst | Conexiotechnologies/zephyr | fde24ac1f25d09eb9722ce4edc6e2d3f844b5bce | [
"Apache-2.0"
] | 4,374 | 2016-08-11T07:28:47.000Z | 2022-03-31T14:44:59.000Z | .. highlight:: sh
.. _rv32m1_vega:
OpenISA VEGAboard
#################
Overview
********
The VEGAboard contains the RV32M1 SoC, featuring two RISC-V CPUs,
on-die XIP flash, and a full complement of peripherals, including a
2.4 GHz multi-protocol radio. It also has built-in sensors and
Arduino-style expansion connectors.
.. figure:: rv32m1_vega.png
:align: center
:alt: RV32M1-VEGA
OpenISA VEGAboard (image copyright: www.open-isa.org)
The two RISC-V CPUs are named RI5CY and ZERO-RISCY, and are
respectively based on the `PULP platform`_ designs by the same names:
`RI5CY`_ and `ZERO-RISCY`_. RI5CY is the "main" core; it has more
flash and RAM as well as a more powerful CPU design. ZERO-RISCY is a
"secondary" core. The main ZERO-RISCY use-case is as a wireless
coprocessor for applications running on RI5CY. The two cores can
communicate via shared memory and messaging peripherals.
Currently, Zephyr supports RI5CY with the ``rv32m1_vega_ri5cy`` board
configuration name, and ZERO_RISCY with the ``rv32m1_vega_zero_riscy`` board
configuration name.
Hardware
********
The VEGAboard includes the following features.
RV32M1 multi-core SoC:
- 1 MiB flash and 192 KiB SRAM (RI5CY core)
- 256 KiB flash and 128 KiB SRAM (ZERO-RISCY core)
- Low power modes
- DMA support
- Watchdog, CRC, cryptographic acceleration, ADC, DAC, comparator,
timers, PWM, RTC, I2C, UART, SPI, external memory, I2S, smart
card, USB full-speed, uSDHC, and 2.4 GHz multiprotocol radio
peripherals
On-board sensors and peripherals:
- 32 Mbit SPI flash
- 6-axis accelerometer, magnetometer, and temperature sensor (FXOS8700)
- Ambient light sensor
- RGB LED
- microSD card slot
- Antenna interface
Additional features:
- Form-factor compatible with Arduino Uno Rev 3 expansion connector
layout (not all Arduino shields may be pin-compatible)
- UART via USB using separate OpenSDA chip
- RISC-V flash and debug using external JTAG dongle (not included) via
2x5 5 mil pitch connector (commonly called the "ARM 10-pin JTAG"
connector)
Supported Features
==================
Zephyr's RI5CY configuration, ``rv32m1_vega_ri5cy``, currently supports
the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| EVENT | on-chip | event unit interrupt controller |
+-----------+------------+-------------------------------------+
| INTMUX | on-chip | level 2 interrupt controller |
+-----------+------------+-------------------------------------+
| LPTMR | on-chip | lptmr-based system timer |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| TPM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| SENSOR | off-chip | fxos8700 polling; |
| | | fxos8700 trigger; |
+-----------+------------+-------------------------------------+
Zephyr's ZERO-RISCY configuration, ``rv32m1_vega_zero_riscy``, currently
supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| EVENT | on-chip | event unit interrupt controller |
+-----------+------------+-------------------------------------+
| INTMUX | on-chip | level 2 interrupt controller |
+-----------+------------+-------------------------------------+
| LPTMR | on-chip | lptmr-based system timer |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+-------------------------------------+
| TPM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| SENSOR | off-chip | fxos8700 polling; |
| | | fxos8700 trigger; |
+-----------+------------+-------------------------------------+
BLE Software Link Layer experimental support
==================================================
This is an experimental feature supported on the Zephyr's RI5CY
configuration, ``rv32m1_vega_ri5cy``. It uses the Software Link Layer
framework by Nordic Semi to enable the the on-SoC radio and transceiver for
implementing a software defined BLE controller. By using both the controller
and the host stack available in Zephyr, the following BLE samples can be used
with this board:
- beacon
- central
- central_hr
- eddystone
- hci_uart
- ibeacon
- peripheral_csc (Cycling Speed Cadence)
- peripheral_dis (Device Information Service)
- peripheral_esp (Environmental Sensing Service)
- peripheral_hr (Heart Rate)
- peripheral_ht (Health Thermometer)
- peripheral
- scan_adv
.. note::
BLE Software Link Layer limitations:
- no 512/256 Kbps PHY
- no TX power adjustment
Connections and IOs
===================
RV32M1 SoC pins are brought out to Arduino-style expansion connectors.
These are 2 pins wide each, adding an additional row of expansion pins
per header compared to the standard Arduino layout.
They are described in the tables in the following subsections. Since
pins are usually grouped by logical function in rows on these headers,
the odd- and even-numbered pins are listed in separate tables. The
"Port/bit" columns refer to the SoC PORT and GPIO peripheral
naming scheme, e.g. "E/13" means PORTE/GPIOE pin 13.
See the schematic and chip reference manual for details.
(Documentation is available from the `OpenISA GitHub releases`_ page.)
.. note::
Pins with peripheral functionality may also be muxed as GPIOs.
**Top right expansion header (J1)**
Odd/bottom pins:
=== ======== =================
Pin Port/bit Function
=== ======== =================
1 E/13 I2S_TX_BCLK
3 E/14 I2S_TX_FS
5 E/15 I2S_TXD
7 E/19 I2S_MCLK
9 E/16 I2S_RX_BCLK
11 E/21 SOF_OUT
13 E/17 I2S_RX_FS
15 E/18 I2S_RXD
=== ======== =================
Even/top pins:
=== ======== =================
Pin Port/bit Function
=== ======== =================
2 A/25 UART1_RX
4 A/26 UART1_TX
6 A/27 GPIO
8 B/13 PWM
10 B/14 GPIO
12 A/30 PWM
14 A/31 PWM/CMP
16 B/1 GPIO
=== ======== =================
**Top left expansion header (J2)**
Odd/bottom pins:
=== ======== =================
Pin Port/bit Function
=== ======== =================
1 D/5 FLEXIO_D25
3 D/4 FLEXIO_D24
5 D/3 FLEXIO_D23
7 D/2 FLEXIO_D22
9 D/1 FLEXIO_D21
11 D/0 FLEXIO_D20
13 C/30 FLEXIO_D19
15 C/29 FLEXIO_D18
17 C/28 FLEXIO_D17
19 B/29 FLEXIO_D16
=== ======== =================
Even/top pins:
=== ======== =================
Pin Port/bit Function
=== ======== =================
2 B/2 GPIO
4 B/3 PWM
6 B/6 SPI0_PCS2
8 B/5 SPI0_SOUT
10 B/7 SPI0_SIN
12 B/4 SPI0_SCK
14 - GND
16 - AREF
18 C/9 I2C0_SDA
20 C/10 I2C0_SCL
=== ======== =================
**Bottom left expansion header (J3)**
Note that the headers at the bottom of the board have odd-numbered
pins on the top, unlike the headers at the top of the board.
Odd/top pins:
=== ======== ====================
Pin Port/bit Function
=== ======== ====================
1 A/21 ARDUINO_EMVSIM_PD
3 A/20 ARDUINO_EMVSIM_IO
5 A/19 ARDUINO_EMVSIM_VCCEN
7 A/18 ARDUINO_EMVSIM_RST
9 A/17 ARDUINO_EMVSIM_CLK
11 B/17 FLEXIO_D7
13 B/16 FLEXIO_D6
15 B/15 FLEXIO_D5
=== ======== ====================
Even/bottom pins: note that these are mostly power-related.
=== ======== =================
Pin Port/bit Function
=== ======== =================
2 - SDA_GPIO0
4 - BRD_IO_PER
6 - RST_SDA
8 - BRD_IO_PER
10 - P5V_INPUT
12 - GND
14 - GND
16 - P5-9V VIN
=== ======== =================
**Bottom right expansion header (J4)**
Note that the headers at the bottom of the board have odd-numbered
pins on the top, unlike the headers at the top of the board.
Odd/top pins:
=== ======== ========================================
Pin Port/bit Function
=== ======== ========================================
1 - TAMPER2
3 - TAMPER1/RTC_CLKOUT
5 - TAMPER0/RTC_WAKEUP_b
7 E/2 ADC0_SE19
9 E/5 LPCMP1_IN2/LPCMP1_OUT
11 - DAC0_OUT/ADC0_SE16/LPCMP0_IN3/LPCMP1_IN3
=== ======== ========================================
Even/bottom pins:
=== ======== ===========================================
Pin Port/bit Function
=== ======== ===========================================
2 C/11 ADC0_SE6
4 C/12 ADC0_SE7
6 B/9 ADC0_SE3
8 E/4 ADC0_SE21
10 E/10 ADC0_SE19 (and E/10, I2C3_SDA via 0 Ohm DNP)
12 E/11 ADC0_SE20 (and E/11, I2C3_SCL via 0 Ohm DNP)
=== ======== ===========================================
Additional Pins
---------------
For an up-to-date description of additional pins (such as buttons,
LEDs, etc.) supported by Zephyr, see the board DTS files in the Zephyr
source code, i.e.
:zephyr_file:`boards/riscv/rv32m1_vega/rv32m1_vega_ri5cy.dts` for RI5CY and
:zephyr_file:`boards/riscv/rv32m1_vega/rv32m1_vega_zero_riscy.dts` for
ZERO-RISCY.
See the schematic in the documentation available from the `OpenISA
GitHub releases`_ page for additional details.
System Clocks
=============
The RI5CY and ZERO-RISCY cores are configured to use the slow internal
reference clock (SIRC) as the clock source for an LPTMR peripheral to manage
the system timer, and the fast internal reference clock (FIRC) to generate a
48MHz core clock.
Serial Port
===========
The USB connector at the top left of the board (near the RESET button) is
connected to an OpenSDA chip which provides a serial USB device. This is
connected to the LPUART0 peripheral which the RI5CY and ZERO-RISCY cores use by
default for console and logging.
.. warning::
The OpenSDA chip cannot be used to flash or debug the RISC-V cores.
See the next section for flash and debug instructions for the
RISC-V cores using an external JTAG dongle.
Programming and Debugging
*************************
.. _rv32m1-programming-hw:
.. important::
To use this board, you will need:
- a `SEGGER J-Link`_ debug probe to debug the RISC-V cores
- a J-Link `9-Pin Cortex-M Adapter`_ board and ribbon cable
- the SEGGER `J-Link Software and Documentation Pack`_ software
installed
A JTAG dongle is not included with the board itself.
Follow these steps to:
#. Get a toolchain and OpenOCD
#. Set up the board for booting RI5CY
#. Compile a Zephyr application for the RI5CY core
#. Flash the application to your board
#. Debug the board using GDB
.. _rv32m1-toolchain-openocd:
Get the Toolchain and OpenOCD
=============================
Before programming and debugging, you first need to get a GNU
toolchain and an OpenOCD build. There are vendor-specific versions of
each for the RV32M1 SoC\ [#toolchain_openocd]_.
Option 1 (Recommended): Prebuilt Toolchain and OpenOCD
------------------------------------------------------
The following prebuilt toolchains and OpenOCD archives are available
on the `OpenISA GitHub releases`_ page:
- :file:`Toolchain_Linux.tar.gz`
- :file:`Toolchain_Mac.tar.gz`
- :file:`Toolchain_Windows.zip`
Download and extract the archive for your system, then extract the
toolchain and OpenOCD archives inside.
Linux::
tar xvzf Toolchain_Linux.tar.gz
tar xvzf openocd.tar.gz
tar xvzf riscv32-unknown-elf-gcc.tar.gz
mv openocd ~/rv32m1-openocd
mv riscv32-unknown-elf-gcc ~
macOS (unfortunately, the OpenISA 1.0.0 release's Mac
:file:`riscv32-unknown-elf-gcc.tar.gz` file doesn't expand into a
:file:`riscv32-unknown-elf-gcc` directory, so it has to be created)::
tar xvzf Toolchain_Mac.tar.gz
tar xvzf openocd.tar.gz
mkdir riscv32-unknown-elf-gcc
mv riscv32-unknown-elf-gcc.tar.gz riscv32-unknown-elf-gcc
cd riscv32-unknown-elf-gcc/
tar xvzf riscv32-unknown-elf-gcc.tar.gz
cd ..
mv openocd ~/rv32m1-openocd
mv riscv32-unknown-elf-gcc ~
Windows:
#. Extract :file:`Toolchain_Windows.zip` in the file manager
#. Extract the :file:`openocd.zip` and :file:`riscv32-unknown-elf-gcc.zip` files
in the resulting :file:`Toolchain_Windows` folder
#. Move the extracted :file:`openocd` folder to :file:`C:\\rv32m1-openocd`
#. Move the extracted :file:`riscv32-unknown-elf-gcc` folder to
:file:`C:\\riscv32-unknown-elf-gcc`
For simplicity, this guide assumes:
- You put the extracted toolchain at :file:`~/riscv32-unknown-elf-gcc`
on macOS or Linux, and :file:`C:\\riscv32-unknown-elf-gcc` on
Windows.
- You put the extracted OpenOCD binary at :file:`~/rv32m1-openocd` on
macOS or Linux, and the OpenOCD folder into :file:`C:\\rv32m1-openocd`
on Windows.
You can put them elsewhere, but be aware:
- If you put the toolchain somewhere else, you will need to change
the :envvar:`CROSS_COMPILE` value described below accordingly.
- If you put OpenOCD somewhere else, you will need to change the
OpenOCD path in the flashing and debugging instructions below.
- Don't use installation directories with spaces anywhere in the path;
this won't work with Zephyr's build system.
Option 2: Building Toolchain and OpenOCD From Source
----------------------------------------------------
See :ref:`rv32m1_vega_toolchain_build`.
.. _rv32m1-vega-jtag:
JTAG Setup
==========
This section describes how to connect to your board via the J-Link
debugger and adapter board. See the :ref:`above information
<rv32m1-programming-hw>` for details on required hardware.
#. Connect the J-Link debugger through the adapter board to the
VEGAboard as shown in the figure.
.. figure:: rv32m1_vega_jtag.jpg
:align: center
:alt: RV32M1-VEGA
VEGAboard connected properly to J-Link debugger.
VEGAboard connector J55 should be used. Pin 1 is on the bottom left.
#. Power the VEGAboard via USB. The OpenSDA connector at the top left
is recommended for UART access.
#. Make sure your J-Link is connected to your computer via USB.
One-Time Board Setup For Booting RI5CY or ZERO-RISCY
====================================================
Next, you'll need to make sure your board boots the RI5CY or ZERO-RISCY core.
**You only need to do this once.**
The RV32M1 SoC on the VEGAboard has multiple cores, any of which can
be selected as the boot core. Before flashing and debugging, you'll
first make sure you're booting the right core.
**Linux and macOS**:
.. note::
Linux users: to run these commands as a normal user, you will need
to install the `60-openocd.rules`_ udev rules file (usually by
placing it in :file:`/etc/udev/rules.d`, then unplugging and
plugging the J-Link in again via USB).
.. note::
These Zephyr-specific instructions differ slightly from the
equivalent SDK ones. The Zephyr OpenOCD configuration file does not
run ``init``, so you have to do it yourself as explained below.
1. In one terminal, use OpenOCD to connect to the board::
~/rv32m1-openocd -f boards/riscv/rv32m1_vega/support/openocd_rv32m1_vega_ri5cy.cfg
The output should look like this:
.. code-block:: none
$ ~/rv32m1-openocd -f boards/riscv/rv32m1_vega/support/openocd_rv32m1_vega_ri5cy.cfg
Open On-Chip Debugger 0.10.0+dev-00431-ge1ec3c7d (2018-10-31-07:29)
[...]
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
2. In another terminal, connect to OpenOCD's telnet server and execute
the ``init`` and ``ri5cy_boot`` commands **with the reset button on
the board (at top left) pressed down**::
$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> ri5cy_boot
To boot the ZERO-RISCY core instead, replace ``ri5cy_boot`` above with
``zero_boot``.
The reset button is at top left, as shown in the following figure.
.. figure:: ri5cy_boot.jpg
:align: center
:width: 4in
:alt: Reset button is pressed
Now quit the telnet session in this terminal and exit OpenOCD in the
other terminal.
3. Unplug your J-Link and VEGAboard, and plug them back in.
**Windows**:
In one cmd.exe prompt in the Zephyr directory::
C:\rv32m1-openocd\bin\openocd.exe rv32m1-openocd -f boards\riscv32\rv32m1_vega\support\openocd_rv32m1_vega_ri5cy.cfg
In a telnet program of your choice:
#. Connect to localhost port 4444 using telnet.
#. Run ``init`` and ``ri5cy_boot`` as shown above, with RESET held down.
#. Quit the OpenOCD and telnet sessions.
#. Unplug your J-Link and VEGAboard, and plug them back in.
To boot the ZERO-RISCY core instead, replace ``ri5cy_boot`` above with
``zero_boot``.
Compiling a Program
===================
.. important::
These instructions assume you've set up a development system,
cloned the Zephyr repository, and installed Python dependencies as
described in the :ref:`getting_started`.
You should also have already downloaded and installed the toolchain
and OpenOCD as described above in :ref:`rv32m1-toolchain-openocd`.
The first step is to set up environment variables to point at your
toolchain and OpenOCD::
# Linux or macOS
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE=~/riscv32-unknown-elf-gcc/bin/riscv32-unknown-elf-
# Windows
set ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
set CROSS_COMPILE=C:\riscv32-unknown-elf-gcc\bin\riscv32-unknown-elf-
.. note::
The above only sets these variables for your current shell session.
You need to make sure this happens every time you use this board.
Now let's compile the :ref:`hello_world` application. (You can try
others as well; see :ref:`samples-and-demos` for more.)
.. We can't use zephyr-app-commands to provide build instructions
due to the below mentioned linker issue.
Due to a toolchain `linker issue`_, you need to add an option setting
``CMAKE_REQUIRED_FLAGS`` when running CMake to generate a build system
(see :ref:`application` for information about Zephyr's build system).
Linux and macOS (run this in a terminal from the Zephyr directory)::
# Set up environment and create build directory:
source zephyr-env.sh
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:tool: cmake
:cd-into:
:board: rv32m1_vega_ri5cy
:gen-args: -DCMAKE_REQUIRED_FLAGS=-Wl,-dT=/dev/null
:goals: build
Windows (run this in a ``cmd`` prompt, from the Zephyr directory)::
# Set up environment and create build directory
zephyr-env.cmd
cd samples\hello_world
mkdir build & cd build
# Use CMake to generate a Ninja-based build system:
type NUL > empty.ld
cmake -GNinja -DBOARD=rv32m1_vega_ri5cy -DCMAKE_REQUIRED_FLAGS=-Wl,-dT=%cd%\empty.ld ..
# Build the sample
ninja
Flashing
========
.. note::
Make sure you've done the :ref:`JTAG setup <rv32m1-vega-jtag>`, and
that the VEGAboard's top left USB connector is connected to your
computer too (for UART access).
.. note::
Linux users: to run these commands as a normal user, you will need
to install the `60-openocd.rules`_ udev rules file (usually by
placing it in :file:`/etc/udev/rules.d`, then unplugging and
plugging the J-Link in again via USB).
Make sure you've followed the above instructions to set up your board
and build a program first.
Since you need to use a special OpenOCD, the easiest way to flash is
by using :ref:`west flash <west-build-flash-debug>` instead of ``ninja
flash`` like you might see with other Zephyr documentation.
Run these commands from the build directory where you ran ``ninja`` in
the above section.
Linux and macOS::
# Don't use "~/rv32m1-openocd". It won't work.
west flash --openocd=$HOME/rv32m1-openocd
Windows::
west flash --openocd=C:\rv32m1-openocd\bin\openocd.exe
If you have problems:
- Make sure you don't have another ``openocd`` process running in the
background.
- Unplug the boards and plug them back in.
- On Linux, make sure udev rules are installed, as described above.
As an alternative, for manual steps to run OpenOCD and GDB to flash,
see the `SDK README`_.
Debugging
=========
.. note::
Make sure you've done the :ref:`JTAG setup <rv32m1-vega-jtag>`, and
that the VEGAboard's top left USB connector is connected to your
computer too (for UART access).
.. note::
Linux users: to run these commands as a normal user, you will need
to install the `60-openocd.rules`_ udev rules file (usually by
placing it in :file:`/etc/udev/rules.d`, then unplugging and
plugging the J-Link in again via USB).
Make sure you've followed the above instructions to set up your board
and build a program first.
To debug with gdb::
# Linux, macOS
west debug --openocd=$HOME/rv32m1-openocd
# Windows
west debug --openocd=C:\rv32m1-openocd\bin\openocd.exe
Then, from the ``(gdb)`` prompt, follow these steps to halt the core,
load the binary (:file:`zephyr.elf`), and re-sync with the OpenOCD
server::
(gdb) monitor init
(gdb) monitor reset halt
(gdb) load
(gdb) monitor gdb_sync
(gdb) stepi
You can then set breakpoints and debug using normal GDB commands.
.. note::
GDB can get out of sync with the target if you execute commands
that reset it. To reset RI5CY and get GDB back in sync with it
without reloading the binary::
(gdb) monitor reset halt
(gdb) monitor gdb_sync
(gdb) stepi
If you have problems:
- Make sure you don't have another ``openocd`` process running in the
background.
- Unplug the boards and plug them back in.
- On Linux, make sure udev rules are installed, as described above.
References
**********
- OpenISA developer portal: http://open-isa.org
- `OpenISA GitHub releases`_: includes toolchain and OpenOCD
prebuilts, as well as documentation, such as the SoC datasheet and
reference manual, board schematic and user guides, etc.
- Base toolchain: `pulp-riscv-gnu-toolchain`_; extra toolchain patches:
`rv32m1_gnu_toolchain_patch`_ (only needed if building from source).
- OpenOCD repository: `rv32m1-openocd`_ (only needed if building from
source).
- Vendor SDK: `rv32m1_sdk_riscv`_. Contains HALs, non-Zephyr sample
applications, and information on using the board with Eclipse which
may be interesting when combined with the Eclipse Debugging
information in the :ref:`application`.
.. _rv32m1_vega_toolchain_build:
Appendix: Building Toolchain and OpenOCD from Source
****************************************************
.. note::
Toolchain and OpenOCD build instructions are provided for Linux and
macOS only.
Instructions for building OpenOCD have only been verified on Linux.
.. warning::
Don't use installation directories with spaces anywhere in
the path; this won't work with Zephyr's build system.
Ubuntu 18.04 users need to install these additional dependencies::
sudo apt-get install autoconf automake autotools-dev curl libmpc-dev \
libmpfr-dev libgmp-dev gawk build-essential bison \
flex texinfo gperf libtool patchutils bc zlib1g-dev \
libusb-1.0-0-dev libudev1 libudev-dev g++
Users of other Linux distributions need to install the above packages
with their system package manager.
macOS users need to install dependencies with Homebrew::
brew install gawk gnu-sed gmp mpfr libmpc isl zlib
The build toolchain is based on the `pulp-riscv-gnu-toolchain`_, with
some additional patches hosted in a separate repository,
`rv32m1_gnu_toolchain_patch`_. To build the toolchain, follow the
instructions in the ``rv32m1_gnu_toolchain_patch`` repository's
`readme.md`_ file to apply the patches, then run::
./configure --prefix=<toolchain-installation-dir> --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
make
If you set ``<toolchain-installation-dir>`` to
:file:`~/riscv32-unknown-elf-gcc`, you can use the above instructions
for setting :envvar:`CROSS_COMPILE` when building Zephyr
applications. If you set it to something else, you will need to update
your :envvar:`CROSS_COMPILE` setting accordingly.
.. note::
Strangely, there is no separate ``make install`` step for the
toolchain. That is, the ``make`` invocation both builds and
installs the toolchain. This means ``make`` has to be run as root
if you want to set ``--prefix`` to a system directory such as
:file:`/usr/local` or :file:`/opt` on Linux.
To build OpenOCD, clone the `rv32m1-openocd`_ repository, then run
these from the repository top level::
./bootstrap
./configure --prefix=<openocd-installation-dir>
make
make install
If ``<openocd-installation-dir>`` is :file:`~/rv32m1-openocd`, you
should set your OpenOCD path to :file:`~/rv32m1-openocd/bin/openocd`
in the above flash and debug instructions.
.. _RI5CY:
https://github.com/pulp-platform/riscv
.. _ZERO-RISCY:
https://github.com/pulp-platform/zero-riscy
.. _PULP platform:
http://iis-projects.ee.ethz.ch/index.php/PULP
.. _pulp-riscv-gnu-toolchain:
https://github.com/pulp-platform/pulp-riscv-gnu-toolchain
.. _rv32m1_gnu_toolchain_patch:
https://github.com/open-isa-rv32m1/rv32m1_gnu_toolchain_patch
.. _rv32m1-openocd:
https://github.com/open-isa-rv32m1/rv32m1-openocd
.. _readme.md:
https://github.com/open-isa-rv32m1/rv32m1_gnu_toolchain_patch/blob/master/readme.md
.. _OpenISA GitHub releases:
https://github.com/open-isa-org/open-isa.org/releases
.. _rv32m1_sdk_riscv:
https://github.com/open-isa-rv32m1/rv32m1_sdk_riscv
.. _linker issue:
https://github.com/pulp-platform/pulpino/issues/240
.. _60-openocd.rules:
https://github.com/open-isa-rv32m1/rv32m1-openocd/blob/master/contrib/60-openocd.rules
.. _SEGGER J-Link:
https://www.segger.com/products/debug-probes/j-link/
.. _9-Pin Cortex-M Adapter:
https://www.segger.com/products/debug-probes/j-link/accessories/adapters/9-pin-cortex-m-adapter/
.. _J-Link Software and Documentation Pack:
https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack
.. _SDK README:
https://github.com/open-isa-rv32m1/rv32m1_sdk_riscv/blob/master/readme.md
.. rubric:: Footnotes
.. [#toolchain_openocd]
For Linux users, the RISC-V toolchain in the :ref:`Zephyr SDK
<zephyr_sdk>` may work, but it hasn't been thoroughly tested with this
SoC, and will not allow use of any available RISC-V ISA extensions.
Support for the RV32M1 SoC is not currently available in the OpenOCD
upstream repository or the OpenOCD build in the Zephyr SDK.
| 33.616845 | 117 | 0.631391 |
f679fd38e093ab26745236cc420ea96f512cd961 | 3,259 | rst | reStructuredText | source/samples/add-list-member.rst | alex/documentation | 57e82f91bb9b6d51ca8ba2c524501945c46454dd | [
"MIT"
] | 1 | 2015-11-08T13:02:03.000Z | 2015-11-08T13:02:03.000Z | source/samples/add-list-member.rst | alex/documentation | 57e82f91bb9b6d51ca8ba2c524501945c46454dd | [
"MIT"
] | null | null | null | source/samples/add-list-member.rst | alex/documentation | 57e82f91bb9b6d51ca8ba2c524501945c46454dd | [
"MIT"
] | null | null | null |
.. code-block:: bash
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
https://api.mailgun.net/v2/lists/dev@samples.mailgun.org/members \
-F subscribed=True \
-F address='bar@example.com' \
-F name='Bob Bar' \
-F description='Developer' \
-F vars='{"age": 26}'
.. code-block:: java
public static ClientResponse AddListMember() {
Client client = Client.create();
client.addFilter(new HTTPBasicAuthFilter("api",
"key-3ax6xnjp29jd6fds4gc373sgvjxteol0"));
WebResource webResource =
client.resource("https://api.mailgun.net/v2/lists/" +
"dev@samples.mailgun.org/members");
MultivaluedMapImpl formData = new MultivaluedMapImpl();
formData.add("address", "bar@example.com");
formData.add("subscribed", true);
formData.add("name", "Bob Bar");
formData.add("description", "Developer");
formData.add("vars", "{\"age\": 26}");
return webResource.type(MediaType.APPLICATION_FORM_URLENCODED).
post(ClientResponse.class, formData);
}
.. code-block:: php
# Include the Autoloader (see "Libraries" for install instructions)
require 'vendor/autoload.php';
use Mailgun\Mailgun;
# Instantiate the client.
$mgClient = new Mailgun('key-3ax6xnjp29jd6fds4gc373sgvjxteol0');
$listAddress = 'dev@samples.mailgun.org';
# Issue the call to the client.
$result = $mgClient->post("lists/$listAddress/members",
array('address' => 'bar@example.com',
'name' => 'Bob Bar',
'description' => 'Developer',
'subscribed' => true,
'vars' => '{"age": 26}'));
.. code-block:: py
def add_list_member():
return requests.post(
"https://api.mailgun.net/v2/lists/dev@samples.mailgun.org/members",
auth=('api', 'key-3ax6xnjp29jd6fds4gc373sgvjxteol0'),
data={'subscribed': True,
'address': 'bar@example.com',
'name': 'Bob Bar',
'description': 'Developer',
'vars': '{"age": 26}'})
.. code-block:: rb
def add_list_member
RestClient.post("https://api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0" \
"@api.mailgun.net/v2/lists/dev@samples.mailgun.org/members",
:subscribed => true,
:address => 'bar@example.com',
:name => 'Bob Bar',
:description => 'Developer',
:vars => '{"age": 26}')
end
.. code-block:: csharp
public static IRestResponse AddListMember() {
RestClient client = new RestClient();
client.BaseUrl = "https://api.mailgun.net/v2";
client.Authenticator =
new HttpBasicAuthenticator("api",
"key-3ax6xnjp29jd6fds4gc373sgvjxteol0");
RestRequest request = new RestRequest();
request.Resource = "lists/{list}/members";
request.AddParameter("list", "dev@samples.mailgun.org", ParameterType.UrlSegment);
request.AddParameter("address", "bar@example.com");
request.AddParameter("subscribed", true);
request.AddParameter("name", "Bob Bar");
request.AddParameter("description", "Developer");
request.AddParameter("vars", "{\"age\": 26}");
request.Method = Method.POST;
return client.Execute(request);
}
| 35.423913 | 84 | 0.618288 |
bfa7048970aa45bee16e06a344d04d330449e27a | 1,944 | rst | reStructuredText | docs/user_guide/upsampling_map.rst | xingyu-liu/dnnbrain | 297899952fb9f2182a6ed527b5083d2f75a3e79c | [
"MIT"
] | 35 | 2019-07-02T01:26:01.000Z | 2021-12-02T11:04:59.000Z | docs/user_guide/upsampling_map.rst | Blink621/dnnbrain | 65ca779e8b7d886656553a8ff4318b29de84a342 | [
"MIT"
] | 52 | 2019-07-06T01:09:27.000Z | 2020-08-01T09:05:41.000Z | docs/user_guide/upsampling_map.rst | Blink621/dnnbrain | 65ca779e8b7d886656553a8ff4318b29de84a342 | [
"MIT"
] | 74 | 2019-07-01T06:55:58.000Z | 2022-03-04T06:03:48.000Z | Upsampling Map
==========================
Upsampling map is a way to visualize which regions of the image lead to the high unit activations.
Before generating the upsampling map, you need to ensure that the images can be highly activated by the given unit in DNN,
which can be obtained using `dnn_topstim <https://dnnbrain.readthedocs.io/en/latest/docs/cmd/dnn_topstim.html>`__
(Select the topK stimuli from a stimulus set).
The procedures are as follows. First, we feed the image into the network and get its feaure map at the given channel.
Then we use some interpolate method to upsample the feaure map into the original image space. After setting the threshold
to filter the map, we finally get the upsampling map.
There is an example of up-sampling(us)method through
using python library of DNNBrain.
The original image used in this doc is displayed as below:
.. raw:: html
<center>
|original|
.. raw:: html
</center>
Example
-------
::
import numpy as np
import matplotlib.pyplot as plt
from dnnbrain.dnn.base import ip
from dnnbrain.dnn.models import AlexNet
from dnnbrain.dnn.algo import UpsamplingActivationMapping
# Prepare DNN and image
dnn = AlexNet()
image = plt.imread('ILSVRC_val_00095233.JPEG')
# Using up-sampling(us) method to display
# regions of the image that contribute to
# the activation of the 122th unit of conv5.
up_estimator =UpsamplingActivationMapping(dnn, 'conv5', 122)
up_estimator.set_params(interp_meth='bicubic', interp_threshold=0.95)
img_out = up_estimator.compute(image)
# transform to PIL image and save out
img_out = ip.to_pil(img_out, True)
img_out.save('ILSVRC_val_00095233_rf_us.JPEG')
The receptive field upsampling is displayed as below:
.. raw:: html
<center>
|vanilla|
.. raw:: html
</center>
.. |original| image:: ../img/ILSVRC_val_00095233.JPEG
.. |vanilla| image:: ../img/ILSVRC_val_00095233_rf_us.JPEG
| 27.771429 | 122 | 0.735597 |
a8d4a00069fb9b9e3da4ec274e3e8590171d306d | 962 | rst | reStructuredText | doc/rst/tutor/lib/network/network.rst | hydratk/hydratk-lib-network | 79b698998bac9a04b5a345e5d3212c87b5564af3 | [
"BSD-3-Clause"
] | null | null | null | doc/rst/tutor/lib/network/network.rst | hydratk/hydratk-lib-network | 79b698998bac9a04b5a345e5d3212c87b5564af3 | [
"BSD-3-Clause"
] | null | null | null | doc/rst/tutor/lib/network/network.rst | hydratk/hydratk-lib-network | 79b698998bac9a04b5a345e5d3212c87b5564af3 | [
"BSD-3-Clause"
] | null | null | null | .. _tutor_lib_network:
=======
Network
=======
Network library provides clients/API for many network protocols and technologies.
* Database: client for databases: SQLite, Oracle, MySQL, PostgreSQL, JDBC, MSSQL
NoSQL: Redis, MongoDB, Cassandra
* Email: client for protocols: SMTP, POP, IMAP
* FTP: client for protocols: FTP/FTP, SFTP, TFTP
* INET: client for protocols: IP, TCP, UDP
* Java: bridge to Java VM which enables interaction with Java code
* JMS: client for protocols: JMS, STOMP, AMQP, MQTT
* LDAP: client for LDAP protocol
* REST: client for HTTP/HTTPS protocol
* RPC: client for Java RMI, XML-RPC, JSON-RPC
* Selenium: bridge to Selenium API for web GUI interaction
* SOAP: client for SOAP protocol
* Terminal: client for SSH protocol
.. toctree::
:maxdepth: 1
tut1_dbi
tut2_email
tut3_ftp
tut4_inet
tut5_java
tut6_jms
tut7_ldap
tut8_rest
tut9_rpc
tut10_selen
tut11_soap
tut12_term | 26 | 81 | 0.711019 |
5a191e10f485d2bb5ddba26ef55a1a3d69c36d1a | 189 | rst | reStructuredText | doc/source/reference/api/multitask_queue.multitask.MultitasksOrganizer.put.rst | josephnowak/multitask_organizer | f741d3e58966ec77d33f716c39ac12e4405e2121 | [
"Unlicense"
] | 2 | 2021-08-11T01:15:39.000Z | 2021-12-07T14:25:08.000Z | doc/source/reference/api/multitask_queue.multitask.MultitasksOrganizer.put.rst | josephnowak/multitask_organizer | f741d3e58966ec77d33f716c39ac12e4405e2121 | [
"Unlicense"
] | null | null | null | doc/source/reference/api/multitask_queue.multitask.MultitasksOrganizer.put.rst | josephnowak/multitask_organizer | f741d3e58966ec77d33f716c39ac12e4405e2121 | [
"Unlicense"
] | null | null | null | multitask\_queue.multitask.MultitasksOrganizer.put
==================================================
.. currentmodule:: multitask_queue.multitask
.. automethod:: MultitasksOrganizer.put | 31.5 | 51 | 0.608466 |
cf308760627f57122248c7bd0aa828346c56d2df | 261 | rst | reStructuredText | docs/index.rst | radiasoft/rsopal | 14e8ecca770b57c429e919a6fe211166ea354f3c | [
"Apache-2.0"
] | null | null | null | docs/index.rst | radiasoft/rsopal | 14e8ecca770b57c429e919a6fe211166ea354f3c | [
"Apache-2.0"
] | null | null | null | docs/index.rst | radiasoft/rsopal | 14e8ecca770b57c429e919a6fe211166ea354f3c | [
"Apache-2.0"
] | null | null | null | Welcome to rsopal
=================
Python library for working with the OPAL tracking code from PSI in Switzerland.
.. toctree::
:maxdepth: 2
rsopal
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| 14.5 | 79 | 0.601533 |
a50d617fbc444e5bac05a84252dda7dcecf758f1 | 4,848 | rst | reStructuredText | docs/changelog/v1.0.0.rst | vsaase/pynetdicom | a2d21efeec932e09c178b9794794d94c556bf5a9 | [
"MIT"
] | 274 | 2019-01-04T01:45:13.000Z | 2022-03-29T13:59:46.000Z | docs/changelog/v1.0.0.rst | vsaase/pynetdicom | a2d21efeec932e09c178b9794794d94c556bf5a9 | [
"MIT"
] | 386 | 2018-12-28T10:46:44.000Z | 2022-03-26T00:57:10.000Z | docs/changelog/v1.0.0.rst | vsaase/pynetdicom | a2d21efeec932e09c178b9794794d94c556bf5a9 | [
"MIT"
] | 100 | 2019-01-18T13:43:42.000Z | 2022-03-23T13:35:39.000Z | .. _v1.0.0:
1.0.0
=====
Fixes
.....
* Fixed upstream pydicom changes to AE elements breaking logging
(:issue:`195`)
* Fixed typos in SOP class names, fix bad UID
* Fixed SCP/SCU Role Negotiation requiring both SCP and SCU role values to be
set (as association requestor)
* Starting with v1.0.0, versioning should be consistent
Changes
.......
* ``applicationentity`` module renamed ``ae``
* ``ApplicationEntity`` interface updated
- Removed the following: ``AE.scu_supported_sop``, ``AE.scp_supported_sop``,
``AE.transfer_syntax``, ``AE.presentation_contexts_scu``,
``AE.presentation_contexts_scp``.
- ``scu_sop_class``, ``scp_sop_class``, ``transfer_syntax`` and ``bind_addr``
arguments removed from ``AE`` initialisation.
- Added ``AE.bind_addr`` attribute to allow the user to specify the network
adapter.
- Added ``AE.add_supported_context()``, ``AE.supported_contexts``,
``AE.remove_supported_context()`` for adding and removing the presentation
contexts supported as an SCP.
- Added ``AE.add_requested_context()``, ``AE.requested_contexts``,
``AE.remove_requested_context()`` for adding and removing the presentation
contexts requested as an SCU.
* Removed ``VerificationSOPClass``, ``StorageSOPClassList`` and
``QueryRetrieveSOPClassList``.
* Added ``VerificationPresentationContexts``, ``StoragePresentationContexts``,
``QueryRetrievePresentationContexts`` and
``BasicWorklistManagmentPresentationContexts`` to replace them
* Added ``service_class`` module and moved the service class implementations
from ``sop_class`` to ``service_class``.
* The three Query/Retrieve service class implementations (Find, Get, Move) have
been consolidated into one.
* ``BasicWorklistManagementServiceClass`` reimplemented separately from QR.
* ``SOPClass`` class added to ``sop_class`` module and all SOP Class objects
now inherit from it rather than the corresponding service class.
* ``utils.PresentationContextManager`` removed
* ``MaximumLengthNegotiation`` changed to ``MaximumLengthNotification``
* ``ImplementationClassUIDNegotiation`` changed to ``ImplementationClassUIDNotification``
* ``ImplementationVersionNameNegotiation`` changed to ``ImplementationVersioNameNotification``
* Simplified ``service_class.ServiceClass`` interface
* ``ACSE`` refactored to do more of the association negotiation work and to
operate independently of the Association instance.
- Added ``send_abort``, ``send_ap_abort``, ``send_reject``, ``send_release``
``send_request``, ``send_accept`` methods
- Added ``negotiate_association`` method
- Added ``release_association`` method
* Added ``association.ServiceUser`` class
* ``Association`` refactored to do less association negotiation work and to
operate independently of the ACSE instance.
- Added ``Association.requestor`` and ``Association.acceptor`` attributes
which are ``ServiceUser`` instances that track the association requestor
and acceptor.
* Project named changed from pynetdicom3 to pynetdicom
Enhancements
............
* Add ``context`` and ``info`` parameters to on_c_* callbacks (:issue:`45`,
:issue:`54`, :issue:`65`, :issue:`106`)
* Added contribution, issue and PR guides (:issue:`66`)
* Added PEP8 conformant ``PYNETDICOM_IMPLEMENTATION_VERSION`` and
``PYNETDICOM_IMPLEMENTATION_UID`` variables. The old ones will be removed in
v1.0
* Added ``AE.implementation_version_name`` and ``AE.implementation_class_uid``
attributes so user's can specify the values used during association
negotiation.
* Allow per-association presentation context requests (SCU)
* Allow more than 128 supported presentation contexts (SCP)
* Documentation added: user guide, examples, API reference (:issue:`1`,
:issue:`45`, :issue:`49`, :issue:`50`)
* Add support for QR Instance and Frame Level Retrieve
* Add support for QR Composite Instance Root Retrieval
* Add support for the Relevant Patient Information Query service
* Add support for the Hanging Protocol QR service
* Add support for the Substance Administration Query service
* Add support for the Color Palette QR service
* Add support for the Implant Template QR service
* Add support for the Non-Patient Information Storage service
* Add support for the Defined Procedure Protocol QR service
* Add support for the Display System Management service
* Add support for N-GET, N-SET, N-EVENT-REPORT, N-DELETE, N-ACTION, N-CREATE
as SCU.
* Add full support for SCP/SCU Role Selection Negotiation
* Add support for SOP Class Extended Negotiation
* Add support for Asynchronous Operations Window Negotiation, however
pynetdicom does not support asynchronous operations.
* Add support for User Identity Negotiation
* Add support for SOP Class Common Extended Negotiation
* Non-conformant (null trailing padded) UIDs in A-ASSOCIATE messages are now
handled
| 45.735849 | 94 | 0.760932 |
bf5deb0e6909c7e64d749ce276efd8a324bfb4e6 | 1,537 | rst | reStructuredText | includes_resources/includes_resource_remote_directory_recursive.rst | jblaine/chef-docs | dc540f7bbc2d3eedb05a74f34b1caf25f1a5d7d3 | [
"CC-BY-3.0"
] | null | null | null | includes_resources/includes_resource_remote_directory_recursive.rst | jblaine/chef-docs | dc540f7bbc2d3eedb05a74f34b1caf25f1a5d7d3 | [
"CC-BY-3.0"
] | 1 | 2021-06-27T17:03:16.000Z | 2021-06-27T17:03:16.000Z | includes_resources/includes_resource_remote_directory_recursive.rst | jblaine/chef-docs | dc540f7bbc2d3eedb05a74f34b1caf25f1a5d7d3 | [
"CC-BY-3.0"
] | null | null | null | .. The contents of this file may be included in multiple topics (using the includes directive).
.. The contents of this file should be modified in a way that preserves its ability to appear in multiple topics.
The |resource remote_directory| resource can be used to recursively create the path outside of remote directory structures, but the permissions of those outside paths are not managed. This is because the ``recursive`` attribute only applies ``group``, ``mode``, and ``owner`` attribute values to the remote directory itself and any inner directories the resource copies.
A directory structure::
/foo
/bar
/baz
The following example shows a way create a file in the ``/baz`` directory:
.. code-block:: ruby
remote_directory "/foo/bar/baz" do
owner 'root'
group 'root'
mode '0755'
action :create
end
But with this example, the ``group``, ``mode``, and ``owner`` attribute values will only be applied to ``/baz``. Which is fine, if that's what you want. But most of the time, when the entire ``/foo/bar/baz`` directory structure is not there, you must be explicit about each directory. For example:
.. code-block:: ruby
%w[ /foo /foo/bar /foo/bar/baz ].each do |path|
remote_directory path do
owner 'root'
group 'root'
mode '0755'
end
end
This approach will create the correct hierarchy---``/foo``, then ``/bar`` in ``/foo``, and then ``/baz`` in ``/bar``---and also with the correct attribute values for ``group``, ``mode``, and ``owner``.
| 38.425 | 370 | 0.691607 |
85bfb00de209c1efda619662ddf5d2e493c28aff | 9,546 | rst | reStructuredText | source/docs/zero-to-robot/step-2/wpilib-setup.rst | adam-weiler/frc-docs | 6ff4504815bcf07568814b79baa3dc2a85a75c2c | [
"CC-BY-4.0"
] | 96 | 2019-05-19T05:09:24.000Z | 2022-03-29T20:24:13.000Z | source/docs/zero-to-robot/step-2/wpilib-setup.rst | adam-weiler/frc-docs | 6ff4504815bcf07568814b79baa3dc2a85a75c2c | [
"CC-BY-4.0"
] | 961 | 2019-05-15T14:27:50.000Z | 2022-03-31T23:21:48.000Z | source/docs/zero-to-robot/step-2/wpilib-setup.rst | adam-weiler/frc-docs | 6ff4504815bcf07568814b79baa3dc2a85a75c2c | [
"CC-BY-4.0"
] | 197 | 2019-05-14T16:45:23.000Z | 2022-03-25T21:25:40.000Z | WPILib Installation Guide
=========================
This guide is intended for Java and C++ teams. LabVIEW teams can skip to :doc:`labview-setup`. Additionally, the below tutorial shows Windows 10, but the steps are identical for all operating systems. Notes differentiating operating systems will be shown.
Prerequisites
-------------
You can download the latest release of the installer from `GitHub <https://github.com/wpilibsuite/allwpilib/releases/latest/>`__. Ensure that you download the correct binary for your OS and architecture.
.. note:: Windows 7 users must have an updated system with `this <https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows>`__ update installed.
.. important:: The minimum supported macOS version is Mojave (10.14.x).
Extracting the Installer
------------------------
When you download the WPILib installer, it is distributed as a disk image file ``.iso`` for Windows, ``.tar.gz`` for Linux, and distributed as a ``DMG`` for MacOS.
.. tabs::
.. group-tab:: Windows 10+
Windows 10+ users can right click on the downloaded disk image and select :guilabel:`Mount` to open it. Then launch ``WPILibInstaller.exe``.
.. image:: images/wpilib-setup/extract-windows-10.png
:alt: The menu after right clicking on an .iso file to choose "Mount".
.. note:: Other installed programs may associate with iso files and the :guilabel:`mount` option may not appear. If that software does not give the option to mount or extract the iso file, then follow the directions in the "Windows 7" tab.
.. group-tab:: Windows 7
You can use `7-zip <https://www.7-zip.org/>`__ to extract the disk image by right-clicking, selecting :guilabel:`7-Zip` and selecting :guilabel:`Extract to...`. Then launch ``WPILibInstaller.exe``
.. image:: images/wpilib-setup/extract-windows-7.png
:alt: After right clicking on the .iso file go to "7-Zip" then "Extract to....".
.. group-tab:: macOS
macOS users can double click on the downloaded ``DMG`` and then select ``WPILibInstaller`` to launch the application.
.. image:: images/wpilib-setup/macos-launch.png
:alt: Show the macOS screen after double clicking the DMG file.
.. group-tab:: Linux
Linux users should extract the downloaded ``.tar.gz`` and then launch ``WPILibInstaller``. Ubuntu treats executables in the file explorer as shared libraries, so double-clicking won't run them. Run the following commands in a terminal instead with ``<version>`` replaced with the version you're installing.
.. code-block:: console
$ tar -xf WPILib_Linux-<version>.tar.gz
$ cd WPILib_Linux-<version>/
$ ./WPILibInstaller
Running the Installer
---------------------
Upon opening the installer, you'll be presented with the below screen. Go ahead and press :guilabel:`Start`.
.. image:: images/wpilib-setup/installer-start.png
:alt: Start of Installer
This next screen involves downloading VS Code. Unfortunately, due to licensing reasons, VS Code can not be bundled with the installer.
.. image:: images/wpilib-setup/installer-vscode-download.png
:alt: Overview of VS Code download options
- Download VS Code for Single Install
- This downloads VS Code only for the current platform, which is also the smallest download.
- Skip installing VS Code
- Skips installing VS Code. Useful for advanced installations or configurations. Generally not recommended.
- Use Downloaded Offline Installer
- Selecting this option will bring up a prompt allowing you to select a pre-existing zip file of VS Code that has been downloaded by the installer previously. This option does **not** let you select an already installed copy of VS Code on your machine.
- Download VS Code for Offline Install
- This option downloads and saves a copy of VS Code for all platforms, which is useful for sharing the copy of the installer.
Go ahead and select :guilabel:`Download VS Code for Single Install`. This will begin the download process and can take a bit depending on internet connectivity (it's ~60MB). Once the download is done, select :guilabel:`Next`. You should be presented with a screen that looks similar to the one below.
.. image:: images/wpilib-setup/installer-options.png
:alt: An overview of the installer options
This showcases a list of options included with the WPILib installation. It's advised to just leave the default options selected.
You will notice two buttons, :guilabel:`Install for this User` and :guilabel:`Install for all Users`. :guilabel:`Install for this User` only installs it on the current user account, and does not require administrator privileges. However, :guilabel:`Install for all Users` installs the tools for all system accounts and *will* require administrator access. :guilabel:`Install for all Users` is not an option for macOS and Linux.
Select the option that is appropriate for you, and you'll presented with the following installation screen.
.. image:: images/wpilib-setup/installer-installing.png
:alt: Installer progress bar
After installation is complete, you will be presented with the finished screen.
.. image:: images/wpilib-setup/installer-finish.png
:alt: Installer finished screen.
.. important:: WPILib installs a separate version of VS Code than into an already existing installation. Each year has it's own copy of the tools appended with the year. IE: ``WPILib VS Code 2022``. Please launch the WPILib VS Code and not a system installed copy!
Congratulations, the WPILib development environment and tooling is now installed on your computer! Press Finish to exit the installer.
Post-Installation
-----------------
Some operating systems require some final action to complete installation.
.. tabs::
.. group-tab:: macOS
After installation, the installer opens the WPILib VS Code folder. Drag the VS Code application to the dock.
Eject WPILibInstaller image from the desktop.
.. group-tab:: Linux
Some versions of Linux (e.g. Ubuntu 20.04) require you to give the desktop shortcut the ability to launch. Right click on the desktop icon and select Allow Launching.
.. image:: images/wpilib-setup/linux-enable-launching.png
:alt: Menu that pops up after right click the desktop icon in Linux.
.. note:: Installing desktop tools and rebooting will create a folder on the desktop called ``YYYY WPILib Tools``, where ``YYYY`` is the current year. Desktop tool shortcuts are not available on Linux and MacOS.
What is Installed?
------------------
The Offline Installer installs the following components:
- **Visual Studio Code** - The supported IDE for 2019 and later robot code development. The offline installer sets up a separate copy of VS Code for WPILib development, even if you already have VS Code on your machine. This is done because some of the settings that make the WPILib setup work may break existing workflows if you use VS Code for other projects.
- **C++ Compiler** - The toolchains for building C++ code for the roboRIO
- **Gradle** - The specific version of Gradle used for building/deploying C++ or Java robot code
- **Java JDK/JRE** - A specific version of the Java JDK/JRE that is used to build Java robot code and to run any of the Java based Tools (Dashboards, etc.). This exists side by side with any existing JDK installs and does not overwrite the JAVA_HOME variable
- **WPILib Tools** - SmartDashboard, Shuffleboard, RobotBuilder, Outline Viewer, Pathweaver, Glass
- **WPILib Dependencies** - OpenCV, etc.
- **VS Code Extensions** - WPILib extensions for robot code development in VS Code
Uninstalling
------------
WPILib is designed to install to different folders for different years, so that it is not necessary to uninstall a previous version before installing this year's WPILib. However, the following instructions can be used to uninstall WPILib if desired.
.. tabs::
.. tab:: Windows
1. Delete the appropriate wpilib folder (2019: ``c:\Users\Public\frc2019``, 2020 and later: ``c:\Users\Public\wpilib\YYYY`` where ``YYYY`` is the year to uninstall)
2. Delete the desktop icons at ``C:\Users\Public\Public Desktop``
3. Delete the path environment variables.
1. In the start menu, type environment and select "edit the system environment variables"
2. Click on the environment variables button (1).
3. In the user variables, select path (2) and then click on edit (3).
4. Select the path with ``roborio\bin`` (4) and click on delete (5).
5. Select the path with ``frccode`` and click on delete (5).
6. Repeat steps 3-6 in the Systems Variable pane.
.. image:: images/wpilib-setup/EnvironmentVariables.png
:alt: The "System Properties", "Environment Variables", and "Edit Environment Variables" screens.
.. tab:: macOS
1. Delete the appropriate wpilib folder (2019: ``~/frc2019``, 2020 and later: ``~/wpilib/YYYY`` where ``YYYY`` is the year to uninstall)
.. tab:: Linux
1. Delete the appropriate wpilib folder (2019: ``~/frc2019``, 2020 and later: ``~/wpilib/YYYY`` where ``YYYY`` is the year to uninstall). eg ``rm -rf ~/wpilib/YYYY``
Troubleshooting
---------------
In case the installer fails, please open an issue on the installer repository. A link is available `here <https://github.com/wpilibsuite/wpilibinstaller-avalonia>`__. The installer should give a message on the cause of the error, please include this in the description of your issue.
| 52.740331 | 427 | 0.732244 |
1da1f96a678584d29c56f7979225ee78cd718cce | 463 | rst | reStructuredText | docs/old_api/_autosummary/molsysmt.forms.api_file_mdcrd.rst | dprada/molsysmt | 83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d | [
"MIT"
] | null | null | null | docs/old_api/_autosummary/molsysmt.forms.api_file_mdcrd.rst | dprada/molsysmt | 83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d | [
"MIT"
] | null | null | null | docs/old_api/_autosummary/molsysmt.forms.api_file_mdcrd.rst | dprada/molsysmt | 83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d | [
"MIT"
] | null | null | null | molsysmt.forms.api\_file\_mdcrd
===============================
.. automodule:: molsysmt.forms.api_file_mdcrd
.. rubric:: Functions
.. autosummary::
add
append_frames
concatenate_frames
extract
get_n_atoms_from_system
get_n_frames_from_system
merge
to_file_mdcrd
to_molsysmt_MolSys
to_molsysmt_Topology
to_molsysmt_Trajectory
| 11.575 | 45 | 0.552916 |
3afba32959a6701b0772ef6daf78f1bf8a192bab | 7,838 | rst | reStructuredText | posts/estragos-feitos-por-bolsonaro-sao-imensuraveis.rst | tczank/nikola-netlify-cms | 102886968af47c947b2b278cf3c00b72fce05374 | [
"MIT"
] | null | null | null | posts/estragos-feitos-por-bolsonaro-sao-imensuraveis.rst | tczank/nikola-netlify-cms | 102886968af47c947b2b278cf3c00b72fce05374 | [
"MIT"
] | null | null | null | posts/estragos-feitos-por-bolsonaro-sao-imensuraveis.rst | tczank/nikola-netlify-cms | 102886968af47c947b2b278cf3c00b72fce05374 | [
"MIT"
] | null | null | null | ---
category: ''
date: 2021-04-12 07:45:50 UTC
description: ''
link: ''
slug: estragos-feitos-por-bolsonaro-sao-imensuraveis
tags: 'Conjuntura, 2021'
title: Estragos feitos por Bolsonaro são imensuráveis
type: text
author: Estelina Rodrigues de Farias
---
“Deixa primeiro o homem trabalhar. Depois, se não der certo, a gente tira ele de lá”. Isto me foi dito, depois da posse do presidente Jair Bolsonaro, por uma amiga coxinha que votou no candidato João Amoedo do partido Novo e agora furou a fila de vacinação contra a Covid19, por ser amiga de um médico, na Alemanha.
.. TEASER_END
Na ocasião argumentei que depois os estragos seriam grandes demais e a chapa do pior candidato eleito da História do Brasil tinha de ser cassada logo para não dar tempo para que ele destruísse o país. O homem já tinha revelado seu instinto de morte e destruição na campanha eleitoral. De lá para cá as crises econômica, social, ambiental e sanitária se agravaram e já antes da pandemia. Ele teve ataques e chiliques, ameaçou a democracia e danificou instituições de proteção à vida, principalmente das camadas mais precarizadas da população. Direitos trabalhistas foram eliminados para atrair investimentos estrangeiros e o que se viu foi evasão investimentos.
Em sã consciência, não poderia imaginar que o estrago hoje seria tão grande e que ameaça aumentar, já que o Brasil caminha a passos largos para 5 mil mortos em 24 horas por coronavírus e para uma soma de 500 mil mortes até o final do primeiro semestre, segundo o neurocientista Miguel Nicolelis, que um colapso do sistema funerário e contaminação do subsolo e de lençóis freáticos, uma tragédia humana e ambiental.
Não daria para imaginar que o homem cometeria um genocídio intencional sabotando tudo que pode deter a propagação do vírus, como o isolamento social, o uso da máscara, e até recusaria oferta para compra vacina enquanto o mundo inteiro corria e ainda corre atrás do imunizante. O desgoverno do homem deixou até faltar oxigênio em hospitais levando gente à morte por asfixia, pacientes graves serem intubados sem anestesia e médicos tendo de escolher quem vai deixar morrer e quem vai tentar salvar por falta de leito de UTI e insumos para tratamento.
E como explicar a sobra de 80 bilhões de reais dos recursos destinados para o combate a pandemia em 2020?
Maior Desemprego, Mais Fome e Tudo de Ruim
==========================================
Jamais imaginaria que, por mais desprezo que tivesse pelos compatriotas, o homem deixaria os mais vulneráveis em plena pandemia por mais de 3 meses sem um auxílio emergencial e só agora em abril começaria a pagar uma merreca que não dá nem para comprar uma sesta básica. São 150 reais para a pessoa que mora só, 250 reais para famílias chefiadas por homens e 375 por famílias chefiadas por mulheres, E só 4 prestações. O preço médio da sesta básica no Brasil é de 550 reais, segundo o DIEESE. O auxílio não atingirá o objetivo de manter as pessoas em casa para evitar contaminação, porque quem receber a micharia seguirá em busca de um pouco mais para sobreviver e viajará espremido em transportes coletivos como sardinha em lata, num sacolejo de distribuição de vírus. Como dizia o Betinho do combate a fome, “quem tem fome não pode esperar”.
Não poderia imaginar um crescimento da desigualdade social tão acelerado no desgoverno do homem, que nos levaria ao final de 2020 para 19,1 milhões de brasileiros passando fome e 117 milhões em situação de insegurança alimentar, equivalentes a 55,2% da população alcançado pela primeira vez desde 2004, segundo pesquisa da Rede Penssan. A ONU tinha tirado o Brasil do Mapa da fome em 2014, depois que o programa Fome Zero do governo Lula resgatou mais de 30 milhões de brasileiros da fome.
Não deu também para imaginar que o desgoverno do homem prosseguiria com a eliminação de direitos dos trabalhadores iniciada por seu antecessor golpista Michel Temer e que o Brasil ia chegar a 2021 com 14,2 milhões de desempregados, atingindo a maior marca da série iniciada em 2012, segundo o IBGE. E que não joguem toda a culpa na pandemia pelo estrago no mercado de trabalho, porque o aumento do desemprego começou antes da chegada do coronavírus e o PIB brasileiro só cresceu 1,1% em 2019, o primeiro ano de gestão do homem. Direitos trabalhistas foram eliminados em nome de entrada de investimentos estrangeiros e o que se viu foi evasão de investimentos.
Passando a Boiada
========================
Era inconcebível que o desgoverno aproveitaria a atenção da mídia com a pandemia para passar a boiada e promover mudanças legislativas para facilitar a exploração da Amazônia, como sugeriu o desministro do Meio Ambiente, Ricardo Salles, na reunião fatídica do Ministério em 22 de abril de 2020. Foram destruídos 11 mil quilômetros quadrados de floresta na Amazônia Legal no segundo ano de gestão do homem, segundo o INPE. O desmatamento foi 3 vezes maior que a proposta pelo Brasil para a Convenção do Clima.
Na reunião fatídica, o homem externou dois grandes interesses: armar a população, porque “povo armado jamais será escravizado,” e blindar os filhotes envolvidos em corrupção, como as rachadinhas do senador Flávio Bolsonaro, e os cheques depositados na conta da primeira-dama Michelle Bolsonaro pelo Queiroz.
Seria inimaginável que o homem comprasse uma briga mundial com a política de passar a boiada na Amazônia, o pulmão do mundo, que absorve 2 bilhões de toneladas de dióxido de carbono por ano e produz 20% do oxigênio do planeta. Também não imaginaria que seu desgoverno diminuiria a autonomia, o poder e os recursos das agências de proteção ambiental, que ele diz atrapalhar o desenvolvimento. A Funai passou pelo mesmo rolo compressor, deixando reservas e populações indígenas inteiras a mercê da ganância de empresas madeireiras, mineradoras e agronegócio. O homem jogou até garimpeiros miseráveis para cima de originários da terra.
Como havia ameaçado na campanha eleitoral, o homem incentivou a criminalização e extermínio de ativistas ambientais. No seu primeiro ano nos palácios de Brasília, foram mortos 24 ativistas e o Brasil só ficou atrás da Colômbia (64) e Filipinas do ditador Rodrigo Duterte. (43). Segundo a ONG Global Witness, 90% dos assassinatos foram na Amazônia. O extermínio de pobres negros seguiu seu curso e esta é outra história de banalização no Brasil.
Basta de Estragos
=======================
Mas vamos parar de jogar toda a culpa no homem. Ele tem cúmplices nos palácios de Brasília, na Avenida Paulista, no Setor Militar Urbano, na classe média e nos rincões mais miseráveis do Brasil. Ele tem carisma e despertou os maus impulsos que grande parcela dos brasileiros sempre acalentou dentro de si. Fomos o último país no mundo a libertar os escravos e ainda convivemos, sem cerimônia, com fortes resquícios da escravidão.
O homem fez o Brasil virar pária do mundo e todo o planeta agora vê o Patropi como uma ameaça. Mas começamos a ter esperança de vernos uma luz no final do túnel depois que o STF restabeleceu, embora não de forma definitiva os direitos políticos do ex-presidente Lula, e mandou o Senado instaurar uma CPI para apurar crimes cometidos pelo homem na condução da pandemia, A comissão parlamentar de inquérito pode ser a ante sala do impeachment e as pressões crescentes por um afastamento do homem levam a crer que o presidente da Câmara dos Deputados, Arthur Lira, finalmente instaure o processo.
O Brasil não pode mais permitir que o homem continue a fazer estragos. Basta.
PS. Mais de 70 pedidos de impeachment foram apresentados e o homem continua fazendo estragos. Deixaram o homem desgovernar, mas nenhum morto ressuscitará e ninguém aliviará a dor de seus entes queridos. Pelo contrário, o homem debochou deles e até imitou um morrendo por asfixia, em sua live semanal.
| 122.46875 | 844 | 0.796504 |
b626641bdc1d1bb6116948941d38455e40efe1ae | 3,067 | rst | reStructuredText | docs/index.rst | fungibit/bitcoinscript | ced6fb37dfa40eac7341826c758842e0ed7e7475 | [
"MIT"
] | 1 | 2017-10-25T17:11:44.000Z | 2017-10-25T17:11:44.000Z | docs/index.rst | fungibit/bitcoinscript | ced6fb37dfa40eac7341826c758842e0ed7e7475 | [
"MIT"
] | 3 | 2017-03-10T05:27:29.000Z | 2017-04-07T16:06:28.000Z | docs/index.rst | fungibit/bitcoinscript | ced6fb37dfa40eac7341826c758842e0ed7e7475 | [
"MIT"
] | null | null | null | .. BitcoinScript documentation master file, created by
sphinx-quickstart on Thu Mar 9 12:33:20 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. toctree::
:maxdepth: 2
:caption: Contents:
=====================================
BitcoinScript's Documentation
=====================================
*Bitcoin Script Debugger and Interactive Shell*
What is the BitcoinScript library?
===================================
*BitcoinScript* is a python3 library which provides a clean OO
class interface for accessing, creating, and manipulating `Bitcoin scripts <https://en.bitcoin.it/wiki/Script>`_.
*BitcoinScript* also includes two powerful tools: a `debugger <debugger.html>`_ and an `interactive shell <shell.html>`_
for bitcoin scripts.
*BitcoinScript* is **not** an alternative implementation of a bitcoin-script interpreter.
It is built on top of the existing and well-known `python-bitcoinlib <https://github.com/petertodd/python-bitcoinlib>`_ library,
which does all the heavly-lifting and takes care of the gory details.
Main Features
=================
Debugger
---------
See the `debugger section of the docs <debugger.html>`_.
Interactive Shell
--------------------
See the `interactive shell section of the docs <shell.html>`_.
Class Interface
-----------------
*BitcoinScript* provides a clean and intuitive interface to script entities.
The main features of OO interface:
- Specialized OutScript and InScript classes for each script type (P2PKH, P2SH, P2MULTISIG, etc.).
- Access script components as attributes.
- `inscript.signature` (P2PKH), `outscript.pubkeys` (P2MULTISIG,), etc.
- Intuitive constructors.
- `InScriptP2PKH.from_pubkey_and_signature(pubkey, sig)` --> creates an InScriptP2PKH object
- Recursive access of P2SH redeem scripts (the scripts embedded in the P2SH inscript), which are scripts as well.
- `inscript_p2sh.redeem_script.type`, `inscript_p2sh.redeem_script.pubkeys`, etc.
- Easy to serialize script objects to raw binary form, and deserialize back to objects.
- `script.raw.hex() --> '76a91492b8c3a56fac121ddcdffbc85b02fb9ef681038a88ac'`
- Easy to format script objects to human-readable form, and parse back to objects.
- `print(script) --> 'OP_DUP OP_HASH160 92...8a OP_EQUALVERIFY OP_CHECKSIG'`
Getting Started
================================
Install using *pip*::
pip install bitcoinscript
Examples
---------
For an easy start, see the `code examples <examples.html>`_.
Disclaimer
============
BitcoinScript *IS NOT* production-ready. It is new, and hasn't been tested in the wild.
For any task where mistakes can lose you money, please don't rely on BitcoinScript.
Although I put much effort into testing the code, there may still be bugs.
More
================================
*Bug reports, suggestions and contributions are appreciated.*
Issues are tracked on `github <https://github.com/fungibit/bitcoinscript/issues>`_.
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| 28.933962 | 128 | 0.697098 |
74c8e89bce9160db68b012663bad8daf435f14c4 | 2,250 | rst | reStructuredText | introduction.rst | RainMark/gtk3-tutorial | a2c0cc82e4e9a090b1617ab43f8256146c7150c2 | [
"CC0-1.0"
] | 28 | 2018-11-29T02:49:29.000Z | 2022-03-27T04:13:17.000Z | introduction.rst | RainMark/gtk3-tutorial | a2c0cc82e4e9a090b1617ab43f8256146c7150c2 | [
"CC0-1.0"
] | null | null | null | introduction.rst | RainMark/gtk3-tutorial | a2c0cc82e4e9a090b1617ab43f8256146c7150c2 | [
"CC0-1.0"
] | 14 | 2019-04-05T09:23:50.000Z | 2022-02-17T09:18:48.000Z | Introduction
============
==========================
Before using this tutorial
==========================
Before working through any of this tutorial, it is advised that you have a good grasp of C programming. Working with graphical interfaces poses new challenges and problems compared to interacting with the Standard Output.
Prior knowledge of GTK+ is not required, but experience with its use in other languages is beneficial.
===================
About this tutorial
===================
This guide does not walk through creating an application. It merely provides informational on each widget in GTK+, and describes their use.
It also assumes that you are using up-to-date versions of GCC or Clang, and GTK+. The GTK+ version is recommended to be as new as possible, with the tutorial being written using 3.16.
===========
Deprecation
===========
Deprecation is the process of preparing features within software to be decommisioned or removed. GTK+ deprecates objects by providing warnings both in the GTK+ framework and documentation prior to removal at a later date. This allows developers to change their code before a feature is removed.
Reasons for deprecation include:
* A feature has been replaced.
* A feature is no longer seen as widely-used.
* A feature no longer can be used.
It is highly recommended to not use deprecated features of GTK+ when developing applications, particularly when learning as they can cause problems when understanding other areas of the library.
This tutorial does not cover widgets which have been marked as deprecated. Any widgets marked as deprecated by GTK+ in the future will also be removed from future versions of the tutorial.
=======
Contact
=======
Please contact me at andrew@andrewsteele.me.uk to report issues, bugs and provide comments. All suggestions are welcome.
=======
License
=======
* The tutorial text and code examples are released under a `CC0 1.0 Universal <http://creativecommons.org/publicdomain/zero/1.0/>`_ (CC0 1.0) license (this essentially makes them Public Domain).
* The GTK+ logo used for examples and the site favicon is released under the `Creative Commons Attribution-Share Alike 3.0 Unported <http://creativecommons.org/licenses/by-sa/3.0/deed.en>`_ license.
| 52.325581 | 294 | 0.744889 |
5f8cd970a3cbfc83742591f398c6943858580c9c | 662 | rst | reStructuredText | product_category_taxes/README.rst | ShaheenHossain/itpp-labs-misc-addons13 | bf62dc5bc1abdc18d78e9560a286babbe1d0e082 | [
"MIT"
] | null | null | null | product_category_taxes/README.rst | ShaheenHossain/itpp-labs-misc-addons13 | bf62dc5bc1abdc18d78e9560a286babbe1d0e082 | [
"MIT"
] | null | null | null | product_category_taxes/README.rst | ShaheenHossain/itpp-labs-misc-addons13 | bf62dc5bc1abdc18d78e9560a286babbe1d0e082 | [
"MIT"
] | 3 | 2020-08-25T01:57:59.000Z | 2021-09-11T15:38:02.000Z | Product category taxes
================================================================
The module will allow you to configure customer and vendor taxes on product categories.
* When you set the product category for your product, the taxes defined on the product category will be copied to the product.
* When you change taxes in the product category, the taxes in the products in this category will be updated.
There is similar module "Product Category Tax" (https://github.com/akretion/odoo-usability/tree/8.0/product_category_tax), but it has GPLV-3 license.
This module has LGPL-3 license.
Tested on Odoo 9.0 2ec9a9c99294761e56382bdcd766e90b8bc1bb38
| 44.133333 | 150 | 0.722054 |
2fa1ab0a7d37970838c483c5d24f288aacf2e8d3 | 683 | rst | reStructuredText | docs/index.rst | epenet/aioguardian | 2050c83ea746f831872f62569eecd85226112353 | [
"MIT"
] | 1 | 2020-06-26T05:25:34.000Z | 2020-06-26T05:25:34.000Z | docs/index.rst | epenet/aioguardian | 2050c83ea746f831872f62569eecd85226112353 | [
"MIT"
] | 79 | 2020-04-15T00:35:44.000Z | 2022-03-31T10:07:58.000Z | docs/index.rst | epenet/aioguardian | 2050c83ea746f831872f62569eecd85226112353 | [
"MIT"
] | 6 | 2020-09-04T16:06:18.000Z | 2022-03-30T18:42:37.000Z | aioguardian
===========
.. image:: https://github.com/bachya/aioguardian/workflows/CI/badge.svg
.. image:: https://img.shields.io/pypi/v/aioguardian.svg
.. image:: https://img.shields.io/pypi/pyversions/aioguardian.svg
.. image:: https://img.shields.io/pypi/l/aioguardian.svg
.. image:: https://codecov.io/gh/bachya/aioguardian/branch/master/graph/badge.svg
.. image:: https://api.codeclimate.com/v1/badges/f46d8b1dcfde6a2f683d/maintainability
`aioguardian` is a Python3, `asyncio`-focused library for interacting with
the `Guardian line of water valves and sensors from Elexa <http://getguardian.com>`_.
.. toctree::
:maxdepth: 3
usage
commands
api
* :ref:`search`
| 31.045455 | 85 | 0.729136 |
d751dcd26065cbc7f4ad8ea11e1f29cce0716440 | 120 | rst | reStructuredText | docs/gen/_modules/test_calc.rst | PejLab/aFC-n | 5dbaf963b92c41955b36c036eee45b84774ca1a7 | [
"Apache-2.0"
] | null | null | null | docs/gen/_modules/test_calc.rst | PejLab/aFC-n | 5dbaf963b92c41955b36c036eee45b84774ca1a7 | [
"Apache-2.0"
] | null | null | null | docs/gen/_modules/test_calc.rst | PejLab/aFC-n | 5dbaf963b92c41955b36c036eee45b84774ca1a7 | [
"Apache-2.0"
] | null | null | null | test\_calc module
=================
.. automodule:: test_calc
:members:
:undoc-members:
:show-inheritance:
| 15 | 25 | 0.566667 |
cc9d7df1ad08bea114d83ba0aa2e239cc9685450 | 214 | rst | reStructuredText | pytorch/docs/source/linalg.rst | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/docs/source/linalg.rst | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/docs/source/linalg.rst | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | .. role:: hidden
:class: hidden-section
torch.linalg
============
Common linear algebra operations.
.. automodule:: torch.linalg
.. currentmodule:: torch.linalg
Functions
---------
.. autofunction:: outer
| 13.375 | 33 | 0.649533 |
146858ea5f8de7ac3d2fa93fa1a46825f7051f91 | 73 | rst | reStructuredText | docs/usage.rst | USDA-ARS-NWRC/spatialnc | fae3a548890dbb2e640a1b3e1a52d0ef88fc8b60 | [
"CC0-1.0"
] | null | null | null | docs/usage.rst | USDA-ARS-NWRC/spatialnc | fae3a548890dbb2e640a1b3e1a52d0ef88fc8b60 | [
"CC0-1.0"
] | 10 | 2019-02-05T21:46:42.000Z | 2020-06-22T15:20:56.000Z | docs/usage.rst | USDA-ARS-NWRC/spatialnc | fae3a548890dbb2e640a1b3e1a52d0ef88fc8b60 | [
"CC0-1.0"
] | null | null | null | =====
Usage
=====
To use spatialnc in a project::
import spatialnc
| 9.125 | 31 | 0.60274 |
d6814c55240ff14653c5adaae45b98793cb63c8e | 568 | rst | reStructuredText | README.rst | tillbiskup/qcpy | 4423b9f7f0c58247e835a8cdc6e136eed5341b46 | [
"BSD-2-Clause"
] | null | null | null | README.rst | tillbiskup/qcpy | 4423b9f7f0c58247e835a8cdc6e136eed5341b46 | [
"BSD-2-Clause"
] | null | null | null | README.rst | tillbiskup/qcpy | 4423b9f7f0c58247e835a8cdc6e136eed5341b46 | [
"BSD-2-Clause"
] | null | null | null | qcPy
====
qcPy is a Python framework for conveniently handling quantum-chemical calculations and the post-processing of the acquired data.
For more general information on qcPy see its `homepage <https://www.qcpy.de/>`_.
Installation
------------
Install the package by running::
pip install qcpy
Contribute
----------
- Source Code: https://github.com/tillbiskup/qcpy
Support
-------
If you are having issues, please contact the package authors via GitHub and/or file a bug report there.
License
-------
The project licensed under the BSD license.
| 16.705882 | 128 | 0.714789 |
8a65a31ea9df90789ff3df93d51bc723bfb79020 | 5,166 | rst | reStructuredText | docs/source/concepts/sources-sinks.rst | skendall/hydra | 240f9e8dda3cd2e9b50c6d1c85947299face223b | [
"Apache-2.0"
] | null | null | null | docs/source/concepts/sources-sinks.rst | skendall/hydra | 240f9e8dda3cd2e9b50c6d1c85947299face223b | [
"Apache-2.0"
] | null | null | null | docs/source/concepts/sources-sinks.rst | skendall/hydra | 240f9e8dda3cd2e9b50c6d1c85947299face223b | [
"Apache-2.0"
] | null | null | null | .. Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
.. _sources-sinks:
#######################
Data: Sources and Sinks
#######################
Jobs can in principle be arbitrary programs [#]_. In practice most jobs ingest streams of data that is transformed into :ref:`bundles <bundles-values>`, applies some :ref:`filters <filters>` to those bundles and emits an output.
A rough skeleton might look like:
.. code-block:: javascript
{
type:"map",
source:{
type:"mesh2",
// Where to pull files
},
map:{
fields:[
// Which fields to process
{from:"TIME", to:"TIME"},
{from:"METHOD"},
],
filterOut:{op:"chain", failStop:false, debug:true, filter:[
{op:"time", src:{field:"TIME", format:"yyyy-MM-dd", timeZone:"GMT"}, dst:{field:"TIME", format:"native"}},
]},
// And some other stuff to choose the SHARD and DATE_YMD
},
// In this case out putput is just flat files
output:{
type:"file",
path:["{{DATE_YMD}}","/","{{SHARD}}"],
writer:{
factory:{dir:"split"},
format:{
type:"column",
columns:["TIME", "METHOD"]
},
},
},
}
``mesh2`` is a source for pulling files. The source could be changed to pull from `Apache Kafka`_ brokers without changing the output. Or if the output could be changed to hydra trees without changes to the source configuration. Put another way the *format* of incoming data matters, but where it comes from and how it gets there is abstracted away.
.. _Apache Kafka: http://kafka.apache.org/
.. [#] For example ``Hoover`` rsyncs raw files into the cluster.
Sources
########
Sources (formally ``TaskDataSource``) support turning incoming data into streams of ``Bundles`` with a few simple operations:
* ``next()``
* ``peak()``
* ``close()``
The dual role of "get bytes from somewhere" and "make these bytes a bundle" spread among modular classes that can be combined together. So there are classes focused on format:
* ``channel`` (aka already self describing bundles)
* ``kv.txt``
* ``column``
* ``json``
* ``columnar``
And ones focosed on where the bytes come from:
* ``files``
* ``streamv2`` (Streamserver)
* ``mesh2``
So a ``streamv2`` source might defer to a ``column`` or ``json`` parser. Multiple sources can also be combined together with ``aggregate``. A job might pull from two different kafka topics, or consume serveral different types of access logs to a common format.
Who's on first?
-----------------
Broadly, sources are either the output of hydra splits and have consistent :ref:`shards <shards-pipelines>` or we do a hash on the file name. When you see referces to shards or hashes in the source it's dealing with which data the 7th of 9 nodes get.
Sinks
######
Output options include:
* Flat files
- `Columnar`
- channel
- column
* :ref:`Hydra Trees <paths-trees>`
* `Cassandra`_
.. _Cassandra: http://cassandra.apache.org
.. _Columnar:
Columnar flat files take advantage of columnar compression while still providing row-based APIs. Columnar compression
allows the job designer to provide *hints* to the compression algorithms which can then optimally compress the data.
Compression reduces the number of bytes required to represent the data on disk. Fewer bytes means less I/O and less I/O
means better disk and network performance. There are currently five column types supported by this output data type:
* RAW: compresses data using a the native compression scheme for the provided value
* TEXT255: creates an index map with the most common 255 column values per block
* DELTAINT: stores variable length integers using delta encoding
* DELTALONG: stores variable length longs using delta encoding
* RUNLENGTH: stores the number of consecutive values of the same value
Just as sources can be thought of "where to get data" and "how to make bundles", outputs transform bundles back into bytes, and put them somewhere. Using the same example snippet as before:
.. code-block:: javascript
output:{
type:"file",
path:["{{DATE_YMD}}","/","{{SHARD}}"],
writer:{
factory:{dir:"split"},
format:{
type:"column",
columns:["TIME", "METHOD"]
},
},
},
The ``type``, ``path``, and ``factory`` determine where the bytes should be written. In this case in local files like ``split/120512/000-000.gz``. The format of those files is delimited (think csv or tabs) columns, with only two boring columns from an HTTP access log.
| 37.434783 | 351 | 0.66686 |
0af5ae8aa309df66ef21be8345397f7aefa03bfd | 8,261 | rst | reStructuredText | api/autoapi/Microsoft/AspNet/Mvc/RemoteAttribute/index.rst | lucasvfventura/Docs | ea93e685c737236ab08d5444065cc550bba17afa | [
"Apache-2.0"
] | 2 | 2021-05-10T11:57:55.000Z | 2022-03-15T12:50:36.000Z | api/autoapi/Microsoft/AspNet/Mvc/RemoteAttribute/index.rst | lucasvfventura/Docs | ea93e685c737236ab08d5444065cc550bba17afa | [
"Apache-2.0"
] | null | null | null | api/autoapi/Microsoft/AspNet/Mvc/RemoteAttribute/index.rst | lucasvfventura/Docs | ea93e685c737236ab08d5444065cc550bba17afa | [
"Apache-2.0"
] | 3 | 2017-12-12T05:08:29.000Z | 2022-02-02T08:39:25.000Z |
RemoteAttribute Class
=====================
.. contents::
:local:
Summary
-------
A :any:`System.ComponentModel.DataAnnotations.ValidationAttribute` which configures Unobtrusive validation to send an Ajax request to the
web site. The invoked action should return JSON indicating whether the value is valid.
Inheritance Hierarchy
---------------------
* :dn:cls:`System.Object`
* :dn:cls:`System.Attribute`
* :dn:cls:`System.ComponentModel.DataAnnotations.ValidationAttribute`
* :dn:cls:`Microsoft.AspNet.Mvc.RemoteAttribute`
Syntax
------
.. code-block:: csharp
public class RemoteAttribute : ValidationAttribute, _Attribute, IClientModelValidator
GitHub
------
`View on GitHub <https://github.com/aspnet/mvc/blob/master/src/Microsoft.AspNet.Mvc.ViewFeatures/RemoteAttribute.cs>`_
.. dn:class:: Microsoft.AspNet.Mvc.RemoteAttribute
Constructors
------------
.. dn:class:: Microsoft.AspNet.Mvc.RemoteAttribute
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Mvc.RemoteAttribute.RemoteAttribute()
Initializes a new instance of the :any:`Microsoft.AspNet.Mvc.RemoteAttribute` class.
.. code-block:: csharp
protected RemoteAttribute()
.. dn:constructor:: Microsoft.AspNet.Mvc.RemoteAttribute.RemoteAttribute(System.String)
Initializes a new instance of the :any:`Microsoft.AspNet.Mvc.RemoteAttribute` class.
:param routeName: The route name used when generating the URL where client should send a validation request.
:type routeName: System.String
.. code-block:: csharp
public RemoteAttribute(string routeName)
.. dn:constructor:: Microsoft.AspNet.Mvc.RemoteAttribute.RemoteAttribute(System.String, System.String)
Initializes a new instance of the :any:`Microsoft.AspNet.Mvc.RemoteAttribute` class.
:param action: The action name used when generating the URL where client should send a validation request.
:type action: System.String
:param controller: The controller name used when generating the URL where client should send a validation request.
:type controller: System.String
.. code-block:: csharp
public RemoteAttribute(string action, string controller)
.. dn:constructor:: Microsoft.AspNet.Mvc.RemoteAttribute.RemoteAttribute(System.String, System.String, System.String)
Initializes a new instance of the :any:`Microsoft.AspNet.Mvc.RemoteAttribute` class.
:param action: The action name used when generating the URL where client should send a validation request.
:type action: System.String
:param controller: The controller name used when generating the URL where client should send a validation request.
:type controller: System.String
:param areaName: The name of the area containing the .
:type areaName: System.String
.. code-block:: csharp
public RemoteAttribute(string action, string controller, string areaName)
Methods
-------
.. dn:class:: Microsoft.AspNet.Mvc.RemoteAttribute
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNet.Mvc.RemoteAttribute.FormatAdditionalFieldsForClientValidation(System.String)
Formats ``property`` and :dn:prop:`Microsoft.AspNet.Mvc.RemoteAttribute.AdditionalFields` for use in generated HTML.
:param property: Name of the property associated with this instance.
:type property: System.String
:rtype: System.String
:return: Comma-separated names of fields the client should include in a validation request.
.. code-block:: csharp
public string FormatAdditionalFieldsForClientValidation(string property)
.. dn:method:: Microsoft.AspNet.Mvc.RemoteAttribute.FormatErrorMessage(System.String)
:type name: System.String
:rtype: System.String
.. code-block:: csharp
public override string FormatErrorMessage(string name)
.. dn:method:: Microsoft.AspNet.Mvc.RemoteAttribute.FormatPropertyForClientValidation(System.String)
Formats ``property`` for use in generated HTML.
:param property: One field name the client should include in a validation request.
:type property: System.String
:rtype: System.String
:return: Name of a field the client should include in a validation request.
.. code-block:: csharp
public static string FormatPropertyForClientValidation(string property)
.. dn:method:: Microsoft.AspNet.Mvc.RemoteAttribute.GetClientValidationRules(Microsoft.AspNet.Mvc.ModelBinding.Validation.ClientModelValidationContext)
:type context: Microsoft.AspNet.Mvc.ModelBinding.Validation.ClientModelValidationContext
:rtype: System.Collections.Generic.IEnumerable{Microsoft.AspNet.Mvc.ModelBinding.Validation.ModelClientValidationRule}
.. code-block:: csharp
public virtual IEnumerable<ModelClientValidationRule> GetClientValidationRules(ClientModelValidationContext context)
.. dn:method:: Microsoft.AspNet.Mvc.RemoteAttribute.GetUrl(Microsoft.AspNet.Mvc.ModelBinding.Validation.ClientModelValidationContext)
Returns the URL where the client should send a validation request.
:param context: The used to generate the URL.
:type context: Microsoft.AspNet.Mvc.ModelBinding.Validation.ClientModelValidationContext
:rtype: System.String
:return: The URL where the client should send a validation request.
.. code-block:: csharp
protected virtual string GetUrl(ClientModelValidationContext context)
.. dn:method:: Microsoft.AspNet.Mvc.RemoteAttribute.IsValid(System.Object)
:type value: System.Object
:rtype: System.Boolean
.. code-block:: csharp
public override bool IsValid(object value)
Properties
----------
.. dn:class:: Microsoft.AspNet.Mvc.RemoteAttribute
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNet.Mvc.RemoteAttribute.AdditionalFields
Gets or sets the comma-separated names of fields the client should include in a validation request.
:rtype: System.String
.. code-block:: csharp
public string AdditionalFields { get; set; }
.. dn:property:: Microsoft.AspNet.Mvc.RemoteAttribute.HttpMethod
Gets or sets the HTTP method (<c>"Get"</c> or <c>"Post"</c>) client should use when sending a validation
request.
:rtype: System.String
.. code-block:: csharp
public string HttpMethod { get; set; }
.. dn:property:: Microsoft.AspNet.Mvc.RemoteAttribute.RouteData
Gets the :any:`Microsoft.AspNet.Routing.RouteValueDictionary` used when generating the URL where client should send a
validation request.
:rtype: Microsoft.AspNet.Routing.RouteValueDictionary
.. code-block:: csharp
protected RouteValueDictionary RouteData { get; }
.. dn:property:: Microsoft.AspNet.Mvc.RemoteAttribute.RouteName
Gets or sets the route name used when generating the URL where client should send a validation request.
:rtype: System.String
.. code-block:: csharp
protected string RouteName { get; set; }
| 25.262997 | 155 | 0.62329 |
d7d10889c1a432195a8bd9c08f7c4d2f6abe7840 | 2,476 | rst | reStructuredText | docs/shocks/gas_dynamics.shocks.equations.rst | fernancode/gas_dynamics | 8ee2428fcbdb861117f1006597577356bdce188f | [
"MIT"
] | 1 | 2021-09-07T12:50:24.000Z | 2021-09-07T12:50:24.000Z | docs/shocks/gas_dynamics.shocks.equations.rst | fernancode/gas_dynamics | 8ee2428fcbdb861117f1006597577356bdce188f | [
"MIT"
] | null | null | null | docs/shocks/gas_dynamics.shocks.equations.rst | fernancode/gas_dynamics | 8ee2428fcbdb861117f1006597577356bdce188f | [
"MIT"
] | 2 | 2021-01-11T13:23:30.000Z | 2022-01-07T10:25:24.000Z | #####################
Equation Map - Shocks
#####################
:py:func:`shock_mach <gas_dynamics.shocks.shocks.shock_mach>`
.. math::
M_{2} = \left[ \frac{ M_{1}^2 + 2 / (\gamma -1) }{ \left[ 2 \gamma /( \gamma -1 ) \right] M_{1}^2 -1 } \right]^ {\frac{1}{2}}
:py:func:`shock_mach_before <gas_dynamics.shocks.shocks.shock_mach_before>`
.. math::
M_{2} = \left[ \frac{ M_{2}^2 + 2 / (\gamma -1) }{ \left[ 2 \gamma /( \gamma -1 ) \right] M_{2}^2 - 1 } \right]^ {\frac{1}{2}}
:py:func:`shock_pressure_ratio <gas_dynamics.shocks.shocks.shock_pressure_ratio>`
.. math::
\frac{p_{2}}{p_{1}} = \frac{ 2 \gamma }{ \gamma + 1} M_{1}^2 - \frac{ \gamma - 1 }{ \gamma + 1}
:py:func:`shock_mach_from_pressure_ratio <gas_dynamics.shocks.shocks.shock_mach_from_pressure_ratio>`
.. math::
M = \left[\frac{\gamma+1}{2\gamma} \left(\frac{p_{2}}{p_{1}}\right)+\frac{\gamma-1}{\gamma+1}\right]^{\frac{1}{2}}
:py:func:`shock_temperature_ratio <gas_dynamics.shocks.shocks.shock_temperature_ratio>`
.. math::
\frac{T_{2}}{T_{1}} = \frac{\left( 1 + \left[ \left( \gamma - 1 \right) /2 \right] M_{1}^2 \right) \left( \left[ 2 \gamma / \left( \gamma -1 \right) \right] M_{1}^2 -1 \right)}{ \left[ \left( \gamma + 1 \right)^2 / 2 \left(\gamma - 1 \right) \right] M_{1}^2 }
:py:func:`shock_dv_a <gas_dynamics.shocks.shocks.shock_dv_a>`
.. math::
\frac{dV}{a_{1}} = \left( \frac{2}{\gamma + 1} \right) \left( \frac{ M_{1}^2 -1} {M_{1}} \right)
:py:func:`shock_stagnation_pressure_ratio <gas_dynamics.shocks.shocks.shock_stagnation_pressure_ratio>`
.. math::
\frac{p_{t2}}{p_{t1}} = \left( \frac{\left[ \left( \gamma + 1 \right) /2 \right] M_{1}^2} { 1 + \left[ \left( \gamma - 1 \right) /2 \right] M_{1}^2 } \right)^ { \frac{\gamma}{\gamma -1}} \left[ \frac{2\gamma}{\gamma+1} M_{1}^2 - \frac{\gamma -1}{ \gamma +1}\right] ^ {\frac{1}{1-\gamma}}
:py:func:`shock_flow_deflection <gas_dynamics.shocks.shocks.shock_flow_deflection>`
.. math::
\delta = \arctan \left[ 2 \cot(\theta) \left( \frac{ M_{1}^2 \sin^2 (\theta) - 1}{ M_{1}^2 (\gamma + \cos 2\theta) + 2 } \right) \right]
:py:func:`shock_angle <gas_dynamics.shocks.shocks.shock_angle>` , :py:func:`shock_mach_given_angles <gas_dynamics.shocks.shocks.shock_mach_given_angles>` , and :py:func:`shock_flow_deflection_from_machs <gas_dynamics.shocks.shocks.shock_flow_deflection_from_machs>` all employ equation solvers with combinations of the above functions to return the desired values. | 40.590164 | 364 | 0.635703 |
8fe96516466fea329e3971753de0aabb385586ec | 5,565 | rst | reStructuredText | docs/source/MEST/basic-i14D.rst | stczhc/notes | 638960a1373ec2bbe2116757643075e1a21080cd | [
"MIT"
] | null | null | null | docs/source/MEST/basic-i14D.rst | stczhc/notes | 638960a1373ec2bbe2116757643075e1a21080cd | [
"MIT"
] | null | null | null | docs/source/MEST/basic-i14D.rst | stczhc/notes | 638960a1373ec2bbe2116757643075e1a21080cd | [
"MIT"
] | null | null | null |
.. only:: html
.. math::
\renewenvironment{equation*}
{\begin{equation}\begin{aligned}}
{\end{aligned}\end{equation}}
\renewcommand{\gg}{>\!\!>}
\renewcommand{\ll}{<\!\!<}
\newcommand{\I}{\mathrm{i}}
\newcommand{\D}{\mathrm{d}}
\renewcommand{\C}{\mathrm{C}}
\renewcommand{\Tr}{\mathrm{Tr}}
\newcommand{\dt}{\frac{\D}{\D t}}
\newcommand{\E}{\mathrm{e}}
\renewcommand{\bm}{\mathbf}
.. note::
Helgaker, T., Jorgensen, P., & Olsen, J. (2014). *Molecular electronic-structure theory.* John Wiley & Sons.
第十四章 微扰论 (D)
===================
第四节 闭壳层体系的 Moller-Plesset 理论
---------------------------------------
在讨论了一般意义的 Moller-Plesset 理论之后,
现在我们考虑它在闭壳层电子体系的实现.
在第1小节, 我们通过进行一些和闭壳层波函数参数化相关的准备.
在第2和第3小节, 我们考虑能量计算所需的微扰振幅.
最后, 在第4小节, 我们推导闭壳层系统的 Moller-Plesset 能量修正,
并以 MO 积分和轨道能量表示.
1 闭壳层零阶体系
^^^^^^^^^^^^^^^^
和在自旋轨道基一样, 我们将闭壳层体系的哈密顿量分解为零阶福克算符, 一阶张落势和核贡献:
.. math::
\hat{H} = \hat{f} + \hat{\Phi} + h_{nuc}
在正则轨道基组, 福克算符由下式给出
.. math::
\hat{f} = \sum_p \epsilon_p E_{pp}
其中轨道能量是非活性福克矩阵的本征值
.. math::
\epsilon_p = {}^I F_{pq} \delta_{pq}
对闭壳层福克算符和张落势的讨论, 参见第 10.4 节.
对闭壳层 Moller-Plesset 微扰论, 我们应该使用第 14.3 节的指数 CCPT 参数化.
为了计算直到四阶的能量, 我们必须决定单重态波函数直到二阶,
并从单重, 双重和三重算符构建单重态自旋对称性的簇算符 :math:`\hat{T}`.
我们将采用如下形式的算符
.. math::
\hat{T}_1 =&\ \sum_{ai} t_i^a E_{ai} \\
\hat{T}_2 =&\ \frac{1}{2} \sum_{ab,ij} t_{ij}^{ab} E_{ai} E_{bj} \\
\hat{T}_3 =&\ \frac{1}{6} \sum_{abc,ijk} t_{ijk}^{abc} E_{ai} E_{bj} E_{ck}
:label: pert-mppt-cs-ex
其中关于占据和虚的轨道指数的求和是自由的,
并且存在下列对称关系
.. math::
t_{ij}^{ab} =&\ t_{ji}^{ba} \\
t_{ijk}^{abc} =&\ t_{ikj}^{acb} = t_{jik}^{bac}
= t_{jki}^{bca} = t_{kij}^{cab} = t_{kji}^{cba}
:label: pert-mppt-cs-symm-perm
和自旋轨道基组不同, 不存在分别的关于占据指标或者关于虚指标的轮换对称性.
[也就是说, 这里改变了 ijk 的顺序, abc 的顺序也要响应改变. 而在自旋轨道的情况, 可以单独限制 :math:`i<j`.
即改变了 ijk 后 abc 不需要改变. 在自旋轨道的情况, 它们可以独立变化.]
当作用到 Hartree-Fock 态, :eq:`pert-mppt-cs-ex` 的激发算符产生激发 CSF 的单重态组合,
[实际上是单重态的行列式组合. 单重态本身就是 CSF. ]
我们使用下列记号
.. math::
\left| \begin{matrix} a \\ i \end{matrix} \right\rangle
=&\ E_{ai} |\mathrm{HF}\rangle \\
\left| \begin{matrix} ab \\ ij \end{matrix} \right\rangle
=&\ E_{ai} E_{bj} |\mathrm{HF}\rangle \\
\left| \begin{matrix} abc \\ ijk \end{matrix} \right\rangle
=&\ E_{ai} E_{bj} E_{ck} |\mathrm{HF}\rangle
[注意一次只能激发一个电子. 每个轨道的两个电子至少在二重激发才能完全激发.]
我们也会使用下面的一般记号表示激发组态的簇算符
.. math::
\hat{T} =&\ \sum_\mu g_\mu t_\mu \hat{\tau}_\mu \\
|\mu\rangle =&\ \hat{\tau}_\mu | \mathrm{HF} \rangle
其中, 求和遍历自旋适配的激发算符, 并且求和是无限制的, 和 :eq:`pert-mppt-cs-ex` 一致. [自由的]
简并因子 :math:`g_\mu` 包括簇算符定义中的常数, 即 :math:`1, \frac{1}{2}` 和 :math:`\frac{1}{6}`,
分别对应于单重, 双重, 和三重激发.
对于单重和双重激发, 簇算符的单重态参数化在 13.7.1 讨论.
我们将不进行一个类似的, 严格的对于三重激发 :eq:`pert-mppt-cs-ex` 的第三式的推导,
但是注意到对于三重态空间, 给定的参数化是冗余的.
因此, 对于一组三个不同的虚轨道, :math:`a, b` 和 :math:`c`,
和三个不同的占据轨道 :math:`i, j` 和 :math:`k`,
有六个振幅 [3!=6]
:math:`t_{ijk}^{abc}, t_{ikj}^{abc}, t_{jik}^{abc}, t_{jki}^{abc}, t_{kij}^{abc}`
和 :math:`t_{kji}^{abc}` 并不由轮换对称性 :eq:`pert-mppt-cs-symm-perm` 相联系.
但是, 从我们对于第 2.6 节系谱耦合方案的讨论, 我们知道通过将六个电子放置于六个轨道, 只可能产生五个独立的单重态,
见图 2.1 的分支图.
[这里假定 ijk 和 abc 互不相同, 因此产生的单重态对应的占据数只能是 111111.
这对应5个单重态组态, 分别为 +++---, ++--+-, ++-+--, +-++--, +-+-+-.]
因此, 它们不能是相互独立的, 我们对于三重态的参数化因此是冗余的.
事实上, 在练习 14.4, 可以证明如下的三重激发算符的线性组合是零:
.. math::
E_{ai}E_{bj}E_{ck} + E_{ai}E_{bk}E_{cj} + E_{aj}E_{bi}E_{ck}
+ E_{aj}E_{bk}E_{ci} + E_{ak}E_{bi}E_{cj} + E_{ak}E_{bj}E_{ci} = 0
:eq:`pert-mppt-cs-ex` 的第二式的双重激发算符, 作为对比, 不是冗余的.
这可以通过检查分支图来验证, [对于 1111 的情况, [2!=2], 有两个耦合模式: ++--, +-+-.]
它显示可以通过将四个电子分配在四个 [空间] 轨道来产生两个单重态组态.
对这个三重态空间建立一个无冗余参数化是可能的.
但是, 产生的参数化将会更复杂, 包括激发算符的线性组合.
在实践上, 更容易采用三重态空间的冗余参数化即 :eq:`pert-mppt-cs-ex` 的第三式.
上式显示的冗余性不会干涉我们求解薛定谔方程.
我们将得到正确的微扰能量,
只要我们能够满足 CCPT 方程.
但是, 冗余性会导致, 存在很多不同 **振幅** 满足 CCPT 方程, 但是这些振幅全部导致同样的能量.
2 闭壳层变分拉格朗日量
^^^^^^^^^^^^^^^^^^^^^^
现在我们对于通过 :eq:`pert-mppt-cs-ex` 的簇算符参数化的闭壳层态, 建立 CCPT 拉格朗日量.
我们将遵循第 14.3 节的方法, 仅仅指出所需的改动.
首先, 我们推导 14.3 节中福克算符和激发算符的对易子, 但是对于单重态福克算符和单重态簇算符.
很容易得到下列关系
.. math::
[\hat{f}, \hat{T}_1] =&\ \sum_{ai} \epsilon_i^a t_i^a E_{ai} \\
[\hat{f}, \hat{T}_2] =&\ \frac{1}{2} \sum_{aibj} \epsilon_{ij}^{ab} t_{ij}^{ab}
E_{ai} E_{bj} \\
[\hat{f}, \hat{T}_3] =&\ \frac{1}{6} \sum_{aibjck} \epsilon_{ijk}^{abc} t_{ijk}^{abc}
E_{ai} E_{bj} E_{ck}
其中, 例如
.. math::
\epsilon_{ijk}^{abc} = \epsilon_a + \epsilon_b + \epsilon_c
- \epsilon_i - \epsilon_j - \epsilon_k
我们可以将这些对易子写为一般形式
.. math::
[ \hat{f}, \hat{T} ] = \sum_\mu g_\mu \epsilon_\mu t_\mu \hat{\tau}_\mu
并且对相似变换的闭壳层福克算符有
.. math::
\hat{f}^T = \hat{f} + \sum_\mu g_\mu \epsilon_\mu t_\mu \hat{\tau}_\mu
和自旋轨道表象的 :eq:`pert-ccpt-fock-tr` 类似.
对于轨道表象必须的修改变得明显, 当我们考虑投影的耦合簇方程.
对于单重和双重激发, 我们应该还是假定
:math:`\langle \bar{\mu}_1|` 和 :math:`\langle \bar{\mu}_2|`
和 :math:`\langle \mu_1|` 和 :math:`\langle \mu_2|`
按照双正交的方式 (13.7.54) 和 (13.7.55) 联系
.. math::
\Bigg\langle \overline{\begin{matrix} a \\ i \end{matrix}}
\Bigg\lvert \begin{matrix} c \\ k \end{matrix}
\Bigg\rangle =&\ \delta_{ai,ck} \\
\Bigg\langle \overline{\begin{matrix} ab \\ ij \end{matrix}}
\Bigg\lvert \begin{matrix} cd \\ kl \end{matrix}
\Bigg\rangle =&\ P_{ij}^{ab} \delta_{aibj,ckdl}
= P_{kl}^{cd} \delta_{aibj,ckdl}
其中
.. math::
P_{ij}^{ab} A_{ij}^{ab} = A_{ij}^{ab} + A_{ji}^{ba}
由于三重激发算符是冗余的, 我们不能建立一个投影基组 :math:`\langle \bar{\mu}|`
和 CSF :math:`|\mu\rangle` 的线性组合双正交.
我们应该直接假定 :math:`\langle \bar{\mu}_3|`
构成一个线性无关基组, 对于线性相关的 :math:`\langle \mu_3|` 张成的空间,
但是我们将不指定它们的具体形式.
| 28.685567 | 112 | 0.609883 |
449973926a8a8c19895829d27d541397cf7c31cf | 1,254 | rst | reStructuredText | docs/source/content/overview/Contributing.rst | sahithyaravi1493/modAL | 39336f21cd872974cf2f34c1c79012ca30a96819 | [
"MIT"
] | 1,460 | 2018-10-18T18:40:59.000Z | 2022-03-30T18:00:12.000Z | docs/source/content/overview/Contributing.rst | sahithyaravi1493/modAL | 39336f21cd872974cf2f34c1c79012ca30a96819 | [
"MIT"
] | 124 | 2018-10-31T06:48:18.000Z | 2022-03-25T06:09:25.000Z | docs/source/content/overview/Contributing.rst | sahithyaravi1493/modAL | 39336f21cd872974cf2f34c1c79012ca30a96819 | [
"MIT"
] | 236 | 2018-10-19T01:16:21.000Z | 2022-03-05T02:05:31.000Z | Contributing
============
Contributions to modAL are very much welcome! If you would like to help in general, visit the Issues page, where you'll find bugs to be fixed, features to be implemented. If you have a concrete feature in mind, you can proceed as follows.
1. Open a new issue. This helps us to discuss your idea and makes sure that you are not working in parallel with other contributors.
2. Fork the modAL repository and clone your fork to your local machine:
.. code:: bash
$ git clone git@github.com:username/modAL.git
3. Create a feature branch for the changes from the dev branch:
.. code:: bash
$ git checkout -b new-feature dev
Make sure that you create your branch from ``dev``.
4. After you have finished implementing the feature, make sure that all the tests pass. The tests can be run as
.. code:: bash
$ python3 path-to-modAL-repo/tests/core_tests.py
5. Commit and push the changes.
.. code:: bash
$ git add modified_files
$ git commit -m 'commit message explaning the changes briefly'
$ git push origin new-feature3
6. Create a pull request from your fork **to the dev branch**. After the code is reviewed and possible issues are cleared, the pull request is merged to ``dev``.
| 32.153846 | 238 | 0.724083 |
b34fca8470e4f57afd3958b79e30f63bff8f3164 | 2,415 | rst | reStructuredText | doc/index.rst | openlabs/mongo-python-driver | 1def725f4a184ac2701205f292efc6c46d5d397c | [
"Apache-2.0"
] | null | null | null | doc/index.rst | openlabs/mongo-python-driver | 1def725f4a184ac2701205f292efc6c46d5d397c | [
"Apache-2.0"
] | null | null | null | doc/index.rst | openlabs/mongo-python-driver | 1def725f4a184ac2701205f292efc6c46d5d397c | [
"Apache-2.0"
] | null | null | null | PyMongo |release| Documentation
===============================
Overview
--------
**PyMongo** is a Python distribution containing tools for working with
`MongoDB <http://www.mongodb.org>`_, and is the recommended way to
work with MongoDB from Python. This documentation attempts to explain
everything you need to know to use **PyMongo**.
.. todo:: a list of PyMongo's features
:doc:`installation`
Instructions on how to get the distribution.
:doc:`tutorial`
Start here for a quick overview.
:doc:`examples/index`
Examples of how to perform specific tasks.
:doc:`faq`
Some questions that come up often.
:doc:`api/index`
The complete API documentation, organized by module.
:doc:`tools`
A listing of Python tools and libraries that have been written for
MongoDB.
Getting Help
------------
If you're having trouble or have questions about PyMongo, the best place to ask is the `MongoDB user group <http://groups.google.com/group/mongodb-user>`_. Once you get an answer, it'd be great if you could work it back into this documentation and contribute!
Issues
------
All issues should be reported (and can be tracked / voted for /
commented on) at the main `MongoDB JIRA bug tracker
<http://jira.mongodb.org/browse/PYTHON>`_, in the "Python Driver"
project.
Contributing
------------
**PyMongo** has a large :doc:`community <contributors>` and
contributions are always encouraged. Contributions can be as simple as
minor tweaks to this documentation. To contribute, fork the project on
`github <http://github.com/mongodb/mongo-python-driver/>`_ and send a
pull request.
Changes
-------
See the :doc:`changelog` for a full list of changes to PyMongo.
For older versions of the documentation please see the
`archive list <http://api.mongodb.org/python/>`_.
About This Documentation
------------------------
This documentation is generated using the `Sphinx
<http://sphinx.pocoo.org/>`_ documentation generator. The source files
for the documentation are located in the *doc/* directory of the
**PyMongo** distribution. To generate the docs locally run the
following command from the root directory of the **PyMongo** source:
.. code-block:: bash
$ python setup.py doc
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. toctree::
:hidden:
installation
tutorial
examples/index
faq
api/index
tools
contributors
changelog
| 27.443182 | 259 | 0.715942 |
886e00c320847f80464a05ef52080d41fc367e56 | 6,385 | rst | reStructuredText | akka-docs/scala/camel.rst | ryandbair/akka | b92e22acda66525b7995994fcb0d2613723d8fbc | [
"Apache-2.0"
] | null | null | null | akka-docs/scala/camel.rst | ryandbair/akka | b92e22acda66525b7995994fcb0d2613723d8fbc | [
"Apache-2.0"
] | null | null | null | akka-docs/scala/camel.rst | ryandbair/akka | b92e22acda66525b7995994fcb0d2613723d8fbc | [
"Apache-2.0"
] | null | null | null |
.. _camel-scala:
#######
Camel
#######
Additional Resources
====================
For an introduction to akka-camel 2, see also the Peter Gabryanczyk's talk `Migrating akka-camel module to Akka 2.x`_.
For an introduction to akka-camel 1, see also the `Appendix E - Akka and Camel`_
(pdf) of the book `Camel in Action`_.
.. _Appendix E - Akka and Camel: http://www.manning.com/ibsen/appEsample.pdf
.. _Camel in Action: http://www.manning.com/ibsen/
.. _Migrating akka-camel module to Akka 2.x: http://skillsmatter.com/podcast/scala/akka-2-x
Other, more advanced external articles (for version 1) are:
* `Akka Consumer Actors: New Features and Best Practices <http://krasserm.blogspot.com/2011/02/akka-consumer-actors-new-features-and.html>`_
* `Akka Producer Actors: New Features and Best Practices <http://krasserm.blogspot.com/2011/02/akka-producer-actor-new-features-and.html>`_
Introduction
============
The akka-camel module allows actors to receive
and send messages over a great variety of protocols and APIs. This section gives
a brief overview of the general ideas behind the akka-camel module, the
remaining sections go into the details. In addition to the native Scala and Java
actor API, actors can now exchange messages with other systems over large number
of protocols and APIs such as HTTP, SOAP, TCP, FTP, SMTP or JMS, to mention a
few. At the moment, approximately 80 protocols and APIs are supported.
Apache Camel
------------
The akka-camel module is based on `Apache Camel`_, a powerful and light-weight
integration framework for the JVM. For an introduction to Apache Camel you may
want to read this `Apache Camel article`_. Camel comes with a
large number of `components`_ that provide bindings to different protocols and
APIs. The `camel-extra`_ project provides further components.
.. _Apache Camel: http://camel.apache.org/
.. _Apache Camel article: http://architects.dzone.com/articles/apache-camel-integration
.. _components: http://camel.apache.org/components.html
.. _camel-extra: http://code.google.com/p/camel-extra/
Consumer
--------
Usage of Camel's integration components in Akka is essentially a
one-liner. Here's an example.
.. includecode:: code/docs/camel/Introduction.scala#Consumer-mina
The above example exposes an actor over a tcp endpoint on port 6200 via Apache
Camel's `Mina component`_. The actor implements the endpointUri method to define
an endpoint from which it can receive messages. After starting the actor, tcp
clients can immediately send messages to and receive responses from that
actor. If the message exchange should go over HTTP (via Camel's `Jetty
component`_), only the actor's endpointUri method must be changed.
.. _Mina component: http://camel.apache.org/mina.html
.. _Jetty component: http://camel.apache.org/jetty.html
.. includecode:: code/docs/camel/Introduction.scala#Consumer
Producer
--------
Actors can also trigger message exchanges with external systems i.e. produce to
Camel endpoints.
.. includecode:: code/docs/camel/Introduction.scala
:include: imports,Producer
In the above example, any message sent to this actor will be sent to
the JMS queue ``orders``. Producer actors may choose from the same set of Camel
components as Consumer actors do.
CamelMessage
------------
The number of Camel components is constantly increasing. The akka-camel module
can support these in a plug-and-play manner. Just add them to your application's
classpath, define a component-specific endpoint URI and use it to exchange
messages over the component-specific protocols or APIs. This is possible because
Camel components bind protocol-specific message formats to a Camel-specific
`normalized message format`__. The normalized message format hides
protocol-specific details from Akka and makes it therefore very easy to support
a large number of protocols through a uniform Camel component interface. The
akka-camel module further converts mutable Camel messages into immutable
representations which are used by Consumer and Producer actors for pattern
matching, transformation, serialization or storage.
__ https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/Message.java
Dependencies
============
SBT
---
.. code-block:: scala
"com.typesafe.akka" % "akka-camel" % "2.1-SNAPSHOT"
Maven
-----
.. code-block:: xml
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-camel</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
.. _camel-consumer-actors:
Consumer Actors
================
For objects to receive messages, they must mixin the `Consumer`_
trait. For example, the following actor class (Consumer1) implements the
endpointUri method, which is declared in the Consumer trait, in order to receive
messages from the ``file:data/input/actor`` Camel endpoint.
.. _Consumer: http://github.com/akka/akka/blob/master/akka-camel/src/main/scala/akka/camel/Consumer.scala
.. includecode:: code/docs/camel/Consumers.scala#Consumer1
Whenever a file is put into the data/input/actor directory, its content is
picked up by the Camel `file component`_ and sent as message to the
actor. Messages consumed by actors from Camel endpoints are of type
`CamelMessage`_. These are immutable representations of Camel messages.
.. _file component: http://camel.apache.org/file2.html
.. _Message: http://github.com/akka/akka/blob/master/akka-camel/src/main/scala/akka/camel/CamelMessage.scala
Here's another example that sets the endpointUri to
``jetty:http://localhost:8877/camel/default``. It causes Camel's `Jetty
component`_ to start an embedded `Jetty`_ server, accepting HTTP connections
from localhost on port 8877.
.. _Jetty component: http://camel.apache.org/jetty.html
.. _Jetty: http://www.eclipse.org/jetty/
.. includecode:: code/docs/camel/Consumers.scala#Consumer2
After starting the actor, clients can send messages to that actor by POSTing to
``http://localhost:8877/camel/default``. The actor sends a response by using the
self.reply method (Scala). For returning a message body and headers to the HTTP
client the response type should be `Message`_. For any other response type, a
new Message object is created by akka-camel with the actor response as message
body.
.. _Message: http://github.com/akka/akka/blob/master/akka-camel/src/main/scala/akka/camel/CamelMessage.scala
| 40.157233 | 140 | 0.764918 |
060bbaa0392eb9ed354b0d5824bfecf1eb7fad79 | 42 | rst | reStructuredText | docs/_source/introduction.rst | Eisbrenner/windeval | bafac47a5c2ed374e1f045a5c7b99ccc3497a2a1 | [
"MIT"
] | null | null | null | docs/_source/introduction.rst | Eisbrenner/windeval | bafac47a5c2ed374e1f045a5c7b99ccc3497a2a1 | [
"MIT"
] | 5 | 2020-05-01T15:28:48.000Z | 2020-11-08T22:41:34.000Z | docs/_source/introduction.rst | Eisbrenner/windeval | bafac47a5c2ed374e1f045a5c7b99ccc3497a2a1 | [
"MIT"
] | 2 | 2020-04-22T09:19:25.000Z | 2020-04-22T09:23:47.000Z | First Steps
===========
Install with ...
| 8.4 | 16 | 0.5 |
7d54146f0d53258e2aa40def855293b105970014 | 5,265 | rst | reStructuredText | doc/inspire.rst | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 347 | 2015-01-19T15:47:08.000Z | 2022-03-23T20:33:17.000Z | doc/inspire.rst | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 374 | 2015-01-05T07:54:31.000Z | 2022-03-24T08:23:10.000Z | doc/inspire.rst | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 188 | 2015-01-07T00:59:28.000Z | 2022-03-15T09:05:57.000Z | .. _inpire:
.. highlight:: yaml
INSPIRE View Service
====================
MapProxy can act as an INSPIRE View Service. A View Service is a WMS 1.3.0 with an extended capabilities document.
.. versionadded:: 1.8.1
INSPIRE Metadata
----------------
A View Service can either link to an existing metadata document or it can embed the service and layer metadata.
These two options are described as Scenario 1 and 2 in the Technical Guidance document.
Linked Metadata
^^^^^^^^^^^^^^^
Scenario 1 uses links to existing INSPIRE Discovery Services (CSW). You can link to metadata documents for the service and each layer.
For services you need to use the ``inspire_md`` block inside ``services.wms`` with ``type: linked``.
For example::
services:
wms:
md:
title: Example INSPIRE View Service
inspire_md:
type: linked
metadata_url:
media_type: application/vnd.iso.19139+xml
url: http://example.org/csw/doc
languages:
default: eng
The View Services specification uses the WMS 1.3.0 extended capabilities for the layers metadata.
Refer to the :ref:`layers metadata documentation<layer_metadata>`.
For example::
layers:
- name: example_layer
title: Example Layer
md:
metadata:
- url: http://example.org/csw/layerdoc
type: ISO19115:2003
format: text/xml
Embedded Metadata
^^^^^^^^^^^^^^^^^
Scenario 2 embeds the metadata directly into the capabilities document.
Some metadata elements are mapped to an equivalent element in the WMS capabilities. The Resource Title is set with the normal `title` option for example. Other elements need to be configured inside the ``inspire_md`` block with ``type: embedded``.
Here is a full example::
services:
wms:
md:
title: Example INSPIRE View Service
abstract: This is an example service with embedded INSPIRE metadata.
online_resource: http://example.org/
contact:
person: Your Name Here
position: Technical Director
organization: Acme Inc.
address: Fakestreet 123
city: Somewhere
postcode: 12345
country: Germany
phone: +49(0)000-000000-0
fax: +49(0)000-000000-0
email: info@example.org
access_constraints: constraints
fees: 'None'
keyword_list:
- vocabulary: GEMET
keywords: [Orthoimagery]
inspire_md:
type: embedded
resource_locators:
- url: http://example.org/metadata
media_type: application/vnd.iso.19139+xml
temporal_reference:
date_of_creation: 2015-05-01
metadata_points_of_contact:
- organisation_name: Acme Inc.
email: acme@example.org
conformities:
- title:
COMMISSION REGULATION (EU) No 1089/2010 of 23 November 2010 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards interoperability of spatial data sets and services
date_of_publication: 2010-12-08
uris:
- OJ:L:2010:323:0011:0102:EN:PDF
resource_locators:
- url: http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:EN:PDF
media_type: application/pdf
degree: notEvaluated
mandatory_keywords:
- infoMapAccessService
- humanGeographicViewer
keywords:
- title: GEMET - INSPIRE themes
date_of_last_revision: 2008-06-01
keyword_value: Orthoimagery
metadata_date: 2015-07-23
metadata_url:
media_type: application/vnd.iso.19139+xml
url: http://example.org/csw/doc
You can express all dates as either ``date_of_creation``, ``date_of_publication`` or ``date_of_last_revision``.
The View Services specification uses the WMS 1.3.0 extended capabilities for the layers metadata.
Refer to the :ref:`layers metadata documentation<layer_metadata>` for all available options.
For example::
layers:
- name: example_layer
title: Example Layer
legendurl: http://example.org/example_legend.png
md:
abstract: Some abstract
keyword_list:
- vocabulary: GEMET
keywords: [Orthoimagery]
metadata:
- url: http://example.org/csw/layerdoc
type: ISO19115:2003
format: text/xml
identifier:
- url: http://www.example.org
name: example.org
value: "http://www.example.org#cf3c8572-601f-4f47-a922-6c67d388d220"
Languages
---------
A View Service always needs to indicate the language of the layer names, abstracts, map labels, etc..
You can only configure a single language as MapProxy does not support multi-lingual configurations.
You need to set the default language as a `ISO 639-2/alpha-3 <https://www.loc.gov/standards/iso639-2/php/code_list.php>`_ code:
::
inspire_md:
languages:
default: eng
....
| 33.322785 | 247 | 0.625261 |
056cbc66a68515aef4e81a187de674527f662410 | 10,113 | rst | reStructuredText | doc/more.static.rst | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | 314 | 2015-01-01T01:42:52.000Z | 2022-01-07T21:46:15.000Z | doc/more.static.rst | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | 369 | 2015-01-02T19:10:40.000Z | 2021-07-03T04:37:27.000Z | doc/more.static.rst | DuncanBetts/morepath | acad10489b051df9c512f6735a9338854745a599 | [
"BSD-3-Clause"
] | 37 | 2015-01-11T09:22:02.000Z | 2021-07-02T20:48:20.000Z | Static resources with Morepath
==============================
Introduction
------------
A modern client-side web application is built around JavaScript and
CSS. A web server is responsible for serving these and other types
of static content such as images to the client.
Morepath does not include in itself a way to serve these static
resources. Instead it leaves the task to other WSGI components you can
integrate with the Morepath WSGI component. Examples of such systems
that can be integrated through WSGI are BowerStatic_, Fanstatic_,
Webassets_, and webob.static_.
Examples will focus on BowerStatic integration to demonstrate a method
for serving JavaScript and CSS. To demonstrate a method for serving
other static resources such as an image we will use webob.static.
We recommend you read the BowerStatic documentation, but we provide a
small example of how to integrate it here that should help you get
started. You can find all the example code in the `github repo`_.
.. _BowerStatic: http://bowerstatic.readthedocs.org
.. _Fanstatic: http://fanstatic.org
.. _Webassets: http://webassets.readthedocs.org/
.. _`github repo`: https://github.com/morepath/morepath_static
.. _webob.static: http://webob.readthedocs.org/en/latest/modules/static.html
Application layout
------------------
To integrate BowerStatic with Morepath we can use the `more.static`_
extension.
.. _`more.static`: https://pypi.python.org/pypi/more.static
First we need to include ``more.static`` as a dependency of our code
in ``setup.py``. Once it is installed, we can create a Morepath
application that subclasses from ``more.static.StaticApp`` to get its
functionality::
from more.static import StaticApp
class App(StaticApp):
pass
We give it a simple HTML page on the root HTML that contains a
``<head>`` section in its HTML::
@App.path(path='/')
class Root(object):
pass
@App.html(model=Root)
def root_default(self, request):
return ("<!DOCTYPE html><html><head></head><body>"
"jquery is inserted in the HTML source</body></html>")
It's important to use ``@App.html`` as opposed to ``@App.view``, as
that sets the content-header to ``text/html``, something that
BowerStatic checks before it inserts any ``<link>`` or ``<script>``
tags. It's also important to include a ``<head>`` section, as that's
where BowerStatic includes the static resources by default.
The app configuration code we store in the ``app.py`` module of the Python
package.
In the ``run.py`` module of the Python package we set up a ``run()`` function
that when run serves the WSGI application to the web::
from .app import App
def run():
morepath.autoscan()
App.commit()
wsgi = App()
morepath.run(wsgi)
Manual scan
-----------
We recommend you use ``morepath.autoscan`` to make sure that all code
that uses Morepath is automatically scanned. If you *do not* use
``autoscan`` but use manual ``morepath.scan()`` instead, you need to
scan ``more.static`` explicitly, like this::
import more.static
def run():
morepath.scan(more.static)
App.commit()
wsgi = App()
morepath.run(wsgi)
Bower
-----
BowerStatic_ integrates the Bower_ JavaScript package manager with a
Python WSGI application such as Morepath.
Once you have ``bower`` installed, go to your Python package directory
(where the ``app.py`` lives), and install a Bower component. Let's
take ``jquery``::
bower install jquery
You should now see a ``bower_components`` subdirectory in your Python
package. We placed it here so that when we distribute the Python
package that contains our application, the needed bower components are
automatically included in the package archive. You could place
``bower_components`` elsewhere however and manage its contents
separately.
.. _bower: http://bower.io
Registering ``bower_components``
--------------------------------
BowerStatic needs a single global ``bower`` object that you can
register multiple ``bower_components`` directories against. Let's
create it first::
bower = bowerstatic.Bower()
We now tell that ``bower`` object about our ``bower_component``
directory::
components = bower.components(
'app', os.path.join(os.path.dirname(__file__), 'bower_components'))
The first argument to ``bower.components`` is the name under which we
want to publish them. We just pick ``app``. The second argument
specifies the path to the ``bower.components`` directory. The
``os.path`` business here is a way to make sure that we get the
``bower_components`` next to this module (``app.py``) in this Python
package.
BowerStatic now lets you refer to files in the packages in
``bower_components`` to include them on the web, and also makes sure
they are available.
Saying which components to use
------------------------------
We now need to tell our application to use the ``components``
object. This causes it to look for static resources only in the
components installed there. We do this using the ``@App.static_components``
directive, like this::
@App.static_components()
def get_static_components():
return components
You could have another application that use another ``components``
object, or share this ``components`` with the other application. Each
app can only have a single ``components`` registered to it, though.
The ``static_components`` directive is not part of standard Morepath.
Instead it is part of the ``more.static`` extension, which we enabled
before by subclassing from ``StaticApp``.
Including stuff
---------------
Now we are ready to include static resources from ``bower_components``
into our application. We can do this using the ``include()`` method on
request. We modify our view to add an ``include()`` call::
@App.html(model=Root)
def root_default(self, request):
request.include('jquery')
return ("<!DOCTYPE html><html><head></head><body>"
"jquery is inserted in the HTML source</body></html>")
When we now open the view in our web browser and check its source, we
can see it includes the jquery we installed in ``bower_components``.
Note that just like the ``static_components`` directive, the
``include()`` method is not part of standard Morepath, but has been
installed by the ``more.static.StaticApp`` base class as well.
Local components
----------------
In many projects we want to develop our *own* client-side JS or CSS
code, not just rely on other people's code. We can do this by using
local components. First we need to wrap the existing ``components`` in
an object that allows us to add local ones::
local = bower.local_components('local', components)
We can now add our own local components. A local component is a directory
that needs a ``bower.json`` in it. You can create a ``bower.json`` file
most easily by going into the directory and using ``bower init`` command::
$ mkdir my_component
$ cd my_component
$ bower init
You can edit the generated ``bower.json`` further, for instance to
specify dependencies. You now have a bower component. You can add any
static files you are developing into this directory.
Now you need to tell the local components object about it::
local.component('/path/to/my_component', version=None)
See the `BowerStatic local component documentation
<http://bowerstatic.readthedocs.org/en/latest/local.html>`_ for more
of what you can do with ``version`` -- it's clever about automatically
busting the cache when you change things.
You need to tell your application that instead of plain ``components``
you want to use ``local`` instead, so we modify our
``static_components`` directive::
@App.static_components()
def get_static_components():
return local
When you now use ``request.include()``, you can include local
components by their name (as in ``bower.json``) as well::
request.include('my_component')
It automatically pulls in any dependencies declared in ``bower.json``
too.
As mentioned before, check the ``morepath_static`` `github repo`_ for
the complete example.
A note about mounted applications
---------------------------------
``more.static`` uses a tween to inject scripts into the response (see
:doc:`tweens`). If you use ``more.static`` in a view in a mounted
application, you need to make sure that the root application also
derives from ``more.static.StaticApp``, otherwise the resources aren't
inserted correctly::
from more.static import StaticApp
class App(StaticApp): # this needs to subclass StaticApp too
pass
class Mounted(StaticApp):
pass
@App.mount(app=Mounted, path='mounted')
def mount():
return Mounted()
Other static content
--------------------
In essence, Morepath doesn't enforce any particular method for serving
static content to the client as long as the content eventually ends up
in the response object returned. Therefore, there are different
approaches to serving static content.
Since a Morepath view returns a WebOb response object, that object
can be loaded with any type of binary content in the body along
with the necessary HTTP headers to describe the content type and size.
In this example, we use a WebOb helper class webob.static.FileApp_
to serve a PNG image::
from webob import static
@App.path(path='')
class Image(object):
path = 'image.png'
@App.view(model=Image)
def view_image(self, request):
return request.get_response(static.FileApp(self.path))
In the above example FileApp does the heavy lifting by opening
the file, guessing the MIME type, updating the headers, and returning
the response object which is in-turn returned by the Morepath view.
Note that the same helper class can be used to to serve most types
of ``MIME`` content.
This example is one way to serve an image, but it is not the only way.
In cases that require a more elaborate method for serving the content
this `WebOb File-Serving Example`_ may be helpful.
.. _`WebOb File-Serving Example`: http://webob.readthedocs.org/en/latest/file-example.html
.. _webob.static.FileApp: http://webob.readthedocs.org/en/latest/modules/static.html#webob.static.FileApp
| 33.486755 | 105 | 0.733314 |
1f830b2b41f6f5ec0297bf1fe1ddb85be0c8c988 | 417 | rst | reStructuredText | docs/api/skgpuppy.rst | fossabot/scikit-gpuppy | e024da04a29ee81ce3bd33ddbd216fee125b9ac1 | [
"BSD-3-Clause"
] | 5 | 2016-05-14T17:53:27.000Z | 2021-01-18T15:03:50.000Z | docs/api/skgpuppy.rst | fossabot/scikit-gpuppy | e024da04a29ee81ce3bd33ddbd216fee125b9ac1 | [
"BSD-3-Clause"
] | 3 | 2017-12-11T12:14:53.000Z | 2018-12-19T19:01:32.000Z | docs/api/skgpuppy.rst | fossabot/scikit-gpuppy | e024da04a29ee81ce3bd33ddbd216fee125b9ac1 | [
"BSD-3-Clause"
] | 3 | 2017-12-11T10:07:07.000Z | 2018-03-07T15:36:12.000Z | skgpuppy package
================
Submodules
----------
.. toctree::
skgpuppy.Covariance
skgpuppy.FFNI
skgpuppy.GaussianProcess
skgpuppy.InverseUncertaintyPropagation
skgpuppy.MLE
skgpuppy.PDF
skgpuppy.TaylorPropagation
skgpuppy.UncertaintyPropagation
skgpuppy.Utilities
Module contents
---------------
.. automodule:: skgpuppy
:members:
:undoc-members:
:show-inheritance:
| 16.038462 | 41 | 0.676259 |
03cecbfa0cae0a8421f17802f8d13316c631449d | 3,752 | rst | reStructuredText | presto-docs/src/main/sphinx/release/release-0.198.rst | sshardool/presto-1 | 484d421d3ea6557ac450646acec930db645fbbfc | [
"Apache-2.0"
] | 12 | 2015-12-11T02:36:41.000Z | 2021-09-15T06:54:35.000Z | presto-docs/src/main/sphinx/release/release-0.198.rst | sshardool/presto-1 | 484d421d3ea6557ac450646acec930db645fbbfc | [
"Apache-2.0"
] | 70 | 2020-04-23T15:01:27.000Z | 2022-02-03T14:24:26.000Z | presto-docs/src/main/sphinx/release/release-0.198.rst | sshardool/presto-1 | 484d421d3ea6557ac450646acec930db645fbbfc | [
"Apache-2.0"
] | 10 | 2020-05-13T09:17:29.000Z | 2022-01-06T18:35:19.000Z | =============
Release 0.198
=============
General Changes
---------------
* Perform semantic analysis before enqueuing queries.
* Add support for selective aggregates (``FILTER``) with ``DISTINCT`` argument qualifiers.
* Support ``ESCAPE`` for ``LIKE`` predicate in ``SHOW SCHEMAS`` and ``SHOW TABLES`` queries.
* Parse decimal literals (e.g. ``42.0``) as ``DECIMAL`` by default. Previously, they were parsed as
``DOUBLE``. This behavior can be turned off via the ``parse-decimal-literals-as-double`` config option or
the ``parse_decimal_literals_as_double`` session property.
* Fix ``current_date`` failure when the session time zone has a "gap" at ``1970-01-01 00:00:00``.
The time zone ``America/Bahia_Banderas`` is one such example.
* Add variant of :func:`sequence` function for ``DATE`` with an implicit one-day step increment.
* Increase the maximum number of arguments for the :func:`zip` function from 4 to 5.
* Add :func:`ST_IsValid`, :func:`geometry_invalid_reason`, :func:`simplify_geometry`, and
:func:`great_circle_distance` functions.
* Support :func:`min` and :func:`max` aggregation functions when the input type is unknown at query analysis time.
In particular, this allows using the functions with ``NULL`` literals.
* Add configuration property ``task.max-local-exchange-buffer-size`` for setting local exchange buffer size.
* Add trace token support to the scheduler and exchange HTTP clients. Each HTTP request sent
by the scheduler and exchange HTTP clients will have a "trace token" (a unique ID) in their
headers, which will be logged in the HTTP request logs. This information can be used to
correlate the requests and responses during debugging.
* Improve query performance when dynamic writer scaling is enabled.
* Improve performance of :func:`ST_Intersects`.
* Improve query latency when tables are known to be empty during query planning.
* Optimize :func:`array_agg` to avoid excessive object overhead and native memory usage with G1 GC.
* Improve performance for high-cardinality aggregations with ``DISTINCT`` argument qualifiers. This
is an experimental optimization that can be activated by disabling the ``use_mark_distinct`` session
property or the ``optimizer.use-mark-distinct`` config option.
* Improve parallelism of queries that have an empty grouping set.
* Improve performance of join queries involving the :func:`ST_Distance` function.
Resource Groups Changes
-----------------------
* Query Queues have been removed. Resource Groups are always enabled. The
config property ``experimental.resource-groups-enabled`` has been removed.
* Change ``WEIGHTED_FAIR`` scheduling policy to select oldest eligible sub group
of groups where utilization and share are identical.
CLI Changes
-----------
* The ``--enable-authentication`` option has been removed. Kerberos authentication
is automatically enabled when ``--krb5-remote-service-name`` is specified.
* Kerberos authentication now requires HTTPS.
Hive Changes
------------
* Add support for using `AWS Glue <https://aws.amazon.com/glue/>`_ as the metastore.
Enable it by setting the ``hive.metastore`` config property to ``glue``.
* Fix a bug in the ORC writer that will write incorrect data of type ``VARCHAR`` or ``VARBINARY``
into files.
JMX Changes
-----------
* Add wildcard character ``*`` which allows querying several MBeans with a single query.
SPI Changes
-----------
* Add performance statistics to query plan in ``QueryCompletedEvent``.
* Remove ``Page.getBlocks()``. This call was rarely used and performed an expensive copy.
Instead, use ``Page.getBlock(channel)`` or the new helper ``Page.appendColumn()``.
* Improve validation of ``ArrayBlock``, ``MapBlock``, and ``RowBlock`` during construction.
| 52.111111 | 114 | 0.740405 |
44485b15b825c7c89d97b0925247496397f4c974 | 4,227 | rst | reStructuredText | docs/source/seed_data.rst | patdaburu/elastalk | caf4c351e01b698ddabaad9935fc0a1556048795 | [
"MIT"
] | null | null | null | docs/source/seed_data.rst | patdaburu/elastalk | caf4c351e01b698ddabaad9935fc0a1556048795 | [
"MIT"
] | null | null | null | docs/source/seed_data.rst | patdaburu/elastalk | caf4c351e01b698ddabaad9935fc0a1556048795 | [
"MIT"
] | null | null | null | .. _seed_data:
.. image:: _static/images/logo.svg
:width: 100px
:alt: elastalk
:align: right
.. toctree::
:glob:
*****************************
Seeding Elasticsearch Indexes
*****************************
The :py:mod:`connect <elastalk.connect>` module contains a convenience function called
:py:func:`seed <elastalk.seed.seed>` that you can use to initialize
`Elasticsearch <https://www.elastic.co/products/elasticsearch>`_ indexes.
Directory Structure
*******************
When you call the :py:func:`seed <elastalk.seed.seed>` function you only need to provide a
path to the directory that contains your seed data, however the directory must conform to
particular structure.
And example seed data directory structure in the project is shown below.
.. code-block:: bash
seed
|-- config.toml
`-- indexes
|-- cats
| |-- cat
| | |-- 5836327c-3592-4fcb-a925-14a106bdcdab
| | `-- 9b31890a-28a1-4f59-a448-1f85dd2435a3
| `-- mappings.json
`-- dogs
`-- dog
|-- 564e74ba-1177-4d3c-9160-a08e116ad9ff
`-- de0a76e7-ecb9-4fac-b524-622ed8c344b8
The Base Directory (*"seed"*)
-----------------------------
This is the base directory that contains all the seed data. If you're creating your own seed data
set you may provide another name.
.. _seed_data_indexes:
Indexes
-------
All of the `Elasticsearch indexes <https://www.elastic.co/blog/what-is-an-elasticsearch-index>`_
are defined in a subdirectory called *indexes*. An Elasticsearch index will be created for each
subdirectory and the name of the subdirectory will be the name of the index.
.. _seed_data_document_types:
Document Types
--------------
Within each :ref:`index <seed_data_indexes>` directory there are directories that define
`document types <https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping.html>`_. The
name of the subdirectory will be the name of the document type.
.. _seed_data_documents:
Documents
---------
Within each :ref:`document type <seed_data_document_types>` directory are individual files that
represent the individual documents that will be indexed. The name of the file will be the
`id <https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html>`_ of
the document.
.. _seed_data_extra_config:
Extra Configuration
-------------------
You can supply additional information about the seed data in an index by supplying a `config.toml`
file in the :ref:`seed_data_indexes` directory.
.. note::
The :py:func:`seed <elastalk.seed.seed>` function supports a parameter called
`config` if, for some reason, you have a reason not to call your configuration files
`"config.toml"`.
.. _seed_data_mappings:
Mappings
^^^^^^^^
If your index has a static
`mapping <https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html>`_
you can include a `mappings` key in the
:ref:`index configuration file <seed_data_extra_config>`. The value of this key should match what
you would provide in the `mappings` if you were creating the index directly.
For example, if you would create the index by submitting the following `PUT` request to
Elasticsearch...
.. code-block:: javascript
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"title": { "type": "text" },
"name": { "type": "text" },
"age": { "type": "integer" },
"created": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
}
}
}
}
}
...your configuration file should include a `mappings` key that looks like this...
.. code-block:: javascript
{
"mappings": {
"_doc": {
"properties": {
"title": {
"type": "text"
},
"name": {
"type": "text"
},
"age": {
"type": "integer"
},
"created": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
}
}
}
}
}
| 27.993377 | 98 | 0.617223 |
5dcd4a49e524958b27ee3ea2757ffcf5a74ac39c | 1,014 | rst | reStructuredText | README.rst | invenio-toaster/invenio-pidrelations | c2baad7cb84fa729026f11dddfe943e42a6c6220 | [
"MIT"
] | null | null | null | README.rst | invenio-toaster/invenio-pidrelations | c2baad7cb84fa729026f11dddfe943e42a6c6220 | [
"MIT"
] | null | null | null | README.rst | invenio-toaster/invenio-pidrelations | c2baad7cb84fa729026f11dddfe943e42a6c6220 | [
"MIT"
] | null | null | null | ..
This file is part of Invenio.
Copyright (C) 2017-2019 CERN.
Invenio is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
======================
Invenio-PIDRelations
======================
.. image:: https://img.shields.io/travis/inveniosoftware/invenio-pidrelations.svg
:target: https://travis-ci.org/inveniosoftware/invenio-pidrelations
.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-pidrelations.svg
:target: https://coveralls.io/r/inveniosoftware/invenio-pidrelations
.. image:: https://img.shields.io/pypi/v/invenio-pidrelations.svg
:target: https://pypi.org/pypi/invenio-pidrelations
*This is an experimental developer preview release.*
* Extends InvenioPIDStore with PID relations, allowing for defining
PID versioning assembling PID collections or defining "Head" PIDs.
Further documentation is available on
https://invenio-pidrelations.readthedocs.io/
| 33.8 | 84 | 0.724852 |
b0fa604b8d5586f8730a9552176fca0cd66dbe72 | 2,209 | rst | reStructuredText | README.rst | julesy89/pyallocation | af80a8e2367a006121dd0702b55efa7b954bb039 | [
"Apache-2.0"
] | null | null | null | README.rst | julesy89/pyallocation | af80a8e2367a006121dd0702b55efa7b954bb039 | [
"Apache-2.0"
] | null | null | null | README.rst | julesy89/pyallocation | af80a8e2367a006121dd0702b55efa7b954bb039 | [
"Apache-2.0"
] | null | null | null |
================
pyallocation
================
----------
Validation
----------
The OCL-based program for validating CAP modes is provided in *CAP Models Validation.zip*.
To validate a CAP model, *e.g.,* system_n0.model, enter the following from within the CAP Models Validation directory:
**java -jar ./ExecutableOne.jar system_n0.model**
----------
Transformation
----------
----------
Solver
----------
The main Python scripts are:
1. solve\_cap\_single\_objective.py"
This one solves single-objective component allocation problems.
**Usage:** python .\\solve\_cap\_single\_objective.py ..\\resources\\system\_n1.model ..\\resources\\solutionSet\_1.model
2. solve\_cap\_multi\_objective.py
This one solves multi-objective component allocation problems.
**Usage:** python .\\solve\_cap\_multi\_objective.py ..\\resources\\system\_n1.model ..\\resources\\solutionSet\_1\_mo.model
3. visualize\_solution\_set.py
This one plots the solution set on a 3D scatter plot. In the plot, the high trade-off point(s) are shown in orange.
**Usage:** python .\\visualize\_solution\_set.py ..\\resources\\system\_n1.model ..\\resources\\solutionSet\_1\_mo.model
4. visualize\_a\_single\_solution.py
This one visualizes a single solution using a Petal Diagram.
**Usage:** python .\\visualize\_a\_single\_solution.py ..\\resources\\system\_n1.model ..\\resources\\solutionSet\_1\_mo.model 10
5. visualize\_solution\_set\_Pseudo\_Weights.py
This one visualizes the solution obtained using the pseudo-weight vector approach.
**Usage:** python .\\visualize\_solution\_set\_Pseudo\_Weights.py ..\\resources\\system\_n1.model ..\\resources\\solutionSet\_1\_mo.model
----------
Postprocessing
----------
.. _Contact:
----------
Contact
----------
Feel free to contact me if you have any question:
| `Issam Al-Azzoni <https://engineering.aau.ac.ae/en/academic-staff/staff/issam-al-azzoni>`_ (issam.alazzoni [at] aau.ac.ae)
| Al Ain University
| College of Engineering
| Abu Dhabi - United Arab Emirates
|
| `Julian Blank <http://julianblank.com>`_ (blankjul [at] egr.msu.edu)
| Michigan State University
| Computational Optimization and Innovation Laboratory (COIN)
| East Lansing, MI 48824, USA
| 26.939024 | 137 | 0.710276 |
d1fc868496d6678f582664eca1e1ff9c3fb6baf1 | 92 | rst | reStructuredText | API.rst | etijskens/ET-rng | 2e987bd088dd8bc1680b91412ea431b400a3e7d6 | [
"MIT"
] | null | null | null | API.rst | etijskens/ET-rng | 2e987bd088dd8bc1680b91412ea431b400a3e7d6 | [
"MIT"
] | null | null | null | API.rst | etijskens/ET-rng | 2e987bd088dd8bc1680b91412ea431b400a3e7d6 | [
"MIT"
] | null | null | null | ***
API
***
.. automodule:: et_rng
:members:
.. include:: ../et_rng/f2py_frng/frng.rst
| 10.222222 | 41 | 0.597826 |
0a42e73ccaaf77316e316783adf06b46ca3229e2 | 14,058 | rst | reStructuredText | minigrid_en.rst | MeinaPan/DI-engine-docs | 6cb634af7c3f04b1a72048c4d011e232533072ea | [
"Apache-2.0"
] | null | null | null | minigrid_en.rst | MeinaPan/DI-engine-docs | 6cb634af7c3f04b1a72048c4d011e232533072ea | [
"Apache-2.0"
] | null | null | null | minigrid_en.rst | MeinaPan/DI-engine-docs | 6cb634af7c3f04b1a72048c4d011e232533072ea | [
"Apache-2.0"
] | null | null | null | MiniGrid
~~~~~~~~~
Overview
=======
MiniGrid, that is, the minimized grid world environment, is a classic discrete action space reinforcement learning environment with sparse rewards, and is often used as a benchmark test environment for sparse reinforcement learning algorithms under discrete action space conditions.
In this game, the agent needs to learn to select the appropriate action in a discrete action set, complete the move in the grid world, obtain the key, open the door and a series of sequential decisions to reach the target position.
It has many different implementation versions, which are mainly introduced here
\ `MiniGrid <https://github.com/maximecb/gym-minigrid>`__, because its implementation is simple, lightweight, less code dependencies, and easy to install.
It includes MiniGrid-Empty-8x8-v0, MiniGrid-FourRooms-v0, MiniGrid-DoorKey-16x16-v0, MiniGrid-KeyCorridorS3R3-v0,
A series of environments such as MiniGrid-ObstructedMaze-2Dlh-v0, MiniGrid-ObstructedMaze-Full-v0, etc. The picture below shows the MiniGrid-DoorKey-16x16-v0 game.
.. image:: ./images/MiniGrid-DoorKey-16x16-v0.png
:align: center
:scale: 30%
Install
====
installation method
--------
Users can choose to install via pip one-click or git clone the repository and then pip install locally.
Note: If the user does not have root privileges, please add --user after the install command
.. code:: shell
# Method1: Install Directly
pip install gym-minigrid
# Method2: First clone this repository and install the dependencies with pip
git clone https://github.com/maximecb/gym-minigrid.git
cd gym-minigrid
pip install -e .
Verify installation
--------
After the installation is complete, you can run the following command on the Python command line. If the interactive interface of the game is displayed, the installation is successful:
.. code::python
cd gym-minigrid
./manual_control.py --env MiniGrid-Empty-8x8-v0
.._spatial original environment before transformation):
space before transformation (original environment)
=========================
.._ObservationSpace-1:
observation space
--------
- Take MiniGrid-Empty-8x8-v0 as an example,
.. code::python
env = gym.make('MiniGrid-Empty-8x8-v0')
obs1 = env.reset() # obs: {'image': numpy.ndarray (7, 7, 3),'direction': ,'mission': ,}
env = RGBImgPartialObsWrapper(env) # Get pixel observations
obs2 = env.reset() # obs: {'mission': ,'image': numpy.ndarray (56, 56, 3)}
env = ImgObsWrapper(env) # Get rid of the 'mission' field
obs3 = env.reset() # obs: numpy.ndarray (56, 56, 3)
# This FlatObsWrapper cannot be used after using the above Wrapper, it should be used alone
env = gym.make('MiniGrid-Empty-8x8-v0')
env = FlatObsWrapper(env)
obs4 = env.reset() # obs: numpy.ndarray (56, 56, 3)
- obs1 is a \ ``dict``, including \ ``image``, \ ``direction``, \ ``mission``, these 3 fields, of which \ ``image``\ field is a shape \``numpy.ndarray`` of (7, 7, 3), data type \``uint8``
(7, 7) means that only the world in the nearby 7x7 squares is observed (because the environment is partially observable), 3 means that each small square corresponds to a 3-dimensional description vector, note that this is not a real image; \ `` The direction``\ field is to give an instructive direction;
The \``mission``\ field is a text string describing what the agent should achieve in order to receive a reward.
- If the user wants to use the real pixel image, he needs to encapsulate the env through \``RGBImgPartialObsWrapper``\, obs2 is a \``dict``, including \``mission``, \ ``image`` \These 2 fields, where \ ``image``\ field is a \ ``numpy.ndarray``\ of shape (56, 56, 3), and the data type is \ ``uint8``
is a true image of the environment being partially observable;
- After passing \``ImgObsWrapper``\, obs3 is a \``numpy.ndarray``, shape is (56, 56, 3), data type is \ ``uint8``
- Our codebase uses a 4th \``FlatObsWrapper``\ method, which encodes the mission string in the \``mission``\ field in a one-hot way,
And concatenate it with the \``image``\ field content into a \``numpy.ndarray``\obs4 with shape (2739,) and data type \``float32``
.._actionspace-1:
action space
--------
- The game operation button space, generally a discrete action space with a size of 7, the data type is \ ``int``\, you need to pass in a python value (or a 0-dimensional np array, for example, action 3 is \ ``np.array (3)``\ )
- Action takes value in 0-6, the specific meaning is:
- 0: left
- 1: right
- 2:up
- 3: toggle
- 4: pickup
- 5: drop
- 6: done/noop
- Refer to `MiniGrid manual_control.py <https://github.com/maximecb/gym-minigrid/blob/master/manual_control.py>`_ , the keyboard key-action correspondence is:
- 'arrow left': left
- 'arrow right': right
- 'arrow up': up
- ‘ ’: toggle
- 'pageup': pickup
- 'pagedown': drop
- 'enter': done/noop
.. _BONUS SPACE-1:
Bonus space
--------
- Game score, different minigrid sub-environments have a small difference in the reward range, the maximum value is 1, which is generally a \ ``float``\ value. Because it is a sparse reward environment, it can only be reached when the agent (displayed as a red point) reaches goal
(displayed as green dots), there is a reward greater than zero. The specific value is determined by different environments and the total number of steps used to reach the goal. The reward before reaching the goal is all 0.
.._other-1:
other
----
- The game ends when the agent reaches the green goal or reaches the maximum step limit of the environment.
key facts
========
1. The observation input can be an image in the form of pixels or an "image" with specific semantics, or a textual string describing what the agent should achieve in order to obtain a reward.
2. Discrete action spaces.
3. Sparse reward, the scale of reward value changes is small, the maximum is 1, and the minimum is 0.
.._transformed spatial rl environment):
Transformed space (RL environment)
=======================
.._ObservationSpace-2:
observation space
--------
- Transform content: Our codebase uses a 4th \``FlatObsWrapper``\ method, which encodes the mission string in the \``mission``\ field in a one-hot fashion and combines it with \ ``image``\ field contents are concatenated into a long array
- Transformation result: one-dimensional np array with size \ ``(2739,)``\ , data type \ ``np.float32``\ , value ``[0., 7.]``
.. _Action Space-2:
action space
--------
- Basically no transformation, it is still a discrete action space of size N=7, generally a one-dimensional np array, the size is \ ``(1, )``\ , and the data type is \ ``np.int64``
.. _Bonus Space-2:
Bonus space
--------
- Transform content: basically no transform
The above space can be expressed as:
.. code::python
import gym
obs_space = gym.spaces.Box(low=0, high=5, shape=(2739,), dtype=np.float32)
act_space = gym.spaces.Discrete(7)
rew_space = gym.spaces.Box(low=0, high=1, shape=(1, ), dtype=np.float32)
.._other-2:
other
----
- The \ ``info``\ returned by the environment \ ``step``\ method must contain the \ ``final_eval_reward``\ key-value pair, which represents the evaluation index of the entire episode, and is the cumulative sum of the rewards of the entire episode in minigrid
.._other-3:
other
====
random seed
--------
- There are two parts of random seeds in the environment that need to be set, one is the random seed of the original environment, and the other is the random seed of the random library used by various environment transformations (such as \ ``random``\ , \ ``np.random` `\)
- For the environment caller, just set these two seeds through the \``seed``\ method of the environment, and do not need to care about the specific implementation details
- The specific implementation inside the environment: for random library seeds, set the value directly in the \``seed``\ method of the environment; for the seed of the original environment, inside the \``reset``\ method of the calling environment, The specific original environment\ ``reset``\ was previously set to seed + np_seed, where seed is the value of the aforementioned random library seed,
np_seed = 100 * np.random.randint(1, 1000).
The difference between training and testing environments
--------------------
- The training environment uses a dynamic random seed, that is, the random seed of each episode is different, generated by a random number generator, and the seed of this random number generator is fixed by the \``seed``\ method of the environment; test The environment uses a static random seed, i.e. the same random seed for each episode, specified by the \``seed``\ method.
Store video
--------
After the environment is created, but before reset, call the \``enable_save_replay``\ method to specify the path to save the game recording. The environment will automatically save the local video files after each episode ends. (The default call \ ``gym.wrapper.Monitor``\ implementation, depends on \ ``ffmpeg``\), the code shown below will run an environment episode and save the result of this episode in the form \ `` ./video/xxx.mp4``\ in a file like this:
.. code::python
from easydict import EasyDict
import numpy as np
from dizoo.minigrid.envs import MiniGridEnv
env = MiniGridEnv(EasyDict({'env_id': 'MiniGrid-Empty-8x8-v0', 'flat_obs': True}))
env.enable_save_replay(replay_path='./video')
obs = env.reset()
while True:
act_val = env.info().act_space.value
min_val, max_val = act_val['min'], act_val['max']
random_action = np.random.randint(min_val, max_val, size=(1,))
timestep = env.step(random_action)
if timestep.done:
print('Episode is over, final eval reward is: {}'.format(timestep.info['final_eval_reward']))
break
DI-zoo runnable code example
=====================
The full training configuration file is at `github
link <https://github.com/opendilab/DI-engine/tree/main/dizoo/minigrid/config>`
The specific configuration files, such as \ ``minigrid_r2d2_config.py``\ , use the following demo to run:
.. code::python
from easydict import EasyDict
from ding.entry import serial_pipeline
collector_env_num = 8
evaluator_env_num = 5
minigrid_r2d2_config = dict(
exp_name='minigrid_empty8_r2d2_n5_bs2_ul40',
env=dict(
collector_env_num=collector_env_num,
evaluator_env_num=evaluator_env_num,
env_id='MiniGrid-Empty-8x8-v0',
# env_id='MiniGrid-FourRooms-v0',
# env_id='MiniGrid-DoorKey-16x16-v0',
n_evaluator_episode=5,
stop_value=0.96,
),
policy=dict(
cuda=True,
on_policy=False,
priority=True,
priority_IS_weight=True,
model=dict(
obs_shape=2739,
action_shape=7,
encoder_hidden_size_list=[128, 128, 512],
),
discount_factor=0.997,
burnin_step=2, # TODO(pu) 20
nstep=5,
# (int) the whole sequence length to unroll the RNN network minus
# the timesteps of burnin part,
# i.e., <the whole sequence length> = <burnin_step> + <unroll_len>
unroll_len=40, # TODO(pu) 80
learn=dict(
# according to the R2D2 paper, actor parameter update interval is 400
# environment timesteps, and in per collect phase, we collect 32 sequence
# samples, the length of each samlpe sequence is <burnin_step> + <unroll_len>,
# which is 100 in our seeing, 32*100/400=8, so we set update_per_collect=8
# in most environments
update_per_collect=8,
batch_size=64,
learning_rate=0.0005,
target_update_theta=0.001,
),
collect=dict(
# NOTE it is important that don't include key n_sample here, to make sure self._traj_len=INF
each_iter_n_sample=32,
env_num=collector_env_num,
),
eval=dict(env_num=evaluator_env_num, ),
other=dict(
eps=dict(
type='exp',
start=0.95,
end=0.05,
decay=1e5,
),
replay_buffer=dict(
replay_buffer_size=100000,
# (Float type) How much prioritization is used: 0 means no prioritization while 1 means full prioritization
alpha=0.6,
# (Float type) How much correction is used: 0 means no correction while 1 means full correction
beta=0.4,
)
),
),
)
minigrid_r2d2_config = EasyDict(minigrid_r2d2_config)
main_config=minigrid_r2d2_config
minigrid_r2d2_create_config = dict(
env=dict(
type='minigrid',
import_names=['dizoo.minigrid.envs.minigrid_env'],
),
env_manager=dict(type='base'),
policy=dict(type='r2d2'),
)
minigrid_r2d2_create_config = EasyDict(minigrid_r2d2_create_config)
create_config=minigrid_r2d2_create_config
if __name__ == "__main__":
serial_pipeline([main_config, create_config], seed=0)
Benchmark Algorithm Performance
===========
- MiniGrid-Empty-8x8-v0 (under 0.5M env step, the average reward is greater than 0.95)
- MiniGrid-Empty-8x8-v0+R2D2
.. image:: images/empty8_r2d2.png
:align: center
:scale: 50%
- MiniGrid-FourRooms-v0 (under 10M env step, the average reward is greater than 0.6)
- MiniGrid-FourRooms-v0 + R2D2
.. image:: images/fourrooms_r2d2.png
:align: center
:scale: 50%
- MiniGrid-DoorKey-16x16-v0 (under 20M env step, the average reward is greater than 0.2)
- MiniGrid-DoorKey-16x16-v0 + R2D2
.. image:: images/doorkey_r2d2.png
:align: center
:scale: 50%
| 39.6 | 461 | 0.674776 |
318a3d5bac09d1ab225f63c6276c32f4c3cb4215 | 226 | rst | reStructuredText | README.rst | hampus/sudoku | 5438f9aa6e72461ea6469c285a5ea6e1bf70ceae | [
"BSD-3-Clause"
] | 1 | 2015-11-27T12:21:34.000Z | 2015-11-27T12:21:34.000Z | README.rst | hampus/sudoku | 5438f9aa6e72461ea6469c285a5ea6e1bf70ceae | [
"BSD-3-Clause"
] | null | null | null | README.rst | hampus/sudoku | 5438f9aa6e72461ea6469c285a5ea6e1bf70ceae | [
"BSD-3-Clause"
] | null | null | null | Sudoku solvers
==============
This git contains various small, fast and/or simple sudoku solvers in different
languages.
Each implementation has its own subdirectory.
See LICENSE.txt for the license that covers everything.
| 22.6 | 79 | 0.765487 |
f0b741463c80e7ef21d6b419950dfe5525791dcd | 2,439 | rst | reStructuredText | doc/config-reference/source/tables/cinder-solidfire.rst | adityamardikanugraha/openstack-doc | e6b9ac02e69fabbfdf13b64dae64b0cf9209a786 | [
"Apache-2.0"
] | null | null | null | doc/config-reference/source/tables/cinder-solidfire.rst | adityamardikanugraha/openstack-doc | e6b9ac02e69fabbfdf13b64dae64b0cf9209a786 | [
"Apache-2.0"
] | null | null | null | doc/config-reference/source/tables/cinder-solidfire.rst | adityamardikanugraha/openstack-doc | e6b9ac02e69fabbfdf13b64dae64b0cf9209a786 | [
"Apache-2.0"
] | 1 | 2018-10-09T10:01:57.000Z | 2018-10-09T10:01:57.000Z | ..
Warning: Do not edit this file. It is automatically generated from the
software project's code and your changes will be overwritten.
The tool to generate this file lives in openstack-doc-tools repository.
Please make any changes needed in the code, then run the
autogenerate-config-doc tool from the openstack-doc-tools repository, or
ask for help on the documentation mailing list, IRC channel or meeting.
.. _cinder-solidfire:
.. list-table:: Description of SolidFire driver configuration options
:header-rows: 1
:class: config-ref-table
* - Configuration option = Default value
- Description
* - **[DEFAULT]**
-
* - ``sf_account_prefix`` = ``None``
- (String) Create SolidFire accounts with this prefix. Any string can be used here, but the string "hostname" is special and will create a prefix using the cinder node hostname (previous default behavior). The default is NO prefix.
* - ``sf_allow_template_caching`` = ``True``
- (Boolean) Create an internal cache of copy of images when a bootable volume is created to eliminate fetch from glance and qemu-conversion on subsequent calls.
* - ``sf_allow_tenant_qos`` = ``False``
- (Boolean) Allow tenants to specify QOS on create
* - ``sf_api_port`` = ``443``
- (Unknown) SolidFire API port. Useful if the device api is behind a proxy on a different port.
* - ``sf_emulate_512`` = ``True``
- (Boolean) Set 512 byte emulation on volume creation;
* - ``sf_enable_vag`` = ``False``
- (Boolean) Utilize volume access groups on a per-tenant basis.
* - ``sf_enable_volume_mapping`` = ``True``
- (Boolean) Create an internal mapping of volume IDs and account. Optimizes lookups and performance at the expense of memory, very large deployments may want to consider setting to False.
* - ``sf_svip`` = ``None``
- (String) Overrides default cluster SVIP with the one specified. This is required or deployments that have implemented the use of VLANs for iSCSI networks in their cloud.
* - ``sf_template_account_name`` = ``openstack-vtemplate``
- (String) Account name on the SolidFire Cluster to use as owner of template/cache volumes (created if does not exist).
* - ``sf_volume_prefix`` = ``UUID-``
- (String) Create SolidFire volumes with this prefix. Volume names are of the form <sf_volume_prefix><cinder-volume-id>. The default is to use a prefix of 'UUID-'.
| 59.487805 | 236 | 0.710537 |
18709873b2942c23f58c0e8b395dd5034565dadf | 188 | rst | reStructuredText | roles/ensure-output-dirs/README.rst | eumel8/zuul-jobs | a197652af7ad1268c90a38b87cb2f0fe23d69bdc | [
"Apache-2.0"
] | 1 | 2019-02-28T20:12:32.000Z | 2019-02-28T20:12:32.000Z | roles/ensure-output-dirs/README.rst | matt-welch/zuul-jobs | 822d9bb2ddabb11381721477985c27f7c7d60586 | [
"Apache-2.0"
] | null | null | null | roles/ensure-output-dirs/README.rst | matt-welch/zuul-jobs | 822d9bb2ddabb11381721477985c27f7c7d60586 | [
"Apache-2.0"
] | 1 | 2019-02-27T20:59:35.000Z | 2019-02-27T20:59:35.000Z | Ensure output directories are in place
**Role Variables**
.. zuul:rolevar:: zuul_output_dir
:default: {{ ansible_user_dir }}/zuul-output
Base directory for collecting job output.
| 20.888889 | 47 | 0.744681 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.