text:
# NAME

PRTE: Mapping, Ranking, and Binding

# SYNOPSIS

PRTE employs a three-phase procedure for assigning process locations and ranks:

  1. **mapping**:   Assigns a default location to each process
  2. **ranking**:   Assigns a unique rank value to each process
  3. **binding**:   Constrains each process to run on specific processors

This document describes these three phases with examples. Unless
otherwise noted, this behavior is shared by `prun`, `prterun`, and `prte`.

# QUICK SUMMARY

The two binaries that most influence process layout are `prte` and `prun`.
The `prte` process discovers the allocation, starts the daemons, and defines the
default mapping/ranking/binding for all jobs.
The `prun` process defines the specific mapping/ranking/binding for a specific
job. Most of the command line controls are targeted to `prun` since each job has
its own unique requirements.

`prterun` is just a wrapper around `prte` for a single job PRTE DVM. It is
doing the job of both `prte` and `prun`, and, as such, accepts the sum all of
their command line arguments. Any example that uses `prun` can substitute the
use of `prterun` except where otherwise noted.

The `prte` process attempts to automatically discover the nodes in the
allocation by querying supported resource managers. If a support resource
manager is not present then `prte` relies on a hostfile provided by the user.
In the absence of such a hostfile it will run all processes on the localhost.

If running under a supported resource manager, the `prte` process will start the
daemon processes (`prted`) on the remote nodes using the corresponding resource
manager process starter. If no such starter is available then `rsh` or `ssh`
is used.

PRTE automatically maps processes in a round-robin fashion by CPU slot
in one of two ways in the absence of any further directives:

`Map by core:`

:   when the number of total processes in the job is <= 2

`Map by package:`

:   when the number of total processes in the job is > 2

PRTE automatically binds processes. Three binding patterns are used in the
absence of any further directives:

`Bind to core:`

:   when the number of total processes in the job is <= 2

`Bind to package:`

:   when the number of total processes in the job is > 2

`Bind to none:`

:   when oversubscribed

If your application uses threads, then you probably want to ensure that
you are either not bound at all (by specifying `--bind-to none`), or
bound to multiple cores using an appropriate binding level or specific
number of processing elements per application process.

PRTE automatically ranks processes starting from 0. Two ranking patterns are
used in the absence of any further directives:

`Rank by slot:`

:   when the number of total processes in the job is <= 2

`Rank by package:`

:   when the number of total processes in the job is > 2

# OPTIONS

Listed here are the subset of command line options that will be used in the
process mapping/ranking/binding discussion in this manual page.

## Specifying Host Nodes

Use one of the following options to specify which hosts (nodes) within
the PRTE DVM environment to run on.

`--host <host1,host2,...,hostN>` or `--host <host1:X,host2:Y,...,hostN:Z>`

:   List of hosts on which to invoke processes. After each hostname a
    colon (`:`) followed by a positive integer can be used to specify the
    number of slots on that host (`:X`, `:Y`, and `:Z`). The default is `1`.

`--hostfile <hostfile>`

:   Provide a hostfile to use.

`--machinefile <machinefile>`

:   Synonym for `-hostfile`.

`--default-hostfile <hostfile>`

:   Provide a default hostfile to use.

## Process Mapping / Ranking / Binding Options

The following options specify the number of processes to launch. Note
that none of the options imply a particular binding policy - e.g.,
requesting `N` processes for each socket does not imply that the processes
will be bound to the socket.

`-c, -n, --n, --np <#>`

:   Run this many copies of the program on the given nodes. This option
    indicates that the specified file is an executable program and not
    an application context. If no value is provided for the number of
    copies to execute (i.e., neither the `-np` nor its synonyms are
    provided on the command line), `prun` will automatically execute a
    copy of the program on each process slot (see below for description
    of a "process slot"). This feature, however, can only be used in
    the SPMD model and will return an error (without beginning execution
    of the application) otherwise.

To map processes across sets of objects:

`--map-by <object>`

:   Map to the specified object. See defaults in Quick Summary. Supported
    options include `slot`, `hwthread`, `core`, `l1cache`, `l2cache`, `l3cache`,
    `package`, `node`, `seq`, `dist`, `ppr`, and `rankfile`.

Any object can include qualifier by adding a colon (`:`) and any combination
of one or more of the following to the `--map-by` option:

 - `PE=n` bind `n` processing elements to each process
 - `SPAN` load balance the processes across the allocation
 - `OVERSUBSCRIBE` allow more processes on a node than processing elements
 - `NOOVERSUBSCRIBE` means `!OVERSUBSCRIBE`
 - `NOLOCAL` do not launch processes on the same node as `prun`
 - `HWTCPUS` use hardware threads as CPU slots
 - `CORECPUS` use cores as CPU slots (default)
 - `DEVICE=dev` device specifier for the `dist` policy
 - `INHERIT`
 - `NOINHERIT` means `!INHERIT`
 - `PE-LIST=a,b` comma-delimited ranges of cpus to use for this job processed as an unordered pool of CPUs
 - `FILE=%s` (path to file containing sequential or rankfile entries).

`ppr` policy example: `--map-by ppr:N:<object>` will launch `N` times the
number of objects of the specified type on each node.

To order processes' ranks:

`--rank-by <object>`

:   Rank in round-robin fashion according to the specified object. See defaults
    in Quick Summary.
    Supported options include `slot`, `hwthread`, `core`, `l1cache`, `l2cache`,
    `l3cache`, `package`, and `node`.

Any object can include qualifiers by adding a colon (`:`) and any combination
of one or more of the following to the `--rank-by` option:

 - `SPAN`
 - `FILL`

To bind processes to sets of objects:

`--bind-to <object>`

:   Bind processes to the specified object. See defaults in Quick Summary.
    Supported options include `none`, `hwthread`, `core`, `l1cache`,
    `l2cache`, `l3cache`, and `package`.

Any object can include qualifiers by adding a colon (`:`) and any combination
of one or more of the following to the `--bind-to` option:

 - `overload-allowed` allows for binding more than one process in relation to a CPU
 - `if-supported` if that object is supported on this system

## Diagnostics

`--map-by :DISPLAY`

:   Display a table showing the mapped location of each process prior to
    launch.

`--map-by :DISPLAYALLOC`

:   Display the detected allocation of resources (e.g., nodes, slots)

`--bind-to :REPORT`

:   Report bindings for launched processes to `stderr`.

# DESCRIPTION

PRTE employs a three-phase procedure for assigning process locations and ranks:

  1. **mapping**:   Assigns a default location to each process
  2. **ranking**:   Assigns a unique rank value to each process
  3. **binding**:   Constrains each process to run on specific processors

The first phase of **mapping** is used to assign a default location to each
process based on the mapper being employed. Mapping by slot, node, and
sequentially results in the assignment of the processes to the node level. In
contrast, mapping by object, allows the mapper to assign the process to an
actual object on each node.

*Note:* The location assigned to the process is independent of where it will be
bound - the assignment is used solely as input to the binding algorithm.

The second phase focuses on the **ranking** of the process within the job's
namespace. PRTE separates this from the mapping procedure to allow more
flexibility in the relative placement of processes.

The third phase of **binding** actually binds each process to a given set of
processors. This can improve performance if the operating system is placing
processes sub-optimally. For example, it might oversubscribe some multi-core
processor sockets, leaving other sockets idle; this can lead processes to
contend unnecessarily for common resources. Or, it might spread processes out
too widely; this can be suboptimal if application performance is sensitive to
interprocess communication costs. Binding can also keep the operating system
from migrating processes excessively, regardless of how optimally those
processes were placed to begin with.

PRTE's support for process binding depends on the underlying operating system.
Therefore, certain process binding options may not be available on every system.

## Specifying Host Nodes

Host nodes can be identified on the command line with the `--host` option or
in a hostfile.

For example, assuming no other resource manager or scheduler is involved,

`prte --host aa,aa,bb ./a.out`

:   launches two processes on node `aa` and one on `bb`.

`prun --host aa ./a.out`

:   launches one process on node `aa`.

`prun --host aa:5 ./a.out`

:   launches five processes on node `aa`.

Or, consider the hostfile

```
$ cat myhostfile
aa slots=2
bb slots=2
cc slots=2
```

Here, we list both the host names (`aa`, `bb`, and `cc`) but also how
many "slots" there are for each. Slots indicate how many processes can
potentially execute on a node. For best performance, the number of
slots may be chosen to be the number of cores on the node or the
number of processor sockets.

If the hostfile does not provide slots information, the PRTE DVM will attempt
to discover the number of cores (or hwthreads, if the `:HWTCPUS` qualifier to
the `--map-by` option is set) and set the number of slots to that value.

Examples using the hostfile above with and without the `--host` option

`prun --hostfile myhostfile ./a.out`

:   will launch two processes on each of the three nodes.

`prun --hostfile myhostfile --host aa ./a.out`

:   will launch two processes, both on node `aa`.

`prun --hostfile myhostfile --host dd ./a.out`

:   will find no hosts to run on and abort with an error. That is, the
    specified host `dd` is not in the specified hostfile.

When running under resource managers (e.g., SLURM, Torque, etc.), PRTE will
obtain both the hostnames and the number of slots directly from the resource
manger. The behavior of `--host` in that environment will behave the same as
if a hostfile was provided (since it is provided by the resource manager).

## Specifying Number of Processes

As we have just seen, the number of processes to run can be set using
the hostfile. Other mechanisms exist.

The number of processes launched can be specified as a multiple of the
number of nodes or processor sockets available. Consider the hostfile below for
the examples that follow.

```
$ cat myhostfile
aa
bb
```

For example,

`prun --hostfile myhostfile --map-by ppr:2:package ./a.out`

:   launches processes 0-3 on node `aa` and process 4-7 on node `bb`, where
    `aa` and `bb` are both dual-package nodes. The `--map-by ppr:2:package`
    option also turns on the `--bind-to package` option, which is discussed
    in a later section.

`prun --hostfile myhostfile --map-by ppr:2:node ./a.out`

:   launches processes 0-1 on node `aa` and processes 2-3 on node `bb`.

`prun --hostfile myhostfile --map-by ppr:1:node ./a.out`

:   launches one process per host node.

Another alternative is to specify the number of processes with the `--np`
option. Consider now the hostfile

```
$ cat myhostfile
aa slots=4
bb slots=4
cc slots=4
```

Now,

`prun --hostfile myhostfile --np 6 ./a.out`

:   will launch processes 0-3 on node `aa` and processes 4-5 on node `bb`.
    The remaining slots in the hostfile will not be used since the `-np`
    option indicated that only 6 processes should be launched.

## Mapping Processes to Nodes: Using Policies

The examples above illustrate the default mapping of process processes
to nodes. This mapping can also be controlled with various `prun`/`prterun`
options that describe mapping policies.

```
$ cat myhostfile
aa slots=4
bb slots=4
cc slots=4
```

Consider the hostfile above, with `--np 6`:

```
                              node aa      node bb      node cc
prun                          0 1 2 3      4 5
prun --map-by node            0 1          2 3          4 5
prun --map-by node:NOLOCAL                 0 1 2        3 4 5
```

The `--map-by node` option will load balance the processes across the
available nodes, numbering each process in a round-robin fashion.

The `:NOLOCAL` qualifier to `--map-by` prevents any processes from being mapped
onto the local host (in this case node `aa`). While `prun` typically consumes
few system resources, the `:NOLOCAL` qualifier can be helpful for launching
very large jobs where `prun` may actually need to use noticeable amounts of
memory and/or processing time.

Just as `--np` can specify fewer processes than there are slots, it can
also oversubscribe the slots. For example, with the same hostfile:

