text:
## Paraphrase Question Generator using Shared Discriminator

PyTorch code for Paraphrase Question Generator.  This code-based is built upon this paper [Learning Semantic Sentence Embeddings using Pair-wise Discriminator](https://www.aclweb.org/anthology/C18-1230.pdf).

If you want the code used for experiments please head over to the `orig-code` branch. This code consists of some good models mentioned in above paper only with more readable and usable form.

### Requirements and Setup

##### Use Anaconda or Miniconda

1. Install Anaconda or Miniconda distribution based on Python3+ from their [downloads' site](https://conda.io/docs/user-guide/install/download.html).
2. Clone this repository and create an environment:

```
git clone https://www.github.com/dev-chauhan/PQG-pytorch
cd PQG-pytorch
conda env create -f environment.yml

# activate the environment
conda activate PQG
```
3. After that for logging you need to install [tensorboardX](https://github.com/lanpa/tensorboardX).
```
pip install tensorboardX
```
### Dataset

You can directly use following files downloading them into `data` folder or by following the process shown below it.
##### Data Files
Download all the data files from here.
- [quora_data_prepro.h5](https://figshare.com/s/5463afb24cba05629cdf)
- [quora_data_prepro.json](https://figshare.com/s/5463afb24cba05629cdf)
- [quora_raw_train.json](https://figshare.com/s/5463afb24cba05629cdf)
- [quora_raw_val.json](https://figshare.com/s/5463afb24cba05629cdf)
- [quora_raw_test.json](https://figshare.com/s/5463afb24cba05629cdf)

##### Download Dataset
We have referred  [neuraltalk2](https://github.com/karpathy/neuraltalk2) and [Text-to-Image Synthesis ](https://github.com/reedscot/icml2016) to prepare our code base. The first thing you need to do is to download the Quora Question Pairs dataset from the [Quora Question Pair website](https://data.quora.com/First-Quora-Dataset-Release-Question-Pairs) and put the same in the `data` folder.

If you want to train from scratch continue reading or if you just want to evaluate using a pretrained model then head over to `Datafiles` section and download the data files (put all the data files in the `data` folder) and run `score.py` to evaluate pretrained model.

Now we need to do some preprocessing, head over to the `prepro` folder and run

```
$ cd prepro
$ python quora_prepro.py
```

**Note** The above command generates json files for 100K question pairs for train, 5k question pairs for validation and 30K question pairs for Test set.
If you want to change this and instead use only 50K question pairs for training and rest remaining the same, then you need to make some minor changes in the above file. After this step, it will generate the files under the `data` folder. `quora_raw_train.json`, `quora_raw_val.json` and `quora_raw_test.json`

##### Preprocess Paraphrase Question

```
$ python prepro_quora.py --input_train_json ../data/quora_raw_train.json --input_test_json ../data/quora_raw_test.json
```
This will generate two files in `data/` folder, `quora_data_prepro.h5` and `quora_data_prepro.json`.

### Training

```
$ ./train.sh <name of model> --n_epoch <number of epochs>
```

You can change training data set and validation data set lengths by adding arguments `--train_dataset_len` and `--val_dataset_len` which are default to `100000` and `30000` which is maximum.

There are other arguments also for you to experiment like `--batch_size`, `--learning_rate`, `--drop_prob_lm`, etc.

You can resume training using `--start_from` argument in which you have to give path of saved model.
### Save and log

First you have to make empty directories `save`, `samples`, and `logs`.
For each training there will be a directory having unique name in `save`. Saved model will be a `.tar` file. Each model will be saved as `<epoch number>` in that directory.

In `samples` directory with same unique name as above the directory contains a `.txt` file for each epoch as `<epoch number>_train.txt` or `<epoch number>_val.txt` having generated paraphrases by model at the end of that epoch on validation data set.

Logs for training and evaluation is stored in `logs` directory which you can see using `tensorboard` by running following command.
```
tensorboard --logdir <path of logs directory>
```
This command will tell you where you can see your logs on browser, commonly it is `localhost:6006` but you can change it using `--port` argument in above command.

### Results
Following are the results for 100k quora question pairs dataset for some models.

Name of model | Bleu_1 | Bleu_2 | Bleu_3 | Bleu_4 | ROUGE_L | METEOR | CIDEr |
---|--|--|--|--|--|--|--|
EDL|0.4162|0.2578|0.1724|0.1219|0.4191|0.3244|0.6189|
EDLPS|0.4754|0.3160|0.2249|0.1672|0.4781|0.3488|1.0949|

Following are the results for 50k quora question pairs dataset for some models.

Name of model | Bleu_1 | Bleu_2 | Bleu_3 | Bleu_4 | ROUGE_L | METEOR | CIDEr |
---|--|--|--|--|--|--|--|
EDL|0.3877|0.2336|0.1532|0.1067|0.3913|0.3133|0.4550|
EDLPS|0.4553|0.2981 |0.2105|0.1560|0.4583|0.3421|0.9690|

### Reference

If you use this code as part of any published research, please acknowledge the following paper

```
@inproceedings{patro2018learning,
  title={Learning Semantic Sentence Embeddings using Sequential Pair-wise Discriminator},
  author={Patro, Badri Narayana and Kurmi, Vinod Kumar and Kumar, Sandeep and Namboodiri, Vinay},
  booktitle={Proceedings of the 27th International Conference on Computational Linguistics},
  pages={2715--2729},
  year={2018}
}

@article{PATRO2021149,
title = {Revisiting paraphrase question generator using pairwise discriminator},
author = {Badri N. Patro and Dev Chauhan and Vinod K. Kurmi and Vinay P. Namboodiri},
journal = {Neurocomputing},
volume = {420},
pages = {149-161},
year = {2021},
issn = {0925-2312},
doi = {https://doi.org/10.1016/j.neucom.2020.08.022},
url = {https://www.sciencedirect.com/science/article/pii/S0925231220312820}
}
```

## Contributors
* [Dev  Chauhan][1]<EMAIL_ADDRESS>* [Badri N. Patro][2]<EMAIL_ADDRESS>* [Vinod K. Kurmi][2]<EMAIL_ADDRESS>
[1]: https://github.com/dev-chauhan
[2]: https://github.com/badripatro
[3]: https://github.com/vinodkkurmi

repository: dev-chauhan/PQG-pytorch

repo_name: dev-chauhan/PQG-pytorch


text:
# jMeter-Splunk
jMeter examples to load-test Splunk

- Download and install Apache jMeter https://jmeter.apache.org/
- Open the .jmx file with the jMeter GUI
- Edit User Defined Variables > SPLUNK_HOST & MGT_PORT
- Edit Thread Group > HTTP Authorization Manager > username and password
- (optional) Edit Thread Group > Random Controller > searches to include the searches you want to run

license: MIT

repository: jayzao/jMeter-Splunk

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: jayzao/jMeter-Splunk


text:
# pensions-lifetime-allowance-frontend

[![Apache-2.0 license](http://img.shields.io/badge/license-Apache-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) [![Build Status](https://travis-ci.org/hmrc/pensions-lifetime-allowance-frontend.svg?branch=master)](https://travis-ci.org/hmrc/pensions-lifetime-allowance-frontend) [ ![Download](https://api.bintray.com/packages/hmrc/releases/pensions-lifetime-allowance-frontend/images/download.svg) ](https://bintray.com/hmrc/releases/pensions-lifetime-allowance-frontend/_latestVersion)

### Pensions Lifetime Allowance Frontend

This is the repository for the pensions lifetime allowance frontend. This service provides clients with a way to view and manage their pension protections.

To run the project clone the repository and in terminal $sbt "run $PORT"

### License

This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html")


text:
# CommonFiles
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/392ba5b1d20a4fc2847bd409f296a61c)](https://www.codacy.com/manual/Tiewhan/FeistyCommonFiles?utm_source=github.com&utm_medium=referral&utm_content=Tiewhan/FeistyCommonFiles&utm_campaign=Badge_Grade)
## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

CommonFiles is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'CommonFiles'
```

## Author

Tiewhan Smith<EMAIL_ADDRESS>
## License

CommonFiles is available under the MIT license. See the LICENSE file for more info.

repository: codacy-badger/FeistyCommonFiles

gha_license_id: MIT

repo_name: codacy-badger/FeistyCommonFiles


text:
---
id: monitoring
title: Monitoring Interface
---

:::info TypeScript Support

A monitoring object has an associated TypeScript type:

- Type Name - `Monitoring`
- Package - `@resolve-js/core`

:::

A monitoring object's interface is the same as the interface of a monitoring adapter except for the [`getMetrics`](#getmetrics) and [`clearMetrics`](#clearmetrics) methods that require a monitoring adapter ID as an argument.

A monitoring object exposes the following API:

| Member Name                     | Description                                                                                |
| ------------------------------- | ------------------------------------------------------------------------------------------ |
| [`error`](#error)               | Registers an occurred error.                                                               |
| [`execution`](#execution)       | Registers an execution of an operation.                                                    |
| [`duration`](#duration)         | Registers the duration of an operation.                                                    |
| [`time`](#time)                 | Starts execution time measurement.                                                         |
| [`timeEnd`](#timeend)           | Ends execution time measurement and registers the resulting duration.                      |
| [`custom`](#custom)             | Registers a custom metric.                                                                 |
| [`publish`](#publish)           | Defined by an implementation, publishes the collected metrics to the intended destination. |
| [`rate`](#rate)                 | Registers operation execution rate during the specified time interval in seconds.          |
| [`group`](#group)               | Creates a monitoring group.                                                                |
| [`getMetrics`](#getmetrics)     | Gets a list of collected metrics.                                                          |
| [`clearMetrics`](#clearmetrics) | Clears the list of collected metrics.                                                      |

### `error`

Registers an occurred error. The default implementation increments the count of the `"Errors"` metric.

#### Example

```js
try {
  ...
} catch (error) {
  monitoring.error(error)
}
```

#### Arguments

| Argument Name | Type               | Description                            |
| ------------- | ------------------ | -------------------------------------- |
| `error`       | An `error` object. | An error to add to monitoring metrics. |

### `execution`

Registers an operation's execution. The default implementation increments the count of the `"Executions"` metric. The `execution` method can also be passed an optional `error` parameter. If this parameter is not `null`, the function registers the error in metrics.

#### Example

```js
monitoring.execution()
```

#### Arguments

| Argument Name | Type                        | Description                            |
| ------------- | --------------------------- | -------------------------------------- |
| `error?`      | An `error` object or `null` | An error to add to monitoring metrics. |

### `duration`

Registers the duration of an operation. The default implementation adds the specified value in milliseconds to the `"Duration"` metric.

#### Example

```js
monitoring.duration(
  'myOperation',
  duration / operations.length,
  operations.length
)
```

#### Arguments

| Argument Name | Type     | Description                                             |
| ------------- | -------- | ------------------------------------------------------- |
| `label`       | `string` | A text label to add to the 'Label' dimension.           |
| `duration`    | `number` | An operation duration in milliseconds.                  |
| `count?`      | `number` | A number to add to the metric's count. Defaults to `1`. |

### `time`

Starts a timer to measure execution time.

#### Example

```js
monitoring.time('Execution', startTimestamp)
```

#### Arguments

| Argument Name | Type     | Description                                                              |
| ------------- | -------- | ------------------------------------------------------------------------ |
| `name`        | `string` | The ID of the started timer.                                             |
| `timestamp?`  | `number` | A moment in time from which to start counting. Defaults to `Date.now()`. |

### `timeEnd`

Ends time measurement and registers the resulting duration. The default implementation adds the measured time value in milliseconds to the `"Duration"` metric.

#### Example

```js
monitoring.timeEnd('Execution')
```

#### Arguments

| Argument Name | Type     | Description                                                           |
| ------------- | -------- | --------------------------------------------------------------------- |
| `name`        | `string` | The ID of the timer to stop.                                          |
| `timestamp?`  | `number` | A moment in time at which to stop counting. Defaults to `Date.now()`. |

### `custom`

Registers the specified custom metric. If the metric object's `value` and/or `count` fields are not specified, the default implementation sets them to `1`.

#### Example

```js
monitoring.custom(myMetric)
```

#### Arguments

| Argument Name | Type                                                      | Description                       |
| ------------- | --------------------------------------------------------- | --------------------------------- |
| `metricData`  | A [custom metric object](metric.md#custom-metric-object). | Specifies a custom metric's data. |

### `publish`

Defined by an implementation, publishes the collected metrics to the intended destination.

#### Example

```js
await monitoring.publish()
```

#### Arguments

| Argument Name | Type     | Description                                             |
| ------------- | -------- | ------------------------------------------------------- |
| `options?`    | `object` | Specifies additional options for the publish operation. |

#### Result

The returned value is a `promise` that resolves when the monitoring information is successfully published.

The monitoring adapters shipped with reSolve implement the `publish` function as follows:

| Module Name                             | Description                          |
| --------------------------------------- | ------------------------------------ |
| `@resolve-js/monitoring-console`        | Prints metrics to the text console.  |
| `@resolve-js/monitoring-aws-cloudwatch` | Publishes metrics to AWS CloudWatch. |

### `rate`

Registers operation execution rate during the specified time interval in seconds. The default implementation adds a value in times per N seconds to the specified metric.

#### Example

```js
monitoring.rate('ReadModelFeedingRate', eventCount, applyDuration / 1000)
```

#### Arguments

| Argument Name | Type     | Description                                                         |
| ------------- | -------- | ------------------------------------------------------------------- |
| `metricName`  | `string` | The name of the metric to add.                                      |
| `count`       | `number` | A number to add to the metric's count.                              |
| `seconds?`    | `number` | The number of seconds for which to count the rate. Defaults to `1`. |

### `group`

Creates a monitoring group and returns a monitoring adapter instance for this group.

#### Example

```js
const groupMonitoring = monitoring.group({ Part: 'ReadModel' })
```

#### Arguments

| Argument Name | Type                       | Description                                 |
| ------------- | -------------------------- | ------------------------------------------- |
| `config`      | A key-value pair `object`. | A key-value pair that identifies the group. |

#### Result

A monitoring object instance that operates on the created group.

### `getMetrics`

Gets a list of collected metrics.

#### Example

```js
const metrics = getMetrics('default')
```

| Argument Name | Type     | Description                                                           |
| ------------- | -------- | --------------------------------------------------------------------- |
| `id`          | `string` | The metrics adapter ID as specified in the application configuration. |

#### Result

The returned value is an array of [`metric`](metric.md) objects.

### `clearMetrics`

#### Example

```js
monitoring.clearMetrics('default')
```

Clear the list of collected metrics.

| Argument Name | Type     | Description                                                           |
| ------------- | -------- | --------------------------------------------------------------------- |
| `id`          | `string` | The metrics adapter ID as specified in the application configuration. |

repository: reimagined/resolve

branch_name: refs/heads/dev

gha_language: TypeScript

repo_name: reimagined/resolve


text:
[![GitHub Issues](https://img.shields.io/github/issues/xinabox/pxt-SN01.svg)](https://github.com/xinabox/pxt-SN01/issues)
![GitHub Commit](https://img.shields.io/github/last-commit/xinabox/pxt-SN01)
![Maintained](https://img.shields.io/maintenance/yes/2020)
![Build status badge](https://github.com/xinabox/pxt-SN01/workflows/maker/badge.svg)
![Build status badge](https://github.com/xinabox/pxt-SN01/workflows/microbit/badge.svg)
![Developer](https://img.shields.io/badge/Developer-kj-blue)

# pxt-SN01

## License

MIT

#### Metadata (used for search, rendering)

* for PXT/maker


text:
# eCommerce API

#### Advanced programming project of the Master in AI & Cloud - PoliTO Reply

eCommerce APi is an headless (just API) eCommerce web application powered by Spring boot, with a microservice
architecture.

## Get Started

A docker image for all the involved microservices has been created and pushed to Docker Hub. The project can be deployed
on your machine simply launching a docker compose providing
the [docker compose](docker-compose.yaml) file.

```
docker-compose -f docker-compose.yaml up -d
```
Then, to test the APIs connect to ```localhost:8081/swagger-ui.html```.

## Services

### Description

The application is composed by the following services.

#### Catalog Service

Customers interact with this service only. They can list products, get their features and availability (availability
comes from warehouses). To each user we associate a wallet they can use to purchase products. Customer can place any
order, given there is enough money in their wallet and the products are available in the warehouses. As result they
receive and Order object with a tracking id they can use to check the status or cancel the order until shipping is not
started. Customers also receive an email each time their order is updated. Admins can add and edit product properties.
Both Customers and Admins already have an account using their email is the username. For simplicity this is the only
service handling authentication.

#### Order Service

It is the core of the system. It stores orders and their status and it is responsible of enforcing the rules on orders.
Orders can be placed only if the customer has enough money in his/her wallet and products are available in warehouses.
Order placing and all the related operations should be atomically isolated at a global level and be transactional, i.e.
if some service fails, for any reason, every other operation already done must be rolled back (see later for details).
After the purchase, the order status must be updated accordingly to the progress (picked up from the warehouse, shipping
in progress, shipped, canceled, error - you can choose any set of states useful for modeling order handling) and admins
and users must be notified via an email In case of fail or when an order is canceled the customer must be rechargeed and
the items must be returned to the warehouse. This service APIs can be used only by other internal services (all services
are considered trusted and they can perform any operation). Customers and Admins can query and modify order status only
through the the CatalogService accordingly to their permissions.

#### Wallet Service

Wallets handle customer money, they have simple API: you can query the total, the transaction list, and add a
transaction. Negative transaction are issued during purchase, positive ones
(recharges) are issued by admins only.

#### Warehouse Service

It handles the list of products stored in any warehouse. Products can be in more than one warehouse, with different
quantities. Each warehouse has list of alarm levels for any product; when the quantity of product is below the alarm
level a notification must be sent to the admins The APIs allows the listing of products and their quantities, loading
and unloading items and updating alarms. For simplicity you can use a single WarehouseService handling more than one
warehouse, but in real life there can a separate instance for each warehouse.

## Architecture

The proposed API comes in two flavours:

1. Synchronous architecture: The communication among the microservices is based on REST endpoints.
2. Asynchronous architecture: The communication among the microservices is managed by an external publisher-subscriber
   system, in this case Kafka.

The two types of communication have been designed to work together, and are available simultaneously at the same time.

### Synchronous Communication

The following image reports how the synchronous communication among the microservices take places and which data are
exchanged. For each microservice, there are reported the classes that are defined in the microservice itself (<ins>
underlined</ins>), and the classes that are needed from other services, defined as DTOs. This architecture corresponds
to an _orchestrator architecture_, in which the order service is the orchestrator and follows the whole order
life-cycle.

![alt text](./images/SyncSchema.png "WorkflowSync")

#### Endpoints

For clarity, the two most common exception that are always catched will not be reported in the following tables:

- _ResourceAccessException_ if the remote service is not reachable.
- _500 Internal_Server_error_ if the remote service got an internal exception.

**Catalog service endpoints**

|EP|Request body|Response body|Response code| Description|
|---|---|---|---|---|
|`GET /catalog/products/show`| - | ProductListDTO | 200_OK |Shows the catalog (the same for all users)|
|`GET /catalog/products/admin/show`| - | ProductAdminListDTO  | 200_OK |Shows the catalog for an admin user with warehouse information|
|`POST /catalog/products/admin`| ProductAdminDTO  | ProductDTO | 200_OK, 409_CONFLICT | Admin adds a product specifying the warehouse|
|`PUT /catalog/products/admin/{productID}`| ProductAdminDTO  | ProductDTO | 200_OK, 404_NOT_FOUND|Admin modify information of an existing product (eventually updating the alarm level)|
|`GET /catalog/orders/{userID}`| - | ShownOrderListDTO | 200_OK, 404_NOT_FOUND|Shows the orders associated with `userID`|
|`POST /catalog/orders/{userID}/sync`| PlacedOrderDTO | OrderDTO | 200_OK, 404_NOT_FOUND, 402_PAYMENT_REQUIRED, 409_CONFLICT |Create an order for the `userID` user with the details specified in `PlacedOrderDTO` (synchronous manner)|
|`POST /catalog/orders/{userID}/async`| PlacedOrderDTO | OrderDTO | 200_OK, 404_NOT_FOUND |Create an order for the `userID` user with the details specified in `PlacedOrderDTO` (asynchronous manner)|
|`GET /catalog/orders/delete/{orderID}`| - | OrderDTO | 200_OK, 404_NOT_FOUND |Cancel an order `orderID` for the currently logged user (update its STATUS)|
|`GET /catalog/wallet/{userID}`| - | WalletDTO | 200_OK, 404_NOT_FOUND |Retrieve the wallet information (total and transaction list) for the currently logged user|
|`POST /catalog/wallet/admin/recharge/{userID}`| RechargeDTO | - | 200_OK, 404_NOT_FOUND |Recharge the user specified in `userID`|

**Wallet service endpoints**

|EP|Request body|Response body|Response code| Description|
|---|---|---|---|---|
|`POST /wallet/create`| UserDTO | WalletID | 200_OK |Catalog creates a new user so that Wallet can create a correspondent entry|
|`POST /wallet/{userID}`| TransactionDTO | TransactionID | 200_OK, 404_NOT_FOUND| Order insert a new transaction in the `userID`'s wallet|
|`POST /wallet/checkavailability/{userID}`| TransactionDTO | OrderID | 200_OK, 409_CONFLICT, 404_NOT_FOUND| Order checks for availability to start a new order on `userID`'s wallet|
|`GET /wallet/performtransaction/{orderID}`| - | TransactionID | 200_OK, 409_CONFLICT, 404_NOT_FOUND |Order insert a new transaction previously checked.|
|`GET /wallet/{userID}`| - | WalletDTO | 200_OK, 404_NOT_FOUND | Catalog requests`userID`'s wallet and transaction list|
|`POST /wallet/recharge/{userID}`| RechargeDTO| - | 200_OK, 404_NOT_FOUND | Catalog insert in the `userID`'s wallet a recharge|
|`GET /wallet/undo/{orderID}`| orderID | transactionID | 200_OK, 404_NOT_FOUND | OrderService refund an order performing a rollback on the transaction.|

**Warehouse service endpoints**

|EP|Request body|Response body|Response code| Description|
|---|---|---|---|---|
|`GET /warehouse/products/totals`| - | ProductListDTO | 200_OK |Catalog requests a list of products (overall quantity)|
|`GET /warehouse/products/perwarehouse`| - | ProductAdminListDTO | 200_OK |Catalog requests a list of products (for each warehouse) |
|`POST /warehouse/products`| ProductAdminDTO | ProductDTO | 200_OK |Catalog insert a new product in a specific warehouse |
|`POST /warehouse/products/update/{productID}`| ProductAdminDTO | ProductDTO | 200_OK, 409_CONFLICT |Catalog modifies a product in a specific warehouse (eventually updating the alarm level) |
|`POST /warehouse/orders`| OrderDTO | DeliveryListDTO | 200_OK, 409_CONFLICT |Order request a new order and receives a list of deliveries|
|`GET /warehouse/orders/restore/{orderID}`| - |orderID | 200_OK |Order deletes a previously requested order (it has been canceled by the user) |

**Order service endpoints**

|EP|Request body|Response body|Response code| Description|
|---|---|---|---|---|
|`POST /order/orders/`| PlacedOrderDTO | OrderDTO | 200_OK, 402_PAYMENT_REQUIRED, 409_CONFLICT | Catalog insert a new order. The newly created order is returned, having STATUS PAID or FAILED|
|`GET /order/{userID}/orders`| - | ShownOrderListDTO | 200_OK |Catalog requests the orders of `userID`|
|`GET /order/orders/{orderID}`| - | ShownOrderDTO | 200_OK, 404_NOT_FOUND |Catalog requests the order `orderID`|
|`GET /order/delete/{orderID}/sync`| - | OrderDTO | 200_OK, 404_NOT_FOUND |Catalog requests to cancel the order `orderID` (updating its STATUS, if it has not been shipped yet) (synchronous manner)|
|`GET /order/delete/{orderID}/async`| - | OrderDTO | 200_OK, 404_NOT_FOUND |Catalog requests to cancel the order `orderID` (updating its STATUS, if it has not been shipped yet) (asynchronous manner)|

**Mailing service endpoints**

|EP|Request body|Response body|Response code| Description|
|---|---|---|---|---|
|POST /mailing/create| UserDTO | - | 200_OK | Catalog sends the list of users to the MailingService|

### Asynchronous Communication

The following image reports how the asynchronous communication among the microservices take places. The blue and red
circles refer to _Kafka topics_, on which each microservice can either publish a message, or listen for new messages.
For the asynchronous communication, another microservice is defined, the **MailingService**, which is responsible of
sending emails to customers when a modification of an order takes place, or to admins when a critical alarm level for a
given product is detected. The MailingService is based on the library _apache common mail_, and relies on the gmail smtp
server.
![alt text](./images/AsyncSchema.png "WorfkFlowAsync")

### DTOs definition

```
WalletDTO(userID, total, List<TransactionDTO>)
ProductDTO(productID, name, description, category, picture, currentPrice)
ProductAdminDTO(ProductDTO, WarehouseDTO, alarm level, warehouseQuantity)
ProductListDTO(List<ProductQuantityDTO>)
ProductQuantityDTO(ProductDTO, quantity)
ProductListAdminDTO(List<ProductAdminDTO>)

UserDTO(userID, name, surname, username, address, email, role)
PurchaseDTO(productID, quantity, sellingPrice)
TransactionDTO(orderID, userID, amount, time, status)
RechargeDTO(userID, amount, time, causal)
WarehouseDTO(name, address)
WarehouseStockDTO(name, address, quantity, alarmLevel)
ProductWarehouseDTO(id, name, category, currentPrice, description, picture, stock)
ProductListWarehouseDTO(List<ProductWarehouseDTO>)

OrderDTO(OrderID, List<PurchaseDTO>, status)
DeliveryDTO(WarehouseID, List<PurchaseDTO>)
DeliveryListDTO(OrderID, deliveryAddress, List<DeliveryDTO>)
ShownOrderDTO(List<OrderDTO>)
ShownOrderListDTO(List<List<OrderDTO>>)

PlacedOrderDTO(orderID, userID, List<PurchaseDTO>, deliveryAddress)
ShownOrderDTO(List<OrderDTO>)
ShownOrderListDTO(List<List<OrderDTO>)

MailinginfoDTO(userID, orderStatus, orderID, message, productID, warehouse)
RollbackDTO(orderID, senderMS)
```
## The team
Biondo Andrea \
Chiapello Nicolò \
Martone Raffaele \
Semeraro Francesco

repository: franckies/ecommerce-api

repo_name: franckies/ecommerce-api


text:
# cash-cache [![Build Status](https://travis-ci.org/camsong/cash-cache.svg)](https://travis-ci.org/camsong/cash-cache) [![npm version](https://badge.fury.io/js/cash-cache.svg)](http://badge.fury.io/js/cash-cache) [![Coverage Status](https://coveralls.io/repos/github/camsong/cash-cache/badge.svg?branch=master)](https://coveralls.io/github/camsong/cash-cache?branch=master)

WIP

cache is cash. localStorage enhancer with sugar functions and LRU cache

# Install
```
yarn add cash-cache
```

# Usage

Dig into the source code, it's very easy.

# License

MIT

repository: camsong/cash-cache

repo_name: camsong/cash-cache


text:
# Programming tools used

JavaScript,HTML,CSS

# Installation

the website is not installed,but accessible via internet connection as a html file

# Usage

The Pig Dice game can be used to pass time and measure level of luck....sometimes

# Contributing

pull requests are welcome.if you want to effect major changes,please talk to me about what you would like to changeif you encounter any bugs...also feel free to contact us to fix the issue

# License

[MIT](https://choosealicense.com/licenses/mit/)

repository: magechaP/Pig-dice

repo_name: magechaP/Pig-dice


text:
# filesac

file-functions for node.js that return Promises

## Note

Promise based file system functionality is now supported natively in node.js via `fs/promises`

However some function like copyFile from filesac do the right thing. Create subfolders if missing for example.

## Installation

[`npm i filesac`](https://www.npmjs.com/package/filesac)

## Import

```js
import {
    writeTextInFile,
    concatenateFiles,
    copyFile,
    copyDirectory,
    deleteFile,
    namesInDirectory,
    namesInDirectoryRecursive,
    createNecessaryDirectoriesSync,
    emptyDirectory,
} from "filesac";
```

## About

### Changelog

[Changelog](./changelog.md)

### License

[CC0](./license.txt)

repository: GrosSacASac/filesac

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: GrosSacASac/filesac


text:
## Agile Adoption
Been a lot more hands on last week - both in terms of code and process improvement.

Currently heavily involved with one of my clients in a major project - one in which there is a lot of (code & feature) changes and the introduction of many agile processes.

Given the size and complexity of this project, agile methods are great fit.  And it is really good to see the team adopting more of those agile practices.

Largely we are using Scrum like process - with MVP (Minimum Viable Product) thinking, feature slices, Continuous Integration, and automated testing to the hilt (TDD & BDD).

As I say, great start.  And I'll be rolling my sleeves up plenty over the coming weeks in assisting/ mentoring/ coaching/ and anything else that can help the team succeed.

## Azure Functions - Project References (currently) the right way
Following on from last week, I updated an Azure Function to use project references the current right way (I believe this is all due to change again in the near future - more once I see this).

I've written this up in this [article](/blog/azure-functions-project-references-part-2).

## Blog Re-development
I've done almost nothing on this since last week.  If anything the reason I'm keeping this on is so that I remind myself to get back to it.

I'm going to take a little detor to put up some Nuget packages to help with Integration Testing on Specflow & xUnit.  More on those once I've got them up.

## Self promotion
Released [ROI of the Planning Horizon- An example](/blog/roi-of-the-planning-horizon-an-example) last week.

This builds on the [previous article](/blog/roi-of-the-planning-horizon), and provides a (somewhat fictional) example of a software product over time.  Hopefully it goes someway to demonstrate why I advocate thinking about the longer term when making decisions.

To provide a tad more clarity over that, in the next article, I will revist previous articles and provide comment based on this mindset.

gha_language: C#


text:
# Voice-automation-using-python
"This is voice autmoation programme which is based on speech-to-text conversion and does specified tasks based on the text gathered from speech"
Note:- Internet connection is necessary and all the required libraries should be preinstalled

pyttsx3
datetime
speech_recognition
wikipedia
webbrowser

This so far does following task just by revieving microphone input->
1- Fetches two sentenses from wikipidea regarding the query
  the input voice format "Search -------------- wikipedia" the "--" is filled with the intersted query to be searched

2- open youtube in browser by query "open youtube"
3- open google in browser by query "open google"
4- open facebook the same way
5- as you run the programme you are wished according to the time zone
6- Tells time in words when given voice command "whats the time now"
7- Takes the input commands over microphone


text:
# Setting up hosting for firebase

## Prerequisites

firebase installed

```cmd
npm install -g firebase-tools
```

## Build

Build your application release

```cmd
ng build --prod
```

## Prepare Deploy

Open a command shell in your project directory.

Logout if needed

```cmd
firebase logout
```

(Alternatively, re-log-in)

```cmd
firebase login --reauth
```

Login with Google account

```cmd
firebase login
```

Init the project

```cmd
firebase init
```

Select hosting

Choose a default firebase project
E.g.
dist/practsie

Use single-page application rerouting to index.html

Don't worry if you make mistakes, you can call `init` again.
Sample output:

```cmd
c:\code\practsie>firebase init

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  c:\code\practsie

Before we get started, keep in mind:

  * You are currently outside your home directory
  * You are initializing in an existing Firebase project directory

? Are you ready to proceed? Yes
? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confi
rm your choices. Hosting: Configure and deploy Firebase Hosting sites

=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory? dist/practsie
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? File dist/practsie/index.html already exists. Overwrite? No
i  Skipping write of dist/practsie/index.html

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

+  Firebase initialization complete!
```

## Test it locally

```cmd
firebase serve --only hosting
```

## Deploy

```cmd
firebase deploy
```

Effect

```cmd
=== Deploying to 'practsie'...

i  deploying hosting
i  hosting[practsie]: beginning deploy...
i  hosting[practsie]: found 10 files in dist/practsie
+  hosting[practsie]: file upload complete
i  hosting[practsie]: finalizing version...
+  hosting[practsie]: version finalized
i  hosting[practsie]: releasing new version...
+  hosting[practsie]: release complete

+  Deploy complete!

Project Console: https://console.firebase.google.com/project/practsie/overview
Hosting URL: https://practsie.firebaseapp.com
```

Access it.

## Quick update

```cmd
ng build --prod
firebase deploy
```

repository: dezGusty/practsie

repo_name: dezGusty/practsie


text:
# OpenMuseum-Client

[![Build Status](https://travis-ci.org/OpenMuseum/OpenMuseum-Client.svg?branch=develop)](https://travis-ci.org/OpenMuseum/OpenMuseum-Client)
[![Coverage Status](https://codecov.io/github/OpenMuseum/OpenMuseum-Client/coverage.svg?branch=develop)](https://codecov.io/github/OpenMuseum/OpenMuseum-Client?branch=develop)
[![DevDependencies](https://david-dm.org/OpenMuseum/OpenMuseum-Client/dev-status.svg)](https://david-dm.org/OpenMuseum/OpenMuseum-Client#info=devDependencies)

## Install

Check out the code:
```
git clone git@github.com:OpenMuseum/OpenMuseum-Client.git
```

Install the npm dependencies
```
npm install
```

Install [gulp](http://gulpjs.com/)
```
npm install -g gulp bower
```

Install bower dependencies
```
bower install
```

[Configure](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode) your server to work with html5Mode.

## Run

Available Gulp tasks

- `gulp` or `gulp build` to build an optimized version of your application in `/dist`
- `gulp serve` to launch a browser sync server on your source files
- `gulp serve:dist` to launch a server on your optimized application
- `gulp test` to launch your unit tests with Karma
- `gulp test:auto` to launch your unit tests with Karma in watch mode
- `gulp protractor` to launch your e2e tests with Protractor
- `gulp protractor:dist` to launch your e2e tests with Protractor on the dist files

repository: OpenMuseum/OpenMuseum-Client

branch_name: refs/heads/develop

repo_name: OpenMuseum/OpenMuseum-Client


text:
---
layout: default
---

# 1996-07-24 - WinSock Remailer Going On-Line Tonight

## Header Data

From: "Joey Grasty"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 7c16333c11c5ae6bfd8841e14cbdaf4d5b8287e1bbd21ef86d8751f7b538313e

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-07-24 14:37:48 UTC

Raw Date: Wed, 24 Jul 1996 22:37:48 +0800

## Raw message

```
{% raw  %}From: "Joey Grasty"<EMAIL_ADDRESS>Date: Wed, 24 Jul 1996 22:37:48 +0800
To<EMAIL_ADDRESS>Subject: WinSock Remailer Going On-Line Tonight
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Y'all:

I'm pleased to announce that the WinSock Remailer is going
into operation tonight at 11:00 PM.

Please feel free to test it.  You can get the key by sending
a message to<EMAIL_ADDRESS>with the "Subject: remailer-key".

After about a week of further testing, I will be releasing the
executables to everyone who sent me a note asking to
participate in the alpha test.  If you want to be included,
please send me a note.

Here's the info for the remailer-list:

$remailer{"winsock"} =<EMAIL_ADDRESS>cpunk pgp hash cut ksub reord";

I'll be adding "post" to this list after I get a more thorough
testing of the NNTP code that I added for authentication.  "latent"
is also pending.

The remailer will run every 60 seconds from 12:00 AM to 8:00 AM
every day and whenever I am online.  c2.org automatically spools
the messages when I am not connected.

Note:  alt.religion.scientology and alt.clearing.technology are
blocked.  I'm not interested in run-ins with either supporters
or detractors of the Church of Scientology.  Binary and picture
groups are also blocked, but only because I don't have the
bandwidth to support them.

Anyone who has blocking lists that they want to share, please
send them to me.

Regards,

--
Joey Grasty
<EMAIL_ADDRESS>[home -- encryption, privacy, RKBA and other hopeless causes]
<EMAIL_ADDRESS>[work -- designing pagers]
"Anyone who considers arithmetical methods of producing random digits is,
of course, in a state of sin." -- John Von Neumann
PGP = A7 CC 31 E4 7E A3 36 13  93 F4 C9 06 89 51 F5 A7

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "["Joey Grasty" <jgrasty@gate.net>](/authors/joey_grasty_jgrasty_at_gate_net_)"

+ 1996-07-24 (Wed, 24 Jul 1996 22:37:48 +0800) - WinSock Remailer Going On-Line Tonight - _"Joey Grasty"<EMAIL_ADDRESS>


text:
---
title: "Challenge 18 - Min Rotations"
date: 2020-06-09T20:36:23+01:00
desc: In this challenge, you will be tasked with finding how many rotations an ordered slice has undergone.
author: Elliot Forbes
twitter: https://twitter.com/elliot_f
series:
  - go-challenges
tags:
  - "Data Structures"
language: go
difficulty: Medium
image: golang.svg
weight: 18
tags:
- beginner
authorImage: https://images.tutorialedge.net/authors/profile.jpeg
snippet: |
  package main

  import "fmt"

  func MinRotations(array []int) int {
    // Implement me :)
    return 0
  }

  func main() {
    fmt.Println("Min Rotation Challenge")

    testArr := []int{15, 18, 2, 3, 6, 12}
    min := MinRotations(testArr) // returns 2
    fmt.Println(min)

    testArr2 := []int{7, 9, 11, 12, 5}
    min2 := MinRotations(testArr2) // return 4
    fmt.Println(min2)

  }
tests:
  - name: main_test
    test: TestMinRotations
    code: |
      package main

      import (
        "testing"
      )

      func TestMinRotations(t *testing.T) {
        output := MinRotations([]int{1, 2, 3, 4, 5})
        if output != 0 {
          t.Fail()
        }
        output = MinRotations([]int{2, 3, 4, 5, 1})
        if output != 4 {
          t.Fail()
        }
        output = MinRotations([]int{3, 4, 5, 1, 2})
        if output != 3 {
          t.Fail()
        }
        output = MinRotations([]int{4, 5, 1, 2, 3})
        if output != 2 {
          t.Fail()
        }
        output = MinRotations([]int{5, 1, 2, 3, 4})
        if output != 1 {
          t.Fail()
        }
      }

---

👋 Welcome Gophers! In this challenge, you will be tasked with finding out how many rotations an ordered `int` slice has undergone and shifted by.

### Examples:

```go
arr := []int{1, 2, 3, 4, 5}
MinRotations(arr) // returns 2

arr := []int{3, 4, 5, 1, 2}
MinRotations(arr) // returns 3
```

## See the Solution

Feel free to have a look at the forum discussion thread for this challenge and contribute with your own solutions here - [Challenge 18 - Minimum Rotations](https://discuss.tutorialedge.net/t/challenge-18-minimum-rotations/40)

### Further Reading:

If you enjoyed this challenge, you may also enjoy some of the other challenges on this site:

* [Sets and Subsets](/challenges/go/sets-and-subsets/)
* [Linked List](/challenges/go/linked-list/)

branch_name: refs/heads/main


text:
# recipe_app
Its a web based application. Where recipe seekers can register and then browse through existing recipes they can also add comments as well as edit their own comments. Users also have capability to create and edit their own recipes

## Usage
To use this app, just clone, run bundle install, rake db:migrate, rake db:seed and then run rails s. Everything should be set up.

## Contribution
For submitting something back, be it a patch, some documentation, or new feature requires some level of community interactions.

## Committing code is easy:
- 	Fork this repository
- 	Create a local development branch for the bug fix
- 	Make the change, and push your local branch to your Github fork with descriptive commits in the standard format.
-   Send me a pull request for your changes to be included

## License
recipe_app is licensed under the MIT license.

repository: ayesha-x-ansari/Recipes

repo_name: ayesha-x-ansari/Recipes


text:
[![CircleCI](https://circleci.com/gh/gazette/core.svg?style=svg)](https://circleci.com/gh/gazette/core)
[![GoDoc](https://godoc.org/github.com/gazette/core?status.svg)](http://godoc.org/github.com/gazette/core)
[<img src="https://img.shields.io/badge/slack-@gazette/dev-yellow.svg?logo=slack">](https://join.slack.com/t/gazette-dev/shared_invite/enQtNjQxMzgyNTEzNzk1LTU0ZjZlZmY5ODdkOTEzZDQzZWU5OTk3ZTgyNjY1ZDE1M2U1ZTViMWQxMThiMjU1N2MwOTlhMmVjYjEzMjEwMGQ)

![Gazette Logo](docs/logo_with_text.svg "Gazette Logo")

Overview
========

Gazette is infrastructure for building *streaming platforms*: platforms composed
of loosely coupled services, built and operated by distinct teams,
managing and serving large amounts of state, but all communicating continuously
through a common catalog of streamed data. It features a lightweight
container & cloud-native architecture, high availability, and integrates elegantly with
existing batch workflows.

Gazette consists of a *broker service* serving **journals**, a byte-oriented and
append-only resource resembling a file, and a *consumers* library for building rich
streaming applications in Go.

How It's Different
==================

Gazette provides low-latency, durable, ordered publish/subscribe services, while
*also* serving as the system-of-record for all historical data which has passed
through those streams, no matter how old or large in volume.

It features powerful **labels** and **selectors** mechanisms for tagging and querying
over event streams, similar to those of Kubernetes.

It minimizes operational risk by delegating both storage and high-volume replay
to elastic BLOB stores like S3. Brokers themselves are ephemeral and disposable.
The cluster scales and recovers from faults in seconds.

It seeks to be cost-efficient by best utilizing cloud pricing structures and
being careful to minimize inter-zone data transfers.

It features a rich library for building fault-tolerant, highly available, highly
stateful streaming applications in Go, as well as a "batteries included" command-
line tool which makes quick work of integrating existing applications.

Where to Start
==============

* [Brokers: A Tutorial Introduction](docs/broker_tutorial.md) is a walk-through of
key broker features and concepts.
* [Design Goals (and Non-Goals)](docs/goals_and_nongoals.md)

Coming soon:
   - Broker architecture briefs
   - Introduction to the *consumers* library and using it to build applications.

repository: dwarri/gazette

repo_name: dwarri/gazette


text:
**Note:** This is not a production app. This is a project solely for learning purposes. As such, it misses functionality. It misses tests. And it has only a very basic front-end design.

If you're lucky, it's still runnning on Heroku: [launch-180-theodor.herokuapp.com](https://launch-180-theodor.herokuapp.com)

## Install

`bundle install`

## Rake tasks

* Start the application: `rake rackup` or simply `rake`

repository: cunger/theodor

repo_name: cunger/theodor


text:
# Trigger functions from Kafka

OpenFaaS PRO offers an additional component that can be used to invoke functions from Kafka topics.

## Installation

You can install the Kafka connector using its [helm chart](https://github.com/openfaas/faas-netes/tree/master/chart/kafka-connector), or by using arkade.

### Installation with arkade

```bash
export TOPICS="payment.created"
arkade install kafka-connector \
 --broker-host kafka-broker \
 --topics $TOPICS \
 --license-file $HOME/.openfaas/LICENSE
```

### Installation with Helm

See [helm chart](https://github.com/openfaas/faas-netes/tree/master/chart/kafka-connector)

## Usage

Once you have configured a number of topics, you can then annotate your functions so that they get triggered by any incoming messages on those topics.

Create a new function:

```bash
export OPENFAAS_PREFIX=ghcr.io/openfaas
faas-cli new --lang go provision-customer
```

Now add an annotation for the `payment.created` topic, so that the `provision-customer` function is invoked for any message received:

```yaml
version: 1.0
provider:
  name: openfaas
  gateway: http://<IP_ADDRESS>:8080

functions:
  provision-customer:
    annotations:
      topic: payment.created
    lang: go
    handler: ./provision-customer
    image: ghcr.io/openfaas:provision-customer
```

Now deploy your function, and publish an event to your Kafka broker on the `payment.created` topic.

## See also

Blog post / walk-through: [Staying on topic: trigger your OpenFaaS functions with Apache Kafka](https://www.openfaas.com/blog/kafka-connector/)


text:
# Automatic Parallelism
:label:`sec_auto_para`

Deep learning frameworks (e.g., MXNet and PyTorch) automatically construct computational graphs at the backend. Using a
computational graph, the system is aware of all the dependencies,
and can selectively execute multiple non-interdependent tasks in parallel to
improve speed. For instance, :numref:`fig_asyncgraph` in :numref:`sec_async` initializes two variables independently. Consequently the system can choose to execute them in parallel.

Typically, a single operator will use all the computational resources on all CPUs or on a single GPU. For example, the `dot` operator will use all cores (and threads) on all CPUs, even if there are multiple CPU processors on a single machine. The same applies to a single GPU. Hence parallelization is not quite so useful for single-device computers. With multiple devices things matter more. While parallelization is typically most relevant between multiple GPUs, adding the local CPU will increase performance slightly. For example, see :cite:`Hadjis.Zhang.Mitliagkas.ea.2016` that focuses on training computer vision models combining a GPU and a CPU. With the convenience of an automatically parallelizing framework we can accomplish the same goal in a few lines of Python code. More broadly, our discussion of automatic parallel computation focuses on parallel computation using both CPUs and GPUs, as well as the parallelization of computation and communication.

Note that we need at least two GPUs to run the experiments in this section.

```{.python .input}
from d2l import mxnet as d2l
from mxnet import np, npx
npx.set_np()
```

```{.python .input}
#@tab pytorch
from d2l import torch as d2l
import torch
```

## Parallel Computation on GPUs

Let us start by defining a reference workload to test: the `run` function below performs 10 matrix-matrix multiplications on the device of our choice using data allocated into two variables: `x_gpu1` and `x_gpu2`.

```{.python .input}
devices = d2l.try_all_gpus()
def run(x):
    return [x.dot(x) for _ in range(50)]

x_gpu1 = np.random.uniform(size=(4000, 4000), ctx=devices[0])
x_gpu2 = np.random.uniform(size=(4000, 4000), ctx=devices[1])
```

```{.python .input}
#@tab pytorch
devices = d2l.try_all_gpus()
def run(x):
    return [x.mm(x) for _ in range(50)]

x_gpu1 = torch.rand(size=(4000, 4000), device=devices[0])
x_gpu2 = torch.rand(size=(4000, 4000), device=devices[1])
```

:begin_tab:`mxnet`
Now we apply the function to the data. To ensure that caching does not play a role in the results we warm up the devices by performing a single pass on either of them prior to measuring.
:end_tab:

:begin_tab:`pytorch`
Now we apply the function to the data. To ensure that caching does not play a role in the results we warm up the devices by performing a single pass on either of them prior to measuring. `torch.cuda.synchronize()` waits for all kernels in all streams on a CUDA device to complete. It takes in a `device` argument, the device for which we need to synchronize. It uses the current device, given by `current_device()`, if the device argument is `None` (default).
:end_tab:

```{.python .input}
run(x_gpu1)  # Warm-up both devices
run(x_gpu2)
npx.waitall()

with d2l.Benchmark('GPU1 time'):
    run(x_gpu1)
    npx.waitall()

with d2l.Benchmark('GPU2 time'):
    run(x_gpu2)
    npx.waitall()
```

```{.python .input}
#@tab pytorch
run(x_gpu1)
run(x_gpu2)  # Warm-up all devices
torch.cuda.synchronize(devices[0])
torch.cuda.synchronize(devices[1])

with d2l.Benchmark('GPU1 time'):
    run(x_gpu1)
    torch.cuda.synchronize(devices[0])

with d2l.Benchmark('GPU2 time'):
    run(x_gpu2)
    torch.cuda.synchronize(devices[1])
```

:begin_tab:`mxnet`
If we remove the `waitall` statement between both tasks the system is free to parallelize computation on both devices automatically.
:end_tab:

:begin_tab:`pytorch`
If we remove the `synchronize` statement between both tasks the system is free to parallelize computation on both devices automatically.
:end_tab:

```{.python .input}
with d2l.Benchmark('GPU1 & GPU2'):
    run(x_gpu1)
    run(x_gpu2)
    npx.waitall()
```

```{.python .input}
#@tab pytorch
with d2l.Benchmark('GPU1 & GPU2'):
    run(x_gpu1)
    run(x_gpu2)
    torch.cuda.synchronize()
```

In the above case the total execution time is less than the sum of its parts, since the deep learning framework automatically schedules computation on both GPU devices without the need for sophisticated code on behalf of the user.

## Parallel Computation and Communication

In many cases we need to move data between different devices, say between the CPU and GPU, or between different GPUs.
For instance,
this occurs when we want to perform distributed optimization where we need to aggregate the gradients over multiple accelerator cards. Let us simulate this by computing on the GPU and then copying the results back to the CPU.

```{.python .input}
def copy_to_cpu(x):
    return [y.copyto(npx.cpu()) for y in x]

with d2l.Benchmark('Run on GPU1'):
    y = run(x_gpu1)
    npx.waitall()

with d2l.Benchmark('Copy to CPU'):
    y_cpu = copy_to_cpu(y)
    npx.waitall()
```

```{.python .input}
#@tab pytorch
def copy_to_cpu(x, non_blocking=False):
    return [y.to('cpu', non_blocking=non_blocking) for y in x]

with d2l.Benchmark('Run on GPU1'):
    y = run(x_gpu1)
    torch.cuda.synchronize()

with d2l.Benchmark('Copy to CPU'):
    y_cpu = copy_to_cpu(y)
    torch.cuda.synchronize()
```

:begin_tab:`mxnet`
This is somewhat inefficient. Note that we could already start copying parts of `y` to the CPU while the remainder of the list is still being computed. This situation occurs, e.g., when we compute the gradient on a minibatch. The gradients of some of the parameters will be available earlier than that of others. Hence it works to our advantage to start using PCI-Express bus bandwidth while the GPU is still running. Removing `waitall` between both parts allows us to simulate this scenario.
:end_tab:

:begin_tab:`pytorch`
This is somewhat inefficient. Note that we could already start copying parts of `y` to the CPU while the remainder of the list is still being computed. This situation occurs, e.g., when we compute the (backprop) gradient on a minibatch. The gradients of some of the parameters will be available earlier than that of others. Hence it works to our advantage to start using PCI-Express bus bandwidth while the GPU is still running. In PyTorch, several functions such as `to()` and `copy_()` admit an explicit `non_blocking` argument, which lets the caller bypass synchronization when it is unnecessary. Setting `non_blocking=True` allows us to simulate this scenario.
:end_tab:

```{.python .input}
with d2l.Benchmark('Run on GPU1 and copy to CPU'):
    y = run(x_gpu1)
    y_cpu = copy_to_cpu(y)
    npx.waitall()
```

```{.python .input}
#@tab pytorch
with d2l.Benchmark('Run on GPU1 and copy to CPU'):
    y = run(x_gpu1)
    y_cpu = copy_to_cpu(y, True)
    torch.cuda.synchronize()
```

The total time required for both operations is (as expected) less than the sum of their parts.
Note that this task is different from parallel computation as it uses a different resource: the bus between the CPU and GPUs. In fact, we could compute on both devices and communicate, all at the same time. As noted above, there is a dependency between computation and communication: `y[i]` must be computed before it can be copied to the CPU. Fortunately, the system can copy `y[i-1]` while computing `y[i]` to reduce the total running time.

We conclude with an illustration of the computational graph and its dependencies for a simple two-layer MLP when training on a CPU and two GPUs, as depicted in :numref:`fig_twogpu`. It would be quite painful to schedule the parallel program resulting from this manually. This is where it is advantageous to have a graph-based computing backend for optimization.

![The computational graph and its dependencies of a two-layer MLP on a CPU and two GPUs.](../img/twogpu.svg)
:label:`fig_twogpu`

## Summary

* Modern systems have a variety of devices, such as multiple GPUs and CPUs. They can be used in parallel, asynchronously.
* Modern systems also have a variety of resources for communication, such as PCI Express, storage (typically solid-state drives or via networks), and network bandwidth. They can be used in parallel for peak efficiency.
* The backend can improve performance through automatic parallel computation and communication.

## Exercises

1. Eight operations were performed in the `run` function defined in this section. There are no dependencies between them. Design an experiment to see if the deep learning framework will automatically execute them in parallel.
1. When the workload of an individual operator is sufficiently small, parallelization can help even on a single CPU or GPU. Design an experiment to verify this.
1. Design an experiment that uses parallel computation on CPUs, GPUs, and communication between both devices.
1. Use a debugger such as NVIDIA's [Nsight](https://developer.nvidia.com/nsight-compute-2019_5) to verify that your code is efficient.
1. Designing computation tasks that include more complex data dependencies, and run experiments to see if you can obtain the correct results while improving performance.

:begin_tab:`mxnet`
[Discussions](https://discuss.d2l.ai/t/362)
:end_tab:

:begin_tab:`pytorch`
[Discussions](https://discuss.d2l.ai/t/1681)
:end_tab:

gha_language: Python


text:
# generator-node-kata

## Getting Started

Hey there,

Thanks for checking out my node code kata generator, you can install it with Yeoman or fork the base repo which can be found [here](https://github.com/james-dowell/node-kata-base-project)

### Usage

To install generator-node-kata from npm, run:

```bash
npm install -g generator-node-kata
```

Finally, initiate the generator:

```bash
yo node-kata
```

To run the tests without watching the files (single run) use the following gulp command:
```
gulp test
```

To run the tests and watch the files use the following gulp command:
```
gulp test:auto
```

####Roadmap
 - **0.0.3** Include babel (for ES6+ compatability)

### What is Yeoman?

Trick question. It's not a thing.

Not every new computer comes with a Yeoman pre-installed. He lives in the [npm](https://npmjs.org) package repository. You only have to ask for him once, then he packs up and moves into your hard drive. *Make sure you clean up, he likes new and shiny things.*

```bash
npm install -g yo
```

### Yeoman Generators

Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.

To install generator-node-kata from npm, run:

```bash
npm install -g generator-node-kata
```

Finally, initiate the generator:

```bash
yo node-kata
```

## Libraries included by default

- [Mocha](http://mochajs.org/)
- [ChaiJS](http://chaijs.com/)
- [SinonJS](http://sinonjs.org/)

## License

MIT

repository: ryanhyslop/generator-node-kata

repo_name: ryanhyslop/generator-node-kata


text:
# LOOPS

Loops check a condition. If it returns `true`, a code block will run. Then the condition will be checked again and if it still returns `true`, the code block will run again. It repeats until the condition returns `false`. There are three common types of loop:

- For (The most common loop)
  - If you need to run code a specific number if times.
  - The condition is usually a counter which is used to tell how many times the loop should run.
- While
  - If you do not know how many tiles the code should run, you can use `while` loop.
  - Here the condition can be something other than a counter, and the code will continue to loop for as long as the condition is `true`.
- Do ... While
  - Similar to `while` loop but always run the code inside the curly braces at least once, even if the condition evaluated to `false`.

## FOR LOOP

![for loop](./for.png)
![for counter](./for_counter_condition.png)

## KEY OF LOOP CONCEPTS

1. In some cases you can find `break` or `continue`. They are used to control the follow of the loop.
2. If you don't control your loop condition correctly the loop get into `infinite loop`.

example found in **Chapter_04/Examples/c04/for-loop.html**

**HTML**

```html
<!DOCTYPE html>
<html>
  <head>
    <title>
      JavaScript & jQuery - Chapter 4: Decisions & Loops - For Loop
    </title>
    <link rel="stylesheet" href="css/c04.css" />
  </head>
  <body>
    <section id="page1">
      <h1>Bullseye</h1>
      <img src="images/teacher.png" id="teacher" alt="teacher" />
      <section id="answer"></section>
    </section>
    <script src="js/for-loop.js"></script>
  </body>
</html>
```

**JavaScript**

```js
var scores = [24, 32, 17]; // Array of scores
var arrayLength = scores.length; // Items in array
var roundNumber = 0; // Current round
var msg = ""; // Message

// Loop through the items in the array
for (var i = 0; i < arrayLength; i++) {
  // Arrays are zero based (so 0 is round 1)
  // Add 1 to the current round
  roundNumber = i + 1;

  // Write the current round to message
  msg += "Round " + roundNumber + ": ";

  // Get the score from the scores array
  msg += scores[i] + "<br />";
}

document.getElementById("answer").innerHTML = msg;
```

example found in **Chapter_04/Examples/c04/while-loop.html**

**HTML**

```html
<!DOCTYPE html>
<html>
  <head>
    <title>
      JavaScript & jQuery - Chapter 4: Decisions & Loops - While Loop
    </title>
    <link rel="stylesheet" href="css/c04.css" />
  </head>
  <body>
    <section id="page1">
      <h1>Bullseye</h1>
      <img src="images/teacher.png" id="teacher" alt="teacher" />
      <section id="answer"></section>
    </section>
    <script src="js/while-loop.js"></script>
  </body>
</html>
```

**JavaScript**

```js
var i = 1; // Set counter to 1
var msg = ""; // Message

// Store 5 times table in a variable
while (i < 10) {
  msg += i + " x 5 = " + i * 5 + "<br />";
  i++;
}

document.getElementById("answer").innerHTML = msg;
```

example found in **Chapter_04/Examples/c04/do-while-loop.html**

**HTML**

```html
<!DOCTYPE html>
<html>
  <head>
    <title>
      JavaScript & jQuery - Chapter 4: Decisions & Loops - Do While Loop
    </title>
    <link rel="stylesheet" href="css/c04.css" />
  </head>
  <body>
    <section id="page1">
      <h1>Bullseye</h1>
      <img src="images/teacher.png" id="teacher" alt="teacher" />
      <section id="answer"></section>
    </section>
    <script src="js/do-while-loop.js"></script>
  </body>
</html>
```

**JavaScript**

```js
var i = 1; // Set counter to 1
var msg = ""; // Message

// Store 5 times table in a variable
do {
  msg += i + " x 5 = " + i * 5 + "<br />";
  i++;
} while (i < 1);
// Note how this is already 1 and it still runs

document.getElementById("answer").innerHTML = msg;
```

---

### REFERENCES AND TERMS:

> :information_source: If you use a data type JavaScript did not expect, JavaScript tries to make scense of the operation rather than reporting an error. This called `Coercion`

gha_language: HTML


text:
---
layout: layout.pug
navigationTitle:  dcos marathon about
title: dcos marathon about
menuWeight: 0
excerpt: Displays the info.json file for DC/OS Marathon

enterprise: false
---

# Description
The `dcos marathon about` command will display the `info.json` file for DC/OS Marathon.

# Usage

```bash
dcos marathon about [OPTION]
```

# Options

None.

# Parent command

| Command | Description |
|---------|-------------|
| [dcos marathon](/1.11/cli/command-reference/dcos-marathon/) | Deploy and manage applications to DC/OS. |

repository: ShaunDeng/dcos-docs-site

repo_name: ShaunDeng/dcos-docs-site


text:
# @surgeapp/parallel-worker
> A small utility for orchestrating  parallel access to database by multiple workers

## Motivation
Coming from a real world scenario this tiny library allows you to process lots of data much faster by introducing parallelism. It spawns multiple workers which access an assigned portion of data in database simultaneously, so you can process much more data at the same time without worrying about synchronization or duplicate processing.

![paralell-worker](https://user-images.githubusercontent.com/11503453/80365743-6171d000-8888-11ea-8761-310ba7ef0e7f.png)

## Installation
```console
npm install --save @surgeapp/parallel-worker
```

## Example usage
```js
import { ParallelWorker, WorkerEvent } from '@surgeapp/parallel-worker'

const worker = new ParallelWorker({
  redis: redisInstance,
})

worker.setFetchNext(async lastId => {
  // business logic for fetching next payload that should be processed
  return {
    lastId: newLastId,
    ...payload, // your custom optional payload data
  }
})

worker.setHandler(async ({ lastId, ...payload }) => {
  // process payload
})

worker.on(WorkerEvent.beforeStop, async () => {
  // e.g. usable for closing all connections to exit gracefully
})

worker.start()
```

**Important note**: In order to make the script work properly please make sure that data you fetch is sorted

## Documentation
### Configuration options
```js
const options = {
  redis: redisInstance,
  workers: 4,
  restartWorkerOnExit: true,
  maxAllowedWorkerRestartsCount: 5,
  logging: {
      enabled: true,
      level: 'debug',
  },
  lock: { ... },
  redisKeyPrefix: 'myPrefix',
}
```
| Option | Required |  Default value | Description |
|-|:-:|:-|-|
| `redis` |  yes | - | Redis instance |
| `workers` |  no | `os.cpus().length` | Number of workers to run in parallel |
| `restartWorkerOnExit` |  no | `true` | Specify if it should start a new worker when the old one exits |
| `maxAllowedWorkerRestartsCount` |  no | `workers * 5` | Specify a max allowed count of worker restarts to prevent infinite restarting when some error occurs  |
| `reclaimReservedPayloadOnFail` |  no | `false` | Specify if the payload should be assigned to another worker if the original worker processing the payload failed. <br> **Note:** This will result in some items being **processed more than once** |
| `logging.enabled` |  no | `true` | Specify if logs should be enabled |
| `logging.level` |  no | `info` | Specify minimal log level to show (See [all levels](https://github.com/pinojs/pino/blob/master/docs/api.md#level-string))|
| `lock` | no | `{ type: 'local' }` | See [lock options](#lock-options) |
| `redisKeyPrefix` |  no | `@surgeapp/parallel-worker` | Specify custom key prefix for storing values in Redis |

### Lock options
This package supports **local** *(default option)* and **distributed** *(using Redis)* locking.

#### Example of local locking options
This is default type, if you don't want to update settings, you don't need to provide `lock` option in the configuration.
```js
lock: {
  type: 'local',
  options: {
    lockTtl: 1000,
    maxPending: 100, // max pending tasks
  },
}
```

#### Example of distributed locking options
Please refer to the [original package](https://github.com/mike-marcacci/node-redlock#configuration) for parameters explanation.
```js
lock: {
  type: 'distributed',
  options: {
    redisInstances: [redis1, redis2, redis3],
    lockTtl: 1000,
    driftFactor: 0.01,
    retryCount: 10,
    retryDelay: 200,
    retryJitter: 200,
  },
}
```

### Events
This package implements EventEmitter so you can listen for the following events.
| Event name | Callback payload | Description |
|-|-|-|
| `WorkerEvent.workerExited` | `{ worker, code, signal }` | Emitted when worker process exited |
| `WorkerEvent.beforeStop` | - | Emitted after all workers stopped, right before exiting master process. This is the right place to stop all your connections to database, or other cleanup tasks |

### Handler functions
In order to run script correctly you have to specify the following functions.
#### setFetchNext(async lastId => Promise\<Payload|null|void>)
This function defines the way of fetching the next payload from a database. Make sure **no ID will be returned more than once** (don't forget to use **ordering** in your query) , otherwise those items will be processed multiple times. This function must **return an array of ids**.
To signal no more data just simply use empty return statement.
```js
worker.setFetchNext(async (lastId: ID | null): Promise<Payload|null|void> => {
  // In this example we fetch first 5 items that have value "updated = 0"
  // lastId points to the last processed id (or null if the first operation) in the previous operation so we can continue from this value onward
  const result = await db('users')
    .where('updated', '=', 0)
    .andWhere('id', '>', lastId ?? 0)
    .orderBy('id')
    .limit(5)

  // no more data
  if (result.length === 0) {
    return
  }

  return {
    // return last ID from fetched rows as a pointer for next iteration
    lastId: _.last(result).id, // This field is required!
    // you can also add any additional payload data that will be available in setHandler callback
    idsRange: result.map((row: any) => row.id)
  }
})
```

#### setHandler(async ({ lastId, ...payload }) => Promise\<Payload>)
This function contains your business logic for processing assigned range of data from a database.
You always operate on `payload.idsRange` variable which gives you secure access to the reserved data portion in the database.
```js
worker.setHandler(async ({ lastId, ...payload }: Payload) => {
  // For example, let's increment all items in given range by 1
  await db('users')
    .whereIn('id', payload.idsRange) // idsRange is available in payload variable since we returned this in setFetchNext callback
    .increment('updated', 1)
})
```

#### type Payload
`Payload` interface requires one required parameter **lastId** which specifies last processed id and allows you to start fetching next payload
from this point onward.
```js
interface Payload {
  lastId: ID | null
  [key: string]: any
}
```

## TODOs
- [ ] 🧪 add more tests
- [ ] ⚠ handle lock errors (timeouts)

## License
See the [LICENSE](LICENSE) file for information.

Made with ❤ at [STRV](https://strv.com)

repository: jozefcipa/parallel-worker

repo_name: jozefcipa/parallel-worker


text:
# Phloeospora asiminae Ellis & Morgan, 1887 SPECIES

#### Status
SYNONYM

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

#### Published in
J. Mycol. 3(8): 88 (1887)

#### Original name
Phloeospora asiminae Ellis & Morgan, 1887

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Dothideomycetes/Capnodiales/Mycosphaerellaceae/Miuraea/Miuraea asiminae/ Syn. Phloeospora asiminae/README.md

repo_name: mdoering/backbone


text:
# Roadwork RL

> **Note:** This project is currently under heavy development and may change. It should not be used for production deployments yet.

Roadwork-RL is a Reinforcement Learning Platform that aims to act as an abstraction layer between the actual simulator integration and the algorithm acting on it. Its goal is to reduce the complexity required to spin up experiments that require a horizontally and isolated scaled simulator. It allows researchers to focus on the Reinforcement Learning algorithms.

## Architecture

A high-level architecture of the platform can be found below. The focus points of Roadwork-RL are:
* Code agnostic platform, allowing clients in different languages
* Easy simulator integrations
* The OpenAI Gym language

![/assets/roadwork-rl-abstraction.png](./assets/roadwork-rl-abstraction.png)

## Getting Started

You can get started yourself in 2 different ways, for researchers we recommend "**Kubernetes**" while as for development purposes, we recommend running the "**Standalone**" installation. See the links below for the different Operating Systems to get started.

> **Note:** We recommend Linux as the target Operating System

* [Windows](./docs/getting-started/windows.md) - WIP
* [Linux](./docs/getting-started/linux.md)

Once the installation is done, you can run your first experiment (Cartpole) through the following commands:

```bash
# 0a. Start X Server for rendering
sudo Xvfb -screen 0 1024x768x24 &
export DISPLAY=:0

# 0b. Navigate to Roadwork
cd ~/roadwork-rl

# 1. Start Server
sudo dapr run --app-id rw-server --app-port 3000 python3 ./src/Server/main.py

# 2. Start Experiment (different window)
sudo dapr run --app-id demo-client python3 ./src/Experiments/baselines/cartpole/train.py
```

### Language SDKs Available

* [Python](./docs/sdk/python.md)
* [NodeJS](./docs/sdk/node.md) - WIP

### Simulators Implemented

* [OpenAI](https://github.com/openai/gym)

## References

* [High-Level Technical Overview](./docs/technical.md)
* [Protobuf Serialization](./docs/protobuf.md)
* [Spaces](./docs/spaces.md)
* [Simulators](./docs/simulators.md)
* [grpc.io](https://grpc.io)
* [Protobuf](https://github.com/protocolbuffers/protobuf)
* [Dapr](https://github.com/dapr/dapr)
* [Kubernetes](https://github.com/kubernetes/kubernetes)

## TODO

- [ ] Integrate [Facebook ReAgent](https://github.com/facebookresearch/ReAgent) on top of this
    * Simulation Observation Downloader
    * Trainer On-Policy & Off-Policy
- Add more simulators
  - [ ] [Unity ML-Agents](https://github.com/Unity-Technologies/ml-agents)
  - [ ] [Project Malmo](https://www.microsoft.com/en-us/research/project/project-malmo/)
- [ ] Performance Benchmarks (what is the impact of this library compared to a vanilla implemented)
* Create a custom language for state describing
    * Currently we can describe a state as shown before: `Tuple([ Box(0, 255, shape=(64, 64, 3)), Box(-50, 50, shape=(3, )) ])`. This might be too abstract or language dependent and could be done easier + more efficient. E.g. think of a Robotic arm, where we should be able to describe each join independently.

repository: Random-Word/Roadwork-RL

repo_name: Random-Word/Roadwork-RL


text:
# fetch-project-releases
This is just to fetch java code samples from GitHub for research.
We rely on tags because we consider the code to be more mature (read as: more likely to be syntactically correct).

 See [TODO](#todo).

## Setup
You have to register an API token first!
Please see [this](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) on how to generate a token.

## Run
`$ TOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ./get_java_projects.sh`

By default, the top 30 projects are considered. Use `-n <some_number>` to adjust this value accordingly.
Use `-o <path/to/directory>` to specify where the releases are stored. Please note that running this script can consume quite some disk space, as each release is a tar.gz!
Use `-c` to simply clone the repositories with git instead of fetching release tarballs.
Use `-d` (for dry-run) to simulate an actual run but do not download or clone anything.

## Output
Releases are stored as tar.gz files in a file system hierarchy resembling githubs user/project structure.

Example output:
```
$ TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ./get_java_projects.sh
Retrieving releases for: ReactiveX/RxJava (https://github.com/ReactiveX/RxJava)
storing release v2.0.4 as /tmp/src/ReactiveX/RxJava/v2.0.4.tar.gz
storing release v2.0.3 as /tmp/src/ReactiveX/RxJava/v2.0.3.tar.gz
storing release v2.0.2 as /tmp/src/ReactiveX/RxJava/v2.0.2.tar.gz
storing release v2.0.1 as /tmp/src/ReactiveX/RxJava/v2.0.1.tar.gz
storing release v2.0.0 as /tmp/src/ReactiveX/RxJava/v2.0.0.tar.gz
storing release v2.0.0-RC5 as /tmp/src/ReactiveX/RxJava/v2.0.0-RC5.tar.gz
storing release v2.0.0-RC4 as /tmp/src/ReactiveX/RxJava/v2.0.0-RC4.tar.gz
storing release v2.0.0-RC3 as /tmp/src/ReactiveX/RxJava/v2.0.0-RC3.tar.gz
storing release v2.0.0-RC1 as /tmp/src/ReactiveX/RxJava/v2.0.0-RC1.tar.gz
storing release v2.0.0-DP0 as /tmp/src/ReactiveX/RxJava/v2.0.0-DP0.tar.gz
storing release v1.2.5 as /tmp/src/ReactiveX/RxJava/v1.2.5.tar.gz
storing release v1.2.4 as /tmp/src/ReactiveX/RxJava/v1.2.4.tar.gz
storing release v1.2.3 as /tmp/src/ReactiveX/RxJava/v1.2.3.tar.gz
storing release v1.2.2 as /tmp/src/ReactiveX/RxJava/v1.2.2.tar.gz
storing release v1.2.1 as /tmp/src/ReactiveX/RxJava/v1.2.1.tar.gz
storing release v1.2.0 as /tmp/src/ReactiveX/RxJava/v1.2.0.tar.gz
storing release v1.1.10 as /tmp/src/ReactiveX/RxJava/v1.1.10.tar.gz
storing release v1.1.9 as /tmp/src/ReactiveX/RxJava/v1.1.9.tar.gz
storing release v1.1.8 as /tmp/src/ReactiveX/RxJava/v1.1.8.tar.gz
storing release v1.1.7 as /tmp/src/ReactiveX/RxJava/v1.1.7.tar.gz
storing release v1.1.6 as /tmp/src/ReactiveX/RxJava/v1.1.6.tar.gz
...
```

## TODO
- [ ] [reimplement this in python by using a proper json parser instead of banging the output with sed](/../../issues/4)
- [x] [use pagination to retrieve more than 30 projects](/../../issues/1)
- [x] [use arg parser to provide target directory via command line argument](/../../issues/2)
- [ ] [prune non-java files from repository](/../../issues/3)
- [ ] create a pull request that resolves all the todos (I'll happily pull) :)

repository: xai/fetch-project-releases

gha_language: Shell

repo_name: xai/fetch-project-releases


text:
---
layout: default
---

# 1996-01-29 - Re: Escrowing Viewing and Reading Habits with the Governmen

## Header Data

From: "Peter Trei"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e5bdbe04cfa2bd22da5bc24d3df72009ab47bfe90d3d9b0929c8d5ac52b447bd

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-01-29 19:52:38 UTC

Raw Date: Tue, 30 Jan 1996 03:52:38 +0800

## Raw message

```
{% raw  %}From: "Peter Trei"<EMAIL_ADDRESS>Date: Tue, 30 Jan 1996 03:52:38 +0800
To<EMAIL_ADDRESS>Subject: Re: Escrowing Viewing and Reading Habits with the Governmen
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

> Date:          Sun, 28 Jan 96 21:05:08
> From<EMAIL_ADDRESS>> Subject:       Re: Escrowing Viewing and Reading Habits with the Government
> To:            "roy m. silvernail"<EMAIL_ADDRESS>> Cc:            "timothy c. may"<EMAIL_ADDRESS><EMAIL_ADDRESS>

> > > The "Library Awareness Program," administered by the Justice Department, is
> > > designed to identify potential criminals before they have a chance to
> > > commit their deeds. The visits to libraries made by the FBI are used to
> > > determine who is reading subversive or dangerous material.

> Do you really think the FBI believes that asking librarians to keep
> records of customer useage is an efficient way to read the customers minds?
> Do you really think that the FBI foreign counter-intelligence squad has
> nothing better to do than keep a database of who is reading Che Guevara
> memoirs?

Yes.

Heck, I remember this was a big issue about 15 years ago. Try asking
someone who was active in library science in the late 70's, early 80's.

The general reaction of the library community was, I am glad to say,
entirely pro-privacy.

Peter Trei
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

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

+ Return to "[David Lesher <wb8foz@nrk.com>](/authors/david_lesher_wb8foz_at_nrk_com_)"
+ Return to "["Peter Trei" <trei@process.com>](/authors/peter_trei_trei_at_process_com_)"

+ 1996-01-29 (Tue, 30 Jan 1996 03:52:38 +0800) - Re: Escrowing Viewing and Reading Habits with the Governmen - _"Peter Trei"<EMAIL_ADDRESS>  + 1996-01-31 (Wed, 31 Jan 1996 11:49:20 +0800) - [Re: Escrowing Viewing and Reading Habits with the Governmen](/archive/1996/01/d368d81bfbfa951fed6e302e3f5b5b4d8b30735cee28224532635500c54c1c22) - _David Lesher<EMAIL_ADDRESS>


text:
---
layout: post
title: "Reworking my home network servers"
date: 2017-10-15
---

## The Current Setup
After adding a few servers to my home network organically it has grown a bit wonky.
The main issues are
- No DNS server, so no hostnames. As I get to 3-4 servers this makes it a little anooying to constantly type IPs.
- Two seperate file servers due to one being the attached storage for Transmission.
- The 600GiB dedicated file server is on the DLink network which is 100Mbit speed. While this shouldn't be an issue for Wifi-connected clients, it could slow down server-to-server transfers or slow down transfers if multiple wifi clients are accessing the file server at once.

This is a diagram of the current setup:

![Home Network](https://raw.githubusercontent.com/SuperThunder/SuperThunder.github.io/master/content/HomeNetwork/NetworkDiagram_2017-10-15.png "Current Home Network (3 servers)")

## Fixing the current setup
- Add a DNS server at the Archer C7 (or even ISP modem/router) level. By controlling DNS we can also enforce certain levels of ad/malware blocking.
- The easy way to fix the dual file servers is to merge the Transmission and file server roles into one machine. If we want to get fancy with containment we could make the Transmission server a VM on the file server.
- Since the file server is on a laptop or desktop it's harder to move that to the living room. It can stay connected to the DLink, or we can try to run another ethernet cable from the Archer C7 to the basement.

Since I now understand VMs and libvirt/KVM well enough to use them to deploy useful services, I may add a VM host on the DLink network. It could be the same PC as the file server / transmission server, or a seperate one to not kill the file server because of excessive VM load.

## The Future Setup
This is a rough diagram of what the future setup will look like.

![Future Home Network](https://raw.githubusercontent.com/SuperThunder/SuperThunder.github.io/master/content/HomeNetwork/NetworkDiagramFuture_2017-10-15.png "Home Network after planned changes (2 or 3 servers)")


text:
customizer-livepreview-thememod-experiment
====
This theme lets you see at which points you can get theme mod value in Customizer live preview. Blog post about this experiment can be found [right here](http://befive.info/blog/2016/03/17/getting-get_theme_mod-working-wordpress-customizer-live-preview/).

This experiment theme uses [zero](https://github.com/SimoNonnis/ZeroWpTheme) by [Simon Nonnis](https://github.com/SimoNonnis). Licensed under MIT.


text:
---
title: "Scaling the Query Frontend"
linkTitle: "Scaling the Query Frontend"
weight: 5
slug: scaling-query-frontend
---

Historically scaling the Cortex query frontend has [posed some challenges](https://cortexmetrics.io/docs/proposals/scalable-query-frontend/).  This document aims to detail how to use some of the added configuration parameters to correctly scale the frontend.  Note that these instructions apply in both the HA single binary scenario or microservices mode.

## DNS Configuration / Readiness

When a new frontend is first created on scale up it will not immediately have queriers attached to it.  The existing endpoint `/ready` was updated to only return http 200 when the query frontend was ready to serve queries.  Make sure to configure this endpoint as a healthcheck in your load balancer.  Otherwise a query frontend scale up event might result in failed queries or high latency for a bit while queriers attach.

## Querier Max Concurrency

Make sure to configure the querier frontend worker to match max concurrency.  This will allow the operator to freely scale the frontend up and down without impacting the amount of work an individual querier is attempting to perform.  More details [here](https://cortexmetrics.io/docs/proposals/scalable-query-frontend/#dynamic-querier-concurrency).

### Example Configuration

**CLI**
```
-querier.worker-match-max-concurrent=true
```

**Config File**
```yaml
frontend_worker:
  match_max_concurrent: true
```


text:
# Notedown

Notedown is a simple AngularJS powered Markdown editor written in Typescript that runs within Node-webkit.

To get it up an running, clone this repo and run

```
npm install -g gulp

npm install
bower install

gulp
```

There will be a built version of Notedown in the dist folder for Windows and OSX.

## Screenshots

### Preview Mode

![Screen 2](Screenshots/Screen_002.png)

### Edit Mode

![Screen 1](Screenshots/Screen_001.png)

repository: bihai/Notedown

repo_name: bihai/Notedown


text:
# Hyaloceras kriegerianum (Bres.) Died., 1899 SPECIES

#### Status
SYNONYM

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

#### Published in
Mycotheca generalis no. 324 (1899)

#### Original name
Pestalotia kriegeriana Bres., 1894

### Remarks
null

path: /life/Fungi/Ascomycota/Sordariomycetes/Xylariales/Amphisphaeriaceae/Discostroma/Discostroma callistemonis/ Syn. Hyaloceras kriegerianum/README.md


text:
# TL;DR

Finds unhealthy pods and nodes

## Use
```
gen3 healthcheck [--slack] [--retry]
```
Parameters
  - --slack: if health check fails, notify slack with results
  - --retry: if health check fails, briefly wait before retrying the healthcheck

repository: uc-cdis/cloud-automation

repo_name: uc-cdis/cloud-automation


text:
vue3-vite-starter

English | [简体中文](./README-zh_CN.md)

vue3 & vue-router-next & vite starter

The `main` branch only contains the basic part and does not contain any UI framework content.

**[WIP]** The `element-plus` branch is based on the `main` branch and serves as a template for the management system using `element-plus`.

**[WIP]** The `vant` branch is based on the `main` branch and serves as a mobile template for using `vant`.


text:
//[leakcanary-android-core](../../../../index.md)/[leakcanary](../../index.md)/[LeakCanary](../index.md)/[Config](index.md)/[heapDumper](heap-dumper.md)

# heapDumper

[androidJvm]\
val [heapDumper](heap-dumper.md): [HeapDumper](../../-heap-dumper/index.md)

Dumps the Java heap. You may replace this with your own implementation if you wish to change the core heap dumping implementation.

repository: pushpalroy/leakcanary

repo_name: pushpalroy/leakcanary


text:
---
id: "_double_representation_bit_length_"
title: "bitLength"
sidebar_label: "bitLength"
---

**bitLength**(`a`: number): *number*

*Defined in [double-representation/bit-length.ts:10](https://github.com/FlorisSteenkamp/double-double/blob/d35ae52/src/double-representation/bit-length.ts#L10)*

Returns the bit-length of the significand of the given number in such a way
that trailing zeros are not counted.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`a` | number | a double precision floating point number  |

**Returns:** *number*

repository: TomSwift/double-double

repo_name: TomSwift/double-double


text:
# CamEffect

[![github home](https://img.shields.io/badge/gaetanozappi-CamEffect-blue.svg?style=flat)](https://github.com/gaetanozappi/CamEffect)

[![github issues](https://img.shields.io/github/issues/gaetanozappi/CamEffect.svg?style=flat)](https://github.com/gaetanozappi/CamEffect/issues)
[![github closed issues](https://img.shields.io/github/issues-closed/gaetanozappi/CamEffect.svg?style=flat&colorB=44cc11)](https://github.com/gaetanozappi/CamEffect/issues?q=is%3Aissue+is%3Aclosed)
[![Issue Stats](https://img.shields.io/issuestats/i/github/gaetanozappi/CamEffect.svg?style=flat&colorB=44cc11)](http://github.com/gaetanozappi/CamEffect/issues)
[![github license](https://img.shields.io/github/license/gaetanozappi/CamEffect.svg)]()

-   [License](#-license)

## 📜 License
This library is provided under the Apache License.

repository: gaetanozappi/CamEffect

repo_name: gaetanozappi/CamEffect


text:
# A simple server that stores session data that can be accessed using REST to be used with [rest-session-store](https://github.com/nohorjo/file-session-store)

## Environment params

* `PORT`: The port to run on
* `SECRET`: The secret to encrypt with

repository: nohorjo/rest-session-cache

repo_name: nohorjo/rest-session-cache


text:
---
layout: page
title: "About"
description: "This is who I am."
header-img: "img/about-bg.jpg"
---

<img src="/img/about_avatar.jpg" width="300px" class="center-image" style="border-radius: 50%"/>

## Who am I?

Hi, I'm Jan Halozan.

## Who I really am?

I am batman.

## OK who I really really am?

I'm a software engineer based in Slovenia. Passionate about artificial intelligence, neural networks, iOS, Swift, design, hardware, computer science in all of its glory and technology in general. If you'd like to know more about what I do make sure to check out [Work](/work/) and my [Portfolio](/portfolio/).

## What do I do?

I make high quality iOS apps. The ones that make people's eyes pop out. And that's no joke. I also hack every now and then and the results range from hardware contraptions (like gimbals, drones, ...) to software things such as... You know what? Just take a look around my page to see what I do.

## Other interests

I **love** snowboarding. And surfing. And skating. And calisthenics.

## Want to know more? Contact.

I might be a bit scarce with information on this page. But that's only because I want you to contact me :)

Drop me a line at [j.halozan.services@gmail.com](mailto:j.halozan.services@gmail.com).


text:
---
layout: default
---

# 1997-12-29 - constitution.amendmentxi.html (fwd)

## Header Data

From: Jim Choate<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Cypherpunks Distributed Remailer)

Message Hash: 58bd40543e128792f840392ea178afb6d35d5b6198b84c0c0c1d192f675c1af4

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-12-29 04:45:38 UTC

Raw Date: Mon, 29 Dec 1997 12:45:38 +0800

## Raw message

```
{% raw  %}From: Jim Choate<EMAIL_ADDRESS>Date: Mon, 29 Dec 1997 12:45:38 +0800
To<EMAIL_ADDRESS>(Cypherpunks Distributed Remailer)
Subject: constitution.amendmentxi.html (fwd)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

Forwarded message:

>     Amendment XI
>
>    The judicial power of the United States shall not be construed to
>    extend to any suit in law or equity, commenced or prosecuted against
>    one of the United States by citizens of another state, or by citizens
>    or subjects of any foreign state.

Of note is that this amendment *only* covers cases where a citizen sues a
*single* state, not 49 of them.

There is no Constitutional rule that covers the process between a individual
and more than a single state. It simply ain't there.

    ____________________________________________________________________
   |                                                                    |
   |      Those who make peaceful revolution impossible will make       |
   |      violent revolution inevitable.                                |
   |                                                                    |
   |                                          John F. Kennedy           |
   |                                                                    |
   |                                                                    |
   |            _____                             The Armadillo Group   |
   |         ,::////;::-.                           Austin, Tx. USA     |
   |        /:'///// ``::>/|/                     http://www.ssz.com/   |
   |      .',  ||||    `/( e\                                           |
   |  -====~~mm-'`-```-mm --'-                         Jim Choate       |
   |<EMAIL_ADDRESS>   |
   |<PHONE_NUMBER>      |
   |____________________________________________________________________|

{% endraw %}
```

## Thread

+ Return to [December 1997](/archive/1997/12)

+ Return to "[Jim Choate <ravage@ssz.com>](/authors/jim_choate_ravage_at_ssz_com_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ 1997-12-29 (Mon, 29 Dec 1997 12:45:38 +0800) - constitution.amendmentxi.html (fwd) - _Jim Choate<EMAIL_ADDRESS>  + 1997-12-29 (Mon, 29 Dec 1997 22:40:43 +0800) - [Re: constitution.amendmentxi.html (fwd)](/archive/1997/12/5bf81347f5af825a225aa455afebf1eb3186ed562fc8e91a1fd6a47aeddde705) - _"William H. Geiger III"<EMAIL_ADDRESS>


text:
# TOP DOWN SHOOTER
:gun: Top down shooter with LÖVE

![Screenshot](https://user-images.githubusercontent.com/1193542/57123252-1c71a580-6dbc-11e9-8891-8fd36957b539.png)

## Controls

- Move: WASD or Arrow keys
- Fire: Main mouse button
- Reload: Sub mouse button
- Restart: F5
- Debug mode: F12
- Print screen: Capture a screenshot and save it to a [save-directory](https://love2d.org/wiki/love.filesystem)

## Getting Started

### Quick Start

1. Download and install [LÖVE](https://love2d.org/) 11.2.
1. Download the latest version of `love-top-down-shooter.love` game distribution from release.
1. Open the distribution with LÖVE.

### Build and Run from Source

```
git clone https://github.com/remyroez/love-top-down-shooter.git
cd love-top-down-shooter/game
love .
```

## Requirements

- [LÖVE](https://love2d.org/) 11.2

## Libraries

- [autobatch](https://github.com/rxi/autobatch) 0.1.1 (customized)
- [lume](https://github.com/rxi/lume/tree/d8c2eddc10af994ad4956cf0b7ae7188e86db47e) 2.3.0
- [lurker](https://github.com/rxi/lurker/tree/4e34f47f9ed95477407425c5b25a779fac3eb9a7) 1.0.1
- [middleclass](https://github.com/kikito/middleclass) v4.1.1
- [Stateful](https://github.com/kikito/stateful.lua) 1.0.5 (2017-08)
- [chrono](https://github.com/adnzzzzZ/chrono/tree/d31b96355b59320b6f8f0a1f5dcb0833c8bb5c2c)
- [STALKER-X](https://github.com/adnzzzzZ/STALKER-X/tree/243e67b5d30ec7762c579b027dadaa3d3696b1cd)
- [sbss](https://github.com/mikufuworks/sbss/tree/905950ef0e2e64f30d4a5b2540b382134d62b6c5) (customized)
- [Simple Tiled Implementation](https://github.com/karai17/Simple-Tiled-Implementation/tree/2ba879d2509163822c353f8aba748085a8014389) <IP_ADDRESS> (customized + implement windfield plugin)

## Assets

- [Kenney Game Assets](https://itch.io/s/6789/kenney-bundle)
- [splashes](https://github.com/love2d-community/splashes/tree/04a26445795bdf5185d996225045a44193f1d881) (customized)

## License

MIT License

repository: remyroez/love-top-down-shooter

gha_language: Lua

repo_name: remyroez/love-top-down-shooter