text:
Command line tools written in C for the MQTT-SN (MQTT for Sensor Networks) protocol.

Supported Features
------------------

- QoS 0 and -1
- Keep alive pings
- Publishing retained messages
- Publishing empty messages
- Subscribing to named topic
- Clean / unclean sessions
- Manual and automatic client ID generation
- Displaying topic name with wildcard subscriptions
- Pre-defined topic IDs and short topic names
- Forwarder encapsulation according to MQTT-SN Protocol Specification v1.2.

Limitations
-----------

- Packets must be 255 or less bytes long
- No Last Will and Testament
- No QoS 1 or 2
- No Automatic gateway discovery

Building
--------

Just run 'make' on a POSIX system.

Publishing
----------

    Usage: mqtt-sn-pub [opts] -t <topic> -m <message>

      -d             Increase debug level by one. -d can occur multiple times.
      -h <host>      MQTT-SN host to connect to. Defaults to '<IP_ADDRESS>'.
      -i <clientid>  ID to use for this client. Defaults to 'mqtt-sn-tools-' with process id.
      -m <message>   Message payload to send.
      -n             Send a null (zero length) message.
      -p <port>      Network port to connect to. Defaults to 1883.
      -q <qos>       Quality of Service value (0 or -1). Defaults to 0.
      -r             Message should be retained.
      -t <topic>     MQTT topic name to publish to.
      -T <topicid>   Pre-defined MQTT-SN topic ID to publish to.
      --fe           Enables Forwarder Encapsulation. Mqtt-sn packets are encapsulated according to MQTT-SN Protocol Specification v1.2, chapter 5.5 Forwarder Encapsulation.
      --wlnid        If Forwarder Encapsulation is enabled, wireless node ID for this client. Defaults to process id.

Subscribing
-----------

    Usage: mqtt-sn-sub [opts] -t <topic>

      -1             exit after receiving a single message.
      -c             disable 'clean session' (store subscription and pending messages when client disconnects).
      -d             Increase debug level by one. -d can occur multiple times.
      -h <host>      MQTT-SN host to connect to. Defaults to '<IP_ADDRESS>'.
      -i <clientid>  ID to use for this client. Defaults to 'mqtt-sn-tools-' with process id.
      -k <keepalive> keep alive in seconds for this client. Defaults to 10.
      -p <port>      Network port to connect to. Defaults to 1883.
      -t <topic>     MQTT topic name to subscribe to.
      -T <topicid>   Pre-defined MQTT-SN topic ID to subscribe to.
      --fe           Enables Forwarder Encapsulation. Mqtt-sn packets are encapsulated according to MQTT-SN Protocol Specification v1.2, chapter 5.5 Forwarder Encapsulation.
      --wlnid        If Forwarder Encapsulation is enabled, wireless node ID for this client. Defaults to process id.
      -v             Print messages verbosely, showing the topic name.
      -V             Print messages verbosely, showing current time and the topic name.

Dumping
-------

Displays MQTT-SN packets sent to specified port.
Most useful for listening out for QoS -1 messages being published by a client.

    Usage: mqtt-sn-dump [opts] -p <port>

      -a             Dump all packet types.
      -d             Increase debug level by one. -d can occur multiple times.
      -p <port>      Network port to listen on. Defaults to 1883.
      -v             Print messages verbosely, showing the topic name.

Serial Port Bridge
------------------

The Serial Port bridge can be used to relay packets from a remote device on the end of a
serial port and convert them into UDP packets, which are sent and received from a broker
or MQTT-SN gateway.

    Usage: mqtt-sn-serial-bridge [opts] <device>

      -b <baud>      Set the baud rate. Defaults to 9600.
      -d             Increase debug level by one. -d can occur multiple times.
      -dd            Enable extended debugging - display packets in hex.
      -h <host>      MQTT-SN host to connect to. Defaults to '<IP_ADDRESS>'.
      -p <port>      Network port to connect to. Defaults to 1883.
      --fe           Enables Forwarder Encapsulation. Mqtt-sn packets are encapsulated according to MQTT-SN Protocol Specification v1.2, chapter 5.5 Forwarder Encapsulation.

License
-------

MQTT-SN Tools is licensed under the [MIT License].

[MIT License]: http://opensource.org/licenses/MIT

repository: MichalFoksa/mqtt-sn-tools

repo_name: MichalFoksa/mqtt-sn-tools


text:
# Getting Started
-----------------

Devstep comes in two flavors, you can either use the provided CLI or you can build
on top of the provided images from `Dockerfile`s.

Regardless of the flavor you choose, it is a good idea to `docker pull fgrehm/devstep:v0.0.1`
before creating your first container / image for a better "user experience".
Docker will download that image as needed but by pulling it first you'll reduce
the waiting time when interacting with Devstep for the first time.

## Sanity check
---------------