`prun --hostfile myhostfile --np 14 ./a.out`

:   will produce an error since the default `:NOOVERSUBSCRIBE` qualifier to
    `--map-by` prevents oversubscription.

To oversubscribe the nodes you can use the `:OVERSUBSCRIBE` qualifier to
`--map-by`:

`prun --hostfile myhostfile --np 14 --map-by :OVERSUBSCRIBE ./a.out`

:   will launch processes 0-5 on node `aa`, 6-9 on `bb`, and 10-13 on `cc`.

Limits to oversubscription can also be specified in the hostfile itself
with the `max_slots` field:
```
% cat myhostfile
aa slots=4 max_slots=4
bb         max_slots=8
cc slots=4
```

The `max_slots` field specifies such a limit. When it does, the `slots`
value defaults to the limit. Now:

`prun --hostfile myhostfile --np 14 --map-by :OVERSUBSCRIBE ./a.out`

:   causes the first 12 processes to be launched as before, but the
    remaining two processes will be forced onto node cc. The other two
    nodes are protected by the hostfile against oversubscription by this
    job.

Using the `:NOOVERSUBSCRIBE` qualifier to `--map-by` option can be helpful
since the PRTE DVM currently does not get "max_slots" values from the
resource manager.

Of course, `--np` can also be used with the `--host` option. For
example,

`prun --host aa,bb --np 8 ./a.out`

:   will produce an error since the default `:NOOVERSUBSCRIBE` qualifier to
    `--map-by` prevents oversubscription.

`prun --host aa,bb --np 8 --map-by :OVERSUBSCRIBE ./a.out`

:   launches 8 processes. Since only two hosts are specified, after the
    first two processes are mapped, one to `aa` and one to `bb`, the
    remaining processes oversubscribe the specified hosts evenly.

`prun --host aa:2,bb:6 --np 8 ./a.out`

:   launches 8 processes. Processes 0-1 on node `aa` since it has 2 slots and
    processes 2-7 on node `bb` since it has 6 slots.

And here is a MIMD example:

`prun --host aa --np 1 hostname : --host bb,cc --np 2 uptime`

:   will launch process 0 running `hostname` on node `aa` and processes 1
    and 2 each running `uptime` on nodes `bb` and `cc`, respectively.

## Mapping, Ranking, and Binding: Fundamentals

The mapping of process processes to nodes can be defined not just with
general policies but also, if necessary, using arbitrary mappings that
cannot be described by a simple policy. One can use the "sequential
mapper," which reads the hostfile line by line, assigning processes to
nodes in whatever order the hostfile specifies. Use the
`--prtemca rmaps seq` option.

For example, using the hostfile below:
```
% cat myhostfile
aa slots=4
bb slots=4
cc slots=4
```

The command below will launch three processes, one on each of nodes `aa`, `bb`,
and `cc`, respectively. The slot counts don't matter; one process is launched
per line on whatever node is listed on the line.
```
% prun --hostfile myhostfile --prtemca rmaps seq ./a.out
```

The *ranking* phase is best illustrated by considering the following hostfile
and test cases we used the `--map-by ppr:2:package` option:

```
% cat myhostfile
aa
bb
```

```
                         node aa       node bb
--rank-by core           0 1 ! 2 3     4 5 ! 6 7
--rank-by package        0 2 ! 1 3     4 6 ! 5 7
--rank-by package:SPAN   0 4 ! 1 5     2 6 ! 3 7
```

Ranking by core and by slot provide the identical result - a simple
progression of ranks across each node. Ranking by package does a
round-robin ranking within each node until all processes have been
assigned a rank, and then progresses to the next node. Adding the `:SPAN`
qualifier to the ranking directive causes the ranking algorithm to treat
the entire allocation as a single entity - thus, the process ranks are
assigned across all sockets before circling back around to the
beginning.

The *binding* phase restricts the process to a subset of the CPU resources
on the node.

The processors to be used for binding can be identified in terms of
topological groupings - e.g., binding to an l3cache will bind each
process to all processors within the scope of a single L3 cache within
their assigned location. Thus, if a process is assigned by the mapper to
a certain package, then a `--bind-to l3cache` directive will cause the
process to be bound to the processors that share a single L3 cache
within that package.

To help balance loads, the binding directive uses a round-robin method
when binding to levels lower than used in the mapper. For example,
consider the case where a job is mapped to the package level, and then
bound to core. Each package will have multiple cores, so if multiple
processes are mapped to a given package, the binding algorithm will
assign each process located to a package to a unique core in a
round-robin manner.

Alternatively, processes mapped by l2cache and then bound to package will
simply be bound to all the processors in the package where they are
located. In this manner, users can exert detailed control over relative
process location and binding.

Process mapping/ranking/binding can also be set with MCA parameters. Their
usage is less convenient than that of the command line options. On the other
hand, MCA parameters can be set not only on the `prun` command line, but
alternatively in a system or user `mca-params.conf` file or as environment
variables, as described in the MCA section below. Some examples include:

```
prun option          MCA parameter key           value
--map-by core        rmaps_base_mapping_policy   core
--map-by package     rmaps_base_mapping_policy   package
--rank-by core       rmaps_base_ranking_policy   core
--bind-to core       hwloc_base_binding_policy   core
--bind-to package    hwloc_base_binding_policy   package
--bind-to none       hwloc_base_binding_policy   none
```

## Difference between overloading and oversubscription

This section explores the difference between these two options. Users are often
confused by the difference between these two scenarios. As such this section
provides a number of scenarios to help illustrate the differences.

 - `--map-by :OVERSUBSCRIBE` allow more processes on a node than processing elements
 - `--bind-to <object>:overload-allowed` allows for binding more than one process in relation to a CPU

The important thing to remember with _oversubscribing_ is that it can be
defined separately from the actual number of CPUs on a node. This allows the
mapper to place more or fewer processes per node than CPUs. By default, PRTE
uses cores to determine slots in the absence of such information provided in
the hostfile or by the resource manager (except in the case of the `--host`
as described in the "Specifying Host Nodes" section).

The important thing to remember with _overloading_ is that it is defined as
binding more processes than CPUs. By default, PRTE uses cores as a means of
counting the number of CPUs. However, the user can adjust this. For example
when using the `:HWTCPUS` qualifier to the `--map-by` option PRTE will use
hardware threads as a means of counting the number of CPUs.

For the following examples consider a node with:
 - Two processor packages,
 - Ten cores per package, and
 - Eight hardware threads per core.

Consider the node from above with the hostfile below:

```
$ cat myhostfile
node01 slots=32
node02 slots=32
```

The "slots" tells PRTE that it can place up to 32 processes before
_oversubscribing_ the node.

If we run the following:
```
prun --np 34 --hostfile myhostfile --map-by core --bind-to core hostname
```

It will return an error at the binding time indicating an _overloading_ scenario.

The mapping mechanism assigns 32 processes to `node01` matching the "slots"
specification in the hostfile. The binding mechanism will bind the first 20
processes to unique cores leaving it with 12 processes that it cannot bind
without overloading one of the cores (putting more than one process on the
core).

Using the `overload-allowed` qualifier to the `--bind-to core` option tells
PRTE that it may assign more than one process to a core.

If we run the following:
```
prun --np 34 --hostfile myhostfile --map-by core --bind-to core:overload-allowed hostname
```

This will run correctly placing 32 processes on `node01`, and 2 processes on
`node02`. On `node01` two processes are bound to cores 0-11 accounting for
the overloading of those cores.

Alternatively, we could use hardware threads to give binding a lower level
CPU to bind to without overloading.

If we run the following:
```
prun --np 34 --hostfile myhostfile --map-by core:HWTCPUS --bind-to hwthread hostname
```

This will run correctly placing 32 processes on `node01`, and 2 processes on
`node02`. On `node01` two processes are mapped to cores 0-11 but bound to
different hardware threads on those cores (the logical first and second
hardware thread) thus no hardware threads are overloaded at binding time.

In both of the examples above the node is not oversubscribed at mapping time
because the hostfile set the oversubscription limit to "slots=32" for each
node. It is only after we exceed that limit that PRTE will throw an
oversubscription error.

Consider next if we ran the following:
```
prun --np 66 --hostfile myhostfile --map-by core:HWTCPUS --bind-to hwthread hostname
```

This will return an error at mapping time indicating an oversubscription
scenario. The mapping mechanism will assign all of the available slots
(64 across 2 nodes) and be left two processes to map. The only way to map
those processes is to exceed the number of available slots putting the job
into an oversubscription scenario.

You can force PRTE to oversubscribe the nodes by using the `:OVERSUBSCRIBE`
qualifier to the `--map-by` option as seen in the example below:
```
prun --np 66 --hostfile myhostfile --map-by core:HWTCPUS:OVERSUBSCRIBE --bind-to hwthread hostname
```

This will run correctly placing 34 processes on `node01` and 32 on `node02`.
Each process is bound to a unique hardware thread.

### Overloading vs Oversubscription: Package Example

Let's extend these examples by considering the package level.
Consider the same node as before, but with the hostfile below:
```
$ cat myhostfile
node01 slots=22
node02 slots=22
```

The lowest level CPUs are 'cores' and we have 20 total (10 per package).

If we run:
```
prun --np 20 --hostfile myhostfile --map-by package --bind-to package:REPORT hostname
```

Then 10 processes are mapped to each package, and bound at the package level.
This is not overloading since we have 10 CPUs (cores) available in the package
at the hardware level.

However, if we run:
```
prun --np 21 --hostfile myhostfile --map-by package --bind-to package:REPORT hostname
```

Then 11 processes are mapped to the first package and 10 to the second package.
At binding time we have an overloading scenario because there are only
10 CPUs (cores) available in the package at the hardware level. So the first
package is overloaded.

### Overloading vs Oversubscription: Hardware Threads Example

Similarly, if we consider hardware threads.

Consider the same node as before, but with the hostfile below:
```
$ cat myhostfile
node01 slots=165
node02 slots=165
```

The lowest level CPUs are 'hwthreads' (because we are going to use the
`:HWTCPUS` qualifier) and we have 160 total (80 per package).

If we re-run (from the package example) and add the `:HWTCPUS` qualifier:
```
prun --np 21 --hostfile myhostfile --map-by package:HWTCPUS --bind-to package:REPORT hostname
```

Without the `:HWTCPUS` qualifier this would be overloading (as we saw
previously). The mapper places 11 processes on the first package and 10 to the
second package. The processes are still bound to the package level. However,
with the `:HWTCPUS` qualifier, it is not overloading since we have
80 CPUs (hwthreads) available in the package at the hardware level.

Alternatively, if we run:
```
prun --np 161 --hostfile myhostfile --map-by package:HWTCPUS --bind-to package:REPORT hostname
```

Then 81 processes are mapped to the first package and 80 to the second package.
At binding time we have an overloading scenario because there are only
80 CPUs (hwthreads) available in the package at the hardware level.
So the first package is overloaded.

## Diagnostics

PRTE provides various diagnostic reports that aid the user in verifying and
tuning the mapping/ranking/binding for a specific job.

The `:REPORT` qualifier to `--bind-to` command line option can be used to
report process bindings.

As an example, consider a node with:
 - Two processor packages,
 - Four cores per package, and
 - Eight hardware threads per core.

In each of the examples below the binding is reported in a human readable
format.

```
$ prun --np 4 --map-by core --bind-to core:REPORT ./a.out
[node01:103137] MCW rank 0 bound to package[0][core:0]
[node01:103137] MCW rank 1 bound to package[0][core:1]
[node01:103137] MCW rank 2 bound to package[0][core:2]
[node01:103137] MCW rank 3 bound to package[0][core:3]
```

