text:
---
layout: module
title: SmartSearch Module

category: core-module

module_name: Smartsearch
module_path: smartsearch
module_creator: dotProject
module_devs: web2project
module_version: 3.3
module_source: https://github.com/web2project/web2project
module_download: http://github.com/web2project/web2project/archive/master.zip
---

## Module Overview

The SmartSearch Module in web2Project allows you to perform global searches for data throughout the system. The core of the module is hidden by default from the main menu, but its function is access via the Global Search.

### To View The SmartSearch Module

At the top of most pages in web2Project you’ll notice a text box called “Global Search”. When you type data into this text box and hit enter or return the SmartSearch begins to function and will display your results within the module itself.

You can also enable the SmartSearch Module to be a menu idem via the System Administration > Modules.

### Understanding the Interface

After you perform your initial search the SmartSearch Module will display the results for each module that has data related to your criteria.

For example, if you performed a search for the word “Training” lets assume that you have a project containing the word “Training” as well as Task or Logs. The module will display the results for each module it found containing the word Training on separate rows in the results page.

What happens if the module displays to many results? The SmartSearch Module allows you to narrow down your search criteria. On the results page you will notice three checkboxes followed after the search box.

* All Words
* Modules Selection
* Advanced Search

You can specify words and even choose to only search specific modules; in addition you can perform an advanced search to narrow down your results even more.

When you click in the Modules Selection checkbox an array of checkboxes will appear. Click on the module you wish to narrow your search to.

When you click on the Advanced Search three more text boxes appear in addition to more options that include:

* Ignore Special Characters
* Ignore Case
* Display all Fields
* Show Empty.


text:
# Prometheus Service