This project is being developed and tested on an Ubuntu 14.04 host with Docker
1.0.0+, while it is likely to work on other distros / Docker versions /
[boot2docker](http://boot2docker.io/), I'm not sure how it will behave on the wild.

## Using the CLI
----------------

Before you try out the CLI, make sure you have Docker installed and that your
user is capable to run `docker` commands [without `sudo`](http://docs.docker.io/installation/ubuntulinux/#giving-non-root-access).

> **IMPORTANT**: The `developer` user that is used by Devstep assumes your user
and group ids are equal to `1000` when using the CLI or the container's init
process will be aborted. This is to guarantee that files created within Docker
containers have the appropriate permissions so that you can manipulate them
on the host without the need to use `sudo`. This is currently a Devstep limitation
that will be worked around in case there is enough demand or will be fixed once
Docker adds support for user namespaces ([#6600](https://github.com/dotcloud/docker/pull/6600)
/ [#6602](https://github.com/dotcloud/docker/pull/6602) / [#6603](https://github.com/dotcloud/docker/pull/6603)
/ [#4572](https://github.com/dotcloud/docker/pull/4572)).

> The `1000` id was chosen because it is the default uid / gid of Ubuntu Desktop users
that are created during the installation process. To work around this limitation,
please build your own image using the appropriate ids and add a `DEVSTEP_SOURCE_IMAGE=<YOUR-IMAGE>`
line to your `~/.devsteprc`.

To install the CLI, you can run the one liner below and read on for more:

```sh
L=$HOME/bin/devstep && curl -sL https://github.com/fgrehm/devstep/raw/master/devstep > $L && chmod +x $L
```

_The snippet above assumes `$HOME/bin` is on your PATH, please change `$HOME/bin`
to an appropriate path in case your system is not configured like that._

### `devstep hack`

This is the easiest way to get started with Devstep. By running the command
from your project's root, Devstep will:

1. Create a Docker container based on `fgrehm/devstep` with project sources bind
   mounted at `/workspace`.
2. Detect and install project's dependencies on the new container using the
   available buildpacks.
3. Start a `bash` session with everything in place for you to do your work.

Once you `exit` the `bash` session, the container will be garbage collected
(aka `docker rm`ed).

In case you need to provide additional parameters to the underlying `docker run`
command you can use the `-r` flag. For example, `devstep hack -r "-p 80:8080"` will
redirect the `8080` port on your host to the port `80` within the container.

### `devstep build`

By running the command from your project's root, Devstep will:

1. Create a Docker container based on `fgrehm/devstep` with project sources bind
   mounted at `/workspace`.
2. Detect and install project's dependencies on the new container using the
   available buildpacks.
3. `docker commit` the container to a `devstep/<PROJECT>:<TIMESTAMP>` image.
4. `docker tag` the new image as `devstep/<PROJECT>:latest`.

The `devstep/<PROJECT>` images act like snapshots of your project dependencies
and will be used as the source image for subsequent `devstep` commands instead
of the `fgrehm/devstep` image.

For example, running a `devstep hack` after building the image will use `devstep/<PROJECT>:latest`
as the base container for new "hacking sessions" so that you don't have to build
your project's environment from scratch. The same applies for a new `devstep build`,
which will build on top of the latest image reducing the overall build time when
compared to reconfiguring the environment from scratch using
`Dockerfile`s.

Because the `build` command bind mounts your project sources on the Docker container
during the configuration process, you'll have to provide the full path to sources
on the host machine as a Docker volume in order to work on the project.
`devstep hack` can take care of that for you or you can manually:

```sh
docker run -ti -v `pwd`:/workspace devstep/<PROJECT>
```

### Bootstrapping a new project (AKA solving the chicken or the egg problem)

Assuming you are willing to use Docker / Devstep to avoid cluttering your machine
with development tools, there's no point on installing Ruby / Python / ... on your
computer in order to scaffold a new project. To make that process easier, you can
use the `devstep bootstrap` command.

That command will start an interactive `bash` session with the current directory
bind mounted as `/workspace` on the container and you'll be able to manually
install packages / tools required to scaffold your new project. You can even
force a specific buildpack to run from there.

For example, scaffolding a new Rails project means:

```sh
cd $HOME/projects # or whatever directory you keep your projects
devstep bootstrap -w my_app

build-project -b ruby
source $HOME/load-env.sh
gem install rails
rails new my_app

exit # Or do some extra setup before exiting
```

Once you `exit` the container, you should end up with a `devstep/my_app` image
and a brand new Rails app under `$HOME/projects/my_app` on your machine. To
abort the bootstrap process, just `exit 1` from within the container and answer
'No' when asked for confirmation for commiting the image.

As with `devstep build`, subsequent `devstep` commands like `build` and `hack`
will use `devstep/my_app:latest` as the source image. Project sources
also won't get stored inside the Docker image and you'll need to provide the
full path to its sources on the host machine as a Docker volume in order to
work on the project. `devstep hack` can take care of that for you or you can
manually:

```sh
docker run -ti -v `pwd`:/workspace devstep/<PROJECT>
```

To bootstrap projects for other platforms and frameworks you can follow a similar
approach, replacing the Ruby / Rails specifics with the platform / framework
of choice.

### Caching project's dependencies packages on the host

As mentioned on the [introduction](introduction) section, Devstep is also capable
of reducing disk space and initial configuration times by caching packages on the
host using a strategy similar to [vagrant-cachier's cache buckets](http://fgrehm.viewdocs.io/vagrant-cachier/how-does-it-work).
This behavior is enabled by default and will be further documented on the future.
For now you need to know that the `/tmp/devstep/cache` dir on the host will be bind
mounted to containers created by the CLI under `/.devstep/cache` and most of your
project's dependencies packages will be downloaded to there. Note that the dependencies
themselves are extracted and kept inside the images built by the CLI and you can
safely clean things up or disable the caching behavior at will.

To disable the caching functionality you can add the `DEVSTEP_CACHE_PATH=""`
line to your `~/.devsteprc`.

### Other commands

* `clean` -> Remove all images built for the current project
* `pristine` -> Rebuild current project associated Docker image from scratch
* `run` -> Run a one off command against the current source image
* `images` -> Display images available for the current project
* `ps` -> List all containers associated with the current project
* `info` -> Show some information about the current project

For the most up-to-date list of supported commands, run `devstep --help`.

## Building images using `Dockerfiles`
--------------------------------------

In case your project require additional stuff to work you can use the provided
`fgrehm/devstep`, `fgrehm/devstep-ab` or `fgrehm/devstep-sa` images as a starting
point for your `Dockerfile`s.

The `fgrehm/devstep` image is the base image used for Devstep environments and
requires you to manually trigger the build:

```Dockerfile
FROM fgrehm/devstep:v0.0.1

# Add project to the image and build it
ADD . /workspace
WORKDIR /workspace
RUN CLEANUP=1 /.devstep/bin/build-project /workspace
```

To make things easier, there's also a `fgrehm/devstep-ab:v0.0.1` image that
does the same steps as outlined above automatically for you by leveraging `ONBUILD`
instructions, trimming down your `Dockerfile` to a single line:

```Dockerfile
FROM fgrehm/devstep-ab:v0.0.1
```

And in case you want to run extra services (like a DB) within the same container
of your project, you can use the `fgrehm/devstep-sa` image:

```Dockerfile
FROM fgrehm/devstep-sa:v0.0.1

# Add project to the image and build it
ADD . /workspace
WORKDIR /workspace
RUN CLEANUP=1 /.devstep/bin/build-project /workspace

# Configure PostgreSQL and Redis to run on the project's container
RUN /.devstep/bin/configure-addons postgresql redis
```

By using a `Dockerfile` to build your images (instead of using `devstep build`)
you'll be able to skip mounting project's sources on the container when running
it and a simple `docker run -it <IMAGE-NAME>` should do the trick. **_Keep in mind
that changes made to project sources will be kept inside the container and
you'll lose them when you `docker rm` it._**

## Available buildpacks
-----------------------

* [Bats](https://github.com/fgrehm/devstep/tree/master/buildpacks/bats)
* [Golang](https://github.com/fgrehm/devstep/tree/master/buildpacks/golang)
* [Inline](https://github.com/fgrehm/devstep/tree/master/buildpacks/inline)
* [NodeJS](https://github.com/fgrehm/devstep/tree/master/buildpacks/nodejs)
* [PHP](https://github.com/fgrehm/devstep/tree/master/buildpacks/php)
* [Python](https://github.com/fgrehm/devstep/tree/master/buildpacks/python)
* [Ruby](https://github.com/fgrehm/devstep/tree/master/buildpacks/ruby)

## More information
-------------------

If you reached this point it means you should have a good understanding of how
Devstep works and what you can do with it. If you are still wondering how you can
use the tool and / or benefit from it, please create a [new issue](https://github.com/fgrehm/devstep/issues/new)
so that we can discuss how can we improve the docs :)

license: MIT

repository: akretion/devstep

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: akretion/devstep


text:
[![Build Status](https://dev.azure.com/johannfaouzi0034/johannfaouzi/_apis/build/status/johannfaouzi.pyts?branchName=main)](https://dev.azure.com/johannfaouzi0034/johannfaouzi/_build/latest?definitionId=1&branchName=main)
[![Documentation Status](https://readthedocs.org/projects/pyts/badge/?version=latest)](https://pyts.readthedocs.io/)
[![Codecov](https://codecov.io/gh/johannfaouzi/pyts/branch/main/graph/badge.svg)](https://codecov.io/gh/johannfaouzi/pyts)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyts.svg)](https://img.shields.io/pypi/pyversions/pyts.svg)
[![PyPI version](https://badge.fury.io/py/pyts.svg)](https://badge.fury.io/py/pyts)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pyts.svg)](https://anaconda.org/conda-forge/pyts)
[![CodeQL](https://github.com/johannfaouzi/pyts/workflows/CodeQL/badge.svg)](https://github.com/johannfaouzi/pyts/actions?query=workflow%3ACodeQL)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1244152.svg)](https://doi.org/10.5281/zenodo.1244152)

## pyts: a Python package for time series classification

pyts is a Python package for time series classification. It
aims to make time series classification easily accessible by providing
preprocessing and utility tools, and implementations of
state-of-the-art algorithms. Most of these algorithms transform time series,
thus pyts provides several tools to perform these transformations.

### Installation

#### Dependencies

pyts requires:

- Python (>= 3.8)
- NumPy (>= 1.22.4)
- SciPy (>= 1.8.1)
- Scikit-Learn (>= 1.2.0)
- Joblib (>= 1.1.1)
- Numba (>= 0.55.2)

To run the examples Matplotlib (>=2.0.0) is required.

#### User installation

If you already have a working installation of numpy, scipy, scikit-learn,
joblib and numba, you can easily install pyts using ``pip``

    pip install pyts

or ``conda`` via the ``conda-forge`` channel

    conda install -c conda-forge pyts

You can also get the latest version of pyts by cloning the repository

    git clone https://github.com/johannfaouzi/pyts.git
    cd pyts
    pip install .

#### Testing

After installation, you can launch the test suite from outside the source
directory using pytest:

    pytest pyts

### Changelog

See the [changelog](https://pyts.readthedocs.io/en/stable/changelog.html)
for a history of notable changes to pyts.

### Development

The development of this package is in line with the one of the scikit-learn
community. Therefore, you can refer to their
[Development Guide](https://scikit-learn.org/stable/developers/). A slight
difference is the use of Numba instead of Cython for optimization.

### Documentation

The section below gives some information about the implemented algorithms in pyts.
For more information, please have a look at the
[HTML documentation available via ReadTheDocs](https://pyts.readthedocs.io/).

### Citation

If you use pyts in a scientific publication, we would appreciate
citations to the following [paper](http://www.jmlr.org/papers/v21/19-763.html):
```
Johann Faouzi and Hicham Janati. pyts: A python package for time series classification.
Journal of Machine Learning Research, 21(46):1−6, 2020.
```

Bibtex entry:
```
@article{JMLR:v21:19-763,
  author  = {Johann Faouzi and Hicham Janati},
  title   = {pyts: A Python Package for Time Series Classification},
  journal = {Journal of Machine Learning Research},
  year    = {2020},
  volume  = {21},
  number  = {46},
  pages   = {1-6},
  url     = {http://jmlr.org/papers/v21/19-763.html}
}
```

### Implemented features

**Note: the content described in this section corresponds to the main branch
(i.e., the latest version), and not the latest released version. You may have to
install the latest version to use some of these features.**

pyts consists of the following modules:

- `approximation`: This module provides implementations of algorithms that
approximate time series. Implemented algorithms are
[Piecewise Aggregate Approximation](https://pyts.readthedocs.io/en/latest/generated/pyts.approximation.PiecewiseAggregateApproximation.html),
[Symbolic Aggregate approXimation](https://pyts.readthedocs.io/en/latest/generated/pyts.approximation.SymbolicAggregateApproximation.html),
[Discrete Fourier Transform](https://pyts.readthedocs.io/en/latest/generated/pyts.approximation.DiscreteFourierTransform.html),
[Multiple Coefficient Binning](https://pyts.readthedocs.io/en/latest/generated/pyts.approximation.MultipleCoefficientBinning.html) and
[Symbolic Fourier Approximation](https://pyts.readthedocs.io/en/latest/generated/pyts.approximation.SymbolicFourierApproximation.html).

- `bag_of_words`: This module provide tools to transform time series into bags
of words. Implemented algorithms are
[WordExtractor](https://pyts.readthedocs.io/en/latest/generated/pyts.bag_of_words.WordExtractor.html) and
[BagOfWords](https://pyts.readthedocs.io/en/latest/generated/pyts.bag_of_words.BagOfWords.html).

- `classification`: This module provides implementations of algorithms that
can classify time series. Implemented algorithms are
[KNeighborsClassifier](https://pyts.readthedocs.io/en/latest/generated/pyts.classification.KNeighborsClassifier.html),
[SAXVSM](https://pyts.readthedocs.io/en/latest/generated/pyts.classification.SAXVSM.html),
[BOSSVS](https://pyts.readthedocs.io/en/latest/generated/pyts.classification.BOSSVS.html),
[LearningShapelets](https://pyts.readthedocs.io/en/latest/generated/pyts.classification.LearningShapelets.html),
[TimeSeriesForest](https://pyts.readthedocs.io/en/latest/generated/pyts.classification.TimeSeriesForest.html) and
[TSBF](https://pyts.readthedocs.io/en/latest/generated/pyts.classification.TSBF.html).

- `datasets`: This module provides utilities to make or load toy datasets,
as well as fetching datasets from the
[UEA & UCR Time Series Classification Repository](http://www.timeseriesclassification.com).

- `decomposition`: This module provides implementations of algorithms that
decompose a time series into several time series. The only implemented
algorithm is
[Singular Spectrum Analysis](https://pyts.readthedocs.io/en/latest/generated/pyts.decomposition.SingularSpectrumAnalysis.html).

- `image`: This module provides implementations of algorithms that transform
time series into images. Implemented algorithms are
[Recurrence Plot](https://pyts.readthedocs.io/en/latest/generated/pyts.image.RecurrencePlot.html),
[Gramian Angular Field](https://pyts.readthedocs.io/en/latest/generated/pyts.image.GramianAngularField.html) and
[Markov Transition Field](https://pyts.readthedocs.io/en/latest/generated/pyts.image.MarkovTransitionField.html).

- `metrics`: This module provides implementations of metrics that are specific
to time series. Implemented metrics are
[Dynamic Time Warping](https://pyts.readthedocs.io/en/latest/generated/pyts.metrics.dtw.html)
with several variants and the
[BOSS](https://pyts.readthedocs.io/en/latest/generated/pyts.metrics.boss.html)
metric.

- `multivariate`: This modules provides utilities to deal with multivariate
time series. Available tools are
[MultivariateTransformer](https://pyts.readthedocs.io/en/latest/generated/pyts.multivariate.transformation.MultivariateTransformer.html) and
[MultivariateClassifier](https://pyts.readthedocs.io/en/latest/generated/pyts.multivariate.classification.MultivariateClassifier.html)
to transform and classify multivariate time series using tools for univariate
time series respectively, as well as
[JointRecurrencePlot](https://pyts.readthedocs.io/en/latest/generated/pyts.multivariate.image.JointRecurrencePlot.html) and
[WEASEL+MUSE](https://pyts.readthedocs.io/en/latest/generated/pyts.multivariate.transformation.WEASELMUSE.html).

- `preprocessing`: This module provides most of the scikit-learn preprocessing
tools but applied sample-wise (i.e. to each time series independently) instead
of feature-wise, as well as an
[imputer](https://pyts.readthedocs.io/en/latest/generated/pyts.preprocessing.InterpolationImputer.html)
of missing values using interpolation. More information is available at the
[pyts.preprocessing API documentation](https://pyts.readthedocs.io/en/latest/api.html#module-pyts.preprocessing).

- `transformation`: This module provides implementations of algorithms that
transform a data set of time series with shape `(n_samples, n_timestamps)` into
a data set with shape `(n_samples, n_extracted_features)`. Implemented algorithms are
[BagOfPatterns](https://pyts.readthedocs.io/en/latest/generated/pyts.transformation.BagOfPatterns.html),
[BOSS](https://pyts.readthedocs.io/en/latest/generated/pyts.transformation.BOSS.html),
[ShapeletTransform](https://pyts.readthedocs.io/en/latest/generated/pyts.transformation.ShapeletTransform.html),
[WEASEL](https://pyts.readthedocs.io/en/latest/generated/pyts.transformation.WEASEL.html) and
[ROCKET](https://pyts.readthedocs.io/en/latest/generated/pyts.transformation.ROCKET.html).

- `utils`: a simple module with
[utility functions](https://pyts.readthedocs.io/en/latest/api.html#module-pyts.utils).

## License
The contents of this repository is under a [BSD 3-Clause License](https://github.com/johannfaouzi/pyts/blob/main/LICENSE.txt).

repository: johannfaouzi/pyts

branch_name: refs/heads/main

gha_language: Python

repo_name: johannfaouzi/pyts


text:
### [CVE-2019-6579](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6579)
![](https://img.shields.io/static/v1?label=Product&message=Spectrum%20Power%E2%84%A2%204&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-77%3A%20Improper%20Neutralization%20of%20Special%20Elements%20used%20in%20a%20Command%20('Command%20Injection')&color=brighgreen)

### Description

A vulnerability has been identified in Spectrum Power 4 (with Web Office Portal). An attacker with network access to the web server on port 80/TCP or 443/TCP could execute system commands with administrative privileges. The security vulnerability could be exploited by an unauthenticated attacker with network access to the affected service. No user interaction is required to exploit this security vulnerability. Successful exploitation of the security vulnerability compromises confidentiality, integrity or availability of the targeted system. At the time of advisory publication no public exploitation of this security vulnerability was known.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/Ebanim/RedvsBlueProject
- https://github.com/MinYoungLeeDev/Attack-Defense-Analysis-of-a-Vulnerable-Network
- https://github.com/cltempleton1127/Red-Team_Blue-Team-Project2
- https://github.com/dp2ur/Project-2-Capstone-Engagement
- https://github.com/joshblack07/UR-Cyber-Security-Red_vs_Blue
- https://github.com/laurapratt87/Capstone-Engagement-Project-Red-Team-v.-Blue-Team
- https://github.com/vivekaom/pentest_example
- https://github.com/wevertonribeiroferreira/Red-vs-Blue-Project

repository: trickest/cve

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# This is the PayPal Payment module for Vue Storefront

PayPal Payment Magento 1 & 2 module for [vue-storefront](https://github.com/DivanteLtd/vue-storefront)

![default](https://imgur.com/QFCUX0R.jpg)

Tested with VSF 1.12.x

This module is for those who want to use Magento 1 & 2's built in Paypal extension that uses the deprecated NVP/Soap api. Tested on Magento 1.9.x, 2.2.x and 2.3.x. This allows for backend Magento management of the Order lifecycle.

This module can also be used with the newer API calls easily, as address and cart items are set to be transferred to Paypal SmartButton.

## Installation

By hand (preferer):

```shell
$ git clone git@github.com:develodesign/vsf-payment-paypal.git ./vue-storefront/src/modules/paypal
```

```json
"paypal": {
  "clientId": "",
  "disabledMethods": ["giropay", "sofort", "card", "credit", "mybank", "sepa"],
  "addJsToGlobalHead": true,
  "endpoint": {
    "complete": "/api/ext/paypal/complete",
    "setExpressCheckout": "/api/ext/paypal/setExpressCheckout"
  }
}
```

#### Add JS to Head
If you want to defer adding the JS to head globally, you can set `addJsToGlobalHead` to `false`

This will defer the beforeRegistration hook and then you can add the below into the mounted lifecycle on your checkout component where you will import the Paypal button.

```js
mounted () {
    if (!isServer && window.paypalScriptLoaded === undefined) {
      const storeView = currentStoreView()
      const { currencyCode } = storeView.i18n
      const clientId = config.paypal.hasOwnProperty('clientId') ? config.paypal.clientId : ''
      const sdkUrl = `https://www.paypal.com/sdk/js?client-id=${clientId}&currency=${currencyCode}&disable-funding=card,credit,mybank,sofort`
      var script = document.createElement('script')
      script.setAttribute('src', sdkUrl)
      document.head.appendChild(script)
      window.paypalScriptLoaded = true
    }
}

```

## Registration the Paypal module

Let's edit `config/modules.ts`
If you use the default theme, the module registration lives here: `./src/themes/modules/client.ts`.
With Capybara, it's here: `./src/themes/capybara/config/modules.ts`.

```js
...
import { PaymentPaypalModule } from './paypal'; // Default theme
import { PaymentPaypalModule } from '../../../modules/paypal'; // Capybara theme

export function registerClientModules () {
  ...
  registerModule(PaymentPaypalModule)
}
```

## Integration to the Default VSF theme (vsf-default)

Add the following to your component `components/core/blocks/Checkout/OrderReview.vue`:

```js
import PaypalButton from '@develodesign/vsf-payment-paypal/components/Button'

export default {
  components: {
    ...
    PaypalButton
  },
  ...
  computed: {
    payment () {
      return this.$store.state.checkout.paymentDetails
    }
  }
```

And add the paypal button before `button-full` component:

```html
<paypal-button v-if="payment.paymentMethod === 'paypal_express'"/>
<button-full
  v-else
  @click.native="placeOrder"
  data-testid="orderReviewSubmit"
  class="place-order-btn"
  :disabled="$v.orderReview.$invalid"
>
  {{ $t('Place the order') }}
</button-full>
```

## Integration to the Capybara theme (vsf-capybara)

![capybara](https://imgur.com/Kgm9McA.jpg)

Add the following to your component `components/organisms/o-confirm-order.vue`:

```js
import PaypalButton from '@develodesign/vsf-payment-paypal/components/Button'

export default {
  components: {
    ...
    PaypalButton
  }
```
*** The computed `paymentDetails` in o-confirm-order.vue available out of the box in Capybara theme. ***

And add the Paypal component before place order button. Don't forget to add the `v-else` condition for the place order `SfButton` component.

```html
<paypal-button v-if="paymentDetails.paymentMethod === 'paypal_express' && !$v.orderReview.$invalid"/>
<SfButton
  v-else
  class="sf-button--full-width actions__button"
  :disabled="$v.orderReview.$invalid || !productsInCart.length"
  @click="placeOrder"
>
  {{ $t("Place the order") }}
</SfButton>
```

## PayPal payment API extension

Install extension to `vue-storefront-api`:

```shell
yarn add -W @paypal/checkout-server-sdk paypal-nvp-api
```

```shell
$ cp -fr src/modules/paypal/api/paypal ../vue-storefront-api/src/api/extensions/
```

Go to api config  `./vue-storefront-api/config/local.json` and register the Paypal Api extension:

```json
"registeredExtensions": [
    ...
    "paypal"
]
```

And add the `paypal` settings to `extensions` key:

Add the following also to your `config/local.json` need set `paypal.env` to `sandbox` or `live`.

```json
  "extensions": {
    "paypal": {
      "env": "sandbox",
      "clientId": "",
      "secret": "",
      "username": "",
      "password": "",
      "signature": ""
    },
    ...
  }
```

### Important
If the JSON object sent to the VSF API order is bigger than the body-parser limit, you get the exception `PayloadTooLargeError`.
For this reason, it's strongly recommended to increase the `bodyLimit` value, especially if some PayPal orders fail.

## Magento integration

Turn on Paypal Express and provide the API credentials using the built in Paypal module. Enable only Express Checkout.

Other Paypal methods are not supported or tested right now.

### Important
For Magento 1.9.x you need to manually apply this fix on the magento1-vsbridge in order to correctly works with this module: [Fix Create order](https://github.com/DivanteLtd/magento1-vsbridge/pull/55).

## Customization

Also we can use `paypal.style` option for more customizable PayPal button view. For more info [PayPal](https://developer.paypal.com/demo/checkout/#/pattern/checkout).

In OrderReview.vue, the button takes prop styling

```html
  <paypal-button :styling="{ color: 'black' }"
```

repository: develodesign/vsf-payment-paypal

gha_language: TypeScript

repo_name: develodesign/vsf-payment-paypal


text:
---
title: IoT — Communication protocols
date: "2018-11-19T13:48:25.931Z"
course: Internet of Things
tags: mqtt, data transfer, binary
draft: false
---

This session will be a bit more theoretical,
because the resulting behavior of the server and
the program running on the Raspberry Pi won't
change much. The goal is to re-implement the
client-server communication from
[last session](https://kalleott.de/iot/reading-sensors),
but with a more efficient communication protocol.

Last time the data was transferred via
HTTP-requests. HTTP or the "hypertext transfer
protocol" is the standard of day to day web
communication, as the name suggests it is text
based and developed to transfer mostly textual
information like websites. Besides the actual
content there is a header block containing meta
information about the request made.

![http message example](/images/http-message-example.png)
[more on MDN web docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages)

Especially the header block can get pretty large
in comparison to the payload transferred in the
body.

For comparison look at MQTT, it is a message
protocol made for machine to machine
communication. Instead of relying on strings to
represent information the default is binary. Like
HTTP MQTT has a header to declare what kind of
information the message holds. But the minimum
size is only 2 bytes.

The first 4 bits of the header define the message
type:

- `CONNECT - 0001`
- `CONNACK - 0010`
- `PUBLISH - 0011`
- `PUBACK - 0100`
- `PUBREC - 0101`
- `PUBREL - 0110`
- `PUBCOMP - 0111`
- `SUBSCRIBE - 1000`
- `SUBACK - 1001`
- `UNSUBSCRIBE - 1010`
- `UNSUBACK - 1011`
- `PINGREQ - 1100`
- `PINGRESP - 1101`
- `DISCONNECT - 1110`

The remaining 4 bits of the first byte are used to
further specify the behavior of the request
defined by the type bits. For example: A publish
message can specify a quality of service (QoS) to
be delivered at most once, at least once or
exactly once.

The second byte of the fixed header length is used
to describe the length of the actual message.
Seven bits are used as a numeric value and the
eighth is a "continuation" bit, which is set when
the message is longer then 7 bits can describe.
With this technique the length information can
grow to 4 bytes long to send messages up to 256MB
large.

So a minimal message would look like this:
`1100 0000 0000 0000` (disconnect). For numeric
data the benefits are easy to see, but also text
based data can be sent easily because the message
body has no specified format.

Besides this obvious advantages there is of course
also the drawback of a binary format that's not
human readable, so debugging is more complicated
and custom binary formats almost always mean more
work to support them. The decision what protocol
is best for your use case can most times be made
depending on the scale. That's why in industrial
scale scenarios where potentially millions of
messages come together in minutes or seconds the
used protocols are always optimized for small
message footprints.

## Publish and subscribe

Instead of programming a server to receive the
message and digest it MQTT works with a message
broker which receives all messages and delivers
them to clients which have subscribed to them. All
messages are published to a specific topic which
is then used by the broker to deliver the message
only to clients subscribed to this specific topic.
A topic is a string, which behaves pretty much
like an URL. A valid topic would be
`home/livingRoom/temperature`.

For subscriptions there are special characters
used for wildcards. If you want to get all
messages coming under the topic `home` you can
subscribe to `home/#`. If you want to be a little
more specific and only one layer of wildcard you
can use the `+` symbol. Every value posted to the
living room in your home would be
`home/livingRoom/+`, or every temperature value in
all rooms in your home could be
`home/+/temperature`. You can read more on those
rules in
[the official spec](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/csprd02/mqtt-v3.1.1-csprd02.html#_Ref374621403).

Because an MQTT broker is not completely easy to
run on all platforms I suggest the service
[cloudmqtt](https://www.cloudmqtt.com). This
platform provides the "Cute Cat" plan free of
charge for small hobby projects. When you have
created an MQTT instance you can create a node
program using the
[mqtt](https://www.npmjs.com/package/mqtt)
package.

To test your instance you can use this hello world
implementation:

```js
const mqtt = require("mqtt");
const client = mqtt.connect(
  "$MQTT_INSTANCE_ADDRESS$",
  {
    port: $MQTT_INSTANCE_SSL_PORT$,
    protocol: "mqtts",
    username: "$MQTT_INSTANCE_USER_NAME$",
    password: "$MQTT_INSTANCE_PASSWORD$",
  }
);

client.on("connect", () => {
  client.subscribe("presence", (err) => {
    if (!err) {
      client.publish("presence", "Hello mqtt");
    }
  });
});

client.on("message", (topic, message) => {
  // message is Buffer
  console.log(message.toString());
  client.end();
});
```

It connects to the server, subscribes to the
`presence` topic and when the subscription is
built successfully it sends a "Hello mqtt" message
on the `presence` topic. When the client receives
a message it logs it to the console and ends the
connection.

### Tasks

- Create an MQTT server
  ([cloudmqtt](https://www.cloudmqtt.com) has a
  free to use plan)
- Extend the sensor server implementation to
  listen for sensor events from your device
- Extend the sensor readings implementation to
  publish the sensor values via MQTT
- Instead of sending the values as JSON send it as
  binary data with an
  [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)


text:
# PII Detection Tool

Since the introduction of the General Data Protection Regulation (GDPR) by the European Union in 2018, companies and individuals alike have been looking for solutions to combat data privacy vulnerabilities in their data sources. This tool aims to  be a completely open-source, flexible, and scalable service to identify and act upon Personally Identifiable Information found in your data.

## Getting Started

Currently supported Data Sources:

* JSON
* MySQL Database
* CSV

### Prerequisites

* Python 3.5+ and it's associated package manager, 'pip'

  * Check python version in Linux/Windows/MacOS: `python -V`
  * Install python : [https://www.python.org/downloads/]()

### Installing

Clone or download the repo:

```
git clone https://github.com/mmcatcd/pii-tool.git
```

cd into the repo:

```
cd path/to/the/repo/pii-tool
```

Install the project dependencies:

```
pip install -r requirements.txt
```

## Usage
For CSV and JSON files make sure the file is in the same directory as the main pii_tool.py file.

Example usage:

Add some rules to the rules.txt file in the pii_tool folder (Create your own or use some from the provided European RegEx.csv), making sure that they reflect the data in YOUR source and then:

```
python3 pii_tool.py -i tests/employees.json
```

```
python3 pii_tool.py -i tests/people.csv
```

```
python3 pii_tool.y -d hostname username database tablename
```

## Contributing

All contributions welcome, make sure to update the README with any relevant and significant changes to the interface/usage.

## License

This project is licensed under the MIT License - see the LICENCE file for details.


text:
----------------------------------
## jamovi/2.3 ##
Short_description_of_container
Jamovi is a GUI-based statistics package based on R

Example:
```
```

More documentation can be found here: link_to_documentation

To run applications outside of this container: ml Name_of_Container/version

Citation:
```

```

----------------------------------

repository: CAIsr/caid

gha_language: Shell

repo_name: CAIsr/caid


text:
# Vale Compiler

Compiler for the Vale programming language.

## Vale

Vale is the fast, fearless, and flexible programming language. It aims to be as fast as Rust, while being as easy as Java, as safe as Javascript.

See http://vale.dev/ for samples and more information on the language!

## Building and Running

For instructions for building the compiler itself, see:

 * [Building the Vale Compiler (Linux)](build-linux.sh)
 * [Building the Vale Compiler (Mac)](build-mac.sh)
 * [Building the Vale Compiler (Windows)](build-windows.md)

If you just want to build and run Vale programs, go to the [download](https://vale.dev/download) page instead.

## Guide

See [the Guide](https://vale.dev/guide/introduction) for how to use Vale.

## Vale code examples

A number of working examples grouped by functionality can be found [here](https://github.com/Ivo-Balbaert/Vale_Examples)

## Editor plugins

- [VSCode plugin](https://marketplace.visualstudio.com/items?itemName=pacifio.vale-lang): Syntax-highlighting and basic autocompletion.
- [Vim plugin](https://github.com/jfecher/vale.vim): Syntax-highlighting

# Notes

Vale started in January 2013, and back then we called it "VLang", though there's now another language with that name. We then called it GelLLVM, in honor of Gel, the first language to offer constraint references. Since then, we've settled on the name "Vale". Note that Vale and Vala are two different languages.

repository: mihneagogu/Vale

repo_name: mihneagogu/Vale


text:
Controller plugin
=================

The module comes with the `uploads()` plugin that allows us to easily access the upload container along with some other goodies.

~~~php
class FooController
{
	public function viewAction()
	{
		$id = /* ... */;
		$object = $this->uploads()->get($id);
	}
}
~~~

You have access to the following methods from this plugin:

* `upload($input)`
* `get($id)`
* `download($id)`
* `has($id)`
* `delete($id)`
* `getContainer()` - Returns the upload container.

## Authorization

In many cases instead of allowing public web access to uploaded files you would like to place them behind some form of authorization. The `getResponse()` method inside the controller plugin makes this easy as pie.

~~~php
// inside a controller action

$id = /* ... */;

if (/* not allowed to view file */)
{
	throw new AccessDeniedException("You do not have access to this file!");
}

return $this->uploads()->getResponse($id);
~~~

## Configuration

The controller plugin is configured as an alias to `RdnUpload:Uploads`. If you have another plugin with this same name, you can change the plugin's name by using the following configuration:

~~~php
<?php

return array(
	'controller_plugins' => array(
		'aliases' => array(
			'fooUploads' => 'RdnUpload:Uploads',
		),
	),
);
~~~

repository: radnan/rdn-upload

gha_language: PHP

repo_name: radnan/rdn-upload


text:
Streetepistemology(SE)

Epistemology is the study of knowledge. What we know, how we know it, how we know we know it, and how to keep track of it without driving ourselves crazy.

Street here is just that the presenter does this discussion with people on street.

### Objective is:
* To understand how did one reach a conclusion ? How they got to that conclusion ??
* Atleast make the other person think on the beliefs they got fixated to. So people are really dogmatic, we must accept it. The argument in this case could endup in ad hominem. So understand "You objective is not winning your argument over the other person's"

## Three most important elements in discussion:
- Person, Method, Conclusion.
- Person: Tone of voice, body language, relaxed state or agitated or nervous
- Method: Question oriented discussion, relaxed exchange of statements, Shouting match
- Conclusion: Discussion helped the person's to think logically of their beliefs, person agrees with you

## Logical thinking steps:
- How did you figure that out ?
- Is that method reliable ?
- How can we test that ?
- What's a good way to reach that conclusion ?

## General Questions:
- Anything What do you strongly believe in Or very confident about ?
- On a scale of 10 Or in percentage how sure you are in your belief Or how confident your belief is true ?
- What got you to that level (e.g. 90% confidence) in your belief or conclusion ?
- Could that method ever lead to false conclusions ?
- Is there a better way to reach that conclusion than personal experience ?
- Would different personal experiences affect your belief ?
- Clarification questions:
  - What do you mean by that ?
  - Rephrase their point and repeat it as a question. Like say "So what i understand from your point is that, lion is really the king of jungle, right ?"
  - Could you elaborate ?
  - If science is limited, what is the foundation of your belief ? If they say "I have faith on the god basing on which I derive my conclusion", look below question.
  - What do you mean by faith Or What 'faith' means to you ?
  - Is faith a reliable way to reach a true conclusion ?
  - Relying on faith, can two person come to same conclusion ?
  - Can each person have their own faith's but not reach same conclusion ? My faith is non-existance of god, while your faith is in existence of god. So by relying on faith can we reach to a conclusion ?
  - Are there more reliable ways than relying on just faith ?
  - What other ways or foundations you could have come to your conclusion/belief ?
  - The book or person(s) may not be lying but that's really could be a low bar of evidence ? So, do we have anything that raises that bar with evidence and which could make us truly believe ?

## Important points:
- Start with asking how they would rate their belief and understanding on scale of 1 to 10 Or like in percent.
- Concrete number helps us understand how truly sure/confident the other person is in their belief and understanding.
- Watch your tone; Shouting only makes other person defensive and dig-in on their point with the intent to defend and save their face, though they know their point could be wrong. They would become dogmatic.
- Never target the person Or their belief, they could take as challenging them and it could lead to other person becoming adamant and deaf to your points, as they become defensive

### Refereces:
- https://www.youtube.com/watch?v=5gB-jIFefN4

repository: sunkavallivijay/leadership

repo_name: sunkavallivijay/leadership


text:
# TorchMD

## About
TorchMD intends to provide a simple to use API for performing molecular dynamics using PyTorch. This enables researchers to more rapidly do research in force-field development as well as integrate seamlessly neural network potentials into the dynamics, with the simplicity and power of PyTorch.

TorchMD is currently WIP so feel free to provide feedback on the API or potential bugs in the GitHub issue tracker.

## Citation
Please cite:
```
@misc{doerr2020torchmd,
      title={TorchMD: A deep learning framework for molecular simulations},
      author={Stefan Doerr and Maciej Majewsk and Adrià Pérez and Andreas Krämer and Cecilia Clementi and Frank Noe and Toni Giorgino and Gianni De Fabritiis},
      year={2020},
      eprint={2012.12106},
      archivePrefix={arXiv},
      primaryClass={physics.chem-ph}
}
```

## Installation
We recommend installing TorchMD in a new python environment ideally through the Miniconda package manager.

```
conda create -n torchmd
conda activate torchmd
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
conda install ipython

pip install torchmd
```

## Examples
Various examples can be found in the `examples` folder on how to perform dynamics using TorchMD.

## Acknowledgements
We would like to acknowledge funding by the Chan Zuckerberg Initiative and Acellera in support of this project. This project will be now developed in collaboration with openMM (www.openmm.org) and acemd (www.acellera.com/acemd).

repository: caiyingchun/torchmd

repo_name: caiyingchun/torchmd


text:
# Wordfor

A simple command line thesaurus based on the
[WordNet](http://wordnet.princeton.edu/) database. It can help you get other
**word**s **for** things, which can be particularly useful if your dayjob
requires frequent naming of things.

To "bulk up" the results, I'm using a traversal of the input word's [hyponyms
and hypernyms](http://en.wikipedia.org/wiki/Hyponymy). Sometimes these look a
lot like synonyms, sometimes they get a little weird.

## Installation

Install the gem by running:

    $ gem install wordfor

This gem requires Ruby 1.9.2 or higher.

 Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: abachman/wordfor

repo_name: abachman/wordfor


text:
# EventManager

You can create all event handlers the same way as you do in Crafttweaker:
```
events.eventName(function(event as eventType){
	//Executable Code here
});
```

Below you will find all currently added events that Game Stages should fire.
None of these events returns anything (they all are void functions).

| EventCall                        | EventType                                                                      |
|----------------------------------|--------------------------------------------------------------------------------|
| onGameStagesAdd                  | [`mods.gamestages.GameStageEventCancelable`](Events/GameStageEvent)            |
| onGameStagesAdded                | [`mods.gamestages.GameStageEvent`](Events/GameStageEvent)                      |
| onGameStagesRemove               | [`mods.gamestages.GameStageEventCancelable`](Events/GameStageEvent)            |
| onGameStagesRemoved              | [`mods.gamestages.GameStageEvent`](Events/GameStageEvent)                      |
| onGameStagesCheck                | [`mods.gamestages.GameStageEventCancelable`](Events/GameStageEvent)            |

repository: masterbobli/CraftTweaker-Documentation

repo_name: masterbobli/CraftTweaker-Documentation


text:
1) User registration - form with e-mail and password fields + e-mail verification using ajax.
Existence of already registered e-mail should be checked “on the fly” via ajax call when writing e-mail address and before submitting form.
After registration user should receive confirmation e-mail.
2) Login form with e-mail address and password
Logins are permitted only for successfully verified e-mail addresses.
3) RSS feed view
After successful login display top 20 news from following RSS feed https://www.delfi.lv/rss/?channel=delfi

You should do this task by showing your best experience in UX, UI, backend stuff.
There are no restrictions on frameworks (PHP and/or JS) used.

## Docker installation
1. Install [docker](https://docs.docker.com/engine/installation/), [docker-compose](https://docs.docker.com/compose/install/) and [composer](https://getcomposer.org/) to your system (that is host machine)
2. Run ``cp .env-dist .env`` to copy config file and ``composer run-script docker:start`` to start, ``docker-compose exec app composer install && docker-compose exec app console/yii app/setup``
3. That's all - your application is accessible on [http://yii2-starter-kit.localhost](http://yii2-starter-kit.localhost)

 * - docker host IP address may vary on Windows and MacOS systems

*PS* Also you can use bash inside application container. To do so run `docker-compose exec app bash`
*PS* If app does not work right, check docker image name using `docker ps -a`
*PS* To start fresh docker run ``docker-compose down --volumes --remove-orphans && docker system prune -a``

### Docker FAQ
1. How do i run yii console commands from outside a container?

``docker-compose exec app console/yii help``

``docker-compose exec app console/yii migrate``

``docker-compose exec app console/yii rbac-migrate``

2. How to connect to the application database with my workbench, navicat etc?
MySQL is available on `yii2-starter-kit.localhost`, port `3306`. User - `root`, password - `root`

## Demo data
```
Login: webmaster
Password: webmaster

Login: manager
Password: manager

Login: user
Password: user
```

## How do i access mailcatcher?
In docker installation mailcatcher is running on [yii2-starter-kit.localhost:1080](yii2-starter-kit.localhost:1080)

# Testing

To run tests:
1. Start containers:
```
docker-compose up -d
```
2. Create `tests` database:
windows version
linux version
```
docker-compose exec db mysql -uroot -proot -e "CREATE DATABASE `yii2-starter-kit-test` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
docker-compose exec db mysql -uroot -proot -e "CREATE DATABASE \`yii2-starter-kit-test\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
```
3. Build needed files
```
docker-compose exec app ./vendor/bin/codecept build
```
4. Setup application:
```
docker-compose exec app php tests/bin/yii app/setup --interactive=0
```
5. Start web server for acceptance tests (do not close bash session):
```
docker-compose exec app php -S localhost:8080
```
6. Run tests in separate window:
```
docker-compose exec app vendor/bin/codecept run
```

## RSS media parse function

[Issue is not resolved yet](https://github.com/zendframework/zend-feed/issues/49)
Add this method to Zend\Feed\Reader\Entry\Rss if need pictures of entries. Library should be updated to work with images.
```php
    public function getMedia()
    {
        if (array_key_exists('media', $this->data)) {
            return $this->data['media'];
        }

        $media = null;

        if ($this->getType() == Reader\Reader::TYPE_RSS_20) {
            $nodeList = $this->xpath->query($this->xpathQueryRss . '/media:content');

            if ($nodeList->length > 0) {
                $media = new \stdClass();
                $media->url    = $nodeList->item(0)->getAttribute('url');

            }
        }
        $this->data['media'] = $media;

        return $this->data['media'];
    }
```
[![Try in Play with Docker](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/alfredleo/userRss/master/docker-compose.yml)

repository: alfredleo/userRss

repo_name: alfredleo/userRss


text:
+++
authors = ["bataraga radu"]
date = 2020-09-20T21:00:00Z
excerpt = "You are given an algorithm problem. How do you proceed?"
hero = "/images/algorithm-preview.jpg"
timeToRead = 3
title = "Algorithm Tips and tricks"

+++
**You are given an algorithm problem. How do you proceed?**

Try finding a working solution, even if it's performance is low and optimize it. Atleast, you have something working. Even a brute-force.

**Do we need to use a recursive solution or iterative solution?**
First you must ask yourself, how big is the input?
By using recursion we use stack space so we are pretty limited when a big input is delivered. With iterative solution we can are free of charge, limited only by the RAM memory.

Maybe the iterative solution is harder to understand but it's not using that much memory because of the stack and the recursive solution is more straight-forward.

**Data structure operation complexity:**

Hashmap GET and PUT operations are complexity O(1)

String algorithms:
We can create a Array of integers for each a-z letters for occurence. Or we can use a hashmap

repository: bataragaradu/rbblog-forest-hugo

repo_name: bataragaradu/rbblog-forest-hugo


text:
# Calling method {#reference_vy5_swc_xdb .reference}

## Request structure {#section_qjd_4t5_ydb .section}

You can call the API provided by IoT Platform by sending HTTP or HTTPS requests.

The request structure is as follows:

```
http://Endpoint/?Action=xx&Parameters
```

In the request,

-   Endpoint: address where you can access IoT Platform. The following addresses are available:
    -   China \(Shanghai\): `iot.cn-shanghai.aliyuncs.com`
    -   Singapore: `iot.ap-southeast-1.aliyuncs.com`
    -   US \(Silicon Valley\): `iot.us-west-1.aliyuncs.com`
    -   Japan \(Tokyo\): `iot.ap-northeast-1.aliyuncs.com`
    -   Germany \(Frankfurt\): `iot.eu-central-1.aliyuncs.com`
-   Action: operation to be performed. For example, call the Pub operation to publish messages.
-   Parameters: request parameters. Separate each parameter with an ampersand \(&\).

    Request parameters are comprised of common request parameters and parameters customized for the API. Common parameters include the API version number, authentication information, and other information.

The following example describes how to call Pub to publish a message to a specified topic.

**Note:** In the following example, the service region is China \(Shanghai\). To assist reading, examples provided in this document are formatted.

```
https://iot.cn-shanghai.aliyuncs.com/?Action=Pub
&Format=XML
&Version=2017-04-20
&Signature=Pc5WB8gokVn0xfeu%2FZV%2BiNM1dgI%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=15215528852396
&SignatureVersion=1.0
&AccessKeyId=...
&Timestamp=2017-07-19T12:00:00Z
&RegionId=cn-shanghai
...
```

## Online debug for APIs {#section_iyj_mmq_bhb .section}

Alibaba Cloud provides [OpenAPI Explorer](https://api.aliyun.com) for you to debug APIs online. On OpenAPI Explorer, you can query the APIs that you want to debug and enter parameters to call the APIs. The system will generate SDK demos according to the parameters that you have entered. You can view SDK demos under **Example Code** on the left side of the page. Select **Debugging Result**, you can view the real URL of the request and the response in JSON format.

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/7563/155436269840697_en-US.png)

## API authorization {#section_qd5_fx5_ydb .section}

To ensure the security of your Alibaba Cloud account, we recommend that you call the APIs using a RAM user account. Before calling APIs as a RAM user, you need to create and attach specific authorization policies to the RAM user to allow access to the APIs.

For more information about API permissions that can be granted to RAM users, see [API permissions](../../../../../reseller.en-US/User Guide/Accounts and logon/Resource Access Management (RAM)/API permissions.md#).

url: https://raw.githubusercontent.com/WangJieJason/iot/a5e90d632a92eeff8d7791c3d95e287dc3b966ab/intl.en-US/Developer Guide (Cloud)/API reference/Calling method.md

repository: WangJieJason/iot

filename: Calling method.md

repo_name: WangJieJason/iot


text:
# Organization of the code.

This document describes the structure of the RotaNG code.

## Basic structure.

```
.
├── cmd
│   ├── app
│   │   ├── app.go
│   │   ├── app.infra_testing
│   │   ├── app_local.yaml
│   │   ├── app_prod.yaml
│   │   ├── app_staging.yaml
│   │   ├── css
│   │   ├── images
│   │   ├── static
│   │   ├── templates
│   └── handlers
├── Makefile
├── OWNERS
├── pkg
│   ├── algo
│   ├── calendar
│   ├── datastore
│   └── jsoncfg
├── README.md
├── rotang.go

16 directories, 81 files
```

* *cmd*; Contains the application(s).
  * *app*; The Appengine application **app.go** and its configuration **app_*\**.yaml** lives here.
    * `app_local.yaml`, `app_staging.yaml` and `app_prod.yaml` contains configurations for respective environment.
    * The `static` folder contains the JS elements used by the rota service.
    * The `templates` folder contains html templates used by the handlers to generate the Web UI pages.
  * *handlers*; Contains all the HTTP handlers.
    * `handler_.*.go` <- HTTP handlers used for external requests to the service.
    * `job_.*.go` <- Appengine cron handlers. Recurring jobs.
    * `rpc_.*.go` <- pRPC handlers.

  The cmd folder should contain application code, something using the packages in the **pkg** folder.

* *pkg*; Contains the Go packages used by this project.
  * *datastore*; Implements the storer interfaces using Appengine datastore.
  * *jsoncfg*; handles the conversion from the legacy JSON configuration to the ones used by this service.
  * *algo*; This folder contains the generators used to generate new rotation shifts.
  * *calendar*; Implements the Caledrer interface using Google calendar.

  The pkg folder should contain Go packages used by the applications. A package should not depend on any other
  package in this folder. They should only implement/use interfaces/types defined in the main *rotang.go* package.

* *proto*; Contains the proto API definitions.

	Generate by running `go generate ./...` in the rotang folder.
	Also automatically updated when running any of the Makefile `deploy` targets.

* *rotang.go*; This is the root file containing the domain specific types and interfaces used by this service.

  This package should not import any packages inside this project and contain little to no logic.


text:
---
layout: post
title: Navy 10 plus 2 Technical Cadet Permanent Commission last 2nd Jan-2016
date: 2015-12-11 04:23
comments: true
tags:  Cadet Navy Online Technical
archive: false
---
THE INDIAN NAVY

Become a Permanent Commissioned Officer in 10+2 (Technical) Cadet (B.Tech.) Entry Scheme Course Commencing - June 2016

Applications are invited from unmarried male candidates to join the prestigious Naval Academy, Ezhimala, Kerala.

Age : Between 17 to 19 and 1/2 years (candidates to be born between 02 January 1997 to 01 July 1999 both dates inclusive)
Educational Qualifications : Senior Secondary Examination (10+2 pattern) or its equivalent from University/ Board with at least 70% aggregate marks in Physics, Chemistry and Mathematics (PCM) and at least 50% marks in English either in class X or class XII.
Physical Standards : Height and Weight : Minimum height Male - 157 cms, with correlated weight. Eye Sight - The minimum acceptable standard for distant vision 6/12, 6/12 correctable to 6/6 with glasses. Should not be colour / night blind.
Starting Pay Scale : Rs.15600-39100 grade pay Rs. 5400 plus MSP Rs. 6000/-

**How to Apply**: Apply Online at Nausena Bharti website by clicking at Officer Entry button under the option Apply Online (bottom right sidebar) from 12/12/2015 to 02/01/2016 only. Take two copies of the submitted application form and send it to : Post Bag No. 04, Nirman Bhawan, P.O., New Delhi - 110011 on or before 12/01/2016.

For further details and apply online, kindly visit  at <http://www.joinindiannavy.gov.in/forthcomingOfficer.php>

repository: anchalrani/getopportunity

repo_name: anchalrani/getopportunity


text:
# appid

If you include this package, it will attempt to identify applications and provide hints in the conn log in a new field called appid.
For more insight into the development, see https://www.youtube.com/watch?v=eW5fre50OLY

repository: stevesmoot/appid

repo_name: stevesmoot/appid


text:
---
name: From source
sort: 2
---

# Install from source

## Dependencies

### Overall

- [Go Programming Language](http://golang.org): Version >= 1.2
- [Git](http://git-scm.com): Version >= 1.8

### Third-party packages

See [gopmfile](https://github.com/gogits/gogs/blob/master/.gopmfile) for complete list of third-party packages.

### Install

```
# Check update of gopm
$ gopm update -v

# Download and build binary
$ gopm bin -u -v gogs path/to/anywhere
```

Or

```
# Download and install dependencies
$ go get -u github.com/gogits/gogs

# Build main program
$ cd $GOPATH/src/github.com/gogits/gogs
$ go build
```

#### Build from `dev` branch

```
$ mkdir -p $GOPATH/src/github.com/gogits
$ cd $GOPATH/src/github.com/gogits
$ git clone -b dev https://github.com/gogits/gogs.git
$ cd gogs
$ go get ./...
$ go build
```

#### Build with SQLite3/Redis/Memcache

If you need to enable SQLite3/Redis/Memcache, please delete directory `$GOPATH/pkg/{GOOS_GOARCH}/github.com/gogits/gogs` and do:

```
$ go get -u -tags "sqlite redis memcache" github.com/gogits/gogs
$ cd $GOPATH/src/github.com/gogits/gogs
$ go build -tags "sqlite redis memcache"
```

See [Configuration and run](configuration_and_run.md) to go further.

repository: mengqingshare/docs

repo_name: mengqingshare/docs


text:
1. At the command line, log in to MySQL as the root user:
```
mysql -u root -p
```

2. Type the MySQL root password, and then press Enter.

3. To create a database user, type the following command.
- Replace username with the user you want to create
- Replace localhost with the host from which you connect to the server.
 TO 'username'@'localhost' IDENTIFIED BY 'password';
```

repository: taylrj/til

gha_language: Vim script

repo_name: taylrj/til


text:
unity-mesh-slicing
=================

View-aligned mesh slicing for Unity.

![demo](https://raw.githubusercontent.com/mattatz/unity-mesh-slicing/master/Captures/demo.gif)
![scene](https://raw.githubusercontent.com/mattatz/unity-mesh-slicing/master/Captures/scene.gif)

## Sources

- GPU Gems Chapter 39. Volume Rendering Techniques - https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch39.html

- Mesh Slicing | Raveh Gonen's Blog - https://ravehgonen.wordpress.com/tag/mesh-slicing/

repository: WaylandGod/unity-mesh-slicing

repo_name: WaylandGod/unity-mesh-slicing


text:
XLattice Connection

## XLattice Transport

XLattice
[Nodes](https://jddixon.github.io/xlattice/node.html)
communicate by sending messages over connections.  The primitive
notions common to all XLattice connections are

* [Acceptor](https://jddixon.github.com/xlattice/acceptor.html),
  an EndPoint on which a Node listens
* [Address](https://jddixon.github.com/xlattice/address.html),
  a sequence of bytes distinguishing EndPoints
* [Connection](https://jddixon.github.com/xlattice/connection.html),
  a pair of EndPoints enabling communications between the Nodes at either end
* [Connector](https://jddixon.github.com/xlattice/connector.html),
  an address and other information necessary to establish
  a connection to another Node
* [EndPoint](https://jddixon.github.com/xlattice/endPoint.html),
  an address and a Transport
* [Transport](https://jddixon.github.com/xlattice/transport.html),
  a name identifying a communications protocol

### Connection

A Connection is a established relationship between two EndPoints
supporting the passage of messages between the two.  From the point of
view of a participating host, the Connection will have a **near** EndPoint
(our end of the Connection) and a **far** EndPoint (the other, remote end of
the Connection).  Both EndPoints must use the same protocol.
Usually the Connection will have an associated State, and the Connection
will proceed through an ordered sequence of States when it is being
established, or the Connection will be closed.

repository: jddixon/xlattice

repo_name: jddixon/xlattice


text:
# Coin Integration Introduction

Ledger Live Common is designed to have very generic models (for currencies, accounts) but to also facilitate new coin integrations and via different ways (pure JS implementation,...).

The way this is structured is the folder `src/families` would contain the only specific bits a coin family will have and the rest is factorized and generic.

The goal is to minimize the amount of effort to implement while guaranteeing the general library integrity (we want to avoid if logics in the generic parts).

## A typical families folder

For each new coin integration, define a family for it (potentially one family of coin can contain many coins, for instance _Bitcoin Cash_ is in `bitcoin` family, _Ethereum Classic_ is in `ethereum` family). A family is a ledger specific technical grouping that put together the similar coins, typically those issued by a fork.

> The `family` is defined in the CryptoCurrency field.

For a new family, create a new folder in `src/families`.

The folder will have this kind of structure:

```
.
├── bridge
│   ├── js.ts
│   └── mock.ts
├── cli-transaction.ts # for the CLI
├── hw-getAddress.ts
├── hw-signMessage.ts  # if possible
├── transaction.ts # transaction specific fields
├── types.ts # family specific types
# for tests
└── test-dataset.ts
```

most of these file are optional and you will typically see when a file implementation is missing when testing.

A coin would typically also have custom files to share code or expose families specific features.

repository: LedgerHQ/ledger-live-common

branch_name: refs/heads/develop

repo_name: LedgerHQ/ledger-live-common


text:
# DailyReadPaper
Some survey paper are delivered as follows,
## Pedestrian Attribute Recognition: A Survey
1. Arxiv 2019
2. Selvaraju, Ramprasaath R and Cogswell, Michael and Das, Abhishek and Vedantam, Ramakrishna and Parikh, Devi and Batra, Dhruv
3. https://github.com/wangxiao5791509/Pedestrian-Attribute-Recognition-Paper-List
4. https://sites.google.com/view/ahu-pedestrianattributes/

- Recognizing pedestrian attributes is an important task in computer vision community
due to it plays an important role in video surveillance. Many algorithms has been proposed
to handle this task. The goal of this paper is to review existing works using traditional
methods or based on deep learning networks.

    ![Arxiv](Pictures/1.png)

- **Firstly**, we introduce the background of pedestrian
 attributes recognition (PAR, for short), including the fundamental concepts of pedestrian
 attributes and corresponding challenges.
- **Secondly**, we introduce existing benchmarks, including
 popular datasets and evaluation criterion.
- **Thirdly**, we analyse the concept of multi-task
 learning and multi-label learning, and also explain the relations between these two learning
  algorithms and pedestrian attribute recognition. We also review some popular network
  architectures which have widely applied in the deep learning community.
- **Fourthly**, we analyse
  popular solutions for this task, such as attributes group, part-based, etc.
- **Fifthly**, we shown
  some applications which takes pedestrian attributes into consideration and achieve better
  performance.
- **Finally**, we summarized this paper and give several possible research directions
  for pedestrian attributes recognition.

    ![Arxiv](Pictures/2.png)

>@@article{wang2019PARSurvey,
title={Pedestrian Attribute Recognition: A Survey},
author={Xiao Wang, Shaofei Zheng, Rui Yang, Bin Luo, Jin Tang},
journal={arXiv preprint arXiv:1901.07474},
year={2019}
}

## Anomaly Detection in Road Traffic Using Visual Surveillance: A Survey
1. Arxiv 2019
2. Santhosh Kelathodi Kumaran and Debi Prosad Dogra and Partha Pratim Roy

- Abstract—Computer vision has evolved in the last decade as
a key technology for numerous applications replacing human
supervision.
- In this paper, we present a survey on relevant visual
surveillance related researches for anomaly detection in public
places, focusing primarily on roads. Firstly, we revisit the surveys
done in the last 10 years in this field. Since the underlying
building block of a typical anomaly detection is learning, we
emphasize more on learning methods applied on video scenes.

    ![Arxiv](Pictures/3.png)

- We then summarize the important contributions made during last
six years on anomaly detection primarily focusing on features,
underlying techniques, applied scenarios and types of anomalies
using single static camera.

    ![Arxiv](Pictures/4.png)

- Finally, we discuss the challenges in
the computer vision related anomaly detection techniques and
some of the important future possibilities

<EMAIL_ADDRESS>Author = {Santhosh Kelathodi Kumaran and Debi Prosad Dogra and Partha Pratim Roy},
Title = {Anomaly Detection in Road Traffic Using Visual Surveillance: A Survey},
Year = {2019},
Eprint = {arXiv:1901.08292},
}

## A Short Survey on Probabilistic Reinforcement Learning
1. Arxiv 2019
2. Reazul Hasan Russel

- A reinforcement learning agent tries to maximize its cumulative payoff by interacting in an unknown environment. It is important for the agent to explore
suboptimal actions as well as to pick actions with highest known rewards. Yet, in
sensitive domains, collecting more data with exploration is not always possible,
but it is important to find a policy with a certain performance guaranty. In this
paper, we present a brief survey of methods available in the literature for balancing exploration-exploitation trade off and computing robust solutions from fixed
samples in reinforcement learning

<EMAIL_ADDRESS>Author = {Reazul Hasan Russel},
Title = {A Short Survey on Probabilistic Reinforcement Learning},
Year = {2019},
Eprint = {arXiv:1901.07010},
}

## A Survey of the Recent Architectures of Deep Convolutional Neural Networks
1. Arxiv 2019
2. Asifullah Khan and Anabia Sohail and Umme Zahoora and Aqsa Saeed Qureshi

- Deep Convolutional Neural Networks (CNNs) are a special type of Neural Networks, which
have shown state-of-the-art results on various competitive benchmarks. The powerful learning
ability of deep CNN is largely achieved with the use of multiple non-linear feature extraction
stages that can automatically learn hierarchical representation from the data.

    ![Arxiv](Pictures/5.png)

- Availability of a
large amount of data and improvements in the hardware processing units have accelerated the
research in CNNs and recently very interesting deep CNN architectures are reported. The recent
race in deep CNN architectures for achieving high performance on the challenging benchmarks
has shown that the innovative architectural ideas, as well as parameter optimization, can improve
the CNN performance on various vision-related tasks.
- In this regard, different ideas in the CNN
design have been explored such as use of different activation and loss functions, parameter
optimization, regularization, and restructuring of processing units. However, the major
improvement in representational capacity is achieved by the restructuring of the processing units.
Especially, the idea of using a block as a structural unit instead of a layer is gaining substantial
appreciation.

    ![Arxiv](Pictures/6.png)

- This survey thus focuses on the intrinsic taxonomy present in the recently reported
CNN architectures and consequently, classifies the recent innovations in CNN architectures into
seven different categories. These seven categories are based on spatial exploitation, depth, multipath, width, feature map exploitation, channel boosting and attention. Additionally, it covers the
elementary understanding of the CNN components and sheds light on the current challenges and
applications of CNNs.

<EMAIL_ADDRESS>Author = {Asifullah Khan and Anabia Sohail and Umme Zahoora and Aqsa Saeed Qureshi},
Title = {A Survey of the Recent Architectures of Deep Convolutional Neural Networks},
Year = {2019},
Eprint = {arXiv:1901.06032},
}

## Optimization Models for Machine Learning: A Survey
1. Arxiv 2019
2. Claudio Gambella and Bissan Ghaddar and Joe Naoum-Sawaya

- This paper surveys the machine learning literature and presents
machine learning as optimization models. Such models can benefit
from the advancement of numerical optimization techniques which
have already played a distinctive role in several machine learning settings.

    ![Arxiv](Pictures/7.png)

- Particularly, mathematical optimization models are presented
for commonly used machine learning approaches for regression, classification, clustering, and deep neural networks as well new emerging
applications in machine teaching and empirical model learning.

    ![Arxiv](Pictures/8.png)

- The strengths and the shortcomings of these models are discussed and potential
research directions are highlighted
<EMAIL_ADDRESS>Author = {Claudio Gambella and Bissan Ghaddar and Joe Naoum-Sawaya},
Title = {Optimization Models for Machine Learning: A Survey},
Year = {2019},
Eprint = {arXiv:1901.05331},
}

## Deep Learning for Anomaly Detection: A Survey
1. Arxiv 2019
2. Raghavendra Chalapathy and Sanjay Chawla

- Anomaly detection is an important problem that has been well-studied within diverse research areas
and application domains. The aim of this survey is two-fold, firstly we present a structured and comprehensive overview of research methods in deep learning-based anomaly detection. Furthermore,
we review the adoption of these methods for anomaly across various application domains and assess
their effectiveness.

    ![Arxiv](Pictures/9.png)

- We have grouped state-of-the-art deep anomaly detection research techniques
into different categories based on the underlying assumptions and approach adopted. Within each
category, we outline the basic anomaly detection technique, along with its variants and present key
assumptions, to differentiate between normal and anomalous behavior.

    ![Arxiv](Pictures/10.png)

- Besides, for each category,
we also present the advantages and limitations and discuss the computational complexity of the techniques in real application domains. Finally, we outline open issues in research and challenges faced
while adopting deep anomaly detection techniques for real-world problems.

<EMAIL_ADDRESS>Author = {Raghavendra Chalapathy and Sanjay Chawla},
Title = {Deep Learning for Anomaly Detection: A Survey},
Year = {2019},
Eprint = {arXiv:1901.03407},
}

## A Comprehensive Survey on Graph Neural Networks
1. Arxiv 2019
2. Zonghan Wu and Shirui Pan and Fengwen Chen and Guodong Long and Chengqi Zhang and Philip S. Yu

- Abstract—Deep learning has revolutionized many machine learning tasks in recent years, ranging from image classification and video
processing to speech recognition and natural language understanding. The data in these tasks are typically represented in the
Euclidean space. However, there is an increasing number of applications where data are generated from non-Euclidean domains and
are represented as graphs with complex relationships and interdependency between objects. The complexity of graph data has
imposed significant challenges on existing machine learning algorithms. Recently, many studies on extending deep learning
approaches for graph data have emerged.

    ![Arxiv](Pictures/11.png)

- In this survey, we provide a comprehensive overview of graph neural networks (GNNs) in
data mining and machine learning fields. We propose a new taxonomy to divide the state-of-the-art graph neural networks into different
categories. With a focus on graph convolutional networks, we review alternative architectures that have recently been developed; these
learning paradigms include graph attention networks, graph autoencoders, graph generative networks, and graph spatial-temporal
networks.

    ![Arxiv](Pictures/12.png)

- We further discuss the applications of graph neural networks across various domains and summarize the open source codes
and benchmarks of the existing algorithms on different learning tasks. Finally, we propose potential research directions in this
fast-growing field.

    ![Arxiv](Pictures/13.png)

<EMAIL_ADDRESS>Author = {Zonghan Wu and Shirui Pan and Fengwen Chen and Guodong Long and Chengqi Zhang and Philip S. Yu},
Title = {A Comprehensive Survey on Graph Neural Networks},
Year = {2019},
Eprint = {arXiv:1901.00596},
}

repository: TPCD/DailyReadPaper

repo_name: TPCD/DailyReadPaper


text:
---
title: '@knorm/soft-delete'
---

Knorm plugin that enables soft-deletion and automates working with `deleted` and
`deleted_at` table fields. This plugin adds soft-deletion fields to the
`Model` class and updates `Query` methods to enable soft-deletion.

## Installation

```bash
npm install --save @knorm/knorm @knorm/soft-delete
```

> @knorm/soft-delete has a peer dependency on @knorm/knorm

## Usage

```js
const { knorm } = require('@knorm/knorm');
const { knormSoftDelete } = require('@knorm/soft-delete');

const orm = knorm({
  // knorm options
}).use(
  knormSoftDelete({
    // knormSoftDelete options
  })
);
```

### Options

| Option             | Type     | Default       | Description                                                                                |
| ------------------ | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------- |
| [name]             | `string` | `soft-delete` | The name of the plugin, allows accessing the plugin instance via Knorm's plugin registry (`Knorm.prototype.plugins`) |
| [deleted]          | `object` |               | Config options for the `deleted` field.                                                                              |
| [deleted.name]     | `string` | `deleted`     | The field-name for the `deleted` field.                                                                              |
| [deleted.column]   | `string` | `deleted`     | The column-name for the `deleted` field.                                                                             |
| [deletedAt]        | `object` |               | Config options for the `deletedAt` field.                                                                            |
| [deletedAt.name]   | `string` | `deletedAt`   | The field-name for the `deletedAt` field.                                                                            |
| [deletedAt.column] | `string` | `deleted_at`  | The column-name for the `deletedAt` field.                                                                           |

## Features

### Soft deletion

This plugin:

- adds `deleted` and `deletedAt` (if enabled) fields to the
  `Model` class
- modifies `Query.prototype.delete` method such that it does not actually delete
  a row but rather sets the `deleted` field to `true` and `deletedAt` to the
  current time (i.e. `new Date()`) if the field is enabled.
- modifies `Query.prototype.insert`) method to set `deleted` to `false` before
  insert.
- modifies `Query.prototype.fetch`, `Query.prototype.update`) and
  `Query.prototype.delete` methods such that they always filter out soft-deleted
  rows (i.e. with `deleted` set to `true`).

:::tip info

- If `Query.prototype.insert`) is passed data where `deleted` and `deletedAt`
  are already set, they are left as is.
- If `Query.prototype.update`) is called with `deleted` set to `false`, then
  `deletedAt` is set to `null` before the updated. If `deleted` is `true`, then
  `deletedAt` is set to the current time.

:::

To work with soft-deleted rows, use the `Query.prototype.withDeleted`,
`Query.prototype.onlyDeleted` query options or directly use the
`Query.prototype.where` query option:

```js
class User extends Model {}

User.fields = {
  id: 'integer',
  names: 'string'
  // `deleted` is added by @knorm/soft-delete
};

// to update only soft-deleted rows:
User.update({ names: 'Foo Bar' }, { onlyDeleted: true });
// or:
User.update({ foo: 'bar' }, { where: { deleted: true } });

// to fetch rows including soft-deleted rows:
User.query
  .withDeleted()
  .where({ foo: 'bar' })
  .fetch();
// or:
User.query
  .where(
    Model.where.and({ foo: 'bar' }, Model.where.in({ deleted: [true, false] }))
  )
  .fetch();
```

:::tip info
`withDeleted` performs better than `Model.where.in({ deleted: [true, false] })`
:::

:::tip info
If directly using the `where` query option, the field-name to use for the
`deleted` field depends on the field's configuration.
:::

### Restoration

This plugin also adds `Query.prototype.restore`, `Model.prototype.restore` and
`Model.restore` methods that can be used to restore soft-deleted records:

```js
// to soft-delete:
new User({ id: 1 }).delete();
// to restore:
new User({ id: 1 }).restore();
// or:
User.restore({ where: { id: 1 } });
```

### Hard deletion

Conversely, it also adds `Query.prototype.hardDelete`,
`Model.prototype.hardDelete` and `Model.hardDelete` that can be used to
hard-delete records:

```js
// to hard-delete:
new User({ id: 1 }).hardDelete();
// or:
User.hardDelete({ where: { id: 1 } });
```

repository: knorm/knorm

gha_language: JavaScript

repo_name: knorm/knorm


text:
+++
# Display name
name = "Anna Solecki"

# Username (this should match the folder name)
authors = ["anna-solecki"]

# Is this the primary user of the site?
superuser = false

# Role/position
role = "PhD student"

# Organizations/Affiliations
#   Separate multiple entries with a comma, using the form: `[ {name="Org1", url=""}, {name="Org2", url=""} ]`.
organizations = [ { name = "Integrative Biology, University of Guelph", url = "https://www.uoguelph.ca/ib/" } ]

# Short bio (displayed in user profile at end of posts)
bio = "I am YYY."

# Enter email to display Gravatar (if Gravatar enabled in Config)
email = ""

# List (academic) interests or hobbies
interests = [
  "Taxonomy",
  "Community Ecology",
  "Metacommunity dynamics",
  "Molecular Identification",
  "Data Analysis in R"
]

# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
user_groups = ["Current Grad Students"]

# List qualifications (such as academic degrees)

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/widgets/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "#contact" for contact widget.

# [[social]]
#   icon = "envelope"
#   icon_pack = "fas"
#   link =<EMAIL_ADDRESS># For a direct email link, use<EMAIL_ADDRESS>#
#  [[social]]
#    icon = "open-access"
#    icon_pack = "ai"
#    link = "https://atrium.lib.uoguelph.ca/xmlui/discover?scope=%2F&query=cottenie&submit=Go&rpp=10"
#
# [[social]]
#   icon = "google-scholar"
#   icon_pack = "ai"
#   link = "https://scholar.google.com/citations?user=lL7RlhMAAAAJ&hl=en&oi=ao"
#
# [[social]]
#   icon = "github"
#   icon_pack = "fab"
#   link = "https://github.com/karl-cottenie"
#
# [[social]]
#   icon = "orcid"
#   icon_pack = "ai"
#   link = "https://orcid.org/0000-0001-9498-8483"

# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# [[social]]
#   icon = "cv"
#   icon_pack = "ai"
#   link = "files/cv.pdf"

+++

I am a PhD student in the department of Integrative Biology at the University of Guelph under the
supervision of Karl Cottenie (University of Guelph) and Chris Buddle (McGill University). My main
research interests are Arctic and community ecology. My PhD research is focused on Arctic flies
(Diptera) and the importance of considering scale and different biodiversity measures in community
assembly. I am working on a fly dataset at the continental scale (across 12 Canadian northern sites) and at local-scale in Churchill, MB, to examine the large-scale and small-scale drivers of fly community assembly.
I first became interested in Arctic ecology after finishing my undergraduate in Applied Zoology at
McGill University. I was hired as a field assistant for the Northern Biodiversity Program, which
documents changes in Canada's northern arthropod fauna. I had the opportunity that summer to travel to northern sites to collect insects. Being part of this project motivated me to pursue a M.Sc. in Arctic ecology. My M.Sc. thesis was a molecular and ecological study of flies (Diptera) which assessed differences in diversity between glacial and postglacial grasslands in the southern Yukon.

* Solecki, AM, Skevington, JH, Buddle, CM, Wheeler, TA. In review. Phylogeography of higher Diptera in glacial and postglacial grasslands in western North America. BMC Ecology. 26 February 2019. MS#
BECO-D-19-00025.
* Rogy, P, Wheeler, TA, Solecki, AM. Accepted pending minor revisions. Spatial distribution of acalyptrate fly assemblages in Northern Canada. Polar Biology. Submitted 1 Oct 2018. MS# POBI-D-18-00214R1.
* Solecki, AM, Buddle, CM, Wheeler, TA. 2016. Distribution and community structure of chloropid flies (Diptera: Chloropidae) in Nearctic glacial and postglacial grasslands. Insect Conservation and Diversity. 9(4): 358–368.
* Solecki, AM, Wheeler, TA. 2015. A new species of Neossos Malloch (Diptera, Heleomyzidae) from the
Yukon Territory, Canada, and a revised key to the Nearctic species. Biodiversity Data Journal. 3: e6351.

repository: karl-cottenie/academic-kickstart

repo_name: karl-cottenie/academic-kickstart


text:
# Macbrideola synsporos (Alexop.) Alexop., 1967 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycologia 59(1): 115 (1967)

#### Original name
Comatricha synsporos Alexop., 1958

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
layout: post
title: Easy Inventory
date: '2011-06-04 14:07:10'
---

Easy Inventory is the first in a line of free Android apps I’ll be releasing.

Easy Inventory is

1. Free
2. Easy to Use
3. Visually Driven

Update 4/2012 This is now also hosted on GitHub. Check it out at [my GitHub page](https://github.com/huntergdavis).

UPDATE — Easy Inventory is open source now! Check it out and all the source code on SourceForge at [https://sourceforge.net/p/easyinventory](https://sourceforge.net/p/easyinventory)

UPDATE — Easy Inventory has a “bulk sale” option now!

[![](http://<IP_ADDRESS>/~hunterda/content/images/2011/06/screenshot331-180x300.png "screenshot3")](http://<IP_ADDRESS>/~hunterda/content/images/2011/06/screenshot331.png)

Using Easy Inventory is simple.

1. Select a Photo
[![](http://<IP_ADDRESS>/~hunterda/content/images/2011/06/screencapturemainscreen1-180x300.png "screencapturemainscreen")](http://<IP_ADDRESS>/~hunterda/content/images/2011/06/screencapturemainscreen1.png)

	1. Enter Item Details [![](http://<IP_ADDRESS>/~hunterda/content/images/2011/06/screencaptureinventory1-180x300.png "screencaptureinventory")](http://<IP_ADDRESS>/~hunterda/content/images/2011/06/screencaptureinventory1.png)
	1. That’s it! Now just Buy or Sell items and keep track of the profit and sales record.
2. Easy!

You can download Easy Inventory from the app store [here](https://market.android.com/details?id=com.hunterdavis.easyinventory)

extension: markdown


text:
The reason that we're not all
>drinking the "New Coke" is that D.C. has siphoned off all of the spin
>doctors/brainwashers from the corporate advertising industry.

Well there must be a few spin-doctors left as we are drinking "New Coke".
:)

The whole "New Coke/Orriginal Coke" was one of the best con jobs I have
ever seen. The Coca-Cola Company had a small problem, the cost of sugar.
It's compitition was using corn suryp as a sweetner in their products which
was much cheaper than the sugar Coca-Cola was using in theirs.

Now how were they going to switch from sugar to corn suryp in Coke without
lossing a portion of their customers because of the change in taste? NEW
COKE!!

Here is what they did:

Come out with NEW COKE which was a major formula change.
Drop OLD COKE at the same time.
Wait a few months while the natives are restless over the change. Bring
back "OLD COKE" due to customer demmand (making Coca-Cola Inc. the "good"
guys). Don't tell anyone that you have switched from sugar to corn suryp
(the sheep will never notice).

Vola!! Now Coca-Cola has dramatically increased their profits and won a
major PR campain (they care about their customers) sales are up costs are
down and the sheep are happy.

Now I have NEVER seen the neanderthals in DC ever pull off somthing this
good. :)

- --
- -----------------------------------------------------------
William H. Geiger III  http://www.amaranth.com/~whgiii
Geiger Consulting    Cooking With Warp 4.0

Author of E-Secure - PGP Front End for MR/2 Ice
PGP & MR/2 the only way for secure e-mail.

Finger<EMAIL_ADDRESS>for PGP Key and other info
- -----------------------------------------------------------

Tag-O-Matic: If Windows sucked it would be good for something.


text:
Exmaple Single Stage
====================

#### How to run

tune design for 20 epoches (intrusive mode)
``` shell
ut hash.py -pf 2 --test-limit 20
```

tune design for 2000 seconds (template mode)
``` shell
ut hash_template.py --timeout 2000
```

repository: cornell-zhang/uptune

repo_name: cornell-zhang/uptune


text:
---
title: "Simple Message Example"
permalink: /docs/simple-example/
excerpt: "How to send simple message to reduce pull in RocketMQ."
modified: 2017-04-24T15:01:43-04:00
---

{% include toc %}

Use RocketMQ to send messages in three ways: reliable synchronous, reliable
asynchronous, and one-way transmission.

This page exemplifies these three message-sending ways. Checkout the notes along with the example to figure out which
way to use for your specific use case.

#### Reliable synchronous transmission

Application: Reliable synchronous transmission is used in extensive scenes, such as
important notification messages, SMS notification, SMS marketing system, etc..

```java
public class SyncProducer {
    public static void main(String[] args) throws Exception {
        //Instantiate with a producer group name.
        DefaultMQProducer producer = new
            DefaultMQProducer("please_rename_unique_group_name");
        //Launch the instance.
        producer.start();
        for (int i = 0; i < 100; i++) {
            //Create a message instance, specifying topic, tag and message body.
            Message msg = new Message("TopicTest" /* Topic */,
                "TagA" /* Tag */,
                ("Hello RocketMQ " +
                    i).getBytes(RemotingHelper.DEFAULT_CHARSET) /* Message body */
            );
            //Call send message to deliver message to one of brokers.
            SendResult sendResult = producer.send(msg);
            System.out.printf("%s%n", sendResult);
        }
        //Shut down once the producer instance is not longer in use.
        producer.shutdown();
    }
}

```
#### Reliable asynchronous transmission

Application: asynchronous transmission is generally used in response time sensitive business scenarios.

```java
public class AsyncProducer {
    public static void main(String[] args) throws Exception {
        //Instantiate with a producer group name.
        DefaultMQProducer producer = new DefaultMQProducer("ExampleProducerGroup");
        //Launch the instance.
        producer.start();
        producer.setRetryTimesWhenSendAsyncFailed(0);
        for (int i = 0; i < 100; i++) {
                final int index = i;
                //Create a message instance, specifying topic, tag and message body.
                Message msg = new Message("TopicTest",
                    "TagA",
                    "OrderID188",
                    "Hello world".getBytes(RemotingHelper.DEFAULT_CHARSET));
                producer.send(msg, new SendCallback() {
                    @Override
                    public void onSuccess(SendResult sendResult) {
                        System.out.printf("%-10d OK %s %n", index,
                            sendResult.getMsgId());
                    }
                    @Override
                    public void onException(Throwable e) {
                        System.out.printf("%-10d Exception %s %n", index, e);
                        e.printStackTrace();
                    }
                });
        }
        //Shut down once the producer instance is not longer in use.
        producer.shutdown();
    }
}
```

#### One-way transmission

Application: One-way transmission is used for cases requiring moderate reliability,
such as log collection.

```java
public class OnewayProducer {
    public static void main(String[] args) throws Exception{
        //Instantiate with a producer group name.
        DefaultMQProducer producer = new DefaultMQProducer("ExampleProducerGroup");
        //Launch the instance.
        producer.start();
        for (int i = 0; i < 100; i++) {
            //Create a message instance, specifying topic, tag and message body.
            Message msg = new Message("TopicTest" /* Topic */,
                "TagA" /* Tag */,
                ("Hello RocketMQ " +
                    i).getBytes(RemotingHelper.DEFAULT_CHARSET) /* Message body */
            );
            //Call send message to deliver message to one of brokers.
            producer.sendOneway(msg);

        }
        //Shut down once the producer instance is not longer in use.
        producer.shutdown();
    }
}

```

repository: congcongye/rocketmq-site

repo_name: congcongye/rocketmq-site


text:
Based on paddle2.0, we improved TSM，almost not increase the number of model parameters and FLOPs,
to achieve the goal of improving the accuracy of detector as much as possible
while ensuring that the speed is almost unchanged.

By combining multiple tricks, PP-TSM can achieve a better balance between effectiveness (73.5% Top1)
and efficiency (TODO), surpassing the existing 2D video models’s accuracy such as TSN and TSM
in multiple datasets such as UCF101、Kinetics-400。

For detail, refer to the page of high-level tutorial(TODO).

repository: NLUdeveloper/PaddleVideo

repo_name: NLUdeveloper/PaddleVideo


text:
# Sleeping Dogs: Definitive Edition

## 60 FPS Unlock

CPU Limited. For use with 9th generation of game consoles.

Author: [illusion](https://github.com/illusion0001)

In file `eboot.bin`

<details>
<summary>Code for 1.07 (Click to Expand)</summary>

```
0x70B88B 00 00 00 00
```

</details>


text:
---
name: Feature request
about: How to submit a feature request
title: ''
labels: ''
assignees: ''

---

Please submit feature requests to our [forum](https://forum.codeigniter.com/forum-29.html).
We use github issues to track bugs and planned work.


text:
# Inter Planetary File System (IPFS)
Protocol designed to create a permanent and decentralized method of storing and sharing files.

### Links to learn more

  ~Home Page: https://www.ipfs.com/

  ~Basic reading: https://github.com/ipfs/ipfs/blob/master/papers/ipfs-cap2pfs/ipfs-p2p-file-system.pdf

license: Unlicense

repository: hacknightlbc/fwiki

repo_name: hacknightlbc/fwiki