text:
# @reportportal/agent-js-jasmine

Agent to integrate Jasmine with ReportPortal.
* More about [Jasmine](https://jasmine.github.io/)
* More about [ReportPortal](http://reportportal.io/)

## Installation

Install the agent in your project:
```cmd
npm install --save-dev @reportportal/agent-js-jasmine
```

## Configuration

**1.** Create the `reportportalConf.js` file with ReportPortal configuration:
```javascript
module.exports = {
  apiKey: "reportportalApiKey",
  endpoint: "http://your.reportportal.server/api/v1",
  project: 'Your reportportal project name',
  launch: 'Your launch name',
  attributes: [
      {
          "key": "YourKey",
          "value": "YourValue"
      },
      {
          "value": "YourValue"
      },
  ],
  description: 'Your launch description',
};
```

The full list of available options presented below.

| Option               | Necessity  | Default   | Description                                                                                |
|----------------------|------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| apiKey               | Required   |           | User's ReportPortal token from which you want to send requests. It can be found on the profile page of this user.                                                                                |
| endpoint             | Required   |           | URL of your server. For example 'https://server:8080/api/v1'.                                                                                |
| launch               | Required   |           | Name of launch at creation.                                                                                |
| project              | Required   |           | The name of the project in which the launches will be created.                                                                                |
| attributes           | Optional   | []        | Launch attributes.                                                                                |
| description          | Optional   | ''        | Launch description.                                                                                |
| rerun                | Optional   | false     | Enable [rerun](https://reportportal.io/docs/dev-guides/RerunDevelopersGuide)                                                                                |
| rerunOf              | Optional   | Not set   | UUID of launch you want to rerun. If not specified, ReportPortal will update the latest launch with the same name                                                                                |
| mode                 | Optional   | 'DEFAULT' | Results will be submitted to Launches page
 *'DEBUG'* - Results will be submitted to Debug page.                                                                                |
| skippedIssue         | Optional   | true      | ReportPortal provides feature to mark skipped tests as not 'To Investigate'.
 Option could be equal boolean values:
 *true* - skipped tests considered as issues and will be marked as 'To Investigate' on ReportPortal.
 *false* - skipped tests will not be marked as 'To Investigate' on application.                                                                  |
| debug                | Optional   | false     | This flag allows seeing the logs of the client-javascript. Useful for debugging.                                                                                |
| restClientConfig     | Optional   | Not set   | The object with `agent` property for configure [http(s)](https://nodejs.org/api/https.html#https_https_request_url_options_callback) client, may contain other client options eg. [`timeout`](https://github.com/reportportal/client-javascript#timeout-30000ms-on-axios-requests).
 Visit [client-javascript](https://github.com/reportportal/client-javascript) for more details. |
| attachPicturesToLogs | Optional   | false     | If set to 'true' then attempts will be made to attach screenshots to the logs.                                                                                |
| reportHooks          | Optional   | false     | Determines report before and after hooks or not.                                                                                |
| token                | Deprecated | Not set   | Use `apiKey` instead.                                                                                |

**2.** Create the agent and add the reporter it to the Jasmine:
```javascript
const ReportportalAgent = require('@reportportal/agent-js-jasmine');
const reportportalConfig = require('./reportportalConf');

const agent = new ReportportalAgent(reportportalConfig);

jasmine.addReporter(agent.getJasmineReporter());
```

**3.** After the Jasmine completes its work, wait for the agent to finish:
```javascript
agent.getExitPromise().then(() => {
    console.log('finish work');
})
```

## Reporting

The agent provides an API to extend the functionality of Jasmine.

Add `PublicReportingAPI` into your test file to use additional reporting features.

```javascript
const PublicReportingAPI = require('@reportportal/agent-js-jasmine/lib/publicReportingAPI');
```

### Report static attributes, description

Inside your suite or spec call `PublicReportingAPI.setDescription()`, `PublicReportingAPI.addAttributes()`

**setDescription** method inside your **suite**

Parameter | Required | Description | Examples
--------- | ----------- | ----------- | -----------
description | true | "string" - text description for your suite | "Your description"
suite | true | "string" - description of your suite (all suite descriptions must be unique) | "Suite"

**addAttributes** method inside your **suite**

Parameter | Required | Description | Examples
--------- | ----------- | ----------- | -----------
attributes | true | attributes, pairs of key and value | [{ "key": "YourKey", "value": "YourValue" }]
suite | true | "string" - description of your suite (all suite descriptions must be unique) | "Suite"

**setDescription** method inside your **spec**

Parameter | Required | Description | Examples
--------- | ----------- | ----------- | -----------
description | true | "string" - text description for your suite | "Your description"

**addAttributes** method inside your **spec**

Parameter | Required | Description | Examples
--------- | ----------- | ----------- | -----------
attributes | true | attributes, pairs of key and value | [{ "key": "YourKey", "value": "YourValue" }]

To integrate report with Sauce Labs just add attributes:

```javascript
[{
 "key": "SLID",
 "value": "# of the job in Sauce Labs"
}, {
 "key": "SLDC",
 "value": "EU (EU or US)"
}]
```

### Report logs and attachments
`PublicReportingAPI` provides the following methods for reporting logs into the current suite/spec.

* log(*level*, *message* , *file*, *suite*). Reports *message* and optional *file* with specified log *level* as a log of the current suite/spec.

*level* should be equal to one of the following values: *TRACE*, *DEBUG*, *INFO*, *WARN*, *ERROR*, *FATAL*.

*suite* it's description of your suite (all suite descriptions must be unique) ***REQUIRED INSIDE OF YOUR SUITE, OPTIONAL FOR SPEC***

*file* should be an object (***REQUIRED INSIDE YOUR SUITE,*** if there is no file object, set ***NULL***) :

```javascript
{
  name: "filename",
  type: "image/png",  // media type
  content: data,  // file content represented as 64base string
}
```
* trace (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with trace log level.
* debug (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with debug log level.
* info (*message* , *file*, *suite*). Reports *message* and optional *file* as log of the current suite/spec with info log level.
* warn (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with warning log level.
* error (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with error log level.
* fatal (*message* , *file*, *suite*). Reports *message* and optional *file* as a log of the current suite/spec with fatal log level.

`PublicReportingAPI` provides the corresponding methods for reporting logs into the launch.
* launchLog (*level*, *message* , *file*). Reports *message* and optional *file* with the specified log *level* as a log of the current launch.
* launchTrace (*message* , *file*). Reports *message* and optional *file* as a log of the launch with trace log level.
* launchDebug (*message* , *file*). Reports *message* and optional *file* as a log of the launch with debug log level.
* launchInfo (*message* , *file*). Reports *message* and optional *file* as log of the launch with info log level.
* launchWarn (*message* , *file*). Reports *message* and optional *file* as a log of the launch with warning log level.
* launchError (*message* , *file*). Reports *message* and optional *file* as a log of the launch with error log level.
* launchFatal (*message* , *file*). Reports *message* and optional *file* as a log of the launch with fatal log level.

### Finish launch/suite/spec with status
`PublicReportingAPI` provides the following methods for setting status into the current suite/spec.

* setStatus(*status*, *suite*). Assign *status* to the current suite/spec.

*status* should be equal to one of the following values: *passed*, *failed*, *stopped*, *skipped*, *interrupted*, *cancelled*, *info*, *warn*.

*suite* it's description of your suite (all suite descriptions must be unique) ***REQUIRED INSIDE OF YOUR SUITE, OPTIONAL FOR SPEC***

* setStatusPassed(). Assign *passed* status to the current suite/spec.
* setStatusFailed(). Assign *failed* status to the current suite/spec.
* setStatusSkipped(). Assign *skipped* status to the current suite/spec.
* setStatusStopped(). Assign *stopped* status to the current suite/spec.
* setStatusInterrupted(). Assign *interrupted* status to the current suite/spec.
* setStatusCancelled(). Assign *cancelled* status to the current suite/spec.
* setStatusInfo(). Assign *info* status to the current suite/spec.
* setStatusWarn(). Assign *warn* status to the current suite/spec.

`PublicReportingAPI` provides the corresponding methods for setting status into the launch.
* setLaunchStatus(*status*). Assign *status* to the launch.

*status* should be equal to one of the following values: *passed*, *failed*, *stopped*, *skipped*, *interrupted*, *cancelled*, *info*, *warn*.

* setLaunchStatusPassed(). Assign *passed* status to the launch.
* setLaunchStatusFailed(). Assign *failed* status to the launch.
* setLaunchStatusSkipped(). Assign *skipped* status to the launch.
* setLaunchStatusStopped(). Assign *stopped* status to the launch.
* setLaunchStatusInterrupted(). Assign *interrupted* status to the launch.
* setLaunchStatusCancelled(). Assign *cancelled* status to the launch.
* setLaunchStatusInfo(). Assign *info* status to the launch.
* setLaunchStatusWarn(). Assign *warn* status to the launch.

### Report test case id for steps and suites

**setTestCaseId(*testCaseId*, *suite*)**. Set test case id to the current suite/spec. Should be called inside of corresponding suite or spec.

*suite* it's description of your suite (all suite descriptions must be unique) ***REQUIRED INSIDE OF YOUR SUITE, OPTIONAL FOR SPEC***

**Example:**
```javascript
const PublicReportingAPI = require('@reportportal/agent-js-jasmine/lib/publicReportingAPI');

describe('A suite', function() {
    const suiteAttachment = {
      name: 'attachment.png',
      type: 'image/png',
      content: data.toString('base64'),
    }
    PublicReportingAPI.addAttributes([{
        key: 'suiteKey',
        value: 'suiteValue',
    }], 'A suite');
    PublicReportingAPI.setDescription('Suite description', 'A suite');
    PublicReportingAPI.debug('Debug log message for suite "suite"', null, 'A suite');
    PublicReportingAPI.info('Info log message for suite "suite"', suiteAttachment, 'A suite');
    PublicReportingAPI.warn('Warning for suite "suite"', null, 'A suite');
    PublicReportingAPI.error('Error log message for suite "suite"', null, 'A suite');
    PublicReportingAPI.fatal('Fatal log message for suite "suite"', suiteAttachment, 'A suite');
    PublicReportingAPI.setLaunchStatusPassed();
    PublicReportingAPI.setStatusPassed('A suite');
    PublicReportingAPI.setTestCaseId('TestCaseIdForSuite', 'A suite');

    it('spec', function() {
        const specAttachment = {
          name: 'attachment.png',
          type: 'image/png',
          content: data.toString('base64'),
        }
        PublicReportingAPI.addAttributes([{
            key: 'specKey',
            value: 'specValue'
        }]);
        PublicReportingAPI.setDescription('Spec description');
        PublicReportingAPI.log('INFO', 'Info log message for spec "spec" with attachment', specAttachment);
        PublicReportingAPI.launchLog('ERROR', 'Error log message for current launch with attachment', specAttachment);
        PublicReportingAPI.trace('Trace log message for spec "spec"', specAttachment);
        PublicReportingAPI.debug('Debug log message for spec "spec"');
        PublicReportingAPI.info('Info log message for spec "spec" with attachment');
        PublicReportingAPI.warn('Warning for spec "spec"');
        PublicReportingAPI.error('Error log message for spec "spec"');
        PublicReportingAPI.fatal('Fatal log message for spec "spec"');
        PublicReportingAPI.setStatusPassed();
        PublicReportingAPI.setTestCaseId('TestCaseIdForSpec');

        expect(true).toBe(true);
    });
});
```

## Integrations

### Protractor integration

#### Launch agent in single thread mode.

If you launch protractor in single tread mode, just add agent initialization to the `onPrepare` function.
Add `agent.getJasmineReporter` to the  `jasmine.getEnv().addReporter()` as an argument. You can see this in the example bellow.
Update your configuration file as follows:
```javascript
const ReportportalAgent = require('@reportportal/agent-js-jasmine');

...
const agent = new ReportportalAgent({
        token: "00000000-0000-0000-0000-000000000000",
        endpoint: "http://your.reportportal.server/api/v1",
        launch: "LAUNCH_NAME",
        project: "PROJECT_NAME",
        attachPicturesToLogs: false,
        attributes: [
            {
                "key": "YourKey",
                "value": "YourValue"
            },
            {
                "value": "YourValue"
            },
        ]
    });
exports.config = {
    ...
    onPrepare: ()=> {
        ...
        jasmine.getEnv().addReporter(agent.getJasmineReporter());
    },
    afterLaunch:() => {
        return agent.getExitPromise();
    }
};
```

#### Launch agents in multi thread mode.

For launching agents in multi thread mode firstly parent launch must be created and it ID
must be sent to the child launches , so they would send data to the right place, and wouldn't create new
launch instances at the Report Portal.

The main problem is that node.js is a single threaded platform. And for providing multi treading launch with browsers protractor generate
new processes  of node, which can't interact with each other, so Singelton objects or functions can't be created for synchronizing
it work. Only primitive types could be sent as args to the new processes before launch. The way of resolving this problem is
to create launch file that would generate a Parent Launch and send launch's ID to protractor as argument. Then protractor would
launch jasmine-agents with parent ID.
Look through example of the Launch File with protractor-flake module at the 'Settings fot the multi threaded launch' section or at the examples folder.
Any node runner could be used!

1. Install 'protractor-flake':
```bash
npm install protractor-flake --save-dev
```

2. Create a config file as in example below:

`reportportalConf.js`
```javascript
module.exports = {
    token: "00000000-0000-0000-0000-000000000000",
    endpoint: "http://your.reportportal.server/api/v1",
    launch: "LAUNCH_NAME",
    project: "PROJECT_NAME",
    attachPicturesToLogs: false,
    attributes: [
        {
            "key": "YourKey",
            "value": "YourValue"
        },
        {
            "value": "YourValue"
        },
    ]
}
```

3. Create a main launch file as in example below:

`protractorLaunchFile.js`
```javascript
const protractorFlake = require('protractor-flake');
const AgentJasmine = require('@reportportal/agent-js-jasmine');
const reportportalConfig = require('./reportportalConf');
const agent = new AgentJasmine(reportportalConfig);

agent.getLaunchStartPromise().then((launchData) =>{
    protractorFlake({
        maxAttempts: 1,
        protractorArgs: [
            './multiThreadConf.js',
            '--params.id',
            launchData.id
        ]
    }, (status) => {
        agent.getExitPromise().then(() =>{
            process.exit(status);
        });
    });
});
```

4. Then create protractor's spec file as in example below:

`multiThreadConf.js` file

```javascript
 const ReportportalAgent = require('@reportportal/agent-js-jasmine');
 const reportportalConfig = require('./reportportalConf');

 exports.config = {
     multiCapabilities: [
         {
             name: 'normal',
             browserName: 'chrome',
             maxInstances: 2,
             shardTestFiles: true,
             chromeOptions: {
                 args: ['--window-size=1024,768', '--disable-infobars']
             }
         }
     ],
     specs: ['testAngularPage.spec.js', 'testGithubPage.spec.js'],
     onPrepare() {
         const config = Object.assign({
             id: browser.params.id
         }, reportportalConfig);
         const agent = new ReportportalAgent(config);
         /*Its a hack. There is an issue since 2015. That Jasmine doesn't wait for report's async functions.
          links to the issues https://github.com/jasmine/jasmine/issues/842
          https://github.com/angular/protractor/issues/1938
          So it needed to wait until requests would be sent to the Report Portal.
          */
         afterAll((done) => agent.getPromiseFinishAllItems(agent.tempLaunchId).then(()=> done()));
         jasmine.getEnv().addReporter(agent.getJasmineReporter());
     }

 };
```

5. Update script section for your `package.json`:
```javascript
"scripts": {
    "protractor-multi": "node protractorLaunchFile.js"
 }
```

6. Run your protractor:
```bash
npm run protractor-multi
```

See the detailed example with tests in [examples](https://github.com/reportportal/examples-js/tree/main/example-jasmine).

Link to the jasmine issue, that it doesn't work well with async functions
[jasmine issue](https://github.com/jasmine/jasmine/issues/842),
[protractor's community](https://github.com/angular/protractor/issues/1938)

# Copyright Notice
Licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
license (see the LICENSE.txt file).

repository: reportportal/agent-js-jasmine

gha_language: JavaScript

repo_name: reportportal/agent-js-jasmine


text:
# urlparser
Parse URLs using C++

Simply add the three files, Parse.h, UrlParser.h and UrlParser.cpp to your project to parse URLs. You can look at the example usage in main.cpp to see it generate a JSON output of the parsed URL.

The Parse.h contains a PEG-like parser engine. It can be used to parse other things but as-is it's roughly equal in power to a regular expression engine. I was just using this project to explore PEG parsing and marrying it with C++ templates.

license: MIT

repository: shaojava/urlparser

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: shaojava/urlparser


text:
---
layout: page
title: RMS Math Club
subtitle: Keep up to date with our latest news and content.
use-site-title: true
---

## Welcome to the 2020-2021 season!

1. New to math club? Check out our [welcome video](https://www.youtube.com/watch?v=HP58Q_IAsq8).

1. Learn about this year's coaching and competition plans at our [virtual parent night](https://youtu.be/3r6sB6Tdlic).

1. **(Required)** Register for the [2020-2021 math club](http://rmsptsa.org/Packet/MathClubReg). You should receive an email indicating you have been added to the RMS PTSA Math Club group in the PTSA Office 365 account within 48 hours of registering. If not, [contact the chair](mailto:mathclubchair@rmsptsa.org).

1. Opt in to [competitions](https://rmsptsa.sharepoint.com/:x:/r/sites/mathclub/_layouts/15/Doc.aspx?sourcedoc=%7B571B3375-9DF4-42A2-B345-8313C7182EEF%7D&file=Competitions%20%26%20Teams.xlsx&action=default&mobileredirect=true). Access requires a [Microsoft account](https://account.microsoft.com) associated with the email registered with your PTSA account.

1. Volunteer to [proctor](https://rmsptsa.sharepoint.com/:x:/r/sites/mathclub/_layouts/15/Doc.aspx?sourcedoc=%7B04784B0A-C6F9-42F1-851C-6BA66317BB27%7D&file=Volunteers.xlsx&action=default&mobileredirect=true).

## Top links

- Coaching session homework and schedule
- Competition schedule
- About coaching sessions


text:
Find Volume Fractions of Ensembles {#findvolfractions}
=============

## Group (Subgroup) ##
Statistics (Morphological)

## Description ##
This **Filter** determines the volume fraction of each **Ensemble**. The **Filter** counts the number of **Cells** belonging to each **Ensemble** and stores the number fraction.

## Parameters ##
None

## Required Geometry ##
Image

## Required Objects ##
| Kind | Default Name | Type | Component Dimensions | Description |
|------|--------------|-------------|---------|-----|
| **Cell Attribute Array** | Phases | int32_t | (1) | Specifies to which **Ensemble** each **Cell** belongs |

## Created Objects ##
| Kind | Default Name | Type | Component Dimensions | Description |
|------|--------------|-------------|---------|-----|
| **Ensemble Attribute Array** | VolFractions | float | (1) | Fraction of volume that belongs to each **Ensemble** |

## License & Copyright ##

Please see the description file distributed with this **Plugin**

## DREAM.3D Mailing Lists ##

If you need more help with a **Filter**, please consider asking your question on the [DREAM.3D Users Google group!](https://groups.google.com/forum/?hl=en#!forum/dream3d-users)

branch_name: refs/heads/develop


text:
## Employee Churn 201: Calculating Employee Value

Welcome to the GitHub outpost of the recent Predictive Analytics Times ["Churn 201" article][patimes] by Pasha Roberts from [Talent Analytics][ta].

Our goal here is to foster conversation and learning, including learning by us.

## The Quantitative Scissors
In the first blog entry, we put out a stylized model of employee value, plotting out monthly employee costs and benefits.
We define the way that these costs operate, to **show why high attrition is costly to an employer.**
We remark that this model acts as a "quantitative scissors" that limit our options to reduce the damage done by attrition.

We make a somewhat **bold claim that there are only 6 actions available to reduce attrition damage** - to support this claim,
we are publishing the code here for the model.  You can experiment, plot, present, and interact with the data *and with us.*

![Figure1][]

While this current graph could be done in excel, spreadsheets run out of analytics fuel quickly, and are not nearly as transparent as the attached code.
Spreadsheets are just the wrong tool for the job, especially given what is coming up in future installments.

### Modifying the Model

These are the six leverage points, that we claim are the only ways to escape the scissors.  Under each, we show how you can modify the model to change the graphs:

1. **Decrease hiring/onboarding costs**
	- `cost.scale` controls the height of the initial hiring/onboarding costs
	- `cost.ramp` controls the slope of the cost decrease; this pushes the cost asymptote to flatten sooner or later
2. **Decrease time to full productivity**
	- `max.benefit` sets the year at which the employee reaches full productivity.  This slides the top of the "S" sooner or later.
3. **Decrease salary**
	- `salary` sets the salary, in terms of 100% productivity
4. **Increase overall productivity** (which is at odds with reducing salary and cutting training)
	- Currently, nothing changes overall productivity - but you could change line 18 to do so, or plot a second curve to show a comparison
5. **Decrease employee turnover prior to the full productivity phase**
	- This would show up better on Figure 3, perhaps comparing two individuals
	- The corollary of this is would be to terminate likely-bad employees sooner
	- A future blog will model this out more visually!
6. **Hire to increase the proportion of employees who are likely to "survive" to the full productivity phase**
	- This is similar to 5 - we want to see more employees survive to breakeven, and the cheapest way to do so is to predictively admit a better class of employee.
	- A future blog will also model this out more visually!

Those are the variables that control the scissors.
You can change the position of the lines, but **there is no real way to escape the fact that employees are a net cost until they are up to speed.**
If you can find another way to escape the scissors, please do tell.

It is tempting to add inflation and wage increases.
But bear in mind that the unit listed here is **percent of total productivity**.
If there is inflation, the dollar value of everything goes up - productive gain, salary, training cost, everything.
They would inflate a different rates and time frames, but generally the graph would be unchanged.
Also, if you want to model increasing productivity as someone learns, then you are really talking about a longer "S" curve.
So... our choice of unit simplifies these cases considerably.

If you are a math geek, you can change the cost or benefit functions as well:

- The benefit curve is a [Sigmoid function][sigmoid], `1 / (1 + exp(-t))`
	- I was experimenting with a more skewed sigmoid, showing slower gains at first.  But, the time period is so short, that it really doesn't make much difference for the complexity.
- The cost curve is a [Gompertz function][gompertz], `a * exp(b * exp(c * t))`

You are welcome to embellish these to match your scenarios or fantastic imaginations.
I wanted to shade in the left side of the X to make the "cost region" more clear, or to show the problems when the employee terminates before the breakeven, but deadlines loomed.  Maybe on the next blog entry, or maybe one of you will code it up.

I'm curious what you will cook up!

### The Lost Plots

Also, you can see here two plots that did not make it in to the paper:

![Figure2][]

![Figure3][]

> Copyright © 2014, Talent Analytics, Corp.  All Rights Reserved.

[patimes]: http://www.predictiveanalyticsworld.com/patimes/employee-churn-201-calculating-employee-value/
[ta]: http://www.talentanalytics.com
[sigmoid]: http://en.wikipedia.org/wiki/Sigmoid_function
[gompertz]: http://en.wikipedia.org/wiki/Gompertz_curve

[Figure1]: plots/pat201_fig1.png "Figure 1: Monthly Cost & Benefit from One Employee"
[Figure2]: plots/pat201_fig2.png "Figure 2: Net Monthly Benefit from One Employee"
[Figure3]: plots/pat201_fig3.png "Figure 3: Cumulative Benefit from One Employee"


text:
# gitea-tektoncd-event interceptor

This a custom gitea interceptor for [tekton triggers](https://github.com/tektoncd/triggers). It is used by [k8sCI](https://github.com/keyporttech/k8sci) to validate gitea webhook requests.

The primary function is use the configured webhook secret key to validate payload encryption checksum.

This code borrows heavily from [go-github](https://github.com/google/go-github/messages.go), which is modified for use in gitea. Much gratitude the developers of that project.

# usage

This is for use as a webhook interceptor so that a tekton event listener can process gitea webhooks. See [tekton triggers event listeners](https://github.com/tektoncd/triggers/blob/master/docs/eventlisteners.md) for more details.

The docker image is published at [keyporttech/gitea-tektconcd-event-interceptor] (https://hub.docker.com/repository/docker/keyporttech/gitea-tektconcd-event-interceptor), and this image is used as service deployment in the [k8sCI](https://github.com/keyporttech/k8sci).

# building locally

### Prerequisites: golang, docker, makefile installed

```bash
make build #build
make docker # build docker image
```
or
```bash
go build
go test
```

repository: PeterGrace/gitea-tekton-interceptor

repo_name: PeterGrace/gitea-tekton-interceptor


text:
---
title: Using Swift for Glance with RDO Liberty
authors: coolsvap
---

# Using Swift for Glance with RDO

The default backend driver configured for Glance is the local filesystem but it supports a set of alternative backends, including Swift. If you want to store the Glance images on Swift, a few post-install configuration steps are needed:
    ` # openstack-config --set /etc/glance/glance-api.conf DEFAULT default_store swift`
    ` # openstack-config --set /etc/glance/glance-api.conf DEFAULT swift_store_auth_address `[`http://$KEYSTONE_HOST:5000/v2.0/`](http://$KEYSTONE_HOST:5000/v2.0/)
    ` # openstack-config --set /etc/glance/glance-api.conf DEFAULT swift_store_user services:glance`
    ` # openstack-config --set /etc/glance/glance-api.conf DEFAULT swift_store_key $SERVICE_PASSWORD`
    ` # openstack-config --set /etc/glance/glance-api.conf DEFAULT swift_store_create_container_on_put True`

**NOTE**: you should replace $KEYSTONE_HOST with the IP address of the node running Keystone and $SERVICE_PASSWORD with the password assigned to the "glance" user. If you installed using packstack, that is in your answer file, search for `CONFIG_GLANCE_KS_PW`

You will also need to assign the "ResellerAdmin" role to the "glance" user or it won't be able to create containers.

       # keystone user-role-add --tenant_id=$UUID_SERVICES_TENANT --user=$UUID_GLANCE_USER --role=$UUID_ResellerAdmin_ROLE

Feel free to create the "ResellerAdmin" role first if it's not found and lastly restart the needed services:

       # service openstack-glance-api restart

repository: sulaimanothman/website

repo_name: sulaimanothman/website


text:
# Time series analysis with Prophet

This example introduces time series for sales data prediction using [Facebook Prophet](https://facebook.github.io/prophet).
Details are described in [the official document](https://facebook.github.io/prophet/docs/non-daily_data.html#monthly-data).

This workflow will:

1. Fetch past sales data from Treasure Data
2. Build a model with Prophet
3. Predict future sales and write back to Treasure Data
4. Upload predicted figures to S3

## Workflow

There are two workflow examples:

1. which uploads prediction results to TD as well as uploads predicted graphs to Amazon S3 and sends a notification to Slack
2. which uploads prediction results. This doesn't require S3 and Slack

### An example working with Amazon S3 and Slack

```bash
$ ./data.sh # prepare example data
$ td workflow push prophet
$ td workflow secrets \
 --project prophet \
  --set apikey \
  --set endpoint \
  --set s3_bucket \
  --set aws_access_key_id \
  --set aws_secret_access_key
# Set secrets from STDIN like: apikey=1/xxxxx, endpoint=https://api.treasuredata.com, s3_bucket=$S3_BUCKET,
#              aws_access_key_id=AAAAAAAAAA, aws_secret_access_key=XXXXXXXXX
$ td workflow start prophet predict_sales --session now
```

* [predict_sales.dig](predict_sales.dig)

### An example working without AWS

```bash
$ ./data.sh # prepare example data
$ td workflow push prophet
$ td workflow secrets \
 --project prophet \
  --set apikey \
  --set endpoint \
# Set secrets from STDIN like: apikey=1/xxxxx, endpoint=https://api.treasuredata.com
$ td workflow start prophet predict_sales_simple --session now
```

* [predict_sales_simple.dig](predict_sales_simple.dig)

repository: ryanmaclean/treasure-boxes

gha_license_id: MIT

repo_name: ryanmaclean/treasure-boxes


text:
# Virtual Art Sessions

## Points of interest

Here are some starting points to help you poke through the code:

- 3D painting & pointcloud engine : /static/src/js/viewer
- Data from artist sessions (all sessions from 5 of the artists) : /data/sketches/
- Sketch viewer/editor : /static/src/js/pages/test.js
- Proxy to serve Cloud Storage media through app engine (work around for DOM 18 exception in some browsers): /sitepackages/djangae/storage.py

## Running the project

To get started:

### Environment setup
 - Clone this repo
 - Install frontend dependencies by running `bower install && npm install`

### Running
 - Run `php -S localhost:8000` (where is index.html located), to run the application.

# Working with remote videos
 - run `python ./scripts/download_videos.py`
 - access any view that requires a video and wait for a bit so the video can get uploaded to the local GCS

Note: the delay happens only when you're accessing the video for the first time.

This repository mirrors the active [Virtual Art Sessions](http://g.co/VirtualArtSessions) site (code name Project Udon) and has been opened up with the Apache License 2.0 so that anyone interested can dig around and see how it works. This is meant to accompany the explanations in the [case study](https://developers.google.com/web/showcase/case-study/art-sessions).

## Code Credits
- Tautvydas Dulskis


text:
# Emailbot-GUI
This is an application of Email bot with GUI which sends email by voice over.
This app's GUI is created using kivy and kivymd. Can send email with multiple sentences body and subject to multiple people at a time.
It has default contacts which are extracted from database(.xlsx), sends email to new contacts.
Less time required and voice commands make it easy to send mails.
This app have smooth GUI with screen transition.

repository: guru-sai-shreesh/Emailbot-GUI

repo_name: guru-sai-shreesh/Emailbot-GUI


text:
Keycode
=======

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

Keycode is a transcription friendly 256-bit key format [(spec)][1].

It takes a key like this:

    d642d9650d7bd3d895cd827848804004888dc70da684c74732a9daadc785d205

and converts it into something like

    TR1 DJR 8D6
    FF9 WH5 EDJ
    G9V 4H0 20C
    0J4 8UH QDF
    LT2 CEH RJ4
    M7D AUH V5E
    684 136 109

for the purpose of human transcription and possibly spoken key-exchange.

Design
------

The representation is brief, requiring fewer characters than the hexadecimal
encoding, nevertheless there are a number of important advantages:

* A tabular layout makes for easy visual confirmation that a key is complete:
  7 rows of three alphanumeric triples.
* A limited character set avoids the characters `I`, `O`, `S`, `Z` since they
  may be mistaken for digits.
* The digit grouping increases readability and encourages consistent verbal
  communication when needed.
* **Every row is protected by a checksum digit that can detect exactly one
  changed, or one transposed digit.**

The last row may be used as the basis of partial key verification, to assist
with this:

* The row consists only of digits (which can be clearly spoken in all languages
  and may be easily typed on a keypad)
* The groups never contain adjacent digit pairs (like `77`), this avoids the use
  of idiomatic verbal constructs (such as "double 7").
* No group in the row begins with a zero yielding regular three digit numbers.

Ergonomics and error detection combine to form a convenient format for written
and spoken 256-bit key exchange.

Usage
-----

A Java library for parsing and formatting keycode is available from the Maven
central repository:

> Group ID:    `com.tomgibara.keycode`
> Artifact ID: `keycode`
> Version:     `1.0.0`

The Maven dependency being:

    <dependency>
      <groupId>com.tomgibara.keycode</groupId>
      <artifactId>keycode</artifactId>
      <version>1.0.0</version>
    </dependency>

The library is very simple, consisting of just two abstractions: the
`Keycode.Format` class which encapsulates formatting rules, and the `Keycode`
class which combines *key data* with a *format*.

To use the library you will need to be working with 256-bit keys.

    KeyGenerator keygen = KeyGenerator.getInstance("AES"); keygen.init(256);
    byte[] key = keygen.generateKey().getEncoded();

You can then produce a keycode in a standard format, simply and fluently:

    String standard = Keycode.Format.standard().keycode(key).toString();

This will produce output something like:

    G8J HTV TFU
    5U5 YNE WE2
    535 VF4 3FW
    R34 1B6 87A
    5CM BJ6 RR2
    U78 9W2 AC9
    287 304 101

For some applications, it may be useful to produce the keycode without any
whitespace.

    String plain = Keycode.Format.plain().keycode(key).toString();
    // G8JHTVTFU5U5YNEWE2535VF43FWR341B687A5CMBJ6RR2U789W2AC9287304101

A `Keycode.Format.platform()` format is also available which uses platform
dependent line separators. Formats using custom whitespace are also possible
using `Keycode.Format.custom()`.

Parsing a keycode is also simple and fluent:

    byte[] key = Keycode.Format.standard().parse(standard).getKey();

Failure to parse a keycode (for any reason, including the presence of invalid
characters, invalid structure, detected errors, etc.) will be reported with an
`IllegalArgumentException` from the `parse()` method.

*Note that a keycode generated with any format is parsable by any other format.*
Finally, note that all classes are immutable, serializable and threadsafe.

[1]: https://raw.githubusercontent.com/wiki/tomgibara/keycode/docs/keycode-specification-1.0.pdf "Keycode specification 1.0"

repository: tomgibara/keycode

repo_name: tomgibara/keycode


text:
# List of macros parsers and combinators

**Note**: this list is meant to provide a nicer way to find a nom macros than reading through the
documentation on docs.rs, since rustdoc puts all the macros at the top level. Function combinators
are organized in module so they are a bit easier to find.

## Basic elements

Those are used to recognize the lowest level elements of your grammar, like, "here is a dot", or "here is an big endian integer".

| combinator | usage | input | output | comment |
|---|---|---|---|---|
| [char](https://docs.rs/nom/latest/nom/macro.char.html) | `char!('a')` |  `"abc"` | `Ok(("bc", 'a'))` |Matches one character (works with non ASCII chars too) |
| [is_a](https://docs.rs/nom/latest/nom/macro.is_a.html) | ` is_a!("ab")` |  `"ababc"` | `Ok(("c", "abab"))` |Matches a sequence of any of the characters passed as arguments|
| [is_not](https://docs.rs/nom/latest/nom/macro.is_not.html) | `is_not!("cd")` |  `"ababc"` | `Ok(("c", "abab"))` |Matches a sequence of none of the characters passed as arguments|
| [one_of](https://docs.rs/nom/latest/nom/macro.one_of.html) | `one_of!("abc")` |  `"abc"` | `Ok(("bc", 'a'))` |Matches one of the provided characters (works with non ASCII characters too)|
| [none_of](https://docs.rs/nom/latest/nom/macro.none_of.html) | `none_of!("abc")` |  `"xyab"` | `Ok(("yab", 'x'))` |Matches anything but the provided characters|
| [tag](https://docs.rs/nom/latest/nom/macro.tag.html) | `tag!("hello")` |  `"hello world"` | `Ok((" world", "hello"))` |Recognizes a specific suite of characters or bytes|
| [tag_no_case](https://docs.rs/nom/latest/nom/macro.tag_no_case.html) | `tag_no_case!("hello")` |  `"HeLLo World"` | `Ok((" World", "HeLLo"))` |Case insensitive comparison. Note that case insensitive comparison is not well defined for unicode, and that you might have bad surprises|
| [take](https://docs.rs/nom/latest/nom/macro.take.html) | `take!(4)` |  `"hello"` | `Ok(("o", "hell"))` |Takes a specific number of bytes or characters|
| [take_while](https://docs.rs/nom/latest/nom/macro.take_while.html) | `take_while!(is_alphabetic)` |  `"abc123"` | `Ok(("123", "abc"))` |Returns the longest list of bytes for which the provided function returns true. `take_while1` does the same, but must return at least one character|
| [take_till](https://docs.rs/nom/latest/nom/macro.take_till.html) | `take_till!(is_alphabetic)` |  `"123abc"` | `Ok(("abc", "123"))` |Returns the longest list of bytes or characters until the provided function returns true. `take_till1` does the same, but must return at least one character. This is the reverse behaviour from `take_while`: `take_till!(f)` is equivalent to `take_while!(\|c\| !f(c))`|
| [take_until](https://docs.rs/nom/latest/nom/macro.take_until.html) | `take_until!("world")` |  `"Hello world"` | `Ok(("world", "Hello "))` |Returns the longest list of bytes or characters until the provided tag is found. `take_until1` does the same, but must return at least one character|

## Choice combinators

| combinator | usage | input | output | comment |
|---|---|---|---|---|
| [alt](https://docs.rs/nom/latest/nom/macro.alt.html) | `alt!(tag!("ab") \| tag!("cd"))` |  `"cdef"` | `Ok(("ef", "cd"))` |Try a list of parsers and return the result of the first successful one|
| [switch](https://docs.rs/nom/latest/nom/macro.switch.html) | `switch!(take!(2), "ab" => tag!("XYZ") \| "cd" => tag!("123"))` | `"cd1234"` | `Ok(("4", "123"))` |Choose the next parser depending on the result of the first one, if successful, and returns the result of the second parser|
| [permutation](https://docs.rs/nom/latest/nom/macro.permutation.html) | `permutation!(tag!("ab"), tag!("cd"), tag!("12"))` | `"cd12abc"` | `Ok(("c", ("ab", "cd", "12"))` |Succeeds when all its child parser have succeeded, whatever the order|

## Sequence combinators

| combinator | usage | input | output | comment |
|---|---|---|---|---|
| [delimited](https://docs.rs/nom/latest/nom/macro.delimited.html) | `delimited!(char!('('), take!(2), char!(')'))` | `"(ab)cd"` | `Ok(("cd", "ab"))` ||
| [preceded](https://docs.rs/nom/latest/nom/macro.preceded.html) | `preceded!(tag!("ab"), tag!("XY"))` | `"abXYZ"` | `Ok(("Z", "XY"))` ||
| [terminated](https://docs.rs/nom/latest/nom/macro.terminated.html) | `terminated!(tag!("ab"), tag!("XY"))` | `"abXYZ"` | `Ok(("Z", "ab"))` ||
| [pair](https://docs.rs/nom/latest/nom/macro.pair.html) | `pair!(tag!("ab"), tag!("XY"))` | `"abXYZ"` | `Ok(("Z", ("ab", "XY")))` ||
| [separated_pair](https://docs.rs/nom/latest/nom/macro.separated_pair.html) | `separated_pair!(tag!("hello"), char!(','), tag!("world"))` | `"hello,world!"` | `Ok(("!", ("hello", "world")))` ||
| [tuple](https://docs.rs/nom/latest/nom/macro.tuple.html) | `tuple!(tag!("ab"), tag!("XY"), take!(1))` | `"abXYZ!"` | `Ok(("!", ("ab", "XY", "Z")))` |Chains parsers and assemble the sub results in a tuple. You can use as many child parsers as you can put elements in a tuple|
| [do_parse](https://docs.rs/nom/latest/nom/macro.do_parse.html) | `do_parse!(tag: take!(2) >> length: be_u8 >> data: take!(length) >> (Buffer { tag: tag, data: data}) )` | `&[0, 0, 3, 1, 2, 3][..]` | `Buffer { tag: &[0, 0][..], data: &[1, 2, 3][..] }` |`do_parse` applies sub parsers in a sequence. It can store intermediary results and make them available for later parsers|

## Applying a parser multiple times

| combinator | usage | input | output | comment |
|---|---|---|---|---|
| [count](https://docs.rs/nom/latest/nom/macro.count.html) | `count!(take!(2), 3)` | `"abcdefgh"` | `Ok(("gh", vec!("ab", "cd", "ef")))` |Applies the child parser a specified number of times|
| [many0](https://docs.rs/nom/latest/nom/macro.many0.html) | `many0!(tag!("ab"))` |  `"abababc"` | `Ok(("c", vec!("ab", "ab", "ab")))` |Applies the parser 0 or more times and returns the list of results in a Vec. `many1` does the same operation but must return at least one element|
| [many_m_n](https://docs.rs/nom/latest/nom/macro.many_m_n.html) | `many_m_n!(1, 3, tag!("ab"))` | `"ababc"` | `Ok(("c", vec!("ab", "ab")))` |Applies the parser between m and n times (n included) and returns the list of results in a Vec|
| [many_till](https://docs.rs/nom/latest/nom/macro.many_till.html) | `many_till!(tag!( "ab" ), tag!( "ef" ))` | `"ababefg"` | `Ok(("g", (vec!("ab", "ab"), "ef")))` |Applies the first parser until the second applies. Returns a tuple containing the list of results from the first in a Vec and the result of the second|
| [separated_list](https://docs.rs/nom/latest/nom/macro.separated_list.html) | `separated_list!(tag!(","), tag!("ab"))` | `"ab,ab,ab."` | `Ok((".", vec!("ab", "ab", "ab")))` |`separated_nonempty_list` works like `separated_list` but must returns at least one element|
| [fold_many0](https://docs.rs/nom/latest/nom/macro.fold_many0.html) | `fold_many0!(be_u8, 0, \|acc, item\| acc + item)` | `[1, 2, 3]` | `Ok(([], 6))` |Applies the parser 0 or more times and folds the list of return values. The `fold_many1` version must apply the child parser at least one time|
| [fold_many_m_n](https://docs.rs/nom/latest/nom/macro.fold_many_m_n.html) | `fold_many_m_n!(1, 2, be_u8, 0, \|acc, item\| acc + item)` | `[1, 2, 3]` | `Ok(([3], 3))` |Applies the parser between m and n times (n included) and folds the list of return value|
| [length_count](https://docs.rs/nom/latest/nom/macro.length_count.html) | `length_count!(number, tag!("ab"))` | `"2ababab"` | `Ok(("ab", vec!("ab", "ab")))` |Gets a number from the first parser, then applies the second parser that many times|

## Integers

Parsing integers from binary formats can be done in two ways: With parser functions, or combinators with configurable endianness:

- **configurable endianness:** `i16!`, `i32!`, `i64!`, `u16!`, `u32!`, `u64!` are combinators that take as argument a `nom::Endianness`, like this: `i16!(endianness)`. If the parameter is `nom::Endianness::Big`, parse a big endian `i16` integer, otherwise a little endian `i16` integer.
- **fixed endianness**: The functions are prefixed by `be_` for big endian numbers, and by `le_` for little endian numbers, and the suffix is the type they parse to. As an example, `be_u32` parses a big endian unsigned integer stored in 32 bits.
- `be_f32`, `be_f64`, `le_f32`, `le_f64`: Recognize floating point numbers
- `be_i8`, `be_i16`, `be_i24`, `be_i32`, `be_i64`: Big endian signed integers
- `be_u8`, `be_u16`, `be_u24`, `be_u32`, `be_u64`: Big endian unsigned integers
- `le_i8`, `le_i16`, `le_i24`, `le_i32`, `le_i64`: Little endian signed integers
- `le_u8`, `le_u16`, `le_u24`, `le_u32`, `le_u64`: Little endian unsigned integers

## Streaming related

- `eof!`: Returns its input if it is at the end of input data
- `complete!`: Replaces an `Incomplete` returned by the child parser with an `Error`

## Modifiers

- `cond!`: Conditional combinator. Wraps another parser and calls it if the condition is met
- `flat_map!`:
- `map!`: Maps a function on the result of a parser
- `map_opt!`: Maps a function returning an `Option` on the output of a parser
- `map_res!`: Maps a function returning a `Result` on the output of a parser
- `not!`: Returns a result only if the embedded parser returns `Error` or `Incomplete`. Does not consume the input
- `opt!`: Make the underlying parser optional
- `opt_res!`: Make the underlying parser optional
- `parse_to!`: Uses the parse method from `std::str::FromStr` to convert the current input to the specified type
- `peek!`: Returns a result without consuming the input
- `recognize!`: If the child parser was successful, return the consumed input as the produced value
- `consumed()`: If the child parser was successful, return a tuple of the consumed input and the produced output.
- `return_error!`: Prevents backtracking if the child parser fails
- `tap!`: Allows access to the parser's result without affecting it
- `verify!`: Returns the result of the child parser if it satisfies a verification function

## Error management and debugging

- `add_return_error!`: Add an error if the child parser fails
- `dbg!`: Prints a message if the parser fails
- `dbg_dmp!`: Prints a message and the input if the parser fails
- `error_node_position!`: Creates a parse error from a `nom::ErrorKind`, the position in the input and the next error in the parsing tree. If the `verbose-errors` feature is not activated, it defaults to only the error code
- `error_position!`: Creates a parse error from a `nom::ErrorKind` and the position in the input. If the `verbose-errors` feature is not activated, it defaults to only the error code
- `fix_error!`: Translate parser result from `IResult` to `IResult` with a custom type

## Text parsing

- `escaped!`: Matches a byte string with escaped characters
- `escaped_transform!`: Matches a byte string with escaped characters, and returns a new string with the escaped characters replaced

## Binary format parsing

- `length_data!`: Gets a number from the first parser, then takes a subslice of the input of that size, and returns that subslice
- `length_bytes!`: Alias for length_data
- `length_value!`: Gets a number from the first parser, takes a subslice of the input of that size, then applies the second parser on that subslice. If the second parser returns `Incomplete`, `length_value!` will return an error

## Bit stream parsing

- `bits!`: Transforms the current input type (byte slice `&[u8]`) to a bit stream on which bit specific parsers and more general combinators can be applied
- `bytes!`: Transforms its bits stream input back into a byte slice for the underlying parser
- `tag_bits!`: Matches an integer pattern to a bitstream. The number of bits of the input to compare must be specified
- `take_bits!`: Generates a parser consuming the specified number of bits

## Remaining combinators

- `apply!`: Emulate function currying: `apply!(my_function, arg1, arg2, ...)` becomes `my_function(input, arg1, arg2, ...)`
- `call!`: Used to wrap common expressions and function as macros
- `method!`: Makes a method from a parser combination
- `named!`: Makes a function from a parser combination
- `named_args!`: Makes a function from a parser combination with arguments
- `named_attr!`: Makes a function from a parser combination, with attributes
- `try_parse!`: A bit like `std::try!`, this macro will return the remaining input and parsed value if the child parser returned `Ok`, and will do an early return for `Error` and `Incomplete`. This can provide more flexibility than `do_parse!` if needed
- `success`: Returns a value without consuming any input, always succeeds

## Character test functions

Use these functions with a combinator like `take_while!`:

- `is_alphabetic`: Tests if byte is ASCII alphabetic: `[A-Za-z]`
- `is_alphanumeric`: Tests if byte is ASCII alphanumeric: `[A-Za-z0-9]`
- `is_digit`: Tests if byte is ASCII digit: `[0-9]`
- `is_hex_digit`: Tests if byte is ASCII hex digit: `[0-9A-Fa-f]`
- `is_oct_digit`: Tests if byte is ASCII octal digit: `[0-7]`
- `is_space`: Tests if byte is ASCII space or tab: `[ \t]`
- `alpha`: Recognizes one or more lowercase and uppercase alphabetic characters: `[a-zA-Z]`
- `alphanumeric`: Recognizes one or more numerical and alphabetic characters: `[0-9a-zA-Z]`
- `anychar`:
- `begin`:
- `crlf`:
- `digit`: Recognizes one or more numerical characters: `[0-9]`
- `double`: Recognizes floating point number in a byte string and returns a `f64`
- `eol`:
- `float`: Recognizes floating point number in a byte string and returns a `f32`
- `hex_digit`: Recognizes one or more hexadecimal numerical characters: `[0-9A-Fa-f]`
- `hex_u32`: Recognizes a hex-encoded integer
- `line_ending`: Recognizes an end of line (both `\n` and `\r\n`)
- `multispace`: Recognizes one or more spaces, tabs, carriage returns and line feeds
- `newline`: Matches a newline character `\n`
- `non_empty`: Recognizes non empty buffers
- `not_line_ending`:
- `oct_digit`: Recognizes one or more octal characters: `[0-7]`
- `rest`: Return the remaining input
- `shift`:
- `sized_buffer`:
- `space`: Recognizes one or more spaces and tabs
- `tab`: Matches a tab character `\t`

repository: cormacrelf/nom

repo_name: cormacrelf/nom


text:
---
title: Overview
---

[Pact Go](https://github.com/pact-foundation/pact-go/) currently supports Pact Specification v2. Checkout the [README](/implementation_guides/go/readme) to get started.

## Pact Go Workshop

If you'd like to go a little deeper, we have a [workshop](https://github.com/pact-foundation/pact-workshop-go) that will take 1-2 hours. It goes into all of the key topics, and will take you from a novice to intermediate level understanding.

## Examples

### HTTP APIs

* [API Consumer](https://github.com/pact-foundation/pact-go/tree/master/examples/)
* [Golang ServeMux](https://github.com/pact-foundation/pact-go/tree/master/examples/mux)
* [Gin](https://github.com/pact-foundation/pact-go/tree/master/examples/gin)

### Asynchronous APIs

* [Message Queue](https://github.com/pact-foundation/pact-go/tree/master/examples/messages)


text:
# About

Simplifies the usage of the localStorage.

Read and write objects to `localStorage`.

Written in TypeScript. You can read and write and typed vakues.

Only for web browsers

# DynaLocalStorage

## Example

```
// Native JS example
const myStore = new DynaLocalStorage();
myStore.setItem('user-details', user);
myStore.getItem('user-details'); // returns the user

// Typescript example
const myStore = new DynaLocalStorage();
myStore.setItem<IPerson>('user-details', user);
myStore.getItem<IPerson>('user-details'); // returns the user
```

## Methods

### constructor(namespace: string = "dyna-local-storage")

### setItem<TData = string>(key: string, data: TData): void

### getItem<TData = string>(key: string, defaultData: TData): TData

### setDate(key: string, date: Date): void

### getDate(key: string, defaultValue: Date): Date

# DynaLocalStorageData

`DynaLocalStorageData` is much simpler and ready to use. Just give it the `key` and then assign your data to the `data` property and call `save()` to save it. Nothing else is needed.

## Example

```
// Native JS example
const mem = new DynaLocalStorageData("user-details", {name: null});
mem.data.name = "Anny";
mem.save();

// Typescript example
interface IUser {
  name: string;
  age: number;
}
const mem = new DynaLocalStorageData<IUser>(
  'ls1',
  {
    name: '',
    age: 0,
  },
mem.data.name = "Anny";
mem.save();
```

## Methods / Properties

### constructor(localStorageKey: string, defaultData: TData)

The `defaultValue` is used when the key doesn't exist in local storage.

### data

After the initialization, the data contains the loaded data from the local storage. If the local storage doesn't have this key, the default value will be applied by default.

### save(): void

Call save() to save the `data` to local storage.

### reload(): boolean

In case the localstorage key is update by an external tool (i.e. for testing)

# Change log

## 1.1.0

First version

## 2.0.0

### DynaLocalStorage

Default values are required

### DynaLocalStorageData

`reload()` method

repository: aneldev/dyna-local-storage

repo_name: aneldev/dyna-local-storage


text:
peer-set JavaScript implementation
==================================

> Abstraction on a set of peers

# Example

```js
const PeerSet = require('peer-set')
const PeerInfo = require('peer-info')

const Alice = new PeerInfo()
const Bob = new PeerInfo()
const Charles = new PeerInfo()
const Eve = new PeerInfo()

// Set up a PeerSet with 3 peers and a limit of 3 peers
const neighbors = new PeerSet([Alice, Bob, Charles], 3)

// Get two random peers
const replace = neighbors.sample(2)
// => [Alice, Bob]

// Add Eve, and in case we go beyond 3 peers (we will! we are already 3!)
// Then remove [Alice, Bob] in this order
neightbors.add([Eve], replace)

neighbors.peers
// => { aliceid: Alice, bobid: Bob, eveid: Eve }
```

# API

```js
const PeerSet = require('peer-set')
```

## const set = new PeerSet(peers, {limit: number, peerToId: function)

Creates a set of peers with an array of peers, a max size and a function to get the peerId from a peer object. By default, peer objects are assumed to be PeerInfo.

## set.sample(limit)

Randomly sample a set of peers of size `limit`

## set.length

Get the amount of peers

## set.peers

Get the map of peers (`peerId` => `peerObj`)

## set.get(peerObj)
## set.remove(peerObj)
## set.forEach(peer)
## set.add(peers, replaceable)

Adds an array of peers. When adding peers, if going over the limit, then, replace the ones in `replaceable`
## set.on('add', (peer) => {})

Triggered when a new peer is added to the set

## set.on('remove', (peer) => {})

Triggered when a new peer is removed from the set

# License

MIT

repository: nicola/js-peer-set

repo_name: nicola/js-peer-set


text:
# Free Armor Trimming
_Free mouse tracking and playback_

## Overview
Free Armor Trimming provides the ability to record and play mouse-clicks and keystrokes.

:tada: _Stand and deliver!_ :tada:

## Usage

To record mouse-clicks to a file, create a new instance of the ClickLogger class, then call the instance's 'run' function.

To play mouse-clicks, create a new instance of the ClickPlayer class and call the instance's 'play' function.

To record keystrokes to a file, create a new instance of the KeyLogger class, then call the instance's 'run' function.

To play keystrokes from a file, create a new instance of the KeyPlayer class, then call the instance's 'play' function.

*Note: recording is stopped by pressing the 'escape' key.*

## Support

Free Armor Trimming is designed for use with OSX;
it is untested on Windows or other unix systems.

See doc/requirements.txt for python dependencies.

repository: SalvatoreTosti/free-armor-trimming

gha_language: Python

repo_name: SalvatoreTosti/free-armor-trimming


text:
# pysmps
Utilities for parsing MPS and SMPS file formats.
## Installation
You can install this package using PyPI with the command
```bash
pip install pysmps
```
After installation you can import the reader as
```python
from pysmps import smps_loader as smps
```
at the beginning of your python code. For full documentation take a look at the PyPI page, <https://pypi.org/project/pysmps/>.

## TODO
- [ ] Scenario support in sto file parsing.
- [x] Block support in 2-stage problem casting.

repository: jmaerte/pysmps

repo_name: jmaerte/pysmps


text:
# restRoberto
[![Go Report Card](https://goreportcard.com/badge/github.com/TheTipo01/restRoberto)](https://goreportcard.com/report/github.com/TheTipo01/restRoberto)
[![Build Status](https://travis-ci.com/TheTipo01/restRoberto.svg?branch=master)](https://travis-ci.com/TheTipo01/restRoberto)

restRoberto - Simple HTTP API that generates audio file with the (not so) famous Roberto voice.

## Usage
Make a GET request to the `/audio` endpoint with the following paramaters:
- `token` with one of the tokens you specified in the config.yml
- `text` with the text you want to be generated

The server will respond with code `202` and the path on the server where you can find the newly generated audio file, in the form of `/temp/UUID.mp3`.

repository: techmccat/restRoberto

repo_name: techmccat/restRoberto


text:
elastic-search
==============

Small project that tests integration with puppet

```bash
veewee vbox define dev-box-standard ubuntu-13.10-server-amd64
```

Is the definition of my standard dev box. Though probably any debian distribution will work

Kibana is running at:

http://<IP_ADDRESS>/kibana-latest/

repository: PurpleBooth/elastic-play

repo_name: PurpleBooth/elastic-play


text:
---
layout: post
title: Configuring Visual Studio Code for LaTeX
categories: vscode tutorial
---

[VS Code](https://code.visualstudio.com/) has very poor LaTeX support out-of-the-box. Here I list useful extensions and other software that will transform VS Code into a much more power LaTeX editor. They also do not conflict with each other, which is great.

## Getting it out of the way: LaTeX Workshop

While I have used LaTeX Workshop for a long time, I started experiencing a few issues with it that, over time, got really annoying. The main issue is simply [the Enter key not working](https://github.com/James-Yu/LaTeX-Workshop/issues/1193), which was then replaced by [a substantial delay between pressing the Enter key and actually inserting a new line character](https://github.com/James-Yu/LaTeX-Workshop/issues/903). Fixing one apparently introduced the other, so, after many tries, I just gave up on LaTeX Workshop.

## What I use now

- Code completion: [TeXLab VS Code extension](https://marketplace.visualstudio.com/items?itemName=efoerster.texlab). It depends on another program called [TeXLab](https://texlab.netlify.app/), but the extension usually installs it automatically.
- Syntax highlighting [Rich LaTeX syntax highlighting (for use with Texlab)](https://marketplace.visualstudio.com/items?itemName=vomout.latex-syntax).
- Grammar checking: [LTeX](https://marketplace.visualstudio.com/items?itemName=valentjn.vscode-ltex). Be sure to check the [documentation](https://valentjn.github.io/vscode-ltex/docs/settings.html) to learn how to configure the extension to check different languages.
- PDF visualization: If TeXLab has not worked out for you when opening PDF files, you can use an extension called [Open](https://marketplace.visualstudio.com/items?itemName=sandcastle.vscode-open), which opens a file in its default application.

The TeXLab VS Code extension also provides other useful features, as long as the appropriate programs are installed and in your Linux `PATH` (or whatever the equivalent in Mac/Windows is). These assorted programs are usually included in TeX Live, but can be installed through your distribution's package manager, if you are on Linux.

- LaTeX formatting (with `latexindent`)
- Compilation via the F5 shortcut (with `latexmk`)
- Linting (with `chktex`)
- Opening the final PDF file with a shortcut (through the [forward search](https://github.com/latex-lsp/texlab/blob/master/docs/previewing.md) option)


text:
# Mucor mandshuricus Saito, 1914 SPECIES

#### Status
SYNONYM

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

#### Published in
Rep. Centr. Res. Inst. S. Manchuria Railway Co. 1: 16 (1914)

#### Original name
Mucor mandshuricus Saito, 1914

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Zygomycota/Mucorales/Mucoraceae/Mucor/Mucor circinelloides/ Syn. Mucor mandshuricus/README.md

repo_name: mdoering/backbone


text:
Sponsored by Techmeme Ride Home podcast: [**pythonbytes.fm/ride**](http://pythonbytes.fm/ride)

Special guest: [**Matthew Feickert**](https://twitter.com/HEPfeickert)

Live streamed on Youtube: **[youtube.com/watch?v=ug3OR-BQ7Hw](https://www.youtube.com/watch?v=ug3OR-BQ7Hw)**

**Brian #1:**  [**Introducing FARM Stack - FastAPI, React, and MongoDB**](https://developer.mongodb.com/how-to/FARM-Stack-FastAPI-React-MongoDB)

- Aaron Basset
- Describes a todo CRUD application, available on github, to show the concepts in action.
- Animated gif showing how to use the FastAPI interactive documentation to understand the API in a browser.
- Shows
	- How app connects to routes and endpoints.
	- The run call with uvicorn to get an async even loop going
	- Connecting to a MongoDB database
	- Defining models and how easy it is to set up a schema.
	- Discusses routes and endpoints and how to hook up all the CRUD endpoints.
	- The React bit is an application that changes as you modify the elements through the endpoint interactive session.
- Very cool way to work and get something running fast.

**Michael #2:** [**py-applescript**](https://github.com/rdhyee/py-applescript)

- How would you like to automate your mac with Python rather than the dreadful AppleScript?
- [**py-applescript**](https://github.com/rdhyee/py-applescript) is an easy-to-use Python wrapper for NSAppleScript, allowing Python scripts to communicate with AppleScripts and AppleScriptable applications.
- Features:
- Scripts may be compiled from source or loaded from disk
- Standard 'run' handler and user-defined handlers can be invoked with or without arguments
- Argument and result values are automatically converted between common Python types and their AppleScript equivalents
- Compiled scripts are persistent: handlers can be called multiple times and top-level properties retain their state
- Avoids any dependency on the legacy appscript library, flawed Scripting Bridge framework, or limited osascript executable
- The applescript package exports four classes - AppleScript, ScriptError, AEType and AEEnum - plus one constant, kMissingValue.

**Matthew #3:** [airspeed velocity](https://asv.readthedocs.io/en/stable/)

- Are you developing a tool where performance is of individual functions is key? Do you want to be able to benchmark those metrics over every commit in your project with beautiful interactive visualizations?
- From the docs:
    > **airspeed velocity** (asv) is a tool for benchmarking Python packages over their lifetime. Runtime, memory consumption and even custom-computed values may be tracked. The results are displayed in an interactive web frontend that requires only a basic static webserver to host
- Developed by a community of people that you’ll probably recognize if you hang around the SciPy and Jupyter ecosystem lead by Michael Droettboom and Pauli Virtanen
- The docs include examples for benchmarks of NumPy, SciPy, and Astropy ([example: SciPy](https://pv.github.io/scipy-bench/))
	- Example: SciPy’s [interpolate.Interpolate1d.time_interpolate](https://pv.github.io/scipy-bench/#interpolate.Interpolate1d.time_interpolate) test
    - Produces plot of timing performance across multiple parameterizations of the test
    - Click on any node in the plot and get taken directly to the commit on GitHub! 🤯
- [Developed openly on GitHub](https://github.com/airspeed-velocity/asv)
- Up on [PyPI as asv](https://pypi.org/project/asv/)
    python -m pip install asv
- Very cute and very Pythonic joke in the test dashboards: Report title for library X is “airspeed velocity of an unladen X” 😛

**Brian** **#4:** [**Parsecs experience with Hypothesis testing**](https://parsec.cloud/en/blog/our_experience_with_hypothesis_testing/index.html)

- Parsec blog, Parsec is a client side encrypted file sharing service .
- Discussion of their experience with Hypothesis to test a 4 year old, large, asynchronous Python project.
- In particular, an algorithm around RAID5 redundancy.
- The test needs to check that:
	- blocks can be split into chunks
	- blocks can be rebuilt from chunks
	- blocks can be rebuilt with one missing storage chunk
- Goes on to describe how they use a stateful mode of hypothesis.
- It’s a rather complex description. But very welcome.
- I’ve been waiting to hear how people are using Hypothesis for real world problems.
- Their recommendations for when to use Hypothesis:
	- If you are writing a kind of encoder/decoder. Hypothesis is simply the perfect solution for you ;-)
	- If you can write a simple oracle (or even better: you already have one available given you are reimplementing a protocol !)
	- If the work is of type "hard to compute, simple to check"

**Michael** **#5:** [**Amazon Web Services now offers Mac instances based on Mac mini; M1 coming later**](https://arstechnica.com/gadgets/2020/12/amazon-web-services-adds-macos-on-bare-metal-to-ec2/)

- [Amazon](https://9to5mac.com/guides/amazon/) Web Services ([AWS](https://en.wikipedia.org/wiki/Amazon_Web_Services)) is now offering [Mac](https://9to5mac.com/guides/mac/) instances to developers who want to speed up building and testing of Mac, iOS, iPadOS, watchOS and tvOS apps.
- You no longer need a Mac and macOS to build iOS apps.
- The instances are based on physical [Mac minis](https://9to5mac.com/guides/mac-mini/), and you get exclusive access to a machine while you are using it.
- Right now, Amazon is using Intel-based Mac minis, but the company says that it will have [M1 Mac minis](https://9to5mac.com/guides/m1/) available in the first half of next year.
- Check out the [blog post](https://aws.amazon.com/blogs/aws/new-use-mac-instances-to-build-test-macos-ios-ipados-tvos-and-watchos-apps/) and the video below for more details.
- Good as a backstop until we get the newer faster M1 chips if you/your company is holding off.
- Although there's no virtualization in play here, the mac1.metal instances can be spun up and down nearly as rapidly, thanks to the AWS Nitro hardware management—which is invisible, from the customer's perspective.
- To someone who spins up a mac1.metal instance, the instance is for all intents and purposes a perfectly vanilla, brand-new Intel Mac mini.
- But there is also [macstadium](https://www.macstadium.com/pricing) at 1/10th the price.

**Matthew #6:** [visidata](https://www.visidata.org/)

- Are you doing some data analysis and get given a new CSV file? Your first instinct is to load it up into pandas, right? Wouldn’t it be nice to drop in and explore at the command line though a bit to get the lay of the land and even do some preliminary analysis?
- From the docs:
    > Data science without the drudgery!
    >
    > VisiData is an interactive multitool for tabular data. It combines the clarity of a spreadsheet, the efficiency of the terminal, and the power of Python, into a lightweight utility which can handle millions of rows with ease
- Supports [large number of file formats](https://www.visidata.org/formats/): 42
	- Everything from CSV and JSON through JIRA, MySQL, and PNG
- [Developed openly on GitHub](https://github.com/saulpw/visidata) by [Saul Pwanson](https://github.com/saulpw)
- On [PyPI as visidata](https://pypi.org/project/visidata/)
```
python -m pip install visidata
```
- Though as this is a Python application you probably going to want this installed regardless of the virtual environment you’re working in. Distributions of visidata are available through [the package managers you’d expect](https://www.visidata.org/install/): apt, (also nix, Guix but not yum?), Homebrew, and Conda-forge so can easily get to work on most Unix-based machines.
- Tested it with our trusty beloved tool [pipx](https://github.com/pipxproject/pipx) and that works too (thanks again Chad Smith!)
```
python -m pip install pipx
pipx ensurepath
pipx install visidata
```
- Some pretty impressive [live demo videos on the website](https://www.visidata.org/)
- visidata has come in quite handy for me on a frequent basis as I deal with JSON serializations of statistical models with hundreds of parameters. Having a way to explore those JSON files without getting visually overwhelmed is *super* nice!

**Extras**

**Brian:**
- [PyCon US 2021](https://us.pycon.org/2021/)

**Michael:**

- [PSF Fund Raiser](https://training.talkpython.fm/python-software-foundation-fund-raiser-2020)
- [Tickets for PyCascades 2021 are now available on pretix](https://pycascades.us15.list-manage.com/track/click?u=910a586d174a45ddb1125ad4e&id=404a5a3491&e=6829c54590). Our ticket prices are $10 for students, $20 for individuals, and $50 for professional attendees.
- [Live streaming on YouTube](https://www.youtube.com/watch?v=ug3OR-BQ7Hw)!

**Matthew**:

- [Advent of Code 2020](https://adventofcode.com/) has started. Happy coding! ❄
- If time (don’t want to hog or go over):
	- Follow up from [Episode 205](https://pythonbytes.fm/episodes/show/205/this-is-going-to-be-a-little-bit-awkward):
		- [awk](https://pypi.org/project/awkward/#history)[w](https://pypi.org/project/awkward/#history)[ard v1.0.0rc1 is on PyPI](https://pypi.org/project/awkward/#history)
		- pip install awkward should get what you ant by the time this show goes live (no more need for awkard0)
- Kudos to Python Bytes for making full transcripts of all the shows available for view on [pythonbytes.fm](https://pythonbytes.fm/) — this helps be more inclusive of the deaf Python community (including Matthew’s good friend and coauthor)

**Joke:**

[**How to fix any computer - via theoatmean.com**](https://theoatmeal.com/blog/fix_computer)

![](https://trello-attachments.s3.amazonaws.com/58e3f7c543422d7f3ad84f33/5fc3434c4b9b5562499664f1/f674ed39e92a13bb66d82ec5cf364e06/how-to-fix.jpg)


text:
# STOIC21 Classification with Fuse

Example of severe COVID-19 classifier baseline given a Computed-Tomography (CT), age group and gender.
More details about the challenge can be found here: https://stoic2021.grand-challenge.org/

# Data
The STOIC Dataset (see https://pubs.rsna.org/doi/10.1148/radiol.2021210384 for a full description) contains Computed Tomography scans from 10,735 patients.  For this challenge, one CT scan from each patient has been selected, and the dataset has been divided randomly into a public training set (2,000 patients), a test set (~1,000 patients)
and a private training set (7,000+ patients). The training set is available to download in the Grand Challenge while the rest kept private.
More details can be found here: https://stoic2021.grand-challenge.org/stoic-db/

FuseMedML provides an easy to follow implementation of a PyTorch Dataset. The implementation can be found in (fuseimg/datasets/stoic21.py)[https://github.com/IBM/fuse-med-ml/blob/fuse2/fuseimg/datasets/stoic21.py]

# Model
A 3D backbone (ResNet18) followed by an binary classification head based on the imaging features extracted by the backbone and clinical data (age group and gender)

repository: BiomedSciAI/fuse-med-ml

repo_name: BiomedSciAI/fuse-med-ml


text:
# ipsec_l2tp - An Ansible role to configure a vpn client

## largely based on the instructions from https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#linux

# Usage

## add this repo under your ./roles/ dir

## define variables in inventory or ./hostvars/

  ```
  ## example values
  vpn_name:       'desired_vpn_name'
  vpn_server_ip:  '<IP_ADDRESS>'
  vpn_ipsec_psk:  'preshared key'
  vpn_user:       'username'
  vpn_password:   'password'
  vpn_def_route:  False
  vpn_routes:
    - <IP_ADDRESS>/8
  ```

## add role to your playbook
---
- hosts:
    - vpn_clients
  become: True
  roles:
    - role: senorsmile.ipsec_l2tp

## run playbook
```
ansible-playbook -l localhost
```


text:
# Source Code Overview

| Layer | Contents |
| ----- | -------- |
| Presentation Layer | Contains API and WebApp (Blazor) |
| Business Layer | Contains all business decision logic, such as exception handling and orchestration classes |
| Domain Layer | Contains all entity definitions as well as all contract definitions used within the domain of PuppyTracking |
| Data Layer | Contains IO specific implentations of CRUD operations as well as anti-corruption code |
| Cross-Domain Layer | Contains code that is reused across all the other layers |

repository: digitaldias/PuppyTracker

gha_language: C#

repo_name: digitaldias/PuppyTracker


text:
## State pattern

It is common in component programming to treat a component as a basic unit of
encapsulation.  This is a very natural way of programming which is fostered by
React's "component nature". A component in React is a synonym of object in
object-oriented programming languages.

Therefore it might be common to see such components in the application code:
`Input`, `MaskedInput`, `UpperCaseInput`, `ThrottledInput`, and so on.  Here a
propose a different take on this problem.  It is easy to observe the `Input`
does not change at all, what changes is the state representation.  So let us
propose the following objects: `SimpleState`, `MaskedState`, `UpperCaseState`,
`ThrottledState`, etc. that are all consumed by a single `Input` component.

Now let us declare the interface of the `Input` component with and without the
state pattern:

```js
// w/o state pattern
<Input
  initialValue={initialValue}
  value={value}
  onChange={onChange}
  onBlur={onBlur}
/>

// with state pattern
<Input state={state} />
```

All the internals of the input are now hidden behind its interface. If now
we want to react to the `onblur` event and not the `onchange` event, we
do not need to modify how the `Input` component is called. To good thing is
that the clumsy `event.target.value` is no longer exposed in the outer code.

Furthermore the interface is no longer concerned with the question whether this
is a "controlled" or "uncontrolled" component, this left to state
implementation.

Now let us define the state object which implements the state pattern by
encapsulating for example the representation of a email. Using classes.

```js
const emailState = {
  getValue: () => this.state.email,
  setValue: (email) => this.setState({ email }),
}

<Input state={emailState} />
```

With hooks this feels even more natural:

```js
const emailState = useState()

<Input state={emailState} />
```

The `Input` component now merely represents an enhanced html control, but when
there is an actual change in the value, this should be moved to the state object.
What if we want to allow/display only upper case text ?

```js
function createUpperCaseState() {
  const [value, setValue] = useState()

  return {
    getValue: () => value,
    setValue: (newValue) => setValue(newValue.toUpperCase()),
  }
}

const upperCaseState = createUpperCaseState()

<Input state={upperCaseState} />
```

The actual implementation does not matter match, we can use an another hook, a
constructor, or even a *decorator pattern*:

```js
function createThrottledState(immediateState) {
  const [ throttledValue, setThrottledValue ] = useState()

  const throttleFunc = throttle((newValue) => {
    setThrottledValue(newValue)
  }, 1000)

  const setValue = (newValue) => {
    immediateState.setValue(newValue)
    throttleFunc(newValue)
  }

  return {
    getValue: immediateState.getValue,
    getThrottledValue: () => throttledValue,
    setValue: useCallback(setValue, [immediateState]),
  }
}

const immediateState = createSimpleState()
const throttledState = createThrottledState(immediateState)

<Input state={throttledState} />

<span>{throttledState.getThrottledValue()}</span>
```

Finally, the `Input` component itself looks like this:

```js
const Input = ({ state }) => {
  const {
    getInitialValue,
    getValue,
    setValue,
  } = state

  return (
    <input
      defaultValue={getInitialValue ? getInitialValue() : undefined}
      value={getValue ? getValue() : undefined}
      onChange={(event) => setValue(event.target.value)}
    />
  )
}
```

repository: consciousnessdev/react-design-patterns

repo_name: consciousnessdev/react-design-patterns


text:
# school-data

## Installing dependencies

As always its probably best to isolate the app within a virutalenv.
Install virutalenv if needed:

```
pip install virutalenv
```

Create a virutalenv, activate it, and install requirements.txt

```
virutalenv venv
source venv/bin/activate
pip install -r requirements.txt

```

Download the school data and convert to line seperated json
```
python get_school_data.py
```

View top of output file:

```
head -n5 schools.lsjson
```


text:
### Introduction

OpenShift 4.x provides a Developer Web Console for anyone trying to deploy and manage applications to the cluster. This GUI is different from Administration Console that is typically used by cluster administrators. Developer Web Console employed by application developers and deployers, application operations, or anyone with an application focus.

### Explore

* Click on the **console** tab. This is the OpenShift Container Platform web console where developers can visualize, browse, and manage the contents of project.  Notice your `username` on the right top corner.

* You can now toggle to 'Developer' view by pressing on the `Administrator` dropdown and selecting `Developer`. In this exercise,  we will focus on Developer view that allows developers to perform the following:

  * Create and deploy applications on OpenShift Container Platform by importing existing codebases, images, and dockerfiles.

  * Visually interact with applications, components, and services associated with them within a project and monitor their deployment and build status.

  * Group components within an application and connect the components within and across applications.

* Take your time and explore menu options.

  * **+Add** allows developer to deploy workloads using different ways.
    ![Dev Console 01](./images/01/devconsole-01.png)

  * **Topology** shows the applications deployed. For now, it is showing the same as +Add as there is no application deployed.  You will see the deployed application in topology in the exercise later.

  * **Monitoring** provides options to monitor your project or application metrics, such as CPU, memory, and bandwidth usage, and network related information.  Please note that there are some error messages as there are issues to access this monitoring from this console.  In the last exercise,  you will be guided to access the openshift console directly.

  * **Search** allows you to search for all the artifacts in this project.

  * **Builds** shows the OpenShift build configurations. Once a build configuration created, you can execute, view, and edit build configuration and view build logs.

  * **Helm** allows deployment of applications and services to Openshift Cluster via Helm Chart.

  * **Projects** shows all the projects created by the login user.

  * **ConfigMaps** shows the list of configMaps that are used in the current project.

  * **Secrets** shows the list of secrets that are used in the current project.

### Summary
In this exercise, we logged into the cluster using Web Console and understood the layout and navigation of Developer console which is typically used by the application teams (developers, deployers, and builders)

branch_name: refs/heads/main


text:
Jison DSL parser example
========================

See [demo](http://rcorral.github.io/jison-dsl-parser-example/).

This is a simple shipping DSL parser. It's based on the code mentioned at the end of [this talk](https://www.youtube.com/watch?v=lm4jEcnWeKI) by Neil Green at JSConf 2014. I've simply written a different implementation of the DSL parser using [Jison](http://zaach.github.io/jison/).

It's a great talk, and should be watched before making sense of this parser.
The tests should help you understand how the parser works and what it does.

Install
-------

`$ git clone git@github.com:rcorral/jison-dsl-parser-example.git`
`$ cd jison-dsl-parser-example`
`$ npm install`

Build Parser
------------

`$ npm run-script build`

Tests
-----

`$ npm test`

License
-------

MIT

repository: rcorral/jison-dsl-parser-example

repo_name: rcorral/jison-dsl-parser-example


text:
# Representation Tools
## January 4, 2017

### Introduction
This is a basic set of C programs for studying the representation of data at the
machine level. The tools are platform-independent, and should compile and run on
any machine using a standard, ANSI C-compliant compiler.

### Included Tools
#### Print Bytes
This is an incredibly small and portable library for printing out hexadecimal
byte representations of all the basic C types. The general purpose function
show_bytes can be used for any data structure, in fact, and it is simple to
extend this library to support your needs. For implementation and use details,
see the header file. A small test script is included.

#### Bitpack
This is a platform-independent library for performing bitpacking operations.
This is intended to be used in applications that use compression techniques
and other bit-level manipulations without having to worry about writing hard to
read or contrived shifting code. The implementation file contains three small
shifting functions to perform the three most commonly needed shifts:
         - Left shift
         - Logical Right Shift
         - Arithmetic Right Shift
These are not included as functions available through the header, but can easily
be copied where needed. One important detail of note is the defined behavior for
shifts equal to the word size (64 bits): These, in the defined functions
described above, will return 0 (rather than performing modular arithmetic before
executing the shift). For additional details about implementation and use, see
the header file. A small test script is included.

### Support
For help, contact me at<EMAIL_ADDRESS>

repository: ChrisEPhifer/representation-tools

repo_name: ChrisEPhifer/representation-tools


text:
# CarND-Path-Planning-Project
Self-Driving Car Engineer Nanodegree Program

### Goals
The goal of this project is to safely navigate around a virtual highway with other traffic that is driving +-10 MPH of the 50 MPH speed limit. The car's localization and sensor fusion data is provided by the simulator, the sparse map list of waypoints around the highway is available as a file. The car should try to go as close as possible to the 50 MPH speed limit, which means passing slower traffic when possible. The car should avoid hitting other cars at all cost as well as driving inside of the marked road lanes at all times, unless going from one lane to another. The car should be able to make one complete loop around the 6946m highway. Since the car is trying to go 50 MPH, it should take a little over 5 minutes to complete 1 loop. Also the car should not experience total acceleration over 10 m/s^2 and jerk that is greater than 10 m/s^3.

#### The map of the highway is in data/highway_map.txt
Each waypoint in the list contains  [x,y,s,dx,dy] values. x and y are the waypoint's map coordinate position, the s value is the distance along the road to get to that waypoint in meters, the dx and dy values define the unit normal vector pointing outward of the highway loop.

The highway's waypoints loop around so the frenet s value, distance along the road, goes from 0 to 6945.554.

### Data provided from the Simulator to the C++ Program

["x"] The car's x position in map coordinates

["y"] The car's y position in map coordinates

["s"] The car's s position in frenet coordinates

["d"] The car's d position in frenet coordinates

["yaw"] The car's yaw angle in the map

["speed"] The car's speed in MPH

["previous_path_x"] The previous list of x points previously given to the simulator

["previous_path_y"] The previous list of y points previously given to the simulator

["end_path_s"] The previous list's last point's frenet s value

["end_path_d"] The previous list's last point's frenet d value

["sensor_fusion"] A 2d vector of cars and then that car's [car's unique ID, car's x position in map coordinates, car's y position in map coordinates, car's x velocity in m/s, car's y velocity in m/s, car's s position in frenet coordinates, car's d position in frenet coordinates.

## Details

1. The car uses a perfect controller and will visit every (x,y) point it recieves in the list every .02 seconds. The units for the (x,y) points are in meters and the spacing of the points determines the speed of the car. The vector going from a point to the next point in the list dictates the angle of the car.

2. There will be some latency between the simulator running and the path planner returning a path, with optimized code usually its not very long maybe just 1-3 time steps. During this delay the simulator will continue using points that it was last given, so oits a good idea to store the last points you have used so you can have a smooth transition.

## Implementation
I got most of the ideal of implementation from the Project Q&A video.

 Key steps to get the car drive around successfully are given below

1. Use Frenel co-ordinates to plan the trajectory and generate (x,y) co-ordinates using helper functions. The Frenel co-cordinates help to drive the car within the lanes.

2. Gradual increase of velocity to avoid excessive accelaration and jerks

3. Smooth transitions by using left-over points (use last two) and add future co-ordinates from sparse waypoints(30mts, 45mts and 60mts). Then use spline technique to generate (x,y) points and plan the next trajectory

4. The next trajectory is planned for x=26 meters and (x,y) points are generated along the trajectory such that speed limit of 50MPH is not violated. The spline module is used to generate (x,y) points

5. For every 0.02 seconds, 50 point are fed to the simulator - out of 50, the number of newly generated point is (50-prev)

The project also requires that ego car changes lane to pass a slow moving vehicle.  This behavior is implemented in the SW.

1. If a slow moving car is detected in the same lane, start decelaration when the car is within s = 30 meters
2. If there are no cars within s = 22 meters, then change lane
3. If any vehicle is found within 15 meters, avoid collision by higher deceleration

repository: madhuhegde/CarND-Path-Planning-Project

repo_name: madhuhegde/CarND-Path-Planning-Project


text:
+++
date = "2010-11-19"
title = "Real"
+++

When they met it was on accident.

Her heel caught in a crack on the old sidewalk that was full of them, and her books fell out of her hands and hit the ground almost rhythmically. He thinks that it's the perfect way to meet someone, cliche and nothing embarrassing.

She's had enough cliches to last her a lifetime, and she thinks little of it.

***

She thinks little of him, to be honest. He is kind and a gentleman, and, at their first meeting, utterly boring. However, boring has a new appeal for her, which is why they meet a second time.

***

She doesn't realize how much time she spends with him until she calls him one night to talk about nothing at all, simply for the purpose of hearing his voice. The realization scares her more than she wants to admit, and when he picks up after the first ring she tells him that she called the wrong number, apologizes, and hangs up.

Later, she recognizes the fact that he probably knew it was her calling, and finds herself unexpectedly grateful for his silence on the matter when she next sees him- though he gives her a peculiar smile upon greeting her.

Which she diligently ignores.

***

He has always liked puzzles.

When he was young his father would read him Sherlock Holmes novels, even though he often suspected that his father had switched words around and skipped certain parts so that he could understand the mysteries better. Instead of a baseball glove for his tenth birthday he received a magnifying glass and a journal.

He realizes much quicker than she why he spends so much time around her.

***

He accompanies her to the library on one occasion, and is treated to the most genuine emotion he's ever seen in her. The books seem to entrance her like nothing else can. She runs her fingers over worn and new covers alike, her eyes filled with delight at the feeling of so many words at her fingertips.

"They're lovely," she tells him once. "You can create absolutely anything with words, and at the same time, they're such a limitation. Writing the word 'happy' doesn't make someone feel that emotion."

"Depends on the reader," he muses, still watching her reverent expression as she strokes her finger over a page.

He wants for her to look at him that way. The mystery has grown old, and he wants to see her without any obscurities.  He resolves to show her how to place her trust in people, in flesh and blood, in someone warm who will keep her warm as well.

He wonders how many people have failed her for her to have such little faith in him.

***

"I had a dream about you last night," she tells him. He smiles, pleased at this, and privately considers it a breakthrough. A breakthrough to what, exactly, he is unsure.

"Was it a good one?" He asks her teasingly, running his fingers up her arm, just to unnerve her and break through that (now fragile) barrier that she keeps up. She says nothing, but gives him a soft smile.

At the time, he thought that was a good sign, her smile. He realized later that she smiled when she was sad.

***

He walks into her room and sees her curled up in a chair with a book in her lap. It's not anything unusual; a position he often finds her in, and for this reason he grows suddenly, impossibly angry. The mystery has grown old. He wants to know.

"Why do you persist in this, in fantasy, when life has so much more to offer?" He snaps at her, yet his voice grows softer as he speaks. She thinks he stands too close to her at that moment.

"It makes me happy," she tells him, stubbornly refusing to meet his gaze. "Why should I follow your ideals of happiness, if there's no comfort in them for me?"

"I can understand that." He says, his voice a gentle, faltering whisper now; he is close enough to read the pages of her book. "But you're not reading for happiness.  And... you're not happy."

She says nothing, but her fingers clench so tightly on the book in her lap that her knuckles turn white.

***

Sometimes she wonders if reading about the perfect love so carelessly portrayed in books has made her incapable of ever truly loving.

She wonders if the people she ran out of her life really did anything wrong, or if she was just expecting too much.

In the end, as always, she puts it out of her mind.

***

When he begins to understand her, but more importantly, begins to understand her flaws, she desires nothing more than for him to simply leave her alone. She cannot confront her unhappiness, her anger, her tendency to escape within the pages of a book at the moments she cannot handle.

He knows her too well, now, and he is a kind enough person to want to help her.

She comes close to despising him for it.

***

She hates those romance stories sometimes, just for making her long for something unattainable.

***

It takes a week of him being truly gone before she realizes that she doesn't want him to leave her at all.

For the first time in a very long time, she puts down her book and picks up her phone.

He used to shout out the endings to the Sherlock Holmes books that his father read him when he was younger. He was surprisingly good at it, and as he grew older this talent stayed with him. He was especially disparaging of romance novels.

"There's only two ways to end a romance." He would say, "True love, or a horrible tragedy."

She doesn't know if she believes that love is quite that simple, but she finds that she enjoys hearing him profess this outlook, and doesn't disagree with him.

***

He doesn't know, however, where they fit in.

And if he could shout out the ending to their story, he knows what he would choose. He knows what he wants for them, but for one of the first times, he finds himself unsure of the outcome.

He shouts three little words to her one day, and can't bring himself to regret it.

She cries when he does.

***

[I love you]

Author: [AndThenYou](http://www.deviantart.com/art/Real-186741075)

repository: amarecc/anybodyhome

repo_name: amarecc/anybodyhome