The example above processes bind to successive cores on the first package.

```
$ prun --np 4 --map-by package --bind-to package:REPORT ./a.out
[node01:103115] MCW rank 0 bound to package[0][core:0-9]
[node01:103115] MCW rank 1 bound to package[1][core:10-19]
[node01:103115] MCW rank 2 bound to package[0][core:0-9]
[node01:103115] MCW rank 3 bound to package[1][core:10-19]
```

The example above processes bind to all cores on successive packages.
The processes cycle though the packages in a round-robin fashion as many times
as are needed.

```
$ prun --np 4 --map-by package:PE=2 --bind-to core:REPORT ./a.out
[node01:103328] MCW rank 0 bound to package[0][core:0-1]
[node01:103328] MCW rank 1 bound to package[1][core:10-11]
[node01:103328] MCW rank 2 bound to package[0][core:2-3]
[node01:103328] MCW rank 3 bound to package[1][core:12-13]
```

The example above shows us that 2 cores have been bound per process.
The `:PE=2` qualifier states that 2 processing elements underneath the package
(which would be cores in this case) are mapped to each process.
The processes cycle though the packages in a round-robin fashion as many times
as are needed.

```
$ prun --np 4 --map-by core:PE=2:HWTCPUS --bind-to :REPORT  hostname
[node01:103506] MCW rank 0 bound to package[0][hwt:0-1]
[node01:103506] MCW rank 1 bound to package[0][hwt:8-9]
[node01:103506] MCW rank 2 bound to package[0][hwt:16-17]
[node01:103506] MCW rank 3 bound to package[0][hwt:24-25]
```

The example above shows us that 2 hardware threads have been bound per process.
In this case `prun` is mapping by hardware threads since we used the `:HWTCPUS`
qualifier. Without that qualifier this command would return an error since
by default `prun` will not map to resources smaller than a core.
The `:PE=2` qualifier states that 2 processing elements underneath the core
(which would be hardware threads in this case) are mapped to each process.
The processes cycle though the cores in a round-robin fashion as many times
as are needed.

```
$ prun --np 4 --bind-to none:REPORT  hostname
[node01:107126] MCW rank 0 is not bound (or bound to all available processors)
[node01:107126] MCW rank 1 is not bound (or bound to all available processors)
[node01:107126] MCW rank 2 is not bound (or bound to all available processors)
[node01:107126] MCW rank 3 is not bound (or bound to all available processors)
```

The example above binding is turned off.

## Rankfiles

Another way to specify arbitrary mappings is with a rankfile, which gives you
detailed control over process binding as well.

Rankfiles are text files that specify detailed information about how individual
processes should be mapped to nodes, and to which processor(s) they should be
bound. Each line of a rankfile specifies the location of one process. The
general form of each line in the rankfile is:

```
rank <N>=<hostname> slot=<slot list>
```

For example:
```
$ cat myrankfile
rank 0=c712f6n01 slot=10-12
rank 1=c712f6n02 slot=0,1,4
rank 2=c712f6n03 slot=1-2
$ prun --host aa,bb,cc,dd --map-by rankfile:FILE=myrankfile ./a.out
```

Means that

```
Rank 0 runs on node aa, bound to logical cores 10-12.
Rank 1 runs on node bb, bound to logical cores 0, 1, and 4.
Rank 2 runs on node cc, bound to logical cores 1 and 2.
```

For example:
```
$ cat myrankfile
rank 0=aa slot=1:0-2
rank 1=bb slot=0:0,1,4
rank 2=cc slot=1-2
$ prun --host aa,bb,cc,dd --map-by rankfile:FILE=myrankfile ./a.out
```

Means that

```
Rank 0 runs on node aa, bound to logical package 1, cores 10-12 (the 0th through 2nd cores on that package).
Rank 1 runs on node bb, bound to logical package 0, cores 0, 1, and 4.
Rank 2 runs on node cc, bound to logical cores 1 and 2.
```

The hostnames listed above are "absolute," meaning that actual resolvable
hostnames are specified. However, hostnames can also be specified as
"relative," meaning that they are specified in relation to an
externally-specified list of hostnames (e.g., by `prun`'s `--host` argument,
a hostfile, or a job scheduler).

The "relative" specification is of the form "`+n<X>`", where `X` is an integer
specifying the Xth hostname in the set of all available hostnames, indexed
from 0. For example:

```
$ cat myrankfile
rank 0=+n0 slot=10-12
rank 1=+n1 slot=0,1,4
rank 2=+n2 slot=1-2
$ prun --host aa,bb,cc,dd --map-by rankfile:FILE=myrankfile ./a.out
```

All package/core slot locations are be specified as *logical* indexes. You can
use tools such as HWLOC's "lstopo" to find the logical indexes of packages and
cores.

## Deprecated Options

These deprecated options will be removed in a future release.

`--bind-to-core`

:   **(Deprecated: Use `--bind-to core`)**
    Bind processes to cores

`-bind-to-socket, --bind-to-socket`

:   **(Deprecated: Use `--bind-to package`)**
    Bind processes to processor sockets

`--bycore`

:   **(Deprecated: Use `--map-by core`)**
    Map processes by core

`-bynode, --bynode`

:   **(Deprecated: Use `--map-by node`)**
    Launch processes one per node, cycling by node in a round-robin
    fashion. This spreads processes evenly among nodes and assigns ranks
    in a round-robin, "by node" manner.

`--byslot`

:   **(Deprecated: Use `--map-by slot`)**
    Map and rank processes round-robin by slot.

`--cpus-per-proc <#perproc>`

:   **(Deprecated: Use `--map-by <obj>:PE=<#perproc>`)**
    Bind each process to the specified number of cpus.

`--cpus-per-rank <#perrank>`

:   **(Deprecated: Use `--map-by <obj>:PE=<#perrank>`)**
    Alias for `--cpus-per-proc`.

`--display-allocation`

:   **(Deprecated: Use `--map-by :DISPLAYALLOC`)**
    Display the detected resource allocation.

`--display-devel-map`

:   **(Deprecated: Use `--map-by :DISPLAYDEVEL`)**
    Display a detailed process map (mostly intended for developers) just
    before launch.

`--display-map`

:   **(Deprecated: Use `--map-by :DISPLAY`)**
    Display a table showing the mapped location of each process prior to
    launch.

`--display-topo`

:   **(Deprecated: Use `--map-by :DISPLAYTOPO`)**
    Display the topology as part of the process map (mostly intended for
    developers) just before launch.

`--do-not-launch`

:   **(Deprecated: Use `--map-by :DONOTLAUNCH`)**
    Perform all necessary operations to prepare to launch the application,
    but do not actually launch it (usually used to test mapping patterns).

`--do-not-resolve`

:   **(Deprecated: Use `--map-by :DONOTRESOLVE`)**
    Do not attempt to resolve interfaces - usually used to determine proposed
    process placement/binding prior to obtaining an allocation.

`-N <num>`

:   **(Deprecated: Use `--map-by prr:<num>:node`)**
    Launch `num` processes per node on all allocated nodes.

`--nolocal`

:   **(Deprecated: Use `--map-by :NOLOCAL`)**
    Do not run any copies of the launched application on the same node
    as `prun` is running. This option will override listing the `localhost`
    with `--host` or any other host-specifying mechanism.

`--nooversubscribe`

:   **(Deprecated: Use `--map-by :NOOVERSUBSCRIBE`)**
    Do not oversubscribe any nodes; error (without starting any
    processes) if the requested number of processes would cause
    oversubscription. This option implicitly sets "max_slots" equal
    to the "slots" value for each node. (Enabled by default).

`--npernode <#pernode>`

:   **(Deprecated: Use `--map-by ppr:<#pernode>:node`)**
    On each node, launch this many processes.

`--npersocket <#persocket>`

:   **(Deprecated: Use `--map-by ppr:<#perpackage>:package`)**
    On each node, launch this many processes times the number of
    processor sockets on the node. The `--npersocket` option also turns
    on the `--bind-to socket` option. The term `socket` has been globally
    replaced with `package`.

`--oversubscribe`

:   **(Deprecated: Use `--map-by :OVERSUBSCRIBE`)**
    Nodes are allowed to be oversubscribed, even on a managed system,
    and overloading of processing elements.

`--pernode`

:   **(Deprecated: Use `--map-by ppr:1:node`)**
    On each node, launch one process.

`--ppr`

:   **(Deprecated: Use `--map-by ppr:<list>`)**
    Comma-separated list of number of processes on a given resource type
    [default: none].

`--rankfile <FILENAME>`

:   **(Deprecated: Use `--map-by rankfile:FILE=<FILENAME>`)**
    Use a rankfile for mapping/ranking/binding

`--report-bindings`

:   **(Deprecated: Use `--bind-to :REPORT`)**
    Report any bindings for launched processes.

`--tag-output`

:   **(Deprecated: Use `--map-by :TAGOUTPUT`)**
    Tag all output with [job,rank]

`--timestamp-output`

:   **(Deprecated: Use `--map-by :TIMESTAMPOUTPUT`)**
    Timestamp all application process output

`--use-hwthread-cpus`

:   **(Deprecated: Use `--map-by :HWTCPUS`)**
    Use hardware threads as independent cpus.

`--xml`

:   **(Deprecated: Use `--map-by :XMLOUTPUT`)**
    Provide all output in XML format

gha_license_id: NOASSERTION


text:
# ejs-preview

Simple package for previewing ejs templates

## Installation

### Yarn

As normal dependency:

``` shell
yarn add @est-normalis/ejs-preview
```

or as dev dependency:

``` shell
yarn add -D @est-normalis/ejs-preview
```

### npm

As normal dependency:

``` shell
npm i @est-normalis/ejs-preview
```

or as dev dependency:

``` shell
npm i @est-normalis/ejs-preview --save-dev
```

## Usage

### As normal library

@est-normalis/ejs-preview exports by default function allowing
to start webserver and serve choosen ejs file.

``` typescript
import { previewTemplate } from '@est-normalis/ejs-preview'

previewTemplate({
    templatePath: 'src/templates/index.html.ejs'
})
```

The function takes object specified in PreviewConfig interface
as argument.

Aviable options:

``` typescript
templatePath: string
variables?: any
url?: string
port?: any
mimeType?: string
```

### As CLI

@est-normalis/ejs-prewiev has a command line interface.
It allows you to create preview server without creating
unneccessary boilerplate files.

The cli is aviables when you simply type package name in shell.

``` shell
@est-normalis/ejs-prewiev <templatePath>
```

The command takes two positional arguments.
The first one is obligatory and takes a path to template.

``` shell
@est-normalis/ejs-prewiev index.html.ejs
```

The second one is optional and takes path to JSON file
with variables required by template. If not passed
variables passed to template are equal to empty object (`{}`).

``` shell
@est-normalis/ejs-prewiev index.html.ejs variables.json
```

If your file has .json extension you can ommit it when typing
its path, however if there is another file mathing name without
extension it will be required and parsed.

#### Example

`index.html.ejs`:

``` html
<p><%= somekey %></p>
```

`variables.json`:

``` json
{
    "somekey": "somevalue"
}
```

command:

``` shell
@est-normalis/ejs-prewiev index.html.ejs variables
```

result (html):

``` html
<p>somevalue</p>
```

#### Flags

You can pass certain flags to the command:

##### Port

Flag:
`-p`, `--port`

Example:
`-p 997`

Result:
Page will be aviable under `localhost:997` instead of default `localhost:9999`.

##### host

Flag:
`-h`, `--host`

Example:
`-h <IP_ADDRESS>`

