| PostgreSQL 9.0.10 Documentation | ||||
|---|---|---|---|---|
| Prev | Up | Chapter 23. Routine Database Maintenance Tasks | Next |
PostgreSQL databases require periodic maintenance known as vacuuming. For many installations, it is sufficient to let vacuuming be performed by the autovacuum daemon, which is described in Section 23.1.5. You might need to adjust the autovacuuming parameters described there to obtain best results for your situation. Some database administrators will want to supplement or replace the daemon's activities with manually-managed VACUUM commands, which typically are executed according to a schedule by cron or Task Scheduler scripts. To set up manually-managed vacuuming properly, it is essential to understand the issues discussed in the next few subsections. Administrators who rely on autovacuuming may still wish to skim this material to help them understand and adjust autovacuuming.
PostgreSQL's VACUUM command has to process each table on a regular basis for several reasons:
To recover or reuse disk space occupied by updated or deleted rows.
To update data statistics used by the PostgreSQL query planner.
To protect against loss of very old data due to transaction ID wraparound.
Each of these reasons dictates performing VACUUM operations of varying frequency and scope, as explained in the following subsections.
There are two variants of VACUUM: standard VACUUM and VACUUM FULL. VACUUM FULL can reclaim more disk space but runs much more slowly. Also, the standard form of VACUUM can run in parallel with production database operations. (Commands such as SELECT, INSERT, UPDATE, and DELETE will continue to function normally, though you will not be able to modify the definition of a table with commands such as ALTER TABLE while it is being vacuumed.) VACUUM FULL requires exclusive lock on the table it is working on, and therefore cannot be done in parallel with other use of the table. Generally, therefore, administrators should strive to use standard VACUUM and avoid VACUUM FULL.
VACUUM creates a substantial amount of I/O traffic, which can cause poor performance for other active sessions. There are configuration parameters that can be adjusted to reduce the performance impact of background vacuuming — see Section 18.4.3.
In PostgreSQL, an UPDATE or DELETE of a row does not immediately remove the old version of the row. This approach is necessary to gain the benefits of multiversion concurrency control (MVCC, see Chapter 13): the row version must not be deleted while it is still potentially visible to other transactions. But eventually, an outdated or deleted row version is no longer of interest to any transaction. The space it occupies must then be reclaimed for reuse by new rows, to avoid unbounded growth of disk space requirements. This is done by running VACUUM.
The standard form of VACUUM removes dead row versions in tables and indexes and marks the space available for future reuse. However, it will not return the space to the operating system, except in the special case where one or more pages at the end of a table become entirely free and an exclusive table lock can be easily obtained. In contrast, VACUUM FULL actively compacts tables by writing a complete new version of the table file with no dead space. This minimizes the size of the table, but can take a long time. It also requires extra disk space for the new copy of the table, until the operation completes.
The usual goal of routine vacuuming is to do standard VACUUMs often enough to avoid needing VACUUM FULL. The autovacuum daemon attempts to work this way, and in fact will never issue VACUUM FULL. In this approach, the idea is not to keep tables at their minimum size, but to maintain steady-state usage of disk space: each table occupies space equivalent to its minimum size plus however much space gets used up between vacuumings. Although VACUUM FULL can be used to shrink a table back to its minimum size and return the disk space to the operating system, there is not much point in this if the table will just grow again in the future. Thus, moderately-frequent standard VACUUM runs are a better approach than infrequent VACUUM FULL runs for maintaining heavily-updated tables.
Some administrators prefer to schedule vacuuming themselves, for example doing all the work at night when load is low. The difficulty with doing vacuuming according to a fixed schedule is that if a table has an unexpected spike in update activity, it may get bloated to the point that VACUUM FULL is really necessary to reclaim space. Using the autovacuum daemon alleviates this problem, since the daemon schedules vacuuming dynamically in response to update activity. It is unwise to disable the daemon completely unless you have an extremely predictable workload. One possible compromise is to set the daemon's parameters so that it will only react to unusually heavy update activity, thus keeping things from getting out of hand, while scheduled VACUUMs are expected to do the bulk of the work when the load is typical.
For those not using autovacuum, a typical approach is to schedule a database-wide VACUUM once a day during a low-usage period, supplemented by more frequent vacuuming of heavily-updated tables as necessary. (Some installations with extremely high update rates vacuum their busiest tables as often as once every few minutes.) If you have multiple databases in a cluster, don't forget to VACUUM each one; the program vacuumdb might be helpful.
Tip: Plain VACUUM may not be satisfactory when a table contains large numbers of dead row versions as a result of massive update or delete activity. If you have such a table and you need to reclaim the excess disk space it occupies, you will need to use VACUUM FULL, or alternatively CLUSTER or one of the table-rewriting variants of ALTER TABLE. These commands rewrite an entire new copy of the table and build new indexes for it. All these options require exclusive lock. Note that they also temporarily use extra disk space approximately equal to the size of the table, since the old copies of the table and indexes can't be released until the new ones are complete.
Tip: If you have a table whose entire contents are deleted on a periodic basis, consider doing it with TRUNCATE rather than using DELETE followed by VACUUM. TRUNCATE removes the entire content of the table immediately, without requiring a subsequent VACUUM or VACUUM FULL to reclaim the now-unused disk space. The disadvantage is that strict MVCC semantics are violated.
The PostgreSQL query planner relies on statistical information about the contents of tables in order to generate good plans for queries. These statistics are gathered by the ANALYZE command, which can be invoked by itself or as an optional step in VACUUM. It is important to have reasonably accurate statistics, otherwise poor choices of plans might degrade database performance.
The autovacuum daemon, if enabled, will automatically issue ANALYZE commands whenever the content of a table has changed sufficiently. However, administrators might prefer to rely on manually-scheduled ANALYZE operations, particularly if it is known that update activity on a table will not affect the statistics of "interesting" columns. The daemon schedules ANALYZE strictly as a function of the number of rows inserted or updated; it has no knowledge of whether that will lead to meaningful statistical changes.
As with vacuuming for space recovery, frequent updates of statistics are more useful for heavily-updated tables than for seldom-updated ones. But even for a heavily-updated table, there might be no need for statistics updates if the statistical distribution of the data is not changing much. A simple rule of thumb is to think about how much the minimum and maximum values of the columns in the table change. For example, a timestamp column that contains the time of row update will have a constantly-increasing maximum value as rows are added and updated; such a column will probably need more frequent statistics updates than, say, a column containing URLs for pages accessed on a website. The URL column might receive changes just as often, but the statistical distribution of its values probably changes relatively slowly.
It is possible to run ANALYZE on specific tables and even just specific columns of a table, so the flexibility exists to update some statistics more frequently than others if your application requires it. In practice, however, it is usually best to just analyze the entire database, because it is a fast operation. ANALYZE uses a statistically random sampling of the rows of a table rather than reading every single row.
Tip: Although per-column tweaking of ANALYZE frequency might not be very productive, you might find it worthwhile to do per-column adjustment of the level of detail of the statistics collected by ANALYZE. Columns that are heavily used in WHERE clauses and have highly irregular data distributions might require a finer-grain data histogram than other columns. See ALTER TABLE SET STATISTICS, or change the database-wide default using the default_statistics_target configuration parameter.
Also, by default there is limited information available about the selectivity of functions. However, if you create an expression index that uses a function call, useful statistics will be gathered about the function, which can greatly improve query plans that use the expression index.
PostgreSQL's MVCC transaction semantics depend on being able to compare transaction ID (XID) numbers: a row version with an insertion XID greater than the current transaction's XID is "in the future" and should not be visible to the current transaction. But since transaction IDs have limited size (32 bits) a cluster that runs for a long time (more than 4 billion transactions) would suffer transaction ID wraparound: the XID counter wraps around to zero, and all of a sudden transactions that were in the past appear to be in the future — which means their output become invisible. In short, catastrophic data loss. (Actually the data is still there, but that's cold comfort if you cannot get at it.) To avoid this, it is necessary to vacuum every table in every database at least once every two billion transactions.
The reason that periodic vacuuming solves the problem is that PostgreSQL reserves a special XID as FrozenXID. This XID does not follow the normal XID comparison rules and is always considered older than every normal XID. Normal XIDs are compared using modulo-231 arithmetic. This means that for every normal XID, there are two billion XIDs that are "older" and two billion that are "newer"; another way to say it is that the normal XID space is circular with no endpoint. Therefore, once a row version has been created with a particular normal XID, the row version will appear to be "in the past" for the next two billion transactions, no matter which normal XID we are talking about. If the row version still exists after more than two billion transactions, it will suddenly appear to be in the future. To prevent this, old row versions must be reassigned the XID FrozenXID sometime before they reach the two-billion-transactions-old mark. Once they are assigned this special XID, they will appear to be "in the past" to all normal transactions regardless of wraparound issues, and so such row versions will be valid until deleted, no matter how long that is. This reassignment of old XIDs is handled by VACUUM.
vacuum_freeze_min_age controls how old an XID value has to be before it's replaced with FrozenXID. Larger values of this setting preserve transactional information longer, while smaller values increase the number of transactions that can elapse before the table must be vacuumed again.
VACUUM normally skips pages that don't have any dead row versions, but those pages might still have row versions with old XID values. To ensure all old XIDs have been replaced by FrozenXID, a scan of the whole table is needed. vacuum_freeze_table_age controls when VACUUM does that: a whole table sweep is forced if the table hasn't been fully scanned for vacuum_freeze_table_age minus vacuum_freeze_min_age transactions. Setting it to 0 forces VACUUM to always scan all pages, effectively ignoring the visibility map.
The maximum time that a table can go unvacuumed is two billion transactions minus the vacuum_freeze_min_age value at the time VACUUM last scanned the whole table. If it were to go unvacuumed for longer than that, data loss could result. To ensure that this does not happen, autovacuum is invoked on any table that might contain XIDs older than the age specified by the configuration parameter autovacuum_freeze_max_age. (This will happen even if autovacuum is disabled.)
This implies that if a table is not otherwise vacuumed, autovacuum will be invoked on it approximately once every autovacuum_freeze_max_age minus vacuum_freeze_min_age transactions. For tables that are regularly vacuumed for space reclamation purposes, this is of little importance. However, for static tables (including tables that receive inserts, but no updates or deletes), there is no need to vacuum for space reclamation, so it can be useful to try to maximize the interval between forced autovacuums on very large static tables. Obviously one can do this either by increasing autovacuum_freeze_max_age or decreasing vacuum_freeze_min_age.
The effective maximum for vacuum_freeze_table_age is 0.95 * autovacuum_freeze_max_age; a setting higher than that will be capped to the maximum. A value higher than autovacuum_freeze_max_age wouldn't make sense because an anti-wraparound autovacuum would be triggered at that point anyway, and the 0.95 multiplier leaves some breathing room to run a manual VACUUM before that happens. As a rule of thumb, vacuum_freeze_table_age should be set to a value somewhat below autovacuum_freeze_max_age, leaving enough gap so that a regularly scheduled VACUUM or an autovacuum triggered by normal delete and update activity is run in that window. Setting it too close could lead to anti-wraparound autovacuums, even though the table was recently vacuumed to reclaim space, whereas lower values lead to more frequent whole-table scans.
The sole disadvantage of increasing autovacuum_freeze_max_age (and vacuum_freeze_table_age along with it) is that the pg_clog subdirectory of the database cluster will take more space, because it must store the commit status of all transactions back to the autovacuum_freeze_max_age horizon. The commit status uses two bits per transaction, so if autovacuum_freeze_max_age is set to its maximum allowed value of two billion, pg_clog can be expected to grow to about half a gigabyte. If this is trivial compared to your total database size, setting autovacuum_freeze_max_age to its maximum allowed value is recommended. Otherwise, set it depending on what you are willing to allow for pg_clog storage. (The default, 200 million transactions, translates to about 50MB of pg_clog storage.)
One disadvantage of decreasing vacuum_freeze_min_age is that it might cause VACUUM to do useless work: changing a table row's XID to FrozenXID is a waste of time if the row is modified soon thereafter (causing it to acquire a new XID). So the setting should be large enough that rows are not frozen until they are unlikely to change any more. Another disadvantage of decreasing this setting is that details about exactly which transaction inserted or modified a row will be lost sooner. This information sometimes comes in handy, particularly when trying to analyze what went wrong after a database failure. For these two reasons, decreasing this setting is not recommended except for completely static tables.
To track the age of the oldest XIDs in a database, VACUUM stores XID statistics in the system tables pg_class and pg_database. In particular, the relfrozenxid column of a table's pg_class row contains the freeze cutoff XID that was used by the last whole-table VACUUM for that table. All normal XIDs older than this cutoff XID are guaranteed to have been replaced by FrozenXID within the table. Similarly, the datfrozenxid column of a database's pg_database row is a lower bound on the normal XIDs appearing in that database — it is just the minimum of the per-table relfrozenxid values within the database. A convenient way to examine this information is to execute queries such as:
SELECT relname, age(relfrozenxid) FROM pg_class WHERE relkind = 'r'; SELECT datname, age(datfrozenxid) FROM pg_database;
The age column measures the number of transactions from the cutoff XID to the current transaction's XID.
VACUUM normally only scans pages that have been modified since the last vacuum, but relfrozenxid can only be advanced when the whole table is scanned. The whole table is scanned when relfrozenxid is more than vacuum_freeze_table_age transactions old, when VACUUM's FREEZE option is used, or when all pages happen to require vacuuming to remove dead row versions. When VACUUM scans the whole table, after it's finished age(relfrozenxid) should be a little more than the vacuum_freeze_min_age setting that was used (more by the number of transactions started since the VACUUM started). If no whole-table-scanning VACUUM is issued on the table until autovacuum_freeze_max_age is reached, an autovacuum will soon be forced for the table.
If for some reason autovacuum fails to clear old XIDs from a table, the system will begin to emit warning messages like this when the database's oldest XIDs reach ten million transactions from the wraparound point:
WARNING: database "mydb" must be vacuumed within 177009986 transactions HINT: To avoid a database shutdown, execute a database-wide VACUUM in "mydb".
(A manual VACUUM should fix the problem, as suggested by the hint; but note that the VACUUM must be performed by a superuser, else it will fail to process system catalogs and thus not be able to advance the database's datfrozenxid.) If these warnings are ignored, the system will shut down and refuse to start any new transactions once there are fewer than 1 million transactions left until wraparound:
ERROR: database is not accepting commands to avoid wraparound data loss in database "mydb" HINT: Stop the postmaster and use a standalone backend to VACUUM in "mydb".
The 1-million-transaction safety margin exists to let the administrator recover without data loss, by manually executing the required VACUUM commands. However, since the system will not execute commands once it has gone into the safety shutdown mode, the only way to do this is to stop the server and use a single-user backend to execute VACUUM. The shutdown mode is not enforced by a single-user backend. See the postgres reference page for details about using a single-user backend.
PostgreSQL has an optional but highly recommended feature called autovacuum, whose purpose is to automate the execution of VACUUM and ANALYZE commands. When enabled, autovacuum checks for tables that have had a large number of inserted, updated or deleted tuples. These checks use the statistics collection facility; therefore, autovacuum cannot be used unless track_counts is set to true. In the default configuration, autovacuuming is enabled and the related configuration parameters are appropriately set.
The "autovacuum daemon" actually consists of multiple processes. There is a persistent daemon process, called the autovacuum launcher, which is in charge of starting autovacuum worker processes for all databases. The launcher will distribute the work across time, attempting to start one worker within each database every autovacuum_naptime seconds. (Therefore, if the installation has N databases, a new worker will be launched every autovacuum_naptime/N seconds.) A maximum of autovacuum_max_workers worker processes are allowed to run at the same time. If there are more than autovacuum_max_workers databases to be processed, the next database will be processed as soon as the first worker finishes. Each worker process will check each table within its database and execute VACUUM and/or ANALYZE as needed.
If several large tables all become eligible for vacuuming in a short amount of time, all autovacuum workers might become occupied with vacuuming those tables for a long period. This would result in other tables and databases not being vacuumed until a worker became available. There is no limit on how many workers might be in a single database, but workers do try to avoid repeating work that has already been done by other workers. Note that the number of running workers does not count towards max_connections or superuser_reserved_connections limits.
Tables whose relfrozenxid value is more than autovacuum_freeze_max_age transactions old are always vacuumed (this also applies to those tables whose freeze max age has been modified via storage parameters; see below). Otherwise, if the number of tuples obsoleted since the last VACUUM exceeds the "vacuum threshold", the table is vacuumed. The vacuum threshold is defined as:
vacuum threshold = vacuum base threshold + vacuum scale factor * number of tuples
where the vacuum base threshold is autovacuum_vacuum_threshold, the vacuum scale factor is autovacuum_vacuum_scale_factor, and the number of tuples is pg_class.reltuples. The number of obsolete tuples is obtained from the statistics collector; it is a semi-accurate count updated by each UPDATE and DELETE operation. (It is only semi-accurate because some information might be lost under heavy load.) If the relfrozenxid value of the table is more than vacuum_freeze_table_age transactions old, the whole table is scanned to freeze old tuples and advance relfrozenxid, otherwise only pages that have been modified since the last vacuum are scanned.
For analyze, a similar condition is used: the threshold, defined as:
analyze threshold = analyze base threshold + analyze scale factor * number of tuples
is compared to the total number of tuples inserted, updated, or deleted since the last ANALYZE.
Temporary tables cannot be accessed by autovacuum. Therefore, appropriate vacuum and analyze operations should be performed via session SQL commands.
The default thresholds and scale factors are taken from postgresql.conf, but it is possible to override them on a table-by-table basis; see Storage Parameters for more information. If a setting has been changed via storage parameters, that value is used; otherwise the global settings are used. See Section 18.9 for more details on the global settings.
Besides the base threshold values and scale factors, there are six more autovacuum parameters that can be set for each table via storage parameters. The first parameter, autovacuum_enabled, can be set to false to instruct the autovacuum daemon to skip that particular table entirely. In this case autovacuum will only touch the table if it must do so to prevent transaction ID wraparound. Another two parameters, autovacuum_vacuum_cost_delay and autovacuum_vacuum_cost_limit, are used to set table-specific values for the cost-based vacuum delay feature (see Section 18.4.3). autovacuum_freeze_min_age, autovacuum_freeze_max_age and autovacuum_freeze_table_age are used to set values for vacuum_freeze_min_age, autovacuum_freeze_max_age and vacuum_freeze_table_age respectively.
When multiple workers are running, the cost limit is "balanced" among all the running workers, so that the total impact on the system is the same, regardless of the number of workers actually running.


2 Kings 4:37
Then she went in, and fell at his feet, and bowed herself to the ground, and took up her son, and went out.


Provides optimization algorithms based on sequential quadratic programming (SQP) for maximum likelihood estimation of the mixture proportions in a finite mixture model where the component densities are known. The algorithms are expected to obtain solutions that are at least as accurate as the state-of-the-art MOSEK interior-point solver (called by function "KWDual" in the 'REBayes' package), and they are expected to arrive at solutions more quickly in large data sets. The algorithms are described in Y. Kim, P. Carbonetto, M. Stephens & M. Anitescu (2012) <arXiv:1806.01412>.
| Version: | 0.1-79 |
| Depends: | R (≥ 3.3.0) |
| Imports: | stats, Rcpp (≥ 0.12.15) |
| LinkingTo: | Rcpp, RcppArmadillo |
| Suggests: | Rmosek, REBayes, testthat, knitr, rmarkdown |
| Published: | 2018-11-14 |
| Author: | Youngseok Kim [aut], Peter Carbonetto [aut, cre], Mihai Anitescu [aut], Matthew Stephens [aut] |
| Maintainer: | Peter Carbonetto <peter.carbonetto at gmail.com> |
| BugReports: | https://github.com/stephenslab/mixsqp/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/stephenslab/mixsqp |
| NeedsCompilation: | yes |
| SystemRequirements: | C++11 |
| Citation: | mixsqp citation info |
| Materials: | README |
| CRAN checks: | mixsqp results |
| Reference manual: | mixsqp.pdf |
| Vignettes: |
mixsqp-intro |
| Package source: | mixsqp_0.1-79.tar.gz |
| Windows binaries: | r-devel: mixsqp_0.1-79.zip, r-release: mixsqp_0.1-79.zip, r-oldrel: mixsqp_0.1-79.zip |
| OS X binaries: | r-release: mixsqp_0.1-79.tgz, r-oldrel: mixsqp_0.1-79.tgz |
Please use the canonical form https://CRAN.R-project.org/package=mixsqp to link to this page.


Bounds
Used as a non-visual content container that manages content measure,
Similar to sassquatch 1 docBounds
.
Centers children with auto margin, clears floats, applies padding, and sets a max-width.
This is just a paragraph inside a stripe. There's no bounds element to center and set the measure of this text.
This paragraph is inside a bounds. It enjoyes auto-margin and a max-width to ensure the type measure remains readable at all viewport sizes.
Previous example, shaded to show detail
This paragraph is inside a bounds. It enjoyes auto-margin and a max-width to ensure the type measure remains readable.

This is just a paragraph inside a stripe. There's no bounds element to center and set the measure of this text.

This paragraph is inside a bounds. It enjoyes auto-margin and a max-width to ensure the type measure remains readable at all viewport sizes.

Previous example, shaded to show detail

This paragraph is inside a bounds. It enjoyes auto-margin and a max-width to ensure the type measure remains readable.

Bounds variants
| Class | Description |
|---|---|
.bounds |
standard (narrow) bounds for any type of content |
.bounds--wide |
bounds for wrapping wider content, such as gridList |
.bounds--sideHeader |
bounds for wrapping standard (narrow) content, offset by labels to the side at wide widths |
Side Header example
The bounds--sideHeader
variant applies styles to accommodate a
bounds-header
element. A bounds-header
is pulled to the left side
of the bounds on wide screens (large
breakpoint), and linearizes on small screens (less than large
).
I'm in a bounds header
This is just some content within the bounds, behaving like any other bounds content.
You can apply the bounds-header class to a single element, or wrap a group of elements you'd like to pull to the side on large screens.

I'm in a bounds header

I linearize on small screens

This is just some content within the bounds, behaving like any other bounds content.

You can apply the bounds-header class to a single element, or wrap a group of elements you'd like to pull to the side on large screens.

Chunk
Adds bottom space to an element or a group of elements.
Can be used in combination with any other component
(ie. class="row chunk"
)
Some heading
Some text
Some heading
Some text

Some heading

Some text

Some kind of caption

Chunky caption

Some heading

Some text

Some kind of caption

Row
Arranges content in rows using display: flex
.
The .row
class is applied to a wrapping element.
Direct children of .row
are flex children, and require
a class of .row-item
with an optional .row-item--shirnk
for a flex-shrink item.
The flex children in flex row do not have a flex-basis
set; a
basis is not required for most common layout tasks.
Includes table-cell
fallback for IE8.
Examples:

Item 1

Item 2

Item 3

Item 4

Item 1

Item 2

Item 3

Item 1

Item 2

Item 3

Item 1

Item 2

Item 3

Item 4

Row Item variants
A class of .row-item
is required on row items.
The following classes are optional variants:
| Class | Description |
|---|---|
.row-item--shrink |
Item shrinks to fit content |
.row-item--alignMiddle |
Vertically aligns content to middle |
Row variants
A class of .row
is required on the flex row parent. The
following classes are optional variants:
| Class | Description |
|---|---|
.row--noGutters |
removes padding from all .row-item children |
.row--wrap |
allows row wrapping (useful for collapsing rows in smaller viewports) |
.row--reverse |
reverses row order |
.row--flexEnd |
justifies content to flex-end |
.row--center |
justifies content to center |
.row--spaceBetween |
justifies content to spaceBetween |
.row--spaceAround |
justifies content to spaceAround |
Grid List
A grid layout with breakpoint specific numbers of items in each row.
better docs TK
- grid cell
- grid cell
- grid cell
- grid cell
- grid cell
- grid cell
- grid cell
- grid cell

grid cell

grid cell

grid cell

grid cell

grid cell

grid cell

grid cell

grid cell

Grid List variants
A class of gridList
is required on the gridList
parent element. By default, gridList creates a 2 column
grid.
The following classes are optional variants:
| Class | Description |
|---|---|
.gridList--photoGrid |
Optimizes list item spacing for a grid of photos |
.gridList--has[n] |
Adjusts number of columns (ie. .gridList--has4 creates a 4 column grid for all screen sizes) |
.atMedium_gridList--has[n] |
Sets number of columns for medium breakpoint and up (ie. .atMedium_gridList--has6 ) |
.atLarge_gridList--has[n] |
Sets number of columns for large breakpoint and up (ie. .atLarge_gridList--has10 ) |
Horizontal Scroll
Applies styles for horizontal scrolling lists.

Media-conditional hscroll
It's possible to create an hscroll
for small screens that expands
into a non-scrolling list in the document flow for larger screens.

A class of hscroll
is required; the following classes are
optional variants:
| Class | Description |
|---|---|
atMedium_hscroll--unclip |
Allows visible overflow (as inline block list) at medium & up |
atLarge_hscroll--unclip |
Allows visible overflow (as inline block list) at large & up |
Inline-block list
Resets list styles; adds display: inline-block
to
each list item and right gutters between items.

Divided list
Standard divided/spaced list; similar to an iOS table view.
Bottom spacing is provided with chunk
.
-
Just a list item
-
Just a list item
-
Just a list item

Just a list item

Just a list item

Just a list item

Stack
The stack
layout tool is for elements that
should be stacked in a column at small sizes,
and spreads across horizontal space at a given
breakpoint.
Stack Item (shrinks when spread)
Stack Item

Stack Item (shrinks when spread)

Stack Item

Stack variants
A class of stack
on the parent element is required.
Collapsing of the stack doesn't happen at any viewport
size by default, so you must specify a spread point
with one of the following classes.
| Class | Description |
|---|---|
atMedium_stack--spread |
Spreads out the stack elements horizontally at medium breakpoint |
atLarge_stack--spread |
Spreads out the stack elements horizontally at large breakpoint |
stack-item variants
| Class | Description |
|---|---|
.stack-item--shrink |
Item shrinks to fit content only when spread |
Stripe
A .stipe
class should be applied to

elements
to visually divide the page with stripes of color.
To align content within a stripe, use .bounds
.
... default stripe ...
... inverted stripe, using `inverted` class to set text colors ...
... collection variant of stripe, used to contain collections of cards

... default stripe ...

... inverted stripe, using `inverted` class to set text colors ...

... collection variant of stripe, used to contain collections of cards

Stripe variants
A class of .stripe
is required; the following classes are
optional variants:
| Class | Description |
|---|---|
.stripe--inverted |
applies the standard $C_contentBGInverted background color |
.stripe--collection |
applies a light gray background; for use with card collections |
Hero Stripes
Special stripe
variants are avaiable for
"hero" header stripes.
Basic hero
Uses the stripe--hero
variant.
better example TK

better example TK

Photo hero
Uses the stripe--photoHero
variant.
better example TK

better example TK


{% extends "layout.html" %} {% block title %}- Home{% endblock %} {% block body %}
{{ config.NAME }} is a point bot for Slack. Using ++ and --, you can add or subtract points from other things or team members for doing good things (or not-so-good things). Reward your team members for doing good today with {{ config.NAME }}!.


Classes
Namespaces
Members
-
<static, constant> Alphabets :Array(string)
-
Array of possible alphabets as strings
Type:
- Array(string)
-
<static, constant> Alphabets_iRE :Object
-
Dictionary of regular expressions used to find characters which don't match Alphabets_RE
Type:
- Object
-
<static, constant> Alphabets_RE :Object
-
Dictionary of regular expressions which sequences of each alphabet should match
Type:
- Object
Methods
-
<static> getParser(type) → {Parser}
-
Construct and return a new object which inherits seqJS.Parser of the requested type
Parameters:
Name Type Description type
string 'gb' or 'fasta' Returns:
A parser object- Type
- Parser
-
<static> read(data, format) → {Array.<seqJS.Record>}
-
Read all records from a string synchronously
Parameters:
Name Type Description data
string The data to parse format
string The format of the data (e.g. 'gb' or 'fasta') Returns:
An array containing all the records found- Type
- Array.<seqJS.Record>
-
<static> write(record, format) → {string}
-
Write a record to a string in the specified format and return the string
Parameters:
Name Type Description record
seqJS.Record The record to write format
string The format to use - e.g. 'gb' or 'fasta' Returns:
The record formatted according to format- Type
- string


Whether you’re chasing your kid(s) from one sporting activity to the next, or have a general interest in recording a special game here and there, below are some basic rules of shooting that can improve your craft.
Read MoreWe’ve all heard them, those wonderful tales our relatives love to tell at family gatherings. Sure, sometimes we even hear them more often than we’d like. But when you stop to think about it, at some point those stories will eventually be lost forever. Although we can try to repeat that information in order to preserve the memory, it’s always more meaningful and accurate coming from those who have lived the experience. So, if you agree your family history is worth holding on to, it’s time to take action.
Read More


WITNESS LIST Nominations Committee February 20, 2001 - 1:30P Board of Pilot Commissioners for Ga FOR: Bircher, Edgar A. (Self), Galveston, TX Brown, Harry (Self), Galveston, TX Iles, Elizabeth A. (Self), Texas City, TX Pennings, Billie A. (Self), Galveston, TX Wilkinson, Sr., Edward S. (Self), League City, TX Law Enforcement Officer Standards a FOR: Escajeda, Lilia B. (Self), Amarillo, TX Jackson, William B. (Self), Arlington, TX Smith, Dan (Self), Belton, TX Stivers, Joe (Self), Huntsville, TX Texas Commission for the Arts FOR: Crawford, Bobbe (Self), Lubbock, TX Ladensohn, Claudia (Self), San Antonio, TX Lozano, Laurie G. (Self), Edinburg, TX Teeple, Mary H. (Self), Spicewood, TX Texas Commission on Human Rights FOR: Maclin, Carroll G. (Self), Lufkin, TX Registering, but not testifying: For: Banks, Mary (Self), Houston, TX Texas Higher Education Coordinating FOR: Cigarroa, Ricardo G. (Self), Laredo, TX Fernandez, Raul B. (Self), San Antonio, TX Green, Cathy O. (Self), San Antonio, TX Griffin, Gerald D. (Self), Hunt, TX Hobbs, Carey (Self), Waco, TX Ruiz, Hector (Self), Austin, TX Ussery, II, Terdema L. (Self), Frisco, TX ON: Flack, Teri (Texas Higher Education Coordinating Board), Austin, TX Texas Juvenile Probation Commission FOR: Lake, Bettye "Betsy" (Self), Houston, TX Larson, Lyle (Self), San Antonio, TX Villa, Carlos (Self), El Paso, TX Texas State Technical College Board FOR: Foster, Pete (Self), Houston, TX Preuninger, Terry (Self), Waco, TX Routh, Elizabeth L. (Self), Corpus Christi, TX University of Houston Board of Rege FOR: Abramson, Morrie K. (Self), Houston, TX O'Connor, Morgan D. (Self), Victoria, TX Smith, Thad (Self), Sugar Land, TX University of North Texas Board of FOR: Craft, Marjorie B. (Self), DeSoto, TX Evans, Roy G. (Self), Dallas, TX Knight, Jr., Richard (Self), Dallas, TX Lazo, Tom (Self), Dallas, TX Nickell, Robert A. (Self), Irving, TX


Survey for software developers
What is your experience as a developer?
Is software development the way to go?
Would you recommend software development to your friends? Tell us why.
Hello World,we are software developers


I love travelling and capturing aesthetic subjects. Also, the adventures always excites me in the journey and food is my best companion along the way.
I used to value and appreciate the beauty of everything especially the one's that are captivating me most.
Drawing is a stress reliever for me and it enhances my creativity as well.
Aside from photography this is my favorite thing to do. Filming is good way in preserving the moments you cherished most.
Age: 20
Date of Birth: April 21, 1998
Civil Status: Single
Height: 5'2
Weight: 50kg
Nationality: Filipino
Religion: Aglipay
Tertiary: Notre Dame of Marbel University
              Bachelor of Science in Computer Science (2015-Present)
Secondary: Notre Dame of Banga (2011-2015)
Primary: Purok Rizal Elementary School (2005-2011)
Web Development
Web Design
Programming
Adobe Applications


AOA cancels showcase due to Hara's tragedy, will release album as planned
by jennywillAOA canceled their showcase.
Because of Hara's death earlier today, AOA has decided to cancel the press showcase that was originally planned for 4PM KST tomorrow on the 26th. They are currently discussing how to handle the fan showcase that was to be held afterward. However, they will be releasing the album release as planned at 6PM KST.
FNC Entertainment said, "Both the label and AOA offer our condolences to the tragic news, and we hope she can rest in peace."
If you or someone you know is at risk of self-harm or suicide, seek help as soon as possible by contacting agencies specializing in crisis intervention and suicide prevention in the United States and abroad.


{|{{Infobox Ship Begin}} {{Infobox Ship Image |Ship image=[[Image:HMCS Trillium Bridge JT-159.jpg|300px]] |Ship caption=Officers on the open bridge of HMCS ''Trillium'' }} {{Infobox Ship Career |Hide header= |Ship country=Canada |Ship flag={{shipboxflag|Canada|naval-1911}} [[Royal Canadian Navy]] |Ship name= |Ship namesake=''[[Trillium]]'' genus of flowering plants |Ship owner= |Ship operator= |Ship registry= |Ship route= |Ship ordered= |Ship awarded= |Ship builder=[[Canadian Vickers|Canadian Vickers Ltd.]], [[Montreal]] |Ship original cost= |Ship yard number= |Ship way number= |Ship laid down=20 Feb 1940 |Ship launched=26 June 1940 |Ship sponsor= |Ship christened= |Ship completed= |Ship acquired= |Ship commissioned=31 October 1940 |Ship recommissioned= |Ship decommissioned= |Ship maiden voyage= |Ship in service= |Ship out of service= |Ship renamed= |Ship reclassified= |Ship refit= |Ship struck= |Ship reinstated= |Ship homeport= |Ship identification= |Ship motto= |Ship nickname= |Ship honours= |Ship honors= |Ship captured= |Ship fate=Returned to the Royal Navy 27 June 1945; and sold for civilian use. |Ship status= |Ship notes= |Ship badge= }} {{Infobox Ship Characteristics |Hide header= |Header caption= |Ship class=[[Flower class corvette|''Flower''-class corvette]] (original)Lenton, H.T. & Colledge, J.J ''British and Dominion Warships of World War II'' (1968) Doubleday & Company pp.201&214 |Ship type= |Ship tonnage= |Ship displacement={{convert|925|LT|t ST|lk=on}} |Ship tons burthen= |Ship length={{convert|205|ft|m|2}}[[Length overall|o/a]] |Ship beam={{convert|33|ft|m|2}} |Ship height= |Ship draught={{convert|11.5|ft|m|2}} |Ship draft= |Ship depth= |Ship hold depth= |Ship decks= |Ship deck clearance= |Ship ramps= |Ship ice class= |Ship power= |Ship propulsion=


It is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one group of followers on each trip. They do, however, let the groups know ahead of time which will be picked up for each comet by a clever scheme: they pick a name for the comet which, along with the name of the group, can be used to determine if it is a particular group's turn to go (who do you think names the comets?). The details of the matching scheme are given below; your job is to write a program which takes the names of a group and a comet and then determines whether the group should go with the UFO behind that comet.
Both the name of the group and the name of the comet are converted into a number in the following manner: the final number is just the product of all the letters in the name, where "A" is 1 and "Z" is 26. For instance, the group "USACO" would be 21 * 19 * 1 * 3 * 15 = 17955. If the group's number mod 47 is the same as the comet's number mod 47, then you need to tell the group to get ready! (Remember that "a mod b" is the remainder left over after dividing a by b; 34 mod 10 is 4.)
Write a program which reads in the name of the comet and the name of the group and figures out whether according to the above scheme the names are a match, printing "GO" if they match and "STAY" if not. The names of the groups and the comets will be a string of capital letters with no spaces or punctuation, up to 6 characters long.
Examples:
|
Input |
Output |
|
COMETQ HVNGAT |
GO |
|
ABSTAR USACO |
STAY |
This means that you fill in your header with:
PROG: ride
WARNING: You must have 'ride' in this field or the wrong test data (or no test data) will be used.
|
Line 1: |
An upper case character string of length 1..6 that is the name of the comet. |
|
Line 2: |
An upper case character string of length 1..6 that is the name of the group. |
NOTE: The input file has a newline at the end of each line but does not have a "return". Sometimes, programmers code for the Windows paradigm of "return" followed by "newline"; don't do that! Use simple input routines like "readln" (for Pascal) and, for C/C++, "fscanf" and "fid>>string".
NOTE 2: Because of the extra characters, be sure to leave enough room for a 'newline' (also notated as '\n') and an end of string character ('\0') if your language uses it (as C and C++ do). This means you need eight characters of room instead of six.

GO
Converting the letters to numbers:
|
C |
O |
M |
E |
T |
Q |
|
|
3 |
15 |
13 |
5 |
20 |
17 |
|
|
|
||||||
|
H |
V |
N |
G |
A |
T |
|
|
8 |
22 |
14 |
7 |
1 |
20 |
|
then calculate the product mod 47:
3 * 15 * 13 * 5 * 20 * 17 = 994500 mod 47 = 27
8 * 22 * 14 * 7 * 1 * 20 = 344960 mod 47 = 27
Because both products evaluate to 27 (when modded by 47), the mission is 'GO'.


Vincerla
Home
Winners
Screenshot Compitetion
Hello,Click here
Login
Register
Terms And Conditions
Vincerla
Informations
Find Your Steam Trade Url
Picking The Winner
FAQ's
About Vincerla
Contacy us
Submit Your Query
Terms And Conditions
Follow us on-
Facebook
Youtube
Twitter
Twitch
Instagram
2017©Vincerla
Terms And Conditions


Class SpeckleUnityManager
Manages the stream interactions for a single user in the scene and exposes parameters that control the output of the stream conversion.
Inheritance
Namespace: SpeckleUnity
Assembly: cs.temp.dll.dll
Syntax
public class SpeckleUnityManager : MonoBehaviour, ISpeckleInitializer
Fields
lineMaterial
Assigns to the LineRenderer
s of every line, curve or polyline object for every stream handled by this manager.
Declaration
public Material lineMaterial
Field Value
| Type | Description |
|---|---|
| Material |
loggedInUser
A cached reference to the current logged in user.
Declaration
public User loggedInUser
Field Value
| Type | Description |
|---|---|
| User |
meshMaterial
Assigns to the MeshRenderer
s of every brep or mesh object for every stream handled by this manager.
Declaration
public Material meshMaterial
Field Value
| Type | Description |
|---|---|
| Material |
onStartBehaviour
Controls how the RunStartBehaviourAsync ()
method executes.
Declaration
public StartMode onStartBehaviour
Field Value
| Type | Description |
|---|---|
| StartMode |
onUpdateProgress
A UnityEvent
that is invoked each frame a stream update is progressed, including when it's initialised, for user code to
respond to that event. Passes some helpful data to inform that custom response including the percentage progress.
Declaration
protected SpeckleUnityUpdateEvent onUpdateProgress
Field Value
| Type | Description |
|---|---|
| SpeckleUnityUpdateEvent |
pointMaterial
Assigns to the LineRenderer
s of every point object for every stream handled by this manager.
Declaration
public Material pointMaterial
Field Value
| Type | Description |
|---|---|
| Material |
receivers
A list of all the SpeckleUnityReceivers
this manager controls. Intended to only be directly editable via
the inspector. During runtime you should make use of the RemoveReceiver ()
or AddReceiver ()
methods.
Declaration
protected List<SpeckleUnityReceiver> receivers
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<SpeckleUnityReceiver> |
renderingRule
An optional rendering rule to inject into the stream update process which defines how the stream looks in the scene.
Declaration
public RenderingRule renderingRule
Field Value
| Type | Description |
|---|---|
| RenderingRule |
scaleFactor
A value for easily setting the static Conversions.scaleFactor
value via the inspector.
This class assigs the value once on Start ()
. Default value is 0.001 because it's assuming
that the stream was modelled in milimeters and needs to be scaled to
Declaration
protected double scaleFactor
Field Value
| Type | Description |
|---|---|
| System.Double |
serverUrl
The server to send / receive streams from and authenticate against. Changing this value during
runtime requires calling InitializeAllClients ()
again.
Declaration
protected string serverUrl
Field Value
| Type | Description |
|---|---|
| System.String |
spawnSpeed
Speed value to allow for instantiation to happen gradually over many frames in case of performance issues with large streams that get initialized / updated.
Declaration
public SpawnSpeed spawnSpeed
Field Value
| Type | Description |
|---|---|
| SpawnSpeed |
startLoginEmail
The email to login with on start if onStartBehaviour
is set to at least JustLogin
.
Declaration
public string startLoginEmail
Field Value
| Type | Description |
|---|---|
| System.String |
startLoginPassword
The password to login with on start if onStartBehaviour
is set to at least JustLogin
.
Declaration
public string startLoginPassword
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
ReceiverCount
How many receivers are currently on this manager. Includes both active and inactive receivers.
Declaration
public int ReceiverCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
AddReceiverAsync(String, Transform, Boolean)
Creates a new receiver to be managed by this manager instance.
Declaration
public virtual Task AddReceiverAsync(string streamID, Transform streamRoot = null, bool initialiseOnCreation = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | streamID | The ID of the stream to receive. Authentication will be done using the |
| Transform | streamRoot | Optionally, you can provide a |
| System.Boolean | initialiseOnCreation | Optionally, the stream can have its |
Returns
| Type | Description |
|---|---|
| Task |
ClearReceivers()
Calls RemoveReceiver (int)
on all receivers on this manager instance.
Declaration
public virtual void ClearReceivers()
GetAllProjectMetaDataForUserAsync(Action<Project[]>)
Exposed method for users to call when trying to download the meta data of the Projects the current logged in user is able to access.
Declaration
public virtual Task GetAllProjectMetaDataForUserAsync(Action<Project[]> callBack)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<Project[]> | callBack | A method callback which takes a |
Returns
| Type | Description |
|---|---|
| Task | An async Task which can be awaited with a coroutine or just ignored. |
Remarks
If download was successful, the resulting array is passed back. If failed, null
is passed. Need to be using the SpeckleCore
namespace to access this type.
GetAllStreamMetaDataForUserAsync(Action<SpeckleStream[]>)
Exposed method for users to call when trying to download the meta data of the Streams the current logged in user is able to access. Use this to get the IDs of the streams you would later want to start receiving or use the rest of the data to populate your UI with data describing the Streams that are available.
Declaration
public virtual Task GetAllStreamMetaDataForUserAsync(Action<SpeckleStream[]> callBack)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<SpeckleStream[]> | callBack | A method callback which takes a |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
If download was successful, the resulting array is passed back. If failed, null
is passed. Need to be using the SpeckleCore
namespace to access this type.
GetBoundsForAllReceivedStreams()
Creates a bounding box that tightly encapsulates all objects in all current streams.
Declaration
public virtual Bounds GetBoundsForAllReceivedStreams()
Returns
| Type | Description |
|---|---|
| Bounds | A bounding box value encapsulating all stream objects in the scene. |
GetCurrentReceivedStreamMetaData()
Get a SpeckleStream
object for each receiver.
Declaration
public virtual SpeckleStream[] GetCurrentReceivedStreamMetaData()
Returns
| Type | Description |
|---|---|
| SpeckleStream[] | An array of |
GetNumbersFromStream(Int32)
Declaration
public virtual List<float> GetNumbersFromStream(int receiverIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | receiverIndex |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Single> |
GetNumbersFromStream(String)
Declaration
public virtual List<float> GetNumbersFromStream(string streamID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | streamID |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Single> |
GetStringsFromStream(Int32)
Declaration
public virtual List<string> GetStringsFromStream(int receiverIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | receiverIndex |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
GetStringsFromStream(String)
Declaration
public virtual List<string> GetStringsFromStream(string streamID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | streamID |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
InitializeAllClientsAsync()
Loops through each receiver and starts each of their initialization coroutines.
Declaration
public virtual Task InitializeAllClientsAsync()
Returns
| Type | Description |
|---|---|
| Task |
LoginAsync(String, String, Action<User>)
Exposed method for users to call when trying to login to a Speckle server via code.
Declaration
public virtual Task LoginAsync(string email, string password, Action<User> callBack)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | The email of the account you wish to login with. |
|
| System.String | password | The corresponding password for the account. |
| Action<User> | callBack | A method callback which takes a |
Returns
| Type | Description |
|---|---|
| Task | An async Task which can be awaited with a coroutine or just ignored. |
Remarks
If login was successful, the resulting user object is passed back. If failed, null
is passed. Need to be using the SpeckleCore
namespace to access this type.
Logout()
Sets the loggedInUser
to null and clears all the current receivers.
Declaration
public virtual void Logout()
ReApplyRenderingRule(Int32)
Declaration
public virtual void ReApplyRenderingRule(int receiverIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | receiverIndex |
RemoveReceiver(Int32)
Remove a receiver of a given index in the list on this manager instance. Cleans up all GameObjects associated to that stream as well.
Declaration
public virtual void RemoveReceiver(int receiverIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | receiverIndex | The index to to remove from. |
RemoveReceiver(String)
Remove the first receiver with a matching stream ID on this manager instance. Cleans up all GameObjects associated to that stream as well.
Declaration
public virtual void RemoveReceiver(string streamID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | streamID | The ID of the stream to be removed. If no matching ID is found, nothing will happen. |
RemoveReceiver(Transform)
Remove the first receiver with a matching root Transform
on this manager instance. Cleans
up all GameObjects associated to that stream as well.
Declaration
public virtual void RemoveReceiver(Transform streamRoot)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | streamRoot | The root object of the stream to be removed. If no matching root is found, nothing will happen. |
RunStartBehaviourAsync()
Intended for running additional actions on start depending on the value of the onStartBehaviour
enum.
Declaration
public virtual Task RunStartBehaviourAsync()
Returns
| Type | Description |
|---|---|
| Task | An async |
SetServerUrl(String)
Logs out and assigns a new url to point to as the Speckle server.
Declaration
public virtual void SetServerUrl(string newServerUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newServerUrl | The url of the new Speckle server to point to suffixed with "/api/". |
Start()
Initializes Speckle and assigns the scale factor of all geometry. Invokes the RunStartBehaviour ()
coroutine.
Declaration
protected virtual void Start()
TryGetSpeckleObject(GameObject, out SpeckleObject)
Checks through all receivers and looks up their GameObject
to SpeckleObject
dictionaries and outputs
the SpeckleObject
.
Declaration
public virtual bool TryGetSpeckleObject(GameObject gameObjectKey, out SpeckleObject speckleObjectData)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | gameObjectKey | The |
| SpeckleObject | speckleObjectData | The |
Returns
| Type | Description |
|---|---|
| System.Boolean | Whether or not the lookup was successful. |
Update()
Since there is a weird bug in Unity with web socket responses not being able to invoke coroutines, we check a boolean on each receiver on each frame to simulate that effect.
Declaration
protected virtual void Update()


Plan Name
Health Perfect 7
Deductible
AED 50 per out-patient consultation
Dental Cover
Up to AED 2,000 with pre-authorization & 20% co-pay on direct billing
(additional 20% co-payment on reimbursement)
Emirate
Abu Dhabi; Al Ain
Hospital Accommodation
Private Room with pre-authorization
Prescription Drugs
Covered; pre-authorization required for in-patient treatment & cost above AED
500 for out-patient treatment
Hospital Cash Benefit
Covered
Parent Accommodation
Covered with pre-authorization
Ambulance Cover
Covered for in-patient treatment with pre-authorization
Coverage Outside Cover Area
Covered
Treatment Outside Network
For elective treatment 80% of covered cost (100% for South-East Asia) subject to network rates on reimbursement basis
Pre Existing Conditions
Covered up to AED 150,000 (with chronic conditions)
Chronic Condition
Covered up to AED 150,000 (with pre-existing conditions)
Pregnancy Cover
Covered with 10% co-pay on out-patient maternity treatment; up to AED 10,000 for
normal delivery and up to AED 10,000 for medically essential C-section & complications; preauthorization required for in-patient treatment
New Born Baby Cover
Covered up to AED 150,000 for 30 days from birth; preauthorization required for
in-patient treatment
Natal Complications
Covered with 10% co-pay; pre-authorization required for inpatient
treatment
Vaccination
Covered for children up to 6 years with pre-authorization & 10% co-pay
Psychiatric Treatment
Covered for emergency mental health treatments; 10% co-pay for out-patient
treatment
Accidental Damage To Teeth
Covered if treated within 3 months; 10% co-pay


We are committed to paying attention to details. Leave a simple note, we will help you book your next dog appointment.
Find Out MoreWe are committed to paying attention to details. We will remember your dog's name, what she likes and doesn't like, what services you usually get, your time preferences, so you don't have to repeat the same thing over and over again to your dog groomers.
Get Started!We make sure your appointment is scheduled and we'll send you a calendar invite once it's done
We remember all your dog's and your preferences so you don't have to repeat the same thing to your dog groomers
We do all the callings for you so you don't have to spend 10 minutes on the phone
The more you use us, the better we get at predicting what you want
We are here to help simplify your life so you don't have to spend time on the phone and repeat the same preferences to your dog groomers. Send us an email on how to improve.
917-518-5151


torch_geometric.datasets¶
FAUST¶
-
class
torch_geometric.datasets.
FAUST
(root, train=True, transform=None)[source]¶ MPI FAUST Dataset.
Parameters: - root (string) – Root directory of dataset where
raw/MPI-FAUST
exist. Dataset needs to be downloaded manually. - train (bool, optional) – If
True
, returns training shapes, otherwise test shapes. (default:True
) - transform (callable, optional) – A function/transform that takes in a
Data
object and returns a transformed version. (default:None
)
- root (string) – Root directory of dataset where
Cora¶
-
class
torch_geometric.datasets.
Cora
(root, normalize=False, transform=None)[source]¶ Cora Dataset.
Parameters: - root (string) – Root directory of dataset. Downloads and processes data automatically if dataset doesn’t exist.
- normalize (bool, optional) – (Row-)normalize input feature vectors.
(default:
False
) - transform (callable, optional) – A function/transform that takes in a
Data
object and returns a transformed version. (default:None
)
PubMed¶
-
class
torch_geometric.datasets.
PubMed
(root, normalize=False, transform=None)[source]¶ PubMed Dataset.
Parameters: - root (string) – Root directory of dataset. Downloads and processes data automatically if dataset doesn’t exist.
- normalize (bool, optional) – (Row-)normalize input feature vectors.
(default:
False
) - transform (callable, optional) – A function/transform that takes in a
Data
object and returns a transformed version. (default:None
)
CiteSeer¶
-
class
torch_geometric.datasets.
CiteSeer
(root, normalize=False, transform=None)[source]¶ CiteSeer Dataset.
Parameters: - root (string) – Root directory of dataset. Downloads and processes data automatically if dataset doesn’t exist.
- normalize (bool, optional) – (Row-)normalize input feature vectors.
(default:
False
) - transform (callable, optional) – A function/transform that takes in a
Data
object and returns a transformed version. (default:None
)
MNISTSuperpixels¶
-
class
torch_geometric.datasets.
MNISTSuperpixels
(root, train=True, transform=None)[source]¶ MNIST Superpixels Dataset from the “Geometric Deep Learning on Graphs and Manifolds Using Mixture Model CNNs” paper. Each example contains exactly 75 graph-nodes.
Parameters: - root (string) – Root directory of dataset. Downloads data automatically if dataset doesn’t exist.
- train (bool, optional) – If
True
, creates dataset fromtraining.pt
, otherwise fromtest.pt
. (default:True
) - transform (callable, optional) – A function/transform that takes in a
Data
object and returns a transformed version. (default:None
)
QM9¶
-
class
torch_geometric.datasets.
QM9
(root, train=True, transform=None)[source]¶ QM9 Molecule Dataset from the “Quantum Chemistry Structures and Properties of 134 Kilo Molecules” paper. QM9 consists of approximately 130k molecules with 12 properties for each molecule.
Parameters: - root (string) – Root directory of dataset. Downloads data automatically if dataset doesn’t exist.
- train (bool, optional) – If
True
, returns training molecules, otherwise test molecules. (default:True
) - transform (callable, optional) – A function/transform that takes in a
Data
object and returns a transformed version. (default:None
)


Learn to code with
John Code, the pioneer of code
John Code himself, giving a thumbs up,
as if to signal that he approves of you.
Learn many languages, such as:
Python
Java
JavaScript
HTML
CSS
C++
C
COBOL
Assembly
Binary
& more!
Become a professional programmer in ONE WEEK!
NO BULL!
And now, an interview with John Code.
INTERVIEWER: Now, John, how did you get the idea for code?
JOHN: Uh, well, one day I was doing math for fun, and I decided "hey,
math is actually kind of boring. I need something to do it for me."
That's when I realized I could use a computer (they couldn't do math yet)
to do math! But I needed some way to tell the computer to do math. I started
by yelling at the computer, but it got scared and ran away. I then cradled the
computer and told it "hey, big C, can you do some math for me?" and that offended
the computer, because the computer didn't want to be treated like a baby. But then,
I wrote "Do math!" on a piece of paper and showed it to the computer.
But then it said "SyntaxError: invalid syntax" which made absolutely no sense.
INTERVIEWER: So how did you come up with the idea for code, then?
JOHN: What? Oh, I don't know. It just... I don't know. It just kinda happened.
Not really sure. Think I dreamt it. Yeah.
INTERVIEWER: Okayyy, well that's all we have time for today!
Enroll now! Only $∞!
Just call 1-800-1134 and flip your calculator upside down!
back to chasepeck.com


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
A
B
D
F
G
H
I
J
M
N
O
P
R
S
T
V
W
A
A_MULTIPLIER
- Static variable in class org.ensembl.hive.longmult.
DigitFactory
AddTogether
- Class in
org.ensembl.hive.longmult
AddTogether()
- Constructor for class org.ensembl.hive.longmult.
AddTogether
B
B_MULTIPLIER
- Static variable in class org.ensembl.hive.longmult.
DigitFactory
BaseRunnable
- Class in
org.ensembl.hive
Base class implementing the runnable lifecycle
BaseRunnable()
- Constructor for class org.ensembl.hive.
BaseRunnable
D
dataflow(ParamContainer, Collection<Object>)
- Method in class org.ensembl.hive.
BaseRunnable
Dataflows the output_id(s) on a given branch (default 1).
dataflow(ParamContainer, Collection<Object>, int)
- Method in class org.ensembl.hive.
BaseRunnable
Dataflows the output_id(s) on a given branch (default 1).
DEFAULT_PARAMS
- Static variable in class org.ensembl.hive.
BaseRunnable
DIGIT
- Static variable in class org.ensembl.hive.longmult.
DigitFactory
DigitFactory
- Class in
org.ensembl.hive.longmult
DigitFactory()
- Constructor for class org.ensembl.hive.longmult.
DigitFactory
F
fetchInput(Job)
- Method in class org.ensembl.hive.
BaseRunnable
fetchInput(Job)
- Method in class org.ensembl.hive.longmult.
AddTogether
fetchInput(Job)
- Method in class org.ensembl.hive.longmult.
DigitFactory
fetchInput(Job)
- Method in class org.ensembl.hive.longmult.
PartMultiply
fetchInput(Job)
- Method in class org.ensembl.hive.
TestRunnable
G
getDbID()
- Method in class org.ensembl.hive.
Job
getInputId()
- Method in class org.ensembl.hive.
Job
getLog()
- Method in class org.ensembl.hive.
BaseRunnable
getParam(String)
- Method in class org.ensembl.hive.
ParamContainer
Getter.
getParamDefaults()
- Method in class org.ensembl.hive.
BaseRunnable
getParamDefaults()
- Method in class org.ensembl.hive.longmult.
AddTogether
getParamDefaults()
- Method in class org.ensembl.hive.longmult.
DigitFactory
getParamDefaults()
- Method in class org.ensembl.hive.longmult.
PartMultiply
getParameters()
- Method in class org.ensembl.hive.
Job
getParams()
- Method in class org.ensembl.hive.
ParamContainer
getRetryCount()
- Method in class org.ensembl.hive.
Job
getUnsubParameters()
- Method in class org.ensembl.hive.
ParamContainer
getWorkerTemplateName()
- Method in class org.ensembl.hive.
BaseRunnable
Override to provide a special template for the worker temporary directory
H
hasParam(String)
- Method in class org.ensembl.hive.
ParamContainer
Returns a boolean.
HiveCommunicationException
- Exception in
org.ensembl.hive
Unchecked exception indicating a problem with Hive parent-child communication
HiveCommunicationException(String)
- Constructor for exception org.ensembl.hive.
HiveCommunicationException
HiveCommunicationException(String, Throwable)
- Constructor for exception org.ensembl.hive.
HiveCommunicationException
I
init()
- Method in class org.ensembl.hive.
BaseRunnable
isAutoflow()
- Method in class org.ensembl.hive.
Job
isComplete()
- Method in class org.ensembl.hive.
Job
isLethalForWorker()
- Method in class org.ensembl.hive.
Job
isTransientError()
- Method in class org.ensembl.hive.
Job
J
Job
- Class in
org.ensembl.hive
Bean wrapping information about a job
Job(Map<String, Object>)
- Constructor for class org.ensembl.hive.
Job
Job(ParamContainer, int, int, String)
- Constructor for class org.ensembl.hive.
Job
M
main(String[])
- Static method in class org.ensembl.hive.
Wrapper
N
numericParamToLong(Object)
- Static method in class org.ensembl.hive.
BaseRunnable
Helper method for dealing with numbers that have been passed around through JSON and may be of different types
numericParamToStr(Object)
- Static method in class org.ensembl.hive.
BaseRunnable
O
org.ensembl.hive
- package org.ensembl.hive
org.ensembl.hive.longmult
- package org.ensembl.hive.longmult
P
ParamContainer
- Class in
org.ensembl.hive
Class for handling eHive parameter expansions.
ParamContainer(Map<String, Object>)
- Constructor for class org.ensembl.hive.
ParamContainer
ParamInfiniteLoopException
- Exception in
org.ensembl.hive
ParamInfiniteLoopException(String)
- Constructor for exception org.ensembl.hive.
ParamInfiniteLoopException
ParamNameException
- Exception in
org.ensembl.hive
ParamNameException(String)
- Constructor for exception org.ensembl.hive.
ParamNameException
paramRequired(String)
- Method in class org.ensembl.hive.
Job
Returns the value of the parameter "param_name" or raises an exception if anything wrong happens.
ParamSubstitutionException
- Exception in
org.ensembl.hive
ParamSubstitutionException(String)
- Constructor for exception org.ensembl.hive.
ParamSubstitutionException
PARTIAL_PRODUCT
- Static variable in class org.ensembl.hive.longmult.
DigitFactory
PartMultiply
- Class in
org.ensembl.hive.longmult
Runnable to multiply a number by a digit
PartMultiply()
- Constructor for class org.ensembl.hive.longmult.
PartMultiply
postCleanUp(Job)
- Method in class org.ensembl.hive.
BaseRunnable
preCleanUp(Job)
- Method in class org.ensembl.hive.
BaseRunnable
processLifeCycle()
- Method in class org.ensembl.hive.
BaseRunnable
R
readMessage()
- Method in class org.ensembl.hive.
BaseRunnable
Read a JSON message from the parent
readMessageAndRespond()
- Method in class org.ensembl.hive.
BaseRunnable
run(Job)
- Method in class org.ensembl.hive.
BaseRunnable
run(Job)
- Method in class org.ensembl.hive.longmult.
AddTogether
run(Job)
- Method in class org.ensembl.hive.longmult.
DigitFactory
run(Job)
- Method in class org.ensembl.hive.longmult.
PartMultiply
run(Job)
- Method in class org.ensembl.hive.
TestRunnable
runLifeCycle(Job, boolean)
- Method in class org.ensembl.hive.
BaseRunnable
S
sendEventMessage(String, Object)
- Method in class org.ensembl.hive.
BaseRunnable
Send an event-based message to the parent
sendMessageAndWait(String, Object)
- Method in class org.ensembl.hive.
BaseRunnable
Send a message and wait for OK from the parent
sendOK()
- Method in class org.ensembl.hive.
BaseRunnable
setAutoflow(boolean)
- Method in class org.ensembl.hive.
Job
setComplete(boolean)
- Method in class org.ensembl.hive.
Job
setFileDescriptors(FileDescriptor, FileDescriptor)
- Method in class org.ensembl.hive.
BaseRunnable
setLethalForWorker(boolean)
- Method in class org.ensembl.hive.
Job
setParam(String, Object)
- Method in class org.ensembl.hive.
ParamContainer
Setter.
setTransientError(boolean)
- Method in class org.ensembl.hive.
Job
sleep(Job)
- Static method in class org.ensembl.hive.longmult.
DigitFactory
SUB_TASKS
- Static variable in class org.ensembl.hive.longmult.
DigitFactory
T
TAKE_TIME
- Static variable in class org.ensembl.hive.longmult.
DigitFactory
TestRunnable
- Class in
org.ensembl.hive
TestRunnable()
- Constructor for class org.ensembl.hive.
TestRunnable
toMap(Object...)
- Static method in class org.ensembl.hive.
BaseRunnable
Utility method for building a hash from key-value pairs
toString()
- Method in class org.ensembl.hive.
Job
V
VERSION
- Static variable in class org.ensembl.hive.
BaseRunnable
W
warning(String, boolean)
- Method in class org.ensembl.hive.
BaseRunnable
Store a message in the log_message table with is_error indicating whether the warning is actually an error or not
workerTempDirectory()
- Method in class org.ensembl.hive.
BaseRunnable
Returns the full path of the temporary directory created by the worker.
Wrapper
- Class in
org.ensembl.hive
Main class for running a hive worker in Java
Wrapper()
- Constructor for class org.ensembl.hive.
Wrapper
writeOutput(Job)
- Method in class org.ensembl.hive.
BaseRunnable
writeOutput(Job)
- Method in class org.ensembl.hive.longmult.
AddTogether
writeOutput(Job)
- Method in class org.ensembl.hive.longmult.
DigitFactory
writeOutput(Job)
- Method in class org.ensembl.hive.longmult.
PartMultiply
writeOutput(Job)
- Method in class org.ensembl.hive.
TestRunnable
A
B
D
F
G
H
I
J
M
N
O
P
R
S
T
V
W
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes


{% load static %}
Free
$10
per month
Minimum spend $1200 over 12 months
Earn 100$
in your first month
Yearly passive income of at least 1200$


Railways To Remove All Windowpanes From Trains To Boost Safety
“Every window is now an emergency exit!” exclaims Rail Minister
“We have A/B tested this move. Bachchan Ji thinks it’s a good idea.”
“It’ll also dramatically reduce the time spent in logistic as goods and passengers can now be loaded through both doors and windows.”
Rail passenger John Smith said that he isn’t sure if the move is reassuring or scarily worrying.


B2B gives you the opportunity to Volunteer which can help you make friends, learn new skills, advance your career, and even feel happier and healthier.
.
B2B to show Love to everyone.
B2B to show compassion to the needy.
B2B to be selfless
Turn off the TV; spend some time instead reading about (and watching videos of) some of the biggest-hearted people in Hampton Roads. Some are well-known, like the late Josh Darden, who mentored hundreds if not thousands of community leaders. Others did great deeds behind the scenes. Scientist and engineer Edward Knapp (E.K) Sloane anonymously donated pianos to conservatories and schools during his lifetime. When he passed away in 1996, he left $4.5 million to the Community Foundation to continue the tradition. If you see a wonderful piano on any stage in Hampton Roads, say thank you to E.K. Sloane, an engineer who loved piano music but didn't play the instrument
Desmond Tutu“Do your little bit of good where you are; it’s those little bits of good put together that overwhelm the world.”
Peter Drucker“One of the great movements in my lifetime among educated people is the need to commit themselves to action. Most people are not satisfied with giving money; we also feel we need to work.”
–Martin Luther King Jr.“Life’s persistent and most urgent question is “What are you doing for others?””
College students can do good work while also networking and gaining experience to help boost their future careers. These are great service ideas for college clubs and service organizations, as well as individuals or groups of friends.
Computer training for seniors: Teach basic computer skills to senior citizens
First aid kits: Assemble first aid kits to donate to homeless shelters.
Host a campus-wide food drive to collect nonperishables for local families.
Start a book swap where people can pick up and drop off books for free.
Adopt a mile (or more) of roadway and make sure that it stays free of litter.
Devote a day (or more) to removing trash from in and around local waterways.


{% from "macros/select.j2" import select %}
The name of the institution
Where is the institution located? (Street, number, etc.)
The postal code of the address. Must contain exactly 6 digits.
Locality
Region
Country
Symbol for the instituion to be used in virusname or isolate name template.


#Copyright (c) 2018, Mathieu Blondel
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
#1. Redistributions of source code must retain the above copyright notice, this
#list of conditions and the following disclaimer.
#
#2. Redistributions in binary form must reproduce the above copyright notice,
#this list of conditions and the following disclaimer in the documentation and/or
#other materials provided with the distribution.

# Author: Mathieu Blondel
# Remi Flamary<EMAIL_ADDRESS>"""
Smooth and Sparse Optimal Transport solvers (KL an L2 reg.)
Implementation of :
Smooth and Sparse Optimal Transport.
Mathieu Blondel, Vivien Seguy, Antoine Rolet.
In Proc. of AISTATS 2018.
https://arxiv.org/abs/1710.06276
[17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal
Transport. Proceedings of the Twenty-First International Conference on
Artificial Intelligence and Statistics (AISTATS).
Original code from https://github.com/mblondel/smooth-ot/
"""
import numpy as np
from scipy.optimize import minimize
[docs]def projection_simplex(V, z=1, axis=None):
""" Projection of x onto the simplex, scaled by z
P(x; z) = argmin_{y >= 0, sum(y) = z} ||y - x||^2
z: float or array
If array, len(z) must be compatible with V
axis: None or int
- axis=None: project V by P(V.ravel(); z)
- axis=1: project each V[i] by P(V[i]; z[i])
- axis=0: project each V[:, j] by P(V[:, j]; z[j])
"""
if axis == 1:
n_features = V.shape[1]
U = np.sort(V, axis=1)[:, ::-1]
z = np.ones(len(V)) * z
cssv = np.cumsum(U, axis=1) - z[:, np.newaxis]
ind = np.arange(n_features) + 1
cond = U - cssv / ind > 0
rho = np.count_nonzero(cond, axis=1)
theta = cssv[np.arange(len(V)), rho - 1] / rho
return np.maximum(V - theta[:, np.newaxis], 0)
elif axis == 0:
return projection_simplex(V.T, z, axis=1).T
else:
V = V.ravel().reshape(1, -1)
return projection_simplex(V, z, axis=1).ravel()
[docs]class Regularization(object):
"""Base class for Regularization objects
Notes
-----
This class is not intended for direct use but as aparent for true
regularizatiojn implementation.
"""
def __init__(self, gamma=1.0):
"""
Parameters
----------
gamma: float
Regularization parameter.
We recover unregularized OT when gamma -> 0.
"""
self.gamma = gamma
[docs] def delta_Omega(X):
"""
Compute delta_Omega(X[:, j]) for each X[:, j].
delta_Omega(x) = sup_{y >= 0} y^T x - Omega(y).
Parameters
----------
X: array, shape = len(a) x len(b)
Input array.
Returns
-------
v: array, len(b)
Values: v[j] = delta_Omega(X[:, j])
G: array, len(a) x len(b)
Gradients: G[:, j] = nabla delta_Omega(X[:, j])
"""
raise NotImplementedError
[docs] def max_Omega(X, b):
"""
Compute max_Omega_j(X[:, j]) for each X[:, j].
max_Omega_j(x) = sup_{y >= 0, sum(y) = 1} y^T x - Omega(b[j] y) / b[j].
Parameters
----------
X: array, shape = len(a) x len(b)
Input array.
Returns
-------
v: array, len(b)
Values: v[j] = max_Omega_j(X[:, j])
G: array, len(a) x len(b)
Gradients: G[:, j] = nabla max_Omega_j(X[:, j])
"""
raise NotImplementedError
[docs] def Omega(T):
"""
Compute regularization term.
Parameters
----------
T: array, shape = len(a) x len(b)
Input array.
Returns
-------
value: float
Regularization term.
"""
raise NotImplementedError
[docs]class NegEntropy(Regularization):
""" NegEntropy regularization """
[docs] def delta_Omega(self, X):
G = np.exp(X / self.gamma - 1)
val = self.gamma * np.sum(G, axis=0)
return val, G
[docs] def max_Omega(self, X, b):
max_X = np.max(X, axis=0) / self.gamma
exp_X = np.exp(X / self.gamma - max_X)
val = self.gamma * (np.log(np.sum(exp_X, axis=0)) + max_X)
val -= self.gamma * np.log(b)
G = exp_X / np.sum(exp_X, axis=0)
return val, G
[docs] def Omega(self, T):
return self.gamma * np.sum(T * np.log(T))
[docs]class SquaredL2(Regularization):
""" Squared L2 regularization """
[docs] def delta_Omega(self, X):
max_X = np.maximum(X, 0)
val = np.sum(max_X ** 2, axis=0) / (2 * self.gamma)
G = max_X / self.gamma
return val, G
[docs] def max_Omega(self, X, b):
G = projection_simplex(X / (b * self.gamma), axis=0)
val = np.sum(X * G, axis=0)
val -= 0.5 * self.gamma * b * np.sum(G * G, axis=0)
return val, G
[docs] def Omega(self, T):
return 0.5 * self.gamma * np.sum(T ** 2)
[docs]def dual_obj_grad(alpha, beta, a, b, C, regul):
"""
Compute objective value and gradients of dual objective.
Parameters
----------
alpha: array, shape = len(a)
beta: array, shape = len(b)
Current iterate of dual potentials.
a: array, shape = len(a)
b: array, shape = len(b)
Input histograms (should be non-negative and sum to 1).
C: array, shape = len(a) x len(b)
Ground cost matrix.
regul: Regularization object
Should implement a delta_Omega(X) method.
Returns
-------
obj: float
Objective value (higher is better).
grad_alpha: array, shape = len(a)
Gradient w.r.t. alpha.
grad_beta: array, shape = len(b)
Gradient w.r.t. beta.
"""
obj = np.dot(alpha, a) + np.dot(beta, b)
grad_alpha = a.copy()
grad_beta = b.copy()
# X[:, j] = alpha + beta[j] - C[:, j]
X = alpha[:, np.newaxis] + beta - C
# val.shape = len(b)
# G.shape = len(a) x len(b)
val, G = regul.delta_Omega(X)
obj -= np.sum(val)
grad_alpha -= G.sum(axis=1)
grad_beta -= G.sum(axis=0)
return obj, grad_alpha, grad_beta
[docs]def solve_dual(a, b, C, regul, method="L-BFGS-B", tol=1e-3, max_iter=500,
verbose=False):
"""
Solve the "smoothed" dual objective.
Parameters
----------
a: array, shape = len(a)
b: array, shape = len(b)
Input histograms (should be non-negative and sum to 1).
C: array, shape = len(a) x len(b)
Ground cost matrix.
regul: Regularization object
Should implement a delta_Omega(X) method.
method: str
Solver to be used (passed to `scipy.optimize.minimize`).
tol: float
Tolerance parameter.
max_iter: int
Maximum number of iterations.
Returns
-------
alpha: array, shape = len(a)
beta: array, shape = len(b)
Dual potentials.
"""
def _func(params):
# Unpack alpha and beta.
alpha = params[:len(a)]
beta = params[len(a):]
obj, grad_alpha, grad_beta = dual_obj_grad(alpha, beta, a, b, C, regul)
# Pack grad_alpha and grad_beta.
grad = np.concatenate((grad_alpha, grad_beta))
# We need to maximize the dual.
return -obj, -grad
# Unfortunately, `minimize` only supports functions whose argument is a
# vector. So, we need to concatenate alpha and beta.
alpha_init = np.zeros(len(a))
beta_init = np.zeros(len(b))
params_init = np.concatenate((alpha_init, beta_init))
res = minimize(_func, params_init, method=method, jac=True,
tol=tol, options=dict(maxiter=max_iter, disp=verbose))
alpha = res.x[:len(a)]
beta = res.x[len(a):]
return alpha, beta, res
[docs]def semi_dual_obj_grad(alpha, a, b, C, regul):
"""
Compute objective value and gradient of semi-dual objective.
Parameters
----------
alpha: array, shape = len(a)
Current iterate of semi-dual potentials.
a: array, shape = len(a)
b: array, shape = len(b)
Input histograms (should be non-negative and sum to 1).
C: array, shape = len(a) x len(b)
Ground cost matrix.
regul: Regularization object
Should implement a max_Omega(X) method.
Returns
-------
obj: float
Objective value (higher is better).
grad: array, shape = len(a)
Gradient w.r.t. alpha.
"""
obj = np.dot(alpha, a)
grad = a.copy()
# X[:, j] = alpha - C[:, j]
X = alpha[:, np.newaxis] - C
# val.shape = len(b)
# G.shape = len(a) x len(b)
val, G = regul.max_Omega(X, b)
obj -= np.dot(b, val)
grad -= np.dot(G, b)
return obj, grad
[docs]def solve_semi_dual(a, b, C, regul, method="L-BFGS-B", tol=1e-3, max_iter=500,
verbose=False):
"""
Solve the "smoothed" semi-dual objective.
Parameters
----------
a: array, shape = len(a)
b: array, shape = len(b)
Input histograms (should be non-negative and sum to 1).
C: array, shape = len(a) x len(b)
Ground cost matrix.
regul: Regularization object
Should implement a max_Omega(X) method.
method: str
Solver to be used (passed to `scipy.optimize.minimize`).
tol: float
Tolerance parameter.
max_iter: int
Maximum number of iterations.
Returns
-------
alpha: array, shape = len(a)
Semi-dual potentials.
"""
def _func(alpha):
obj, grad = semi_dual_obj_grad(alpha, a, b, C, regul)
# We need to maximize the semi-dual.
return -obj, -grad
alpha_init = np.zeros(len(a))
res = minimize(_func, alpha_init, method=method, jac=True,
tol=tol, options=dict(maxiter=max_iter, disp=verbose))
return res.x, res
[docs]def get_plan_from_dual(alpha, beta, C, regul):
"""
Retrieve optimal transportation plan from optimal dual potentials.
Parameters
----------
alpha: array, shape = len(a)
beta: array, shape = len(b)
Optimal dual potentials.
C: array, shape = len(a) x len(b)
Ground cost matrix.
regul: Regularization object
Should implement a delta_Omega(X) method.
Returns
-------
T: array, shape = len(a) x len(b)
Optimal transportation plan.
"""
X = alpha[:, np.newaxis] + beta - C
return regul.delta_Omega(X)[1]
[docs]def get_plan_from_semi_dual(alpha, b, C, regul):
"""
Retrieve optimal transportation plan from optimal semi-dual potentials.
Parameters
----------
alpha: array, shape = len(a)
Optimal semi-dual potentials.
b: array, shape = len(b)
Second input histogram (should be non-negative and sum to 1).
C: array, shape = len(a) x len(b)
Ground cost matrix.
regul: Regularization object
Should implement a delta_Omega(X) method.
Returns
-------
T: array, shape = len(a) x len(b)
Optimal transportation plan.
"""
X = alpha[:, np.newaxis] - C
return regul.max_Omega(X, b)[1] * b
[docs]def smooth_ot_dual(a, b, M, reg, reg_type='l2', method="L-BFGS-B", stopThr=1e-9,
numItermax=500, verbose=False, log=False):
r"""
Solve the regularized OT problem in the dual and return the OT matrix
The function solves the smooth relaxed dual formulation (7) in [17]_ :
.. math::
\max_{\alpha,\beta}\quad a^T\alpha+b^T\beta-\sum_j\delta_\Omega(\alpha+\beta_j-\mathbf{m}_j)
where :
- :math:`\mathbf{m}_j` is the jth column of the cost matrix
- :math:`\delta_\Omega` is the convex conjugate of the regularization term :math:`\Omega`
- a and b are source and target weights (sum to 1)
The OT matrix can is reconstructed from the gradient of :math:`\delta_\Omega`
(See [17]_ Proposition 1).
The optimization algorithm is using gradient decent (L-BFGS by default).
Parameters
----------
a : np.ndarray (ns,)
samples weights in the source domain
b : np.ndarray (nt,) or np.ndarray (nt,nbb)
samples in the target domain, compute sinkhorn with multiple targets
and fixed M if b is a matrix (return OT loss + dual variables in log)
M : np.ndarray (ns,nt)
loss matrix
reg : float
Regularization term >0
reg_type : str
Regularization type, can be the following (default ='l2'):
- 'kl' : Kullback Leibler (~ Neg-entropy used in sinkhorn [2]_)
- 'l2' : Squared Euclidean regularization
method : str
Solver to use for scipy.optimize.minimize
numItermax : int, optional
Max number of iterations
stopThr : float, optional
Stop threshol on error (>0)
verbose : bool, optional
Print information along iterations
log : bool, optional
record log if True
Returns
-------
gamma : (ns x nt) ndarray
Optimal transportation matrix for the given parameters
log : dict
log dictionary return only if log==True in parameters
References
----------
.. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, Advances in Neural Information Processing Systems (NIPS) 26, 2013
.. [17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal Transport. Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS).
See Also
--------
ot.lp.emd : Unregularized OT
ot.sinhorn : Entropic regularized OT
ot.optim.cg : General regularized OT
"""
if reg_type.lower() in ['l2', 'squaredl2']:
regul = SquaredL2(gamma=reg)
elif reg_type.lower() in ['entropic', 'negentropy', 'kl']:
regul = NegEntropy(gamma=reg)
else:
raise NotImplementedError('Unknown regularization')
# solve dual
alpha, beta, res = solve_dual(a, b, M, regul, max_iter=numItermax,
tol=stopThr, verbose=verbose)
# reconstruct transport matrix
G = get_plan_from_dual(alpha, beta, M, regul)
if log:
log = {'alpha': alpha, 'beta': beta, 'res': res}
return G, log
else:
return G
[docs]def smooth_ot_semi_dual(a, b, M, reg, reg_type='l2', method="L-BFGS-B", stopThr=1e-9,
numItermax=500, verbose=False, log=False):
r"""
Solve the regularized OT problem in the semi-dual and return the OT matrix
The function solves the smooth relaxed dual formulation (10) in [17]_ :
.. math::
\max_{\alpha}\quad a^T\alpha-OT_\Omega^*(\alpha,b)
where :
.. math::
OT_\Omega^*(\alpha,b)=\sum_j b_j
- :math:`\mathbf{m}_j` is the jth column of the cost matrix
- :math:`OT_\Omega^*(\alpha,b)` is defined in Eq. (9) in [17]
- a and b are source and target weights (sum to 1)
The OT matrix can is reconstructed using [17]_ Proposition 2.
The optimization algorithm is using gradient decent (L-BFGS by default).
Parameters
----------
a : np.ndarray (ns,)
samples weights in the source domain
b : np.ndarray (nt,) or np.ndarray (nt,nbb)
samples in the target domain, compute sinkhorn with multiple targets
and fixed M if b is a matrix (return OT loss + dual variables in log)
M : np.ndarray (ns,nt)
loss matrix
reg : float
Regularization term >0
reg_type : str
Regularization type, can be the following (default ='l2'):
- 'kl' : Kullback Leibler (~ Neg-entropy used in sinkhorn [2]_)
- 'l2' : Squared Euclidean regularization
method : str
Solver to use for scipy.optimize.minimize
numItermax : int, optional
Max number of iterations
stopThr : float, optional
Stop threshol on error (>0)
verbose : bool, optional
Print information along iterations
log : bool, optional
record log if True
Returns
-------
gamma : (ns x nt) ndarray
Optimal transportation matrix for the given parameters
log : dict
log dictionary return only if log==True in parameters
References
----------
.. [2] M. Cuturi, Sinkhorn Distances : Lightspeed Computation of Optimal Transport, Advances in Neural Information Processing Systems (NIPS) 26, 2013
.. [17] Blondel, M., Seguy, V., & Rolet, A. (2018). Smooth and Sparse Optimal Transport. Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS).
See Also
--------
ot.lp.emd : Unregularized OT
ot.sinhorn : Entropic regularized OT
ot.optim.cg : General regularized OT
"""
if reg_type.lower() in ['l2', 'squaredl2']:
regul = SquaredL2(gamma=reg)
elif reg_type.lower() in ['entropic', 'negentropy', 'kl']:
regul = NegEntropy(gamma=reg)
else:
raise NotImplementedError('Unknown regularization')
# solve dual
alpha, res = solve_semi_dual(a, b, M, regul, max_iter=numItermax,
tol=stopThr, verbose=verbose)
# reconstruct transport matrix
G = get_plan_from_semi_dual(alpha, b, M, regul)
if log:
log = {'alpha': alpha, 'res': res}
return G, log
else:
return G


Elixir v1.3.4 Inspect.Algebra
A set of functions for creating and manipulating algebra documents.
This module implements the functionality described in “Strictly Pretty” (2000) by Christian Lindig with small additions, like support for String nodes, and a custom rendering function that maximises horizontal space use.
iex> Inspect.Algebra.empty
:doc_nil
iex> "foo"
"foo"
With the functions in this module, we can concatenate different elements together and render them:
iex> doc = Inspect.Algebra.concat(Inspect.Algebra.empty, "foo")
iex> Inspect.Algebra.format(doc, 80)
["foo"]
The functions nest/2
, space/2
and line/2
help you put the
document together into a rigid structure. However, the document
algebra gets interesting when using functions like break/2
, which
converts the given string into a line break depending on how much space
there is to print. Let’s glue two docs together with a break and then
render it:
iex> doc = Inspect.Algebra.glue("a", " ", "b")
iex> Inspect.Algebra.format(doc, 80)
["a", " ", "b"]
Notice the break was represented as is, because we haven’t reached a line limit. Once we do, it is replaced by a newline:
iex> doc = Inspect.Algebra.glue(String.duplicate("a", 20), " ", "b")
iex> Inspect.Algebra.format(doc, 10)
["aaaaaaaaaaaaaaaaaaaa", "\n", "b"]
Finally, this module also contains Elixir related functions, a bit
tied to Elixir formatting, namely surround/3
and surround_many/5
.
Implementation details
The original Haskell implementation of the algorithm by Wadler
relies on lazy evaluation to unfold document groups on two alternatives:
:flat
(breaks as spaces) and :break
(breaks as newlines).
Implementing the same logic in a strict language such as Elixir leads
to an exponential growth of possible documents, unless document groups
are encoded explicitly as :flat
or :break
. Those groups are then reduced
to a simple document, where the layout is already decided, per Lindig.
This implementation slightly changes the semantic of Lindig’s algorithm
to allow elements that belong to the same group to be printed together
in the same line, even if they do not fit the line fully. This was achieved
by changing :break
to mean a possible break and :flat
to force a flat
structure. Then deciding if a break works as a newline is just a matter
of checking if we have enough space until the next break that is not
inside a group (which is still flat).
Custom pretty printers can be implemented using the documents returned by this module and by providing their own rendering functions.
Summary
Functions
Document entity representing a break
Concatenates a list of documents
Concatenates two document entities
Returns a document entity used to represent nothingness
Folds a list of document entities into a document entity using a function that is passed as the first argument
The formatting function
Inserts a break between two docs. See break/1
for more info
Inserts a break, passed as the second argument, between two docs, the first and the third arguments
Returns a group containing the specified document
Inserts a mandatory linebreak between two document entities
Nests document entity x
positions deep
Inserts a mandatory single space between two document entities
Surrounds a document with characters
Maps and glues a collection of items
Converts an Elixir structure to an algebra document according to the inspect protocol
Types
Functions
Document entity representing a break.
This break can be rendered as a linebreak or as spaces,
depending on the mode
of the chosen layout or the provided
separator.
Examples
Let’s glue two docs together with a break and then render it:
iex> doc = Inspect.Algebra.glue("a", " ", "b")
iex> Inspect.Algebra.format(doc, 80)
["a", " ", "b"]
Notice the break was represented as is, because we haven’t reached a line limit. Once we do, it is replaced by a newline:
iex> doc = Inspect.Algebra.glue(String.duplicate("a", 20), " ", "b")
iex> Inspect.Algebra.format(doc, 10)
["aaaaaaaaaaaaaaaaaaaa", "\n", "b"]
Concatenates a list of documents.
Concatenates two document entities.
Examples
iex> doc = Inspect.Algebra.concat "hello", "world"
iex> Inspect.Algebra.format(doc, 80)
["hello", "world"]
Returns a document entity used to represent nothingness.
Examples
iex> Inspect.Algebra.empty
:doc_nil
Folds a list of document entities into a document entity using a function that is passed as the first argument.
Examples
iex> doc = ["A", "B"]
iex> doc = Inspect.Algebra.fold_doc(doc, fn(x, y) ->
...> Inspect.Algebra.concat [x, "!", y]
...> end)
iex> Inspect.Algebra.format(doc, 80)
["A", "!", "B"]
The formatting function.
Takes the maximum width and a document to print as its arguments and returns an IO data representation of the best layout for the document to fit in the given width.
Inserts a break, passed as the second argument, between two docs, the first and the third arguments.
Returns a group containing the specified document.
Examples
iex> doc = Inspect.Algebra.group(
...> Inspect.Algebra.concat(
...> Inspect.Algebra.group(
...> Inspect.Algebra.concat(
...> "Hello,",
...> Inspect.Algebra.concat(
...> Inspect.Algebra.break,
...> "A"
...> )
...> )
...> ),
...> Inspect.Algebra.concat(
...> Inspect.Algebra.break,
...> "B"
...> )
...> ))
iex> Inspect.Algebra.format(doc, 80)
["Hello,", " ", "A", " ", "B"]
iex> Inspect.Algebra.format(doc, 6)
["Hello,", "\n", "A", " ", "B"]
Inserts a mandatory linebreak between two document entities.
Examples
iex> doc = Inspect.Algebra.line "Hughes", "Wadler"
iex> Inspect.Algebra.format(doc, 80)
["Hughes", "\n", "Wadler"]
Nests document entity x
positions deep.
Nesting will be appended to the line breaks.
Examples
iex> doc = Inspect.Algebra.nest(Inspect.Algebra.glue("hello", "world"), 5)
iex> Inspect.Algebra.format(doc, 5)
["hello", "\n ", "world"]
Inserts a mandatory single space between two document entities.
Examples
iex> doc = Inspect.Algebra.space "Hughes", "Wadler"
iex> Inspect.Algebra.format(doc, 80)
["Hughes", " ", "Wadler"]
Surrounds a document with characters.
Puts the document between left and right enclosing and nesting it. The document is marked as a group, to show the maximum as possible concisely together.
Examples
iex> doc = Inspect.Algebra.surround "[", Inspect.Algebra.glue("a", "b"), "]"
iex> Inspect.Algebra.format(doc, 3)
["[", "a", "\n ", "b", "]"]
surround_many(binary, [any], binary, Inspect.Opts.t, (term, Inspect.Opts.t -> t), binary) :: t
Maps and glues a collection of items.
It uses the given left and right as surrounding and a separator for each item. A limit can be passed which, once reached, stops gluing and outputs “…” instead.
Examples
iex> doc = Inspect.Algebra.surround_many("[", Enum.to_list(1..5), "]",
...> %Inspect.Opts{limit: :infinity}, fn i, _opts -> to_string(i) end)
iex> Inspect.Algebra.format(doc, 5) |> IO.iodata_to_binary
"[1,\n 2,\n 3,\n 4,\n 5]"
iex> doc = Inspect.Algebra.surround_many("[", Enum.to_list(1..5), "]",
...> %Inspect.Opts{limit: 3}, fn i, _opts -> to_string(i) end)
iex> Inspect.Algebra.format(doc, 20) |> IO.iodata_to_binary
"[1, 2, 3, ...]"
iex> doc = Inspect.Algebra.surround_many("[", Enum.to_list(1..5), "]",
...> %Inspect.Opts{limit: 3}, fn i, _opts -> to_string(i) end, "!")
iex> Inspect.Algebra.format(doc, 20) |> IO.iodata_to_binary
"[1! 2! 3! ...]"
Converts an Elixir structure to an algebra document according to the inspect protocol.


Arc de Triomphe
7th arrondissement
Eiffel Tower
7th arrondissement
Luxembourg Palace
6th arrondissement


# File test/userstamp_test.rb, line 32 def test_ar_userstamp_loaded assert ActiveRecord::Base.include?(ActiveRecord::Userstamp) assert_equal @first_user, User.current_user assert_equal User, @first_entry.user_model assert_equal User, @second_entry.user_model end


badge
attribute to the menu item.
Add a css contextual class to your badge using the badge.context
attribute. In that case declare the value of the badge through the use of the badge.value
attribute.
Default css declare the following badge contextes, badge-danger, badge-warning, badge-success, badge-info
and badge-inverse
. If none fit your needs just create your own css class.


Ice-age dynamicsGeorg Kaufmann |
Master course tought at Freie Universität Berlin in the M.Sc. Geological Sciences program.
This lecture introduces ice ages as a tool to examine the dynamical behaviour of both the Earth’s surface and the Earth’s interior.
Georg Kaufmann
Freie Universität Berlin
Department of Geosciences, Institute of
Geological Sciences, Geophysics Section
Malteserstr. 74-100, 12249
Berlin, Haus D, Raum D127
<EMAIL_ADDRESS>The lecture series is compiled as handouts in pdf format (click on title):
|
0.
Overview
|
1. Ice on
Earth |
2.
Geomorphology
|
|
3. Dating
|
4.
Paleoclimate
|
5. Karst
|
|
6. Earth
orbit |
7. Ice
models |
8. Sea
level |
|
9.
Landscape |
10. GIA
|
11.
Outlook |
The exercises are mainly jupyter notebooks, which
can be accessed interactively through
A list of notebooks can be found here:
git clone https://github.com/georgkaufmann/lecture_iceage.git
We use Git for versioning.
This project is licensed for classroom use only.


{% extends "mail_layout.html" %} {% block title %}SURF platform notification {% endblock %} {% block content %}
Hi,
User {{ current_user.name }} has created a(n) {{ object_type }} on environment {{ environment }} at {{ date }}:
| Logo | Name | Description |
|---|---|---|
| {{ obj.name }} | {{ obj.description }} |
This email is automatically sent and can be suppressed by changing the platform_admin_notifications section of the configuration for environment {{ environment }}
{% endblock %}


These are functions you can use to access variables from the theme.
They are available by adding @import<EMAIL_ADDRESS>in your file.
They return variables from maps. They use the dot notation parent.child.[...]
.
_color("palette_name") // returns the palette.color value
_color("palette_name", "key") // return the palette.key value
_component("componentname.key.[...]")
This is the generic way to access our maps
_theme("mapname.key.[...]")
If you need to access value in your own map, you can use the _get() function
_get($mapname, "key.[...]")
These mixins are available by adding @import "~@lucca-front/scss/src/mixins";
in your file
You can add shadow to your own component by using elevated(1-5) mixin
@include elevate(1);
You can use this mixins to turn your element into a spinner
@include loading($size);
Using the breakpoint values in the breakpoints map, you can easily handle your media queries
@include media_smaller_than("breakpoint_key"){} // <==> @media (max-width: breakpoint_value) {}
@include media_larger_than("breakpoint_key"){} //<==> @media (min-width: breakpoint_value) {}
@include media_between("breakpoint1_key", "breakpoint2_key"){} //<==> @media (min-width: breakpoint1_value) and (max-width: breakpoint2_value) {}