text:
Backoff stack is an unbounded lock-free LIFO linked
list, where pushes and pops synchronize at a single
location. It is compare-and-set (CAS) atomic operation
to provide concurrent access with obstruction freedom.

> **Course**: [Concurrent Data Structures], Monsoon 2020\
> **Taught by**: Prof. Govindarajulu Regeti

[Concurrent Data Structures]: https://github.com/iiithf/concurrent-data-structures

```java
push():
1. Create node for value.
2. Try pushing node to stack.
2a. If successful, return.
2b. Otherwise, backoff and try again.
```

```java
pop():
1. Try popping a node from stack.
1a. If successful, return its value.
1b. Otherwise, backoff and try again.
```

```java
tryPush():
1. Get stack top.
2. Set node's next to top.
3. Try push node at top (CAS).
```

```java
tryPop():
1. Get stack top, and ensure stack not empty.
2. Try pop node at top, and set top to next (CAS).
```

```java
backoff():
1. Get a random wait duration.
2. Sleep for the duration.
3. Double the max random wait duration.
```

```bash
## OUTPUT
Starting 10 threads with sequential stack
1: failed pop
3: failed pop
4: failed pop
1: popped 2/1000 values
1: has duplicate value 9999
1: has duplicate value 9998
3: popped 79/1000 values
3: has duplicate value 3761
4: popped 886/1000 values
Was LIFO? false

Starting 10 threads with backoff stack
Was LIFO? true
```

See [BackoffStack.java] for code, [Main.java] for test, and [repl.it] for output.

[BackoffStack.java]<EMAIL_ADDRESS>[Main.java]<EMAIL_ADDRESS>[repl.it]: https://backoff-stack.wolfram77.repl.run

### references