Result:
Server url will be changed to the new one. Its especially useful when
you for example want to preview template on virtual machine on its internal network.

##### mime

Flag:
`-m`, `--mime`

Example:
`-m text/plain`

Result:
Changes default `Content-Type` header from `text/html` to- in this case- `text/plain`.

license: MIT

repository: est-normalis/ejs-preview

branch_name: refs/heads/master

extension: md

gha_language: TypeScript

gha_license_id: MIT

license_type: permissive

repo_name: est-normalis/ejs-preview


text:
# NLP Sentiment Analysis
Author: Jolie McDonnell

# About
This notebook demonstrates an exploration into the different methods of sentiment analysis on ten random sentences chosen by the user. The types of methods explored include NLTK's Vader, BERT via Huggingface, and a model trained using SKLEARN and RandomForestClassifier. The predicted sentiments are outputted from each method and compared in the final table.

repository: jolie-mcdonnell/Sentiment-Analysis

branch_name: refs/heads/main

repo_name: jolie-mcdonnell/Sentiment-Analysis


text:
## Switching between different fonts

As a rule of thumb, when switching between different fonts on the display, one should follow the order of:

```
Set Font -> Set Cursor -> Print Text
```

This is because when switching fonts the subsequent font follows the same baseline as the previous font. While this may be desirable in some cases, when testing the clock I encountered a slight issue due to the text appearing to shift slightly higher when it updated.

