text:
### Scope
This document share which are the commands and validations needed to passed all acceptance criteria for the manual system acceptance test.
It covers support for use case of:
* Red Hat Enterprise Linux version 8, 7 and 6
* CentOs version 8, 7, 6

### Setup
- For [RHEL 6](https://app.vagrantup.com/generic/boxes/rhel6) or [CentOs 6](https://app.vagrantup.com/generic/boxes/centos6):
    ```shell script
    $ sudo curl -o /etc/yum.repos.d/newrelic-infra.repo http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent/linux/yum/el/6/x86_64/newrelic-infra.repo
    ```
- For [RHEL 7](https://app.vagrantup.com/generic/boxes/rhel7) or [CentOs 7](https://app.vagrantup.com/generic/boxes/centos7):
    ```shell script
    $ sudo curl -o /etc/yum.repos.d/newrelic-infra.repo http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
    ```
- For [RHEL 8](https://app.vagrantup.com/generic/boxes/rhel8) or [CentOs 8](https://app.vagrantup.com/generic/boxes/centos8):
    ```shell script
    $ sudo curl -o /etc/yum.repos.d/newrelic-infra.repo http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repo
    ```

### Test suit
#### Scenario 1. Package naming follow dist convention
Lookup at apt repository folder and compare package under test with the previous package version name. \
e.g.: [YUM v8 Repository folder](http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent/linux/yum/el/8/x86_64/) \
package under test version: 1.16.1, name: newrelic-infra-1.16.1-1.el8.x86_64.rpm \
previous package version: 1.16.0, name: newrelic-infra-1.16.0-1.el8.x86_64.rpm

#### Scenario 2. Package contains all required files
Review file managed by package and compare with previous package version.
```shell script
$ repoquery -l newrelic-infra --installed
```
e.g: RHEL 6 output:
```shell script
/etc/init.d/newrelic-infra
/etc/init/newrelic-infra.conf
/etc/newrelic-infra/integrations.d/docker-config.yml
/usr/bin/newrelic-infra
/usr/bin/newrelic-infra-ctl
/usr/bin/newrelic-infra-service
/var/db/newrelic-infra/LICENSE.txt
/var/db/newrelic-infra/custom-integrations
/var/db/newrelic-infra/integrations.d
/var/db/newrelic-infra/newrelic-integrations/bin/nri-docker
/var/db/newrelic-infra/newrelic-integrations/bin/nri-flex
/var/db/newrelic-infra/newrelic-integrations/bin/nri-prometheus
/var/log/newrelic-infra
/var/run/newrelic-infra
```

#### Scenario 3. Check agent version
Check if version number is well inform.
```shell script
$ newrelic-infra -version
```
expected output:
```shell script
> New Relic Infrastructure Agent version: 1.16.1, GoVersion: go1.14.4, GitCommit: ...
```

#### Scenario 4. Service is working
Check if agent is running and sending metrics to NR.
```shell script
$ sudo systemctl show newrelic-infra --no-page|grep SubState=running
```
expected output:
```shell script
> SubState=running
```

Platform validation:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT count(*) from SystemSample where displayName = '${DISPLAY_NAME}'"
```
e.g. expected output:
```json
[
  {
    "agentName": "Infrastructure",
    "agentVersion": "1.16.1",
    "displayName": "centos7-test",
    "linuxDistribution": "CentOS Linux 7 (Core)"
  }
]
```
note: CentOS6 and RHEL6 run `$ sudo initctl status newrelic-infra` instate.

#### Scenario 5. Package metadata is valid
Review if basic metadata is in place.
```shell script
$ sudo yum info newrelic-infra -q
```
e.g: expected output:
```shell script
Installed Packages
Name        : newrelic-infra
Arch        : x86_64
Version     : 1.16.11
Release     : 1.el7
Size        : 112 M
Repo        : installed
From repo   : newrelic-infra
Summary     : New Relic Infrastructure Agent
URL         : https://docs.newrelic.com/docs/release-notes/infrastructure-release-notes/infrastructure-agent-release-notes
License     : Copyright (c) 2008-2021 New Relic, Inc. All rights reserved.
Description : New Relic Infrastructure provides flexible, dynamic server monitoring. With real-time data collection and
            : a UI that scales from a handful of hosts to thousands, Infrastructure is designed for modern Operations
            : teams with fast-changing systems.
```

#### Scenario 6. Package signature is valid
Adding a repository in YUM is a manual operation, which consists in creating a file with the .repo extension under the folder /etc/yum.repos.d.
The file must contain all the information about the custom repository that we are connecting to, therefore in setup step we already downloading the GPG.
What You can check if it was correctly added to rpm:
```shell script
$ rpm -qa gpg-pubkey --qf "%{summary}\n" | grep infrastructure-eng
```
expected output:
```shell script
gpg(infrastructure-eng<EMAIL_ADDRESS>```

#### Scenario 7. Agent privileged mode is working
For this use case You should install the agent with privileged mode.
```shell script
$ sudo NRIA_MODE=PRIVILEGED yum install newrelic-infra -y
```
Platform validation:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT * from SystemSample where displayName = '${DISPLAY_NAME}' limit 1"
```

#### Scenario 8. Agent unprivileged mode is working
Similar to previous scenario You should install the agent with unprivileged mode.
```shell script
$ sudo NRIA_MODE=UNPRIVILEGED yum install newrelic-infra -y
```
Platform validation:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT * from SystemSample where displayName = '${DISPLAY_NAME}' limit 1"
```

#### Scenario 9. Package uninstall
```shell script
$ sudo yum remove newrelic-infra -y
```
Platform Validation:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT * from SystemSample where displayName = '${DISPLAY_NAME}' limit 1"
```
no data should be returned.

#### Scenario 10. Package upgrade
With an old agent version install, install the latest.
```shell script
$ sudo yum install newrelic-infra=1.15.1 -y --allow-downgrades
$ newrelic-infra -version
$ sudo yum install newrelic-infra -y
$ newrelic-infra -version
```
Platform Validation:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT * from SystemSample where displayName = '${DISPLAY_NAME}' limit 1"
```

#### Scenario 11. Built in Flex integration is working
Add Flex example yml file and review data in NR.
```shell script
$ sudo curl -o /etc/newrelic-infra/integrations.d/flex-dig.yml https://raw.githubusercontent.com/newrelic/nri-flex/master/examples/linux/dig-example.yml

$ sudo systemctl newrelic-infra restart
```
notes: for version 6 use `sudo initctl newrelic-infra restart`

Platform verification:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT uniques(integrationVersion) from flexStatusSample where displayName = '${DISPLAY_NAME}'"
```
e.g: expected output:
```json
[
  {
    "uniques.integrationVersion": [
      "1.4.0"
    ]
  }
]
```

#### Scenario 11. Built in Log-forwarded integration is working
Enable verbose mode in agent configuration file and review data in NR.
```shell script
$ sudo sed -i 's#verbose:.*#verbose: 3#g' /etc/newrelic-infra.yml
$ sudo systemctl restart newrelic-infra
```
Platform verification:
```shell script
$ newrelic nrql query -a ${NR_ACCOUNT_ID} -q "SELECT count(*) from Log where displayName = '${DISPLAY_NAME}'"
```
e.g: expected output:
```json
[
    {
      "count": 31
    }
]
```
notes: not supported in version 6.

#### Scenario 12. Built in Prometheus integration is working
Check if binary works.
```shell script
$ /var/db/newrelic-infra/newrelic-integrations/bin/nri-prometheus --help
```
expected value:
```shell script
Usage of /var/db/newrelic-infra/newrelic-integrations/bin/nri-prometheus:
  -config_path string
    	Path to the config file
  -configfile string
    	Deprecated. --config_path takes precedence if both are set
```

repository: greenszpila/infrastructure-agent

repo_name: greenszpila/infrastructure-agent


text:
# Installations

You are required to download and install the following free softwares for this workshop.

- [Anaconda Package Manager](https://www.anaconda.com/)
- [Visual Studio Code](https://code.visualstudio.com/)
- [Git Version Control System](https://git-scm.com/)

## Setting up your conda environment from environment.yml

```
conda env create -f environment.yml

```

## Activate

```
conda activate pytorch
```

## Setting up your conda environment step by step

When you download and install Anaconda, you are also installing the latest version of Python, Jupyter Notebooks and several useful data science libarries which are essential for data manipulation and developing machine learning applications.

Main benefit of using Anaconda is having the ability to setup up your own development environment. Often you will need to work with a specific version of Python and associated packages depending on the project requirements.  Having the ability to create new environments and switching between them helps you avoid unnecessary errors.

To create a new environment, start the `Anaconda Prompt` and execute the following code to create your own  environment.

```conda
conda create -n pytorch python=3.7

Solving environment: done
## Package Plan ##

  environment location: C:\Users\Username\Anaconda3\envs\my_env

Proceed ([y]/n)? y
```

## Testing your environment

You can test that you have successfully created a new environment by activating it using:

```conda
conda activate pytorch

(my_env) C:\Users\Username>
```

Then, you can check what packages have been already installed within your environment using:

```conda
conda list pytorch

# packages in environment at C:\Users\Username\Anaconda3\envs\my_env:
#
# Name                    Version                   Build  Channel
attrs                     19.1.0                   py37_1
backcall                  0.1.0                    py37_0
ca-certificates           2019.1.23                     0
...                        ...                        ...
webencodings              0.5.1                    py37_1
wheel                     0.33.1                   py37_0
wincertstore              0.2                      py37_0
zlib                      1.2.11               h62dcd97_3
```

```conda
(my_env) C:\Users\Username>
```

Once you environment is set, and you have it activated, simply run the following commands to install all the required packages for this workshop.

#### Installing Numpy

```conda
conda install numpy
```

#### Installing Matplotlib

```conda
conda install matplotlib
```

#### Installing Pytorch - WINDOWS

```conda
conda install pytorch-cpu torchvision-cpu -c pytorch
```

#### Installing Pytorch - MacOS

To install pytorch for MacOS you will need to run the following command instead:

```
conda install pytorch torchvision -c pytorch
```

#### Test Pytorch Installation

Check one last time that you have everything installed and ready to go using:

```conda
conda list
```

You can also try importing `torch` and `torchvision` packages. If you don't get any errors, you're good to go.

## Installing Jupyter Notebooks

Open the `Anaconda Navigator` then select your newly created environment `my_env` from the top drop down menu on the main page, then press the `install` button underneath the Jupyter Notebooks card. When installed, press the `launch` button to start the Jupyter notebooks on your browser. Simply navigate to the notebook files we have provided in this repo to open the notebook.

```
conda install -c conda-forge jupyterlab

```
## Starting VS Code via Anaconda Navigator

To ensure your VS code is configured to your environment `my_env`, simply launch VS Code via `Anaconda Navigator` while having your environment selected from the drop down menu.

## Learn More

- [Setting up conda environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#viewing-a-list-of-your-environments)
- [Codecademy - How to work with Jupyter notebooks - 11 min watch](https://www.codecademy.com/articles/how-to-use-jupyter-notebooks)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Makefile to Batch

[![License](https://img.shields.io/github/license/espositoandrea/Make-to-Batch)](https://github.com/espositoandrea/Make-to-Batch/blob/master/LICENSE)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/espositoandrea/Make-to-Batch/Python%20package)](https://github.com/espositoandrea/Make-to-Batch/actions)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/espositoandrea/Make-to-Batch?include_prereleases)](https://github.com/espositoandrea/Make-to-Batch/releases/latest)
[![PyPI](https://img.shields.io/pypi/v/make-to-batch)](https://pypi.org/project/make-to-batch/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=espositoandrea_Make-to-Batch&metric=alert_status)](https://sonarcloud.io/dashboard?id=espositoandrea_Make-to-Batch)

This is a simple tool to convert a GNU Makefile into a Windows Batch file.

## Usage

Install the tool by using [PyPI](https://pypi.org/project/make-to-batch/) using
the following command:

```bash
pip install make-to-batch
```

You can also install by downloading the source code:

```bash
cd path/to/source/
python setup.py install
```

The tool provides only a command, `make-to-batch`, that converts a Makefile in
the current directory to a batch file in the same directory. The tool behaviour
can be customized using some options: here is the help of the tool.

```text
$ make-to-batch -h
usage: make-to-batch [-h] [-v] [-i INPUT] [-o OUTPUT]

Convert a Makefile to a Batch (Windows) file.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -i INPUT, --input INPUT
                        set the makefile to be converted. Defaults to
                        './Makefile'
  -o OUTPUT, --output OUTPUT
                        set the name of the output batch file. Defaults to
                        './make.bat'
```

## License

This tool/library is free software and is released under the [MIT
License](LICENSE). You're free to copy, modify, and redistribute this tool in
any way: all I ask is some credit (just a mention is enough) and I'd love the
source code with your edits back.

The choice of the license should allow you to use the tool in any context you
like (either in free, open or proprietary contexts). If you should have any
problem with it, I first apologize because I'm not a lawyer, then just contact
me and we'll try to solve it together.

## Contributing

For more information on how to contribute, read
[this comment](https://github.com/espositoandrea/Make-to-Batch/pull/2#issuecomment-703069158)
and check the rules in the file [CONTRIBUTING.md](CONTRIBUTING.md)

### In Short: What Should I Do?

The short answer is: do whatever you want. No discussion is required to expand
the number of commands available in the translation: if you want to add new
commands or options, just add them to the [look up
table](make_to_batch/look_up_table.py) and open a PR.

Any modification to the architecture or structure of the tool is also welcomed:
just open a new issue and we'll discuss about it.

### Is there a Roadmap?

There's not an actual structured roadmap for this tool: the main thing that
needs to be done is to expand the set of recognized command.

Nonetheless, there are some enhancements I'd like to bring into this tool: I'll
leave a brief list here.

- Allow the tool to read from `stdin` and write to `stdout` (in the standard
  Unix fashion)
- Enhance the [documentation](https://make-to-batch.readthedocs.io/)

repository: espositoandrea/Make-to-Batch

gha_language: Python

gha_license_id: MIT

repo_name: espositoandrea/Make-to-Batch


text:
---
keyword: [Kafka, tag]
---

# Bind a tag

This topic describes how to bind a tag to Message Queue for Apache Kafka resources such as instances, topics, and consumer groups to facilitate resource classification.

A tag consists of a tag key and a tag value and is used to mark Message Queue for Apache Kafka resources. If your account has multiple Message Queue for Apache Kafka resources that are associated with each other, you can bind tags to these resources for easy classification and management. For more information, see [Overview](/intl.en-US/User guide/Tags/Overview.md).

1.  Log on to the [Message Queue for Apache Kafka console](https://kafka.console.aliyun.com/?spm=a2c4g.111866<IP_ADDRESS>f150ddqNXasY).

2.  In the top navigation bar, select a region.

3.  In the left-side navigation pane, click **Tags**.

4.  On the **Tags** page, click **Create/Bind Tags**.

5.  Perform the following steps based on the **Create/Bind Tags** wizard.

    1.  On the **Select Tag** page, select one or more tags and click **Next**.

        -   **Tag Key**: Required. Select an existing key or enter a new key.
        -   **Tag Value**: Optional. Select an existing value or enter a new value.
        **Note:** Up to 20 tags are supported and each tag must be unique.

    2.  On the **Select Resource** page, select one or more resources and click **OK**.

        **Note:** You can select up to 50 resources of the same type.

        ![tag_bind_result](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/en-US/5150549951/p70114.png)

-   [Unbind a tag](/intl.en-US/User guide/Tags/Unbind a tag.md)
-   [Edit a tag](/intl.en-US/User guide/Tags/Edit a tag.md)
-   [Use tags to retrieve resources](/intl.en-US/User guide/Tags/Use tags to retrieve resources.md)

repository: hglakfs/alikafka

path: /intl.en-US/User guide/Tags/Bind a tag.md

filename: Bind a tag.md

repo_name: hglakfs/alikafka


text:
Introduction
============

HPCFS (**H**TTP **P**roxy **C**ache **F**ile**s**ystem) is a FUSE module aimed at mounting one or several HTTP URLs as a filesystem. Such mounted filesystem will benefits from the following features:

* **Caching**: First request on a file will be cached on the local filesystem and subsequent requests will use the cached version
* **Merging**: Can join several URLs contents together to form a virtually unique content by using the Dailymotion's HTTP-WhoHas technique

NOTE: This module isn't a complete FUSE filesystem implementation. For instance, only direct file accesses will work, directory listing, file editing, permissions etc. are not implemented.

Configuration
=============

The HPCFS module relies on a single configuration file (referenced through the -o hpcfsconfig=**configuration file path** CLI option). This configuration file is typically located in /etc/hpcfs.conf but multiple configuration files may be used (and referenced) in case multiple HPCFS mount-points are used on the same server.

Once the configuration file has been edited to match the production environment (see directives and typical configuration below), the module is run using the following command:

``
/usr/sbin/hpcfs **mountpoint** -o hpcfsconfig=/etc/hpcfs.conf
``

Where **mountpoint** is an existing folder where the remote files are made available (on-demand/on-access) to the requesting softwares.

The list of available configuration directives is presented below:

### `HostMap <name> <list>`

This directive defines a table of back-end storage clusters (under the name **name**), each back-end containing at most 32 "nodes". It may be used up to 32 times in the configuration file. Back-ends are space-separated inside the list, and nodes are comma-separated inside a back-end. The special $[**start**-**end**] variable may be used (at most once per node definition) to synthesize values between **start** and **end**.
The hostmaps may be referenced in the Rewrite directives with the special ${**name**} variable.

### `Rewrite <local> <remote>`

This directive defines the mapping between a local file path (in the locally mounted filesystem) and the corresponding remote content URL (on the back-end storage clusters, no default value).
It may be used up to 32 times in the configuration file. The captured portions within the **local** parameter may be back-referenced in the **remote** parameter with the $**n** syntax (where **n** is a positive integer).
The special ${**name**} variable references the **name** host-map for potential HTTP WhoHas lookup in the **remote** parameter (see "HostMap" above).

### `ConnectTimeout <timeout>`

This directive defines the maximum time spent establishing a network connection (in seconds, default is 5 seconds).

### `MapTimeout <timeout>`

This directive defines the maximum time spent localizing a given content on the back-end storage clusters (a.k.a. "HTTP WhoHas", in seconds, default is 5 seconds).
ReceiveTimeout **timeout**
This directive defines the maximum time spent receiving data from the back-end storage clusters (in seconds, default is 30 seconds).

### `MaxDepth <depth>`

This directive defines the maximum count while following redirects (3xx HTTP codes or errors, default is 8).

### `CacheRoot <path>`

This directive specifies the root folder for cached files (no default value, mandatory).

### `Log <path>`

This directive specifies the activity logfile path (mainly used by proxy-cleaner, no default value).
The path may contain strftime expressions to automate log rotation for instance (the parent folders are created as needed).

The log format is as follow:
``
YYYY-MM-DD HH:MM:SS|CACHE-IN|<cached file path>
YYYY-MM-DD HH:MM:SS|CACHE-OUT|<cached file path>
``

repository: dailymotion/hpcfs

repo_name: dailymotion/hpcfs


text:
# Fast Template Periodogram [![build status](http://img.shields.io/travis/PrincetonUniversity/FastTemplatePeriodogram/master.svg?style=flat)](https://travis-ci.org/PrincetonUniversity/FastTemplatePeriodogram) [![codecov.io](https://codecov.io/gh/PrincetonUniversity/FastTemplatePeriodogram/coverage.svg?branch=master)](https://codecov.io/gh/PrincetonUniversity/FastTemplatePeriodogram)

(c) 2016; John Hoffman, Jake Vanderplas

Description
-----------

![examples](plots/templates_and_periodograms.png "Examples")

The Fast Template Periodogram extends the Generalized Lomb-Scargle
periodogram ([Zechmeister and Kurster 2009](http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:0901.2573]))
for arbitrary (periodic) signal shapes. A template is first approximated
by a truncated Fourier series of length `H`. The Non-equispaced Fast Fourier Transform
[NFFT](https://www-user.tu-chemnitz.de/~potts/nfft/) is used
to efficiently compute frequency-dependent sums.

The `tempfit` library is complete with API documentation and consistency
checks using `py.test`.

Installing
----------

See the `CONDA_INSTALL.md` for installing `tempfit` with
[`conda`](https://www.continuum.io/downloads)) (recommended).

Examples
--------

See the `Examples.ipynb` located in the `notebooks/` directory.

To run this notebook, use the `jupyter notebook` command from
inside the `notebooks/` directory

```
$ cd notebooks/
$ jupyter notebook
```

Updates
-------

* See the [issues](https://github.com/PrincetonUniversity/FastTemplatePeriodogram/issues)
section for known bugs! You can also submit bugs through this interface.

More information
----------------

### Older methods

The [gatspy](http://www.astroml.org/gatspy/) library has an implementation of
both single and multiband template fitting, however this implementation
uses non-linear least-squares fitting to compute the optimal parameters
(amplitude, phase, constant offset) of the template fit at each frequency. That
process scales as `N_obs*N_f`, where `N` is the number of observations and
`N_f` is the number of frequencies at which to calculate the periodogram.

This process is extremely slow. [Sesar et al. (2016)](https://arxiv.org/abs/1611.08596) applied a similar
template fitting procedure to multiband Pan-STARRS photometry and found that
(1) template fitting was significantly more accurate for estimating periods
of RR Lyrae stars, but that (2) it required a substantial amount of
computational resources to perform these fits.

### How do we speed this up?

* The non-equispaced fast Fourier transform (NFFT)
* Polynomial zero-finding

The FTP is a non-linear extension of the GLS. The nonlinearity
of the problem can be reduced to finding the zeros of
an order `~6H` polynomial at each trial frequency.

Templates must be well-approximated by a short truncated Fourier series
of length `H`. Using this representation, the optimal parameters
(amplitude, phase, offset) of the template fit at a given trial frequency
can then be found *exactly* after finding the roots of
a polynomial at each trial frequency.

The coefficients of these polynomials involve sums that can be efficiently
computed with (non-equispaced) fast Fourier transforms. These sums
can be computed in `HN_f log(HN_f)` time.

In its current state, the root-finding procedure is the rate limiting step.
This unfortunately means that for now the fast template periodogram scales as
`N_f*(H^4)`. We are working to reduce the computation time so that the entire
procedure scales as `HN_f log(HN_f)` for reasonable values of `H` (`< 10`).

However, even for small cases where `H=6` and `N_obs=10`, this procedure is
about twice as fast as the `gatspy` template modeler. And, the speedup over
`gatspy` grows linearly with `N_obs`!

### How is this different than the multi-harmonic periodogram?

The multi-harmonic periodogram ([Schwarzenberg-Czerny (1996)](http://iopscience.iop.org/article/10.1086/309985/meta)) is another
extension of Lomb-Scargle that fits a truncated Fourier series to the data
at each trial frequency. This is nice if you have a strong non-sinusoidal signal
and a large dataset. This algorithm can also be made to scale as
`HN_f logHN_f` ([Palmer 2009](http://iopscience.iop.org/article/10.1088/0004-637X/695/1/496/meta)).

However, the multi-harmonic periodogram is fundamentally different than template fitting.
In template fitting, the relative amplitudes and phases of the Fourier series are *fixed*.
In a multi-harmonic periodogram, the relative amplitudes and phases of the Fourier series are
*free parameters*. These extra free parameters mean that (1) you need a larger
number of observations `N_obs` to reach the same signal to noise, and (2) you are
more likely to detect a multiple of the true frequency. For a discussion of this
effect, possible remedies with Tikhonov regularization, and an illuminating review
of periodograms in general, see [Vanderplas et al. (2015)](http://adsabs.harvard.edu/abs/2015ApJ...812...18V).

### Timing

![timing](plots/timing_vs_ndata.png "Timing compared to gatspy")

The Fast Template Periodogram seems to do better than Gatspy
for virtually all reasonable cases (reasonable meaning a small-ish
number of harmonics are needed to accurately approximate the template,
small-ish meaning less than about 10).

It may be surprising that FTP appears to scale as `NH`, instead of
`NH log NH`, but that's because the NFFT is not the limiting factor (yet).
Most of the computation time is spent calculating polynomial coefficients,
and this computation scales as roughly `NH^4`.

![timingnh](plots/timing_vs_nharm.png "Timing vs harmonics")

The FTP scales sub-linearly to linearly with the number of harmonics `H`
for `H < 10`, and for larger number of harmonics scales as `H^4`. This
is the main limitation of FTP.

### Accuracy

Compared with the Gatspy template modeler, the FTP provides improved accuracy as well as speed.
For large values of `p(freq)`, the FTP correlates strongly with the Gatspy template algorithm; however,
since Gatspy uses non-linear function fitting (Levenberg-Marquardt), the predicted value for
`p(freq)` may not be optimal if the data is poorly modeled by the template. FTP, on the other
hand, solves for the optimal solution directly, and thus tends to find equally good or
better solutions when `p(freq)` is small.

![corrwithgats](plots/correlation_with_gatspy.png "Correlation to gatspy")
![accuracy](plots/correlation_with_large_H.png "How many harmonics do we need?")

For some frequencies, the Gatspy modeler finds no improvement over a constant fit
(`p_gatspy(freq) = 0`). However, for these frequencies, the FTP consistently finds better
solutions.

At frequencies where the template models the data at least moderately well (`p(freq) ~> 0.01`),
the Gatspy modeler and the FTP are in good agreement.

Assuming, then, that the FTP is indeed producing the "correct" periodogram, we can then
ask how many harmonics we must use in order to achieve an estimate of the periodogram to
a given accuracy.

TODO
----

* Multi-band extensions
* Speed improvements

repository: alxsoares/FastTemplatePeriodogram

repo_name: alxsoares/FastTemplatePeriodogram


text:
# config-reflector

config-reflector is a Kubernetes operator for sharing ConfigMap and Secret objects across namespaces.

## Features

- Update event propagation to reflected objects
- Automatic garbage collection

## Usage

1. Create a new namespace called `config-reflector`

    ```
    kubectl create ns config-reflector
    ```

1. Deploy manifests in `./deploy` directory

    ```
    kubectl apply -f ./deploy
    ```

1. Check if operator pod is running in `config-reflector` namespace

    ```
    kubectl get pods -n config-reflector
    ```

1. Use following annotations to control how ConfigMaps and Secrets are reflected in other namespaces

    - `configreflector.github.io/reflect-namespaces: default, test`
      This annotation is used to pass operator a comma separated list of namespaces where annotated Object should be reflected.
    - `configreflector.github.io/reflect-annotations: "true"`
      This annotation tells operator whether it should copy annotations from source object to its reflection. By default, it is disabled. When enabled, operator related annotations are not copied.
    - `configreflector.github.io/reflect-labels: "true"`
      This annotation tells operator whether it should copy labels from source object to its reflection. It is disabled by default.

## TODO

- [ ] Continuous Integration
- [ ] Unit Tests
- [ ] E2E Tests

## License

```
   Copyright 2019 Ashutosh Gangwar

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
```

repository: ashutoshgngwr/config-reflector

repo_name: ashutoshgngwr/config-reflector


text:
[![CodeQL](https://github.com/cognizance-amrita/initHTB.py/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cognizance-amrita/initHTB.py/actions/workflows/codeql-analysis.yml)
# initHTB.py

```
 _       _ _           _____  ___
(_)_ __ (_) |_  /\  /\/__   \/ __\
| | '_ \| | __|/ /_/ /  / /\/__\//
| | | | | | |_/ __  /  / / / \/  \
|_|_| |_|_|\__\/ /_/   \/  \_____/
                                   py
```

This script helps us to add IP, host name entry in hosts file and create directory run nmap scan and directory scan with your favourite tools.
More commands will be available, as you create issue.

# SETTING UP

1. You'll have to run this if you are not a root user `sudo chown $USER /etc/hosts`.
2. There is a template `hosts` file along with this, **please maintain the structure**.

# SCREENSHOTS

![image](https://user-images.githubusercontent.com/47889755/134817046-3dc10a9a-f35b-4bff-9a06-bb5c4bbfe878.png)
![image](https://user-images.githubusercontent.com/47889755/134817067-008aa46a-2f54-4c26-9283-92daf7882ba5.png)
![image](https://user-images.githubusercontent.com/47889755/134817077-217372dd-8693-442e-86db-3772c997adbd.png)
![image](https://user-images.githubusercontent.com/47889755/134817079-07f3fa56-7590-4d26-b986-44f37838b12f.png)

# CONTRIBUTE

Please fork, contribute and make a pull request. If you have any issues with this project, please feel free to create issue.

# CREDITS

Thanks to [Libtmux](https://github.com/tmux-python/libtmux) a python API for TMUX. Without which this project would not been easy to work with.

---

**NOTE** ALWAYS DOWNLOAD FROM RELEASES for using the tool. I won't guarantee cloning the repo will work for usage. As there are breaking changes pushed frequently.


text:
# Blackjack in Python ver 1.0

A simple ~walk through mor~ blackjack game

For my first Python project ever (and first programming project ever since starting my self taught route) I decided to make a
game of blackjack!

For this first version it only has the simple mechanics of playing a round and asking you to continue on if you'd like. Later on
I will add more functionality to the game like allowing the player to bet chips and keep going until they wish to stop or until
they bankrupt themselves from losing way too much.

## Requirements

Python 3.8.2

## How to Run

To run the program all you need to do is run the Python file using your OS's terminal setup `Python blackjack.py` or
`Python3 blackjack.py`

repository: TaylorJonesTRT/blackjack

repo_name: TaylorJonesTRT/blackjack


text:
# Exercise 8.11

In the `open_file` function, explain why we call `clear` before the call to `open`. What would happen if we neglected to make this call? What would happen if we called `clear` after the `open`?

**Answer**:

```cpp
ifstream& open_file(ifstream &in, const string &file)
{
    in.close();
    in.clear();
    in.open(file.c_str());
    return in;
}
```

When we encounter end-of-file, or any other error, the internal state of the stream is set so that further reads or writes are not allowed. If the last read or write operation failed, the state of the object remains in a failure mode until we execute `clear` to reset the condition of the stream (Section 8.4.1, p. 295).


text:
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Malorn44/NurikabeMaker/blob/master/LICENSE)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ce80ba03b87643fc8f90fbe0ea455e5a)](https://www.codacy.com/app/Malorn44/NurikabeMaker?utm_source=github.com&utm_medium=referral&utm_content=Malorn44/NurikabeMaker&utm_campaign=Badge_Grade)

# NurikabeMaker
A GUI for auto-solving and auto-generating Nurikabe puzzles, along with solving them yourself.

![Application View](https://i.imgur.com/nHp0zIl.png)

### Generate Puzzles
This program can generate Nurikabe puzzles of any given size. The puzzles are guaranteed solvable but not guaranteed to have a single solution (yet).

Seen below is a 20x20 Nurikabe puzzle.

![Puzzle Example](https://i.imgur.com/mOVCOug.png)

### Manually Solve Puzzles
You can manually solve Nurikabe puzzles using this program with built-in undo/redo buttons, save states, and a solution checker that tells you what is incorrect about your solution (rooms of incorrect size, rooms without a number, unconnected walls, and 2x2 area of walls).

![Puzzle Solve](https://i.imgur.com/3injugL.png)

### Auto Solve Puzzles
The program can also *attempt* to manually solve puzzles. The auto-solver is open source and available on Microsoft's GitHub (link in acknowledgements).

## Running the Program
To run the program, simply double click the NurikabeMaker.exe file located in /build-NurikabeMaker-Desktop_Qt_5_12_1_MinGW_64_bit-Release/release/NurikabeMaker.exe

## Opening the project
Download Qt version 5.12.1+ along with Qt Creator version 4.8.2+

In Qt Creator, select File > New File or Project > Import Project > Import Existing Project

Choose a project name ("NurikabeMaker") and the location of the project.

## Acknowledgement
- Thanks to Stephan T. Lavavej and Microsoft for creating the current version of the solver (4/25/19) being used in this program. [His GitHub can be found here](https://github.com/Microsoft/nurikabe)
- Thanks to everyone working on TinyXML2 for making a publicly usable XML parser. [The TinyXML2 GitHub can be found here](https://github.com/leethomason/tinyxml2)

repository: Bram-Hub/NurikabeMaker

repo_name: Bram-Hub/NurikabeMaker


text:
---
title: International
date: 2021-03-03T01:04:16.843Z
blocks:
  - content: >-
      Whanganui High School has hosted international students for the past 25
      years. Our focus is on your happiness and enjoyment of your international
      experience. Our international team are kind and caring and provide many
      exciting opportunities for you to experience our beautiful country.

      Our students come from all around the world and choose Whanganui for its central location and access to nature. International students also select Whanganui High School for their education when they want to be away from the distractions of the big cities, want to concentrate on learning English and prepare for entry to university.

      Our school will offer you a huge variety of subjects to choose from, including languages, the arts and technology, a multitude of sporting opportunities, including rowing, athletics and sports’ performance training as well as the chance to be part of shows and musical groups.

      As an international student, you will become a member of your homestay family. This will also provide lots of opportunities to practise your English-speaking skills.

      We look forward to welcoming you to our school and to our city.
    heading: WHY INTERNATIONAL STUDENTS CHOOSE WHS
    type: h2section
  - content: >-
      Whanganui High School has agreed to observe and be bound by the Code of
      Practice for the Pastoral Care of International Students published by the
      Ministry of Education. Copies of the Code are available on request from
      this institution or from the [New Zealand Qualifications Authority
      website.](http://www.nzqa.govt.nz/assets/Providers-and-partners/Code-of-Practice-NZQA.pdf)

      You may also be able to find a copy of the Code of Practice in your language at [this link](https://www.whanganuihigh.school.nz/international/www.nzqa.govt.nz/providers-partners/education-code-of-practice/code-of-practice-resources-languages/)

      Details of our refund policy, insurance and immigration requirements and conditions of acceptance are to be found on our International Application Form.
    heading: CODE OF PRACTICE
    type: h2section
  - type: facebook
    heading: Check us out on facebook
    url: https://www.facebook.com/Whanganui-High-School-International-249702658396182
  - heading: Term Dates
    type: termDates
---

gha_language: Blade


text:
# socrata-utils

A collection of (mostly) dependency-free utility classes and functions.

## Releasing

Run 'sbt-release' to bump the version appropriately and tag the release.

For more information about versioning, check semver.org


text:
# battery-life-extender

:computer: macOS desktop app notify about battery health.

## Preview 🎉

![](./screenshots/demo-battery-low.png)
![](./screenshots/demo-battery-full.png)

## Features

* :white_check_mark: Display notification when the battery level is less than 15%
* :white_check_mark: Display notification when the battery level is almost 100%
* :white_check_mark: Display tray icon in the menubar

## Installation

1. Download `*.zip` file from <https://github.com/piecioshka/battery-life-extender/releases>
2. Unzip
3. Move `*.dmg` file to Applications
4. Run `Battery Life Extender.dmg`

The app will be running when system staring.

## Development

```bash
npm install
npm start
```

## Unit tests

```bash
npm test
```

## Code coverage

```bash
npm run coverage
```

## License

[The MIT License](http://piecioshka.mit-license.org) @ 2019-2022

repository: piecioshka/battery-life-extender

gha_language: JavaScript

repo_name: piecioshka/battery-life-extender


text:
---
layout  : wiki
title   : Deepdive in ProjectReactor
summary :
date    : 2023-02-16 15:05:32 +0900
updated : 2023-02-16 15:15:24 +0900
tag     : reactive
toc     : true
comment : true
public  : true
parent  : [[/reactive]]
latex   : true
---
* TOC
{:toc}

## ProjectReactor

- Create Efficient Reactive Systems
- Reactor is a fourth-generation reactive library, based on the Reactive Streams
- specification, for building non-blocking applications on the JVM

## Documents

> [Docs](https://projectreactor.io/docs/core/release/api/) 와 같이 보면 좋을 내용들을 정리

- __reactor.adapter.JdkFlowAdapter__: Java9 Flow API 와 Flow 의 상호간 변환을 위한 어댑터
- __reactor.core__: Reactor is fully non-blocking and provides efficent demand management. It directly interacts with Java's Functional APIs. CompletableFuture, Stream, Duration.

### CorePublisher

react.core 에 존재하는 인터페이스.

- __Signatures:__

```java
public interface CorePublisher<T>
extends Publisher<T>
```

__Roles:__
- All publishers created through the Project Reactor library implement the CorePublisher interface.
- All of the built-in publishers in Project Reactor, such as Mono and Flux, implement the CorePublisher interface, as well as any custom publishers that you may create using the Project Reactor API.

__Methods:__
- `subscribe(CoreSubscriber<? super T> subscriber)`
- An internal Publisher.subscribe(Subscriber) that will bypass __Hooks.onLastOperator(Function) pointcut__.
- In addition to behave as expected by Publisher.subscribe(Subscriber) in a controlled manner, it supports direct subscribe-time __Context passing__.

CorePublisher 에서 주의 깊게 볼만한 부부은 __onLastOperator__ 와 __Context Passing__ 이다.

#### onLastOperator

먼저 onLastOperator 를 살펴보면 다음과 같다.

```java
import reactor.core.publisher.Flux;
import reactor.core.publisher.Hooks;

public class OnLastOperatorExample {

    public static void main(String[] args) {

        Hooks.onLastOperator("myHook", (publisher, coreSubscriber) -> {
            System.out.println("Last operator is " + publisher.getClass().getSimpleName());
            return coreSubscriber;
        });

        Flux.range(1, 10)
                .map(i -> i * 2)
                .filter(i -> i % 3 == 0)
                .subscribe(System.out::println);
    }
}
```

In this example, we are using the Hooks.onLastOperator method to register a callback that will be executed when the last operator in the pipeline is executed. The callback simply prints out the name of the last operator.

Then, we create a simple reactive stream pipeline using the Flux class, which emits numbers from 1 to 10, multiplies them by 2, and then filters out any numbers that are not divisible by 3. Finally, we subscribe to the pipeline and print out the results.

When we run this code, we should see the following output:

```
Last operator is FilterFuseable
6
12
18
```

This shows that the Filter operator was the last operator in the pipeline, and that it emitted the numbers 6, 12, and 18.

The onLastOperator hook is a global hook in the Project Reactor library, which means that it will apply to all publishers in your application, regardless of where they are created or how they are used.

__ProjectReactor 를 통해 생성되는 모든 Publisher 들은, onLastOperator hook 에 의해 동작함.__

Last Operator 콜백을 등록하면 반응형 스트림 파이프라인이 생성되고 __파이프라인의 마지막 연산자가 실행될 때마다 콜백이 실행됨__. 이는 Mono, Flux 및 사용자가 생성할 수 있는 다른 사용자 정의 게시자와 같은 모든 유형의 게시자에 적용됨.

#### Context passing

[Context](https://projectreactor.io/docs/core/release/api/reactor/util/context/Context.html) passing 은 다음과 같다.

![](/resource/wiki/reactive-project-reactor/context.png)

```java
Flux.just("Hello", "world")
  .map(String::toUpperCase)
  .subscriberContext(Context.of("user", "john.doe"))
  .subscribe(System.out::println);
```

In this example, we are creating a simple Flux that emits two strings, "Hello" and "world". We then use the map operator to convert the strings to uppercase. Finally, we use the subscriberContext method to attach a Context object to the stream with a key of "user" and a value of "john.doe".

This context can then be accessed by any operator in the stream using the Context class:

```java
Flux.just("Hello", "world")
.map(s -> s + " " + s.toUpperCase())
.map(s -> s + " by " + s.concat(Mono.subscriberContext().get("user")))
.subscribe(System.out::println);
```

In this example, we are using the map operator to first concatenate each string with its uppercase version, and then to concatenate it with the value stored in the user key in the Context object.

Context passing is a powerful feature of reactive programming that allows you to propagate important context information throughout the stream, making it available to all operators in the stream. This can simplify your code and make it easier to work with reactive streams.

그러나 subscriberContext 가 deprecated 된 것으로 보인다. 대신 __Mono.deferContextual(Mono::just)__ 를 사용하면 된다.

[Mono.subscriberContext methods are deprecated, but javadoc do not describe use what to replace them #2572](https://github.com/reactor/reactor-core/issues/2572)

### CoreSubscriber

__Signatures:__

```java
public interface CoreSubscriber<T>
extends Subscriber<T>
```

__Methods__
- default currentContext()
- void onSubscribe(Subscription s)
  - Implementors should initialize any state used by Subscriber.onNext(Object) before calling Subscription.request(long).
  - 해석하면 .. 구현자는 Subscription.request(long)를 호출하기 전에 Subscriber.onNext(Object)에서 사용하는 모든 `상태`를 초기화해야 한다. 즉, Subscriber.onNext(Object) 에서 사용되는 `상태` 를 초기화 해야한다는 의미.

```java
public class AccumulatingSubscriber<T> implements Subscriber<T> {
    private Subscription subscription;
    private int accumulator; // Value initialized to zero(0) by Constructor.

    @Override
    public void onSubscribe(Subscription subscription) {
        this.subscription = subscription;
        subscription.request(1);
    }

    @Override
    public void onNext(T item) {
        // Accumulate the value of the item
        accumulator += (Integer) item; // accumulator is state in AccumulatingSubscriber Class
        subscription.request(1);
    }

    @Override
    public void onError(Throwable t) {
        // Handle errors
    }

    @Override
    public void onComplete() {
        // Perform some operation on the accumulated value
        System.out.println("Accumulated value: " + accumulator);
    }
}
```

In this example, the AccumulatingSubscriber class initializes an instance variable called accumulator in the constructor. This variable is used to store the accumulated value of the items that the subscriber receives. In the onNext method, the value of each item is added to the accumulator, and then the next item is requested. Finally, in the onComplete method, the accumulated value is printed out.

Before calling subscription.request(1) in the onSubscribe method, the AccumulatingSubscriber class has already initialized the accumulator variable to a valid starting value (in this case, zero). This ensures that the subscriber is in a valid state to start receiving items from the publisher.

### Disposable

__Signatures:__

```java
@FunctionalInterface
public interface Disposable
```

__Roles:__
- Indicates that a task or resource can be cancelled/disposed.

__Methods:__
- void dispose(): `Cancel` or `dispose` the underlying task or resource. __리소스 해제 역할을 담당__
- default boolean isDisposed(): Optionally return true when the resource or task is disposed.

__cancelling and disposing:__

In reactive programming, "cancelling" and "disposing" are often used interchangeably to mean that a task or resource should be cleaned up and released. However, there can be some subtle differences in how the terms are used depending on the context.

In general, "cancelling" is often used to refer to stopping an ongoing computation or operation. For example, when you call the cancel method on a subscription to a publisher, you are telling the publisher to stop sending any more items to the subscriber. Similarly, when you cancel a running thread or task, you are telling it to stop executing its work and clean up any resources it has allocated.

On the other hand, "disposing" is often used to refer to cleaning up and releasing resources that were acquired by an object. For example, when you dispose of an object that implements the AutoCloseable interface, you are telling it to release any resources that it was holding, such as file handles, network connections, or database connections. Similarly, when you dispose of an object that is no longer needed, you are telling the system to release any memory or other resources that it was using.

In some cases, the terms "cancelling" and "disposing" can be used interchangeably, especially if the task or resource in question involves both ongoing computation and acquired resources. For example, if you have a long-running task that is reading from a network connection, you might use the term "cancelling" to refer to stopping the task and the term "disposing" to refer to releasing the network connection.

In summary, "cancelling" and "disposing" are often used interchangeably to mean cleaning up and releasing resources, but there can be some subtle differences in how the terms are used depending on the context.

Publisher 의 subscribe 메서드를 호출한다고 dispose 되는 것은 아님

When you call the subscribe() method on a Subscriber, the Disposable that is returned allows you to cancel or dispose of the subscription at a later time. It does not necessarily mean that the resource is immediately released as soon as you call subscribe().

In reactive programming, the __Disposable interface is used to allow the user to release resources that were acquired by a subscription__. __The Disposable interface has a dispose() method that can be called to release any resources that were acquired by the subscription__. The subscribe() method returns a Disposable so that the user can keep track of the subscription and release any acquired resources when they are no longer needed.

Here is an example that demonstrates __how to use the Disposable interface to release resources acquired by a subscription__:

```java
Disposable disposable = somePublisher.subscribe(someSubscriber);

// ...

// When you are done with the subscription, call dispose() to release any acquired resources
disposable.dispose();
```

놀랍게도 Spring WebFlux 를 사용하면, Spring WebFlux 엔드포인트 핸들러 메서드에서 Mono 또는 Flux 를 반환하면 프레임워크가 사용자를 대신하여 Mono 또는 Flux를 구독하고 응답이 클라이언트로 전송될 때 구독을 자동으로 폐기 한다. 즉, Mono 또는 Flux 에서 획득한 리소스를 해제하기 위해 dispose() 메서드를 수동으로 호출할 필요가 없다.

```java
// No need to deal with code for resource release.
@GetMapping("/users/{id}")
public Mono<User> getUserById(@PathVariable String id) {
    return userRepository.findById(id);
}
```

__Spring WebFlux 에 의해 내부적으로 처리되는 작업:__

1. __onSubscribe and request__: 클라이언트가 Mono 객체를 구독할 때(일반적으로 응답을 작성할 때 Spring WebFlux 에 의해 암묵적으로 수행됨) `Mono<User>` 객체의 구독 메서드가 호출되며, 이는 다시 구독자의 onSubscribe 메서드를 호출한다. 구독자의 onSubscribe 메서드는 구독의 request(1) 메서드를 호출하여 `Mono<User>` 개체가 하나의 항목을 내보내도록 요청한다.
2. __onNext__: `Mono<User>` 개체가 항목(즉, User 개체)을 내보내는 경우, 내보낸 User 개체를 사용하여 구독자의 onNext 메서드가 호출된다. 이 때 사용자 개체가 JSON 으로 직렬화되어 응답 본문의 클라이언트로 다시 전송된다.
3. __dispose__: 모든 작업이 끝나고 Spring WebFlux 가 리소스를 해제한다.

In this example, the getUserById method returns a `Mono<User>` that is obtained from a userRepository instance. When the endpoint is called, Spring WebFlux will automatically subscribe to the Mono and return the User object to the client. After the response has been sent, Spring WebFlux will automatically dispose of the subscription, which means that any resources that were acquired by the Mono will be released.

Similarly, you can return a Flux from a Spring WebFlux endpoint handler method, and Spring WebFlux will take care of disposing the subscription when the response has been sent to the client.

In summary, in Spring WebFlux, you don't have to explicitly dispose of a Mono or Flux because the framework will handle it for you automatically. When you return a Mono or Flux from an endpoint handler method, Spring WebFlux will automatically subscribe to it, send the response to the client, and dispose of the subscription when the response has been sent.

#### How to cancelling ?

__Example 1: Using a Disposable__

```java
Disposable disposable = somePublisher.subscribe(someSubscriber);

// ...

// When you are done with the subscription, call dispose() to cancel it
disposable.dispose();
```

__Example 2: Using a Subscription__

```java
Subscription subscription = somePublisher.subscribe(someSubscriber);

// ...

// When you are done with the subscription, call cancel() to cancel it
subscription.cancel(); // 구독 취소
```

__Example 3: Using a Disposable from a Flux__

```java
Flux<Integer> flux = Flux.range(1, 10);
Disposable disposable = flux.subscribe(
    value -> System.out.println("Received value: " + value),
    error -> System.err.println("Error: " + error),
    () -> System.out.println("Subscription complete")
);

// ...

// When you want to cancel the subscription, call dispose() on the Disposable
disposable.dispose();
```

### Fuseable

__Signatures:__

```java
public interface Fuseable
```

__Roles:__
- A micro API for stream fusion, in particular marks producers that support a Fuseable.QueueSubscription.

Mono 의 just 메서드 또는 Flux 의 range 메서드 등의 구현을 보면 Fuseable 인터페이스를 구현하고 있다. __Fuseable 인터페이스를 구현하면 Stream 작업을 융합할 수 있다__.

```java
Mono<Integer> mono = Mono.just(1)
        .map(i -> i * 2)
        .filter(i -> i % 3 == 0)
        .map(i -> i / 3)
        .log();

if (mono instanceof Fuseable) {
    System.out.println("Fuseable supported");
    Mono<Integer> fusedMono = mono
            .map(i -> i * 100)
            .map(i -> i / 100)
            .log();
    fusedMono.subscribe();
} else {
    System.out.println("Fuseable not supported");
    mono.subscribe();
}

Flux<Integer> flux = Flux.range(1, 5)
        .map(i -> i * 10)
        .filter(i -> i % 20 == 0)
        .map(i -> i / 20)
        .log();

if (flux instanceof Fuseable) {
    System.out.println("Fuseable supported");
    Flux<Integer> fusedFlux = flux
            .map(i -> i * 100)
            .map(i -> i / 100)
            .log();
    fusedFlux.subscribe();
} else {
    System.out.println("Fuseable not supported");
    flux.subscribe();
}
```

### Signal

__Signatures:__

```java
public interface Signal<T>
extends Supplier<T>, Consumer<Subscriber<? super T>>
```

__Roles:__
- A domain representation of a Reactive Stream signal. There are 4 distinct signals and their possible sequence is defined as such: `onError | (onSubscribe onNext* (onError | onComplete)?)`
  - onError, onSubscribe, onComplete, onNext 는 Subscriber Interface 의 API 이다.

__Combining multiple streams__: In this example, we have two Flux streams that we want to combine into a single stream using the zip() operator. We also want to log each Signal in the resulting stream:

```java
Flux<Integer> stream1 = Flux.just(1, 2, 3);
Flux<String> stream2 = Flux.just("A", "B", "C");

Flux.zip(stream1, stream2)
    .materialize()
    .doOnNext(signal -> {
        System.out.println("Received signal " + signal);
    })
    .dematerialize()
    .subscribe();
```

__Handling errors__: In this example, we have a Mono stream that may emit an error signal. We want to log the error if it occurs, and then continue processing the stream as normal:

```java
Mono.just("foo")
    .map(s -> Integer.parseInt(s))
    .materialize()
    .doOnNext(signal -> {
        if (signal.isOnError()) {
            Throwable error = signal.getThrowable();
            System.out.println("Error occurred: " + error);
        }
    })
    .dematerialize()
    .onErrorResume(e -> Mono.empty())
    .subscribe();
```

__Using Signal in custom operators__: You can also use Signal to implement custom operators that work with the metadata of the stream. For example, the following operator takes a Flux of Signals, filters out any onNext() signals with a value less than 0, and then converts the resulting Signals back into onNext() events:

```java
Flux<Integer> stream = Flux.just(1, -2, 3, -4, 5);

stream.materialize()
    .filter(signal -> {
        if (signal.isOnNext()) {
            Integer value = (Integer) signal.get();
            return value >= 0;
        } else {
            return true;
        }
    })
    .dematerialize()
    .subscribe(System.out::println);
```

### FluxSink

__Signatures:__

```java
public interface FluxSink<T>
```

__Roles:__
- Wrapper API around a downstream Subscriber for emitting any number of next signals followed by zero or one onError/onComplete.

__OverflowStrategy: Backpressure 를 위한 전략__

Overflow strategy is a concept in Project Reactor that defines how to handle situations when the downstream subscriber of a reactive stream is unable to keep up with the rate at which events are being emitted.

The basic strategy is to define what should happen when the buffer used to hold emitted events is full. There are several different overflow strategies that you can use, and the choice of strategy depends on the requirements of your specific use case.

- __BUFFER__: In this strategy, the emitted events are buffered in a queue until the downstream subscriber can consume them. This is the default strategy for most reactive streams in Project Reactor.
- __DROP__: In this strategy, any emitted event that cannot be immediately consumed by the downstream subscriber is dropped.
- __LATEST__: In this strategy, any emitted event that cannot be immediately consumed by the downstream subscriber replaces the previous un-consumed event in the buffer. This ensures that the most recent event is always available for consumption.
- __ERROR__: In this strategy, an error is thrown when the buffer is full and the downstream subscriber cannot consume any more events.
- __IGNORE__: In this strategy, any emitted event that cannot be immediately consumed by the downstream subscriber is ignored. This can lead to loss of data.

The choice of overflow strategy depends on the requirements of your specific use case. For example, if you want to ensure that the most recent event is always available for consumption, you can use the LATEST strategy. If you want to avoid loss of data, you can use the BUFFER strategy. If you want to avoid buffering and drop any un-consumed events, you can use the DROP strategy.

만약, BUFFER Overflow Strategy 를 사용하는 경우 (기본 전략이긴 함) Queue 가 가득차면 어떤 현상이 발생할까 ?

프로젝트 리액터에서 버퍼 오버플로 전략을 사용할 때, 방출된 이벤트를 유지하는 데 사용되는 대기열이 가득 차서 다운스트림 가입자가 방출 속도를 따라가지 못할 경우, 동작은 생산자가 동기식인지 비동기식인지에 따라 달라진다.

동기식 생산자의 경우, 생산자는 대기열에 사용 가능한 공간이 있을 때까지 차단한다. 즉, 대기열이 가득 차면 공간을 사용할 수 있게 될 때까지 생성자가 이벤트 전송을 중지한다. 다운스트림 가입자도 대기열이 지워지기를 기다리는 경우 이로 인해 교착 상태가 발생할 수 있다.

비동기 생산자의 경우 생산자는 계속해서 이벤트를 방출하지만, 대기열이 가득 차면 추가로 방출된 이벤트는 메모리에서 버퍼링된다. 이로 인해 메모리 사용량이 증가하고 버퍼가 너무 커지면 메모리 부족 오류가 발생할 수 있다.

이러한 문제를 방지하려면 특정 사용 사례의 요구 사항에 따라 적절한 오버플로 전략을 사용하는 것이 중요다. 예를 들어, 동기화된 생산자와 함께 작업하는 경우 차단할 여유가 없는 경우 DROP 또는 ERROR 와 같은 다른 오버플로 전략을 사용하는 것을 고려할 수 있다. 또는 비동기 생산자와 함께 작업하는 경우 과도한 메모리 사용을 방지하려면 버퍼 크기가 제한된 버퍼 전략을 사용하는 것을 고려할 수 있다.

__Spring WebFlux Default Overflow Strategy:__
-  Spring WebFlux 에서 사용하는 기본 전략은 __BUFFER_OVERFLOW__ 이다. 이 전략은 특정 지점까지 이벤트를 버퍼링한 다음 용량에 도달하면 버퍼에서 가장 오래된 이벤트를 삭제하기 시작한다.

__LATEST 전략을 사용하는 경우:__

```java
Flux.create(sink -> {
    for (int i = 1; i <= 10; i++) {
        sleep(1000); // simulate a slow producer
        sink.next(i);
    }
}, OverflowStrategy.LATEST)
.subscribe(System.out::println);

// Output: 1 2 3 4 5 6 7 8 9 10
```

만약, sleep(1000) 메서드를 삭제한다면 그만 큼 버퍼가 빨리 채워지고, 버퍼가 가득차면 최신 이벤트를 제외하고 나머지를 삭제하므로 아래와 같은 결과가 나올 수 있다.

```java
// Output: 10
```

### MonoSink

Mono 는 0 or 1개의 아이템만 방출하기 때문에 OverflowStrategy 가 필요 없다.

The MonoSink either emits a single item, or none at all, so there is no risk of overflowing a buffer.

Therefore, MonoSink does not have an overflow strategy property. It only has the success() and error(Throwable) methods for emitting a single success value or an error respectively.

## Links

- [ProjectReactor Docs](https://projectreactor.io/docs/core/release/api/)


text:
pricepi-PHP-client
==================

A PHP client wrapper for the Pricepi retail intelligence API

Simply include pricepi-rest.php in your code. Then pass the
appropriate arguments to call_pricepi() and collect
the results in the return!

Take a look at example.php to see how to make an API call and
then output the results via echo.

Enjoy.

repository: Pricepi/pricepi-PHP-client

repo_name: Pricepi/pricepi-PHP-client


text:
# Sms-length 💌 📏

A simple utility function to understand how many sms will be required to send a text message via SMS. Largely inspired by sms-counter.

## Installation

```
npm install sms-length

yarn add sms-length
```

## Usage

```js
import { count } from "sms-length";

count("This is a simple text message");

/*

Returns: {
  encoding: "GSM_7BIT",
  length: 29,
  characterPerMessage: 160,
  inCurrentMessage: 29,
  remaining: 131,
  messages: 1,
}

*/
```

## Thanks to

https://github.com/danxexe/sms-counter

repository: jimmywarting/sms-length

repo_name: jimmywarting/sms-length


text:
---
date: 2011-06-05 18:31:35+00:00
excerpt: None
slug: hey-i-was-reading-that
template: single.html
title: Hey, I was reading that...
---

I'm a huge fan of web typography, but we'll have to wait a bit longer to catch up with print.

Twitter surged last week with the news of [Futura's arrival at Typekit](http://blog.typekit.com/2011/06/01/futura/).

Futura PT’s classic design — tall ascenders, near perfect geometric shapes — make it both instantly recognizable and irrepressibly modern.

Indeed, and browser rendering makes it entirely _unrecognisable_. We've known this for a while; Futura has been available on less popular/more pricy services for months. See the example from Typekit's blog:

![Futura - rendering at text sizes - Typekit](/images/2011/06/Rendering-at-text-sizes.png)
Image © 2011 Typekit, Inc.

The rendering is passible on a Mac, dreadful on Windows—and that's just regular Futura Book. Light and _Light Italic_ are going to be atomic-thin. Typekit says this is "strikingly legible". I'm not sure that's a compliment. Play around with the [Futura Type Specimen](http://typekit.com/fonts/futura-pt) and you'll see for yourself:

![Futura PT - Typekit Specimen](/images/2011/06/typekit.png)

Those sub-pixels are being tortured. I daren't check how it's displayed on a Windows machine.

**Update: I did check Windows, and it's horrific:**

![Futura Typekit Specimen on Windows](/images/2011/06/typekit-windows.png)

There's nothing wrong with Futura's design or Typekit's serving it's simply a technical limitation. But it's an issue that is evidentially being ignored by many web designers.

## Web Typography Limitations

Futura and many (actually most) other web fonts can never be used for body copy. At least not until we're all sat infront of desktop displays that match the _pixels-per-inch_ of the iPhone's Retina screen. If you thought browser upgrading was a slow and frustrating process, you'll cry when you realise we'll be designing for old hardware for decades longer.

There are fonts like [Droid Serif](http://www.google.com/webfonts/family?family=Droid+Serif) that work great—you're reading it now—but we have to concede the choice is limited. I've experimented with web fonts on many sites and the results have been disappointing. The legibility problems are too large.

Here's the kicker: **choosing a pretty font does not mean a website has good typography**.

Good typography in Arial is indefinitely more desirable than _bad_ typography in a fancier web font. Appropriate type size, leading, line-length and general typesetting is missing in many professionally designed websites. Top that off with an illegible font and you've got a perfect cake that nobody's eating. If that metaphor makes no sense – your website isn't going to attract many visitors.

To be fair, design on the web has matured a lot in the last few years but lack of attention to technical limitations and too much focus on gloss has produced a fair selection of online duds. Design distractions are everywhere. Web fonts, JavaScript, CSS3 and HTML5 are all luring us in to their glorious freshness and rejuvenating powers.

Websites are designed to serve a purpose. Normally to promote and sell a product or service. They are not a canvas for us to throw every new technology at. While these things do often help provide a better solution it's almost always simple _clarity_ that works best, not illegible web fonts.

* * *

In other news, on June 7th _Monotype Imaging_ are releasing a new digital version of **Helvetica** including display weights under its original name "Neue Haas Grotesk".

Incidentally, I'll be going offline for a while...

repository: tied/DevArtifacts

repo_name: tied/DevArtifacts


text:
# RailsAbTest

Perform A/B Testing in your Rails app with ease.

The idea is a combination of

- minimal Code to support A/B Test versioning, is provided by this gem.
- A simple Pattern to organize the code in views into separated versions for each A/B Test version.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rails_ab_test'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rails_ab_test

## Usage

Let's start with the simplest usage case:

### The Code

Configure your controllers by including the module, normally `ApplicationController` is a good candidate for this:

```ruby
include RailsAbTest::Controller
```

Then for the action (`index` in the example) that will be A/B Tested set a `before_filter`:

```ruby
# a controller
before_filter :choose_ab_test, only: :index
```

The method `choose_ab_test` will randomly (with 50% probability) choose A or B as the A/B Test version.
From here the version chosen will be accessible in your views and helpers in the variable `@ab_test`.

Then inside the action you need to replace `render` with `render_ab`

```ruby
# a controller
def index
  render_ab
end
```

`render_ab` will infer the template to render from the action name, and prepend it with `@ab_test` to fully
determine the template name. i.e. if the A/B Version is A it will render the template `index_A`.

### The Pattern

Now you need to make 2 copies of your `index` view template, and name it `index_A` for the A/B Test version A, and
`index_B` for B.

Make sure you set up different tracking for each version and you are good to go.

## QA and Test support

For testing and QA purposes the A/B Test version can be selected by appending `?ab_test=A` to the url of the page,
that will make sure the version A is selected.

## More complex usage

### More versions that just A and B

Then instead of a `before_filter` you can call the method `choose_ab_test` directly:

```ruby
# a controller
def show
  choose_ab_test ['A', 'B', 'C'] # this action calls the method directly instead
  render_ab
end
```

Again the 3 versions will have the same probability of being chosen.

*NOTE:* in the current version the gem only supports versions with equal probabilities each.

### 2 actions 1 template

Imagine that the actions `index` and `archive` are both A/B versioned and they share the same template. The action `index` will not change, but `archive` needs to explicitly render the `index` template like this:

```ruby
# a controller
before_filter :choose_ab_test, only: :index, :archive

def archive
  render_ab template: 'index'
end
```

### Versioned partials

If instead of a full page template only a partial is going to be A/B Tested, you can achieve like this:

```ruby
# index.haml.html template
= render_ab partial: 'menu', variable_for_the_partial: @variable
```

The pattern again here is to make 2 copies of the `_menu` partial and name them, i.e. `_menu_A` and `_menu_B`.

### Versioned html snippets and partials

Based on the variable `@ab_test` you can also make conditions in views and helpers:

```ruby
# index.haml.html template
- if @ab_test == 'A'
  version A is rendered
- else
  hello B
```

```ruby
# a view helper
def helper_method_AB_versioned
  if @ab_test == 'A'
    'version A is rendered'
  else
    'Hello B'
  end
end
```

### Several pages sharing the same A/B version

Now imagine that the `index` actions of 2 controllers (e.g. `posts` and `authors`) are A/B versioned,
and that you want that when an user sees version A of `posts#index` she should also see version A of `authors#index`.

This can be achieved by overriding the method `choose_ab_test` in both controllers, and using a cookie:

```ruby
# posts controller
before_filter :choose_ab_test, only: :index

...

def choose_ab_test
  @ab_test = cookies['shared-version-posts-authors'] || super
  cookies['shared-version-posts-authors'] = @ab_test
end

# authors controller should have the same code as above
```

Of course you can extract the common code to a central place. Also name the cookie with a name that makes sense for you, and expire it, sign it or encrypt it as needed.

### Cookies to persist versions

If an user should always see the same A/B version of a page, the same method above and a cookie work perfectly:

```ruby
# a controller
before_filter :choose_ab_test, only: :index

...

def choose_ab_test
  @ab_test = cookies['shared-version-posts-authors'] || super
  cookies['shared-version-posts-authors'] = @ab_test
end
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/joahking/rails_ab_test.

## TODOs

- write tests

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
---
section: build
title: A React Example
---

There are two logical parts to an Axiom application. First, the application code is a bundle
of JavaScript, HTML, and other files that works like a website. This code is stored
in a bucket owned by the app developer. Second, there is user data,
which contains things like blog posts, messages, or profile
pictures. This data is stored in separate buckets, each owned by
a different user. An application interacts with user data via the
[JavaScript Axiom API](#docs-api).

When building an Axiom application, you can use any framework that
outputs JavaScript and HTML. This includes tools like React, Angular,
and Vue. You can't use server-side frameworks like
Rails, Django, or PHP.

This section of the documentation will demonstrate the basics of Axiom
apps, using an example app written with React. We won't do anything
too React-centric, so if you
don't know React, hopefully you can follow along and figure out how
this would work in your favorite framework.

The easiest way to follow along is to clone this GitHub repository
with our example React app:

```bash
git clone git@github.com:axiom-org/react-example.git
```

There isn't much in this repo. To make it, we ran
[create-react-app](https://facebook.github.io/create-react-app/docs/getting-started),
ran `npm install axiom-api`, and removed some stuff we aren't
going to use. `App.js` is the file that contains all the code we're
going to write. To start out, it contains:

```javascript
import React from "react";
import Axiom from "axiom-api";

export default class App extends React.Component {
  constructor(props) {
    super(props);

    this.axiom = new Axiom();

    this.state = {
      message: null
    };
  }

  async onClick() {
    this.setState({ message: "click!" });
  }

  render() {
    if (this.state.message) {
      return <p>{this.state.message}</p>;
    }

    return <button onClick={() => this.onClick()}>Click Me</button>;
  }
}
```

All this app does so far is display a button that says "Click Me", and
when you click it, it displays the message "click!". To serve it on
localhost, run:

```bash
npm start
```

It's a useful shell for experimenting with the Axiom API, because we can edit the
`onClick` function to do different things.

If you're familiar with React, this app should look pretty
straightforward. The only parts that relate to Axiom are constructing
the Axiom object:

```javascript
import Axiom from "axiom-api";

this.axiom = new Axiom();
```

The Axiom object provides access to the Axiom API. You only need to
create one of them at a time, and it's a good idea to only create one
because it will automatically cache some things for you. We can create it
in the constructor of `App` here because the `App` component only gets
rendered once.

The following sections will show you different things you can do with
this `axiom` object.

gha_language: CSS


text:
# @testingrequired/wdvm

## Installation

1. Clone this repo locally
1. Run `$ npm install && npm link`
1. Add `~/.wdvm` to PATH

## Usage

```bash
$ wdvm browser version platform
```

### Supported Browsers

- `chrome`
- `firefox`

### Examples

```bash
$ wdvm chrome 71 win32
```

## Configuration

Configuration can be defined in `~/.wdvmrc.json`

### `dest`

Absolute paths to where the webdriver binaries are installed.

```json
{
  "dest": ""
}
```

Defaults to: `~/.wdvm`

repository: testingrequired/wdvm

repo_name: testingrequired/wdvm


text:
---
title: flexicious-react-datagrid
repo: flexicious/react-datagrid
direct: https://github.com/flexicious/react-datagrid
homepage: http://reactdatagrid.com
examples: http://reactdatagrid.com/#demo
license: Commercial
bower: flexicious-react-datagrid
npm: flexicious-react-datagrid
technology: react
leading technology: react
author: Flexicious
authorurl: https://flexicious.com
description: The most powerful Enterprise grade pure REACT datagrid component.
---

Our ReactDataGrid is a DataGrid/TreeGrid component built to render highly complex, Hierarchical/Nested as well as Flat Data in React based HTML5/JavaScript Line Of Business RIA applications, with a massive set of features Right Out Of The Box.
We have been building Datagrid components for almost a decade now and this is our latest addition.

repository: RobertoMalatesta/JSpreadsheets

repo_name: RobertoMalatesta/JSpreadsheets


text:
---
layout: default
---

# 1993-01-14 - Re: anonymous service shutdown (pax)

## Header Data

From: Marc Horowitz<EMAIL_ADDRESS>To: Hal<EMAIL_ADDRESS>Message Hash: df3dcd3b1419577cb51b9dc1de5ed0d639654544b0baf5dcbff1cc2c2222afbb

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1993-01-14 23:49:51 UTC

Raw Date: Thu, 14 Jan 93 15:49:51 PST

## Raw message

```
{% raw  %}From: Marc Horowitz<EMAIL_ADDRESS>Date: Thu, 14 Jan 93 15:49:51 PST
To: Hal<EMAIL_ADDRESS>Subject: Re: anonymous service shutdown (pax)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>> I agree that the PAX shutdown is an ominous development.  Nobody's
>> internet access is perfectly free from the kinds of pressures that were
>> brought against PAX.  What steps can we take to keep the same thing from
>> happening to us?

There's one very obvious thing, but it costs money (the real kind, not
the stuff we've been playing with).  Someone needs to *buy* a
connection to the *commercial* internet and put an anonymous remailer
where the NSF can't touch it.

NEARnet recently signed an agreement with ANS and CIX to use ANS as a
pipe between it and the CIX (note the lack of *any* government
involvement here).  If I understand this development correctly, this
means a site on NEARnet with the Commercial Routing Service (it costs
extra, numbers on request) can, I think, send packets anywhere without
crossing the NSFnet.  ANS simply leases bandwidth to the NSF.  Most
backbone bits cross this leased bandwidth, but now, it is possible to
buy access to this *privately* owned network.  Now, who has $16k
annually (that's the number, I have a quote on my desk) to sink into
the connection?  Are we serious enough about this to form some sort of
corporation (with legal ties that bind, and identify) to maybe set
this up?  There's enough people on this list to make this sort of
thing cost < $10/month each if *everyone* participated.

Of course, if we did this, we'd have to make it quite clear what we
were planning on doing.  Use of PGP makes this hard.  A company set up
for the purpose of making PGP easier to use would arouse the Wrath of
RSA really quickly.  FYI, the NEARnet AUP:

NEARnet Primary Goals

NEARnet, the New England Academic and Research Network, has been
established to enhance educational and research activities in New
England, and to promode access to regional and national innovation and
competitiveness.  NEARnet provides access to regional and national
resources to its Members, and access to regional resources from
organizations throughout the United States and the world.

NEARnet Acceptable Use Policy

1. All use of NEARnet must be consistent with NEARnet's primary goals.

2. It is not acceptable to use NEARnet for illegal purposes.

3. It is not acceptable to use NEARnet to transmit threatening,
obscene, or harassing materials.

4. It is not acceptable to use NEARnet so as to interfere with or
disrupt network users, services or equipment.  Disruptions include,
but are not limited to, distribution of unsolicited advertizing,
propagation of computer worms and viruses, and using the network to
make unauthorized entry to any other machine accessible via the
network.

5. It is assumed that information and resources accessible via NEARnet
are private to the individuals and organizations which own or hold
rights to those resources and information unless specifically stated
otherwise by the owners or holders of rights.  It is therefore not
acceptable for an individual to use NEARnet to access information or
resources unless permission to do so has been granted by the owners or
holders of rights to those resources or information.

Violation of Policy

NEARnet will review alleged violations of Acceptable Used Policy on a
case-by-case basis.  Clear violations of policy which are not promptly
remedied by Member organization may result in termination of NEARnet
Membership and network services to Member.

It seems to me that the user of possibly illegal software like PGP
could be considered a violation of rule 2.  The whole issue of
anonymous harassing email brings up rule 3.  I've send mail to one of
the NEARnet discussion lists asking how encryption and anonymity
affects the interpretation of rule 3.

		Marc

{% endraw %}
```

## Thread

+ Return to [January 1993](/archive/1993/01)

+ Return to "[Hal <74076.1041@CompuServe.COM>](/authors/hal_74076_1041_at_compuserve_com_)"
+ Return to "[Marc Horowitz <marc@MIT.EDU>](/authors/marc_horowitz_marc_at_mit_edu_)"

+ 1993-01-14 (Thu, 14 Jan 93 12:24:43 PST) - [Re: anonymous service shutdown (pax)](/archive/1993/01/731621623ad52e24420732b8a56d21bb1fbeb3852ce26c145e603e471d8dc56e) - _Hal<EMAIL_ADDRESS>  + 1993-01-14 (Thu, 14 Jan 93 15:49:51 PST) - Re: anonymous service shutdown (pax) - _Marc Horowitz<EMAIL_ADDRESS>


text:
# Status and Diagnostics API
A status API exists, which dumps some diagnostic and statistical information, as well as basic information about the underlying Raft node. Assuming the rqlite node is started with default settings, node status is available like so:

```bash
curl localhost:4001/status?pretty
```

The use of the URL param `pretty` is optional, and results in pretty-printed JSON responses.

You can also request the same status information via the CLI:
```
$ ./rqlite
Welcome to the rqlite CLI. Enter ".help" for usage hints.
<IP_ADDRESS>:4001> .status
build:
  build_time: unknown
  commit: unknown
  version: 5
  branch: unknown
http:
  addr: <IP_ADDRESS>:4001
  auth: disabled
  redirect:
node:
  start_time: 2019-12-23T22:34:46.215507011-05:00
  uptime: 16.963009139s
runtime:
  num_goroutine: 9
  version: go1.13
 ```

## expvar support
rqlite also exports [expvar](http://godoc.org/pkg/expvar/) information. The standard expvar information, as well as some custom information, is exposed. This data can be retrieved like so (assuming the node is started in its default configuration):

```bash
curl localhost:4001/debug/vars
```

You can also request the same expvar information via the CLI:
```
$ rqlite
<IP_ADDRESS>:4001> .expvar
cmdline: [./rqlited data]
db:
  execute_transactions: 0
  execution_errors: 1
  executions: 1
  queries: 0
  query_transactions: 0
http:
  backups: 0
  executions: 0
  queries: 0
memstats:
  Mallocs: 8950
  HeapSys: 2.588672e+06
  StackInuse: 557056
  LastGC: 0...
 ```

## pprof support
[pprof](https://golang.org/pkg/net/http/pprof/) information is available by default and can be accessed as follows:

```bash
curl localhost:4001/debug/pprof/cmdline
curl localhost:4001/debug/pprof/profile
curl localhost:4001/debug/pprof/symbol
```

repository: quangtynu/rqlite

repo_name: quangtynu/rqlite


text:
# FIVR-200K

An annotated dataset of YouTube videos designed as a benchmark for Fine-grained Incident Video Retrieval. The dataset comprises 225,960 videos associated with 4,687 Wikipedia events and 100 selected video queries.

Project Website: [[link](http://ndd.iti.gr/fivr/)]

Paper: [[publisher](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8668422)] [[arXiv](https://arxiv.org/abs/1809.04094)] [[pdf](https://arxiv.org/pdf/1809.04094.pdf)]

## Installation

* Clone this repo:
```bash
git clone https://github.com/MKLab-ITI/FIVR-200K
cd FIVR-200K
```
* You can install all the dependencies by
```bash
pip install -r requirements.txt
```
or
```bash
conda install --file requirements.txt
```
* Install [yt-dlp](https://github.com/yt-dlp/yt-dlp) (make sure it is up-to-date)

## Dataset format

* The files that contains the dataset can be found in [dataset](https://github.com/MKLab-ITI/FIVR-200K/tree/master/dataset) folder

* The video annotations are in file [annotation.json](https://github.com/MKLab-ITI/FIVR-200K/blob/master/dataset/annotation.json) that has the following format:
```bash
{
  "5MBA_7vDhII": {
    "ND": [
      "_0uCw0B2AgM",
      ...],
    "DS": [
      "hc0XIE1aY0U",
      ...],
    "CS": [
      "ydEqiuDiuyc",
      ...],
    "IS": [
      "d_ZNjE7B4Wo",
      ...],
    "DA": [
      "rLvVYdtc73Q",
      ...],
  },
  ....
}
```

* The events crawled from Wikipedia's [Current Event](https://en.wikipedia.org/wiki/Portal:Current_events) page are in file [events.json](https://github.com/MKLab-ITI/FIVR-200K/blob/master/dataset/events.json) that has the following format:
```bash
[
  {
    "headline": "iraqi insurgency",
    "topic": "armed conflict and attack",
    "date": "2013-01-22",
    "text": [
      "car bombings in baghdad kill at least 17 people and injure dozens of others."
    ],
    "href": [
      "http://www.bbc.co.uk/news/world-middle-east-21141242",
      "https://www.reuters.com/article/2013/01/22/us-iraq-violence-idUSBRE90L0BQ20130122"
    ],
    "youtube": [
      "ZpjqUq-EnbQ",
      ...
    ]
  },
  ...
]
```

* The Youtube IDs of the videos in the dataset are in file [youtube_ids.txt](https://github.com/MKLab-ITI/FIVR-200K/blob/master/dataset/youtube_ids.txt)

* The global features of the benchmarked approaches in the paper can be found [here](http://ndd.iti.gr/features/)
    * The ordering is according to the [youtube_ids.txt](https://github.com/MKLab-ITI/FIVR-200K/blob/master/dataset/youtube_ids.txt)

## Download Videos

* Run the following command to download videos:
```bash
python download_dataset.py --video_dir VIDEO_DIR [--dataset_ids DATASET_FILE] [--cores NUMBER_OF_CODES] [--resolution RESOLUTION]
```

* An example to run the download script:
```bash
python download_dataset.py --video_dir ./videos --dataset_ids dataset/youtube_ids.txt --cores 4 --resolution 360
```

* Videos will be saved in the following directory structure ```VIDEO_DIR/YT_ID.mp4```

* The videos that are no longer available are stored in a text file with name ```missing_videos.txt```

## Evaluation

1. Generation of the result file
    * A file that contains a dictionary with keys the YT ids of the query videos and values another dictionary with keys the YT ids of the dataset videos and values their similarity to the query.

    * Results can be stored in a JSON file with the following format:
    ```bash
    {
      "wrC_Uqk3juY": {
        "KQh6RCW_nAo": 0.716,
        "0q82oQa3upE": 0.300,
          ...},
      "k_NT43aJ_Jw": {
        "-KuR8y1gjJQ": 1.0,
        "Xb19O5Iur44": 0.417,
          ...},
      ....
    }
    ```

   * An implementation for the generation of the JSON file can be found [here](https://github.com/MKLab-ITI/FIVR-200K/blob/1c0c093f29eea6c71f8f154408b2a371b74cb427/calculate_similarities.py#L79)

2. Evaluation of the results
    * Run the following command to run the evaluation:
    ```bash
    python evaluation.py --result_file RESULT_FILE --relevant_labels RELEVANT_LABELS
    ```

    * An example to run the evaluation script:
    ```bash
    python evaluation.py --result_file ./results/lbow_vgg.json --relevant_labels ND,DS
    ```

    * Add flag `--help` to display the detailed description for the arguments of the evaluation script

3. Evaluation on the three retrieval task
    * Provide different values to the `relevant_labels` argument to evaluate your results for the three visual-based retrieval task
    ```bash
    DSVR: ND,DS
    CSVR: ND,DS,CS
    ISVR: ND,DS,CS,IS
    ```
    * For the Duplicate Audio Video Retrieval (DAVR) task provide `DA` to the `relevant_labels` argument

* Reported results
    * To re-produce the results of the paper run the following command
    ```bash
    bash evaluate_run.sh APPROACH_NAME FEATURES_NAME
    ```

    * An example to run the evaluation script:
    ```bash
    bash evaluate_run.sh BOW VGG
    ```

    * The results will probably not be the same as the reported one in the paper, because we are constantly fixing mislabeled videos that were missed during the annotation process.

    * See in the [Updates](https://github.com/MKLab-ITI/FIVR-200K#updates) section when was the last update of the dataset's annotation

## Updates

In case that you find a mislabeled video please submit it to the following form [here](https://docs.google.com/forms/d/e/1FAIpQLSdHWcPWB4YnAzap7VVJ4wUN_AIf2DIK3H97EjW6VjyHpM4ZSA/viewform?usp=pp_url)

* **Update 21/1/21**: add `DA` label for audio-based annotations of duplicate audio videos
* **Update 29/5/19**: fix labels for 373 videos

## Citation
If you use FIVR-200K dataset for your research, please consider citing our paper:
```bibtex
@article{kordopatis2019fivr,
  title={{FIVR}: Fine-grained Incident Video Retrieval},
  author={Kordopatis-Zilos, Giorgos and Papadopoulos, Symeon and Patras, Ioannis and Kompatsiaris, Ioannis},
  journal={IEEE Transactions on Multimedia},
  year={2019}
}
```
If you use the audio-based annotations, please also consider citing our paper:
```bibtex
@inproceedings{avgoustinakis2020ausil,
  title={Audio-based Near-Duplicate Video Retrieval with Audio Similarity Learning},
  author={Avgoustinakis, Pavlos and Kordopatis-Zilos, Giorgos and Papadopoulos, Symeon and Symeonidis, Andreas L and Kompatsiaris, Ioannis},
  booktitle={Proceedings of the IEEE International Conference on Pattern Recognition},
  year={2020}
}
```

## Related Projects

**[Intermediate-CNN-Features](https://github.com/MKLab-ITI/intermediate-cnn-features)** - this repo was used to extract our CNN features

**[NDVR-DML](https://github.com/MKLab-ITI/ndvr-dml)** - one of the methods benchmarked in the FIVR-200K dataset

**[ViSiL](https://github.com/MKLab-ITI/visil)** - video similarity learning for fine-grained similarity calculation

**[AuSiL](https://github.com/mever-team/ausil)** - audio similarity learning for audio-based similarity calculation

## License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details

## Contact us for further details

Giorgos Kordopatis-Zilos<EMAIL_ADDRESS>

Symeon Papadopoulos (papadop@iti.gr)


text:
# samba: Changelog

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v3.0.0 - January 2021

This release integrates the analysis of long reads data. The pipeline has also been incremented with new steps to provide a multitude of options to users (interactive figures, taxonomic filter, ...)

### `Added`

* Long read processing
* Filter based on taxonomic assignation
* Automated unwanted sample removal

### `Fixed`

### `Dependencies`

See README.md

### `Deprecated`

Thanks to everyone who has worked on this release!

repository: adefewings/samba

repo_name: adefewings/samba


text:
## Github

* [Sign up Github account](https://github.com/) if you don't already have one

After finished above two tasks, please download [git](https://git-scm.com/) or
[Github client](https://desktop.github.com/) for you to do source control.

### Recommended readings for leaning Git/github

Please read through some of the following readings and have clear understanding of
Github/git in order to commit & push your code for code submission.

* https://help.github.com/articles/good-resources-for-learning-git-and-github/
* [Github cheatsheet](https://education.github.com/git-cheat-sheet-education.pdf)

repository: csula/Utilities

repo_name: csula/Utilities


text:
# Examply

Static Site Generator that generates content depending on the url!

`https://examply.aeroworks.app/<placeholder>/<path>` will generate an dynamic, SSR-ed page with full OGP and Meta tags and so on.

Try me: [https://examply.aeroworks.app/Examply/Awesome/webapp/it/is](https://examply.aeroworks.app/Examply/Awesome/webapp/it/is)

Special thanks to placehold.jp!

## Download localy and deploy your own, or you are more than welcomed to contribute!

``` bash
# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate
```

repository: aeroworks-io/examply

gha_language: Vue

repo_name: aeroworks-io/examply


text:
aks-cluster
===========

Deploy an Azure AKS cluster from a Jenkins pipeline build by doing the following
* Run Jenkinsfile pipeline from SCM (store Azure credentials in Jenkins)
* Run ansible playbook aks-cluster.yml (--extra-vars "input_name" defines the RG & cluster names [defaults to "demo"])
  * Create **RG-<input_name>** resource group
  * Create **AKS-cluster-<input_name>** cluster using the above RG

Currently tested on these Operating Systems
* RHEL/CentOS

Requirements
------------

* Azure subscription
* ansible[azure]

Store the following information in Jenkins credentials

* az_subscription_id
* az_client_id
* az_secret
* az_tenant

Variables
---------

```
input_name          # Suffix for RG & cluster names
resource_group      # Azure Resource Group name
location            # Azure location
vm_count            # Number of nodes per cluster
vm_size             # Azure VM sie offering
```

Dependencies
------------

None

License
-------

BSD

Author Information
------------------

Adam Goldsmith<EMAIL_ADDRESS>

repository: AdamGoldsmith/aks-cluster

repo_name: AdamGoldsmith/aks-cluster