text:
---
jupyter:
  jupytext:
    formats: ipynb,md
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.3'
      jupytext_version: 1.13.0
  kernelspec:
    display_name: Python 3 (ipykernel)
    language: python
    name: python3
---

(installation)=

# How to install napari on your machine

Welcome to the **napari** installation guide!

This guide will teach you how to do a clean install of **napari** and launch the viewer.

```{note}
If you want to contribute code back into napari, you should follow the [development installation instructions in the contributing guide](https://napari.org/developers/contributing.html) instead.
```

## Prerequisites

Prerequisites differ depending on how you want to install napari.

### Prerequisites for installing napari as a Python package
This installation method allows you to use napari from Python to programmatically
interact with the app. It is the best way to install napari and make full use of
all its features.

It requires:
- [Python 3.8 or higher](https://www.python.org/downloads/)
- the ability to install python packages via [pip](https://pypi.org/project/pip/) OR [conda-forge](https://conda-forge.org/docs/user/introduction.html)

You may also want:
- an environment manager like [conda](https://docs.conda.io/en/latest/miniconda.html) or
[venv](https://docs.python.org/3/library/venv.html) **(Highly recommended)**

### Prerequisites for installing napari as a bundled app
This is the easiest way to install napari if you only wish to use it as a standalone GUI app.
This installation method does not have any prerequisites.

```{important}
Note that the bundled app is still
in active development, and may not be very stable. We strongly recommend
[installing as a Python package instead](#install-as-python-package-recommended).
```

[Click here](#install-as-a-bundled-app) to see instructions
for installing the bundled app.

## Install as Python package (recommended)

Python package distributions of napari can be installed via `pip`, `conda-forge`, or from source.

````{important}
While not strictly required, it is highly recommended to install
napari into a clean virtual environment using an environment manager like
[conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or
[venv](https://docs.python.org/3/library/venv.html).

This should be set up *before* you install napari. For example, with `conda`:

```sh
conda create -y -n napari-env -c conda-forge python=3.9
conda activate napari-env
```
````

Choose one of the options below to install napari as a Python package.

````{admonition} **1. From pip**
:class: dropdown

napari can be installed on most macOS, Linux, and Windows systems with Python
3.7, 3.8, and 3.9 using pip:

```sh
python -m pip install "napari[all]"
```
You can then upgrade napari to a new version using

```sh
python -m pip install "napari[all]" --upgrade
```

*(See [Choosing a different Qt backend](#choosing-a-different-qt-backend) below for an explanation of the `[all]`
notation.)*

````

````{admonition} **2. From conda-forge**
:class: dropdown

If you prefer to manage packages with conda, napari is available on the
conda-forge channel. You can install it with:

```sh
conda install -c conda-forge napari
```

You can then upgrade to a new version of napari using

```sh
conda update napari
```

If you want to install napari with PySide2 as the backend you need to install it using

```sh
conda install -c conda-forge "napari=*=*pyside2"
```

````

````{admonition} **3. From the main branch on Github**
:class: dropdown

To install the latest version with yet to be released features from github via pip, call

```sh
python -m pip install "git+https://github.com/napari/napari.git#egg=napari[all]"
```
````

<!-- #region -->
## Checking it worked

After installation you should be able to launch napari from the command line by
simply running

```sh
napari
```

An empty napari viewer should appear as follows.

![image: An empty napari viewer](../assets/tutorials/launch_cli_empty.png)

## Choosing a different Qt backend

napari needs a library called [Qt](https://www.qt.io/) to run its user interface
(UI). In Python, there are two alternative libraries to run this, called
[PyQt5](https://www.riverbankcomputing.com/software/pyqt/download5) and
[PySide2](https://doc.qt.io/qtforpython/). By default, we don't choose for you,
and simply running `pip install napari` will not install either. You *might*
already have one of them installed in your environment, thanks to other
scientific packages such as Spyder or matplotlib. If neither is available,
running napari will result in an error message asking you to install one of
them.

Running `pip install "napari[all]"` will install the default framework – currently
PyQt5, but this could change in the future.

To install napari with a specific framework, you can use:

```sh
pip install "napari[pyqt5]"    # for PyQt5

# OR
pip install "napari[pyside2]"  # for PySide2
```

```{note}
If you switch backends, it's a good idea to `pip uninstall` the one
you're not using.
```

## Install as a bundled app

napari can also be installed as a bundled app on each of the major platforms,
MacOS, Windows, and Linux with a simple one click download and installation
process. You might want to install napari as a bundled app if you are unfamiliar
with installing Python packages or if you were unable to get the installation
process described above working. The bundled app version of napari is the same
version that you can get through the above described processes, and can still be
extended with napari plugins installed directly via the app.

To access the cross platform bundles you can visit our [release
page](https://github.com/napari/napari/releases) and scroll to the release you
are interested in and expand the `assets` tab to get a view that looks like
this:

![image: release bundle
assets](../assets/tutorials/installation/bundle_assets.png)

You can then download the appropriate zip file for your platform.

### Installing the MacOS bundle

Once you have downloaded the MacOS bundle zip you will have a zip file with a
name like `napari-0.3.7-macOS.zip`. After unzipping you will have a file with a
name like `napari-0.3.7.dmg`. Double clicking the `dmg` will open a new finder
window giving you the option to install napari into your `Applications` folder
by dragging the `napari` icon onto the `Applications` icon.

![image: MacOS install to
Applications](../assets/tutorials/installation/bundle_install.png)

After you drag the `napari` icon onto the `Applications` icon napari will be
installed in your Applications folder and available for opening by double
clicking on it.

![image: MacOS Applications folder with
napari](../assets/tutorials/installation/bundle_applications_folder.png)

The first time you try and open napari you will get the "unverified developer
warning" that appears below:

![image: MacOS developer
warning](../assets/tutorials/installation/bundle_dev_warning.png)

Don't be alarmed, this is because the napari team has not yet obtained a
developer certificate from Apple, but we will be doing this promptly. It is safe
to click "Cancel". To get napari to open you must enter "Systems Preferences"
and click the "Security & Privacy" icon, circled in red below:

![image: MacOS Security & Privacy
settings](../assets/tutorials/installation/bundle_security_privacy.png)

Once inside the "Security & Privacy" tab, you should see a message about napari
being blocked and an "Open Anyway" button, circled in red below:

![image: MacOS "Open Anyway"
settings](../assets/tutorials/installation/bundle_open_anyway.png)

After clicking this button you'll get one final warning about napari not being
verified, but now you'll have an "Open" button, as seen below:

![image: MacOS open bundle dialog
box](../assets/tutorials/installation/bundle_open.png)

After clicking "Open", the viewer should appear. Don't worry, you only have to
go through this process once when you install a new bundle.

### Installing the Windows bundle

Once you have downloaded the Windows bundle zip you will have a zip file with a
name like `napari-0.3.7-Windows.zip`. Unzip the bundle (you may like to use a
tool like [7-zip](https://www.7-zip.org/) for this) and double click on msi
file, eg: `napari-0.3.7.msi`

The napari setup wizard will then open. Click "Next" to begin the installation.

![image: Windows napari setup
wizard](../assets/tutorials/installation/windows_bundle_installer_start.png)

![image: Windows napari setup wizard in
progress](../assets/tutorials/installation/windows_bundle_installer_progress.png)

After the setup wizard has installed napari, click "Finish" to exit.

![image: Windows napari setup wizard
finished](../assets/tutorials/installation/windows_bundle_installer_finish.png)

When you launch the bundled napari app on Windows, first you'll see an empty
command terminal appear (do not close this window - you can ignore it). The
command terminal will be followed by a napari splash screen, and then the main
napari user interface window will appear a few seconds later. Note that errors
which might occur during your napari session will appear on the command terminal -
so if something is not working, it might pay to take a look at the terminal!

![image: Windows command terminal on napari
launch](../assets/tutorials/installation/windows_bundle_command_terminal.png)

You can launch napari from the Windows start menu.

![image: Windows launch napari from start
menu](../assets/tutorials/installation/windows_launch_napari.png)

The very first time you launch napari the startup time will be fairly slow, but
after that you will find that napari launches more quickly.

### Installing the Linux bundle

(Guide coming soon... In the meantime, if you try it and encounter issues, see
below for how to contact us.)
<!-- #endregion -->

## Next steps

- to start learning how to use napari, checkout our [getting
started](./getting_started) tutorial
- if you are interested in
contributing to napari please check our [contributing
guidelines](../../developers/contributing.md)
- if you are running into issues or bugs, please open a new issue on our [issue
tracker](https://github.com/napari/napari/issues)
    - include the output of `napari -info`
    (or go to `Help>Info` in the viewer and copy paste the information)
- if you want help using napari, we are a community partner on the [imagesc
forum](https://forum.image.sc/tags/napari) and all usage support requests should
be posted on the forum with the tag `napari`. We look forward to interacting
with you there!

repository: sofroniewn/napari

repo_name: sofroniewn/napari


text:
## plainview

A toolkit for building a data pipeline from your database's binary log stream.

### background

The need to maintain secondary datasources like search indices, caches, and analytics data warehouses often leads to poorly designed infrastructures suffering from highly coupled application code and untimely batch data exportation. Use this toolkit to turn your primary data store's binary log into a realtime pipeline of raw data on which to build a robust data infrastructure.

Credit goes to the folks at LinkedIn for pioneering this approach - read Jay Kreps' manifesto on [The Log](http://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying) for full background.  This project aims to provide a simple starting point for many of their ideas by leveraging Amazon Web Services to simplify the deployment and maintenence of distributed infrastructure.

### features
 - streaming binary log listener for MySQL
 - emitter to Amazon Kinesis
 - consumer for writing log data to Amazon S3

### todo
 - listeners for PostgreSQL, MongoDB, (others)
 - stronger schema-ing of data
 - process for capturing an initial state of the data

### building

Requires Java 7.

You will need to have the [open-replicator](https://github.com/cmerrick/open-replicator) project installed to your local maven repo as it has not yet been published.  Clone that project and install it with `mvn install`.

Build an uberjar with [Leiningen](http://leiningen.org/) using `lein uberjar`.

### use with mysql

How to use plainview to listen to your MySQL replication stream and write raw change data to Amazon S3.

##### 1.   Set
the following in your server's my.cnf file:

```
log-bin=mysql-bin
binlog_format=row
server-id=1234
```

Where `log-bin` specifies the name to use to store binary log files, and `server-id` is a unique number to identify this server in the replication system.  Restart your mysql server to put the changes into effect.

Finally, create a MySQL replication user:

```sql
mysql> GRANT REPLICATION SLAVE ON *.* TO<EMAIL_ADDRESS>IDENTIFIED BY '<repl-pass>';
```

Modify with an appropriate username and password, and replace `192.168.%` with the network address or subnet that you'll be connecting from.  Finally, grab the current position of the replication log:

```bash
mysql> show master status;
+------------------+-----------+--------------+------------------+
| File             | Position  | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+-----------+--------------+------------------+
| mysql-bin.000019 | 480798760 |              |                  |
+------------------+-----------+--------------+------------------+
```

##### 2. Setup a Kinesis Stream

In the Kinesis inteface of your AWS Management console, create a new stream with 1 shard, and take note of the stream name so you can reference it later.

##### 3. Run the plainview producer

plainview's producer listens to your MySQL server's replication system and forwards data to the Kinesis stream you just setup.

Clone this repository and run the following in your shell to give plainview access to the Kinesis stream you just setup:

```
export AWS_ACCESS_KEY=<your-key>
export AWS_SECRET_KEY=<your-secret>
```

The key will need full permissions on Kinesis.  From the same shell, run the producer

```bash
java -cp plainview-0.1.0-SNAPSHOT-standalone.jar plainview.Producer -i <server-id> -f <mysql-file> -n <mysql-position> -P <mysql-port> -u <repl-user> -p <repl-pass> -s <kinesis-stream>
```

Where
 - `<server-id>` is the unique ID from your master MySQL server's my.cnf file
 - `<mysql-file>` is the "File" that your master MySQL server reported in Step 1. (in this case, `mysql-bin.000019`)
 - `<mysql-position>` is the "Position" that your master MySQL server reported in Step 1. (in this case, `480798760`)
 - `<mysql-port>` is the port of your master MySQL server
 - `<repl-user>` and `<repl-pass>` are the credentials you GRANTed permission to in Step 1.
 - `<kinesis-stream>` is the name of the Kinesis stream from Step 2.

The producer will run continuously, listening for updates coming through replication.

##### 4. Run the plainview consumer

plainview's consumer listens to a Kinesis stream for data from the producer and writes it to Amazon S3.

Again run the following to give the code access to Amazon resources:

```
export AWS_ACCESS_KEY=<your-key>
export AWS_SECRET_KEY=<your-secret>
```

This key will need read permission on Kinesis, full permission on DynamoDB, and permission to write to an S3 bucket.  From the same shell, run the consumer:

```bash
java -cp plainview-0.1.0-SNAPSHOT-standalone.jar plainview.Consumer -a <kinesis-app> -b <s3-bucket> -s <kinesis-stream>
```

Where
 - `<kinesis-app>` is a unique name for this consumer.  Kinesis uses this name to maintain the consumer's state.
 - `<s3-bucket>` is the S3 bucket to write to
 - `<kinesis-stream>` is the name fo the Kinesis stream from Step 2.

repository: koovs-backup/plainview

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: koovs-backup/plainview


text:
# COOCOP - Copyout and CopyPaiting implementation
This is an implementation of the Copyout and CopyPairing image augmentation techniques. The paper about this can be found here: [Improved Image Augmentation for Convolutional Neural Networks by Copyout and CopyPairing](https://arxiv.org/abs/1909.00390)

## Installation
Install or update with pip:
```
pip install coocop -U
```

Install development version:
```
pip install git+https://github.com/t-systems-on-site-services-gmbh/coocop.git -U
```

## Citation / BibTeX
This is how you can cite this work with LaTeX / BibTeX:
```
@article{Copyout,
title = "{Improved Image Augmentation for Convolutional Neural Networks by Copyout and CopyPairing}",
author = {Philip May},
journal = {arXiv.org},
year = "2019",
archivePrefix = {arXiv},
eprint = {arXiv:1909.00390 [cs.CV]},
url = {https://arxiv.org/abs/1909.00390},
}
```

repository: t-systems-on-site-services-gmbh/coocop

repo_name: t-systems-on-site-services-gmbh/coocop


text:
# go-xinput: XInput wrapper for Go

`go-xinput` is a complete XInput wrapper to use XInput controllers in a Golang application. It has a type-safe API, does not require CGo, has no dependencies other than on the Go standard library, and has stubs that produce errors on operating systems other than Windows (so it will compile on other OSes, but will not work).

It exposes all* available function calls for XInput. A comprehensive set of examples is available in the [examples directory](examples).

Use import path `github.com/harry1453/go-xinput/xinput`.

Whilst this library will compile to any target, it only works under Windows.

\* Does not expose `GetKeystroke` but this is planned, and does not expose `GetDSoundAudioDeviceGuids` as this is not included in modern versions of XInput. `GetAudioDeviceIDs` support is currently broken.

license: MIT

repository: jrosco/go-xinput

repo_name: jrosco/go-xinput


text:
[![Tests](https://github.com/bookingcom/upliftml/actions/workflows/main.yml/badge.svg)](https://github.com/bookingcom/upliftml/actions/workflows/main.yml)
[![Docs](https://readthedocs.org/projects/upliftml/badge/?version=latest)](https://upliftml.readthedocs.io/en/latest/)
[![PyPI](https://badge.fury.io/py/upliftml.svg)](https://pypi.org/project/upliftml/)
[![Downloads](https://static.pepy.tech/badge/upliftml)](https://pepy.tech/project/upliftml)

# UpliftML: A Python Package for Scalable Uplift Modeling

![upliftml](docs/upliftml.png)

**UpliftML** is a Python package for scalable unconstrained and constrained uplift modeling from experimental data. To accommodate working with big data, the package uses PySpark and H2O models as base learners for the uplift models. Evaluation functions expect a PySpark dataframe as input.

**Uplift modeling** is a family of techniques for estimating the Conditional Average Treatment Effect (CATE) from experimental or observational data using machine learning. In particular, we are interested in estimating the causal effect of a treatment T on the outcome Y of an individual characterized by features X. In experimental data with binary treatments and binary outcomes, this is equivalent to estimating Pr(Y=1 | T=1, X=x) - Pr(Y=1 | T=0, X=x).

In many practical use cases the goal is to select which users to target in order to maximize the overall uplift without exceeding a specified **budget or ROI constraint**. In those cases, estimating uplift alone is not sufficient to make optimal decisions and we need to take into account the costs and monetary benefit incurred by the treatment.

Uplift modeling is an emerging tool for various personalization applications. Example use cases include marketing campaigns personalization and optimization, personalized pricing in e-commerce, and clinical treatment personalization.

The **UpliftML** library includes PySpark/H2O implementations for the following:
- 6 metalearner approaches for uplift modeling: T-learner[1], S-learner[1], X-learner[1], R-learner[2], class variable transformation[3], transformed outcome approach[4].
- The Retrospective Estimation[5] technique for uplift modeling under ROI constraints.
- Uplift and iROI-based evaluation and plotting functions with bootstrapped confidence intervals. Currently implemented: ATE, ROI, iROI, CATE per category/quantile, CATE lift, Qini/AUUC curves[6], Qini/AUUC score[6], cumulative iROI curves.

For detailed information about the package, read the [UpliftML documentation](https://upliftml.readthedocs.io/).

# Installation
Install the latest release from PyPI:

```
$ pip install upliftml
```

# Quick Start

```python
from upliftml.models.pyspark import TLearnerEstimator
from upliftml.evaluation import estimate_and_plot_qini
from upliftml.datasets import simulate_randomized_trial
from pyspark.ml.classification import LogisticRegression

# Read/generate the dataset and convert it to Spark if needed
df_pd = simulate_randomized_trial(n=2000, p=6, sigma=1.0, binary_outcome=True)
df_spark = spark.createDataFrame(df_pd)

# Split the data into train, validation, and test sets
df_train, df_val, df_test = df_spark.randomSplit([0.5, 0.25, 0.25])

# Preprocess the datasets (for implementation of get_features_vector, see the full example notebook)
num_features = [col for col in df_spark.columns if col.startswith('feature')]
cat_features = []
df_train_assembled = get_features_vector(df_train, num_features, cat_features)
df_val_assembled = get_features_vector(df_val, num_features, cat_features)
df_test_assembled = get_features_vector(df_test, num_features, cat_features)

# Build a two-model estimator
model = TLearnerEstimator(base_model_class=LogisticRegression,
                          base_model_params={'maxIter': 15},
                          predictors_colname='features',
                          target_colname='outcome',
                          treatment_colname='treatment',
                          treatment_value=1,
                          control_value=0)
model.fit(df_train_assembled, df_val_assembled)

# Apply the model to test data
df_test_eval = model.predict(df_test_assembled)

# Evaluate performance on the test set
qini_values, ax = estimate_and_plot_qini(df_test_eval)
```

For complete examples with more estimators and evaluation functions, see the demo notebooks in the ``examples`` folder.

# Contributing
If interested in contributing to the package, get started by reading our [contributor guidelines](CONTRIBUTING.md).

# License
The project is licensed under [Apache 2.0 License](https://github.com/bookingcom/upliftml/blob/main/LICENSE)

# Citation
If you use UpliftML, please cite it as follows:

Irene Teinemaa, Javier Albert, Nam Pham. **UpliftML: A Python Package for Scalable Uplift Modeling.** https://github.com/bookingcom/upliftml, 2021. Version 0.0.1.

```
@misc{upliftml,
  author={Irene Teinemaa, Javier Albert, Nam Pham},
  title={{UpliftML}: {A Python Package for Scalable Uplift Modeling}},
  howpublished={https://github.com/bookingcom/upliftml},
  note={Version 0.0.1},
  year={2021}
}
```

# Resources
Documentation:
* [UpliftML documentation](https://upliftml.readthedocs.io/)

Tutorials and blog posts:
* [Retrospective Estimation (blog post)](https://booking.ai/free-lunch-40a963e12b0a)
* [Uplift modeling tutorial at WebConf'2021](https://booking.ai/uplift-modeling-f9759e3fb51e)
* [Personalization in Practice tutorial at WSDM'2021](https://booking.ai/personalization-in-practice-2bb4bc680eb3)

Related packages:
* [CausalML](https://github.com/uber/causalml): a Python package for uplift modeling and causal inference with machine learning
* [EconML](https://github.com/microsoft/EconML): a Python package for estimating heterogeneous treatment effects from observational data via machine learning

# References

1. Sören R. Künzel, Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. Metalearners for estimating heterogeneous treatment effects using machine learning. Proceedings of the National Academy of Sciences, 2019.
2. Xinkun Nie and Stefan Wager. Quasi-oracle estimation of heterogeneous treatment effects. arXiv preprint arXiv:1712.04912, 2017.
3. Maciej Jaskowski and Szymon Jaroszewicz. Uplift modeling for clinical trial data. ICML Workshop on Clinical Data Analysis, 2012.
4. Susan Athey and Guido W. Imbens. Machine learning methods for estimating heterogeneous causal effects. stat, 1050(5), 2015.
5. Dmitri Goldenberg, Javier Albert, Lucas Bernardi, Pablo Estevez Castillo. Free Lunch! Retrospective Uplift Modeling for Dynamic Promotions Recommendation within ROI Constraints. In Fourteenth ACM Conference on Recommender Systems (pp. 486-491), 2020.
6. Nicholas J Radcliffe and Patrick D Surry. Real-world uplift modelling with significance based uplift trees. White Paper tr-2011-1, Stochastic Solutions, 2011.

repository: ya-stack/upliftml

branch_name: refs/heads/main

repo_name: ya-stack/upliftml


text:
---
title: "How to push to or pull from docker hub"
date: 2018-04-23 12:30:46 +0900
tags: [docker, ubuntu16.04]
categories: [ubuntu, docker]
---

Docker hub is very useful for maintaining images, especially when you are working with many machines with the same image.
---
[My DockerHub](https://hub.docker.com/u/codeslake/)
{: .notice-info}

### Push
```shell
$ docker push codeslake/tensorflow-1.10.0:latest
```
### Pull
```shell
$ docker pull codeslake/tensorflow-1.10.0:latest
```

---


text:
---
date: 2022-06-13
title: Approved By Who?
categories:
    - Blog
tags:
    - microsoft
    - forms
    - power automate
    - power platform
    - solutions
youtube: ""
image: ./header-img.png
---

![header image](./header-img.png)
Have you ever needed a document signed, walked across the campus and the signer was off at lunch? What if there was a way to get these kinds of signatures

## There is a way using approvals

In this case I needed an approval that replaces the need for running all over the building looking for the correct people to sign a document. Students need a series of signatures before embarking on various service activities.

The first thing we need to do is gather the required starting information. This is as simple as building the form. In the form we use a choice block to define the different departments whose signatures are needed.

![example of a form question](./form-question.png)

Then we build the flow around the responses to that form. If we structure the form correctly it is fairly simple.  Either way is preferable to having your students run all over the show.

One of the first steps in the flow is adding a compose block. This is where I just created a JSON object of the different approvers who need to approve depending on the response in the form.

```json
{
  "CAS": [
      ...
  ],
  "Service Council": [
      ...
  ],
  "Residential Life": [
      ...
  ],
  "Weekend": [
      ...
  ]
}
```

This works for me because it matches exactly with the responses from the form. However, the beauty of these blocks is that you can configure them to your needs.

Then we have got to send the approval to someone. I will skip over the logic specific to this school. I guarantee yours is simpler. Doesn't matter! The more complex you make these, the more satisfaction you get when you see the approvals coming in!

![approval block in flow](./approvers.png)

We want to send the comments back to the student if their request is denied. We can do that here, I ended up just leaving the `true` condition empty to pass onto the next block. The `false` condition sends an email with the comments.

![handle the responses](./condition)

When all of the logic resolves, I am saving all of the results back to a list on Sharepoint where it can be reviewed by the different coordinators. I also generate an email giving the students information about the next steps.

There is tons of utility for approvals like these, plus they go to both Teams and Outlook and can be done in a few simple clicks.

branch_name: refs/heads/development

gha_language: TypeScript


text:
# CEBD-1160-BigDataTechnology
Final Project to introduction to big data technology

| Name | Date |
|:-------|:---------------|
|Vignesh Rajaram|March 28, 2020|

-----

### Resources
Your repository should include the following:

- Python script for your analysis: `cancer_prediction.py`
- Results figure/saved file:  `plots/`
- runtime-instructions in a file named RUNME.md

-----

## Research Question

Based on the geometrical characteristics of tumor to determine whether they are malignant or benign tumor?

### Abstract

In this project, based on the data available from Wisconsin Diagnostic Breast Cancer(WDBC): We are creating a model to predict the type of tumor based on the geometrical characteristics of tumor. This model will help in better and quick decision making on treatment for either malignant or benign tumor, with initial data on geometrical characteristics of tumor. Using logistic regression model available in sklearn library a model will be created to predict the behavior. Based on the F1 score of the regressor the initial test provided encouraging result, but due to its application in medical field the F1 score must be improved further.

### Introduction

There are two different types of tumor:
Malignant tumor - which may invade surrounding tissue or spread around the body
Benign tumor - which does not affect the surrounding tissue or spread around the body. [1]

The dataset obtained from the University of Wisconsin, describes the features of cell nuclei present in the digitized image. Based on the features obtained the type of tumor is predicted. The graphs are obtained from this dataset. More details about the dataset can be found in the file(./data/wdbc.names).

### Methods

The target in our dataset is to predict whether the tumor is either malignant or benign. Therefore this dataset falls under the classification model of the supervised machine learning. Hence, we use the Logistic Regressor built in scikit-learn for simplicity and applicability to the problem in hand. Psuedocode for the regressor can be found in this link (https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html)

To train the model [2] and to obtain the metrics of the model [3], methods are available in the scikit learn. The graph is generated to compare the mean values of the features with type of tumor. Based on the graph below, we could see that there isn't any major difference in the mean value of characteristics that differs malignant tumor from benign tumor. Although the malignant tumor is more spread out than benign tumor.

![matrix](./plots/Diagnosis.png)

### Results

The F1 score of the regressor is ~0.95 and the value can be improved by more data.
![performange figure](./plots/performance.png)

After doing trial and error method, with removing multiple features it is noted that more features we have in our dataset and more data in the dataset the F1 score improved. Hence we can say that by addding more data to training and testing the model the F1 score can be improved.

### Discussion

The method used here to determine the type of tumor has accuracy of 95%(approximately) and F1 score of ~0.95. Based on these numbers the model we created could solve the problem and predict the tumor. But the above number is not suitable for the field of application as the disease we are concentrating is terminal if untreated or wrongly treated. Therefore, more data is required to train the model, to increase the accuracy and F1 score.

Hence, we could say that this model is partially complete and further development is required for application. This can be acheived by adding more features to dataset and more data.

### References
 [1] https://study.com/academy/lesson/benign-vs-malignant-definition-characteristics-differences.html
 [2] https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html
 [3] https://scikit-learn.org/stable/modules/model_evaluation.html

-------

gha_language: Python

gha_license_id: MIT


text:
hangman
=======
The classic guessing game in api form using symfony2 and fosrestbundle.

build and run
-------------
 - `$ composer install`
 - `$ app/console doctrine:schema:create`
 - `$ phpunit -c app`
 - `$ app/console server:start`

This should install its dependencies, create the required sqlite database, run the tests and start a server on your local machine at port 8000.

api
---

- `GET /games` lists the ids of all the games
- `POST /games` starts a new game
- `GET /games/:id` retrieves the details of a game, if it exists
- `POST /games/:id` with body `char=c` guesses letter `c`

repository: marcusklaas/hangman

repo_name: marcusklaas/hangman


text:
---
meta:
  - name: "og:title"
    content: "Configuration - Goyave"
  - name: "twitter:title"
    content: "Configuration - Goyave"
  - name: "title"
    content: "Configuration - Goyave"
---

# Configuration

[[toc]]

## Introduction

The Goyave framework lets you configure its core and your application.
To configure your application, use the `config.json` file at your project's root. If you are using the template project, copy `config.example.json` to `config.json`. `config.json` should be ignored in your `.gitignore` file as it can differ from one developer to another. To avoid accidental commit or change to the default project's config, it is a good practice to ignore this file and define the project's default config in `config.example.json`.

If this config file misses some config entries, the default values will be used. All values from the framework's core are **validated**. That means that the application will not start if you provided an invalid value in your config (For example if the specified port is not a number).
You can register your own configuration entries for them to be validated too.
See the [configuration reference](#configuration-reference) for more details.

## Environment configuration

Most projects need different configuration values based on the environment. For example, you won't connect to the same database if you're in local development, in a testing environment inside continuous integration pipelines, or in production. Goyave supports multiple configurations and will pick the appropriate one depending on the environment variable `GOYAVE_ENV`.

Since `v2.0.0`, you can use custom environments.

| GOYAVE_ENV                    | Config file              |
|-------------------------------|--------------------------|
| test                          | `config.test.json`       |
| production                    | `config.production.json` |
| *custom_env*                  | `config.custom_env.json` |
| local / localhost / *not set* | `config.json`            |

## Using the configuration

Before being able to use the config, import the config package:
``` go
import "github.com/System-Glitch/goyave/v2/config"
```

The configuration is loaded automatically when the server starts, but you can reload it manually if needed.

#### config.Load

| Parameters | Return  |
|------------|---------|
|            | `error` |

**Example:**
``` go
config.Load()
```

### Getting a value

#### config.Get

Get a generic config entry. You may need to type-assert it before being able to use it. You can do so safely as the config values and types are validated. Panics if the entry doesn't exist.

| Parameters   | Return                 |
|--------------|------------------------|
| `key string` | `interface{}` or panic |

**Example:**
``` go
config.Get("appName") // "goyave"
```

#### config.GetString

Get a string config entry. Panics if the entry doesn't exist or is not a string.

| Parameters   | Return            |
|--------------|-------------------|
| `key string` | `string` or panic |

**Example:**
``` go
config.GetString("protocol") // "http"
```

#### config.GetBool

Get a bool config entry. Panics if the entry doesn't exist or is not a bool.

| Parameters   | Return          |
|--------------|-----------------|
| `key string` | `bool` or panic |

**Example:**
``` go
config.GetBool("debug") // true
```

#### config.Has

Check if a config entry exists.

| Parameters   | Return |
|--------------|--------|
| `key string` | `bool` |

**Example:**
``` go
config.Has("appName") // true
```

### Setting a value

You can set a config value at runtime with the `config.Set(key, value)` function. Bear in mind that this change **temporary** and will be lost after your application restarts or if the config is reloaded. This function is mainly used for testing purposes. Values set using this function are still being validated, and your application will panic if the validation doesn't pass.

#### config.Set

| Parameters          | Return          |
|---------------------|-----------------|
| `key string`        | `void` or panic |
| `value interface{}` |                 |

**Example:**
``` go
config.Set("appName", "my awesome app")
```

## Custom config entries

The core of the framework contains default values covering most cases, but you can still add custom entries for your most specific needs to the config simply by appending a property to your application's config file. The custom properties are not validated, so you can use the data type you want.

### Validating custom entries

#### config.Register

Register a config entry for validation.

If the entry identified by the given key is set or modified, its value will be validated according to the given kind. If the entry already exists, it will be revalidated.

This method doesn't allow to override existing validation. Once an entry is registered, its expected kind cannot be modified.

| Parameters          | Return          |
|---------------------|-----------------|
| `key string`        | `void` or panic |
| `kind reflect.Kind` |                 |

**Example:**
``` go
config.Register("pluginConfig", reflect.Struct)
```

## Configuration reference

| Entry                | Type      | Accepted values                                 | Default                                 | Note                                                                                |
|----------------------|-----------|-------------------------------------------------|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| appName              | `string`  | any                                             | "goyave"                                |                                                                                |
| environment          | `string`  | any                                             | "localhost"                             |                                                                                |
| maintenance          | `bool`    | `true`, `false`                                 | `false`                                 | If `true`, start the server in maintenance mode. (Always return HTTP 503)                                                                     |
| host                 | `string`  | any                                             | "<IP_ADDRESS>"                             |                                                                                |
| domain               | `string`  | any                                             | ""                                      | Used for URL generation Leave empty to use IP instead.                                                                                |
| port                 | `float64` | any                                             | `8080`                                  |                                                                                |
| httpsPort            | `float64` | any                                             | `8081`                                  |                                                                                |
| protocol             | `string`  | "http", "https"                                 | "http"                                  | See the [HTTPS](#setting-up-https) section                                                                                |
| tlsCert              | `string`  | any                                             | none                                    | Path to your TLS cert                                                                                |
| tlsKey               | `string`  | any                                             | none                                    | Path to your TLS key                                                                                |
| debug                | `bool`    | `true`, `false`                                 | `true`                                  | When activated, print stacktrace on error and sends error message in response. **Disable this in production!**                                |
| timeout              | `float64` | any                                             | `10`                                    | Timeout in seconds                                                                                |
| maxUploadSize        | `float64` | any                                             | `10`                                    | Maximum size of the request, in MiB                                                                                |
| defaultLanguage      | `string`  | any                                             | "en-US"                                 | See the [Localization](./advanced/localization.html) guide                                                                                |
| dbConnection         | `string`  | "none", "mysql", "postgres", "sqlite3", "mssql" | "none"                                  | See the [Database](./basics/database.html) guide                                                                                |
| dbHost               | `string`  | any                                             | "<IP_ADDRESS>"                             |                                                                                |
| dbPort               | `float64` | any                                             | `3306`                                  |                                                                                |
| dbName               | `string`  | any                                             | "goyave"                                |                                                                                |
| dbUsername           | `string`  | any                                             | "root"                                  |                                                                                |
| dbPassword           | `string`  | any                                             | "root"                                  |                                                                                |
| dbOptions            | `string`  | any                                             | "charset=utf8&parseTime=true&loc=Local" |                                                                                |
| dbMaxOpenConnections | `float64` | any                                             | `20`                                    |                                                                                |
| dbMaxIdleConnections | `float64` | any                                             | `20`                                    |                                                                                |
| dbMaxLifetime        | `float64` | any                                             | `300`                                   | The maximum time (in seconds) a connection may be reused.                                                                                |
| dbAutoMigrate        | `bool`    | `true`, `false`                                 | `false`                                 | When activated, migrate all registered models at startup                                                                                |
| jwtExpiry            | `float64` | any                                             | `300`                                   | The number of seconds a generated JWT token is valid for. See the [authentication](./advanced/authentication.htmll#json-web-token-jwt) guide. |

::: tip NOTE
Numeric values are parsed as `float64` even if they are supposed to be integers so it covers the potential use-case of floats in the config.
:::

## Setting up HTTPS

Setting up HTTPS on your Goyave application is easy. First, turn `protocol` to `https` in the config. Then, add the `tlsCert` and `tlsKey` entries in the config. These two entries represent respectively the path to your TLS certificate and your TLS key.

**Certbot example:**
``` json
{
    ...
    "protocol": "https",
    "tlsCert": "/etc/letsencrypt/live/mydomain.com/cert.pem",
    "tlsKey": "/etc/letsencrypt/live/mydomain.com/privkey.pem",
    ...
}
```

Restart your server and you should now be able to connect securely to your Goyave application! All HTTP requests will automatically be redirected to HTTPS.


text:
## My Own website
Omid Gharib Personal Website

### Contributing

* Check our projec's website and report any bugs or ideas in [issues](https://github.com/omidgharib/omidgharib.ir/issues)

* Clone this project and check source code
```
    git clone https://github.com/omidgharib/omidgharib.ir.git
```

* Fork it for your self and do some develope and pull request it to us :smiley:

### Buliding Technologies
* [HTML5](http://ali.md/wiki/html5)
* [CSS3](http://ali.md/css3ref)
* [JavaScript](http://ali.md/wiki/javascript)
* [jQuery.js](http://ali.md/jquery.js)
* [PHP](http://ali.md/php/)

### The Team
* [Omid Gharib](https://github.com/omidgharib) Developer /Programmer

### All rights reserved ###
Please note that omidgharib.ir is a curated site and that we reserve the right to refuse any listing for any reason.

The [omidgharib.ir](http://omidgharib.ir) code and website is released under a [MIT License](http://omidgharib.mit-license.org/).

### A Omid Gharib Personal Website
Produced by Omid Gharib


text:
---
title: Apigee
layout: posts
---

App deployment, configuration management and orchestration - all from one system. Ansible is powerful IT automation that you can learn quickly.

# Architecture
APIs are the glue that connect apps and act as the foundation for what we call the digital economy. Through every connection there is at least one API interacting with other applications and exchanging data. A business needs API management solutions that can support diverse users and not compromise the stability and reliability of back-end systems. Apigees intelligent API management platform allows companies to provide connected, seamless, digital experiences and increase the speed at which they innovate and adapt.

# Apigee Edge, Apigee's API Management platform, provides a unified solution that:

makes your APIs fail-proof
helps you grow your developer and partner ecosystem
enables you to run your APIs at scale
provides deep insights into your APIs and your business
Apigee Edge is the API management tool that offers the solutions today's digital economy demands. For more information, download our Definitive Guide to API Management.

## Build RESTful APIs
You have data, you have services, and you want to develop new business solutions quickly, both internally and externally.

With Apigee, you can build API proxies—RESTful, HTTP-based APIs that interact with your services. With easy-to-use APIs, developers can be more productive, increasing your speed to market.

API proxies give you the full power of Apigee's API platform to secure API calls, throttle traffic, mediate messages, control error handling, cache things, build developer portals, document APIs, analyze API traffic data, make money on the use of your APIs, protect against bad bots, and more.

# paybook

`playbooks` contains `plays`, plays contains `tasks`, while taks call `modules`.
`tasks` run sequentially
`handlers` are trigered by tasks and are un once, at the end of plays.

## Configuration management
Ansible configurations are simple data descriptions of your infrastructure (both human-readable and machine-parsable) - ensuring everyone on your team will be able to understand the meaning of each configuration task. New team members will be able to quickly dive in and make an impact. Existing team members can get work done faster - freeing up cycles to attend to more critical and strategic work instead of configuration management.

Ansible requires nothing more than a password or SSH key in order to start managing systems and can start managing them without installing any agent software, avoiding the problem of "managing the management" common in many automation systems. There's no more wondering why configuration management daemons are down, when to upgrade management agents, or when to patch security vulnerabilities in those agents.

### GOAL-ORIENTED, NOT SCRIPTED
Ansible features an state-driven resource model that describes the desired state of computer systems and services, not the paths to get them to this state. No matter what state a system is in, Ansible understands how to transform it to the desired state (and also supports a "dry run" mode to preview needed changes). This allows reliable and repeatable IT infrastructure configuration, avoiding the potential failures from scripting and script-based solutions that describe explicit and often irreversible actions rather than the end goal.

### SECURE & AGENTLESS
Ansible relies on the most secure remote configuration management system available as its default transport layer: OpenSSH. OpenSSH is available for a wide variety of platforms, is very lightweight and when security issues in OpenSSH are discovered, they are patched quickly.

Further, Ansible does not require any remote agents. Ansible delivers all modules to remote systems and executes tasks, as needed, to enact the desired configuration. These modules run with user-supplied credentials, including support for sudo and even Kerberos and clean up after themselves when complete. Ansible does not require root login privileges, specific SSH keys, or dedicated users and respects the security model of the system under management.

As a result, Ansible has a very low attack surface area and is quite easy to deploy into new environments.

## EFFICIENT ARCHITECTURE
Ansible works by connecting to your nodes and pushing out small programs, called "Ansible modules" to them. These programs are written to be resource models of the desired state of the system. Ansible then executes these modules (over SSH by default), and removes them when finished.

Your library of modules can reside on any machine, and there are no servers, daemons, or databases required. Typically you'll work with your favorite terminal program, a text editor, and probably a version control system to keep track of changes to your content.

# MANAGE YOUR INVENTORY IN SIMPLE TEXT FILES

By default, Ansible represents what machines it manages using a very simple INI file that puts all of your managed machines in groups of your own choosing.

To add new machines, there is no additional SSL signing server involved, so there's never any hassle deciding why a particular machine didn’t get linked up due to obscure NTP or DNS issues.

```bash
[webservers]
www1.example.com
www2.example.com

[dbservers]
db0.example.com
db1.example.com
```

## installation
Once Ansible is installed, it will not add a database, and there will be no daemons to start or keep running. You only need to install it on one machine (which could easily be a laptop) and it can manage an entire fleet of remote machines from that central point. When Ansible manages remote machines, it does not leave software installed or running on them, so there’s no real question about how to upgrade Ansible when moving to a new version.

gha_language: JavaScript


text:
# `mandarine new`
Creates a Mandarine-powered application based on Mandarine's Project Structure.

-----

**Syntax:**

```shell script
$ mandarine new [OPTIONS]
```

**Options**

| Option | Description | Required |
| ------ | ----------- | -------- |
| `--directory (-d)` | Indicates the directory where the mandarine-powered application will be created. | No
| `--force (-f)` | Forces the overwriting of existing files in directory. | No

repository: Fusselwurm/mandarinets

repo_name: Fusselwurm/mandarinets


text:
---
title: "What should go into a data codebook"
author: "Steve Simon"
source: "http://blog.pmean.com/data-codebook/"
date: "2014-05-31"
categories:
- Blog post
tags:
- Data management
output: html_document
---

Before you start your data entry, you should create a data codebook. If
you don't have a data codebook when you hand your data over to someone
else, take the time to create one for their benefit and yours. The data
codebook contains a description of your data set. There's no standard
form for a data codebook, and what you describe may depend on a variety
of factors, such as the complexity of your data set, the number of
people involved in data collection and data entry, and the number of
people that you are likely to share your data with. Here are some of the
elements that you should think about putting in a data
codebook.

<!---More--->

The data codebook should have some general information about the data
set as a whole. This might include:

* A brief descriptive title for your project
* The purpose of the data collection
* The name of the person who collected the data
* The date(s) when the data was collected
* The name of the person who entered the data into the computer
* The date the data was entered into the computer

In a laboratory experiment, you might want to document the conditions
under which the experiment was run.

The data codebook, more importantly, documents information about each
variable in your data set (each column). This might include:

* the name you used for this column of data
* a longer description of this variable with no acronyms or
abbreviations
* the units of measurement (if applicable)
* the range of possible values
* explanation for any numeric codes,
* ESPECIALLY any codes for missing data

If there are several reasons why a measurement might be missing, you
should create SEVERAL missing value codes and document what each code
represents. This is important because the statistical handling of
missing values is strongly dependent on the reason the value is missing.

If you enter your data into a text file, the data codebook can document
the structure of your file. This would be the location of each variable
(which column the variable starts in and which column it ends in) for a
fixed width text file. It would be the delimiter that separates
individual data values in a delimited data file. If strings are
surrounded by quote marks, the codebook would note this, as well as
whether they were single (') or double (") quotes.

The data codebook is also a record of any choices that you make during
data entry that you need to remember throughout the entire data entry
process. If, for example, you are typing in the date of a visit to the
emergency room, what day do you assign to a patient that arrives exactly
at midnight? There's nothing wrong with using the same date that a
11:59pm visitor would have, and there's nothing wrong with putting a
midnight visitor on the following day (see [commentary on
this](http://www.nist.gov/pml/div688/times.cfm#midnight) at the National
Institute for Standards and Technology).? What does matter is that once
you decide how to resolve this ambiguous data value, you need to
document your choice so that every future value that is ambiguous in the
same way is handled in the same way.

There are some web pages that describe what should go into a codebook,
though the recommendations vary widely.

*
<http://www.icpsr.umich.edu/icpsrweb/ICPSR/support/faqs/2006/01/what-is-codebook>*
<http://dss.princeton.edu/online_help/analysis/codebook.htm>
* <http://www.sscnet.ucla.edu/issr/da/tutor/tutcode.htm>

You can find an [earlier version][sim1] of this page on my [blog][sim2].

[sim1]: http://blog.pmean.com/data-codebook/
[sim2]: http://blog.pmean.com

repository: pmean/build-website

repo_name: pmean/build-website


text:
# Flink-TiDB-Connector

## Component

| Name                     | Supported | Description                                                  |
| ------------------------ | --------- | ------------------------------------------------------------ |
| `DynamicTableSource` | true      | Implemented by `tikv-java-client`                            |
| `DynamicTableSink`   | true      | Implemented by `JdbcDynamicTableSink` now, and it will be implemented by `tikv-java-client` in the future. |
| `TableFactory`       | true      |                                                              |
| `CatalogFactory`     | true      |                                                              |

## Version

`Flink-1.11` and `Flink-1.12` are supported.

## Build

```bash
git clone git@github.com:pingcap-incubator/TiBigData.git
cd TiBigData
mvn clean package -DskipTests -am -pl flink/flink-${FLINK_VERSION}
cp flink/flink-${FLINK_VERSION}/target/flink-tidb-connector-${FLINK_VERSION}-0.0.4-SNAPSHOT.jar ${FLINK_HOME}/lib
```

Then restart your Flink cluster.

## Demo

```bash
bin/flink run -c io.tidb.bigdata.flink.tidb.examples.TiDBCatalogDemo lib/flink-tidb-connector-${FLINK_VERSION}-0.0.4-SNAPSHOT.jar --tidb.database.url ${DATABASE_URL} --tidb.username ${USERNAME} --tidb.password ${PASSWORD} --tidb.database.name ${TIDB_DATABASE} --tidb.table.name ${TABLE_NAME}
```

The output can be found in console, like:

```bash
Job has been submitted with JobID 3a64ea7affe969eef77790048923b5b6
+----------------------+--------------------------------+--------------------------------+
|                   id |                           name |                            sex |
+----------------------+--------------------------------+--------------------------------+
|                    1 |                           java |                              1 |
|                    2 |                          scala |                              2 |
|                    3 |                         python |                              1 |
+----------------------+--------------------------------+--------------------------------+
3 rows in set
```

## DataTypes

|    TiDB    |     Flink(Catalog)     |
| :--------: | :-------------------: |
|  TINYINT   |  TINYINT  |
|  SMALLINT  | SMALLINT  |
| MEDIUMINT  |    INT    |
|    INT     |    INT    |
|   BIGINT   |  BIGINT   |
|    CHAR    |  STRING   |
|  VARCHAR   |  STRING   |
|  TINYTEXT  |  STRING   |
| MEDIUMTEXT |  STRING   |
|    TEXT    |  STRING   |
|  LONGTEXT  |  STRING   |
|   BINARY   |   BYTES   |
| VARBINARY  |   BYTES   |
|  TINYBLOB  |   BYTES   |
| MEDIUMBLOB |   BYTES   |
|    BLOB    |   BYTES   |
|  LONGBLOB  |   BYTES   |
|   FLOAT    |   FLOAT   |
|   DOUBLE   |  DOUBLE   |
| DECIMAL(p,s) |  DECIMAL(p,s)  |
|    DATE    |   DATE    |
|    TIME    |   TIME    |
|  DATETIME  | TIMESTAMP |
| TIMESTAMP  | TIMESTAMP |
|    YEAR    | SMALLINT  |
|    BOOL    |  BOOLEAN  |
|    JSON    |  STRING   |
|    ENUM    |  STRING   |
|    SET     |  STRING   |

If you want to specify the type by yourself, please use `Flink SQL`. It supports most type conversions, such as INT to BIGINT, STRING to LONG.

## Configuration

| Configration                   |  Default Value | Description                                                  |
| :----------------------------- |  :------------ | :----------------------------------------------------------- |
| tidb.database.url              |  -             | TiDB connector has a built-in JDBC connection pool implemented by [HikariCP](https://github.com/brettwooldridge/HikariCP), you should provide your own TiDB server address with a jdbc url format:  `jdbc:mysql://host:port/database` or `jdbc:tidb://host:port/database`. If you have multiple TiDB server addresses and the amount of data to be inserted is huge, it would be better to use TiDB jdbc driver rather then MySQL jdbc driver. TiDB driver is a load-balancing driver, it will query all TiDB server addresses and pick one  randomly when establishing connections. |
| tidb.username                  | -             | JDBC username.                                               |
| tidb.password                  |null          | JDBC password.                                               |
| tidb.maximum.pool.size         | 10            | Connection pool size.                                        |
| tidb.minimum.idle.size         | 10            | The minimum number of idle connections that HikariCP tries to maintain in the pool. |
| tidb.write_mode                | append        | TiDB sink write mode: `upsert` or `append`. |
| tidb.replica-read              | leader | Read data from specified role. The optional roles are leader, follower and learner. You can also specify multiple roles, and we will pick the roles you specify in order. |
| tidb.replica-read.label        | null          | Only select TiKV store match specified labels. Format: label_x=value_x,label_y=value_y |
| tidb.replica-read.whitelist    | null          | Only select TiKV store with given ip addresses. |
| tidb.replica-read.blacklist    | null          | Do not select TiKV store with given ip addresses. |
| tidb.database.name             | null          | Database name. It is required for table factory, no need for catalog. |
| tidb.table.name                | null          | Table name. It is required for table factory, no need for catalog. |
| tidb.timestamp-format.${columnName} | null          | For each column, you could specify timestamp format in two cases: 1. TiDB `timestamp` is mapped to Flink `string`; 2. TiDB `varchar` is mapped to Flink `timestamp`. Format of timestamp may refer to `java.time.format.DateTimeFormatter`, like `yyyy-MM-dd HH:mm:ss.SSS`. It is optional for table factory, no need for catalog. |
| timestamp-format.${columnName}   ***- deprecated*** | null | It is equivalent to the `tidb.timestamp-format.${columnName}` configuration. This is a deprecated configuration for downward compatibility only, and is in effect for `flink-1.11`, `flink-1.12`, `flink-1.13`. This configuration will no longer be supported in future `flink-1.14` releases. |
| sink.buffer-flush.max-rows     | 100           | The max size of buffered records before flush. Can be set to zero to disable it. |
| sink.buffer-flush.interval     | 1s            | The flush interval mills, over this time, asynchronous threads will flush data. Can be set to `'0'` to disable it. Note, `'sink.buffer-flush.max-rows'` can be set to `'0'` with the flush interval set allowing for complete async processing of buffered actions. |
| sink.max-retries               | 3             | The max retry times if writing records to database failed.   |
| tidb.filter-push-down          | false         | Support filter push down. It is only available for version 1.12. |
| tidb.snapshot_timestamp        | null          | It is available for TiDB connector to read snapshot. You could configure it in table properties. The format of timestamp may refer to `java.time.format.DateTimeFormatter#ISO_ZONED_DATE_TIME`. |
| tidb.dns.search | null | Append dns search suffix to host names. It's especially necessary to map K8S cluster local name to FQDN. |
| tidb.catalog.load-mode | eager | TiDB catalog load mode: `eager` or `lazy`. If you set this configuration to lazy, catalog would establish a connection to tidb when the data is actually queried rather than when catalog is opened. |

TiDB Flink sink supports all sink properties of  [`flink-connector-jdbc`](https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/connectors/jdbc.html), because it is implemented by `JdbcDynamicTableSink`.

## Usage

### TiDBCatalog
The above demo is implemented by TiDBCatalog.

```java
public class TiDBCatalogDemo {

  public static void main(String[] args) {
    // properties
    ParameterTool parameterTool = ParameterTool.fromArgs(args);
    final Map<String, String> properties = parameterTool.toMap();
    final String databaseName = parameterTool.getRequired("tidb.database.name");
    final String tableName = parameterTool.getRequired("tidb.table.name");
    // env
    EnvironmentSettings settings = EnvironmentSettings.newInstance().useBlinkPlanner()
        .inBatchMode().build();
    TableEnvironment tableEnvironment = TableEnvironment.create(settings);
    // register TiDBCatalog
    TiDBCatalog catalog = new TiDBCatalog(properties);
    catalog.open();
    tableEnvironment.registerCatalog("tidb", catalog);
    // query and print
    String sql = String.format("SELECT * FROM `tidb`.`%s`.`%s` LIMIT 100", databaseName, tableName);
    System.out.println("Flink SQL: " + sql);
    TableResult tableResult = tableEnvironment.executeSql(sql);
    System.out.println("TableSchema: \n" + tableResult.getTableSchema());
    tableResult.print();
  }
}
```

You could submit DDL  by TiDBCatalog, such as create table, drop table:

```java
public class TestCreateTable {

  public static void main(String[] args) throws Exception {
    Map<String, String> properties = new HashMap<>();
    properties.put("tidb.database.url", "jdbc:mysql://host:port/database");
    properties.put("tidb.username", "root");
    properties.put("tidb.password", "123456");
    TiDBCatalog catalog = new TiDBCatalog(properties);
    catalog.open();
    String sql = "CREATE TABLE IF NOT EXISTS people(id INT, name VARCHAR(255), sex ENUM('1','2'))";
    catalog.sqlUpdate(sql);
    catalog.close();
  }
}
```

### FlinkTableFactory

You could use `FlinkTableFactory` like:

```java
public class TestFlinkSql {

  public static void main(String[] args) {
    EnvironmentSettings settings = EnvironmentSettings.newInstance().useBlinkPlanner()
        .inStreamingMode().build();
    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    StreamTableEnvironment tableEnvironment = StreamTableEnvironment.create(env, settings);
    tableEnvironment.executeSql("CREATE TABLE tidb(\n"
        + " c1     tinyint,\n"
        + " c2     smallint,\n"
        + " c3     int,\n"
        + " c4     int,\n"
        + " c5     bigint,\n"
        + " c6     char(10),\n"
        + " c7     varchar(20),\n"
        + " c8     string,\n"
        + " c9     string,\n"
        + " c10    string,\n"
        + " c11    string,\n"
        + " c12    string,\n"
        + " c13    string,\n"
        + " c14    string,\n"
        + " c15    string,\n"
        + " c16    string,\n"
        + " c17    string,\n"
        + " c18    float,\n"
        + " c19    double,\n"
        + " c20    decimal(6,3),\n"
        + " c21    date,\n"
        + " c22    time,\n"
        + " c23    timestamp,\n"
        + " c24    timestamp,\n"
        + " c25    smallint,\n"
        + " c26    boolean,\n"
        + " c27    string,\n"
        + " c28    string,\n"
        + " c29    string\n"
        + ") WITH (\n"
        + "  'connector' = 'tidb',\n"
        + "  'tidb.database.url' = 'jdbc:mysql://host:port/database',\n"
        + "  'tidb.username' = 'root',\n"
        + "  'tidb.password' = '123456',\n"
        + "  'tidb.database.name' = 'database',\n"
        + "  'tidb.table.name' = 'test_tidb_type'\n"
        + ")"
    );
    tableEnvironment.executeSql("SELECT * FROM tidb LIMIT 100").print();
  }
```

### Flink SQL Client

You could create a sample tidb table which contains most tidb types by the following script.

```sql
CREATE TABLE `default`.`test_tidb_type`(
 c1     tinyint,
 c2     smallint,
 c3     mediumint,
 c4     int,
 c5     bigint,
 c6     char(10),
 c7     varchar(20),
 c8     tinytext,
 c9     mediumtext,
 c10    text,
 c11    longtext,
 c12    binary(20),
 c13    varbinary(20),
 c14    tinyblob,
 c15    mediumblob,
 c16    blob,
 c17    longblob,
 c18    float,
 c19    double,
 c20    decimal(6,3),
 c21    date,
 c22    time,
 c23    datetime,
 c24    timestamp,
 c25    year,
 c26    boolean,
 c27    json,
 c28    enum('1','2','3'),
 c29    set('a','b','c')
);
```

On the one hand, you can create mapping table by yourself:

```sql
-- run flink sql client
bin/sql-client.sh embedded
-- create a flink table mapping to tidb table
CREATE TABLE tidb(
 c1     tinyint,
 c2     smallint,
 c3     int,
 c4     int,
 c5     bigint,
 c6     char(10),
 c7     varchar(20),
 c8     string,
 c9     string,
 c10    string,
 c11    string,
 c12    string,
 c13    string,
 c14    string,
 c15    string,
 c16    string,
 c17    string,
 c18    float,
 c19    double,
 c20    decimal(6,3),
 c21    date,
 c22    time,
 c23    timestamp,
 c24    timestamp,
 c25    smallint,
 c26    boolean,
 c27    string,
 c28    string,
 c29    string
) WITH (
  'connector' = 'tidb',
  'tidb.database.url' = 'jdbc:mysql://host:port/database',
  'tidb.username' = 'root',
  'tidb.password' = '123456',
  'tidb.database.name' = 'database',
  'tidb.maximum.pool.size' = '1',
  'tidb.minimum.idle.size' = '1',
  'tidb.table.name' = 'test_tidb_type',
  'tidb.write_mode' = 'upsert',
  'sink.buffer-flush.max-rows' = '0'
);
-- insert data
INSERT INTO tidb
VALUES (
 cast(1 as tinyint) ,
 cast(1 as smallint) ,
 cast(1 as int) ,
 cast(1 as int) ,
 cast(1 as bigint) ,
 cast('chartype' as char(10)),
 cast('varchartype' as varchar(20)),
 cast('tinytexttype' as string),
 cast('mediumtexttype' as string),
 cast('texttype' as string),
 cast('longtexttype' as string),
 cast('binarytype' as string),
 cast('varbinarytype' as string),
 cast('tinyblobtype' as string),
 cast('mediumblobtype' as string),
 cast('blobtype' as string),
 cast('longblobtype' as string),
 cast(1.234 as float),
 cast(2.456789 as double),
 cast(123.456 as decimal(6,3)),
 cast('2020-08-10' as date),
 cast('15:30:29' as time),
 cast('2020-08-10 15:30:29' as timestamp),
 cast('2020-08-10 16:30:29' as timestamp),
 cast(2020 as smallint),
 true,
 cast('{"a":1,"b":2}' as string),
 cast('1' as string),
 cast('a' as string)
);
-- set result format
SET execution.result-mode=tableau;
-- query
SELECT * FROM tidb LIMIT 100;
```

On the other hand, you can also use TiDBCatalog in flink sql client by environment file:  `env.yaml`.

```yaml
catalogs:
   - name: tidb
     type: tidb
     tidb.database.url: jdbc:mysql://host:port/database
     tidb.username: root
     tidb.password: 123456

execution:
        planner: blink
        type: batch
        parallelism: 1
```

then run sql-client and query tidb table:

```sql
bin/sql-client.sh embedded -e env.yaml
-- set result format
SET execution.result-mode=tableau;
-- query
SELECT * FROM `tidb`.`default`.`test_tidb_type` LIMIT 100;
```

repository: kioco/TiBigData

repo_name: kioco/TiBigData


text:
# sizeomatic #

sizeomatic is a module that provides methods for approximating the amount of memory being used by a JavaScript object. The results should not be assumed to be precisely accurate, but rather estimates based on useful approximations. It also exports two methods for converting between bytes and larger units of digital storage - which are accurate.

[![NPM](https://nodei.co/npm/sizeomatic.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/sizeomatic/)

```
$ npm install sizeomatic
```

### Type/Size Approximation ###

| Type    | Approximation         |
|---------|-----------------------|
| boolean | 4 bytes               |
| number  | 8 bytes               |
| string  | 2 bytes per character |

### Size Abbreviations ###

| Abbr | Size     |
|------|----------|
| K/k  | Kilobyte |
| M/m  | Megabyte |
| G/g  | Gigabyte |

### Usage ###

```javascript
var sizeomatic = require ('sizeomatic');

var bytes = sizeomatic.howManyBytes('125K');
/* result : 128000 */

var notbytes = sizeomatic.pretty(bytes + 1500);
/* result : 126.465K */

var obj =
{
	b : true,
	n : 12345,
	s : "Hello!",
	a : [ "something", "wicked", "this", "way", "comes" ],
	o : { "everything" : "is awesome!" }
};

var size = sizeomatic.getSize(obj);
/* result: 130 (bytes) */

var rsize = sizeomatic.getSize(JSON.stringify(obj));
/* result: 228 (bytes) */
```

## Methods ##

The following methods are exposed.

### howManyBytes ###

Takes a string representation of an amount of digital storage and returns an integer representation of the number of bytes. The case of the units does not matter, and if you accidentally add a `b` at the end, it will handle that, too.

```javascript
console.log(sizeomatic.howManyBytes('125'));
/* 125 */

console.log(sizeomatic.howManyBytes('125B'));
/* 125 */

console.log(sizeomatic.howManyBytes('125Kb'));
/* 128000 */

console.log(sizeomatic.howManyBytes('125kb'));
/* 128000 */

console.log(sizeomatic.howManyBytes('125m'));
/* 131072000 */

console.log(sizeomatic.howManyBytes('125G'));
/*<PHONE_NUMBER>00 */
```

### getSize ###

Takes a JavaScript object and returns the approximates size in bytes of memory the object is consuming as an integer.

```javascript
var obj =
{
	b : true,
	n : 12345,
	s : "Hello!",
	a : [ "something", "wicked", "this", "way", "comes" ],
	o : { "everything" : "is awesome!" }
};

var size = sizeomatic.getSize(obj);
/* result: 130 (bytes) */

var rsize = sizeomatic.getSize(JSON.stringify(obj));
/* result: 228 (bytes) */
```

> Note that a serialized representation will of an object will return a larger value than the original object because it is being treated as a string.

### pretty ###

Takes an integer representation of a number of bytes and formats it to an appropriate size (precise up to three decimal places) suffixed with the appropriate size abbreviation.

```javascript
console.log(sizeomatic.pretty(125));
/* 125B */

console.log(sizeomatic.pretty(128950));
/* 125.928K */

console.log(sizeomatic.pretty(131672000));
/* 125.572M */

console.log(sizeomatic.pretty(139217728000));
/* 129.657G */
```

repository: scottoffen/sizeomatic

repo_name: scottoffen/sizeomatic


text:
##Readme/F.A.Q.

**Team Members:** Lucian Alacritas, Rashele Raber, Rafidah Pitkin

**Program Name:** GhostWindows Browser Extractor (GBE)

**Program Language:** Perl

**License:** MIT

###What is this?
GBE is a tool created in response to current tools that extract information from web browsers. We expect to make a tool that not only collects history and usage of the browser, but also lists what add-ons and extensions currently installed on it. We also want it to show the data in several ways, such as excel spreadsheets and graphs.

###Why is this useful?
It is useful to see what pages a user has visited frequently, and to see what kinds of extensions they like using. This information can be taken from multiple boxes and then compared to each other. This can give the analyst a good idea of what people are using. Or, if using it on a network, the analyst can see what people have in common with regards to web browsing.

###What did you use to make it?
The tool will be created in Perl.

###What’s its output?
The idea is to use different types of outputs, such as graphs and tables. They can be used to show the different types of information (i.e. history, extensions) in various ways.

###How does it work?
From the main menu, the user can extract the history from four different browsers: Chrome, Firefox, Safari, Opera. This cannot get history from private windows.

###Any limitations or issues?
**Limitations**: Currently only gets the history, not bookmarks or extensions. Does not go through Internet Explorer. <br/>
**Issues**: Firefox history file also stores bookmarks / keywords / etc., which we cannot currently separate.

###Updates:
**2014/10/17** - This document was created!

**2014/10/23** - Added gbe.java

**2014/11/16** - Edited readme to reflect language change

**2014/11/19** - GBE.pl version 1: get info from Chrome + output in command line and excel

**2014/12/14** - GBE version 1.5: from GBE_Menu.pl (main menu), run the programs for Chrome, Firefox, Safari, and / or Opera. Output in command line shows website list and count. Output in Excel shows website list and count, as well as four different graph types (line, pie, bar, column).

gha_language: Perl


text:
# webpack-remote-source-map-loader

A Webpack loader that can locate source maps from their `sourceMappingURL` and fetches remote sources.

This is similar to [source-map-loader] but it has a few additional benefits:

- Download remote sources (like what [scalajs-friendly-source-map-loader] does for [Scala.js]).
- Excluding individual sources.
- Fixing invalid source paths.
- Emitting the source content to a file.

## Getting Started

Install:

```shell
npm install --save-dev remote-source-map-loader
```

Add a rule to your `webpack.config.js`:

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: 'remote-source-map-loader',
      },
    ],
  },
};
```

## Options

### exclude

Type: `String|RegExp|Function` (can be repeated in an array)
Default: `() => false`

A filter used to exclude sources from being processed. They will still appear in the resulting source map in order to
keep the `mappings` intact.

The `String` form is equivalent to `source => source === value`.

The `Regex` form is equivalent to `source => new RegExp(value).test(source)`.

For the `Function` form it should be of the type `(source: string) => boolean`. `source` is the value from the
`sources` array in the source map. The returned value should be something that is truthy/falsey.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          options: {
            exclude: [
              'virtualfile:%3Cmacro%3E',
              / \[synthetic:.*\] /,
              (source) =>
                source.startsWith('temp/node_modules/google-closure-library'),
            ],
          },
        },
      },
    ],
  },
};
```

### cacheDirectory

Type: `String`
Default: `.remote-source-map-loader`

Path to a directory to use for caching remote files.

Any remote files will be fetched and written to this directory. On subsequent executions, if the file exists in this
directory then it will be read from there.

To disable caching set this to `null` or `false`.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          options: {
            cacheDirectory: 'cache',
          },
        },
      },
    ],
  },
};
```

### preFetchTransform

Type: `Function`
Default: `source => source`

A transformation to apply to each source before it is fetched.

The transformed source value will be used for the remainder of the loader including fetching, other transformations and
filters, and in the resulting source map.

The `Function` should be of the type `(source: string) => string`. `source` is the value from the `sources` array in the
source map. The returned value should be a valid URL or file path.

A common use for this is to correct incorrect source maps.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          preFetchTransform: (source) => {
            return source
              .replace(
                '../../../../../../../../lihaoyi/Github/sourcecode',
                'https://raw.githubusercontent.com/lihaoyi/sourcecode/0.2.1'
              )
              .replace(
                '../../../streams/_global/stImport/_global/streams/sources',
                'https://raw.githubusercontent.com/ScalablyTyped/Distribution/master'
              );
          },
        },
      },
    ],
  },
};
```

### postFetchTransform

Type: `Function`
Default:

```javascript
(sourcePath) => {
  if (typeof sourcePath === 'string') {
    const parts = path.parse(path.normalize(sourcePath));
    const noRoot = path.join(parts.dir, parts.base);
    const relativeToAncestor = noRoot
      .split(path.sep)
      .filter((p) => p !== '..')
      .join(path.sep);
    return sourceDir
      ? path.join(sourceDir, relativeToAncestor)
      : relativeToAncestor;
  } else {
    const remotePath = path.join(sourcePath.hostname, sourcePath.pathname);
    return sourceDir ? path.join(sourceDir, remotePath) : remotePath;
  }
};
```

A transformation to apply to each source after it is fetched.

The transformed source will be used to emit the file and/or use in the resulting `sources` (if applicable).

The `Function` should be of the type `(source: string|URL, defaultTransform: (source: string) => string) => string`.
`source` is the value from `preFetchTransform`. `defaultTransform` is the default transform which you can use to chain
with your function.

The returned value should be a valid URL or file path.

A common use for this is to modify where the source is emitted to.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          postFetchTransform: (source, defaultTransform) => {
            return defaultTransform(source).replace(/^node_modules/, 'libs');
          },
        },
      },
    ],
  },
};
```

### includeContent

Type: `Boolean|Function`
Default: `() => true`

Determines whether to include the source content in the source map.

The `Boolean` form is equivalent to `() => value`.

For the `Function` form it should be of the type `(source: string) => boolean`.
`source` is the value from `preFetchTransform`. The returned value should be something that is truthy/falsey.

This has the same effect as setting `noSources: true` in the `SourceMapDevToolPlugin` but is done before the plugin, and
it gives you the ability to control it independently for each source.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          includeContent: false,
        },
      },
    ],
  },
};
```

### emitContent

Type: `Boolean|Function`
Default: `() => true`

Determines whether to emit the source content to a separate file.

The `Boolean` form is equivalent to `() => value`.

For the `Function` form it should be of the type `(source: string) => boolean`.
`source` is the value from `preFetchTransform`. The returned value should be something that is truthy/falsey.

This is something that is currently not possible with the `SourceMapDevToolPlugin`.

The common use case for this is to separate your sources from your source map file for better control, especially when
deploying to production.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          emitContent: false,
        },
      },
    ],
  },
};
```

### sourceDir

Type: `String`
Default: `'src'`

Path to use as the base directory for the default [postFetchTransform](#postfetchtransform) function.

#### Example

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: {
          loader: 'remote-source-map-loader',
          sourceDir: 'private',
        },
      },
    ],
  },
};
```

[scala.js]: https://www.scala-js.org/
[scalajs-friendly-source-map-loader]: https://www.npmjs.com/package/scalajs-friendly-source-map-loader
[source-map-loader]: https://github.com/webpack-contrib/source-map-loader


text:
# ZeroMQ Website

Website is generated using [hugo](https://gohugo.io/), a static website engine
and hosted via [netlify](https://www.netlify.com/).

You can check it out at https://zeromq.org

## Contribute

### Language Pages

Help is needed with the different language pages
https://github.com/zeromq/zeromq.org/tree/master/content/languages.

Please pick one of them and provide:

1. Links to `GitHub`, docs and package manager
2. Download instructions
3. Example

### Documenation Examples

Help is as well needed to translate the examples for different programming
languages and libraries in the documentation.

If you're translating from scratch you the hugo archetype which will create a
stub for each example.

```sh
hugo new --kind examples docs/examples/<your language>/<your framework name>
```

If you're like to add an example copy an existing on from
`content/docs/examples/c/libzmq/<example name>.md` to your language's and
library's folder.

## Run locally

1. Run `npm install` to install CSS and JavaScript dependencies
2. Run `make serve` to compile the website and start the local server

gha_language: HTML


text:
# Configuration

You can configure Trivy-Operator to control it's behavior and adapt it to your needs. Aspects of the operator machinery are configured using environment variables on the operator Pod, while aspects of the scanning behavior are controlled by ConfigMaps and Secrets.

# Operator Configuration

| NAME| DEFAULT| DESCRIPTION|
|---|---|---|
| `OPERATOR_NAMESPACE`| N/A| See [Install modes](#install-modes)|
| `OPERATOR_TARGET_NAMESPACES`| N/A| See [Install modes](#install-modes)|
| `OPERATOR_EXCLUDE_NAMESPACES`| N/A| A comma separated list of namespaces (or glob patterns) to be excluded from scanning in all namespaces [Install mode](#install-modes).|
| `OPERATOR_SERVICE_ACCOUNT`| `trivy-operator`| The name of the service account assigned to the operator's pod|
| `OPERATOR_LOG_DEV_MODE`| `false`| The flag to use (or not use) development mode (more human-readable output, extra stack traces and logging information, etc).|
| `OPERATOR_SCAN_JOB_TIMEOUT`| `5m`| The length of time to wait before giving up on a scan job|
| `OPERATOR_CONCURRENT_SCAN_JOBS_LIMIT`| `10`| The maximum number of scan jobs create by the operator|
| `OPERATOR_SCAN_JOB_RETRY_AFTER`| `30s`| The duration to wait before retrying a failed scan job|
| `OPERATOR_BATCH_DELETE_LIMIT`| `10`| The maximum number of config audit reports deleted by the operator when the plugin's config has changed.|
| `OPERATOR_BATCH_DELETE_DELAY`| `10s`| The duration to wait before deleting another batch of config audit reports.|
| `OPERATOR_METRICS_BIND_ADDRESS`| `:8080`| The TCP address to bind to for serving [Prometheus][prometheus] metrics. It can be set to `0` to disable the metrics serving.|
| `OPERATOR_HEALTH_PROBE_BIND_ADDRESS`| `:9090`| The TCP address to bind to for serving health probes, i.e. `/healthz/` and `/readyz/` endpoints.|
| `OPERATOR_VULNERABILITY_SCANNER_ENABLED`| `true`| The flag to enable vulnerability scanner|
| `OPERATOR_CONFIG_AUDIT_SCANNER_ENABLED`| `false`| The flag to enable configuration audit scanner|
| `OPERATOR_CONFIG_AUDIT_SCANNER_SCAN_ONLY_CURRENT_REVISIONS`| `false`| The flag to enable config audit scanner to only scan the current revision of a deployment|
| `OPERATOR_CONFIG_AUDIT_SCANNER_BUILTIN`| `true`| The flag to enable built-in configuration audit scanner|
| `OPERATOR_VULNERABILITY_SCANNER_SCAN_ONLY_CURRENT_REVISIONS`| `false`| The flag to enable vulnerability scanner to only scan the current revision of a deployment|
| `OPERATOR_VULNERABILITY_SCANNER_REPORT_TTL`| `""`| The flag to set how long a vulnerability report should exist. When a old report is deleted a new one will be created by the controller. It can be set to `""` to disabled the TTL for vulnerability scanner. |
| `OPERATOR_LEADER_ELECTION_ENABLED`| `false`| The flag to enable operator replica leader election|
| `OPERATOR_LEADER_ELECTION_ID`| `trivy-operator-lock`| The name of the resource lock for leader election|

The values of the `OPERATOR_NAMESPACE` and `OPERATOR_TARGET_NAMESPACES` determine the install mode, which in turn determines the multitenancy support of the operator.

| MODE| OPERATOR_NAMESPACE | OPERATOR_TARGET_NAMESPACES | DESCRIPTION|
|---|---|---|---|
| OwnNamespace| `operators`| `operators`| The operator can be configured to watch events in the namespace it is deployed in.                             |
| SingleNamespace| `operators`| `foo`| The operator can be configured to watch for events in a single namespace that the operator is not deployed in. |
| MultiNamespace| `operators`| `foo,bar,baz`| The operator can be configured to watch for events in more than one namespace.                                 |
| AllNamespaces| `operators`| (blank string)| The operator can be configured to watch for events in all namespaces.|

## Example - configure namespaces to scan

To change the target namespace from all namespaces to the `default` namespace edit the `trivy-operator` Deployment and change the value of the `OPERATOR_TARGET_NAMESPACES` environment variable from the blank string (`""`) to the `default` value.

# Scanning configuration

| CONFIGMAP KEY| DEFAULT| DESCRIPTION|
|---|---|---|
| `vulnerabilityReports.scanner`| `Trivy`| The name of the plugin that generates vulnerability reports. Either `Trivy` or `Aqua`.|
| `vulnerabilityReports.scanJobsInSameNamespace` | `"false"`| Whether to run vulnerability scan jobs in same namespace of workload. Set `"true"` to enable.|
| `scanJob.tolerations`| N/A| JSON representation of the [tolerations] to be applied to the scanner pods so that they can run on nodes with matching taints. Example: `'[{"key":"key1", "operator":"Equal", "value":"value1", "effect":"NoSchedule"}]'`|
| `scanJob.annotations`| N/A| One-line comma-separated representation of the annotations which the user wants the scanner pods to be annotated with. Example: `foo=bar,env=stage` will annotate the scanner pods with the annotations `foo: bar` and `env: stage` |
| `scanJob.templateLabel`| N/A| One-line comma-separated representation of the template labels which the user wants the scanner pods to be labeled with. Example: `foo=bar,env=stage` will labeled the scanner pods with the labels `foo: bar` and `env: stage`|

## Example - patch ConfigMap

By default Trivy displays vulnerabilities with all severity levels (`UNKNOWN`, `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`). To display only `HIGH` and `CRITICAL` vulnerabilities by patching the `trivy.severity` value in the `trivy-operator-trivy-config` ConfigMap:

```bash
kubectl patch cm trivy-operator-trivy-config -n trivy-operator \
  --type merge \
  -p "$(cat <<EOF
{
  "data": {
    "trivy.severity": "HIGH,CRITICAL"
  }
}
EOF
)"
```

## Example - patch Secret

To set the GitHub token used by Trivy scanner add the `trivy.githubToken` value to the `trivy-operator-trivy-config` Secret:

```bash
kubectl patch secret trivy-operator-trivy-config -n trivy-operator \
  --type merge \
  -p "$(cat <<EOF
{
  "data": {
    "trivy.githubToken": "$(echo -n <your token> | base64)"
  }
}
EOF
)"
```

## Example - delete a key

The following `kubectl patch` command deletes the `trivy.httpProxy` key:

```bash
kubectl patch cm trivy-operator-trivy-config -n trivy-operator \
  --type json \
  -p '[{"op": "remove", "path": "/data/trivy.httpProxy"}]'
```

[tolerations]: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration

[prometheus]: https://github.com/prometheus


text:
# node-hangman

Simple Node.js based application where you will play Hangman to guess the capital cities of various states.

## Getting Started

Direct your terminal/bash to the root file. Install all Node packages including Inquirer. Then, simply run the index.js file in your Terminal/Bash using Node.js.

## Technologies Used

* Inquirer (https://www.npmjs.com/package/inquirer) - User friendly interface to play the game.

## Deployment

https://github.com/jketring6/node-hangman

## Authors

* **Jordan Ketring** -(https://github.com/jketring6)

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details


text:
## Development/Installation

## Deployment

There are two ways to change settings.  One is to set environment variables (documented below),
and the other is to create a ./local_settings.py file that will override settings in `eventroller/settings.py`

* `PRODUCTION`: set this as a variable to disable DEBUG=True
* `DB_HOSTNAME`, `DB_NAME`, `DB_USERNAME`, `DB_PASSWORD`, `DB_PORT` should all be set for db
* `REDISCACHE` should be in the form of `redis://<IP_ADDRESS>:6379/1` (or comma-separated list of servers).
  The Redis cache is used for caching db-queries (with module `cachalot`) and also supporting
  the reviewer module (to review events) -- without this set, it uses a process instance of `fakeredis`
  which is fine for debugging but not for persisting data or sharing data across servers/processes at all.
* `EVENT_SOURCES`: This should be JSON structured data of information related to EventSource(s).
  It is a dictionary keyed off of the EventSource `name` value, and contains json data that overrides
  what would be in the `crm_data` for the corresponding `crm_type` (also a key)
  This enables the environment or a `local_settings.py` file to have the credentials for a system without
  storing them in a database for security purposes.
* `ALLOWED_HOSTS`: See the Django documentation for this setting -- this is *required* for non-DEBUG deployments
* `FORCE_SCRIPT_NAME`: See Django documentation (useful for setting a base path for the app that it's served from)
* `DJANGO_BASE_SECRET`: sets the Django settings.SECRET_KEY used for password hashing, etc.
* `LAMBDA_ZAPPA`: disables loading of local_settings.py files, which is useful for deploying with
  environment variables from a `zappa_settings.json` file to Amazon Lambda

repository: MoveOnOrg/eventroller

repo_name: MoveOnOrg/eventroller


text:
# Figure 10: Hit rate of presample under various applicaion

The goal of this experiment is to show presample's robustness under various application with fixed cache ratio=10%.

`runner.py` runs all necessary tests and redirect logs to directory `run-logs`.
`parser.py` parses results from log files and generate `data.dat`.
`plot.plt` plots corresponding figure to `fig10.eps`.

The results of optimal is produced by an extra test and is calculated by profiling each batch's access(corresponding log file looks like `run-logs/report_optimal_..._optimal_cache_hit.txt`). This is already included in `runner.py`.

## Hardware Requirements

- Paper's configurations: Two 16GB NVIDIA V100 GPUs. However, UK-2006-05 with weighted sampling requires more than 16GB memory, so this configuration is separatedly executed on another machine with less but larger GPUs. Since only hit rate is reported, the results should be comparable.
- For other hardware configurations, you may need to modify the cache percentage
  -  Modify `L41` in `runner.py`. `percent_gen(10, 10, 1)` means run test at cache ratio 10%.

## Run Command

```sh
> python runner.py
> python parser.py
> gnuplot plot.plt
```

There are serveral command line arguments for `runner.py`:

- `-m`, `--mock`: Show the run command for each test case but not actually run it
- `-i`, `--interactive`: run these tests with output printed to terminal, rather than redirec to log directory.

The number of epochs to run is set to 3 for fast reproduce. You may change line containing `.override('epoch', [3])` to change the numer of epochs.

## Output Example

`python runner.py` will redirect all logs to `run-logs` directory.
```sh
> cat data.dat
cache_policy	cache_percentage	dataset_short	sample_type	app	hit_percent	optimal_hit_percent
random	10.0	PR	kKHop2	gcn	10.010	20.669
random	10.0	TW	kKHop2	gcn	9.930	79.827
random	10.0	PA	kKHop2	gcn	9.960	100.000
random	10.0	UK	kKHop2	gcn	9.840	65.230
random	10.0	PR	kRandomWalk	pinsage	10.000	31.517
random	10.0	TW	kRandomWalk	pinsage	10.000	84.368
random	10.0	PA	kRandomWalk	pinsage	10.000	100.000
random	10.0	UK	kRandomWalk	pinsage	10.000	58.963
random	10.0	PR	kWeightedKHopPrefix	gcn	10.010	24.947
random	10.0	TW	kWeightedKHopPrefix	gcn	9.870	75.405
random	10.0	PA	kWeightedKHopPrefix	gcn	9.950	100.000
random	10.0	UK	kWeightedKHopPrefix	gcn	9.790	66.866
degree	10.0	PR	kKHop2	gcn	19.120	20.669
degree	10.0	TW	kKHop2	gcn	72.720	79.827
degree	10.0	PA	kKHop2	gcn	49.570	100.000
degree	10.0	UK	kKHop2	gcn	28.010	65.230
degree	10.0	PR	kRandomWalk	pinsage	26.000	31.517
degree	10.0	TW	kRandomWalk	pinsage	75.000	84.368
degree	10.0	PA	kRandomWalk	pinsage	52.000	100.000
degree	10.0	UK	kRandomWalk	pinsage	28.000	58.963
degree	10.0	PR	kWeightedKHopPrefix	gcn	21.260	24.947
degree	10.0	TW	kWeightedKHopPrefix	gcn	48.400	75.405
degree	10.0	PA	kWeightedKHopPrefix	gcn	52.170	100.000
degree	10.0	UK	kWeightedKHopPrefix	gcn	32.020	66.866
presample_1	10.0	PR	kKHop2	gcn	20.370	20.669
presample_1	10.0	TW	kKHop2	gcn	74.870	79.827
presample_1	10.0	PA	kKHop2	gcn	98.290	100.000
presample_1	10.0	UK	kKHop2	gcn	61.290	65.230
presample_1	10.0	PR	kRandomWalk	pinsage	30.000	31.517
presample_1	10.0	TW	kRandomWalk	pinsage	75.000	84.368
presample_1	10.0	PA	kRandomWalk	pinsage	97.000	100.000
presample_1	10.0	UK	kRandomWalk	pinsage	50.000	58.963
presample_1	10.0	PR	kWeightedKHopPrefix	gcn	24.370	24.947
presample_1	10.0	TW	kWeightedKHopPrefix	gcn	64.020	75.405
presample_1	10.0	PA	kWeightedKHopPrefix	gcn	97.940	100.000
presample_1	10.0	UK	kWeightedKHopPrefix	gcn	60.810	66.866
```

## FAQ

repository: SJTU-IPADS/fgnn-artifacts

repo_name: SJTU-IPADS/fgnn-artifacts


text:
# Aion-Version-Dll
Aion 4.0 No-IP and Windows 10 mouse fix.

New features for 1.4:
- The IP fix now supports Aion 5.8.
- Added `-disable-xigncode` command line option to prevent xigncode from loading. Only tested in 5.8.

New features for 1.3:
- Fix a bug for the windowed mode mouse fix that could make it stop working after moving the window.

New features for 1.2:
- The Windows 10 mouse fix now works for windowed mode.
- Added the option `-win10-mouse-fix-autodetect` which will automatically enable the mouse fix depending on the OS version.

New features for 1.1:
- Added option to enable all graphics options sliders (shadows, water quality, etc) which are otherwise disabled at high resolutions. This feature is enabled by passing the `-unlimited-gfx` command line argument to aion.bin.

Features:
- Allows the game client to connect to the game server IP specified by the -ip:x.x.x.x command line parameter. (Prevents the error message "No game server is available to the authorization server (6)".)
- Fixes the mouse issue on Windows 10 without needing to run a separate program. This feature is enabled by passing the `-win10-mouse-fix` command line argument to aion.bin.
- The IP fix can be disabled with `-disable-ip-fix` in case you only want to use the mouse fix.

Download: https://github.com/zzsort/Aion-Version-Dll/blob/master/release/AionVersionDll_bin_1.4.zip

To install, copy each version.dll to the respective bin32 or bin64 folder under the Aion client root.

Note: Existing patch dlls should be removed from the bin32/bin64 directories as they may have conflicting functionality.
- Remove: dbghelp.dll
- Remove: d3d8thk.dll
- Remove: d3dx9_38.dll

Tested with the Aion <IP_ADDRESS> game client on Windows 7 and Windows 10.

Building:
This source code depends on Detours from https://github.com/Microsoft/Detours which must be built separately. Set the DETOURS_PATH environment variable to the Detours project root before opening the .sln.