- [The Art of Multiprocessor Programming :: Maurice Herlihy, Nir Shavit](https://dl.acm.org/doi/book/10.5555/2385452)

repository: javaf/backoff-stack

repo_name: javaf/backoff-stack


text:
ORMLite Eclipse Plug-in
=======================

This project compiles [ORMLite Core](https://github.com/j256/ormlite-core) and [JDBC](https://github.com/j256/ormlite-jdbc) packages into a single Eclipse plug-in
and creates a P2 repository to publish it as the "Ormlite 5.1" feature.
The ORMLite Eclipse Plug-in is the key component of the [Classy Data Lightweight JPA](http://cybersearch2.com.au/develop/classydata.html) library bieng applied to
an Android Development IDE to persist project configurations. Classy Data is a minimal JPA implementation layered over the top of ORMLite. Both Classy Data and ORMLite
are good candidates for Eclipse modularization as they share the same lightweight, standard-Java-only ethos.

Any application of the ORMLite Eclipse Plug-in needs to adapt to a standard application interface which applies to all plug-ins. You can find out more in
the Vogella [OSGi Modularity - Tutorial](http://www.vogella.com/tutorials/OSGi/article.html). This restricts access to classes from one plug-in to other plugins
and prevents discovery of classes to be persisted as implemented in ORMLite. Classy Data overcomes this problem by having entity classes declared in a peristence
XML configuration file and using a class loader provided by it's client to instantiate them.

Another consideration is that the number of database drivers available on [Orbit](http://download.eclipse.org/tools/orbit/downloads/drops/R20180829150157),
the Eclipse plug-in repository is limited to h2 (org.h2 v1.3.168) and derby (org.apache.derby v<IP_ADDRESS>). As h2 is probaly better known, it is included in the
ORMLite Eclipse Plug-in dependencies and selected as the database to be used by the Classy Data plugin.

## Usage in Classy Data

Although Classy Data places a JPA application layer on top of ORMLite, it does not hide it because all queries are based on ORMLite's SQL query "compiler",
which provides comprehensive support for programmatically generating SQL queries. Therefore, ORMLite Eclipse Plug-in is automatically a dependency where
ever Classy Data is a dependency. Here is an actual code snippet where an ORMLite QueryBuilder object is modified by appending a where clause to select
an object by primary key named "id":

    // build a query with the WHERE clause set to 'id = ?'
    queryBuilder.where().eq("id", primaryKeyArg);

Another ORMLite exposure is through the EntityManager getDelegate() method which returns a helper object to provide access to ORMLite Database
Access Objects (DAOs). Here is the helper's signature:

    /**
     * Returns ORMLite DAO for specified entity class
     * @param clazz  Entity class
     * @return PersistenceDao
     * @throws UnsupportedOperationException if class is unknown for this persistence unit
     */
    public PersistenceDao<?, ?> getDaoForClass(Class<?> clazz)
    {
    ...
    }

This allows customization where the JPA implementation is not sufficient.

## Build Instructions

The build project is configured to work with the latest ORMLite version at time of creation, which is version 5.1. The resulting plugin version is 5.1.0 in accordance with Eclipse conventions.
There are no other build artifacts apart from the P2 repository.

### Prequisites

* Java 8
* [Maven](https://maven.apache.org/download.cgi) - v3.5.2+ recommended
* [Git](https://git-scm.com/downloads)
* Set up Maven toolchains configuration to point to your Java 8 JDK installation.
Refer [Guide to Using Toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html) and [JDK Toolchain](http://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html)

You should also ensure your Git [username](https://help.github.com/articles/setting-your-username-in-git/) and
[commit email address](https://help.github.com/articles/setting-your-commit-email-address-in-git/) are configured.

### Steps

1. Clone this repository to your workspace and go to the newly created "com.j256.ormlite.eclipse" project sub directory.
1. From a command terminal, launch a Maven build using parameters you will find in the provided build.sh file. If on Linux, you can run build.sh as a shell command.
1. If a first time build, you will potentially observe a large number of files being downloaded to be cached on the local Maven repository. If so, it may be time for a coffee break.

The build, when successful, creates a P2 repository in project sub directory releng/ormlite.update/target/repository.

### Build Project Details

The build project is created guided by the Vogella [Eclipse Tycho for building plug-ins, OSGi bundles and Eclipse applications - Tutorial](http://www.vogella.com/tutorials/EclipseTycho/article.html).
Tycho is a Maven plug-in library specifically for building Eclipse products. It has a highly engineered approach which requires a lot of project structure, even for a modest plug-in.

The project structure is:

* / (root) Top- level POM declares group id, artifact id, version and some project information.  Note the SNAPSHOT version convention is always used, even for releases.
* /bundle/ormlite.plugin The actual plug-in project. Note the sources are not included in the distribution, but instead are downloaded and unpacked from the Maven Central repository.
* /feature/com.j256.feature The feature definition which provides information needed to install the plug-in, including the license text.
* /releng/ormlite.configuration Configures Tycho, Toolchains and software versions
* /releng/ormlite.target Contains the target configuration which identifies which features are to be made available for building the plugin. Ensures build consistency over time.
* /releng/ormlite.update The sub project which builds the P2 repository. The plug-in artifacts are given a unique identity, base on a timestamp, for each build.

As the sources are downloaded from the Maven Central repository, it ensures that a release version of ORMLite is being built, and not a snapshot, as happens when sources come from GitHub.

Note that it has also been considered to build separate Core and Jbdc plug-ins derived from the jar counterparts, but this proved unworkable because the two jars share the same packages.
Eclipse does not allow a Java package to be split across 2 plug-ins because it breaks modularity.

### Trouble Shooting

If the expected "Build successful" message does not appear at the end of the build, you must try to understand the error information provided by Maven. Generally, things to check:

1. All required command parameters correctly entered (refer build.sh file in root location).
1. The machine has internet access, there are no internet outages and, if required, the http proxy are details configured in Maven settings file.
1. Check the toolchains.xml file, co-located with the Maven settings file, is correctly configured. Note that all JDK Toolchain items must be correct even though only one is used at any time.
1. If the Java compile build stage fails, delete the contents of directories /bundle/ormlite.plugin/src and /bundle/ormlite.plugin/libs and start the build again. This checks for a file corrupted on download/unpack.

license: ISC

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Migrate user-created databases to Alibaba Cloud through tools provided by MongoDB {#concept_ztl_f4w_fgb .concept}

MongoDB provides two command tools: mongodump and mongorestore. You can use these command tools to migrate data from user-created MongoDB database to standalone ApsaraDB for MongoDB instances.

## Prerequisites {#section_yvn_5hk_pgb .section}

-   The version of mongodump and mongorestore is the same as the version of the user-created MongoDB database.
-   The storage space of the standalone instance must be larger than the storage space of the user-created MongoDB instance. If the storage space is insufficient, you can use [Change the configuration](../../../../intl.en-US/User Guide/Instance management/Change the configuration.md#) to expand the storage space.

## Precautions {#section_rh3_lgd_5fb .section}

-   This is a full migration. To avoid data inconsistency, stop writing into the database before the migration starts.
-   If you have used mongodump to back up the database, move the files in the dump folder to other directories. Ensure that the dump folder is empty before data migration. Otherwise, existing backup files in this folder will be overwritten.
-   Run the mongodump and mongorestore commands on the server where the user-created database is deployed. Do not run these in the mongo shell.

## Back up the user-created database {#section_czp_sjd_5fb .section}

This is a full migration. To avoid inconsistencies in data, stop the services related to the user-created database and stop data writing before migration.

1.  On the server where the user-created database is deployed, run the following command to back up all the data:

    ``` {#codeblock_yp1_gq3_p9p}
    mongodump --host <mongodb_host> --port <port>  -u <username>  --authenticationDatabase  <database>
    ```

    Note:

    -   <mongodb\_host\>: the server address of the user-created database. If this database is deployed on the current server, set this parameter to <IP_ADDRESS>.
    -   <port\>: the service port number for the user-created database. The default port number is 27017.
    -   <username\>: the account used to log on to the user-created MongoDB database.
    -   <database\>: the name of the authentication database for the user-created database. The default database name is admin.
    Example:

    ``` {#codeblock_xmd_yf6_kf5}
    mongodump --host <IP_ADDRESS> --port 27017 -u root --authenticationDatabase admin
    ```

2.  Enter the password in the `Enter password:` prompt to start data backup.

Wait until the data backup is complete. The data of the user-created database is backed up in the dump folder of the current directory.

## Migrate data to ApsaraDB for MongoDB {#section_nvh_r4d_5fb .section}

1.  Obtain the connection address of the primary node of standalone instance.

    1.  Log on to the [ApsaraDB for MongoDB console](https://mongodb.console.aliyun.com/#/mongodb/list).
    2.  Select the region where the destination instance is located.
    3.  In the left-side navigation pane, click **Replica Set Instances**.
    4.  Click the ID of the instance.
    5.  In the left-side navigation pane, click **Database Connection**.

        ![View connection details on a standalone MongoDB node](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/82882/156222521435103_en-US.png)

    **Note:**

    -   Intranet Connection - VPC: A Virtual Private Cloud \(VPC\) is an isolated virtual network that has higher security and performance than a classic network.

        The VPC network is suitable for user-created MongoDB databases built based on [ECS instances](https://www.alibabacloud.com/help/zh/doc-detail/25367.htm). The ECS instance and ApsaraDB to MongoDB instances must be in the same region and VPC. You also need to add the private IP address of the ECS instance to the MongoDB instance whitelist. For more information, see [Configure a whitelist](intl.en-US/Quick Start for Standalone/Configure a whitelist.md#).

    -   Public IP Connection: Instances are not automatically configured with a public IP address to ensure security. You must manually apply for a public IP address for the instance. For more information, see [Apply for a public IP address](intl.en-US/Quick Start for Standalone/Apply for a public address.md#).

        To migrate instances through the public network connection address, you must add the public IP address of the user-created MongoDB database to the whitelist of the ApsaraDB for MongoDB instance.

2.  On the server of the user-created MongoDB database, run the following command to import all the data of the database to ApsaraDB for MongoDB.

    ``` {#codeblock_k6c_o56_5rs}
    mongorestore --host <Primary_host>  -u <username> --authenticationDatabase <database> <Backup directory>
    ```

    Note:

    -   <Primary\_host\>: the connection address of the primary node in the replica set instance.
    -   <username\>: the database account for the ApsaraDB for MongoDB instance. The default username is root.
    -   <database\>: the name of the authentication database for the ApsaraDB for MongoDB instance. The default database name is admin.
    -   <Backup directory\>: the directory that stores backup files. The default backup directory is dump.
    Example:

    ``` {#codeblock_dht_j22_7u7}
    mongorestore --host dds-bp**********-pub.mongodb.rds.aliyuncs.com:3717 -u root --authenticationDatabase admin dump

    ```

3.  Enter the password in the `Enter password:` prompt to start data migration.

    **Note:** For more information about how to set a database password, see [Set a password](intl.en-US/Quick Start for Standalone/Set a password.md#).

Wait until the data migration is complete. Switch your businesses to the ApsaraDB for MongoDB instance during off-peak hours to avoid negatively affecting your businesses.

## More information {#section_kqs_yjk_pgb .section}

After migrating databases to ApsaraDB to MongoDB instances, you can connect to the database, manage the database, and manage database users as required.

[Connect to ApsaraDB for MongoDB through the mongo shell](intl.en-US/Quick Start for Standalone/Connect to an instance/Connect to ApsaraDB for MongoDB through the mongo shell.md#)

license: MIT

url: https://raw.githubusercontent.com/quanwc/mongodb/af33682f35aea030651842ae188c28b2e99b9389/intl.en-US/Quick Start for Standalone/Data migration/Migrate user-created databases to Alibaba Cloud through tools provided by MongoDB.md

repository: quanwc/mongodb

repo_name: quanwc/mongodb


text:
# Directives of VueJS
### Author: Truong Giang Huynh

Download VueJS at https://vuejs.org/v2/guide/installation.html

Using directives of VueJS to interact with DOM

* v-bind/v-on/v-html/v-model (two-way binding)

v-bind: binding the attributes of elements

v-on: Listen the events

v-html: to render the text of 'html' code for browser understanding

{{value}}: interpolation


text:
# MobileDiscord

MobileDiscord is a custom third-party mod for Discord (https://discordapp.com/).

Neither the code nor its author are affiliated with Discord.

## Dependencies

~~Flask~~ (is now supplied by Google Cloud by default)

## Hosting

1. Create a Google Cloud account at https://cloud.google.com.
2. Create a new project in the web console, name it whatever you want. Write down the project ID (it appears below the project name field in the new project prompt).
3. Download Google Cloud SDK.
4. Run `gcloud auth login`. Your browser will open an authentication page. Login and give permission to SDK.
5. Run `gcloud config set project $PROJECT_ID`.
6. Clone this repository and navigate to `$REPO_ROOT/appengine`.
7. Run `gcloud app regions list`. You'll get a list of available app regions.
8. Run `gcloud app create --region $REGION`, where $REGION is one of the regions from the above list.
9. Run `gcloud app deploy`.
10. Congratulations! MobileDiscord is now available at https://**$PROJECT_ID**.appspot.com/channels/@me


text:
---
layout: post
title: "OsBRXL2"
description: ""
category: genes
tags: [panicle]
---

* **Information**
    + Symbol: OsBRXL2
    + MSU: [LOC_Os03g63650](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os03g63650)
    + RAPdb: [Os03g0853500](https://rapdb.dna.affrc.go.jp/locus/?name=Os03g0853500)

* **Publication**
    + [Systematic identification and expression analysis of BREVIS RADIX-like homologous genes in rice](http://www.ncbi.nlm.nih.gov/pubmed?term=Systematic identification and expression analysis of BREVIS RADIX-like homologous genes in rice%5BTitle%5D), 2010, Plant Science.

* **Genbank accession number**

* **Key message**
    + Four rice BRX-like genes were predominantly (OsBRXL1, OsBRXL2, and OsBRXL4) or specifically (OsBRXL3) expressed in young panicle

* **Connection**

[//]: # * **Key figures**


text:
# Sauce Labs Testrunner Toolkit ![BETA](https://img.shields.io/badge/beta!-blue?style=for-the-badge)

<!-- [START badges] -->
![Build](https://github.com/saucelabs/testrunner-toolkit/workflows/Sauce%20Pipeline%20Browser%20Tests/badge.svg?branch=master)
[![CircleCI Status](https://circleci.com/gh/saucelabs/saucectl.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/saucelabs/saucectl)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
[![Chromium version](https://img.shields.io/badge/chromium-84.0.4131.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)
<!-- [END badges] -->

Sauce Labs Testrunner Toolkit is a containerized testing solution that simplifies user setup, speeds up test execution time and supports native Javascript frameworks like Puppeteer and Playwright for running end-to-end web tests with Sauce Labs.

<!-- [START gettingstarted] -->

## Requirements

- [Docker](https://docs.docker.com/get-docker/) installed
- Make sure the Docker daemon is running (e.g. `docker info` works in your terminal)
- A [Sauce Labs](https://saucelabs.com/) account; if you don't have one, start a [free trial](https://saucelabs.com/sign-up)

## Install

Using NPM:

```sh
npm i -g saucectl
```

Using brew:
```sh
brew tap saucelabs/saucectl
brew install saucectl
```

or via our one line installer:

```sh
curl -L https://saucelabs.github.io/saucectl/install | bash
```

Would you like to inspect the content of our one line installer?
Download it, have a look and execute it:

```sh
curl -fsSL -o get_saucectl.sh https://saucelabs.github.io/saucectl/install
chmod 700 get_saucectl.sh
./get_saucectl.sh
```

## Connect to Sauce Labs

A Sauce Labs user name and access key are needed to post the test results. You can get your `SAUCE_ACCESS_KEY` from
Account > User Settings in [Sauce Labs](https://app.saucelabs.com/).

To authenticate yourself, the following environment variables need to be set:

- `SAUCE_USERNAME`
- `SAUCE_ACCESS_KEY`

You can export them as follows:

```sh
export SAUCE_USERNAME=<your-username>
export SAUCE_ACCESS_KEY=<your-access-key>
```

If you are using a cloud CI/CD tool, we strongly suggest protecting these values
through secrets or context variables.

## Getting started

```sh
saucectl new
```

This command will ask you to choose one of the frameworks:
- [Puppeteer](https://github.com/puppeteer/puppeteer)
- [Playwright](https://github.com/microsoft/playwright)
- [TestCafe](https://github.com/DevExpress/testcafe)
- [Cypress](https://github.com/cypress-io/cypress)

After that, a `./sauce/config.yml` file and an example test under
the `tests` directory will be created, where you can start working from.

### Run your first test

```sh
saucectl run
```

This command will run the example test based on the `./.sauce/config.yml` file.

### Using saucectl
To learn more about `saucectl` and its commands and flags,
please visit the [saucectl repository](https://github.com/saucelabs/saucectl).

### Quick demo

![Demo](https://github.com/saucelabs/testrunner-toolkit/blob/master/docs/assets/saucectl-demo.gif?raw=true)

## Configuration
`saucectl` requires a configuration file to know what tests to run and what
framework to use. By default, `.sauce/config.yml` will be the place where
`saucectl` will look for its configuration.

```yaml
# Simple puppeteer example config
apiVersion: v1
metadata:
  name: Feature XYZ
  tags:
    - e2e
    - release team
    - other tag
  build: Release $CI_COMMIT_SHORT_SHA
files:
  - ./tests/**/*.js
image:
  base: saucelabs/stt-puppeteer-jest-node
  version: latest
sauce:
  region: us-west-1
```

If you wish to use more than one framework, or to configure different sets of
tests separately, you could use any name for the configuration file, and
specify it through `saucectl run -c ./path/to/config.yml`.

As an example, this repository uses multiple configurations for its pipeline:
- [Cypress](./.sauce/cypress.yml)
- [Playwright](./.sauce/playwright.yml)
- [Puppeteer](./.sauce/puppeteer.yml)
- [TestCafe](./.sauce/testcafe.yml)

> **NOTE:** We are in the middle of a transition to make our configs framework specific, i.e. the look and feel and behavior of the config.yml is different for each framework.
> This enables us to provide the user with a configuration that is much closer to the framework native experience than we've had before.

<!-- [END gettingstarted] -->

<!-- [START examples] -->

### Run a single file

```yaml
files:
  - ./tests/file.spec.js
```

### Run multiple files

```yaml
files:
  - ./tests/*.spec.js
```

### Run an entire directory

```yaml
files:
  - ./tests/cypress/
```

## Images

All images are hosted on Docker Hub.

[Base image](https://hub.docker.com/r/saucelabs/testrunner-image/tags)
is called `testrunner`. It contains the tooling necessary to record videos, VNC etc. Plus Chrome, and a Firefox version.

[Base image + Playwright](https://hub.docker.com/r/saucelabs/stt-playwright-jest-node/tags)
contains saucectl with different versions of Playwright.

[Base image + Puppeteer](https://hub.docker.com/r/saucelabs/stt-puppeteer-jest-node/tags)
contains saucectl with different versions of Puppeteer.

[Base image + TestCafe](https://hub.docker.com/r/saucelabs/stt-testcafe-node/tags)
contains saucectl with different versions of TestCafe.

[Base image + Cypress](https://hub.docker.com/r/saucelabs/stt-cypress-mocha-node/tags)
contains saucectl with different versions of Cypress.

### Browser version supported

- [Playwright](https://github.com/saucelabs/sauce-playwright-runner/releases/latest)
- [Puppeteer](https://github.com/saucelabs/sauce-puppeteer-runner/releases/latest)
- [TestCafe](https://github.com/saucelabs/sauce-testcafe-runner/releases/latest)
- [Cypress](https://github.com/saucelabs/sauce-cypress-runner/releases/latest)

## Examples

The examples here show how Pipeline testing can be used. Try them and find your own use cases. Every testrunner image comes with a preconfigured setup that allows you to focus on writing tests instead of tweaking with the configurations. Our initial testrunner flavors come either with Puppeteer or Playwright as an automation framework. They will start the browser for you and expose the `browser` object ([Puppeteer](https://pptr.dev/#?product=Puppeteer&version=v3.0.3&show=api-class-browser) / [Playwright](https://playwright.dev/#version=v1.0.1&path=docs%2Fcore-concepts.md&q=browser)) to the global scope for you to be accessible in the test:

#### Puppeteer Snippet:

Our Puppeteer testrunner image exposes `browser` into the global scope which represents an instance of its [`Browser class`](https://pptr.dev/#?product=Puppeteer&version=v3.0.4&show=api-class-browser). The browser will be initiated and shutdown by the testrunner setup.

```js
describe('saucectl demo test', () => {
	test('should verify title of the page', async () => {
		const page = (await browser.pages())[0]
		await page.goto('https://www.saucedemo.com/');
		expect(await page.title()).toBe('Swag Labs');
	});
});
```

#### Playwright Snippet:

The Playwright testrunner image also exposes a global `browser` variable that represents Playwright's [`Browser class`](https://playwright.dev/#version=v1.0.2&path=docs%2Fcore-concepts.md&q=browser). In addition to that you also have access to a pre-generated [browser context](https://playwright.dev/#version=v1.0.2&path=docs%2Fcore-concepts.md&q=browser-contexts) via `context` as well as to a [page frame](https://playwright.dev/#version=v1.0.2&path=docs%2Fcore-concepts.md&q=pages-and-frames) via `page`.

```js
describe('saucectl demo test', () => {
	test('should verify title of the page', async () => {
		await page.goto('https://www.saucedemo.com/');
		expect(await page.title()).toBe('Swag Labs');
	});
});
```

#### Testcafe Snippet
```js
import { Selector } from 'testcafe';
fixture `Getting Started`
	.page `http://devexpress.github.io/testcafe/example`

const testName = 'testcafe test'
test(testName, async t => {
	await t
		.typeText('#developer-name', 'devx')
		.click('#submit-button')
		.expect(Selector('#article-header').innerText).eql('Thank you, devx!');
});
```

#### Cypress Snippet
```js
context('Actions', () => {
	beforeEach(() => {
		cy.visit('https://example.cypress.io/commands/actions')
	})
	it('.type() - type into a DOM element', () => {
		// https://on.cypress.io/type
		cy.get('.action-email')
			.type('fake@email.com').should('have.value'<EMAIL_ADDRESS>	})
})
```
<!-- [END examples] -->

<!-- [START about] -->
## More about the Sauce Labs Testrunner Toolkit ![BETA](https://img.shields.io/badge/beta!-blue?style=for-the-badge)

Native JavaScript testing is achieved through the combination of Sauce Labs, Jest, and the
JavaScript framework of your choice. In the current beta, the toolkit supports
[Puppeteer](https://github.com/puppeteer/puppeteer),
[Playwright](https://github.com/microsoft/playwright) and
[TestCafe](https://github.com/DevExpress/testcafe).
[Cypress](https://github.com/cypress-io/cypress).
This approach gives you the power and expressiveness of different test frameworks with the dashboards, infrastructure, and analytics of [Sauce Labs](https://saucelabs.com/).

The specific framework you want to use to for testing should be based on the types of tests you
need to run and the environment in which you are running them. In this beta you will be able to
run tests in your existing CI pipeline and benefit from the low latency.

When tests are completed, logs, results, and videos will be uploaded to Sauce Labs to your account. After that, you can review, share, and analyze those results just as you would from any other test executed on Sauce Labs.

To learn more about:
* Jest, visit https://jestjs.io/
* The Google Puppeteer project, visit https://developers.google.com/web/tools/puppeteer
* The Microsoft Playwright project, visit https://github.com/microsoft/playwright
* TestCafe, visit https://devexpress.github.io/testcafe/
* Cypress, visit https://github.com/cypress-io/cypress

### Using `saucectl` in your CI/CD pipeline

This repository includes examples of CI/CD in
[GitHub Actions Workflows](https://help.github.com/en/actions) and
[CircleCI Pipelines](https://circleci.com/docs/2.0/configuration-reference/). Although the
[GitHub Actions](./.github/workflows/tests.yml) and [CircleCI](./.circleci/config.yml)
examples are included, the mechanism works with any CI/CD provider that supports containers.

<!-- [END about] -->

<!-- [START collaboration] -->
## Collaboration
There is a lot we can imagine doing next. It starts with hearing from you.
Submit issues and features [here](https://github.com/saucelabs/saucectl/issues/new/choose) - everything helps!
<!-- [END collaboration] -->

<!-- [START contribution] -->
## Contribution
The Sauce Labs Testrunner Toolkit is part of our commitment to a world of digital confidence where each of our
digital lives and experiences are magical. If you are thinking about getting involved, please do. This
repository is focused on helping people learn how to test their user experience. More is welcome.
 * [Contribution guidelines](./CONTRIBUTING.md)
 * [Code of conduct](./CODE_OF_CONDUCT.md)

<!-- [END contribution] -->

repository: EY-Parthenon/testrunner-toolkit

repo_name: EY-Parthenon/testrunner-toolkit


text:
# scrapping_python
## Title:
Assignment_2 to scrap all the related information about different cryptocurrencies

## Installation

PyPI
```bash
pip install bs4
pip install selenium
```
or from source
```bash
git clone https://github.com/mozilla/geckodriver/releases
cd selenium
python3 setup.py install
```
## Usage
```bash
from bs4 import BeautifulSoup
from selenium import webdriver
```
## Examples
```bash
coin name: ethereum
```
## License
[MIT](https://choosealicense.com/licenses/mit/)

branch_name: refs/heads/main


text:
# Optical Chemical Structure Recognition - Benchmark
[![GitHub release](https://img.shields.io/github/release/Kohulan/OCSR_Review.svg)](https://GitHub.com/Kohulan/OCSR_Review/releases/)
[![DOI](https://zenodo.org/badge/277765775.svg)](https://zenodo.org/badge/latestdoi/277765775)
[![License](https://img.shields.io/badge/License-MIT%202.0-blue.svg)](https://opensource.org/licenses/MIT)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-blue.svg)](https://GitHub.com/Kohulan/OCSR_Review/graphs/commit-activity)
[![GitHub issues](https://img.shields.io/github/issues/Kohulan/OCSR_Review.svg)](https://GitHub.com/Kohulan/OCSR_Review/issues/)
[![GitHub contributors](https://img.shields.io/github/contributors/Kohulan/OCSR_Review.svg)](https://GitHub.com/Kohulan/OCSR_Review/graphs/contributors/)

- This repository contains the information related to the benchmark study on openly available OCSR tools

## Materials and methods

- In order to compare the results of the three available open-source OCSR tools Imago (version 2.0), MolVec (version 0.9.7) and OSRA (version 2.1.0), multiple datasets which are freely available online were analyzed according to the validation procedure of the OSRA developers (4). The datasets were::

  - A set of 5719 images of chemical structures and the corresponding molfiles (based on data from the USPTO) obtained from the OSRA online presence (4).

  - The dataset (UOB) of 5740 images and molfiles of chemical structures developed by the University of Birmingham, United Kingdom, and published alongside MolRec  (6).

  - The Conference and Labs of the Evaluation Forum (CLEF) test set of 961 images and molfiles published in 2012 (7).

  - A subset (450 images and SDfiles) of a dataset published with ChemInfty (see above) based on data from the Japanese Patent Office (JPO), obtained from the OSRA online presence (4). (Note that this dataset contains many labels (sometimes with Japanese characters) and irregular features, such as variations in the line thickness. Additionally, some images have a poor quality and contain a lot of noise.)

- The TIFF images were converted to PNG images with a resolution of 72 dpi to assure comparability, as MolVec and Imago both showed problems handling those TIFF files in batch mode.

- Converted Images can be found on the [input](https://github.com/Kohulan/OCSR_Review/tree/master/assets/images) directory

### Running Imago
- Command line version of Imago (9) was used here.
```
./imago_console -dir /image/directory/path
```

### Running MolVec with parallelization
```
java -cp molvec-0.9.7.jar:common-image-3.4.1.jar:common-io-3.4.1.jar:common-lang-3.4.1.jar:commons-cli-1.4.jar:imageio-core-3.4.1.jar:imageio-metadata-3.4.1.jar:imageio-tiff-3.4.1.jar:ncats-common-0.3.3.jar:ncats-common-cli-0.9.1.jar gov.nih.ncats.molvec.Main -dir /image/directory/path -outDir /output/directory/path
```

### Running OSRA

- OSRA was installed in an Anaconda environment using the Conda recipe for PyOSRA which was published by Ed Beard (10). This was done analogously to the installation instructions in the ChemSchematicResover documentation (11). We use the PyOSRA environment because compiling OSRA from source code is excessively complex as it has a lot of dependencies that need to be compiled from their own source code as well. There is the option to obtain a commercial license to get a precompiled version of the software.

```
for image in *.png; do osra -f sdf -a /path/to/superatom/dictionary/superatom.txt -l /path/to/spelling/corrections/dictionary/spelling.txt -w /output/path/$image.sdf $image;done
```

### Results

- Time elapsed and accuracy reported for the open-source OCSR tools

  - The accuracies of the tools listed in Table above correspond to perfectly-recognized structures according to a perfect match of the Standard InChI strings (12) that were created based on the OCSR results and the reference files.

Dataset | | MolVec 0.9.7 | Imago 2.0 | OSRA 2.1
--- | --- | --- | --- | ---
USPTO | Time (min) | 28.65 | 72.83 | 145.04
*(5719 images)* | Accuracy | 88.41% | 87.20% | 87.69%
 UOB | Time (min) | 28.42 | 152.52 | 125.78
 *(5740 images)* | Accuracy | 88.39% | 63.54% | 86.50%
CLEF 2012 | Time (min) | 4.41 | 16.03 | 21.33
*(961 images)* | Accuracy | 80.96% | 65.45% | 94.90%
JPO | Time (min) | 7.50 | 22.55 | 16.68
*(450 images)* | Accuracy | 66.67% | 40.00% | 57.78%

- (a) Accuracy (Right: higher the better) and (b) Total time for processing (Left: lower the better)

Accuracy | Total time for processing
--- | ---
![GitHub Logo](https://github.com/Kohulan/OCSR_Review/blob/master/assets/OCSR_1.png?raw=true) | ![GitHub Logo](https://github.com/Kohulan/OCSR_Review/blob/master/assets/OCSR_2.png?raw=true)
Figure 1 | Figure 2

#### Conclusion

- As shown in the Table, MolVec processes the images significantly faster than its competitors. All three tools performed fairly well on the given set of images. As illustrated in Figure 1, the proportion of accurate results produced by MolVec and OSRA with the UOB, CLEF and JPO datasets was approximately 20% higher than in the results produced by Imago. The lower overall performance of all three tools with the JPO dataset is likely due to the lower quality of the depictions, the presence of labels and other irregular features. The extraordinarily good performance of OSRA on the CLEF dataset is a notable observation. The examination of the images in the dataset reveals a set of well-segmented, clean chemical structure depictions which is seemingly handled especially well by OSRA.

## References
1.	Smolov V, Zentsev F, Rybalkin M. Imago: Open-Source Toolkit for 2D Chemical Structure Image Recognition. In: TREC [Internet]. Citeseer; 2011. Available from: http://citeseerx.ist.psu.edu/viewdoc/download?doi=<IP_ADDRESS>1.8925&rep=rep1&type=pdf\
2.	Nguyen D-T. Molvec [Internet]. ACS Meeting; 2019; San Diego. Available from: https://molvec.ncats.io
3.	Filippov IV, Nicklaus MC. Optical structure recognition software to recover chemical information: OSRA, an open source solution. J Chem Inf Model. 2009 Mar;49(3):740–3.
4.	OSRA validation datasets [Internet]. [cited 2020 Jun 24]. Available from: https://sourceforge.net/p/osra/wiki/Validation/
5.  Sadawi NM, Sexton AP, Sorge V. Chemical structure recognition: a rule-based approach [Internet]. Document Recognition and Retrieval XIX. 2012. Available from: http://dx.doi.org/10.1117/12.912185
6.	Molrec UOB Benchmark dataset [Internet]. [cited 2020 Jun 29]. Available from: http://www.cs.bham.ac.uk/research/groupings/reasoning/sdag/chemical.php
7.	CLEF-IP 2012 Structure Recognition Test Set [Internet]. [cited 2020 Jun 29]. Available from: http://www.ifs.tuwien.ac.at/~clef-ip/download/2012/qrels/clef-ip-2012-chem-recognition-qrels.tgz
8.  Fujiyoshi, Akio and Nakagawa, Koji and Suzuki, Masakazu. Robust Method of Segmentation and Recognition of Chemical Structure Images in ChemInfty. 2011; Available from: https://www.researchgate.net/publication/229042881_Robust_Method_of_Segmentation_and_Recognition_of_Chemical_Structure_Images_in_ChemInfty
9.	Imago Download [Internet]. [cited 2020 Jun 24]. Available from: https://lifescience.opensource.epam.com/download/imago.html
10.	Beard E. Pyosra Conda Recipe [Internet]. [cited 2020 Jun 24]. Available from: https://github.com/edbeard/conda_recipes/tree/master/pyosra
11.	ChemSchematicResolver Documentation [Internet]. [cited 2020 Jun 24]. Available from: https://www.chemschematicresolver.org/docs/install
12.	Heller S, McNaught A, Stein S, Tchekhovskoi D, Pletnev I. InChI - the worldwide chemical structure identifier standard. J Cheminform. 2013 Jan 24;5(1):7.

## Authors
- [Kohulan](github.com/Kohulan)
- [Otto Brinkhaus](github.com/OBrink)

## Citation
- Use this bibtex to cite the work
```
@article{Rajan2020,
author = {Rajan, Kohulan and Brinkhaus, Henning Otto and Zielesny, Achim and Steinbeck, Christoph},
doi = {10.1186/s13321-020-00465-0},
file = {:Users/kohulanrajan/Downloads/s13321-020-00465-0.pdf:pdf},
issn = {1758-2946},
journal = {Journal of Cheminformatics},
keywords = {Chemical data extraction,Chemical structure,Data mining,Machine learning,Named entity recognition,Open data,Optical chemical structure recognition,chemical data extraction,chemical structure,data mining,machine learning,named entity recognition,open data,optical chemical structure recognition},
pages = {1--13},
publisher = {Springer International Publishing},
title = {{A review of optical chemical structure recognition tools}},
url = {https://doi.org/10.1186/s13321-020-00465-0},
year = {2020}
}
```

## More information about our research group
[![GitHub Logo](https://github.com/Kohulan/DECIMER-Image-to-SMILES/blob/master/assets/CheminfGit.png?raw=true)](https://cheminf.uni-jena.de)

## This work is part of the DECIMER project
[![GitHub Logo](https://github.com/Kohulan/DECIMER-Image-to-SMILES/raw/master/assets/DECIMER.gif)](https://kohulan.github.io/Decimer-Official-Site/)


text:
---
title: Don't forget about Open Graph
date: "2019-05-09T22:40:32.169Z"
author: "tterian"
description: OG tags will help you drive more traffic to your website.
tags: ["open graph", "helmet"]
---

[Open Graph](http://ogp.me/) protocol is a web standard originally developed by Facebook that turns any webpage into a graph object with title, description, image and so on. Even though there is no direct correlation between OG meta tags and improved SEO rankings, it still drives more traffic to your webpage by making it more "attractive" in social networks (Facebook, Twitter, Linkedin, etc).

An example of a link shared in Twitter that has og:image and og:title
<img src="./og-example.png" alt="og-tags" title="OG tag example" />

## Adding OG (and not only) meta tags into your React app

Without further due let's jump into newly created React app with `create-react-app` and OG meta tags to `/public/index.html`. It should look like something like this:

```html
<!DOCTYPE html>
<html>
   <head>
      <meta charSet="utf-8"/>
      <meta http-equiv="x-ua-compatible" content="ie=edge"/>
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
      <link rel="alternate" type="application/rss+xml" href="/rss.xml"/>
      <title>Awesome App</title>
      <meta property="og:title" content="Awesome app - the best app ever" />
      <meta property="og:type" content="website" />
      <meta property="og:image" content="https://picsum.photos/id/52/1200/600" />
      <meta property="og:description" content="Describe stuff here." />
      <meta property="og:url" content="yourawesomeapp.com" />
   </head>
   <body>
      <noscript>This app works best with JavaScript enabled.</noscript>
      <div id="root"></div>
   </body>
</html>
```

## Dynamic tags

Now, what if I need to generate tags dynamically for every page? That's easy!

We'll use [React Helmet](https://github.com/nfl/react-helmet). So let's create a separate component for document head management, which will dynamically set title, description, image for the page.

```Javascript
import React from 'react';
import Helmet from 'react-helmet';

function SEO({ pageProps }) {
  return (
    <Helmet>
      <title>{pageProps.title}</title>
      <meta property="og:title" content={pageProps.title} />
      <meta property="og:image" content={pageProps.thumbnail} />
      <meta property="og:url" content={pageProps.url} />
    </Helmet>
  )
}

export default SEO;
```

Wherever we want to set our meta tags, we'll just mount SEO component to necessary arguments just like

```Javascript
<SEO pageProps={
  title: "Yet another page",
  thumbnail="https://picsum.photos/id/52/1200/600",
  url="yetanotherawesomeapp.com" } />
```

*Reminder:* Please open a PR if you have any feedback/question/comment on this blog post. Thanks!

gha_language: JavaScript

gha_license_id: MIT


text:
# cased-go

A Cased client for Go applications in your organization to control and monitor the access of information within your organization.

![Build Status](https://github.com/cased/cased-go/workflows/cased/badge.svg)
[![go.dev](https://img.shields.io/badge/go.dev-pkg-007d9c.svg?style=flat)](https://pkg.go.dev/github.com/cased/cased-go)

## Overview

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
  - [Publishing events to Cased](#publishing-events-to-cased)
  - [Masking & filtering sensitive information](#masking--filtering-sensitive-information)
- [Contributing](#contributing)

## Installation

To make cased-go available for use in your package, run:

```sh
$ go get github.com/cased/cased-go
```

After installing the cased-go package and configuring cased-go, the first thing you'll want to do is start publishing audit events:

```go
package main

import "github.com/cased/cased-go"

func main() {
	p := cased.NewPublisher(
		cased.WithPublishKey("publish_test_1mY8qb355NWIa3uY00H2fk7elpT"),
	)
	cased.SetPublisher(p)

	ae := cased.AuditEvent{
		"action":          "user.login",
		"actor":           cased.NewSensitiveValue("John Doe", "username"),
		"actor_id":        "User;1",
		"organization":    "cased",
		"organization_id": "Organization;1",
	}
	cased.Publish(ae)

	fmt.Printf("%+v\n", ae)
}
```

cased-go publishes audit events asynchronously by default. To ensure no audit events are dropped at the end of your process, you'll want to make sure `cased.Flush` is called at some point in your shutdown process.

```go
package main

import "github.com/cased/cased-go"

func main() {
	p := cased.NewPublisher(
		cased.WithPublishKey("publish_test_1mY8qb355NWIa3uY00H2fk7elpT"),
	)
	cased.SetPublisher(p)

	// The process will wait 30 seconds to publish all events to Cased before
	// exiting the process.
	defer cased.Flush(30 * time.Second)

	ae := cased.AuditEvent{
		"action":          "user.login",
		"actor":           cased.NewSensitiveValue("John Doe", "username"),
		"actor_id":        "User;1",
		"organization":    "cased",
		"organization_id": "Organization;1",
	}
	cased.Publish(ae)

	fmt.Printf("%+v\n", ae)
}
```

You've now installed cased-go properly and have published your first event. For more details on [publishing audit events](#publishing-events-to-cased) and [protecting sensitive values](#masking--filtering-sensitive-information), keep reading on.

## Configuration

All configuration options available in cased-go are available to be configured by an environment variable or manually.

```go
package main

import (
	"net/http"
	"time"

	"github.com/cased/cased-go"
)

func main() {
	p := cased.NewPublisher(
		// CASED_PUBLISH_URL=https://publish.cased.com
		cased.WithPublishURL("https://publish.cased.com"),

		// CASED_PUBLISH_KEY=publish_live_1mY8qb355NWIa3uY00H2fk7elpT
		cased.WithPublishKey("publish_live_1mY8qb355NWIa3uY00H2fk7elpT"),

		// CASED_DEBUG=1
		cased.WithDebug(true),

		// CASED_SILENCE=1
		cased.WithSilence(true),

		// You can configure your own client or re-use an existing HTTP client from
		// your application.
		cased.WithHTTPClient(&http.Client{}),

		// You can configure your own transport or re-use an existing HTTP transport
		// from your application.
		cased.WithHTTPTransport(&http.Transport{}),

		// CASED_HTTP_TIMEOUT=10s
		cased.WithHTTPTimeout(10*time.Second),
		cased.WithTransport(cased.NewNoopHTTPTransport()),
	)
	cased.SetPublisher(p)

	// ...
}
```

## Usage

### Publishing events to Cased

There are two ways to publish your first Cased event.

**Manually**

```go
package user

import "github.com/cased/cased-go"

type Organization struct {
	ID   string
	Name string
}

type User struct {
	ID           string
	Username     string
	Organization Organization
}

func (u *User) login(password, passwordConfirmation string) error {
	ae := cased.AuditEvent{
		"action":          "user.login",
		"actor":           cased.NewSensitiveValue(u.Username, "username"),
		"actor_id":        u.ID,
		"organization":    u.Organization.Name,
		"organization_id": u.Organization.ID,
	}
	defer cased.Publish(ae)

	if password != passwordConfirmation {
		ae["action"] = "user.failed_login"
		return errors.New("invalid password")
	}

	return nil
}
```

### Masking & filtering sensitive information

If you are handling sensitive information on behalf of your users you should consider masking or filtering any sensitive information.

```go
package user

import "github.com/cased/cased-go"

type Address struct {
	Street  string
	City    string
	State   string
	ZipCode string
}

type User struct {
	ID       string
	Username string
	Address  *Address
}

func (a *Address) Create() error {
	cased.Publish(cased.AuditEvent{
		"action":   "address.create",
		"actor":    cased.NewSensitiveValue(u.Username, "username"),
		"actor_id": u.ID,
		"location": map[string]interface{}{
			"street":   cased.NewSensitiveValue(u.Address.Street, "street"),
			"city":     cased.NewSensitiveValue(u.Address.City, "city"),
			"state":    cased.NewSensitiveValue(u.Address.State, "state"),
			"zip_code": cased.NewSensitiveValue(u.Address.ZipCode, "zip-code"),
		},
	})

	return nil
}
```

### Disable publishing events

Although rare, there may be times where you wish to disable publishing events to Cased. You can configure it using an environment variable or in the client.

```go
package main

import (
	"net/http"
	"time"

	"github.com/cased/cased-go"
)

func main() {
	p := cased.NewPublisher(
		// CASED_SILENCE=1
		cased.WithSilence(true),
	)
	cased.SetPublisher(p)
	defer cased.Flush(10 * time.Second)

	// This audit event will not get published to Cased.
	cased.Publish(cased.AuditEvent{
		"action":             "user.login",
		"actor":              "dewski",
		"actor_id":           "user_1dsGbftbx1c47iU8c7BzUcKJRcD",
		"organization":       "Cased",
		"organization_id":    "org_1dsGTnNZLzgwb1alwS2szN0KUo5",
		"request_id":         "27d62d1869e5f9826acc6cfd80edca90",
		"request_url":        "https://app.cased.com/saml/consume",
		"request_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
	})
}
```

Or you can configure the entire process to disable publishing events.

```
CASED_SILENCE=1 go run main.go
```

## Contributing

1. Fork it ( https://github.com/cased/cased-go/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

repository: cased/cased-go

gha_language: Go

repo_name: cased/cased-go


text:
# Swift-TipCalculator

## Author

* **Author-name:** Michael Brennan
* **Author-email:**<EMAIL_ADDRESS>* **Github-username:** [UserMB](https://github.com/UserMB)
* **Copyright:** 2018 Michael Brennan
* **Category:** Development

## Terms of Use

This Project was developed as part of my college assignment and made available to help someone else working on a similar Swift
project.

## License

This project is licensed under the MIT License

repository: UserMB/Swift-TipCalculator

repo_name: UserMB/Swift-TipCalculator


text:
---
name: Bug report
about: Create a bug report to help us improve
title: "[BUG] Description"
labels: 'Issue: Bug'
assignees: ''

---

#### Bug Report Checklist

- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
- [ ] Have you searched for related issues/PRs?
- [ ] What's the actual output vs expected output?
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))

<!--
Please follow the issue template below for bug reports.
Also please indicate in the issue title which language/library is concerned. Eg:  [BUG][JAVA] Bug generating foo with bar
-->

##### Description

<!-- describe what is the question, suggestion or issue and why this is a problem for you. -->

##### openapi-generator version

<!-- which version of openapi-generator are you using, is it a regression? -->

##### OpenAPI declaration file content or url

<!-- if it is a bug, a json or yaml that produces it.
If you post the code inline, please wrap it with
```yaml
(here your code)
```
(for YAML code) or
```json
(here your code)
```
(for JSON code), so it becomes more readable. If it is longer than about ten lines,
please create a Gist (https://gist.github.com) or upload it somewhere else and
link it here.
  -->

##### Generation Details

<!--
    Prefer CLI steps, including the language, libraries and various options.
    Providing config-based settings allows for simpler testing across CLI and plugins.
    For examples, see https://github.com/OpenAPITools/openapi-generator/tree/master/bin/configs
-->

##### Steps to reproduce

<!-- unambiguous set of steps to reproduce the bug.-->

##### Related issues/PRs

<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/openapitools/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->

##### Suggest a fix

<!-- if you can't fix the bug yourself, perhaps you can point to what might be
  causing the problem (line of code or commit), or simply make a suggestion -->

repository: OpenAPITools/openapi-generator

gha_language: Java

repo_name: OpenAPITools/openapi-generator


text:
# Analysis results of positively selected sites from PAML

PAML was used to select the positive selected sites in gaur among 9 selected species.
Two scripts in the scripts folder are related to positive selection anlysis:

### 1. gaur_paml_branch_positive_selection.R
Read the log Likelihood vaules from PAML for Null and Alternative test model.
By calculating the [chi-squared distribution](https://www.researchgate.net/publication/254333395_Continuous_Univariate_Distributions_Volume_1) of the 2(NULL_logLikelihood  - Alternative_logLikelihood), the p-values were calculated for both sites.
The produced p-values were devied for one side.
### 2. gaur_paml_go_kegg_pathway_analysis.R
This script collected the cattle represented genes from the positive selection results to apply GO and KEGG pathway analysis.
### 3. gaur_find_genes_in_GO_terms.R
This script can find the significant genes that related to the GO terms.
This script has been used for GO results of both positive selection and gene gains/losses.

repository: Genorater/GaurAssemblyProject

repo_name: Genorater/GaurAssemblyProject


text:
Commit Guidelines
=================

We enforce certain rules on commits with the following goals in mind:

- Be able to reliably auto-generate the `CHANGELOG.md` *without* any human
intervention.
- Be able to automatically and correctly increment the semver version number
based on what was done since the last release.
- Be able to get a quick overview of what happened to the project by glancing
over the commit history.
- Be able to automatically reference relevant changes from a dependency
upgrade.

The guidelines are inspired by the [AngularJS git commit
guidelines][angular-commit-guidelines].

Commit structure
----------------

Each commit message consists of a header, a body and a footer. The header has a
special format that includes a type, a scope and a subject.

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The subject should not contain more than 70 characters, including the type and
scope, and the body should be wrapped at 72 characters.

Type
----

Must be one of the following:

- `feat`: A new feature.
- `fix`: A bug fix.
- `minifix`: A minimal fix that doesn't warrant an entry in the CHANGELOG.
- `docs`: Documentation only changes.
- `style`: Changes that do not affect the meaning of the code (white-space,
formatting, missing semi-colons, JSDoc annotations, comments, etc).
- `refactor`: A code change that neither fixes a bug nor adds a feature.
- `perf`: A code change that improves performance.
- `test`: Adding missing tests.
- `chore`: Changes to the build process or auxiliary tools and libraries.
- `upgrade`: A version upgrade of a project dependency.

Scope
-----

The scope is required for types that make sense, such as `feat`, `fix`,
`test`, etc. Certain commit types, such as `chore` might not have a clearly
defined scope, in which case its better to omit it.

When it applies, the scope must be either `GUI` or `CLI`.

A commit that takes part in both the GUI and CLI scopes, and makes more logical
sense that way, might entirely omit the scope.

Subject
-------

The subject should contain a short description of the change:

- Use the imperative, present tense.
- Don't capitalize the first letter.
- No dot (.) at the end.

Footer
------

The footer contains extra information about the commit, such as tags.

**Breaking Changes** should start with the word BREAKING CHANGE: with a space
or two newlines. The rest of the commit message is then used for this.

Tags
----

### `See: <url>`/`Link: <url>`

This tag can be used to reference a resource that is relevant to the commit,
and can be repeated multiple times in the same commit.

Resource examples include:

- A link to pull requests.
- A link to a GitHub issue.
- A link to a website providing useful information.
- A commit hash.

Its recommended that you avoid relative URLs, and that you include the whole
commit hash to avoid any potential ambiguity issues in the future.

If the commit type equals `upgrade`, this tag should be present, and should
link to the CHANGELOG section of the dependency describing the changes
introduced from the previously used version.

Examples:

```
See: https://github.com/xxx/yyy/
See: 49d89b4acebd80838303b011d30517cd6229fdbe
Link: https://github.com/xxx/yyy/issues/zzz
```

### `Closes: <url>`/`Fixes: <url>`

This tag is used to make GitHub close the referenced issue automatically when
the commit is merged.

Its recommended that you provide the absolute URL to the GitHub issue rather
than simply writing the ID prefixed by a hash tag for convenience when browsing
the commit history outside the GitHub web interface.

A commit can include multiple instances of this tag.

Examples:

```
Closes: https://github.com/resin-io/etcher/issues/XXX
Fixes: https://github.com/resin-io/etcher/issues/XXX
```

### `Change-Type: <type>`

This tag is used to determine the change type that a commit introduces. The
following types are supported:

- `major`
- `minor`
- `patch`

This tag can be omitted for commits that don't change the application from the
user's point of view, such as for refactoring commits.

Examples:

```
Change-Type: major
Change-Type: minor
Change-Type: patch
```

See the [Semantic Versioning][semver] specification for a more detailed
explanation of the meaning of these types.

### `Changelog-Entry: <message>`

This tag is used to describe the changes introduced by the commit in a more
human style that would fit the `CHANGELOG.md` better.

If the commit type is either `fix` or `feat`, the commit will take part in the
CHANGELOG. If this tag is not defined, then the commit subject will be used
instead.

You explicitly can use this tag to make a commit whose type is not `fix` nor
`feat` appear in the `CHANGELOG.md`.

Since whatever your write here will be shown *as it is* in the `CHANGELOG.md`,
take some time to write a decent entry. Consider the following guidelines:

- Use the imperative, present tense.
- Capitalize the first letter.

There is no fixed length limit for the contents of this tag, but always strive
to make as short as possible without compromising its quality.

Examples:

```
Changelog-Entry: Fix EPERM errors when flashing to a GPT drive.
```

Complete examples
-----------------

```
fix(GUI): ignore extensions before the first non-compressed extension

Currently, we extract all the extensions from an image path and report back
that the image is invalid if *any* of the extensions is not valid , however
this can cause trouble with images including information between dots that are
not strictly extensions, for example:

    elementaryos-0.3.2-stable-i386.20151209.iso

Etcher will consider `20151209` to be an invalid extension and therefore
will prevent such image from being selected at all.

As a way to allow these corner cases but still make use of our enforced check
controls, the validation routine now only consider extensions starting from the
first non compressed extension.

Change-Type: patch
Changelog-Entry: Don't interpret image file name information between dots as image extensions.
Fixes: https://github.com/resin-io/etcher/issues/492
```

***

```
upgrade: etcher-image-write to v5.0.2

This version contains a fix to an `EPERM` issue happening to some Windows user,
triggered by the `write` system call during the first ~5% of a flash given that
the operating system still thinks the drive has a file system.

Change-Type: patch
Changelog-Entry: Upgrade `etcher-image-write` to v5.0.2.
Link: https://github.com/resin-io-modules/etcher-image-write/blob/master/CHANGELOG.md#502---2016-06-27
Fixes: https://github.com/resin-io/etcher/issues/531
```

***

```
feat(GUI): implement update notifier functionality

Auto-update functionality is not ready for usage. As a workaround to
prevent users staying with older versions, we now check for updates at
startup, and if the user is not running the latest version, we present a
modal informing the user of the availiblity of a new version, and
provide a call to action to open the Etcher website in his web browser.

Extra features:

- The user can skip the update, and tell the program to delay the
notification for 7 days.

Misc changes:

- Center modal with flexbox, to allow more flexibility on the modal height.
interacting with the S3 server.
- Implement `ManifestBindService`, which now serves as a backend for the
`manifest-bind` directive to allow the directive's functionality to be
re-used by other services.
- Namespace checkbox styles that are specific to the settings page.

Change-Type: minor
Changelog-Entry: Check for updates and show a modal prompting the user to download the latest version.
Closes: https://github.com/resin-io/etcher/issues/396
```

[angular-commit-guidelines]: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit
[semver]: http://semver.org

repository: enterstudio/etcher

repo_name: enterstudio/etcher


text:
# Clockwork Raven [![Build Status](https://secure.travis-ci.org/twitter/clockworkraven.png)](http://travis-ci.org/twitter/clockworkraven) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/twitter/clockworkraven)

## Human-Powered Data Analysis

Clockwork Raven is a web application that allows users to easily submit data
to Mechanical Turk for manual review, and then analyze that data. Clockwork Raven is
actively used at Twitter to gather tens of thousands of judgments from Mechanical Turk
users weekly.

### What it is good for

Clockwork Raven is designed for individuals, or organizations that share a
single Mechanical Turk account. It allows users to authenticate with LDAP or
with accounts created through Clockwork Raven. Users can then upload data,
design forms to send to Mechanical Turk through a simple, drag-and-drop
interface, submit these forms to Mechanical Turk, and review the results.

Administrators can separate users into "privileged" and "unprivileged" sets
manually or based on LDAP groups. Unprivileged uses are not allowed to spend
money, but can submit evaluations to the Mechanical Turk sandbox to test out
the system, and can design evaluations and ask a privileged user to submit
the evaluation on his or her behalf.

To help control the quality of responses, Clockwork Raven allows you to restrict
the tasks you send to Mechanical Turk to only those users who Mechanical Turk
has deemed "Categorization Masters", or to only those users who you have marked
as Trusted in Clockwork Raven.

### What it is not good for

Clockwork Raven is designed for situations where **everyone who has access to
the system is relatively trusted.** Because the form designer allows users to
use arbitrary HTML, anyone with access to the system could execute an
[XSS](http://en.wikipedia.org/wiki/Cross-site_scripting) attack and compromise
the system.

However, Clockwork Raven will not give access to users unless they are part of
white-listed LDAP groups or have been explicitly granted access. Users cannot
create accounts for themselves.

## Setup

1. Check out the code from https://github.com/twitter/clockworkraven
2. Requirements:
    1. Make sure the machine that you're using has Ruby 1.9.3
       installed. The easiest way to install and manage Ruby is with
       [RVM](https://rvm.io/).
    2. You'll need the RubyGem "bundler" installed, and then just run `bundle
       install` from the Clockwork Raven directory to install all of the
       libraries needed by Clockwork Raven.
    3. Clockwork Raven uses [Resque](https://github.com/defunkt/resque/) to run
       tasks in the background. Resque requires a Redis server -- see
       [Resque's instructions for installing Redis](https://github.com/defunkt/resque/#installing-redis).
       By default Clockwork Raven assumes your Redis server is running on
       `localhost:6379`. If this isn't the case, edit `config/resque.yml`.
    4. In a production environment (e.g. any environment where Clockwork
       Raven will be accessible to users), it should be run over SSL to protect
       users' credentials when they log in. If you don't use SSL, these
       credentials will be sent over the network in the clear!
3. Configure:
    1. Generate a secret key. Copy `config/secret.example.yml` to
       `config/secret.yml`. Then, run `rake secret` and copy the output to
       `config/secret.yml`.
    2. Copy `config/database.example.yml` to `config/database.yml` and modify it
       to point to your MySQL database. Currently, Clockwork Raven only supports
       MySQL.
    3. Copy `config/mturk.example.yml` to `config/mturk.yml`. Follow the
       instructions in that file to connect Clockwork Raven to your Mechanical
       Turk account.
    4. Configure authentication:

       **LDAP Authentication**

       LDAP authentication is the recommended way to manage account in Clockwork
       Raven. If your LDAP server supports SSL/TLS, copy
       `config/auth.example_ldap_encrypted.yml` to `config/auth.yml`. If your LDAP
       server does not, copy `config/auth.example_ldap_unencrypted.yml`
       to `config/auth.yml`. Follow the instructions in that file to connect
       Clockwork Raven to your LDAP server and grant access to specific LDAP
       groups and users.

       **Password Authentication**

       If you can't use an LDAP server, you can configure Clockwork Raven to use
       "password authentication," which will allow you to manually create
       accounts. Copy `config/auth.example_password.yml` to `config/auth.yml`. Then,
       you can create accounts by running "rake users:add" and change passwords
       with `rake users:change_password`. Note that you will need to set up your
       database (explained below) before using these rake tasks.
4. Set up the database. If the databases you configured Clockwork Raven to use in
   `config/database.yml` do not exist, run `rake db:create` to create them.
   Then, run `rake db:structure:load` to load the database structure into your
   database.
5. Start up the background workers. Just
   run `rake raven:resque` to start up 4 background workers. You can start
   up more background workers by passing an argument to the rake task:
   `rake raven:resque[16]` will start up 16 background workers.
6. Run the server. To run the server, run `rails server`.

## Documentation

Documentation is available on the
[wiki](https://github.com/twitter/clockworkraven/wiki).

## Contact

Follow [@clockworkraven](https://twitter.com/clockworkraven) for updates and
notifications. Submit bug report and feature requests to the
[issue tracker](https://github.com/twitter/clockworkraven/issues).

Join the mailing list,
[twitter-clockworkraven@googlegroups.com](mailto:twitter-clockworkraven@googlegroups.com),
on
[Google Groups](http://groups.google.com/group/twitter-clockworkraven) to
ask questions and discuss development.

## Roadmap

We would love any help adding ideas or implementing them!

* JSON/REST API.
* Provide the option to have multiple Mechanical Turk users complete each task.
* Provide in-depth analytics about workers and automate the process of choosing
  trusted workers.

## Contributing

To contribute to Clockwork Raven, fork the repo, make your changes, and
submit a pull request. All pull requests should be against `*-wip` branches.
Nothing gets committed/merged directly to master. To merge your pull request,
you'll need to include appropriate documentation and tests. Get in touch if you
have any questions about what you need to do to get your contributions accepted.

## Authors

* Ben Weissmann, [@benweissmann](https://twitter.com/benweissmann)
* Edwin Chen, [@echen](https://twitter.com/echen)
* Dave Buchfuhrer, [@daveFNbuck](https://twitter.com/daveFNbuck)

## Versioning

The current version is in the VERSION file and accessible in the code as
ClockworkRaven::VERSION. Releases will be tagged with their release number in
Git.

Clockwork Raven uses [semantic versioning](http://semver.org). Basically,
this means that versions will be of the form X.Y.Z, where X is the major version
(incremented when backwards-incompatible changes are introduced), Y is the minor
version (incremented when backwards-compatible features are introduced), and X
is the patch number (incremented when backwards-compatible bug fixes are
introduced). Note, however, that these are only hard rules once Clockwork Raven
reaches 1.x. Until then, we will do our best to adhere to these policies
(particularly with regards to not introducing backwards-incompatible changes in
patch releases), but we may make backwards-incompatible changes while only
incrementing the minor version number.

## License

Copyright 2012 Twitter, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

repository: echen/clockworkraven

repo_name: echen/clockworkraven


text:
# Poggers Bot

Downloaded: `deno run --allow-net --allow-read=config.json,poggers.json --allow-write=poggers.json app.ts`

Without downloading: `deno run --allow-net --allow-read=config.json,poggers.json --allow-write=poggers.json https://denopkg.com/The-Noah/poggers-bot/app.ts`

## `config.json`

You must have a Discord application for the bot. You can create a new one [here](https://discord.com/developers/applications).

| Property   | Description |
| ---------- | ----------- |
| `clientId` | Client ID of Discord application. |
| `token`    | Token of Discord application bot. |
| `interval` | How often to send messages (in seconds). |

[MIT License](LICENSE).

repository: The-Noah/poggers-bot

repo_name: The-Noah/poggers-bot


text:
---
name: Bug Report
about: Report runtime errors or wrong PDF output
---

# Bug Report

## Description of the problem

## Code sample
<!-- Post code or a link to a live example (can fork from https://repl.it/@blikblum/minimal-pdfkit) that reproduces the issue -->

## Your environment

* pdfkit version:
* Node version:
* Browser version (if applicable):
* Operating System:

repository: blikblum/pdfkit

repo_name: blikblum/pdfkit


text:
# PnlAITk
Part of my covid project and part of my long obsession with predictive markets, I have created a web page that displays and allows to compare best and worse performing trading strategies.

TL;DR List of top trading algo gainers and losers.

## Product
Typically the trading newsletters and stock-scanners display only price return for top market gainers and losers. I was also interested in inspecting top and bottom performing trading strategies for given set of securities and could not find any websites that do that. So I decided to create a tool of my own.

Top and bottom performing securities do not tell you if stock is going to go up or down, but they alert you of rapidly changing market conditions, such as change in competitive landscape, impending lawsuit, changes in company management and in the least the stocks you should avoid in your programmatic trading.

Top strategies also do all that, and in addition they can also alert you to a change in the market regime. The most important to me feature however was the actual understanding of trading strategies through observing their performance on live data. I wanted to be able to easily backtest them, change parameters on the fly and see how they change, before choosing my ultimate trading strategy.

I wanted the tool that would help me to answer questions like if there is a better strategy than buy and hold, should I follow greed and fear indicator of the market or do the opposite. The market player who detect change in the market conditions first will reap most benefits. This is idea behind this tool, at least in theory.

## Description
The tool of our website also allows you to customize parameters of existing strategies and essentially create your own strategy and seeing how it will compare to the set of original strategies.

http://ec2-54-185-19-38.us-west-2.compute.amazonaws.com:5006/srv

* In the section above you can specify security and data range.
* In the section below you can choose strategy to customize and modify it's parameters.
* The strategy comparison table will automatically update and will display a newly created strategy side by side with the original strategies.

## Technology
The tool is developed on bokeh and python and allows you to edit configuration parameters of each strategy all without programming knowledge.

The strategies are fully specified via key/value pairs in the format of ini files used to initialize programs. The strategy classes are autogenerated by reading the ini config files dynamically using "factory" pattern.

You can find a simplified code in this github repo: https://github.com/varturas/PnlAITk

## Next Steps
In the future I want to give users ability to monitor their chosen strategy by receiving trading algo alerts whenever performance of their custom trading algo is changes significantly.
You can receive daily newsletter with the list of trading strategies generated by above-mentioned web-tool by registering on http://pnl.ai/ and checking subscribe checkmark.

repository: varturas/PnlAITk

repo_name: varturas/PnlAITk


text:
# Minist Tutorial

Use [Keras.io](https://keras.io/) to code a simple CNN network for tutorial purpose.

## Result

After 5 epochs of training on MNIST training dataset and evaluating using MNIST test dataset:

    Loss: 0.1663	Accuracy: 0.9476

## Before Start

1. Make sure you have properly installed TensorFlow as Keras uses it for backend computation
2. Make sure you have installed Keras: `pip install keras`
3. If you are on a Mac and encounter problem when trying to download the MNIST dataset, go to `~/Application/YOUR-PYTHON` in finder and double click `Install Certificates.command` to properly install SSL certificate

## Neural Network Structure

    _________________________________________________________________
    Layer (type)                 Output Shape              Param #
    =================================================================
    input_1 (InputLayer)         (None, 28, 28)            0
    _________________________________________________________________
    reshape_1 (Reshape)          (None, 28, 28, 1)         0
    _________________________________________________________________
    conv2d_1 (Conv2D)            (None, 28, 28, 4)         40
    _________________________________________________________________
    max_pooling2d_1 (MaxPooling2 (None, 14, 14, 4)         0
    _________________________________________________________________
    conv2d_2 (Conv2D)            (None, 14, 14, 4)         148
    _________________________________________________________________
    max_pooling2d_2 (MaxPooling2 (None, 7, 7, 4)           0
    _________________________________________________________________
    conv2d_3 (Conv2D)            (None, 7, 7, 8)           296
    _________________________________________________________________
    max_pooling2d_3 (MaxPooling2 (None, 3, 3, 8)           0
    _________________________________________________________________
    conv2d_4 (Conv2D)            (None, 3, 3, 8)           584
    _________________________________________________________________
    max_pooling2d_4 (MaxPooling2 (None, 1, 1, 8)           0
    _________________________________________________________________
    flatten_1 (Flatten)          (None, 8)                 0
    _________________________________________________________________
    dense_1 (Dense)              (None, 32)                288
    _________________________________________________________________
    dense_2 (Dense)              (None, 10)                330
    =================================================================
    Total params: 1,686
    Trainable params: 1,686
    Non-trainable params: 0
    _________________________________________________________________

repository: William-An/keras-mnist

repo_name: William-An/keras-mnist


text:
# postgres

postgres — PostgreSQL database server

### Synopsis

`postgres` \[_`option`_...]

### Description

`postgres` is the PostgreSQL database server. In order for a client application to access a database it connects (over a network or locally) to a running `postgres` instance. The `postgres`instance then starts a separate server process to handle the connection.

One `postgres` instance always manages the data of exactly one database cluster. A database cluster is a collection of databases that is stored at a common file system location (the “data area”). More than one `postgres` instance can run on a system at one time, so long as they use different data areas and different communication ports (see below). When `postgres`starts it needs to know the location of the data area. The location must be specified by the `-D` option or the `PGDATA` environment variable; there is no default. Typically, `-D` or `PGDATA`points directly to the data area directory created by [initdb](https://www.postgresql.org/docs/10/static/app-initdb.html). Other possible file layouts are discussed in [Section 19.2](https://www.postgresql.org/docs/10/static/runtime-config-file-locations.html).

By default `postgres` starts in the foreground and prints log messages to the standard error stream. In practical applications `postgres` should be started as a background process, perhaps at boot time.

The `postgres` command can also be called in single-user mode. The primary use for this mode is during bootstrapping by [initdb](https://www.postgresql.org/docs/10/static/app-initdb.html). Sometimes it is used for debugging or disaster recovery; note that running a single-user server is not truly suitable for debugging the server, since no realistic interprocess communication and locking will happen. When invoked in single-user mode from the shell, the user can enter queries and the results will be printed to the screen, but in a form that is more useful for developers than end users. In the single-user mode, the session user will be set to the user with ID 1, and implicit superuser powers are granted to this user. This user does not actually have to exist, so the single-user mode can be used to manually recover from certain kinds of accidental damage to the system catalogs.

### Options

`postgres` accepts the following command-line arguments. For a detailed discussion of the options consult [Chapter 19](https://www.postgresql.org/docs/10/static/runtime-config.html). You can save typing most of these options by setting up a configuration file. Some (safe) options can also be set from the connecting client in an application-dependent way to apply only for that session. For example, if the environment variable `PGOPTIONS` is set, then libpq-based clients will pass that string to the server, which will interpret it as `postgres` command-line options.

#### General Purpose

`-B `_`nbuffers`_

Sets the number of shared buffers for use by the server processes. The default value of this parameter is chosen automatically by initdb. Specifying this option is equivalent to setting the [shared\_buffers](https://www.postgresql.org/docs/10/static/runtime-config-resource.html#GUC-SHARED-BUFFERS) configuration parameter.

`-c `_`name`_=_`value`_

Sets a named run-time parameter. The configuration parameters supported by PostgreSQL are described in [Chapter 19](https://www.postgresql.org/docs/10/static/runtime-config.html). Most of the other command line options are in fact short forms of such a parameter assignment. `-c` can appear multiple times to set multiple parameters.

`-C `_`name`_

Prints the value of the named run-time parameter, and exits. (See the `-c` option above for details.) This can be used on a running server, and returns values from`postgresql.conf`, modified by any parameters supplied in this invocation. It does not reflect parameters supplied when the cluster was started.

This option is meant for other programs that interact with a server instance, such as [pg\_ctl](https://www.postgresql.org/docs/10/static/app-pg-ctl.html), to query configuration parameter values. User-facing applications should instead use[SHOW](https://www.postgresql.org/docs/10/static/sql-show.html) or the `pg_settings` view.

`-d `_`debug-level`_

Sets the debug level. The higher this value is set, the more debugging output is written to the server log. Values are from 1 to 5. It is also possible to pass `-d 0` for a specific session, which will prevent the server log level of the parent `postgres` process from being propagated to this session.

`-D `_`datadir`_

Specifies the file system location of the database configuration files. See [Section 19.2](https://www.postgresql.org/docs/10/static/runtime-config-file-locations.html) for details.

`-e`

Sets the default date style to “European”, that is `DMY` ordering of input date fields. This also causes the day to be printed before the month in certain date output formats. See [Section 8.5](https://www.postgresql.org/docs/10/static/datatype-datetime.html) for more information.

`-F`

Disables `fsync` calls for improved performance, at the risk of data corruption in the event of a system crash. Specifying this option is equivalent to disabling the [fsync](https://www.postgresql.org/docs/10/static/runtime-config-wal.html#GUC-FSYNC)configuration parameter. Read the detailed documentation before using this!

`-h `_`hostname`_

Specifies the IP host name or address on which `postgres` is to listen for TCP/IP connections from client applications. The value can also be a comma-separated list of addresses, or `*` to specify listening on all available interfaces. An empty value specifies not listening on any IP addresses, in which case only Unix-domain sockets can be used to connect to the server. Defaults to listening only on localhost. Specifying this option is equivalent to setting the [listen\_addresses](https://www.postgresql.org/docs/10/static/runtime-config-connection.html#GUC-LISTEN-ADDRESSES) configuration parameter.

`-i`

Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting `listen_addresses` to `*` in `postgresql.conf` or via `-h`.

This option is deprecated since it does not allow access to the full functionality of [listen\_addresses](https://www.postgresql.org/docs/10/static/runtime-config-connection.html#GUC-LISTEN-ADDRESSES). It's usually better to set `listen_addresses` directly.

`-k `_`directory`_

Specifies the directory of the Unix-domain socket on which `postgres` is to listen for connections from client applications. The value can also be a comma-separated list of directories. An empty value specifies not listening on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server. The default value is normally `/tmp`, but that can be changed at build time. Specifying this option is equivalent to setting the [unix\_socket\_directories](https://www.postgresql.org/docs/10/static/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES) configuration parameter.

`-l`

Enables secure connections using SSL. PostgreSQL must have been compiled with support for SSL for this option to be available. For more information on using SSL, refer to [Section 18.9](https://www.postgresql.org/docs/10/static/ssl-tcp.html).

`-N `_`max-connections`_

Sets the maximum number of client connections that this server will accept. The default value of this parameter is chosen automatically by initdb. Specifying this option is equivalent to setting the [max\_connections](https://www.postgresql.org/docs/10/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS) configuration parameter.

`-o `_`extra-options`_

The command-line-style arguments specified in _`extra-options`_ are passed to all server processes started by this `postgres` process.

Spaces within _`extra-options`_ are considered to separate arguments, unless escaped with a backslash (`\`); write `\\` to represent a literal backslash. Multiple arguments can also be specified via multiple uses of `-o`.

The use of this option is obsolete; all command-line options for server processes can be specified directly on the `postgres` command line.

`-p `_`port`_

Specifies the TCP/IP port or local Unix domain socket file extension on which `postgres` is to listen for connections from client applications. Defaults to the value of the `PGPORT`environment variable, or if `PGPORT` is not set, then defaults to the value established during compilation (normally 5432). If you specify a port other than the default port, then all client applications must specify the same port using either command-line options or `PGPORT`.

`-s`

Print time information and other statistics at the end of each command. This is useful for benchmarking or for use in tuning the number of buffers.

`-S` _`work-mem`_

Specifies the amount of memory to be used by internal sorts and hashes before resorting to temporary disk files. See the description of the `work_mem` configuration parameter in [Section 19.4.1](https://www.postgresql.org/docs/10/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY).

`-V`\
`--version`

Print the postgres version and exit.

`--`_`name`_=_`value`_

Sets a named run-time parameter; a shorter form of `-c`.

`--describe-config`

This option dumps out the server's internal configuration variables, descriptions, and defaults in tab-delimited `COPY` format. It is designed primarily for use by administration tools.

`-?`\
`--help`

Show help about postgres command line arguments, and exit.

#### Semi-internal Options

The options described here are used mainly for debugging purposes, and in some cases to assist with recovery of severely damaged databases. There should be no reason to use them in a production database setup. They are listed here only for use by PostgreSQL system developers. Furthermore, these options might change or be removed in a future release without notice.

`-f` `{ s | i | o | b | t | n | m | h }`

Forbids the use of particular scan and join methods: `s` and `i` disable sequential and index scans respectively, `o`, `b` and `t` disable index-only scans, bitmap index scans, and TID scans respectively, while `n`, `m`, and `h` disable nested-loop, merge and hash joins respectively.

Neither sequential scans nor nested-loop joins can be disabled completely; the `-fs` and `-fn` options simply discourage the optimizer from using those plan types if it has any other alternative.

`-n`

This option is for debugging problems that cause a server process to die abnormally. The ordinary strategy in this situation is to notify all other server processes that they must terminate and then reinitialize the shared memory and semaphores. This is because an errant server process could have corrupted some shared state before terminating. This option specifies that `postgres` will not reinitialize shared data structures. A knowledgeable system programmer can then use a debugger to examine shared memory and semaphore state.

`-O`

Allows the structure of system tables to be modified. This is used by `initdb`.

`-P`

Ignore system indexes when reading system tables, but still update the indexes when modifying the tables. This is useful when recovering from damaged system indexes.

`-t` `pa[rser] | pl[anner] | e[xecutor]`

Print timing statistics for each query relating to each of the major system modules. This option cannot be used together with the `-s` option.`-T`

This option is for debugging problems that cause a server process to die abnormally. The ordinary strategy in this situation is to notify all other server processes that they must terminate and then reinitialize the shared memory and semaphores. This is because an errant server process could have corrupted some shared state before terminating. This option specifies that `postgres` will stop all other server processes by sending the signal `SIGSTOP`, but will not cause them to terminate. This permits system programmers to collect core dumps from all server processes by hand.

`-v` _`protocol`_

Specifies the version number of the frontend/backend protocol to be used for a particular session. This option is for internal use only.

`-W` _`seconds`_

A delay of this many seconds occurs when a new server process is started, after it conducts the authentication procedure. This is intended to give an opportunity to attach to the server process with a debugger.

#### Options for Single-User Mode

The following options only apply to the single-user mode (see [Single-User Mode](https://www.postgresql.org/docs/10/static/app-postgres.html#APP-POSTGRES-SINGLE-USER)).

`--single`

Selects the single-user mode. This must be the first argument on the command line.

_`database`_

Specifies the name of the database to be accessed. This must be the last argument on the command line. If it is omitted it defaults to the user name.

`-E`

Echo all commands to standard output before executing them.

`-j`

Use semicolon followed by two newlines, rather than just newline, as the command entry terminator.

`-r` _`filename`_

Send all server log output to _`filename`_. This option is only honored when supplied as a command-line option.

### Environment

`PGCLIENTENCODING`

Default character encoding used by clients. (The clients can override this individually.) This value can also be set in the configuration file.

`PGDATA`

Default data directory location

`PGDATESTYLE`

Default value of the [DateStyle](https://www.postgresql.org/docs/10/static/runtime-config-client.html#GUC-DATESTYLE) run-time parameter. (The use of this environment variable is deprecated.)

`PGPORT`

Default port number (preferably set in the configuration file)

### Diagnostics

A failure message mentioning `semget` or `shmget` probably indicates you need to configure your kernel to provide adequate shared memory and semaphores. For more discussion see [Section 18.4](https://www.postgresql.org/docs/10/static/kernel-resources.html). You might be able to postpone reconfiguring your kernel by decreasing [shared\_buffers](https://www.postgresql.org/docs/10/static/runtime-config-resource.html#GUC-SHARED-BUFFERS) to reduce the shared memory consumption of PostgreSQL, and/or by reducing [max\_connections](https://www.postgresql.org/docs/10/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS) to reduce the semaphore consumption.

A failure message suggesting that another server is already running should be checked carefully, for example by using the command

```
$ ps ax | grep postgres
```

or

```
$ ps -ef | grep postgres
```

depending on your system. If you are certain that no conflicting server is running, you can remove the lock file mentioned in the message and try again.

A failure message indicating inability to bind to a port might indicate that that port is already in use by some non-PostgreSQL process. You might also get this error if you terminate `postgres` and immediately restart it using the same port; in this case, you must simply wait a few seconds until the operating system closes the port before trying again. Finally, you might get this error if you specify a port number that your operating system considers to be reserved. For example, many versions of Unix consider port numbers under 1024 to be “trusted” and only permit the Unix superuser to access them.

### Notes

The utility command [pg\_ctl](https://www.postgresql.org/docs/10/static/app-pg-ctl.html) can be used to start and shut down the `postgres` server safely and comfortably.

If at all possible, _do not_ use `SIGKILL` to kill the main `postgres` server. Doing so will prevent `postgres` from freeing the system resources (e.g., shared memory and semaphores) that it holds before terminating. This might cause problems for starting a fresh `postgres` run.

To terminate the `postgres` server normally, the signals `SIGTERM`, `SIGINT`, or `SIGQUIT` can be used. The first will wait for all clients to terminate before quitting, the second will forcefully disconnect all clients, and the third will quit immediately without proper shutdown, resulting in a recovery run during restart.

The `SIGHUP` signal will reload the server configuration files. It is also possible to send `SIGHUP` to an individual server process, but that is usually not sensible.

To cancel a running query, send the `SIGINT` signal to the process running that command. To terminate a backend process cleanly, send `SIGTERM` to that process. See also `pg_cancel_backend` and `pg_terminate_backend` in [Section 9.26.2](https://www.postgresql.org/docs/10/static/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL) for the SQL-callable equivalents of these two actions.

The `postgres` server uses `SIGQUIT` to tell subordinate server processes to terminate without normal cleanup. This signal _should not_ be used by users. It is also unwise to send `SIGKILL`to a server process — the main `postgres` process will interpret this as a crash and will force all the sibling processes to quit as part of its standard crash-recovery procedure.

### Bugs

The `--` options will not work on FreeBSD or OpenBSD. Use `-c` instead. This is a bug in the affected operating systems; a future release of PostgreSQL will provide a workaround if this is not fixed.

### Single-User Mode

To start a single-user mode server, use a command like

```
postgres --single -D /usr/local/pgsql/data other-options my_database
```

Provide the correct path to the database directory with `-D`, or make sure that the environment variable `PGDATA` is set. Also specify the name of the particular database you want to work in.

Normally, the single-user mode server treats newline as the command entry terminator; there is no intelligence about semicolons, as there is in psql. To continue a command across multiple lines, you must type backslash just before each newline except the last one. The backslash and adjacent newline are both dropped from the input command. Note that this will happen even when within a string literal or comment.

But if you use the `-j` command line switch, a single newline does not terminate command entry; instead, the sequence semicolon-newline-newline does. That is, type a semicolon immediately followed by a completely empty line. Backslash-newline is not treated specially in this mode. Again, there is no intelligence about such a sequence appearing within a string literal or comment.

In either input mode, if you type a semicolon that is not just before or part of a command entry terminator, it is considered a command separator. When you do type a command entry terminator, the multiple statements you've entered will be executed as a single transaction.

To quit the session, type EOF (**Control**+**D**, usually). If you've entered any text since the last command entry terminator, then EOF will be taken as a command entry terminator, and another EOF will be needed to exit.

Note that the single-user mode server does not provide sophisticated line-editing features (no command history, for example). Single-user mode also does not do any background processing, such as automatic checkpoints or replication.

### Examples

To start `postgres` in the background using default values, type:

```
$ nohup postgres >logfile 2>&1 </dev/null &
```

To start `postgres` with a specific port, e.g. 1234:

```
$ postgres -p 1234
```

To connect to this server using psql, specify this port with the -p option:

```
$ psql -p 1234
```

or set the environment variable `PGPORT`:

```
$ export PGPORT=1234
$ psql
```

Named run-time parameters can be set in either of these styles:

```
$ postgres -c work_mem=1234
$ postgres --work-mem=1234
```

Either form overrides whatever setting might exist for `work_mem` in `postgresql.conf`. Notice that underscores in parameter names can be written as either underscore or dash on the command line. Except for short-term experiments, it's probably better practice to edit the setting in `postgresql.conf` than to rely on a command-line switch to set a parameter.

### See Also

[initdb](https://www.postgresql.org/docs/10/static/app-initdb.html), [pg\_ctl](https://www.postgresql.org/docs/10/static/app-pg-ctl.html)\

repository: pgsql-tw/gitbook-docs

gha_language: HTML

repo_name: pgsql-tw/gitbook-docs


text:
# image-2-pdf

## Convert Image to PDF [live site](https://subrat-lima.github.io/image-2-pdf)

[jsPDF](https://github.com/MrRio/jsPDF) library is used to convert image to pdf.

The pdf file name is same as the name of the image uploaded.

Note:
For multiple images in a single document, file name of the recent selected image is used as pdf file name. For proper naming, please add numbering to those images at the end with a `"-"`  as separator in the following format.

ex: **`image-file-1.jpg`**, **`image-file-2.jpg`**, **`image-file-3.jpg`**

Here, in this case. The pdf file will be saved as **`image-file.pdf`**