![GitHub release (latest by date)](https://img.shields.io/github/v/release/keptn-contrib/prometheus-service)
[![Go Report Card](https://goreportcard.com/badge/github.com/keptn-contrib/prometheus-service)](https://goreportcard.com/report/github.com/keptn-contrib/prometheus-service)

The *prometheus-service* is a [Keptn](https://keptn.sh) integration responsible for:

1. configuring Prometheus for monitoring services managed by Keptn,
2. receiving alerts (on port 8080) from Prometheus Alertmanager and translating the alert payload to a cloud event (
   remediation.triggered) that is sent to the Keptn API,
3. retrieving Service Level Indicators (SLIs) from a Prometheus API endpoint and sending it back to Keptn.

## Compatibility Matrix

Please always double-check the version of Keptn you are using compared to the version of this service, and follow the
compatibility matrix below.

| Keptn Version\* | [Prometheus Service Image](https://github.com/keptn-contrib/prometheus-service/pkgs/container/prometheus-service) |
|:---------------:|:-----------------------------------------------------------------------------------------------------------------:|
|     0.13.x      |                                       keptncontrib/prometheus-service:0.7.4                                       |
|     0.13.x      |                                       keptncontrib/prometheus-service:0.7.5                                       |
|    0.14.2\**    |                                       keptncontrib/prometheus-service:0.8.0                                       |
|     0.15.1      |                                     keptncontrib/prometheus-service:0.8.1\***                                     |
|     0.16.0      |                                     keptncontrib/prometheus-service:0.8.2\***                                     |
|     0.16.x      |                                       keptncontrib/prometheus-service:0.8.3                                       |
|     0.17.x      |                                       keptncontrib/prometheus-service:0.8.6                                       |
|     0.18.x      |                                       keptncontrib/prometheus-service:0.9.1                                       |
|     0.19.x      |                                       keptncontrib/prometheus-service:0.9.1                                       |
|     0.20.x      |                                       keptncontrib/prometheus-service:0.9.1                                       |
|     1.x.y       |                                       keptncontrib/prometheus-service:0.9.1                                       |

\* This is the Keptn version we aim to be compatible with. Other versions should work too, but there is no guarantee.

\** This version is only compatible with Keptn 0.14.2 and potentially newer releases of Keptn 0.14.x due to a breaking
change in NATS cluster name.

\*** These versions are not compatible with Prometheus Alertmanager <= 0.24

You can find more information and older releases on
the [Releases](https://github.com/keptn-contrib/prometheus-service/releases) page.

## Installation instructions

### Setup Prometheus Monitoring

Keptn does not install or manage Prometheus and its components. Users need to install Prometheus and Prometheus Alert manager as a prerequisite.

The easiest way would be to setup Prometheus using helm, e.g.:
```console
kubectl create namespace monitoring
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install prometheus prometheus-community/prometheus --namespace monitoring
```

### Optional: Verify Prometheus in your Kubernetes cluster

* To verify that the Prometheus scrape jobs are correctly set up, you can access Prometheus by enabling port-forwarding for the prometheus-server:

```bash
kubectl port-forward svc/prometheus-server 8080:80 -n monitoring
```

Prometheus is then available on [localhost:8080/targets](http://localhost:8080/targets) where you can see the targets for the service.

### Install prometheus-service

Please replace the placeholders in the commands below. Examples are provided.

* `<VERSION>`: prometheus-service version, e.g., `0.8.3`
* `<PROMETHEUS_NS>`: If prometheus is installed in the same Kubernetes cluster, the namespace needs to be provided, e.g., `monitoring`
* `<PROMETHEUS_ENDPOINT>`: Endpoint for prometheus (primarily used for fetching metrics), e.g., `http://prometheus-server.monitoring.svc.cluster.local:80`
* `<ALERT_MANAGER_NS>`: if prometheus alert manager is installed in the same Kubernetes cluster, the namespace needs to be provided, e.g., `monitoring`

Once this is done, you can go ahead and install prometheus-service:

*Note*: Make sure to replace `<VERSION>` with the version you want to install.

* Install Keptn prometheus-service in Kubernetes using the following command. This will install the prometheus-service into
  the `keptn` namespace and will autodetect the prometheus and the alertmanager namespaces.

    ```bash
    helm upgrade --install -n keptn prometheus-service \
      https://github.com/keptn-contrib/prometheus-service/releases/download/<VERSION>/prometheus-service-<VERSION>.tgz \
      --reuse-values
    ```

* (Optional) If you want to customize the namespaces of Keptn or the Prometheus installation, replace the environment
  variable values according to the use case and apply the manifest (this will automatically disable the autodetect):

    ```bash
    PROMETHEUS_NS=<PROMETHEUS_NS>
    PROMETHEUS_ENDPOINT=<PROMETHEUS_ENDPOINT>
    ALERT_MANAGER_NS=<ALERT_MANAGER_NS>
    KEPTN_NAMESPACE="keptn"

    helm upgrade -n ${KEPTN_NAMESPACE} prometheus-service \
      https://github.com/keptn-contrib/prometheus-service/releases/download/<VERSION>/prometheus-service-<VERSION>.tgz \
      --reuse-values \
      --set prometheus.namespace=${PROMETHEUS_NS} \
      --set prometheus.endpoint=${PROMETHEUS_ENDPOINT} \
      --set prometheus.namespace_am=${ALERT_MANAGER_NS}
    ```

* Execute the following command to configure Prometheus and set up the rules for the *Prometheus Alerting Manager*:

    ```bash
    keptn configure monitoring prometheus --project=sockshop --service=carts
    ```

### Advanced Options

You can customize prometheus-service with the following environment variables:

```yaml
    # Prometheus installed namespace
    - name: PROMETHEUS_NS
      value: 'default'
    # Prometheus server configmap name
    - name: PROMETHEUS_CM
      value: 'prometheus-server'
    # Prometheus server app labels
    - name: PROMETHEUS_LABELS
      value: 'component=server'
    # Prometheus configmap data's config filename
    - name: PROMETHEUS_CONFIG_FILENAME
      value: 'prometheus.yml'
    # AlertManager configmap data's config filename
    - name: ALERT_MANAGER_CONFIG_FILENAME
      value: 'alertmanager.yml'
    # Alert Manager config map name
    - name: ALERT_MANAGER_CM
      value: 'prometheus-alertmanager'
    # Alert Manager app labels
    - name: ALERT_MANAGER_LABELS
      value: 'component=alertmanager'
    # Alert Manager installed namespace
    - name: ALERT_MANAGER_NS
      value: 'default'
    # Alert Manager template configmap name
    - name: ALERT_MANAGER_TEMPLATE_CM
      value: 'alertmanager-templates'
```

## Prometheus SLI provider

Per default, the service works with the following assumptions regarding the setup of the Prometheus instance:

- Each **service** within a **stage** of a **project** has a Prometheus scrape job definition with the name: `<service>-<project>-<stage>`

  For example, if `project=sockshop`, `stage=production` and `service=carts`, the scrape job name would have to be `carts-sockshop-production`.

- Every service provides the following metrics for its corresponding scrape job:
    - http_response_time_milliseconds (Histogram)
    - http_requests_total (Counter)

      This metric has to contain the `status` label, indicating the HTTP response code of the requests handled by the service.
      It is highly recommended that this metric also provides a label to query metric values for specific endpoints, e.g. `handler`.

      An example of an entry would look like this: `http_requests_total{method="GET",handler="VersionController.getInformation",status="200",} 4.0`

- Based on those metrics, the queries for the SLIs are built as follows:

    - **throughput**: `sum(rate(http_requests_total{job="<service>-<project>-<stage>-canary"}[<test_duration_in_seconds>s]))`
    - **error_rate**: `sum(rate(http_requests_total{job="<service>-<project>-<stage>-canary",status!~'2..'}[<test_duration_in_seconds>s]))/sum(rate(http_requests_total{job="<service>-<project>-<stage>-canary"}[<test_duration_in_seconds>s]))`
    - **response_time_p50**: `histogram_quantile(0.50, sum(rate(http_response_time_milliseconds_bucket{job='<service>-<project>-<stage>-canary'}[<test_duration_in_seconds>s])) by (le))`
    - **response_time_p90**: `histogram_quantile(0.90, sum(rate(http_response_time_milliseconds_bucket{job='<service>-<project>-<stage>-canary'}[<test_duration_in_seconds>s])) by (le))`
    - **response_time_p95**: `histogram_quantile(0.95, sum(rate(http_response_time_milliseconds_bucket{job='<service>-<project>-<stage>-canary'}[<test_duration_in_seconds>s])) by (le))`

## Advanced Usage

### Using an external Prometheus instance

To use an external Prometheus instance for a certain project, a secret containing the URL and the access credentials has to be created using the `keptn` cli (don't forget to replace the `<project>` placeholder with the name of your project):

```console
PROMETHEUS_USER=test
 PROMETHEUS_PASSWORD=test-password
PROMETHEUS_URL=http://prometheus-server.monitoring.svc.cluster.local

keptn create secret prometheus-credentials-<project> --scope="keptn-prometheus-service" --from-literal="PROMETHEUS_USER=$PROMETHEUS_USER" --from-literal="PROMETHEUS_PASSWORD=$PROMETHEUS_PASSWORD" --from-literal="PROMETHEUS_URL=$PROMETHEUS_URL"
```

Note: This creates an actual Kubernetes secret, with some Kubernetes labels (`app.kubernetes.io/managed-by=keptn-secret-service`, `app.kubernetes.io/scope=prometheus-service`) and is bound to the correct role (`keptn-prometheus-svc-read`) which allow prometheus-service to access it.

### User-defined Service Level Indicators (SLIs)

Users can override the predefined queries, as well as add custom queries by creating a SLI configuration.

* A SLI configuration is a yaml file as shown below:

    ```yaml
    ---
    spec_version: '1.0'
    indicators:
      cpu_usage: avg(rate(container_cpu_usage_seconds_total{namespace="$PROJECT-$STAGE",pod_name=~"$SERVICE-primary-.*"}[5m]))
      response_time_p95: histogram_quantile(0.95, sum by(le) (rate(http_response_time_milliseconds_bucket{handler="ItemsController.addToCart",job="$SERVICE-$PROJECT-$STAGE-canary"}[$DURATION_SECONDS])))
    ```
  This file contains a list of keys (e.g., `cpu_usage`) and a prometheus metric expressions (e.g., `avg(rate(...{filters}[timeframe]))`).

* To store this configuration, you need to add this file to a Keptn's configuration store, e.g., using the [keptn add-resource](https://keptn.sh/docs/0.14.x/reference/cli/commands/keptn_add-resource/) command:

    ```console
    keptn add-resource --project <project> --service <service> --stage <stage> --resource=sli.yaml --resourceUri=prometheus/sli.yaml
    ```

---

Within the user-defined queries, the following variables can be used to dynamically build the query, depending on the project/stage/service, and the time frame:

- `$PROJECT`: will be replaced with the name of the project
- `$STAGE`: will be replaced with the name of the stage
- `$SERVICE`: will be replaced with the name of the service
- `$DEPLOYMENT`: type of the deployment (e.g., direct, canary, primary)
- `$DURATION_SECONDS`: will be replaced with the test run duration, e.g. 30s

For example, if an evaluation for the service **carts**  in the stage **production** of the project **sockshop** is triggered, and the tests ran for 30s these will be the resulting queries:

```
rate(my_custom_metric{job='$SERVICE-$PROJECT-$STAGE',handler=~'$handler'}[$DURATION_SECONDS]) => rate(my_custom_metric{job='carts-sockshop-production',handler=~'$handler'}[30s])
```

### Manually creating configmaps and alerts

By default, the `prometheus-service` automatically creates all the needed configmaps for targets and alerts without needing to configure anything. In some cases, the user might want to manually create the configmaps and alerts instead, which can be enabled by changing the following flags inside the `values.yaml` file:

- `prometheus.createTargets` (default: true) - Enable or disable the automatic creation of Prometheus targets
- `prometheus.createAlerts` (default: true) - Enable or disable the automatic creation of Prometheus alerts

## Troubleshooting

Take a look at the [TROUBLESHOOTING](TROUBLESHOOTING.md) page for common errors and troubleshooting guidelines.

# Contributions

You are welcome to contribute using Pull Requests against the **master** branch. Before contributing, please read our [Contributing Guidelines](CONTRIBUTING.md).

repository: keptn-contrib/prometheus-service

branch_name: refs/heads/master

extension: md

gha_language: Go

license_type: permissive

repo_name: keptn-contrib/prometheus-service


text:
# Change Log

## [3.0.1] - 2022-04-27
### Changed
- Update default javascript browser bundle

## [3.0.0] - 2022-04-27
### Changed
- Sentry 3.0
- PHP `^7.4 || ^8.0` required

## [2.0.1] - 2020-05-14
### Changed
- Removed usage of deprecated methods

## [2.0.0] - 2020-01-23
### Changed
- Migrated to laminas

## [1.0.1] - 2020-01-23
### Added
- Added compatibility with php 7.4

### Changed
- Bumped minimum sentry version to 2.3.1

### Fixed
- Fixed compatibility with sentry 2.3

## [1.0.0] - 2019-08-31

**This version is not compatible with previous versions.**

### Changed
- New release for Sentry 2.0

## [0.7.1] - 2017-11-09
### Added
- Allowed not injecting js file when config value is empty.

## [0.7.0] - 2017-07-07

**This version is not compatible with previous versions.**

### Added
- Added type hints

### Changed
- Minimum required PHP version is now PHP 7.0
- Minimum `sentry/sentry` is now 1.7
- Removed support to hhvm
- Removed fluent interface
- Updated default raven javascript resource url (3.16.0)
- ZF Logger: backtrace in Zend Logger is now automatically cleaned by namespaces anymore
- ZF Logger: extra params are now passed as variables
- Changed configuration

### Fixed
- Logs with `exception` in `extra` where the message is different from the exception message
does not create a `ContextException` anymore

### Removed
- Removed `excluded_backtrace_namespaces` options from Sentry Zend Logger

## [0.6.1] - 2016-10-05
### Added
- Added `raven_javascript_options`

## [0.6.0] - 2016-10-05
### Added
- Log Writer: Added Monolog namespace to default excluded function calls on backtrace
- Log Writer: Added the possibility to add other namespaces to excluded function calls on backtrace
- Added the possibility to add multiple `send_callback`s and retrieving it from container
- Added `CallbackInterface`
- Added the possibility to specify the `transport` via service name, retrieving it from container
- Added `TransportInterface`
### Changed
- Changed default logger name to `SentryModule`
- Required minimum version 1.4 of sentry library

## [0.5.0] - 2016-09-29
### Added
- Log Writer: possibility to specify `exception` extra parameter to handle exceptions

### Changed
- Log Writer: retrieve backtrace root excluding logs function calls

## [0.4.3] - 2016-09-07
### Fixed
- Fixed error when `extra` key is not an array

## [0.4.2] - 2016-09-01
### Added
- Allowed sentry 1.0 dependency

## [0.4.1] - 2016-07-05
### Added
- Added set method to set Raven error handler

## [0.4.0] - 2016-07-02
### Added
- Added zend-mvc 3 compatibility
- Added a writer for Zend Log

### Removed
- Removed psr/log-implementation from composer.json
- Removed compatibility with php < 5.6

## [0.3.4] - 2016-05-30
### Fixed
- Fixed invalid configuration key in module config

## [0.3.3] - 2016-05-30
### Added
- Added method to set which exceptions should not be catched in `ErrorHandlerListener`

## [0.3.2] - 2016-05-29
### Added
- Raven javascript integration

### Fixed
- Fix #2 for a warning in raven serializer: added custom default processor to serialize objects and resources

## [0.3.1] - 2016-05-28
### Fixed
- Fixed error creating instance of ErrorHandlerListener

## [0.3.0] - 2016-05-28
### Changed
- Completely redesigned

## [0.2.0]
### Changed
- Upgrade raven/raven to ^0.13.0

## [0.1.0]
### Changed
- Raven Client Abstract Service Factory

license: MIT

repository: facile-it/sentry-module

gha_language: PHP

gha_license_id: MIT

repo_name: facile-it/sentry-module


text:
# Browser/Acceptance Tests

## Browser testing

Our current browser tests (also called acceptance tests) are organized into
suites under the
[`test/browser_tests/cucumber-new/features`](https://github.com/cfpb/consumerfinance.gov/tree/main/test/browser_tests/cucumber-new/features)
directory.

Our legacy browser tests are all in the
[`test/browser_tests/cucumber/features`](https://github.com/cfpb/consumerfinance.gov/tree/main/test/browser_tests/cucumber/features)
directory. We're in the process of getting rid of these tests and replacing them
with the tests in `cucumber-new`.

### Running the current browser tests locally

1. Ensure that the following env vars are set (they should already be in your [`.env`](https://github.com/cfpb/consumerfinance.gov/blob/main/.env_SAMPLE) file):
    - `export TEST_HTTP_HOST=localhost`
    - `export DJANGO_HTTP_PORT=8000`
2. Then reload the virtual environment if needed: `source .env`
3. Get your local version of cf.gov running at http://localhost:8000:
    - If you use Docker: `docker-compose up`
    - If you use a virtual environment locally: `./runserver.sh`
4. Run the browser tests against your localhost: `gulp test:acceptance:new`

There are several options you can pass to run a particular suite of tests or to
run a particular list of features:

```sh
gulp test:acceptance:new --suite=wagtail-admin ( runs just the wagtail-admin suite )
gulp test:acceptance:new --specs=multi-select.feature ( runs just the multi-select feature )
gulp test:acceptance:new --tags=@mobile ( runs all scenarios tagged with @mobile )
```

### Running the legacy browser tests locally (with a Tox server)

To run browser tests, open a new Terminal window or tab and change to the project directory,
then tell gulp to start the tests:

```sh
gulp build
gulp test:acceptance ( tox -e acceptance can be run as well )
```

There are several options you can pass to run a particular suite of tests,
to run a particular list of features,
and/or to run it in "fast" mode:

```sh
gulp test:acceptance --suite=wagtail-admin ( runs just the wagtail-admin suite )
gulp test:acceptance --specs=multi-select.feature ( runs just the multi-select feature )
gulp test:acceptance --tags=@mobile ( runs all scenarios tagged with @mobile )
gulp test:acceptance --recreate ( runs the tests and recreates the virtual environment )
```

The same options can be used with tox (--omitted):

```sh
tox -e acceptance suite=wagtail-admin
tox -e acceptance specs=multi-select.feature
tox -e acceptance tags=@mobile
```

These tests will run on their own server; you do not need to be running your development server.

### Running the legacy browser tests in Sauce Labs

Sauce Labs can be used to run the legacy browser tests remotely in the cloud.

1. Log into [https://saucelabs.com/account](https://saucelabs.com/account).
2. Update and uncomment the `SAUCE_USERNAME`, `SAUCE_ACCESS_KEY`,
   and `SAUCE_SELENIUM_URL` values in your `.env` file.
   The access key can be found on the Sauce Labs
   [user settings page](https://saucelabs.com/beta/user-settings).
3. Reload the settings with `source .env`.
4. Run the tests with `gulp test:acceptance --sauce`.
5. Monitor progress of the tests
   on the [Sauce Labs dashboard](https://saucelabs.com/dashboard) Automated Tests tab.

!!! Note
    If you get the error `Error: ENOTFOUND getaddrinfo ENOTFOUND`
    while running a test, it likely means that Sauce Connect is not running.

### Writing browser tests

Any new tests should be added to an existing suite (e.g. "default"), or placed
into a new suite directory, in
[`test/browser_tests/cucumber-new/features/suites`](https://github.com/cfpb/consumerfinance.gov/tree/main/test/browser_tests/cucumber-new/features/suites).
All tests start with writing a `.feature` spec in one of these suites,
and then adding corresponding step definitions, found in
[`test/browser_tests/cucumber-new/step_definitions`](https://github.com/cfpb/consumerfinance.gov/tree/main/test/browser_tests/cucumber-new/step_definitions).

**Do not** add new tests to the old `test/browser_tests/cucumber` directory.
Those are all of our legacy tests and are in the process of being removed.

#### Cucumber + Gherkin: tools for running automated tests written in plain language

Below are some suggested standards for Cucumber Feature files:

*Table copied from https://saucelabs.com/blog/write-great-cucumber-tests by Greg Sypolt, with moderate modifications*

         Feature Files
         Every *.feature file consists in a single feature, focused on the business value.

      Gherkin

Feature:Title (one line describing the story)
Narrative Description: As a [role], I want [feature], so that I [benefit]

Scenario: Title (acceptance criteria of user story)
  Given [context]
  And [some more context]...
  When [event]
  Then [outcome]
  And [another outcome]...

Scenario:...

         Given, When, and Then Statements

           There might be some confusion surrounding where to put the verification step in the Given, When, Then sequence. Each statement has a purpose.

  - **Given** is the pre-condition to put the system into a known state before the user starts interacting with the application
  - **When** describes the key action the user performs
  - **Then** is observing the expected outcome

  Just remember the ‘then’ step is an acceptance criteria of the story.

         Background
         The background needs to be used wisely. If you use the same steps at the beginning of all scenarios of a feature, put them into the feature’s background scenario. The background steps are run before each scenario.

Background:
  Given I am logged into Wagtail as an admin
  And I create a Wagtail Sublanding Page
  And I open the content menu

         Scenarios
         Keep each scenario independent. The scenarios should run independently, without any dependencies on other scenarios.  Scenarios should be between 3 to 6 statements, if possible.

         Scenario Outline
         If you identify the need to use a scenario outline, take a step back and ask the following question: Is it necessary to repeat this scenario ‘x’ amount of times just to exercise the different combination of data? In most cases, one time is enough for UI level testing.

         Declarative Vs Imperative Scenarios

            The declarative style describes behavior at a higher level, which improves the readability of the feature by abstracting out the implementation details of the application.  The imperative style is more verbose but better describes the expected behavior.  Either style is acceptable.

Example: Declarative

Scenario:User logs in
  Given I am on the homepage
  When I log in
  Then I should see a login notification

Example: Imperative

Scenario: User logs in
  Given I am on the homepage
  When I click on the "Login" button
  And I fill in the "Email" field with<EMAIL_ADDRESS>  And I fill in the "Password" field with "secret"
  And I click on "Submit"
  Then I should see "Welcome to the app, John Doe"

#### Further reading

- [Cucumber features](https://github.com/cucumber/cucumber/wiki/Feature-Introduction)
- [Protractor](https://angular.github.io/protractor/#/)
- [Select elements on a page](https://www.seleniumhq.org/docs/03_webdriver.jsp#locating-ui-elements-webelements)
- [Writing Jasmin expectations](https://jasmine.github.io/2.0/introduction.html#section-Expectations).
- [Understanding Page Objects](https://www.thoughtworks.com/insights/blog/using-page-objects-overcome-protractors-shortcomings)

## Performance testing

To audit if the site complies with performance best practices and guidelines,
[Google's Lighthouse](https://github.com/GoogleChrome/lighthouse) can be run
from Google Chrome by opening the developer console and going to the Lighthouse
tab to run a performance audit.

## Accessibility testing

Run the acceptance tests with an `--a11y` flag (i.e. `gulp test:acceptance --a11y`)
to check every webpage for WCAG and Section 508 compliancy using Protractor's
[accessibility plugin](https://github.com/angular/protractor-accessibility-plugin).

If you'd like to audit a specific page, use `gulp audit:a11y`:

  1. Enable the environment variable `ACHECKER_ID` in your `.env` file.
     Get a free [AChecker API ID](https://achecker.ca/register.php) for the value.
  2. Reload your `.env` with `source ./.env` while in the project root directory.
  3. Run `gulp audit:a11y` to run an audit on the homepage.
  4. To test a page aside from the homepage, add the `--u=<path_to_test>` flag.
     For example, `gulp audit:a11y --u=contact-us`
     or `gulp audit:a11y --u=the-bureau/bureau-structure/`.

## Source code linting

The default test task includes linting of the JavaScript source, build,
and test files.
Use the `gulp lint` command from the command-line to run the ESLint linter,
which checks the JavaScript against the rules configured in `.eslintrc`.
[See the ESLint docs](https://eslint.org/docs/rules/)
for detailed rule descriptions.

There are a number of options to the command:

 - `gulp lint:build`: Lint only the gulp build scripts.
 - `gulp lint:test`: Lint only the test scripts.
 - `gulp lint:scripts`: Lint only the project source scripts.
 - `--fix`: Add this flag (like `gulp lint --fix` or `gulp lint:build --fix`).
   to auto-fix some errors, where ESLint has support to do so.
 - `--path`: Add this flag to specify a file to lint,
   rather than all files. Path is relative to the project root,
   such as `gulp lint --path=cfgov/unprocessed/js/modules/Analytics.js`.

repository: raft-tech/cfgov-refresh

branch_name: refs/heads/my-money-calendar

gha_language: Python

repo_name: raft-tech/cfgov-refresh


text:
# ScribusCalendarTemplateLandscape
Scribus template for a wall calendar (A4 format, landscape)

When I accepted to layout a calendar for some refugee support group, I could not find a nice template for Scribus open layout software in landscape format.

The template I created might be not super elaborated, but it's a starting point if you have a similar task.

I did the week days and ordinal series in serveral text boxes by purpose.

# Technical detail
- for Scribus 1.5.5
- format: A4 300mm x 213mm (A4: 297mm x 210mm + bleed for cutting)
- additional bleed for cutting: 3 mm
- direction: landscape
- number of pages: 13pages (12 month, 1 titles page)

# PDF export to PDF x3
For print it is necessary to export the file in CMYK color schema. I had really trouble by doing this. In the window where you export to PDF you can specify the export for "printer", however then only RGB-color profiles are suggested for selection. Everything I tried came out with a bad result of realy muted colors with a kind a grey layer.

This problem can be avoided by exporting to "PDF x3" instead of to ordinary PDF. PDF x3 is a special PDF format for printing.

repository: hawbox/ScribusCalendarTemplateLandscape

branch_name: refs/heads/main

repo_name: hawbox/ScribusCalendarTemplateLandscape


text:
# FaceOff

FaceOff is a Chrome Extension to implements the 2-click "like" button as seen on the [German tech-news site Heise](http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html).

The reason I want a 2-click "like" button instead of blocking Facebook plugins outright is respect for content owner. If the content owner has a "like" button, then I should be willing to share the content if I find it worth sharing.

Right now it's 2am in the morning (my time), so I am going to bed.

I did a quick mock of what I will build. I'll start coding tomorrow morning. Watch this repo if you are interested.

![FaceOff Mock](http://hphotos-ash4.fbcdn.net/338261_254771277887855_100000649534996_851164_8066206_o.jpg)

repository: LarsDietrich/FaceOff

repo_name: LarsDietrich/FaceOff


text:
# MESA
MESA (**M**utually **E**xclusive **S**plicing **A**nalysis) is a tool for detecting and quantifying splicing events
by mutually exclusive junctions.  This tool is currently in development and
user discretion is advised.

## Table of Contents
  * [Dependencies](#dependencies)
  * [Installation](#installation)
  * [Usage](#usage)
    + [Aligned RNA sequencing reads](#aligned-rna-sequencing-reads)
    + [`mesa bam_to_junc_bed`](#mesa-bam_to_junc_bed)
    + [`mesa quant`](#mesa-quant)
      - [Output files](#output-files)
    + [`mesa compare_sample_sets`](#mesa-compare_sample_sets)
    + [`mesa pairwise`](#mesa-pairwise)
    + [Intron Retention](#intron-retention)

  * [Manifest Format](#manifest-format)
  * [Analyzing DRIMSeq output](#analyzing-drimseq-output)
  * [Contributing](#contributing)
  * [License](#license)

## Dependencies
- python=3.7+
- numpy
- samtools
- pysam
- scipy
- ...

## Installation

Use `git` to clone the package and install with the package manager [pip](https://pip.pypa.io/en/stable/).

```bash
$ git clone https://github.com/BrooksLabUCSC/mesa.git
$ cd mesa/
$ pip install --user .
```
### Development
If you are working on developing MESA it will likely be useful to install it in editable mode.
```bash
$ pip install --user -e .
```

## Usage

MESA uses counts of splice junctions from aligned RNA sequencing reads, to calculate a Percent-Spliced (PS) value for each junction. It performs best when the junction counts are gathered from a BAM file using `mesa bam_to_junc_bed`, but can accept

### Aligned RNA sequencing reads
MESA requires RNA sequencing reads that are aligned to a reference genome.

## Manifest files

### `mesa bam_to_junc_bed`
Searches aligned RNA-seq reads (BAM files) for splice junctions, and outputs a bed file with junction counts. Takes a manifest with file paths, and outputs a .junc.bed file for each BAM.
```bash
$ mesa bam_to_junc_bed -m bam_manifest.txt
```

### `mesa quant`
Processes junction count files (bed files from `mesa bam_to_junc_bed` or SJ.out.tab from STAR aligner) to calculate Percent-Spliced (PS) value for every splice junction in every sample in the manifest.
For information on the `bed_manifest.txt` format, see [Manifest Format](#manifest-format).
```bash
$ mesa quant -m bed_manifest.txt -o output_prefix
```

#### Output files
Based on the `-o/--output_prefix` parameter, `mesa quant` will output a number
of files for further processing.
- `{output_prefix}_allPS.tsv`: A tab-separated table of PS values, where each column is a sample, and each row is a splice junction.
- `{output_prefix}_allClusters.tsv`
- `{output_prefix}_inclusionCounts.tsv`
- `{output_prefix}_junctions.bed`

### `mesa compare_sample_sets`
Compares the differences in splicing across two groups. Requires atleast 3
samples per condition, otherwise it will fail. If you have less than 3 samples
per condition, use `mesa parwise`.
```bash
$ mesa compare_sample_sets --psiMESA my_output_allPSI.npz -m1 ctrl_manifest.txt -m2 mut_manifest.txt
```
This module will take two manifest files, that represents the two groups you
wish to compare. It also takes the allPS.tsv file that was previously outputted by
`mesa quant`.

### `mesa pairwise`
Example command:

```bash
$ mesa pairwise --inclusionMESA my_output_inclusionCounts.npz -c my_output_all_clusters2.tsv >pairwise_output.txt
```

This command performs a pairwise comparison of the junction usage for each
sample against each other. `pairwise_output.txt`, from the command above, will
output the p-value from running a Fisher's exact test, where the contingency
matrix is inclusion and exclusion read counts for each pair of samples for a
given junction. This command is recommend for datasets with less than three
samples per group where `mesa compare_sample_sets` could not be used.

todo example output and explanation

### Intron Retention
The percent-spliced value does not quantify intron retention, so separate subprograms gives a table of IR values, in the same format as the PS table. The first subprogram, `mesa intron_coverage`, measures the coverage across previously identified splice junctions, and outputs a table for each sample. The second subprogram, `mesa ir_table`, takes those coverage values and calculates the IR value for each junction in each sample, outputting the final IR table.

```bash
$ mesa intron_coverage -b bam_manifest.tsv -m project_allPS.tsv -j project_junctions.bed -n 4 -o coverage_output_dir
$ mesa ir_table -i project_inclusionCounts.tsv -c project_allClusters.tsv -d coverage_output_dir -o project_output_prefix
```

## Manifest Format
The manifest is a tab-delimitted file used by `mesa` provides information about
the samples and related files.
```bash
$ cat manifest.txt
sample1 /path/to/sample1/sj.tab.bed lung control
sample2 /path/to/sample2/sj.tab.bed lung control
sample3 /path/to/sample3/sj.tab.bed lung mutant
sample4 /path/to/sample4/sj.tab.bed lung mutant
```
- The first column is the sample identifier.
- The second column is the absolute path to the bed file version of the star junction output file produced by `mesa star_junc_to_bed`
- The third column is additional metadata for the type of sample it is. This column is for convience for your own analyses and not used by `mesa`.
- The fourth column is the condition. This is used to decide how the samples are
grouped and the statistical analysis uses the different groups to compare.

An example of the manifest format can be found [here](data/example_manifest.txt).

## Analyzing DRIMSeq output
`mesa quant` can provide its output in a format for use with with the
alternative splicing quantifier tool DRIMSeq in the R programming language.
MESA provides a utility script [run-drim-seq.R](scripts/run-drim-seq.R). This
script depends on:
- R todo double check dependencies
- DRIMSeq
- ggplot2
- optparse

An example command to run our DRIMSeq script is shown below
```
$ Rscript run-drim-seq.R -m bed_manifest.txt -d drim_table.tsv -o drim_output -t 12
```

TODO explain various plots and data output

This script will automatically output a number of plots and an output table for
further analyzing splicing data. The `-t` parameter sets the number of threads
to be used, and we recommend setting it as high as you can because DRIMSeq is a
cpu-intensive tool.

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[BSD-3](LICENSE)

repository: BrooksLabUCSC/mesa

repo_name: BrooksLabUCSC/mesa


text:
#Word Counter

##### This application will determine the number of times a word appears in a given sentence.  (8/7/15)

#### By: Kellen Kolbeck

## Description
_{This application is designed to take a word designated by the user along with a phrase also designated by the user
and determine how many iterations of that given word appear in the given sentence. It is not functioning properly at this time as the developer is unable to get the counting function to work.}_

##Setup

*{_User inputs a word that they want to know the number of times it appears in a sentence.}_

*_{User inputs the sentence that the application will then check against the word and determine the number of times
the given word appears in that sentence.}_

## Technologies used

{_ruby_}
{_sinatra_}
{_capybara_}
{_heroku_}

### Copyright (c) 2015 Kellen Kolbeck All Rights Reserved.

This software is licensed under the MIT license.

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

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

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


text:
# Rack example

A simple Rack application which shows how to use the included
`Prometheus::Middleware::Exporter` and `Prometheus::Middleware::Collector`
middlwares.

## Run the example

### Standalone

Execute the provided `run` script:

```bash
bundle install
bundle exec ./run
```

This will start the rack app, run a few requests against it, print the
output of `/metrics` and terminate.

### With a Prometheus server

Start a Prometheus server with the provided config:

```bash
prometheus --config.file ./prometheus.yml
```

In another terminal, start the application server:

```bash
bundle install
bundle exec unicorn -c ./unicorn.conf
```

You can now open the [example app](http://localhost:5000/) and its [metrics
page](http://localhost:5000/metrics) to inspect the output. The running
Prometheus server can be used to [play around with the metrics][rate-query].

[rate-query]: http://localhost:9090/graph#%5B%7B%22range_input%22%3A%221h%22%2C%22expr%22%3A%22rate(http_server_requests_total%5B1m%5D)%22%2C%22tab%22%3A0%7D%5D

## Collector

The example shown in [`config.ru`](config.ru) is a trivial rack application
using the default collector and exporter middlewares.

Currently, the collector middleware doesn't offer any flexibility around label
keys or values (see #111). If you have more sophisticated requirements, we
recommend creating your own collector middleware.

If your requirements are minimal, one option is to subclass
`Prometheus::Middleware::Collector` and override the methods you need to. For
example, if you want to [change the way IDs are stripped from the
path](https://github.com/prometheus/client_ruby/blob/982fe2e3c37e2940d281573c7689224152dd791f/lib/prometheus/middleware/collector.rb#L97-L101)
you could override the appropriate method:

```Ruby
require 'prometheus/middleware/collector'
module Prometheus
  module Middleware
    class MyCollector < Collector
      def strip_ids_from_path(path)
        super(path)
          .gsub(/8675309/, ':jenny\\1')
      end
    end
  end
end
```

and use your class in `config.ru` instead.

**Note:** `Prometheus::Middleware::Collector` isn't explicitly designed to be
subclassed, so the internals are liable to change at any time, including in
patch releases. Overriding its methods is done at your own risk!


text:
# JSeekr

Find jobs of top multinational companies.

---

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/debajit13/JSeeker/graphs/commit-activity) [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://jseekr.netlify.app/) [![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://github.com/debajit13/JSeeker/discussions/1) [![made-with-Markdown](https://img.shields.io/badge/Made%20with-Markdown-1f425f.svg)](http://commonmark.org)

## Motivation

Whenever I searched for a job vacancy in any company, I used to check the Career Site of that company. Since the numbers are too many of these, we created this site centralizing the career pages along with the Glassdoor review pages such that, everyone can get an insight of this company easily just in one click. There's no more need to search for different company names and get to their career pages.

## Future Commitment

We're bound to update this site to make it more accessable in the future updates as well as we're thinking of building a mobile application to make it more reachable to mobile users.

## Screenshots

## Tech/ Framework Used

**Built with**

1. [JavaScript](https://developer.mozilla.org/en-US/docs/Web/javascript)
2. [ReactJS](https://reactjs.org/)
3. [ReactStrap](https://reactstrap.github.io/)
4. [mdbreact](https://www.npmjs.com/package/mdbreact)

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

 The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Made with :heart: and :coffee: by Debajit & Sankalan

gha_language: JavaScript


text:
# xmlrpcproto

![tox](https://github.com/mgrrx/xmlrpcproto/workflows/tox/badge.svg?branch=main)

Sans I/O implementation of the XMLRPC protocol.

This work is heavily inspired by https://github.com/mosquito/aiohttp-xmlrpc

repository: mgrrx/xmlrpcproto

repo_name: mgrrx/xmlrpcproto


text:
# MriResearchTools

[![Build Status](https://github.com/korbinian90/MriResearchTools.jl/workflows/CI/badge.svg)](https://github.com/korbinian90/MriResearchTools.jl/actions)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/korbinian90/MriResearchTools.jl?svg=true)](https://ci.appveyor.com/project/korbinian90/MriResearchTools-jl)
[![Codecov](https://codecov.io/gh/korbinian90/MriResearchTools.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/korbinian90/MriResearchTools.jl)

## Prerequisites
A Julia installation v1.3 or higher is required.
To get the newest version of this package, Julia v1.5 or newer should be used.

Magnitude and Phase images in NIfTI fileformat
(4D images with echoes in the 4th dimension, 5D images with channels in the 5th dimension)

## Installing
Open the Julia REPL and type

```julia
julia> ] # enter julia package manager
(v1.5) pkg> add MriResearchTools
(v1.5) pkg> # type backspace to get back to the julia REPL
julia>
```

## Quick Start
Open multi-echo 4D NIfTI phase and magnitude files and perform ROMEO phase unwrapping.

```julia
using MriResearchTools
# input images
TEs = [4,8,12]
nifti_folder = joinpath("test", "data", "small")
magfile = joinpath(nifti_folder, "Mag.nii") # Path to the magnitude image in nifti format, must be .nii or .hdr
phasefile = joinpath(nifti_folder, "Phase.nii") # Path to the phase image
# load images
mag = readmag(magfile)
phase = readphase(phasefile)
# unwrap
unwrapped = romeo(phase; mag=mag, TEs=TEs)
# save unwrapped image
outputfolder = "outputFolder"
mkpath(outputfolder)
savenii(unwrapped, "unwrapped", outputfolder, header(phase))
```

## Included Functionality

[ROMEO](https://github.com/korbinian90/ROMEO.jl) 3D/4D Phase Unwrapping
`romeo` `unwrap` `unwrap_individual` `romeovoxelquality` `mask_from_voxelquality`

Laplacian unwrapping
`laplacianunwrap`

MCPC-3D-S multi-echo coil combination
`mcpc3ds`

Reading, writing and other functions for NIfTI files (adapted from JuliaIO/NIfTI)
`readphase` `readmag` `niread` `savenii` `header` `write_emptynii`

Magnitude homogeneity correction ([example](https://github.com/korbinian90/Magnitude-Intensity-Correction/blob/master/Intensity%20Correction.ipynb))
`makehomogeneous`

Simple robust masking (threshold)
`robustmask`

Combine multiple coils or echoes (magnitude only)
`RSS`

Unwarping of B0 dependent shifts
`getVSM` `thresholdforward` `unwarp`

Fast gaussian smoothing for real, complex data and phase (via complex smoothing)
`gaussiansmooth3d` `gaussiansmooth3d_phase`
  - standard
  - weighted
  - with missing values
  - optional padding to avoid border effects

Fast numeric estimation of T2* and R2*
`NumART2star` `r2s_from_t2s`

Other functions
`robustrescale` `getHIP` `getsensitivity` `getscaledimage` `estimatequantile` `estimatenoise`

## Methods are implemented from these Publications
### ROMEO
Dymerska, B., Eckstein, K., Bachrata, B., Siow, B., Trattnig, S., Shmueli, K., Robinson, S.D., 2020. Phase Unwrapping with a Rapid Opensource Minimum Spanning TreE AlgOrithm (ROMEO). Magnetic Resonance in Medicine. https://doi.org/10.1002/mrm.28563

### MCPC-3D-S
Eckstein, K., Dymerska, B., Bachrata, B., Bogner, W., Poljanc, K., Trattnig, S., Robinson, S.D., 2018. Computationally Efficient Combination of Multi-channel Phase Data From Multi-echo Acquisitions (ASPIRE). Magnetic Resonance in Medicine 79, 2996–3006. https://doi.org/10.1002/mrm.26963

### Homogeneity Correction
Eckstein, K., Trattnig, S., Robinson, S.D., 2019. A Simple Homogeneity Correction for Neuroimaging at 7T, in: Proceedings of the 27th Annual Meeting ISMRM. Presented at the ISMRM, Montréal, Québec, Canada. https://index.mirasmart.com/ISMRM2019/PDFfiles/2716.html

### NumART2* - fast T2* and R2* fitting
Hagberg, G.E., Indovina, I., Sanes, J.N., Posse, S., 2002. Real-time quantification of T2* changes using multiecho planar imaging and numerical methods. Magnetic Resonance in Medicine 48(5), 877-882. https://doi.org/10.1002/mrm.10283

## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/korbinian90/MriResearchTools.jl/blob/master/LICENSE) for details

## TODO
more Examples and Documentation


text:
# resolve-plugins-sync [![NPM version](https://img.shields.io/npm/v/resolve-plugins-sync.svg?style=flat)](https://www.npmjs.com/package/resolve-plugins-sync) [![NPM monthly downloads](https://img.shields.io/npm/dm/resolve-plugins-sync.svg?style=flat)](https://npmjs.org/package/resolve-plugins-sync) [![npm total downloads][downloads-img]][downloads-url]

> Synchronously resolve plugins / transforms / presets just like Babel and Browserify does it, using CommonJS `require` builtin. For example, useful for loading complex configs from `package.json` file.

[![code climate][codeclimate-img]][codeclimate-url]
[![standard code style][standard-img]][standard-url]
[![linux build status][travis-img]][travis-url]
[![windows build status][appveyor-img]][appveyor-url]
[![coverage status][coveralls-img]][coveralls-url]
[![dependency status][david-img]][david-url]

You might also be interested in [always-done](https://github.com/hybridables/always-done#readme).

## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Background](#background)
  * [What and Why?](#what-and-why)
  * [Resolution](#resolution)
- [API](#api)
  * [resolvePluginsSync](#resolvepluginssync)
- [Related](#related)
- [Contributing](#contributing)
- [Building docs](#building-docs)
- [Running tests](#running-tests)
- [Author](#author)
- [License](#license)

## Install
Install with [npm](https://www.npmjs.com/)

```
$ npm install resolve-plugins-sync --save
```

or install using [yarn](https://yarnpkg.com)

```
$ yarn add resolve-plugins-sync
```

## Usage
> For more use-cases see the [tests](test.js)

```js
const resolvePluginsSync = require('resolve-plugins-sync')

// fake
const baz = require('tool-plugin-baz')
const qux = require('tool-plugin-qux')

const result = resolvePluginsSync([
  'foo',
  ['bar', { some: 'options here' }],
  [baz, { a: 'b' }],
  qux
], {
  prefix: 'tool-plugin-'
})
```

## Background

### What and Why?
Because we need. Because many famous tools do exact same thing. They use same kind
of resolution of their presets, plugins, transforms and whatever you wanna call it.
This one is pretty configurable and small. Most of this resolution can be seen in the
users `package.json`s configs.

For example `browserify.transform` field in package.json

```json
{
  "browserify": {
    "transform": [
      "babel",
      ["uglifyify", {
        "compress": true
      }]
    ]
  }
}
```

And because both [babel][] and [browserify][] uses same resolution things may gone more wild.

Let's take this example

```json
{
  "browserify": {
    "transform": [
      ["babel", {
        "presets": [
          ["es2015", {
            "modules": false
          }]
        ],
        "plugins": [
          ["react", { "some": "more options" }]
          "add-module-exports"
        ]
      }],
      ["uglifyify", {
        "compress": true
      }]
    ]
  }
}
```

And so on, and so on... infinite nesting. That's just freaking crazy, right?

That's all about what this package does - you give it an array and it does such thing - in case with Browserify if they use this package they should pass `browserify.transform` as first argument.

It's so customizable that it match to all their needs - both for Babel plugins/presets/transforms and Browserify transforms. The [browserify][] transforms are a bit different by all others. They accept `filename, options` signature. And so, because they don't accept `options` as first argument, like Babel's transforms or like Rollup's plugins, we need a bit configuration to make things work for Browserify.

That's why this package has `opts` object through which you can pass `opts.first` to set first argument for the plugin/transform function. Another thing that you can do is to pass `opts.args` if you want more control over the passed arguments to the plugin/transform function.

### Resolution

How we resolve plugins? Resolving algorithm has 4 steps. You should know that in the following paragraphs `item` means each element in the passed array to `resolvePluginsSync()`.

**1)** If item is `string`, it tries to require it from
locally installed dependencies, calls it and you can pass
a `opts.prefix` which will be prepended to the item string.
Think for it like `rollup-plugin-`, `babel-plugin-`, `gulp-`
and etc. You may want to see the comments for `resolveFromString` inside the source code.

**2)** If item is `function`, it will call it and if you
want to pass arguments to it you can pass `opts.args` array
or `opts.first`. If `opts.args` is passed it calls that
item function with `.apply`. If `opts.first` is passed
it will pass it as first argument to that function.

**3)** If item is `object`, nothing happens, it just returns it
in the `result` array.

**4)** If item is `array`, then there are few possible
scenarios (see comments for `resolveFromArray` inside the source code):
  - if 1st argument is string - see 1
  - if 1st argument is function - see 2
  - if 2nd argument is object it will be passed to
  that resolve function from 1st argument

## API

### [resolvePluginsSync](index.js#L58)

> Babel/Browserify-style resolve of a `plugins` array
and optional `opts` options object, where
each "plugin" (item in the array) can be
1) string, 2) function, 3) object or 4) array.
Useful for loading complex and meaningful configs like
exactly all of them - Babel, ESLint, Browserify. It would
be great if they use that package one day :)
The [rolldown][] bundler already using it as default
resolution for resolving [rollup][] plugins. :)

**Params**

* `array` **{Array|String}**: of "plugins/transforms/presets" or single string, which is arrayified so returned `result` is always an array
* `opts` **{Object}**: optional custom configuration
* ``opts.prefix`` **{String}**: useful like `babel-plugin-` or `rollup-plugin-`
* ``opts.context`` **{Any}**: custom context to be passed to plugin function, using the `.apply` method
* ``opts.first`` **{Any}**: pass first argument for plugin function, if it is given, then it will pass plugin options as 2nd argument, that's useful for browserify-like transforms where first argument is `filename`, second is transform `options`
* ``opts.args`` **{Array}**: pass custom arguments to the resolved plugin function, if given - respected more than `opts.first`
* `returns` **{Array}**: `result` resolved plugins, always an array

**Example**

```jsx
const resolve = require('resolve-plugins-sync')

// fake
const baz = require('tool-plugin-baz')
const qux = require('tool-plugin-qux')

resolve([
  'foo',
  ['bar', { some: 'options here' }],
  [baz, { a: 'b' }],
  qux
], {
  prefix: 'tool-plugin-'
})
```

## Related
- [always-done](https://www.npmjs.com/package/always-done): Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement… [more](https://github.com/hybridables/always-done#readme) | [homepage](https://github.com/hybridables/always-done#readme "Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement for [async-done][] - pass 100% of its tests plus more")
- [minibase](https://www.npmjs.com/package/minibase): Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing… [more](https://github.com/node-minibase/minibase#readme) | [homepage](https://github.com/node-minibase/minibase#readme "Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing [base][] plugins.")
- [try-catch-core](https://www.npmjs.com/package/try-catch-core): Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and… [more](https://github.com/hybridables/try-catch-core#readme) | [homepage](https://github.com/hybridables/try-catch-core#readme "Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and used in higher-level libs such as [always-done][] to handle completion of anything.")

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/resolve-plugins-sync/issues/new).
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
If you need some help and can spent some cash, feel free to [contact me at CodeMentor.io](https://www.codementor.io/tunnckocore?utm_source=github&utm_medium=button&utm_term=tunnckocore&utm_campaign=github) too.

**In short:** If you want to contribute to that project, please follow these things

1. Please DO NOT edit [README.md](README.md), [CHANGELOG.md](CHANGELOG.md) and [.verb.md](.verb.md) files. See ["Building docs"](#building-docs) section.
2. Ensure anything is okey by installing the dependencies and run the tests. See ["Running tests"](#running-tests) section.
3. Always use `npm run commit` to commit changes instead of `git commit`, because it is interactive and user-friendly. It uses [commitizen][] behind the scenes, which follows Conventional Changelog idealogy.
4. Do NOT bump the version in package.json. For that we use `npm run release`, which is [standard-version][] and follows Conventional Changelog idealogy.

Thanks a lot! :)

## Building docs
Documentation and that readme is generated using [verb-generate-readme][], which is a [verb][] generator, so you need to install both of them and then run `verb` command like that

```
$ npm install verbose/verb#dev verb-generate-readme --global && verb
```

_Please don't edit the README directly. Any changes to the readme must be made in [.verb.md](.verb.md)._

## Running tests
Clone repository and run the following in that cloned directory

```
$ npm install && npm test
```

## Author
**Charlike Mike Reagent**

+ [github/tunnckoCore](https://github.com/tunnckoCore)
+ [twitter/tunnckoCore](https://twitter.com/tunnckoCore)
+ [codementor/tunnckoCore](https://codementor.io/tunnckoCore)

## License
Copyright © 2016-2017, [Charlike Mike Reagent](https://i.am.charlike.online). MIT

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 10, 2017._
_Project scaffolded using [charlike][] cli._

[always-done]: https://github.com/hybridables/always-done
[async-done]: https://github.com/gulpjs/async-done
[babel]: https://babeljs.io/
[base]: https://github.com/node-base/base
[browserify]: https://github.com/substack/node-browserify
[charlike]: https://github.com/tunnckoCore/charlike
[commitizen]: https://github.com/commitizen/cz-cli
[dezalgo]: https://github.com/npm/dezalgo
[once]: https://github.com/isaacs/once
[rolldown]: https://github.com/rolldown/rolldown
[rollup]: https://github.com/rollup/rollup
[standard-version]: https://github.com/conventional-changelog/standard-version
[verb-generate-readme]: https://github.com/verbose/verb-generate-readme
[verb]: https://github.com/verbose/verb

[downloads-url]: https://www.npmjs.com/package/resolve-plugins-sync
[downloads-img]: https://img.shields.io/npm/dt/resolve-plugins-sync.svg

[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/resolve-plugins-sync
[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/resolve-plugins-sync.svg

[travis-url]: https://travis-ci.org/tunnckoCore/resolve-plugins-sync
[travis-img]: https://img.shields.io/travis/tunnckoCore/resolve-plugins-sync/master.svg?label=linux

[appveyor-url]: https://ci.appveyor.com/project/tunnckoCore/resolve-plugins-sync
[appveyor-img]: https://img.shields.io/appveyor/ci/tunnckoCore/resolve-plugins-sync/master.svg?label=windows

[coveralls-url]: https://coveralls.io/r/tunnckoCore/resolve-plugins-sync
[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/resolve-plugins-sync.svg

[david-url]: https://david-dm.org/tunnckoCore/resolve-plugins-sync
[david-img]: https://img.shields.io/david/tunnckoCore/resolve-plugins-sync.svg

[standard-url]: https://github.com/feross/standard
[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

repository: tunnckoCore/resolve-plugins-sync

repo_name: tunnckoCore/resolve-plugins-sync


text:
This program will read a input text file and convert the contents into a task array to be submitted to Grid Engine.
The wrapper implements best practices for task array submissions within Grid Engine.  Each line of the input text file
should be a command that will be run as a task within the task array.  Multiple lines (commands) within the input file
can also be "chunked" or grouped together as a single task within the array.  For more information about task array
refer to the -t and -tc options within the qsub man page.

This script assumes that you have the appropriate Grid Engine environment
variables present in your shell environment.  This is typically accomplished by
sourcing $SGE_ROOT/default/common/settings.(sh|csh).

qarray [options] -f {command file}

*Options:*

-f     An input file containing a list of commands.

-c     The number of input lines to chunk into a single job array element.

-qo    A single-quoted string of additional options to be passed to qsub.

-wd    The working directory for the job.  If not specified, this script will use the
	   current working directory as the working directory for the job.

-d     Select the level of verbosity. Default level is 0.

-help  Prints the usage information for this script.

-man  Prints the man page for this script.

*Required*

Input text file with each line representing a individual command to be run as a task within a task array.

*Optional*

The number of input lines to chunk into a single job array element. The default value is 1.  This means that each line
of the input file will represent a single task in the array.  If chunk size were set to 3 then every 3 lines in the
input file would represent a single task in the array.

*Optional*

A single-quoted string of additional qsub options.  Note that the qsub options: -cwd, -r, -S, -sync and -wd are
specified by other options within this script and need not be passed via the -qo argument.  For a complete list of all of
the options that can be used with qsub run 'man qsub'.

*Optional*

The working directory for the job.  This is set by specifying the qsub option of the same name: -wd. If the -wd is not
specified, this script will use the current working directory for the working directory for the job by passing the
qsub option '-cwd' to qsub.

*Optional*

The debug level for this script.  An explanation of the debug levels is as follows:

'0'	Do not print any statements for the qarray script to STDERR.

'1'	Print status information for the qarray script to STDERR.

Delete all Grid Engine log files (*.o*, *.e*, *.po* and *.pe*) created for the job. The original job submit script and
master STDERR log file (if exists) will be preserved.


text:
## Advanced Lane Finding
[![Udacity - Self-Driving Car NanoDegree](https://s3.amazonaws.com/udacity-sdc/github/shield-carnd.svg)](http://www.udacity.com/drive)

![GIF of resulting video](./output_images/project.gif)

## Writeup

**Advanced Lane Finding Project**

The goals / steps of this project are the following:

* Compute the camera calibration matrix and distortion coefficients given a set of chessboard images.
* Apply a distortion correction to raw images.
* Use color transforms, gradients, etc., to create a thresholded binary image.
* Apply a perspective transform to rectify binary image ("birds-eye view").
* Detect lane pixels and fit to find the lane boundary.
* Determine the curvature of the lane and vehicle position with respect to center.
* Warp the detected lane boundaries back onto the original image.
* Output visual display of the lane boundaries and numerical estimation of lane curvature and vehicle position.

[//]: # (Image References)

[image1]: ./output_images/undistort_output.png "Undistorted"
[image2]: ./output_images/distortion_correction.png "Road Transformed"
[image3]: ./output_images/threshold.png "Binary Example"
[image4]: ./output_images/before_perspective.png "Before Perspective"
[image5]: ./output_images/after_perspective.png "After Perspective Change"
[image6]: ./output_images/lane_region.png "Lane Region"
[image7]: ./output_images/final_output.png "Output"

## [Rubric](https://review.udacity.com/#!/rubrics/571/view) Points

### Here I will consider the rubric points individually and describe how I addressed each point in my implementation.

---

### Writeup / README

#### 1. Provide a Writeup / README that includes all the rubric points and how you addressed each one.  You can submit your writeup as markdown or pdf.  [Here](https://github.com/udacity/CarND-Advanced-Lane-Lines/blob/master/writeup_template.md) is a template writeup for this project you can use as a guide and a starting point.

You're reading it!

### Camera Calibration

#### 1. Briefly state how you computed the camera matrix and distortion coefficients. Provide an example of a distortion corrected calibration image.

The code for this step is contained in the 'Camera Calibration' cell of the IPython notebook located in "Advanced Lane Finding.ipynb"

I start by preparing "object points", which will be the (x, y, z) coordinates of the chessboard corners in the world. Here I am assuming the chessboard is fixed on the (x, y) plane at z=0, such that the object points are the same for each calibration image.  Thus, `objp` is just a replicated array of coordinates, and `objpoints` will be appended with a copy of it every time I successfully detect all chessboard corners in a test image.  `imgpoints` will be appended with the (x, y) pixel position of each of the corners in the image plane with each successful chessboard detection.

I then used the output `objpoints` and `imgpoints` to compute the camera calibration and distortion coefficients using the `cv2.calibrateCamera()` function.  I applied this distortion correction to the test image using the `cv2.undistort()` function and obtained this result:

![alt text][image1]

### Pipeline (single images)

#### 1. Provide an example of a distortion-corrected image.

The image below shows the distortion correction from the camera calibration appiled to a pipeline frame. This was accomplished using the results of the camera calibration and the `cv2.undistort` method.

![alt text][image2]

#### 2. Describe how (and identify where in your code) you used color transforms, gradients or other methods to create a thresholded binary image.  Provide an example of a binary image result.

I used a combination of color and gradient thresholds to generate a binary image (thresholding steps in functions `sorbelx` and `hsv_mask` in notebook block 'Color and Gradient Threshold').  Here's an example of my output for this step:

![alt text][image3]

* The gradient theshold works by calculating the derivate in the x-direction and then thresholding the results.
* The color threshold works by first converting the images to HSV Color space. Two seperate masks are then applied to select the yellow and white parts of the image. The desired ranges were derived by sampling test images with photo editing software. The yellow and white masks are then combined with a bitwise OR.

#### 3. Describe how (and identify where in your code) you performed a perspective transform and provide an example of a transformed image.

The code for my perspective transform is the 'Perspective Transform' notebook cell

```python
src = np.float32([[213, 705], [1074, 693], [750, 488], [531, 492]])
dest = np.float32([[213, 705], [1074, 693], [1074, 317], [213, 317]])
M = cv2.getPerspectiveTransform(src, dest)
```

This resulted in the following source and destination points:

| Source        | Destination   |
|:-------------:|:-------------:|
| 213, 705      | 213, 705      |
| 1074, 693     | 1074, 693     |
| 750, 488      | 1074, 317     |
| 531, 492      | 213, 317      |

I verified that my perspective transform was working as expected by drawing the source points on the original image and verifying the lane lines appeared vertical in the resulting output image.

![alt text][image4]
![alt text][image5]

#### 4. Describe how (and identify where in your code) you identified lane-line pixels and fit their positions with a polynomial?

1. Lane lines were represented by the `Line` class in the 'Representing Lane Lines' code block. For each line, (up to) the last 10 polynomial coeffecients (in m and pixels) were stored in a circular buffer.

2. To start, the lane lines are found by first calculating the histogram peak of the binary threshold to find the starting x position of each line. From there, a sliding window search was used to find the points for each line. A second degree polynomial was fit for each line. This was implemented in the `find_lane_lines` method inside the 'Lane Line Finding' Block.

3. After the lane lines were established, the points were collected in a search region around the average of (up to) the last 10 lines. A polynomial was then fit to the points from this search region. This was implemented in the `search_around_poly` method inside the 'Lane Line Finding' block.

4. After the left and right lines are detected, a check is performed to make sure they are rougly parallel. This is done by taking the standard deviation of the distance between each x-point from each of the lines for the height of the image. If the lines are not parallel, they are discarded and the buffered results are used, instead. If more than 10 frames failed to detect in a row, the pipeline reverted to the window search method. This was implemented in the `pipeline` method inside the 'Image Pipeline' block.

5. A polynomial is then drawn in the region between the left and right lane lines.

![alt text][image6]

#### 5. Describe how (and identify where in your code) you calculated the radius of curvature of the lane and the position of the vehicle with respect to center.

The radius calculation was implemented in the `get_radius` member function of the `Line` class in the 'Representing Lane Lines' block.

Finding the position of the vehicle with respect to center was implemented in the `get_distance_from_center` method in the 'Calculating Distance From Lane Center' block

#### 6. Provide an example image of your result plotted back down onto the road such that the lane area is identified clearly.

In the second half of the 'pipeline' method I draw the region between the lane lines as a polynomial and use the inverse perspective transform to return the image to its original perspective. You can also see the curvature and distance from center overlayed onto the image.

I also created a composite image to help with diagnosis and tuning the video pipeline. You can see the gradient threshold, color threshold, and binary birdseye perspective below the main output.

![alt text][image7]

---

### Pipeline (video)

#### 1. Provide a link to your final video output.  Your pipeline should perform reasonably well on the entire project video (wobbly lines are ok but no catastrophic failures that would cause the car to drive off the road!).

Here's a [link to my video result](./output_videos/project.mp4)

My pipeline also performed pretty well on the first challenge video. That result can be [seen here](./output_videos/challenge.mp4)

---

### Discussion

#### 1. Briefly discuss any problems / issues you faced in your implementation of this project.  Where will your pipeline likely fail?  What could you do to make it more robust?

Overall, I was very pleased with the results of my pipeline. I went through several iterations before arriving at a color thresholding method that was robust enough to work with the challenge video. Originally, I simply converted to HLS color space and applied a threshold to the S channel. This worked well enough for most cases, but sometimes detected a lot of noise, especially in sub-optimal lighting conditions. Converting to HSV color space and selecting the yellow and white colors individually proved much more robust.

There were some challenges with the gradient threshold, as well. Sometimes it would detect lines when there were shadows on the road or changes in the color of the pavement. To combat this, I set the threshold high enough to avoid these false positives. However, this came with the trade off of filtering out some useful information. The color thresholding was robust enough that the output was still sufficient.

To determine if the lines I detected were valid, I applied a check ensure to they were rougly parallel. To make this pipeline more robust, this logic could also be extended with checks to ensure the lane lines were appropriatly spaced and had realistic curvatures.

This pipeline still needs further development before it could be used in a production environment. Getting the parameters tuned correctly is dependant on the lighting conditions, and would likely not work at night. More robust methods could possibly be used, like dynamic thresholding or deep learning based approaches.


text:
---
layout: article.njk
title: Data Visualization with Plotly
date: 2021-01-02
tags: ['build', 'python']
---

I am fascinated with data visualization. This project was a quick exploration of Python's Plotly library.

---
# Data Visualization with Plotly

*Added January 2, 2021*

## Stats

### Stack
Python

Pandas

Numpy

Plotly

Jupyter Notebook

### Repo
[Python Practice on GitHub](https://github.com/ekelseya/pypractice)

### Demo

I started with a simple scatterplot of Attack and Defense points.

![To access the interactive chart, please fork the repo.](/img/scatter1.png "A basic scatterplot")

I defined a few extra parameters to add even more information to the plot.

![To access the interactive chart, please fork the repo.](/img/scatter3.png "Scatter plot with color values")

Plotly makes violin charts easy.

![To access the interactive chart, please fork the repo.](/img/violin.png "A color-coded violin chart")

One of the most useful charts to me is the correlation heat map.

![To access the interactive chart, please fork the repo.](/img/corr.png "A correlation heatmap")

Plotly creates this correlation map with only a few lines of code:

    corr = df.corr() # calculate correlation from the pandas dataframe (df)

    labels = list(df)
    fig = px.imshow(corr, x=labels, y=labels) # chart the correlation into a heatmap
    fig.show()

## Goals

I wanted to learn some of the basic features of Plotly, as well as practice with Pandas and Numpy. It also seemed like a good time to start using Jupyter Notebooks, too. I can't believe I waited so long! Jupyter makes everything so easy and streamlined.

The internet being the internet, it was easy to find data to play with: Pokemon statistics!

## To Do

This was just a brief dip into data viz and Plotly. I plan to find more data repositories and play around with different visualizations.

repository: ekelseya/personal-website

repo_name: ekelseya/personal-website


text:
---
layout: post
date: 2018-03-13 08:12:59
title: Staffing Lacking
tags:
---

When you are staffed at a level which only just covers the planned work, it means when we're short someone for any reason, you are stressed in completing the work for the sprint. It also means you don't get to any business-as-usual tasks. Nothing gets done, and nothing gets improved.

Developers and designers need space and time in their week to solve the smaller problems which will always exist for products. Things like changes to browser requirements, or page load fixes, or SEO for Google results, or asset management, code cleanup, etc. There is always room for improvement, but without time to make those improvements, that work will never get done.  If you're a sizable company, not so much.


text:
---
layout: post
title:  "Company Stories"
comments: true
date:   2019-12-07 12:00:00 -0500
categories: general
draft: false
---

One of the best ways to find out about a company is to ask about how it evolved. But those stories can be complex to understand, and this is where the [company system]({{ site.baseurl }}{% post_url 2018-10-20-leadership-lattice-simplified %}) can a really useful structure.

Understanding the evolution of individuals, teams, products, markets, and impacts have evolved can give a very comprehensive understanding of a company. The stories also reveal how decisions are made at an individual and team level across the organization. This can be a particularly helpful tool for new employees onboarding.

Some questions that can help reveal the company stories:

* How have you evolved inside the organization?
* For managers: What were some of the inflection points that led to your growth as a leader?
* What did this product look like before? What were some of the biggest features / capabilities added over the last few years?
* How did our understanding of the market evolve over time?
* How did our vision for what the company could be evolve over time?

There are I'm sure many others.

repository: tarunsachdeva/blog

branch_name: refs/heads/gh-pages

extension: markdown

gha_language: HTML

repo_name: tarunsachdeva/blog


text:
#  predatoR: Mutation Impact Prediction Based on Network Properties

[![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![R-CMD-check](https://github.com/berkgurdamar/predatoR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/berkgurdamar/predatoR/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/berkgurdamar/predatoR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/berkgurdamar/predatoR?branch=main)

# Overview

`predatoR` is a tool for mutation impact prediction based on network
properties.

`predatoR()` function is the wrapper function of `predatoR` package.

`predatoR()` works on each PDB respectively. For each PDB;

- Downloads/Reads PDB file
- Calculates distance between each atom in the structure
- Creates a network from PDB
- Calculates Degree Centrality Z-Score of each atom
- Calculates Eigen Centrality Z-Score of each atom
- Calculates Shortest Path Z-Score of each atom
- Calculates Betweenness Z-Score of each atom
- Calculates Clique Z-Score of each atom
- Calculates PageRank Z-Score of each atom
- Gets [gnomAD](https://gnomad.broadinstitute.org/) Synonymous Z-Score,
  Missense Z-Score, and pLI Score
- Gets BLOSUM62 score of the mutation
- Finds the number of [KEGG Pathways](https://www.genome.jp/kegg/) which
  contains the input gene
- Gets [Genic Intolerance](http://genic-intolerance.org/) Score
- Finds the number of GO terms associated with the input gene
- Finds the number of diseases associated with the input gene from
  [DisGeNET](https://www.disgenet.org/)
- Gets the Gene Essentiality Score from Online Gene Essentiality
  ([OGEE](https://v3.ogee.info/#/home)) Database
- Calculates the median gene expression value of the input gene from
  [GTEx](https://gtexportal.org/home/)
- Calculates 6 different features from Accessible Surface Area and
  Hydrophobicity Scale of reference and mutant amino acids
- Makes prediction

# Installation

You can install the predatoR via
[devtools](https://www.r-project.org/nosvn/pandoc/devtools.html):

``` r
library(devtools)
install_github("berkgurdamar/predatoR")
```

# Usage

Mutation impact prediction can be done via `predatoR()` function:

`predatoR()` uses data.frame structures as an input. data.frame should
consist of **‘PDB_ID’**, **‘Chain’**, **‘Position’**, **‘Orig_AA’**,
**‘Mut_AA’** and **‘Gene_Name’** (optional). Predictions can be made by
using 2 different models, 5 Angstrom (Å)-all atoms model and 7Å-carbon
alpha (Cα) atoms only model.

| PDB_ID | Chain | Position | Orig_AA | Mut_AA | Gene_Name |
|:------:|:-----:|:--------:|:-------:|:------:|:---------:|
|  3SQJ  |   A   |   196    |   GLN   |  LEU   |    ALB    |
|  3SQJ  |   A   |   396    |   GLU   |  LYS   |    ALB    |

`predatoR()` can work with input which has partially included gene
names.

``` r
library(predatoR)
# Gene name included
input_df <- as.data.frame(rbind(c("3SQJ", "A", 196, "GLN", "LEU", "ALB"),
                               c("3SQJ", "A", 396, "GLU", "LYS", "ALB")))
pred_res <- predatoR(info_df =  input_df, n_threads = 8, gene_name_info = TRUE)
# Gene name not included
input_df <- as.data.frame(rbind(c("3SQJ", "A", 196, "GLN", "LEU"),
                               c("3SQJ", "A", 396, "GLU", "LYS")))
pred_res <- predatoR(info_df =  input_df, n_threads = 8, gene_name_info = FALSE)
# Partially included gene names
input_df <- as.data.frame(rbind(c("3SQJ", "A", 196, "GLN", "LEU", "ALB"),
                               c("3SQJ", "A", 396, "GLU", "LYS", "")))
pred_res <- predatoR(info_df =  input_df, n_threads = 8, gene_name_info = TRUE)
```

`predatoR()` function returns a data.frame which contains additional two
columns; **‘Prediction’** and **‘Probability’**. **‘Prediction’**
represents the result of the impact prediction and **‘Probability’**
represents the probability that the mutation classified as
**Pathogenic** or **Neutral**.

| PDB_ID | Chain | Position | Orig_AA | Mut_AA | Gene_Name | Prediction | Probability |
|:------:|:-----:|:--------:|:-------:|:------:|:---------:|:----------:|:-----------:|
|  3SQJ  |   A   |   196    |   GLN   |  LEU   |    ALB    |  Neutral   |  0.6521832  |
|  3SQJ  |   A   |   396    |   GLU   |  LYS   |    ALB    |  Neutral   |  0.6009792  |

## Exploratory Usage

Network properties can be calculated by using different distance
cutoffs. In this approach, `predatoR()` does not make any prediction
about the mutation, but returns a data frame contains all 24 features
annotated to the dataset. Both network formalisation approaches also can
be used.

``` r
# networks build using all atoms and 7.6Å cutoff
prediction_result <- predatoR(input_df, distance_cutoff = 7.6, network_approach = "all")

# networks build using only Cα atoms and 8Å cutoff
prediction_result <- predatoR(input_df, distance_cutoff = 8, network_approach = "ca")
```

## Utility Functions

The wrapper function `predatoR()` uses the utility functions below;

- `read_PDB()`
- `PDB2connections()`
- `degree_score()`
- `eigen_centrality_score()`
- `shorteset_path_score()`
- `betweenness_score()`
- `clique_score()`
- `pagerank_score()`
- `gnomad_scores()`
- `BLOSUM62_score()`
- `KEGG_pathway_number()`
- `genic_intolerance()`
- `GO_terms()`
- `DisGeNET()`
- `gene_essentiality()`
- `GTEx()`
- `amino_acid_features()`
- `impact_prediction()`

Utility functions can be used alone, for more detail please see vignette
via `vignette("predatoR_Vignette")`.

repository: berkgurdamar/predatoR

repo_name: berkgurdamar/predatoR


text:
```@raw html
<div align="center">
  <p>
  <img src="https://github.com/JuliaReinforcementLearning/ReinforcementLearning.jl/raw/master/docs/src/assets/logo.svg?sanitize=true" width="320px">
  </p>
</div>
```

[**ReinforcementLearning.jl**](https://github.com/JuliaReinforcementLearning/ReinforcementLearning.jl), as the name says, is a package for reinforcement learning research in Julia.

Our design principles are:

- **Reusability and extensibility**: Provide elaborately designed components and interfaces to help users implement new algorithms.
- **Easy experimentation**: Make it easy for new users to run benchmark experiments, compare different algorithms, evaluate and diagnose agents.
- **Reproducibility**: Facilitate reproducibility from traditional tabular methods to modern deep reinforcement learning algorithms.

## Installation

This package can be installed from the package manager in Julia's REPL:

```
] add ReinforcementLearning
```

## Resources

- [Get Started in 3 lines!](http://juliareinforcementlearning.github.io/get_started)
- [Guide](http://juliareinforcementlearning.github.io/guide)
- Blog
  - [An Introduction to ReinforcementLearning.jl: Design, Implementation & Thoughts](http://juliareinforcementlearning.github.io/blog)
- Manual
  - [ReinforcementLearningBase.jl](@ref)
  - [ReinforcementLearningCore.jl](@ref)
  - [ReinforcementLearningEnvironments.jl](@ref)
  - [ReinforcementLearningZoo.jl](@ref)

## Project Structure

[**ReinforcementLearning.jl**](https://github.com/JuliaReinforcementLearning/ReinforcementLearning.jl) itself is just a wrapper around several other packages inside the [JuliaReinforcementLearning](https://github.com/JuliaReinforcementLearning) org.  So it is not included in [ReinforcementLearning.jl](https://github.com/JuliaReinforcementLearning/ReinforcementLearning.jl). The reason to do so is to ease the burden of maintenance.


text:
---
layout: post
title: "Statistical representation of data using Hadoop MapReduce on AWS"
date: "2016-11-21"
slug: "data-analysis-using-java-hadoop-mapreduce-on-aws"
description: "Statistical representation of data using Hadoop MapReduce on AWS"
category:
  - Java
  - featured
  - Personal Projects
  - Application Security
  - Big data
# tags will also be used as html meta keywords.
tags:
  - Java
  - Amazon Web Services (AWS)
  - Unix / Linux
show_meta: true
comments: true
mathjax: true
gistembed: true
published: true
noindex: false
nofollow: false
# hide QR code, permalink block while printing.
hide_printmsg: false
# show post summary or full post in RSS feed.
summaryfeed: false
---
Primary objective- understand Amazon AWS (EC2). Understanding the services and interface. Two Hadoop MapReduce jobs are merged, analyzed and represented graphically. Application will be deployed on private cloud environment. Multiple layers of security. Google reCaptcha 2.0 and SSH.

Statistical representation of data using Hadoop MapReduce on AWS

Learning and demonstrating Private Cloud

  As data continues to grow, now businesses have access to more data than ever before, which may go unused. This unused data can be grouped together using Hadoop MapReduce to provide business intelligence.

## TECHNOLOGY STACK

OS: Ubuntu 16
Programming: UNIX, shell script, JAVA, JSON, Bootstrap, JavaScript, Hadoop MapReduce, Html5, CSS.
Cloud Systems: Amazon AWS – EC2, Multimode cluster.
Other Functionality: Google reCAPTCHA 2.0, Google Charts

AWS Cloud System Architecture

AWS EC2 cluster (1-Master & 2 Slaves)

Website with all charts and mined data from hadoop

Thank you!

gha_license_id: NOASSERTION


text:
# Multi-Game Menu with High Scores
## see the walkthrough at
https://www.youtube.com/watch?v=khkRhjwNyjk&feature=youtu.be

the purpose of this project is to make multiple simple games in python and tie them together in a game menu
in that menu you can choose which game to play, to see high scores or to quit

## organization
within the parent directory there are files for:
* Game Menu-initial interface (game_interface.py)
* Maze Game (game_1.py)
* flying game (game_2.py)
* HighScore file (highscores.pkl)
* License
* readme (this)
* setup

## modules used and dependencies
Modules require to run this package are
#### Non-standard modules
* turtle
* pygame

#### standard modules
* math, random, os

## install and play instructions

#### To Install
1. download the 6018_proj directory
2. install turtle and pygame if not already done

#### To Play
1. open terminal or shell
2. move to the 6018_proj directory
    * cd ~.../6018_proj
3. open the interface file
    * python game_interface.py
4. choose menu option

##### References
* interface: http://www.nebelhom.com/2013/08/14/create-a-simple-game-menu-with-pygame-pt-1-writing-the-menu-options-to-the-screen/
* game 1: http://christianthompson.com/   https://www.youtube.com/watch?v=inocKE13DEA
* game 2: http://christianthompson.com/   https://www.youtube.com/watch?v=Oud6_wVJ4X0
* high score file: https://stackoverflow.com/questions/23893978/keeping-high-scores-in-a-text-file


text:
# Broadcastt

[![](https://img.shields.io/github/workflow/status/broadcastt/broadcastt-php-http/Test?style=flat-square)](https://github.com/broadcastt/broadcastt-php-http/actions?query=workflow%3ATest)
[![codecov](https://codecov.io/gh/broadcastt/broadcastt-php-http/branch/main/graph/badge.svg)](https://codecov.io/gh/broadcastt/broadcastt-php-http)
[![](https://img.shields.io/github/license/broadcastt/broadcastt-php-http?style=flat-square)](https://github.com/broadcastt/broadcastt-php-http/blob/main/LICENSE)
[![](https://img.shields.io/packagist/v/broadcastt/broadcastt-php-http?style=flat-square)](https://packagist.org/packages/broadcastt/broadcastt-php-http)

Realtime web applications are the future. [Broadcastt](https://broadcastt.xyz/) provides tools to help developers create realtime applications.

## PHP HTTP Library

> Be aware that this library is still in beta and not reached the first MAJOR version.
>
> Semantic Versioning 2.0.0
>
> Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

This library is compatible with PHP 7.1+

This is a PHP library to interact with the Broadcastt API. If you are looking for a client library or a different server library please check out our [list of libraries](https://broadcastt.xyz/docs/Libraries).

For tutorials and more in-depth documentation, visit the [official site](https://broadcastt.xyz/).

## Documentation

* [First steps](#first-steps)
* [Configuration](#configuration)
* [Modifiers](#modifiers)
* [Helpers](#helpers)
* [Usage](#usage)
* [Contributing](#contributing)

### First steps

Require this package, with [Composer](https://getcomposer.org/)

```
composer require broadcastt/broadcastt-php-http
```

### Configuration

```php
$appId = 'YOUR_APP_ID';
$appKey = 'YOUR_APP_KEY';
$appSecret = 'YOUR_APP_SECRET';
$appCluster = 'YOUR_APP_CLUSTER';

$client = new Broadcastt\BroadcasttClient( $appId, $appKey, $appSecret, $appCluster );
// or
$client = Broadcastt\BroadcasttClient::fromUri("http://{$appKey}:{$appSecret}@{$appCluster}.broadcastt.xyz/apps/{$appId}");
```

#### `appId` (Integer)

The id of the application

#### `appKey` (String)

The key of the application

#### `appSecret` (String)

The secret of the application

#### `appCluster` (String) Optional

The cluster of the application

Default value: `eu`

### Modifiers

#### `scheme` (String)

E.g. http or https

Default value: `http`

#### `host` (String)

The host e.g. cluster.broadcastt.xyz. No trailing forward slash

Default value: `eu.broadcasttapp.xyz` If the cluster is not set during initialization

#### `port` (String)

The http port

Default value: `80`

#### `basePath` (String)

The base of the path what the request will call. `{appId}` can be used to automatically parse the app ID in the base path.

Default value: `/apps/{appId}`

#### `timeout` (String)

The http timeout

Default value: `30`

#### `guzzleClient` (Mixed[])

Guzzle Client for sending HTTP requests

If not set it will be initialized without any parameters on the first request

### Helpers

#### `fromUri($uri)`

Instantiate a new client from the given uri.

These are methods which help you modify the instance

#### `useCluster($cluster)`

Modifies the `host` value for given `cluster`

#### `encrypted()`

Short way to change `scheme` to `https` and `port` to `443`

### Usage

#### `trigger($channels, $name, $data, $socketId = null, $jsonEncoded = false)`

Trigger an event by providing event name and payload.

Optionally provide a socket ID to exclude a client (most likely the sender).

#### `triggerBatch($batch = [], $encoded = false)`

Trigger multiple events at the same time.

#### `get($path, $params = [])`

GET arbitrary REST API resource using a synchronous http client.

All request signing is handled automatically.

## Contributing

Everyone is welcome who would help to make this library "Harder, Better, Faster, Stronger".

repository: broadcastt/broadcastt-php-http

repo_name: broadcastt/broadcastt-php-http


text:
# Android-Coins-Detection

A Kotlin Android App to detect and count all UK coins. Model was trained with YOLOv4. Takes advantage of chaquopy to perform inference as accuracy drops drastically when YOLOv4 model is converted to TF-Lite. Screenshots of home screen and detection results shown below.

## How to run:
```
Clone this repo
Open in Android studio
Build
```
# Screenshots of Main Activity (light mode) and Results Activity (dark mode activated)


text:
---
title: Critical Thinking
permalink: /literature/curatedreads/values/critical-thinking
breadcrumb: Curated Reads - Critical Thinking
collection_name: literature
third_nav_title: Skills
---

One of the most crucial skills in the workplace, critical thinking involves analysing a situation from all angles in order to generate optimal solutions. However, many employees and even those in leadership positions do not exercise this skill as much as they should. The lack of critical thinking results in hasty decisions, careless mistakes and sometimes even costly measures to remedy the problem. To help you acquire this important skill, we have prepared the following resources as a starting point.

## **CORE READ**

| ![Art of thinking image](/images/literature/curatedreads/skills/Art-of-thinking-350X552.jpg) | **The Art of Thinking Clearly**

 Call no.: 153.42 DOB

 An interesting, easy-to-read book on how one can “learn to recognise and evade the biggest errors in thinking” (p. xviii), this multidisciplinary work draws from theories in behavioural economics, psychology and neuroscience. |

Using real-life examples, each chapter unpacks the cognitive biases that affect the decisions we make every day. In Chapter 20, for example, Rolf Dobelli examines the tendency to judge a decision by its outcome and argues that it is more important to understand the reasons for making that decision in the first place:

_"A bad result does not automatically indicate a bad decision and vice versa. So rather than tearing your hair out about a wrong decision, or applauding yourself for one that may have only co-incidentally led to success, remember why you chose what you did. Were your reasons rational and understandable? Then you would do well to stick with that method, even if you didn't strike it lucky last time."_

[Grab this ebook](https://eresources.nlb.gov.sg/eReads/cms/details?uuid=a90b488d-24bd-4eb6-8bfe-59fa49b624a4) now or visit our public libraries to borrow a physical copy.

Book cover image credit: All rights reserved. HarperCollins Publishers, c2013.

**Thinking Fast and Slow**

Call no.: 153.42 KAH

In this highly acclaimed book, Daniel Kahneman takes us on a groundbreaking tour of the mind and explains the two systems that drive the way we think. System 1 is fast, intuitive and emotional; System 2 is slower, more deliberative and more logical.

[Grab this ebook now](https://eresources.nlb.gov.sg/eReads/cms/details?uuid=f9c8ec65-8599-4794-bedc-482f4fe5def2) or visit our public libraries to borrow a physical copy.

Book cover image credit: All rights reserved. Farrar, Straus and Giroux, 2011.

**Reading Critically**

To acquire the knack for critical thinking skills, first you need to read critically, meaning to read beyond mere comprehension. This skill allows us to read beyond just understanding the text. Follow the steps in this [infographic](http://qr.nlb.sg/creads/critical1) to help you analyse, understand and evaluate what you read.

**5 Tips to Improve Critical Thinking**

We are faced with a sea of decisions every day, and it’s impossible to make a perfect choice every time. [Watch this video](https://www.youtube.com/watch?v=dItUGF8GdTw) for tips to improve our chances.

![Logos image](/images/literature/curatedreads/logos-updated.jpeg)

repository: nlbnls/nlb-reference

repo_name: nlbnls/nlb-reference


text:
---
layout: post

title: "Better web UX with deep links"
date: 2015-06-04 10:00:00
tags: javascript

project: "https://github.com/timseverien/deep-link.js"
author: "https://github.com/timseverien"

pn: "deep-link.js"
an: "Tim Severien"

description: "deep-link.js is a JavaScript plugin that lets you add deep-links to the web."
issue: 91

sj: "http://summerjam.challengepost.com"
video: "https://www.youtube.com/embed/BLmPm57ct-4"
img: "http://gam.s3.amazonaws.com/img/i91o.gif"
---

Have you ever wondered why more publishers don't have "Share on WhatsApp" buttons on their mobile sites?" I mean, it's pretty popular (500M+ users).

As with Facebook and Twitter, you can send data to WhatsApp through special _deep links_. The thing is, WhatsApp doesn't have a true web client, so there's no way to handle unsupported platforms or users without the app.

You can overcome all of that with {{page.an}}'s {{page.pn}} plugin. It lets you embed deep links in web pages, manage visibility, and specify fallbacks for unsupported platforms.

For example, ChallengePost's Summer Jam site has a WhatsApp link that only shows up on mobile and prompts you to install the app if necessary.

All it took was two lines of code:

```html
<!--
This is a mobile-only WhatsApp deep-link. You can add an href attribute as a fallback.

FYI, message text must be URL encoded.
-->

<a data-app="whatsapp://send?text=Dude%2C%20ChallengePost%20Summer%20Jam%20looks%20sweet%21%20http%3A//summerjam.challengepost.com" data-store-android ="com.whatsapp" data-store-ios="310633997">Share on WhatsApp</a>

<!-- initialize the script before </body> -->
<script src="js/deep-link.js"></script>

```
The big win with {{page.pn}} is reduced user friction. And for Summer Jam, that means more sharing, more registrations, and more hacks!

Comments :)

repository: nealrs/gitatme

repo_name: nealrs/gitatme


text:
# HISA

This project is dedicated to making it easier to view correlation between sentiment on twitter and fluctuations in stocks.
  * Predictions
  * Sentiment Analysis
  * Plots
  * Twitter Scraping

## USAGE
  * `google = hisa.Share('GOOGL', 'google', interval='intraday', minute_interval='60min', start='02/19/2019')`
  * `google.generate_twitter_sentiment('out.json', start='2019-02-19', end='2019-02-23')`

## BUILD/INSTALLATION INSTRUCTIONS
  * All
    * Run `make` in project directory

## Contributor Guide
[LINK TO CONTRIBUTING.md]

## License
This project is under MIT license

repository: sahilmodi/hisa

repo_name: sahilmodi/hisa