See the very bottom of [fontconvert.c](https://github.com/adafruit/Adafruit-GFX-Library/blob/master/fontconvert/fontconvert.c) for more details.

gha_language: C


text:
---
title: Installation
description: >-
    Learn how Bactopia install and get started using Bactopia for your genomic analyses.
---
# Installation
Bactopia has a **a lot** of tools built into its workflow. As you can imagine, all these tools lead to numerous dependencies, and navigating dependencies can often turn into a very frustrating process. With this in mind, from the onset Bactopia was developed to only include programs that are installable using [Conda](https://conda.io/en/latest/).

Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux. In other words, it makes it super easy to get the tools you need installed! The [official Conda documentation](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) is a good starting point for getting started with Conda. Bactopia has been tested using the
[Miniconda installer](https://conda.io/en/latest/miniconda.html),
but the [Anaconda installer](https://www.anaconda.com/distribution/) should
work the same.

Containers (Docker and Singularity) are also available.

## Bioconda
Once you have Conda all set up, you are ready to create an environment for
Bactopia. To do so, you can use the following command:

```
conda create -n bactopia -c conda-forge -c bioconda bactopia
```

After a few minutes you will have a new conda environment suitably named *bactopia*. To activate this environment, you will can use the following command:

```
conda activate bactopia
```

And voilà, you are all set to get started processing your data!

But first, it is highly recommended that you take the time to [Build Datasets](datasets.md) that Bactopia can take advantage of.

!!! error "OSX has limited support"
    I have developed Bactopia primarily for Linux, but I recognize it is useable on Mac OSX. Currently the support for OSX will be limited due to not having significant resources available for testing OSX extensively. My current setup, a mid-2013 MacBook, only allows me to maintain the Conda YAMLS for OSX. Please keep this in mind when using Bactopia on OSX. I will still try to help out if you run into any issues!

!!! error "Windows is not supported, please use Windows Subsystem for Linux"
    Bactopia will never support Windows natively due to dependencies. To use Bactopia on a Windows 10 machine, you will need to set up Windows Subsystem for Linux (WSL). This would allow you to run Bactopia inside the Linux subsystem. I have not tested Bactopia on WSL, but assume it should work fine. I have limited resources to test Bactopia in WSL, but if you give it a go and run into any issues please reach out!

## Container
A Docker and Singularity container has been created that is based off the Conda install.

```
# Docker
docker pull bactopia/bactopia

# Singularity
singularity pull library://rpetit3/bactopia/bactopia
```

!!! error "These might not be available"
    Recent changes to DockerHub and Singularity policies have made the availability of these containers questionable. While I will try my best to make sure they are available, please understand if they are not.

    If they are not available, I maintain the `Dockerfile` and `Singularity` files which can be used to build the containers locally.

gha_language: Jinja


text:
---
layout: post
title: "Around the Web for June 26th through June 28th"
microblog: false
date: 2014-06-28 04:00 +0300
guid: http://desparoz.micro.blog/2014/06/28/around-the-web.html
---

These are my Around the Web links for June 26th through June 28th:

Essential Security Tips — KatieFloyd.me - Great security tips from Katie Floyd.

New Lightroom iBook from the Photofocus—Free until 1 August - The release of a new iBook on Lightroom could not be better timed, given Apple announcing the discontinuation of Aperture today. And the iBook is free until 1 August.

Gruber on Withings Activité - John Griber sums up why the Withings Activite is the first 'smart watch' that has really got my attention—style, simplicity and long battery life

10 Great Uses for Alfred’s Hotkeys - Great uses for Alfred hotkeys

20 Years Ago, Apple and Kodak Launched the Digital Camera Revolution - Mashable looks back at the 20 years since the launch of the digital revolution


text:
# Group: Series

###Mime Types

* post: n/a
* get: application/vnd.ccp.eve.TournamentSeriesCollection-v1+json
* put: n/a
* delete: n/a

* URL example: `https://api-sisi.testeveonline.com/tournaments/7/series/`

* [Matches](matches/TournamentMatchCollection.md) `application/vnd.ccp.eve.TournamentMatchCollection-v1+json`


text:
SublimeMessagesPylint
=====================

Yet another plugin for pylint in Sublime Text. Unlike others, this one has a brittish accent. The main difference is this plugin works with the [SublimeMessages] plugin.

The prerequisits for this plugin are:

 - [SublimeMessages] plugin
 - pylint version >= 1.0.1

Much of the inspiriation for this plugin comes from the pylinter plugin, but with an effort to make it a bit more natural. For instance, when you edit a file, and marked lines move, the gutter marks and status messages move with them.

How it works:
-------------

Lints files on save.

`pylint disable` comments can be added to ignore all message types on a line with `ctrl`+`alt`+`i` (Linux) or `super`+`alt`+`i` (OS X).

Gutter marks can be customized from the [SublimeMessages] plugin.

Settings:
---------

 - `enabled` true or false
 - `pylint_bin` path to pylint executable
 - `python_bin` path to python interpreter that can import pylint (only used if pylint_bin is not found and auto-discover fails)
 - `disable` list of pylint messages to ignore (ex: ["I0011"])

[SublimeMessages]: https://github.com/KristoforMaynard/SublimeMessages

repository: KristoforMaynard/SublimeMessagesPylint

repo_name: KristoforMaynard/SublimeMessagesPylint


text:
## 0.11.11

_Released 10/04/2015_

**Bugfixes:**

- Snapshots of [`.type()`](/api/commands/type) and [`.select()`](/api/commands/select) are no longer incorrect due to taking snapshots too early. Fixes [#22](https://github.com/cypress-io/cypress/issues/22).
- Passing `{force: true}` to [`.blur()`](/api/commands/blur) now logs correctly in the Command Log.

**Misc:**

- Added delays on some tooltips.
- The URL will now highlight in a yellow background during a revert DOM snapshot.
- Moved snapshot message to be affixed to the bottom of the remote app in preparation for cycling through multiple snapshots.
- Cleaned up the URL by removing some unused content.

repository: NoriSte/cypress-documentation

repo_name: NoriSte/cypress-documentation


text:
# AKS Engine documentation

Everything you need to know about AKS Engine.

## How the documentation is organized

AKS Engine has a lot of documentation. A high-level overview of how it’s organized will help you know where to look for certain things.

[Tutorials][] take you by the hand through a series of steps on a given subject. Start here if you’re new to AKS Engine.

[Topic guides][] discuss key topics and concepts at a fairly high level and provide useful background information and explanation.

[How-to guides][] are recipes. They guide you through the steps involved in addressing key problems and use-cases. They are more advanced than tutorials and assume some knowledge of how the `aks-engine` tool works.

[Community guides][] teach you about the AKS Engine community. It incudes information on the project's Code of Conduct, the planning process for the AKS Engine project itself, its release cycle, and how you can contribute to the project.

[quickstart]: tutorials/quickstart.md
[getting started]: tutorials/hello-world.md
[tutorials]: tutorials/README.md
[How-to guides]: howto/README.md
[Topic guides]: topics/README.md
[the reference guides]: reference/README.md
[community guides]: community/README.md

repository: Azure/aks-engine

gha_language: Go

repo_name: Azure/aks-engine


text:
# Changelog

## [v2.0.0](https://github.com/naoray/nova-json/tree/v2.0.0) (2022-02-08)

**Added**
- support for Laravel 9 (827c15f25daf230a242af3a51093a17219cb1e7e)

## [v1.3.1](https://github.com/naoray/nova-json/tree/v1.3.1) (2021-03-28)

**Changed**
- if `fillAtOnce()` returns `null` and the `JSON` field is not nullable, the package won't attempt to fill a model attribute => this allows the usage of a JSON field for related fields and give full control over resolving the values

## [v1.2.3](https://github.com/naoray/nova-json/tree/v1.2.2) (2021-03-10)

**Fixed**
- `array_key_exists(): The first argument should be either a string or an integer` appearing when the attribute name of the JSON fields were not specified

## [v1.2.2](https://github.com/naoray/nova-json/tree/v1.2.2) (2021-02-26)

**Fixed**
- `nullable()` fields were not possible to be filled with `null` values

**Changed**
- changed `prepareJsonFields()` from public to protected
- added tests for `nullable()` & `nullValues()`

## [v1.2.1](https://github.com/naoray/nova-json/tree/v1.2.1) (2021-02-03)

**Fixed**
- bug where nested JSON structures would return only partly resolved with `->` instead of having an array structure.

## [v1.2.0](https://github.com/naoray/nova-json/tree/v1.2.0) (2021-02-03)

**Added**
- `JSON` can be marked as `nullable` via `nullable()` and specify values counted as `null` via `nullValues()`
- `fillOnce()` method to prevent values being filled one after another.

**Fixed**
- `fillUsing()` callbacks of individual fields are not ignored anymore.

## [v1.1.0](https://github.com/naoray/nova-json/tree/v1.1.0) (2021-01-07)

**Added**
- nesting JSON fields is now possible

```php
JSON::make('Address', 'address', [
    Text::make('Street'),

    JSON::make('Location', [
        Text::make('Latitude'),
        Text::make('Longitude'),
    ]),
]);
```

## [v1.0.0](https://github.com/naoray/nova-json/tree/v1.0.0) (2020-12-18)

**Initial Release**

repository: Naoray/nova-json

gha_language: PHP

repo_name: Naoray/nova-json


text:
Two files are included from the Stackexchange archive

- Posts.tsv

This file has all the questions and answers from http://scifi.stackexchange.com/ in a *preprocessed* form

The original data field documentation is at http://meta.stackexchange.com/questions/2677/database-schema-documentation-for-the-public-data-dump-and-sede

Only rows from the original XML data file whose PostTypeID is 1 or 2 is kept.

There are 9 tab separated fields:

* ID
* PostTypeID
* ParentID
* OwnerUserID
* CreationDate
* ViewCount
* FavoriteCount
* Tags
* Keywords

Example code in this repository shows how to process and use HLL, BF and Count-min Sketch probabilistic algorithms in Scala / scalding using the library `algebird`

- Users.tsv

This file contains the list of users

 Fields are:

* Id
* Reputation
* CreationDate
* DisplayName
* LastAccessDate
* WebsiteUrl
* Location
* AboutMe
* Views
* UpVotes
* DownVotes
* EmailHash (now always blank)
* AccountId
* Age

repository: scalding-io/social-media-analytics

repo_name: scalding-io/social-media-analytics


text:
**Attention: This project is not under active development.**

ProxySwitcher
=============

Proxy Switcher allows you to automatically execute actions, based on the detected network connection. As the name indicates, Proxy Switcher comes with some default actions, for example setting proxy settings for Internet Explorer, Firefox and Opera.

Now you do not longer need a bunch of clicks to set the proxy for a specific network. Just configure Proxy Switcher to automatically detect a network and execute all actions you like.

Features

- Automatic change of proxy configurations (or any other action) based on network information:
 - Gateway Address, Gateway MAC address [NEW in 3.6.0]
 - IP Address
 - DNS Suffix
 - WLAN Name
 - Current location via Windows 7 Location API (available only for Windows 7)
 - Server availability (tests if a server is reachable by ping) [NEW in 3.5.3]
 - Docking Station state
- Completely AddIn based. More Action AddIns are available for download and you can easily create your own actions with C#/VB.NET. AddIn Framework is based on Microsofts Managed Extensibility Framework (MEF).
- The following Actions are shipped with Proxy Switcher
 - Internet Explorer / Windows
 - Firefox
 - Opera
 - Change default printer
 - Execute scripts
- Multilanguage support (English and German)
- Support for Windows 7/8

To create your own AddIn, you can start by using the NuGet package.

About
======
I've started this tool back in 2007 beginning with my new job as a IT/SharePoint Consultant, where I was every week/month at a different customer.
I'd like to rewrite most parts and make it more simple and cleaner, but I have not that much time, therefore I'd be happy if someone want to start a rewrite or at least want to try to split the config UI and the core service, so that it has less memory footprint.
Feel free to submit pull requests or drop me a line if you want to contribute

gha_language: C#


text:
node-nfc
========
A binding from libnfc to node.
At present,
only reading is supported.

## Installation

### Step 1: Prerequisites
In order to use the module you need to install libnfc and libusb.
Read more about [libnfc here](http://nfc-tools.org/index.php?title=Libnfc).

On Linux, you want:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install libusb-dev libnfc

On MacOS X, you want:

    brew update
    brew doctor
    brew install libusb-compat libnfc

### Step 2: Installation

To install it, use npm:

    npm install nfc

Or, to compile it yourself, make sure you have node-gyp:

    node-gyp configure
    node-gyp build

### NPM errors

- An error of **missing nfc.h** indicates that libnfc isn't installed correctly.

### Runtime errors

- An error of **Unable to claim USB interface (Permission denied)**
indicates that another process has the interface. On MacOS X you can try:

    $ sudo killall pcscd

## Initialization and Information

    var nfc  = require('nfc').nfc
      , util = require('util')
      ;

    console.log('nfc.version(): ' + util.inspect(nfc.version(), { depth: null }));
        // { name: 'libfnc', version: '1.7.0' }

    console.log('nfc.scan(): ' + util.inspect(nfc.scan(), { depth: null }));
        // { 'pn53x_usb:160:012': { name: 'SCM Micro / SCL3711-NFC&RW', info: { chip: 'PN533 v2.7', ... } } }

## Reading

    var device = new nfc.NFC();
    device.on('read', function(tag) {
        // { deviceID: '...', name: '...', uid: '...', type: 0x04 (Mifare Classic) or 0x44 (Mifare Ultralight) }

        if ((!!tag.data) && (!!tag.offset)) console.log(util.inspect(nfc.parse(tag.data.slice(tag.offset)), { depth: null }));
    }).on('error', function(err) {
        // handle background error;
    }).start();
    // optionally the start function may include the deviceID (e.g., 'pn53x_usb:160:012')

## And an extra thanks to...

[jeroenvollenbrock](https://github.com/jeroenvollenbrock) for the huge update he made to this project!

## License

(The MIT License)

Copyright (c) 2011 Camilo Tapia<EMAIL_ADDRESS>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: athombv/node-nfc

repo_name: athombv/node-nfc


text:
# gwlf-e
Port of Generalized Watersheds Loading Functions - Enhanced (MapShed)

[![Build Status](https://travis-ci.org/WikiWatershed/gwlf-e.svg?branch=develop)](https://travis-ci.org/WikiWatershed/gwlf-e)

## Installation

Install using `pip`:

```bash
$ pip install gwlf-e
```

## Development

Ensure you have Python 3.9 and [pipenv](https://pipenv.pypa.io/en/latest/) available. Then run:

```bash
$ pipenv sync
```

### Running Locally

```bash
$ pipenv run ./run.py --json test/integrationtests/input_4_output.json test/integrationtests/input_4.gms
```

### Testing

```bash
$ pipenv run nosetests
```

## Deployments

Create a new release using git flow:

```console
$ git flow release start 3.0.0
$ vim CHANGELOG.md
$ vim setup.py
$ git add CHANGELOG.md setup.py
$ git commit -m "3.0.0"
$ git flow release publish 3.0.0
```

Then create a wheel to publish to PyPI using [build](https://github.com/pypa/build):

```console
$ pipenv run python -m build
```

This should create two files under `dist/`:

```console
$ ls -1 dist/
gwlf-e-3.0.0.tar.gz
gwlf_e-3.0.0-cp39-cp39-macosx_11_0_x86_64.whl
```

Then publish the wheel to PyPI using [twine](https://github.com/pypa/twine/) and credentials from LastPass:

```console
$ python -m twine check dist/*
Checking dist/gwlf_e-3.0.0-cp39-cp39-macosx_11_0_x86_64.whl: PASSED
Checking dist/gwlf-e-3.0.0.tar.gz: PASSED
```
```console
$ python -m twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Enter your username: azavea
Enter your password:
Uploading gwlf_e-3.0.0-cp39-cp39-macosx_11_0_x86_64.whl
100%|
Uploading gwlf-e-3.0.0.tar.gz
100%|

View at:
https://pypi.org/project/gwlf-e/3.0.0/
```

Finally, finish the release:

```console
$ git flow release finish -p 3.0.0
```

## License

This project is licensed under the terms of the Apache 2.0 license.

repository: WikiWatershed/gwlf-e

branch_name: refs/heads/develop

gha_language: GAMS

repo_name: WikiWatershed/gwlf-e


text:
---
'astro': major
---

The `astro check` command now requires an external package `@astrojs/check` and an install of `typescript` in your project. This was done in order to make the main `astro` package smaller and give more flexibility to users in regard to the version of TypeScript they use.

repository: tsriram/astro

repo_name: tsriram/astro


text:
---
layout: post
title:  XAP ESM on Rackspace
categories: XAP97
parent: cloud-and-virtualization.html
weight: 200
---

{% compositionsetup %}
{% summary %}This page describes the GigaSpaces Elastic Data Grid deployment on Rackspace using the Elastic Service Manager{% endsummary %}

# Overview

The GigaSpaces [Elastic Service Manager](http://www.gigaspaces.com/wiki/display/XAP71/The+Elastic+Service+Manager) allows a user to deploy a data grid that can scale out and in to meet changing demands. A simple handler interface is used to request additional computing resources and to release ones that are no longer used.
![flow.gif](/attachment_files/flow.gif)

This page describes the ESM integration with the Rackspace Cloud.

## Rackspace Cloud Hosting

Rackspace cloud hosting offers on-demand provisioning of virtual servers. As such, it is an ideal solution for scaling out data intensive applications to meet demand peaks.
For more information, please go to the [Rackspace](http://www.rackspacecloud.com/cloud_hosting_products/servers) web site.

# The GigaSpaces Cloud Enabled Platform

The following presentation was part of a joint GigaSpaces/Rackspace webinar showcasing the integration and included a live demonstration of a GigaSpaces data grid scaling out to new Rackspace servers on demand.
{% slideboomrackspacewebinar %}

# Prerequisites

- Download the GigaSpaces ESM package for Rackspace linked in this page, or get the most up to date version in the OpenSpaces source code repository at: [http://svn.openspaces.org/cvi/trunk/rackspace/](http://svn.openspaces.org/cvi/trunk/rackspace/)

- Set up your Rackspace account and create an API access key (see Rackspace documentation for more details)

- Update the 'rackspace.properties' file with your Rackspace user name and access key.

# Data Grid deployment control flow

{% indent %}
![GigaSpaces Rackace Integration.png](/attachment_files/GigaSpaces Rackace Integration.png)
{% endindent %}

Deployment of a data grid is initiated by connecting to a running instance of the ESM, and requesting a new data grid deployment. From this point on, the ESM controls the provisioning and removal of resources.

Here is the control flow of a typical deployment

1. Client looks up an existing ESM.
1. If an existing machine is not available, a new one is provisioned from the Rackspace cloud. An initialization script downloads all application files and starts a GigaSpaces Agent, Lookup Service, GSM and ESM.
1. Client connects to the ESM via the GigaSpaces [Admin API](http://www.gigaspaces.com/wiki/display/XAP7/Administration+and+Monitoring+API) and requests a new Data Grid deployment, specifying the [scaling handler](http://www.gigaspaces.com/wiki/display/XAP71/Custom+Elastic+Scale+Handler+Example) to use.
1. ESM provisions new servers from the Rackspace cloud as required to meet the grid requirements. If no longer required, the ESM will shut down these machines.

# How to Run the Demo

The project source code includes a demo application called _com.gigaspaces.rackspace.examples.ESMDemo_. This class will initialize a data grid and performs some basic operations on it. This is the best place to start. Here you can change the test grid's settings, like its capacity and availability, and see how they affect the grid deployment.

## The code

{% inittab demo|top %}
{% tabcontent Deploy %}

{% highlight java %}

final Admin admin = new AdminFactory().addLocator(locator).createAdmin();
final String gridName = "myElasticDataGrid";
// Use the Admin API to deploy an elastic grid
final ElasticServiceManager esm = admin.getElasticServiceManagers().waitForAtLeastOne();
final ProcessingUnit pu = esm.deploy(new ElasticDataGridDeployment(gridName)
.elasticScaleHandler(new ElasticScaleHandlerConfig("com.gigaspaces.rackspace.esm.RackspaceElasticHandler")
.addProperty("user", user)
.addProperty("apiKei", apiKey)
.addProperty("machineNamePrefix", "gs-esm-gsa")
.addProperty("gridName", gridName)
).capacity("1G", "2G").highlyAvailable(false).publicDeploymentIsolation()
.maximumJavaHeapSize("250m").initialJavaHeapSize("250m"));
{% endhighlight %}

{% endtabcontent %}
{% tabcontent Handler Interface %}

{% highlight java %}

public interface ElasticScaleHandler {
    public void init(ElasticScaleHandlerConfig config);

    public boolean accept(Machine machine);

    public void scaleOut(ElasticScaleHandlerContext context);

    public void scaleIn(Machine machine);
}
{% endhighlight %}

{% endtabcontent %}
{% endinittab %}

## Seeing it in action

A video file attached to this page shows the demo code in action.

# Considerations

- Rackspace cloud servers are charged at an hourly rate, so it's a good idea to shut down all servers once you are done working with them.

- Rackspace does not currently support public machine images, so installation of the GigaSpaces libraries is performed after a new server has started. This is done by calling a script ('start-esm.sh') that downloads application files from the Rackspace [CloudFiles](http://www.rackspacecloud.com/cloud_hosting_products/files) storage system.
If you wish to make any changes to the deployment, you may want to modify these scripts to fit your needs.

repository: karuna/gigaspaces-wiki-jekyll

extension: markdown

repo_name: karuna/gigaspaces-wiki-jekyll


text:
# FARR MultiMonitor plugin

https://www.donationcoder.com/forum/index.php?topic=13760.0

# Description

The FARR MultiMonitor plugin extends FARR to work better with multiple monitors. FARR's main window currently always shows up on the monitor you moved it to. With the FARR MultiMonitor plugin enabled, FARR's main window will show up on the monitor that contains the currently active window (usually the window of the application you're working in, and also where you're currently looking at) or on the monitor where the mouse currently is.

Additionally, the FARR MultiMonitor plugin can center FARR's main window on the screen.

# Installation

Copy all files into the FarrMultiMonitor plugin directory (usually `C:\Program Files\FindAndRunRobot\Plugins\FarrMultiMonitor`) and restart FARR.

# Options

- Display FARR on active monitor: enables / disables multi monitor support
- Move relative: moves FARR relative to the screen resolution, e.g. if FARR is 1/3 from the left on monitor 1, it will be 1/3 from the left on monitor 2 as well, even if the screen resolutions of the two monitors are not the same
- Resize relative: resizes FARR relative to the screen resolution, e.g. if FARR takes 1/3 of the screen on monitor 1, it will take 1/3 on the screen of monitor 2, even if the screen resolutions of the two monitors are not the same
- Display on monitor where mouse is: displays FARR's main window on the monitor where the mouse is no matter which application is currently active

- Center FARR when it appears: will center FARR horizontally, as well as vertically, when it appears
- and whenver it changes size: will center FARR whenever its size changes

- Enable hotkeys: enable moving FARR window to next/last monitor and centering with hotkeys
    * Win + Left                  : move FARR window to monitor on the left
    * Win + Right                 : move FARR window to monitor on the right
    * Win + Home                  : center FARR window
    * Win + Ctrl + 1 .. 0         : resize FARR window to 10% .. 100% of current screen's width
    * Win + Ctrl + Shift + 1 .. 0 : resize FARR window to 10% .. 100% of current screen's height

# Credits

The icon is a modified version of one taken from here: http://www.visualpharm.com/

repository: phitsc/farrmultimonitor

repo_name: phitsc/farrmultimonitor


text:
---
title: "Set a server's metadata"
description: "Set a server's metadata"
date: "2015-03-23"
classes: ["SoftLayer_Hardware_Server"]
tags:
    - "server"
    - "metadata"
---

```python
import SoftLayer
from pprint import pprint as pp

# CHANGE ME
server = 678243

client = SoftLayer.Client()

mask = "mask[attributes]"

# Sets the metadata for this server to tttttt
result1 = client['SoftLayer_Hardware_Server'].setUserMetadata({'value': 'tttttt'},id=server)
pp(result1)

result2 = client['SoftLayer_Hardware_Server'].getObject(mask=mask,id=server)

pp(result2)
```


text:
[<< Back to index](index.md)

# Architecture

## Basics

Basically the whole API is nothing more than a tree of object. Each endpoint is a tree node.

The root node has more methods than its children and is treated a bit differently.

When endpoint() method (or any of the convenience methods like post() or get() ) are called on a node, it will instantiate a new RipApiEndpoint class, set its parent to the node the method was called on and return the new node for chaining purposes.

Usually you will call end() method after adding a new endpoint (node). end() method simply returns node's parent.

This allows you to easily chain and stack endpoints.

Each endpoint can be called as a function. This will return a promise which will be resolved by $http.

## Headers

Each endpoint can have a set of headers attached to it. This is called by calling header() or addHeaders() methods.

When calling an endpoint, it will pickup all the parent headers. So lets say if you have this configuration:

    $apiProvider
        .get('deep').header('Custom-Header', 'Custom').header('Other-Header', 'Other')
            .get('deeper').header('More-Header', 'More')
                .get('deepest').header('Custom-Header', 'Deepest').header('Last-Header', 'Last').end()
            .end()
        .end()
    ;

The endpoint 'deepest' will have the following headers:

    Custom-Header: Deepest
    Other-Header: Other
    More-Header: More
    Last-Header: Last

As you may have noticed the 'deepest' endpoint overrides Custom-Header defined in 'deep' endpoint. Other headers are picked up

## Fields and strict endpoints

Each endpoint can have fields defined. By default the body of the request sends everything you throw at it. This may not always be desired.

If you want request body to include only defined fields, set your endpoint to be strict

    $apiProvider
        .post('user')
            .addFields({
                username: 'text',
                password: 'text'
            })
            .setStrict()
        .end()

Now if you call this endpoint with many parameters, it will send only username and password fields

    // Will only send send username and password as this is configured as strict
    $api('user')(null, {
        field1: 'bla bla',
        username: 'usr',
        other: true,
        something: false,
        password 'pass',
        foo: 'bar'
    });

Though I do discourage this approach as it will limit refactoring speeds

repository: jarekskuder/Angular-API

repo_name: jarekskuder/Angular-API


text:
---
sidebar_position: 3
---

# Architecture

This Operator is written in Go with help of the [Operator-SDK](https://sdk.operatorframework.io/).

## Package organization

![System architecture organization in packages](/img/diagrams/03_system_diagram.png)

### Controller

The `controllers` package is responsible for binding the business rules of the Operator with the
business rules dictated by the stored procedures and for communicating with the Kubernetes API by
reconciling inbound requests triggered by events. This is where the main logic lives.

### Kubernetes API extensions

Folder `apis` contains 3 distinct packages, `config/v1`, `database/v1` and `databaseclass/v1`. They contain
the types related to the extension applied to the Kubernetes API, i.e. they contain the types of the new
API objects. They are the entities and contain no business logic. They can be reused freely throughout
the application. Each of these 3 packages contain two other files as well: groupversion_info.go
contains information relative to the versioning of the resources and is used by the Kubernetes API,
while zz_generated.deepcopy.go contains autogenerated code by the Operator SDK used to allow
serialization from and to the Kubernetes API and the Operator. These two files can be found in the
other 2 subpackages as well. Each of the aforementioned packages have their relative Custom Resource
Definition (CRD) configuration file.

### Core packages

Folder `pkg` is, by Go convention, a folder which is supposed to contain packages that can be imported freely,
i.e. it should not contain any global variables, and it is not tightly coupled with a
single implementation. It contains 4 packages:
- Package `database` contains all the code relative to the database. It contains the DBMS drivers used
  to communicate with the DBMS solutions, as well as the types abstracting the various operations,
  input/output rendering and so on.

![Database driver organizations](/img/diagrams/04_system_diagram.png)

- Package `pool` contains the code relative to the DBMS connection pool. It only holds the DBMS drivers
  structs responsible for communicating with the DBMS endpoints.
- Package `test` contains some utility code useful for testing.
- Package `typeutil` contains constants and very generic utility functions (boilerplate). Constants are
  mainly useful for avoiding hard-coding error messages etc.

During the course of the project, it was attempted to build a robust system architecture by following
software engineering principles, especially the SOLID principles.

### Command line interface

Package `cmd` contains the code relative to the command line interface of the Operator such as reading
command line flags, activating/deactivating functionalities, starting the controller and the webhooks,
initializing the logger, creating the pool of DBMS connection and so forth. We make use of the excellent
[Viper](https://github.com/spf13/viper) library to load flags and configuration files and
[Cobra](https://github.com/spf13/cobra) for the actual CLI implementation.

### Internal

Folder `internal` is, by Go convention, a package which cannot be imported from outside this project.
It contains the package `logging` which contains customized logger implementations for the Operator.
We use [zap](https://github.com/uber-go/zap) for the logging back-end and [logr](https://github.com/go-logr/logr) as a
front-end (façade).

repository: grooverdan/kubernetes-dbaas

repo_name: grooverdan/kubernetes-dbaas


text:
# <img src="/share/blt/logo/blt_logo.png?raw=true" width="128" valign="middle" alt="BLT"/> v0.2

[![Build Status](https://travis-ci.org/LLNL/blt.svg)](https://travis-ci.org/LLNL/blt)
[![Build Status](https://ci.appveyor.com/api/projects/status/fuaftu9mvp0y488j/branch/master?svg=true)](https://ci.appveyor.com/project/cyrush/blt/branch/master)
[![Documentation Status](https://readthedocs.org/projects/llnl-blt/badge/?version=latest)](https://llnl-blt.readthedocs.io/en/latest/?badge=latest)

A streamlined CMake build system foundation for developing HPC software

User Tutorial
---------------------

https://llnl-blt.readthedocs.io/en/latest/

Questions
---------

Any questions can be sent to<EMAIL_ADDRESS>
Authors
-------

Developers include:

 * Chris White<EMAIL_ADDRESS> * Kenneth Weiss<EMAIL_ADDRESS> * Cyrus Harrison<EMAIL_ADDRESS> * George Zagaris<EMAIL_ADDRESS> * Lee Taylor<EMAIL_ADDRESS> * Aaron Black<EMAIL_ADDRESS> * David A. Beckingsale<EMAIL_ADDRESS> * Richard Hornung<EMAIL_ADDRESS> * Randolph Settgast<EMAIL_ADDRESS>
Release
-------

Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC.

Produced at the Lawrence Livermore National Laboratory.

All rights reserved.

Unlimited Open Source - BSD Distribution

For release details and restrictions, please read the LICENSE.txt file.
It is also linked here:
- [LICENSE](./LICENSE)

`LLNL-CODE-725085`  `OCEC-17-023`

repository: cdwdirect/cleverleaf

repo_name: cdwdirect/cleverleaf


text:
> See the  [commit history](https://github.com/futagoza/gulp/commits/master) for a full list of changes.

## goals

* Add `--only` and `--ignore` to `@futagoza/sync-yarn-workspaces`
* Add a JSON reading, formatting and writing package
* Update `@futagoza/gulp-bump` to operate on `package.json` files only

## [v0.6.0](https://github.com/futagoza/gulp/compare/v0.5.1...v0.6.0) _(2018-10-04)_

* Added `@futagoza/create-stream`, a non-gulp package
* Added `@futagoza/pump`, an optional gulp package
* Added `@futagoza/child-process`, a non-gulp package
* Set `@futagoza/gulp` to use `@futagoza/child-process`
* Set `@futagoza/node-run` to use `@futagoza/child-process`
* Set `@futagoza/publish-package` to use `@futagoza/child-process`
* Added `@futagoza/gulpx`, a custom variant of the Gulp client and the Gulp CLI
* Added `@futagoza/sync-yarn-workspaces`, a non-gulp package
* Added the `checkVersion` option to `@futagoza/publish-package`
* Updated `@futagoza/gulp-publish-package` to use the new `checkVersion` option
* Updated the behavior of the `--only` option for `@futagoza/gulp-*`
* Added the `--ignore` flag to `@futagoza/gulp-*`
* Updated documentation for some `@futagoza/*` packages
* Bumped  __@futagoza/child-process__ to _v1.0.0_
* Bumped  __@futagoza/cli-utils__ to _v1.5.1_
* Bumped  __@futagoza/create-stream__ to _v1.0.0_
* Bumped  __@futagoza/pump__ to _v1.0.0_
* Bumped  __@futagoza/gulpx__ to _v1.0.0_
* Bumped  __@futagoza/node-run__ to _v2.0.0_
* Bumped  __@futagoza/publish-package__ to _v1.6.0_
* Bumped  __@futagoza/sync-yarn-workspaces__ to _v1.0.0_
* Bumped  __@futagoza/gulp-bump__ to _v0.6.0_
* Bumped  __@futagoza/gulp-publish-package__ to _v0.6.0_

## [v0.5.1](https://github.com/futagoza/gulp/compare/v0.5.0...v0.5.1) _(2018-09-26)_

* Fix: upgrade `@futagoza/*` dependencies from `0.4.x` to `0.5.x`

## [v0.5.0](https://github.com/futagoza/gulp/compare/v0.4.1...v0.5.0) _(2018-09-26)_

* Clarify documentation
* Added `@futagoza/cli-utils`, a non-gulp package
* Updated `@futagoza/gulp-bump` to use `@futagoza/cli-utils`
* Updated `@futagoza/gulp-publish-package` to use `@futagoza/cli-utils`
* `@futagoza/gulp` now exports `@futagoza/cli-utils`
* Added conditional support via the `--only` option

## [v0.4.1](https://github.com/futagoza/gulp/compare/v0.4.0...v0.4.1) _(2018-09-23)_

* Fix: upgrade `@futagoza/*` dependencies from `0.3.x` to `0.4.x`

## [v0.4.0](https://github.com/futagoza/gulp/compare/v0.3.3...v0.4.0) _(2018-09-22)_

* Imported the code and dependencies from `gulp-bump` into `@futagoza/gulp-bump`
* Overhaul the documentation for `@futagoza/gulp-bump`
* Fix repository field for `@futagoza/gulp-publish-package`
* Added `@futagoza/publish-package`, a non-gulp package
* Set `@futagoza/gulp-publish-package` to use `@futagoza/publish-package`

## [v0.3.3](https://github.com/futagoza/gulp/compare/v0.3.2...v0.3.3) _(2018-09-21)_

* Added `@futagoza/gulp-publish-package`
* Set `@futagoza/gulp/publish` to export `@futagoza/gulp-publish-package`

## [v0.3.2](https://github.com/futagoza/gulp/compare/v0.3.1...v0.3.2) _(2018-09-20)_

* Added `@futagoza/node-run`, a non-gulp package
* Set `@futagoza/gulp/exec` to export `@futagoza/node-run`
* Updated documentation for `@futagoza/gulp*` packages

## [v0.3.1](https://github.com/futagoza/gulp/compare/v0.3.0...v0.3.1) _(2018-09-20)_

* Added `@futagoza/gulp-bump`
* Set `@futagoza/gulp/bump` to export `@futagoza/gulp-bump`

## [v0.3.0](https://github.com/futagoza/gulp/compare/v0.2.0...v0.3.0) _(2018-09-20)_

* Added `@futagoza/gulp/publish`

## [v0.2.0](https://github.com/futagoza/gulp/compare/v0.1.0...v0.2.0) _(2018-09-20)_

* Handle options for `@futagoza/gulp/bump` more cleanly.
* Clarified documentation on `@futagoza/gulp/bump`
* Added main file<EMAIL_ADDRESS>* Added `@futagoza/gulp/exec`

## [v0.1.0](https://github.com/futagoza/gulp/commits/v0.1.0) _(2018-09-19)_

* Initial release.
* Added `@futagoza/gulp/bump`

repository: futagoza/gulp

gha_language: JavaScript

repo_name: futagoza/gulp


text:
# Ninject for Prism for Xamarin.Forms Demo

Demo project for my blog post on using [Ninject with Prism for Xamarin Forms](http://www.alteridem.net/2016/01/03/using-ninject-for-prism-for-xamarin-forms/).

This is the default project created by the [Prism Template Pack](https://visualstudiogallery.msdn.microsoft.com/e7b6bde2-ba59-43dd-9d14-58409940ffa0) converted to used Ninject instead of Unity as the IoC container.

repository: rprouse/PrismNinjectDemo

repo_name: rprouse/PrismNinjectDemo


text:
## Introduction and Demo

Hi there! I'm Liem, I'm from VietNam. I had 4 months to get familier with programming languages, specifically Swift and platform Xcode. I think it's very great, beautiful and especially easy to read. So I developed an app called "Daily Life". Let's watch it below:

![mainPic](https://user-images.githubusercontent.com/47914998/64059669-3648bb00-cbeb-11e9-9b45-4e2a7b825e86.jpg)

![ezgif com-resize](https://user-images.githubusercontent.com/47914998/64061206-7c107e00-cc01-11e9-8b8e-64d1727fd6cb.gif)

## Description

 DailyLife is an App in IOS. Yes of course! It's all about news. It can supply many articles from the popular sources such as cnn.com, nytimes.com, vice.com... . It also give us the information of forecast weather based on GPS or specificed Cities. Additionally, it also have the World Clock functionality to give us the timezone of some city. All that information that it get are from the server through API:

* Forecast weather: Darksky API, Apixu API.

* News: NewsApi

The design of this app is familiar, easy to read with the user. The basic colors are yellow and black which are model.

I'm converting the App from MVC to MVVM... .App will be updated continuously

## Feature

- Bringing newest artilces from popular sources in the world with 12 subjects at Home Tab.

- You can search the articles which relate to your typing-keyword at search-button placed at the center of Tabbar.

- You can like or share whatever articles by touching the like-button or share-button, and all that articles will be in your Liked Tab.

- Information about forecast weather based on your GPS-device or specificed Cities at Forecast Tab.

- The convenience of transition to bring your best experiment.

- Timezone of standard cities in the world at World Clock Tab.

## Author

DailyLife app made by me.

## License

I used some Api to supply  data resources such as DarkSkyApi, ApixuApi and NewsApi.

repository: lygialiem/DailyLifeVesionMVVM

gha_language: Swift

repo_name: lygialiem/DailyLifeVesionMVVM


text:
# Groups

## To create a group
1. Press the green button on the Groups page
  -> JC Group can be a Group of Systems (GoS) or a Group of Users (GoU)

  ### GoS
  2. Create group name
  3. Select systems to add to GoS

  ### GoU
  2. Create group name
  3. Select users to add to GoU

    New-JCUserGroup 'TV Characters'

## Bind GoU to GoS
  -> This allows GoU to be added as users on all GoS
    -> Any additional systems added to the GoS will also have the GoU accounts created on them.

repository: SambaTV/Meraki

repo_name: SambaTV/Meraki


text:
---
title: An auto complete combo box implementation
disqus_identifier: 2003-04-an-auto-complete-combo-box-implementation
comments: true
---

Continuing on my previously stated goal of giving back to the development community from which I have received so much, I have submitted another article to [codeproject.com][1].

The [article][2] details an implementation of an auto complete combo box in C#. Chris Maunder provided a starting point with his article about creation of a similar control in MFC. I had the requirements of using completely managed code, hence the creation of this C# version.

An addition that I made to my code was firing of a CancelEventHandler in the case that the LimitToList property is set to true. This allows the developer to perform some functions if the user enters some text that is not consistent with the list of items for the combobox.

``` csharp
using System;
using System.Windows.Forms;
using System.ComponentModel;

namespace MattBerther.Controls
{
    public class AutoCompleteComboBox : System.Windows.Forms.ComboBox
    {
        public event System.ComponentModel.CancelEventHandler NotInList;

        private bool _limitToList = true;
        private bool _inEditMode = false;

        public AutoCompleteComboBox() : base()
        {
        }

        [Category("Behavior")]
        public bool LimitToList
        {
            get { return _limitToList; }
            set { _limitToList = value; }
        }

        protected virtual void OnNotInList(System.ComponentModel.CancelEventArgs e)
        {
            if (NotInList != null)
            {
                NotInList(this, e);
            }
        }

        protected override void OnTextChanged(System.EventArgs e)
        {
            if (_inEditMode)
            {
                string input = Text;
                int index = FindString(input);

                if (index >= 0)
                {
                    _inEditMode = false;
                    SelectedIndex = index;
                    _inEditMode = true;
                    Select(input.Length, Text.Length);
                }
            }

            base.OnTextChanged(e);
        }

        protected override void OnValidating(System.ComponentModel.CancelEventArgs e)
        {
            if (this.LimitToList)
            {
                int pos = this.FindStringExact(this.Text);

                if (pos == -1)
                {
                    OnNotInList(e);
                }
                else
                {
                    this.SelectedIndex = pos;
                }
            }

            base.OnValidating(e);
        }

        protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)
        {
            _inEditMode = (e.KeyCode != Keys.Back && e.KeyCode != Keys.Delete);
            base.OnKeyDown(e);
        }
    }
}
```

[1]:http://www.codeproject.com
[2]:http://www.codeproject.com/cs/combobox/csautocomplete.asp


text:
---
jupyter:
  jupytext:
    formats: notebooks//ipynb,markdown_files//md,python_scripts//py:percent
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.1'
      jupytext_version: 1.2.1
  kernelspec:
    display_name: Python 3
    language: python
    name: python3
---

```python deletable=true editable=true
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
```

# Pipelining estimators

In this section we study how different estimators maybe be chained.

## A simple example: feature extraction and selection before an estimator

### Feature extraction: vectorizer

For some types of data, for instance text data, a feature extraction step must be applied to convert it to numerical features.
To illustrate we load the SMS spam dataset we used earlier.

```python deletable=true editable=true
import os

with open(os.path.join("datasets", "smsspam", "SMSSpamCollection")) as f:
    lines = [line.strip().split("\t") for line in f.readlines()]
text = [x[1] for x in lines]
y = [x[0] == "ham" for x in lines]
```

```python deletable=true editable=true
from sklearn.model_selection import train_test_split

text_train, text_test, y_train, y_test = train_test_split(text, y)
```

Previously, we applied the feature extraction manually, like so:

```python deletable=true editable=true
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression

vectorizer = TfidfVectorizer()
vectorizer.fit(text_train)

X_train = vectorizer.transform(text_train)
X_test = vectorizer.transform(text_test)

clf = LogisticRegression()
clf.fit(X_train, y_train)

clf.score(X_test, y_test)
```

The situation where we learn a transformation and then apply it to the test data is very common in machine learning.
Therefore scikit-learn has a shortcut for this, called pipelines:

```python deletable=true editable=true
from sklearn.pipeline import make_pipeline

pipeline = make_pipeline(TfidfVectorizer(), LogisticRegression())
pipeline.fit(text_train, y_train)
pipeline.score(text_test, y_test)
```

As you can see, this makes the code much shorter and easier to handle. Behind the scenes, exactly the same as above is happening.

After the first step is fit, it will use the ``transform`` method of the first step to create a new representation.
This will then be fed to the ``fit`` of the next step, and so on.
Finally, on the last step, only ``fit`` is called.

![pipeline](figures/pipeline.svg)

If we call ``score``, only ``transform`` will be called on each step - this could be the test set after all! Then, on the last step, ``score`` is called with the new representation. The same goes for ``predict``.

Building pipelines not only simplifies the code, it is also important for model selection.
Say we want to grid-search C to tune our Logistic Regression above.

Let's say we do it like this:

```python deletable=true editable=true
# This illustrates a common mistake. Don't use this code!
from sklearn.model_selection import GridSearchCV

vectorizer = TfidfVectorizer()
vectorizer.fit(text_train)

X_train = vectorizer.transform(text_train)
X_test = vectorizer.transform(text_test)

clf = LogisticRegression()
grid = GridSearchCV(clf, param_grid={'C': [.1, 1, 10, 100]}, cv=5)
grid.fit(X_train, y_train)
```

### What did we do wrong?

Here, we did grid-search with cross-validation on ``X_train``. However, when applying ``TfidfVectorizer``, it saw all of the ``X_train``,
not only the training folds! So it could use knowledge of the frequency of the words in the test-folds. This is called "contamination" of the test set, and leads to too optimistic estimates of generalization performance, or badly selected parameters.
We can fix this with the pipeline, though:

```python deletable=true editable=true
from sklearn.model_selection import GridSearchCV

pipeline = make_pipeline(TfidfVectorizer(),
                         LogisticRegression())

grid = GridSearchCV(pipeline,
                    param_grid={'logisticregression__C': [.1, 1, 10, 100]}, cv=5)

grid.fit(text_train, y_train)
grid.score(text_test, y_test)
```

Note that we need to tell the pipeline where at which step we wanted to set the parameter ``C``.
We can do this using the special ``__`` syntax. The name before the ``__`` is simply the name of the class, the part after ``__`` is the parameter we want to set with grid-search.

Another benefit of using pipelines is that we can now also search over parameters of the feature extraction with ``GridSearchCV``:

```python deletable=true editable=true
from sklearn.model_selection import GridSearchCV

pipeline = make_pipeline(TfidfVectorizer(), LogisticRegression())

params = {'logisticregression__C': [.1, 1, 10, 100],
          "tfidfvectorizer__ngram_range": [(1, 1), (1, 2), (2, 2)]}
grid = GridSearchCV(pipeline, param_grid=params, cv=5)
grid.fit(text_train, y_train)
print(grid.best_params_)
grid.score(text_test, y_test)
```

    EXERCISE:

      Create a pipeline out of a StandardScaler and Ridge regression and apply it to the Boston housing dataset (load using ``sklearn.datasets.load_boston``). Try adding the ``sklearn.preprocessing.PolynomialFeatures`` transformer as a second preprocessing step, and grid-search the degree of the polynomials (try 1, 2 and 3).

```python deletable=true editable=true
# %load solutions/15A_ridge_grid.py
```


text:
# bundle-less

Compiles LESS, autoprefixes and minifies the resulting CSS, creates a source map.

## How it works

This module compiles LESS code provided as a string into CSS. It can optionally add vendor prefixes using [autoprefixer](https://www.npmjs.com/package/autoprefixer) and minify the resulting CSS using [csswring](https://www.npmjs.com/package/csswring). It also creates a fully functional source map. The produced source map will contain all source content, so there is no need to host the source files.

## Usage

Use [npm](http://npmjs.org) to install it:

~~~sh
npm install bundle-less --save-dev
~~~

Then use it like this:

~~~js
var bundleLess = require('bundle-less');

// call `bundleLess` providing your LESS source code and an options object:
var promise = bundleLess('body { margin: 0; }', {
  from: 'styles.less',
  to: 'styles.css',
  csswring: { removeAllComments: true },
  autoprefixer: { browsers: ['last 3 versions'] }
});

// the returned promise resolves to an object containing CSS and source map:
promise.then(function (result) {
  fs.writeFileSync('styles.css', result.css);
  fs.writeFileSync('styles.css.map', result.map);
});
~~~

## Options

### from

Absolute or relative path to the LESS file (does not have to exist, it is just used for import resolution and source map generation).

### to

Absolute or relative path to the output CSS file (will not be written, it is just used for source map generation).

### base

Absolute or relative path to the "server" roor folder (used for source map generation).

### sourceRoot

Will be prepended to each source file within the source map. This option is optional, the default value is the empty string.

### less

Options object that will get passed to the [LESS](http://lesscss.org/) compiler. The file name and source map options will be overridden by this module. This option is optional, if omitted, the default options will be used.

### csswring

Options object that will get passed to csswring. Available options can be found [here](https://www.npmjs.com/package/csswring#options). This option is optional, if omitted, the CSS will not be minified.

### autoprefixer

Options object that will get passed to autoprefixer. Available options can be found [here](https://www.npmjs.com/package/autoprefixer-core#usage). This option is optional, if omitted, no vendor prefixes will be added.

### embedErrors

Optional. If truthy, in case of an error, instead of rejecting the returned promise, the output CSS will contain an error notification (source map will be empty). This is provided for development workflows to give early feedback inside the browser about style errors.

## Changelog

__0.0.3__ Fix package keywords

__0.0.2__ Add optional error notification output

__0.0.1__ Initial version

---
Licensed under the MIT license

repository: ahelmberger/bundle-less

repo_name: ahelmberger/bundle-less


text:
###

Consider customizing prompt?
https://ohmyposh.dev/docs/installation/customize
definitely get rid of whatever the first symbol in the git block is

### Install Mono (Valheim/Bepinex plugins)

```sh
# https://www.mono-project.com/download/stable/#download-lin
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

sudo apt install mono-devel mono-dbg
```

### Install Tailscale

# https://pkgs.tailscale.com/stable/#ubuntu-jammy

# Add Tailscale's GPG key

sudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null

# Add the tailscale repository

curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list

# Install Tailscale

sudo apt-get update && sudo apt-get install tailscale

# Start Tailscale!

sudo tailscale up

### Add RockyLinux/CentOS distro?

- I like ubuntu, but AWS and work like RHEL-flavors

### Updates

- enable systemd https://medium.com/geekculture/run-docker-in-windows-10-11-wsl-without-docker-desktop-a2a7eb90556d
- https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/

- defer dns to systemd-resolved
  - https://tailscale.com/kb/1188/linux-dns/

- try out the exit trap pattern
  - http://redsymbol.net/articles/bash-exit-traps/?ck_subscriber_id=512835461

- cody (appimage so need to `sudo apt install libfuse2`)
  - https://sourcegraph.com/.api/app/latest?arch=x86_64&target=linux (this redirects to a github release)
  - might need gWSL? Not sure how to utilize this remotely then... :(
  - oh i didn't have `libgl1-mesa-dev libharfbuzz-dev libthai-dev` installed

- .bin/.linuxbrew are getting on the path multiple times

repository: MetricMike/dev-environment

repo_name: MetricMike/dev-environment


text:
---
layout: post
title: "Map transformation in clojure 1/2"
description: "First chapter about how to modify maps in clojure: assoc, dissoc and merge"
category: programming
tags: [clojure, map, maps, clojure map, assoc, dissoc, merge]
excerpt: "First chapter about how to modify maps in clojure: assoc, dissoc and merge"
---
{% include JB/setup %}

Here it's another chapter of the series about clojure map.

For those who missed the previous chapter:

*   [First general introduction about clojure maps]({% post_url 2014-09-12-clojures-maps-overview %})

*   [Create Maps Overview of: hash-map, array-map, zipmap, sorted-map and sorted-map-by]({% post_url 2014-09-15-create-clojure-map-advanced-methods-part-1 %})

*   [Create Maps Overview of: bean, frequencies, group-by, clojure.set/index]({% post_url 2014-09-16-create-clojure-map-advanced-methods-part-2 %})

*   [Read Clojure Map 1/2: get, get-in, contains?, find]({% post_url 2014-09-23-read-clojure-map-values-12%})

*   [Read Clojure Map 2/2: keys, vals, select-keys]({% post_url 2014-09-28-read-clojure-map-values-22 %})

Let's keep going in our journey about clojure map.

In the next chapters I am going to talk about how to modify clojure maps.

As you may know in Clojure we usually don't "modify" anything but we rather return a new value.

Let's explore what function clojure.core gives us to modify maps.

The easiest function to start with is definitely

## assoc

Given a map, a key and a value `assoc`(ciate) add the key and the respective value to the map.

{% highlight clojure %}

user> (assoc {:a 1 :b 2} :c 3)
{:c 3, :b 2, :a 1}
{% endhighlight %}

As you may guess `assoc` can take more than just a couple of `:keys value`.

{% highlight clojure %}

user> (assoc {:a 1 :b 2} :c 3 :d 4)
{:d 4, :c 3, :b 2, :a 1}
user> (assoc {:a 1 :b 2} :c 3 :d 4 :e 5)
{:e 5, :d 4, :c 3, :b 2, :a 1}
{% endhighlight %}

It is important is that you don't forget to provide an even number of argument after the map.

{% highlight clojure %}

user> (assoc {:a 1 :b 2} :c 3 :d)
IllegalArgumentException assoc expects even number of arguments after map/vector, found odd number  clojure.core/assoc (core.clj:192)
{% endhighlight %}

You may also wonder what happens if you try to `assoc` to an already existing key.

{% highlight clojure %}

user> (assoc {:a 1 :b 2} :a "new-value")
{:b 2, :a "new-value"}
{% endhighlight %}

As we can see `assoc` will reset (update) the old value to the new one.

`assoc` is a perfectly legitimate way to update old values in a clojure map.

If `assoc` will make our maps bigger

## dissoc

will make them smaller.

As you may have already guessed `dissoc`(ciate) will remove a map entry from our maps.

It works exactly like `assoc`.

{% highlight clojure %}

user> (dissoc {:a 1 :b 2 :c 3} :a)
{:c 3, :b 2}
{% endhighlight %}

If you pass more arguments it will remove more map entries

{% highlight clojure %}

user> (dissoc {:a 1 :b 2 :c 3} :a :b)
{:c 3}
{% endhighlight %}

Also note that `dissoc` a not existing key is a valid behavior, dissoc will eliminate the map entry, which does not exist and will return the (not) updated map.

{% highlight clojure %}

user> (dissoc {:a 1 :b 2 :c 3} :d :e :f)
{:c 3, :b 2, :a 1}
{% endhighlight %}

## merge

Another very useful function is `merge` which, as you may have guessed, merge two or more different maps into one.

{% highlight clojure %}

user> (merge {:a 1 :c 3} {:b 2 :d 4})
{:d 4, :b 2, :c 3, :a 1}
user> (merge {:a 1 :c 3} {:b 2 :d 4} {:foo "foo" :bar :bar})
{:foo "foo", :bar :bar, :d 4, :b 2, :c 3, :a 1}
{% endhighlight %}

`merge` is very simple to reason about, but there is a little detail to keep in mind.

What happens if there is a key collision (if we try to merge two maps with some keys in common) ?

Fortunately this case is documented and made clear in the spec.

In case of key collision the resulting element will be the later to appear.

{% highlight clojure %}

user> (merge {:a 1} {:a 2})
{:a 2}
user> (merge {:a 1 :b 1} {:a 2 :c 2} {:c 3 :b 3})
{:c 3, :b 3, :a 2}
{% endhighlight %}

## end

In the next chapter we are going to explore some function a little more complex, function such as `update-in` and `merge-with`.

As always stay tuned and for any question please don't hesitate to write me or to comment bellow.


text:
# Budget Tracker

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Demo
![Budget App Home](public/icons/budget-tracker-screenshot.png)

## Description

AS AN avid traveller
I WANT to be able to track my withdrawals and deposits with or without a data/internet connection
SO THAT my account balance is accurate when I am traveling

* [Installation](#installation)
* [Usage](#usage)
* [Contributing](#usage)
* [Test](#test)
* [Questions](#questions)
* [License](#license)

## Installation

Fork repository at [jennala github](https://github.com/jennalala/budgetTracker) .

-npm init -y

-npm i express

-npm i mongoose

-npm i morgan

-npm i compression

## Usage

This application allows for the user to track their money and allowing them to access that information anytime, online or offline. Having offline functionality is paramount to this applications success. The user can also download this application onto their phone as an app as well.

## Contributors

Starter code was from the Georgia Tech Full Stack Web Development Program.

a huge "thank you!" to [Jonathon J. Watson](https://github.com/jonathanjwatson) whom was critical in the process of creating this application.

## Contributing

A user can contribute to this website by making the UI friendlier.

## Links
Deployed: https://stormy-cliffs-38561.herokuapp.com/
Repo: https://github.com/jennalala/budgetTracker

## Questions

####  **Jenna LaFrancois**
*  **Github:** [@jennalala](https://github.com/jennalala)
*  **Email:** [jenna.lafrancois<EMAIL_ADDRESS>

repository: jennalala/budgetTracker

repo_name: jennalala/budgetTracker