text:
# Mind Map of Quanfied Self and Self-Tracking

[QS Mind Map](https://github.com/markwk/qs_mind_map) is a tool to help you conceptualize different tracking technologies as well as methods to engage with that data and also imagine what's to come. Ultimately it's my attempt to organize the quantified self space and can be thought of as a supplement to [Awesome Quantified Self](https://github.com/woop/awesome-quantified-self), a curated directory of QS resources, apps and more.

Below is the mind map in graphic form as well as an outline of the included areas. You can find an interactive and editable version [here](https://coggle.it/diagram/WzGmNxN_zxZw9MbF/t/quantified-self-tools).

### What is a Mind Map?

A **mind map** is a graphical, visualization technique that is intended to help with structuring, organizing and understanding information as well as facilitate creative thinking. It's is also one of the best ways to synthesize and understand information in general.

### Quantified Self Mind Map

![](https://github.com/markwk/qs_mind_map/raw/master/qs-mind-map-full.png)

QS Mind Map was created using Coggle. Visit https://coggle.it/diagram/WzGmNxN_zxZw9MbF/t/quantified-self-tools to view an interactive version or to copy and augment as your own.

### Outline of QS Mind Map

#### Core of Quantied Self and Self-Tracking

The quantified self technologies space can be divided into three core areas:

1. **Tracking Tech**: Health Tracking, Digital Life Tracking, Wearables and Sensors.
2. **Data Collection and Data Analysis**: These are ways to aggregate and engage with your data. It includes dedicated QS dashboards and code as well as generic data visualization and machine learning platforms.
3. **FutureTech**: This is the cutting edge of self-tracking tech. Various terms get used like biohacking, cyborgs, biosensing and beyond. This is where data gets infused with new human ways of being and becoming.

#### Tracking Tech

##### Health and Fitness Tracking

These are basically ways to monitor your body. Health tracking can often be separated between ways you track your health status, like medical tests, and methods to measure your health activity and fitness, like activity and sports tracking.

- DNA, Genetics, Microbiome
- Blood Testing and Biomarkers
- Body composition and weight
- Heart: Heart Rate, Heart Rate Variability and Blood Pressure
- Sleep
- Diet, Food and Fasting (as well as glucose and metabolism)
- Fitness and Activity, including running, cycling, sports, etc.
- Mood
- Meditation and Mindfulness
- Mind and cognition

##### Digital Life Tracking

For me, basically everything that doesn't include quantifying your body is covered under the rubic of life tracking.

- Time: Manual (Toggl, Harvest), Passive (RescueTime, Screentime, Digital Wellness)
- Productive Activity, including tasks (Toggle), goals, projects, calendar, habits (Habitica, Productive, Streaks)
- Digital Logs, i.e. Email, Twitter, Facebook and Google usage logs, etc.
- Media Consumption, i.e. books (GoodReads), TV (Trakt.tv), articles (Pocket, Instapaper), music (Last.fm), podcasts (PodcastTracker.com), YouTube, photos, etc.
- Money and finances (Mint, Personal Capital)
- Location, movement and places, i.e. GPS
- Tally and life logger tools
- Files, including texts, journals, documents, photos (PhotoStats.io)

##### Wearables and Sensors

- Wearables: Fitbit, Miband, Apple Watch, Garmin, Oura Ring
- Environmental Sensors (ex. weather, temperature, air quality, etc.)

#### 2. Data Collection and Data Analysis

Beyond just tracking, these are different ways to collect, visualize and engage with your data.

##### Data Collection

- Spreadsheets
- Automation (i.e. data connectors and integrations): Tools like IFTTT and Zapier can make it easy to aggregate data. For example, your use it to put data from Fitbit, Todoist Tasks and Strava activities into Google Sheets.
- Aggregators & Dashboards: Several apps and websites exist to help you see all of your data into one place, like Gyroscope, BetterSelf or Exist.io. There are also open source tools and DIY code, like [QS Ledger](https://github.com/markwk/qs_ledger), can facilitating data collection and data visualization.

##### Data Analysis

These are typically data science and spreadsheet tools.

- Data exploration
- Data visualization
- Data Processing
- Data Convergence

##### Data-Driven / Data Usage

There are a few tools today that take tracking data and apply it to actual advice and engagement.

- Data-Driven Feedback
- AI Coaching and Bots:  For example, Lark is an activity chatbot and TrainAsOne is an AI running plan coach.
- Personalized Media Recommendations
- Personalized Health

### 3. FutureTech

This is where science fiction meets reality. I separate this from existing data tracking tech and data analysis tools. Some examples might include:

- Biotech / Infotech

- New Sensors

- New Data Usage

- Shared and Collaborative Data

- Biosensing

- Biohacking

# Additional Resources

-  [Awesome Quantified Self](https://github.com/woop/awesome-quantified-self) - a curated directory of QS resources, apps and more.
- [Markwk.com](http://www.markwk.com) - an on-going blogging project on self-tracking and the data-driven life.

# Feedback? Thoughts? Contributions?

While the term "quantified self" might not be the most popular or even the most descriptive, I find it's the most accessible and used today. Personally, I prefer a more neutral expression like "data-driven" that encompasses the facets of using data to drive decision making and relationship with our reality, world and bodies.

For now, this is my way of conceptualizing the quantified self space. Got an idea, feedback, thought or contribution? Post something in the issue queue or fork this project and come up with your own mind map of QS!

# License

[![CC0](http://mirrors.creativecommons.org/presskit/buttons/88x31/svg/cc-zero.svg)](https://creativecommons.org/publicdomain/zero/1.0/)

To the extent possible under law, [Mark Koester](http://www.markwk.com) has waived all copyright and related or neighboring rights to this work.


text:
##airgap-npm
Some of us are forced to work on airgapped systems (no internet connection).
This makes working with package management systems a real pain. This project contains everything needed to setup an NPM repo on a airgapped system.

##Setup
Follow all setup instructions on machine with internet connection.

```
  git clone git@github.com:nreese/airgap-npm.git
```

###Install Sinopia
Sinopia, https://github.com/rlidwka/sinopia, is an excellent NPM repo and the basis for this solution.

Sinopia install instructions suggest a global install. This project requires something more self contained. As such, follow the instructions below to install sinopia into a folder that can easily be compressed and tranfered with physical media.

```
cd airgap-npm/sinopia
npm install
```

###Load dependencies
* Start sinopia

```
cd airgap-npm/sinopia
./start.sh
```

* Configure NPM to use sinopia

```
npm set registry http://localhost:4873
```

* Load required global packages into sinopia. Below is an example for Gulp

```
sudo npm install gulp --global
```

* Load required local packages into sinopia. Update dependencyProject/package.json with all dependencies needed on air gapped system.

```
//airgap-npm/dependencyProject directory or any directory containing package.json
npm install
```

##Test it
There is nothing worse than bringing in a new repo only find that a dependency is missing. Test your repo to insure you can do a clean build without internet access.
* turn off wifi
* delete local npm cache
```
cd ~
rm -rf .npm/*
```

* delete global npm cache. Below is an example for Gulp

```
sudo npm uninstall gulp --global
```

* Configure sinpoia to only serve packages from storage. Update `sinopia/config.yaml`, commenting out the lines and restart sinopia

```
uplinks:
  npmjs:
    url: https://registry.npmjs.org/
```

* Load global and local npm packages.

##SneakerNet
* Compress the sinopia directory and export to physical media. Transfer physical media to airgapped network.
* Uncompress and start sinopia
* Configure NPM to use sinopia

```
npm set registry http://npmhost:4873
```

* Run npm installs on airgapped network just like you would on a network with internet connectivity.

repository: nreese/airgap-npm

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: nreese/airgap-npm


text:
# Choosing an event store

You must decide which event store to use with Commanded. You have a choice between two existing event store adapters:

- PostgreSQL-based Elixir [EventStore](https://github.com/commanded/eventstore).

- Greg Young's [Event Store](https://geteventstore.com/).

There is also an [in-memory event store adapter](https://github.com/commanded/commanded/wiki/In-memory-event-store) for *test use only*.

Want to use a different event store? Then you will need to [write your own event store provider](#writing-your-own-event-store-provider).

---

## PostgreSQL-based Elixir EventStore

[EventStore](https://github.com/commanded/eventstore) is an open-source event store using PostgreSQL for persistence, implemented in Elixir.

Please follow the [Getting started](https://github.com/commanded/commanded-eventstore-adapter#getting-started) guide to install and configure the EventStore adapter.

---

## Greg Young's Event Store

[Event Store](https://geteventstore.com/) is an open-source, functional database with Complex Event Processing in JavaScript. It can run as a cluster of nodes containing the same data, which remains available for writes provided at least half the nodes are alive and connected.

The quickest way to get started with the Event Store is by using their official [Event Store Docker container](https://store.docker.com/community/images/eventstore/eventstore).

The Commanded adapter uses the [Extreme](https://github.com/exponentially/extreme) Elixir TCP client to connect to the Event Store.

Please follow the [Getting started](https://github.com/commanded/commanded-extreme-adapter#getting-started) guide to install and configure the EventStore adapter.

### Running the Event Store

You **must** run the Event Store with all projections enabled and standard projections started.

Use the `--run-projections=all --start-standard-projections=true` flags when running the Event Store executable.

---

## Writing your own event store provider

To use an alternative event store with Commanded you will need to implement the `Commanded.EventStore` behaviour. This defines the contract to be implemented by an adapter module to allow an event store to be used with Commanded. Tests to verify an adapter conforms to the behaviour are provided in `test/event_store_adapter`.

You can use one of the existing adapters ([commanded_eventstore_adapter](https://github.com/commanded/commanded-eventstore-adapter) or [commanded_extreme_adapter](https://github.com/commanded/commanded-extreme-adapter)) to understand what is required.

license: MIT

repository: pablobm/commanded

path: /guides/Choosing an Event Store.md

filename: Choosing an Event Store.md

repo_name: pablobm/commanded


text:
---
title: Lebanon Crisis
date: Wednesday September 30th, 2020
thumbnail: /images/uploads/lebanon.jpg
category: Insight
---
# What happened?

On August 4th 2020, at the Port of Beirut, in Beirut, Lebanon, a catastrophic explosion left at minimum 180 people dead with thousands of injuries. This was the result of a 2,750 ton accumulation of chemicals such as ammonium nitrate, being stored in the area for around 6 years. This large supply of ammonium nitrate came at the time of November 2013 from a Russian ship. The initial plan of this ship's journey was from Georgia to Mozambique, but it was abandoned, hence left for 6 years.

# The Devistation

This occurrence consisted of two explosions; the first explosion which sent up a plume of smoke with several light flashes. The second explosion was caused by the large amount of chemicals (including ammonium nitrate). The catastrophic second explosion can be compared to that of an earthquake. According to the United States Geological Survey, the seismic waves caused by the explosion were equivalent to a 3.3-magnitude earthquake. This explosion was so wide-ranging that it was felt 100 miles away in Cyprus. Around the port, many cars were flipped and destroyed. The impact was so strong to the extent of flipping a 390-foot long cruise ship. Buildings collapsed, ceilings, windows, and walls were destroyed, and around 300,000 people were displaced from their homes.

# Relief Efforts

These are the organizations that are taking donations and working day and night to support the Lebanese citizens affected by this catastrophe.

Lebanese Red Cross:

- They are currently dispatching ambulances to North Lebanon, Bekaa, South Lebanon and Beirut, to assist with search-and-rescue operations, and treating injured citizens. To donate to the Lebanese Red Cross, click [here](https://www.supportlrc.app/donate/donate).

United Nations' World Food Program:

- Food is being provided from The United Nations' World Food Program for those affected by the blast. Food prices have risen due to the explosion taking place in the port where most of the food is imported. The need for donations is essential to help food get to those who need it. To donate to the United Nations' World Food Program, click [here](https://secure.wfpusa.org/donate/urgent-support-emergency-humanitarian-response-lebanon?ms=2008_UNR_LebanonEmergency_NYT_WEB).

International Medical Corps:

- The International Medical Corps is another medical and mental health care service that provides help for those affected by this tragedy. To donate to the International Medical Crops, click [here](https://give.internationalmedicalcorps.org/page/65328/donate/1?ea.tracking.id=DP~LB21~DPHPL2108).

Islamic Relief:

- Islamic Relief is an organization that is particularly for food aid and emergency response. To donate to the Islamic Relief organization, click [here](https://irusa.org/middle-east/lebanon/?utm_source=Website&utm_medium=Social%20Media&utm_campaign=Lebanon%20Emergency).

Unicef:

- UNICEF specializes in aid to children as well as providing medical attention, vaccines, and clean water. To donate to UNICEF, click [here](https://www.unicefusa.org/?form=LebanonEmergency&utm_campaign=20200805_Emergencies&utm_medium=Referral&utm_source=PRGeneralOnline+Broadcast&utm_content=LebanonDonate&ms=Referral_PRL_2020_Emergencies_20200805_PRGeneralOnline+Broadcast_LebanonDonate_none_none&initialms=Referral_PRL_2020_Emergencies_20200805_PRGeneralOnline+Broadcast_LebanonDonate_none_none).

gha_language: Vue

gha_license_id: MIT


text:
---
author: chipoglesby
comments: true
date: 2011-07-12 14:17:50+00:00
excerpt: 'There’s another interesting, somewhat overlooked feature of the Google+
  platform that could ultimately benefit both Google and advertisers: Check-ins. As
  more users push towards using mobile first, this is quickly becoming a burgeoning
  area for opportunity among small business owners.

  '
layout: post
slug: google-location-data
title: What will Google do with all of its location data?
wordpress_id: 27383
categories:
- sidenote
tags:
- geolocation
- Google
- location
- ogf
---

If you follow any news about Google, undoubtedly you know that Google has released a new social network called Google+. At it’s core, Google+ brings the best of each social networking platform to this new service: updates, social sharing, photos and check-ins. **IF** Google+ is successful, it’s going to be huge for them. Why? They’re accomplishing exactly what shareholders want, users spending more time on _their_ site with _their_ products.

But there’s another interesting, somewhat overlooked feature of the Google+ platform that could ultimately benefit both Google and advertisers: Check-ins. As more users push towards using mobile first, this is quickly becoming a burgeoning area for opportunity among small business owners.

Let's take a look at the tools that Google has under it's tool belt:

## [Android](http://www.android.com/)

![](https://s3.amazonaws.com/chipoglesby.com/wp-content/uploads/2011/06/google/googleandroid.jpg)

The Android platform is ground-zero for this entire idea. Everything will feed into the phone and use it's GPS to determine the user's location and which deals are available based on checkins through Google+ and past Google Offers.

## [Google Wallet](http://www.google.com/wallet)

![](https://s3.amazonaws.com/chipoglesby.com/wp-content/uploads/2011/06/google/googlewallet.jpg)

<blockquote>[From the Walstreet Journal:](http://online.wsj.com/article/SB10001424052702304887904576398220617110318.html) By 2014, 70% of U.S. consumers will have smartphones and 52% of those will be NFC-capable, according to estimates by payment consultancy Mercator Advisory Group. Already, app developers, wireless carriers, banks and card companies are racing to shape the potentially lucrative mobile-payments ecosystem. Google also is working with 16 retailers, including American Eagle Outfitters Inc., Walgreen Co., Macy's and Subway, to develop its own point-of-sale service, called SingleTap. Under this system, consumers will be able to pay with credit accounts stored on the phone, redeem promotions and earn loyalty points.</blockquote>

Google Wallet is currently being beta tested in San Francisco and New York, but there should be larger markets opening up by the end of the year.

## [Google Places/hotpot](http://www.google.com/places)

![](https://s3.amazonaws.com/chipoglesby.com/wp-content/uploads/2011/06/google/googlehotpot.jpg )

Businesses can use Google Places to help improve their search results. This can be helpful for both desktop and mobile users. The Google Places app on Android allows users to read reviews as well as check-in to businesses on Latitude and Google+. The more a user checks in, the more rewards they could earn. There's also a mobile version for web users as well as an iPhone version where users can also leave reviews of the business. Businesses can also offer special deals on the web version of their Google Places page to help entice customers to visit their stores.

## [Google+](http://plus.google.com)

![](https://s3.amazonaws.com/chipoglesby.com/wp-content/uploads/2011/06/google/googleplus.jpg)

Goolge+ has a better chance with users adopting checkins than Google Latitude because it's a new service and most users on Google+ might not realize Latitude can run in the background on their phone tracking their every move. Most users are accustomed to checking in on foursquare, gowalla or facebook places, so this would be a welcome addition to most users. It is yet to be seen how Google+ will integrate checkins with Google Places and rewards.

## [Google Latitude](http://www.google.com/latitude)

![](https://s3.amazonaws.com/chipoglesby.com/wp-content/uploads/2011/06/google/latitudecheckins.jpg)

Google Latitude is where things really start to get interesting. Being able to track movements over time as well as the ability to automatically checkin using geo-fencing opens up new possibilities on the analytical side for Google Places.

## [Google Offers](http://www.google.com/offers)

![](https://s3.amazonaws.com/chipoglesby.com/wp-content/uploads/2011/06/google/googleoffers.jpg)

Currently beta testing in Portland, [New York City and The Bay Area](http://googleblog.blogspot.com/2011/07/google-offers-beta-launching-in-new.html). Google Offers is likely to be a competitor to Groupon. Users can buy discounts to their favorite restaurants.

## Tying it all together

Theoretically, if Google were to tie all of this information together, here's what I think will happen:

Since all Android phones require a Google account to work, there will be at least one way to track each individual user. As the popularity of Google+ increases, it will become harder for most users to resist using Google+.

Some of these users will ultimately start checking into places with their friends creating yet another piece of the puzzle. Using Latitude's History tracking, Google can create a profile based on each users most likely time to visit their favorite bar.

Because the phone uses Google Wallet and the user has used it in the past, Google can build a profile of what that customer is most likely to buy.

Since Google can understand the sentiment of the customers visit based on their review, it will know if they are most likely to return again in the future.

Google can the use Google offers to precisely target the customer based on past history, offering them coupons for items their most likely to buy.

Google could help small businesses target and reward a select and highly active group of people without breaking the bank by offering deals such as what we see daily on Groupon.

Which would be a better deal, offer 53 highly active customers 1/2 dinner and 12 somewhat active customers a free appetizer when they check in with two friends or selling 1,000 $25 for $50 worth of cuisine to everyone in your town?

Eventually Google will have the metrics and data to support all of this, but how will customers and users react?

Some advocacy groups will cry foul and see this as an invasion of privacy, but Google answers to its shareholders who demand more ROI from Google's products.

This type of service would also be a direct competitor with Groupon and Foursquare. It will be interesting to see how the market reacts if something like this were to happen.

gha_language: JavaScript


text:
---
layout: default
---

# 1997-04-25 - Fraud Without Frontiers

## Header Data

From: John Young<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: d2f6755378c1c6170bcc318e2f31d4fde7bf69b4d032c2a9024450fd67bbfc44

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-04-25 17:01:54 UTC

Raw Date: Fri, 25 Apr 1997 10:01:54 -0700 (PDT)

## Raw message

```
{% raw  %}From: John Young<EMAIL_ADDRESS>Date: Fri, 25 Apr 1997 10:01:54 -0700 (PDT)
To<EMAIL_ADDRESS>Subject: Fraud Without Frontiers
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

FT reports on a new Deloitte & Touche report, "Fraud
Without Frontiers" on the EU "fraud paradise." It sees
10 areas of concern:

  "Computer abuse, banking frauds, counterfeiting,
  investment fraud, confidence tricks, public sector
  fraud, fraudulent bankruptcy, insurance fraud,
  smuggling and money laundering.

  The largest single threat comes from fraud through the
  Internet. The potential for abuse of computer systems
  is huge, particuarly since encryption technology is
  vulnerable to sophisticated computer users. The Internet
  is now being used to manipulate financial markets.

  Fraudsters are becoming more sophisticated. Inside dealers
  are making more use of offshore havens to avoid detection
  while criminal syndicates with knowlege of banking
  practice have cheated banks.

  'Offshore havens', some inside the EU, remains a common
  feature of fraud. But with some EU economies closely
  linked to the offshore world, the incentive to push for
  reform in this area is limited"

The report is available from D&T-UK for L95. (Hint, send)

  http://www.deloitte-touche-consulting.co.uk/main.html

-----

D&T has a Web page, "Taking the Mystery Out of ..." which
gives solace about encryption, passwords, firewalls,
kerberos, and such:

  http://www.dttus.com/dttus/publish/mystery/mystery1.htm

{% endraw %}
```

## Thread

+ Return to [April 1997](/archive/1997/04)

+ Return to "[John Young <jya@pipeline.com>](/authors/john_young_jya_at_pipeline_com_)"

+ 1997-04-25 (Fri, 25 Apr 1997 10:01:54 -0700 (PDT)) - Fraud Without Frontiers - _John Young<EMAIL_ADDRESS>


text:
---
ENTRYTYPE: article
added: 2021-09-15
authors:
- Harish Dattatraya Dixit
- Sneha Pendharkar
- Matt Beadon
- Chris Mason
- Tejasvi Chakravarthy
- Bharath Muthiah
- Sriram Sankar
bibsource: dblp computer science bibliography, https://dblp.org
biburl: https://dblp.org/rec/journals/corr/abs-2102-11245.bib
eprint: '2102.11245'
eprinttype: arXiv
journal: CoRR
layout: paper
link: https://arxiv.org/abs/2102.11245
read: true
readings:
- 2021-09-15
timestamp: Wed, 24 Feb 2021 15:42:45 +0100
title: Silent data corruptions at scale
url: https://arxiv.org/abs/2102.11245
volume: abs/2102.11245
year: 2021
notes:
- Hardware faults
papers:
- hochschild:hotos:2021
---

This paper explores the same problem as [hochschild:hotos:2021]: CPUs that
silently give incorrect results without any detection or correction mechanism (like, for example,
ECC on SRAM/DRAM).
Unlike radiation-induced failures that are transient, they are interested in more consistent
and higher frequency failures that they observe in datacenters due to timing errors, manufacturing
variation, degradation and end-of-life wearout and associated with increased transistor density
and wider datapaths.

They do a detailed case study of debugging one failure on one particular core on one chip.
In a distributed filesystem, they found that the
Scala power function was returning zero for non-zero input (for double-precision floats)

    pow(1.1, 53) = 0

but

    pow(1.1, 52) = 142

But, debugging JITed languages like Scala is non-trivial (can't just use gdb).
And minimizing binary code takes care.
Eventually, they reduce 146K to 60 lines of assembly and find both positive and
negative exponents that fail including the following examples.

    1.1 ^ 3 = 0 (should be 1)
    1.1 ^ 107 = 32809 (should be 26854)
    1.1 ^ -3 = 1 (should be 0)

{% include links.html %}

repository: alastairreid/RelatedWork

branch_name: refs/heads/main

gha_language: TeX

repo_name: alastairreid/RelatedWork


text:
# Tandematcher Version 1.0
#### A simply Python script that I created in my first year of university for a student club to match language learners together based on their skills / goals.
## Installation guide
### Step 1: Install python3
### Step 2: Follow the first two steps of the Google Sheets v4 quickstart [document](https://developers.google.com/sheets/api/quickstart/python)
### Step 3: Download MySQL, create an account, a database, and save it to a file titled 'config.py'.
```
connection_id = {
              'user': enter your username between two single quotes,
              'password': enter your password between two single quotes,
              'host': 'localhost',
              'database': enter the name of your database here
}

```
### Step 4: In MySQL, run create_tables_tdmatcher.sql
### Step 5: Download the Python/MySQL database connector
### Step 6: Run main.py to start the program

repository: stefannesic/tandematcher

repo_name: stefannesic/tandematcher


text:
# data-schemas
This is the repository of Materials Data Facility schemas (in [JSONSchema](https://json-schema.org/) format) and MDF Connect auxillary data (in JSON format).

## Access with MDF Forge
Schemas and organization data can be accessed in a more human-friendly way via [MDF Forge](https://github.com/materials-data-facility/forge).

To install Forge with `pip`:
```
pip install mdf-forge
```
To fetch the details of a schema (the `dataset` schema, in this example):
```python
from mdf_forge import Forge
mdf = Forge()
mdf.describe_field("dataset")
```
To fetch the details of an organization (Center for Hierarchical Materials Design (CHiMaD) in this example):
```python
from mdf_forge import Forge
mdf = Forge()
mdf.describe_organization("CHiMaD")
```
More details on the `.describe_field()` and `.describe_organization()` methods can be found in the [Forge documentation](https://mdf-forge.readthedocs.io/en/master/mdf_forge.html#mdf_forge.Forge.describe_field), which includes [examples](https://mdf-forge.readthedocs.io/en/master/tutorials/4-General_Helper_Functions.html#describe_field).

## Reading this repository
Usually, it is not necessary to read these files directly.

If you want to read the raw JSONSchemas, all of them are in the `schemas` directory. The primary schemas for MDF are `dataset`, `record`, and `connect_submission`, which link to the other schemas using `$ref`. The `dataset` and `record` schemas cover both types of metadata entry in [MDF Search](https://petreldata.net/mdf/?q=*&filter-match-any.mdf.resource_type=dataset), while the `connect_submission` schema covers the JSON payload expected by the [MDF Connect](https://connect.materialsdatafacility.org/) service (the Connect schema is built automatically with the web form or the [MDF Connect Client](https://github.com/materials-data-facility/connect_client)).

If you want to read the raw auxillary data, the files are in `connect_aux_data`. The primary file is `organizations.json`, which contains information on the organizations registered with MDF Connect.

# Support
This work was performed under financial assistance award 70NANB14H012 from U.S. Department of Commerce, National Institute of Standards and Technology as part of the Center for Hierarchical Material Design (CHiMaD). This work was performed under the following financial assistance award 70NANB19H005 from U.S. Department of Commerce, National Institute of Standards and Technology as part of the Center for Hierarchical Materials Design (CHiMaD).

repository: materials-data-facility/data-schemas

gha_language: Python

repo_name: materials-data-facility/data-schemas


text:
## 📋 Contributing to Slash !

Thank you so much for taking an interest in contributing! We are delighted when people want to contribute to Slash! There are many ways to contribute to this project!

## 🤔 What should I know before I get started?

1. Check [README.md](https://github.com/NCSU-Group7-SE2021/slash/blob/main/README.md)
2. Check [requirements.txt](https://github.com/NCSU-Group7-SE2021/slash/blob/main/requirements.txt)
3. Check [setup.py](https://github.com/NCSU-Group7-SE2021/slash/blob/main/setup.py)
4. Check [issues](https://github.com/NCSU-Group7-SE2021/slash/issues).

Understand the current and future scope.

## 🪲 Reporting Bugs
This section guides you through submitting a bug report for this repository. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports. Before creating bug reports, please perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one. Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.

### How Do I Submit A (Good) Bug Report?

Bugs are tracked as GitHub issues. After you've determined which repository your bug is related to, create an issue on that repository and provide the following information by filling in the template.

Explain the problem and include additional details to help a developer reproduce the problem:
*	Use a clear and descriptive title for the issue to identify the problem.
*	Describe the exact steps which reproduce the problem in as many details as possible. Along with it, provide the details regarding the name and version of OS, Python version, configuration of the environment, if used any.
*	Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/paste able snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
*	Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
*	Explain which behavior you expected to see instead and why.
*	If the problem is related to performance or memory, include details of the errors encountered with your report.
*	Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.

### Before Submitting A Bug Report

Please check existing bug reports instead of opening a new one. There is a possibility that there are fixes already posted for bugs. If not, you are welcome to submit a bug report and we will look into it as soon as possible.

## 📝 Suggesting Enhancements and New features

This section guides you through submitting an enhancement suggestion for this project:

### How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as GitHub issues. Create an issue on that repository with an enhancement or feature tag and provide the following information:
*	Use a clear and descriptive title for the issue to identify the suggestion.
*	Provide a step-by-step description of the suggested enhancement in as many details as possible.
*	Provide specific examples to demonstrate the steps. Include copy/paste able snippets which you use in those examples, as Markdown code blocks.
*	Describe the current behavior and explain which behavior you expected to see instead and why.
*   Documentation is an integral part of our repository. Submit updates and improvements to documentations.
*   Share with us any new exciting feature you might have in mind.

## 🙇 Pull Requests
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
2. Update the [README.md](https://github.com/NCSU-Group7-SE2021/slash/blob/main/README.md) with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the [README.md](https://github.com/NCSU-Group7-SE2021/slash/blob/main/README.md) to the new version that this Pull Request would represent. The versioning scheme we use is SemVer.
4. After submitting your PR, the first thing you would want to do will be a self review. Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc).
5. One or more maintainers will use GitHub's review feature to review your PR.
6. If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as needs-tests) will be added depending on the review.
7. If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly.
8. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

## 👒 Styleguides

### Git Commit Messages
*	Use the present tense ("Add feature" not "Added feature")
*	Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
*	Limit the first line to 72 characters or less
*	Reference issues and pull requests liberally after the first line
*	When only changing documentation, include [ci skip] in the commit title

### Git Branching Naming Convention
Not using appropriate naming conventions leads to confusion and complicates the code maintenance team. We can’t ignore Git best practices in branching naming conventions.

- Main (main) is the default branch available in the Git repository. It should be stable all the time and won’t allow any direct check-in. You can only merge it after code review. All team members are responsible for keeping the master stable and up-to-date.

- Make sure the new branch you create follows proper naming conventions.
```<author>-<date in (DD-MMMM) format>-<short-feature-description>```

 E.g., rahil-6-sept-test-badge
E.g., moksh-7-sept-web-scraping

This method allows for easy tracking of different developers’ work and progress with additional systems.

## ✔ Attribution
These Contributing guidelines are adapted from the [Atom's](https://github.com/atom/atom/blob/master/CONTRIBUTING.md) contributing guidelines.

## 💻 Contributors

### Phase 3 Team Members
- [Rahul Kalita](https://github.com/rahulkalita8)
- [Vignesh Muthukumar](https://github.com/vickymhs)
- [Eshita Arza](https://github.com/ArzaEshita)
- [Luis](https://github.com/lgdeloss)
- [Isha Gupta](https://github.com/isha-bansal0115)
- [Kiran Teja](https://github.com/kirantejatummuri)

### Phase 2 Team Members
* [Anirudh Pande](https://github.com/apande95)
* [Bradley Erickson](https://github.com/bradley-erickson)
* [Lalit Bangad](https://github.com/lalit10)
* [Pratyush Vaidya](https://github.com/Pratyush1184)
* [Urvashi Kar](https://github.com/Urvashi74)


text:
# WebView Android Dating App

### The Dating Android App for the [Local Irish Dating Site](http://dublin.meetlovelypeople.com), **Meet Lovely People**.
#### Meet Local Irish People in Dublin City!

![MeetLovelyPeople Homepage - Example of the Irish Android Dating App](_screenshots/meetlovelypeople-dating-android-app.png)

## Overview

This app is used for [Meet Lovely People](http://meetlovelypeople.com) Local website for Dubliners.

The design of MeetLovelyPeople is responsive that means we can easily create native apps without lot of code by only by using WebView.

## Want to do the Same?

You can also create a dating business for free with for example this **[Free Responsive Dating App Builder](http://ph7cms.com)**.

You will be able then when your site is live to edit this app and change only `public final static String DOMAIN_SITE = "dublin.meetlovelypeople.com";` by the domain of your site like `public final static String DOMAIN_SITE = "my-ph7cms-dating-app.com";`

Finally, for changing the name of your app, just edit `/app/src/main/res/values/strings.xml` and change the second line like the following: `<string name="app_name">My Awesome Social Dating App</string>`

Then don't forget to compile the project and build the APK file.

## Author

Pierre-Henry Soria

## Contact

contact {AT} hizup {D0T} net

## Need a Professional Dating Site/App...?

Feel free to Say Hello here in the UK and asking a free quote to our **[Web Agency](http://hizup.uk)**.

## License

This App and Code is under [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) or later; Check the LICENSE.txt file for more details.

repository: MeetLovelyPeople/AndroidApp

repo_name: MeetLovelyPeople/AndroidApp


text:
# React Router - Add some routes

The next step consist in creating at least 2 pages in our app. The home page
already contains a list of names and it's our page n.1, we are going to link
each name to it's own personal page where we will show some more data.

Before you move forward I suggest you open `/src/App.css` and edit the height
of the default `create-react-app` header:

change:

    .App-header {
        min-height: 100vh;

to:

    .App-header {
        min-height: 270px;

This small change will make it more comfortable to read the people's list and the
details page.

### User details page

Now create a dummy UserPage container (we will work more on it later)
in `/src/features/users/UserPage.container.js`:

    import React from 'react'

    const UserPage = ({ match }) => (

user page route - id: {match.params.id}

    )

    export default UserPage

and remeber to export it from the [feature's manifest](./features.md)
`/src/features/users/index.js`:

    export const UserPage = loadable({
        loader: () => import(/* webpackChunkName: "UserPage" */'./UserPage.container'),
        loading: () => 'loading...'
    })

### Declare your routes

Open `/src/App.js` and compose your app's main routes declaration. Consider that `react-router`
is very flexible and allows you do deep nest routes. _You don't have to write them all here!_

    import { Switch, Route } from 'react-router-dom'
    import { Users, UserPage } from './features/users'

    ...

    <Switch>
        <Route exact path="/" component={Users} />
        <Route path="/user/:id" component={UserPage} />
    </Switch>

### Link the user's pages

The very last step would be to use a `Link` component and transform your list of users
into a list of link in `/src/features/users/Users.container.js`:

    import { Link } from 'react-router-dom'

    ...

    render () {

        ...

        return (

                {this.props.list.map(user => (
                    <li key={`user-${user.id}`}>
                        <Link to={`/user/${user.id}`}>
                            {user.name}
                        </Link>

                ))}

        )
    }

## Run and test!

I strongly suggest you try to run your app in development mode first:

    npm start

This will only execute Webpack and the default `create-react-app` pipeline.
The expected result is a splash screen that disappear almost right away
followed by your home page that consist now in a list of links.

Clicking any of the links you should be able to access the dummy user details page
as shown in the following screenshots:

![users list with links](../images/react-ssr__router.png)
![read data from params](../images/react-ssr__router-route.png)

If this works without troubles you can test the production version where the
server side rendering takes effect:

    npm run start:prod

> Remember that this may take a while to spin up as there are a few building steps that
> your machine need to go through!

The end result should be alike what you have seen in development, but without the splash screen
as all the heavy lifting was performed in the backend!

This is not much for now, but the routing is in place and up for the job.

In the next chapter we are going to fetch more data and render a rich details page for each user.

repository: forrestjs/forrestjs

repo_name: forrestjs/forrestjs


text:
# LifeQualityViz

The dashboards are **available online** in the following links:

- Intuitive: http://life.ahci.work/map
- Detailed:  http://life.ahci.work/chart
- Compact:   http://life.ahci.work/dots

A dashboard to predict people's happiness in different cities across the U.S. using different viusalizations.

### Linear regression plot:

### Chernoff Faces:

### Dotplot viz to represent probability:

repository: DoubleBlindReviewsHCI/LifeQualityViz

repo_name: DoubleBlindReviewsHCI/LifeQualityViz


text:
![image](https://user-images.githubusercontent.com/5803001/52098243-32c76400-2609-11e9-89b1-ac03cb9aab3b.png)

# winter-boot

Another not fast, but lightweight homemade HTTP service framework, based on Netty.

# Credits & Motivation

- [cicada #Project#](https://github.com/TogetherOS/cicada): Fast, lightweight Web framework based on Netty; without too much dependency, and the core jar package is only 30KB.

- [Ninja #Project#](https://github.com/ninjaframework/ninja): Ninja is a full stack web framework for Java. Rock solid, fast and super productive.

- [redant #Project#](https://github.com/all4you/redant): A lightweight distributed web container based on Netty 一个基于Netty的轻量级Web容器


text:
---
title: Scripting
layout: usermanual-page.hbs
position: 11
---

Scripts are how you make your PlayCanvas application interactive. They are written in regular **JavaScript** the same programming language that is used to program web pages.

You can think of your application as divided into two separate code bases. The Engine, which is provided by PlayCanvas, implements general purpose functionality such as graphics rendering, input handling, audio, and the interface to the PlayCanvas tools; and Scripts which are often specific to your application or re-usable chunks that provide useful behaviors.

Generally you won't have to worry about the engine code, it's a single JavaScript file included into your application. If you're rewriting parts of the engine you probably don't need this introduction to scripting.

Here is an example of a simple script. It is called "rotate" and it rotates the entity that it is attached to by 10° every second.

```javascript
var Rotate = pc.createScript("rotate");

Rotate.prototype.update = function (dt) {
    this.entity.rotate(0, 10*dt, 0);
};
```

Scripts are defined by the name given when they are created and they are attached to [Script Component][1] via the Editor or by adding a script component to an Entity in your code.

## Terminology

Lets define a few pieces of terminology.

* ***Script*** A script is a Javascript file that contains one or more definitions of Script Objects.
* ***Script Component*** The script Component is defined in the PlayCanvas engine and gives a game Entity the functionality that loads a script and creates a script object.
* ***ScriptType*** A ScriptType is a JavaScript object created using the `pc.createScript` function. It is essentially a new class which will be instantiated when it is added to an Entity.
* ***Script Instance*** A script instance is an instance of a ScriptType. One script instance is created for every Entity that has a ScriptType attached to a script component.

[1]: /user-manual/packs/components/script/

branch_name: refs/heads/dev


text:
Art Of Sequence - Super Repository
==================================

This is the super repository gathering all Art Of Sequence
projects together (using sub-repositories).

This repository is for convenience for developers wanting
to work on several AOS projects at once (as they are related).
Therefore, it will be changed only on important changes of the
referred projects.
You wil have to fetch changes from their origin repository yourself
to get the lastest changes. See git documentation for details.

Project dependencies are solved using CMake where necessary.

repository: joonhwan/aos-all

repo_name: joonhwan/aos-all


text:
# Perceptron

A Perceptron is an algorithm for supervised learning of binary classifiers. This algorithm enables neurons to learn and processes elements in the training set one at a time.

![img](https://www.simplilearn.com/ice9/free_resources_article_thumb/general-diagram-of-perceptron-for-supervised-learning.jpg)

# Perceptron at a Glance

Perceptron has the following characteristics:

- Perceptron is an algorithm for Supervised Learning of single layer binary linear classifier.
- Optimal weight coefficients are automatically learned.
- Weights are multiplied with the input features and decision is made if the neuron is fired or not.
- Activation function applies a step rule to check if the output of the weighting function is greater than zero.
- Linear decision boundary is drawn enabling the distinction between the two linearly separable classes +1 and -1.
- If the sum of the input signals exceeds a certain threshold, it outputs a signal; otherwise, there is no output.

Types of activation functions include the sign, step, and sigmoid functions.

## Introduced by Frank Rosenblatt in 1957

# Function

Perceptron is a function that maps its input “x,” which is multiplied with the learned weight coefficient; an output value ”f(x)”is generated.

![img](https://www.simplilearn.com/ice9/free_resources_article_thumb/mathematical-function-representation-of-perceptron.jpg)

In the equation given above:

“w” = vector of real-valued weights

“b” = bias (an element that adjusts the boundary away from origin without any dependence on the input value)

“x” = vector of input x values

![img](https://www.simplilearn.com/ice9/free_resources_article_thumb/value-of-vector-of-input-x-values-in-perceptron-function.jpg)

“m” = number of inputs to the Perceptron

The output can be represented as “1” or “0.”  It can also be represented as “1” or “-1” depending on which activation function is used.

## Types of Logic gate

- AND
- NAND
- OR
- NOR
- NOT
- XOR
- XNOR

**AND**

If the two inputs are TRUE (+1), the output of Perceptron is positive, which amounts to TRUE.

**OR**

If  either of the two inputs are TRUE (+1), the output of Perceptron is positive, which amounts to TRUE.

**XOR**

A XOR gate, also called as Exclusive OR gate, has two inputs and one output.

![img](https://www.simplilearn.com/ice9/free_resources_article_thumb/symbolic-representation-for-xor-gate.jpg)

The gate returns a TRUE as the output if and ONLY if one of the input states is true.

XOR Truth Table

| **Input** | **Output** |      |
| --------- | ---------- | ---- |
| A         | B          |      |
| 0         | 0          | 0    |
| 0         | 1          | 1    |
| 1         | 0          | 1    |
| 1         | 1          | 0    |

# Perceptron Trick

For finding best line,

- we need to subtract for misclassified lines

- for correctly classified lines, use addition

Let's say we have an equation

3x1 + 4x2 - 10 = 0

and Point: (4, 5)

```python
3 	4	-10
4	5	1
_________(-)
-1	-1	 -11
```

this line moves drastically towards the point, so to prevent this, we use learning rate

Say **Learning rate = 0.1**

before subtraction, multiply with learning rate

```java
3 		4		-10
4*0.1	5*0.1	1*0.1
______________________(-)
2.6		3.5		-10.1
```

# Perceptron Algorithm

Steps -

Start with some random weight and bias

For every misclassified point

- If the prediction is zero
  - that means positive point in negative area
  - change w1 + ax. where a is learning rate
  - change b to b + a

- If the prediction is 1 then
  - that means negative point in the positive area
  -  change w1 - ax. where a is learning rate
  - change b to b - a

# Non Linear Problem

Let's say data is more complex and it is no longer separable with a single line

So here the solution is using a **Curve** instead of **Line**. By modifying error function, we can solve this problem.

### Error function

Simply it's tells how far we are from the solution.

## Log loss error function

We are using continuous prediction instead of discreate predication. Actually contentious prediction, provide probability distribution instead of 0 and 1.

Steps -

1. Sum all the point including misclassified and correctly classified.
2. Make some changes
3. Calculate error some again

Our goal is make the error **smaller**.

The way to move from discreate output to contentious output, just simply change the step function with sigmoid function.

## Sigmoid function

Simply a function, which convert large positive number into close to one and large negative number into close to zero and the number that are close to zero, will convert close to 0.5. So it's return the values between 0 and 1.

 ![{\displaystyle S(x)={\frac {1}{1+e^{-x}}}={\frac {e^{x}}{e^{x}+1}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9537e778e229470d85a68ee0b099c08298a1a3f6)

So the new perceptron equation -

```
σ(wx+b)
```

# Tutorials

- [What is Perceptron](https://www.simplilearn.com/what-is-perceptron-tutorial)

repository: Iamsdt/UdacityDeepLearningNanodegree

path: /Neural Networks/Introduction to Neural Networks/Perception.md

repo_name: Iamsdt/UdacityDeepLearningNanodegree


text:
# Bugs and Questions

### Checklist

* [ ] This is a `victory-native` specific issue. (Issues that _also_ appear in `victory` should be opened [here](https://github.com/FormidableLabs/victory/issues/new))

* [ ] I have read through the [FAQ](https://formidable.com/open-source/victory/docs/faq) and [Guides](https://formidable.com/open-source/victory/guides/) before asking a question

* [ ] I am using the latest version of `victory-native`

* [ ] I have checked to make sure that my versions of `react-native` and `react-native-svg` are compatible with this version of `victory-native`. [Read about version requirements](https://github.com/FormidableLabs/victory-native/blob/master/README.md#peer-dependencies-and-version-requirements)

* [ ] I've searched open issues to make sure I'm not opening a duplicate issue

### The Problem

Describe the issue you're seeing, and what you expect the behavior to be.

### Reproduction

Please check that your issue is specific to `victory-native`. If you're unsure, a good way to check is by trying your code in a sandbox. You can [fork this sandbox](https://codesandbox.io/s/m3xo745x2x) to get started. Issues that are not specific to `victory-native` should be reported [here](https://github.com/FormidableLabs/victory/issues/new).

Please list steps to reproduce your issue. Include a code sample and exact version numbers for `victory-native`, `react-native` and `react-native-svg`.

# Feature Requests

### Checklist

* [ ] My feature request is specific to `victory-native`. (Feature requests that do not _specifically_ address native functionality should be opened [here](https://github.com/FormidableLabs/victory/issues/new))

* [ ] I've read through the [Docs](https://formidable.com/open-source/victory/docs) and [Guides](https://formidable.com/open-source/victory/guides) to make sure this functionality doesn't already exist

* [ ] I've searched open issues to make sure I'm not opening a duplicate issue

### Description

Please describe the feature you're requesting in detail.

repository: ilkerceng/victory-native

repo_name: ilkerceng/victory-native


text:
---
title: "The Structured Weighted Violations Perceptron Algorithm"
collection: publications
permalink: /publication/SWVP
date: 2016-06-01
venue: 'Empirical Methods in Natural Language Processing (EMNLP)'
paperurl: 'https://aclanthology.info/pdf/D/D16/D16-1045.pdf'
citation: '<b> "The Structured Weighted Violations Perceptron Algorithm."</b> Rotem Dror and Roi Reichart. <i> EMNLP 2016. </i>'
---

<b> Abstract </b>
We present the Structured Weighted Violations Perceptron (SWVP) algorithm, a new structured prediction algorithm that generalizes the Collins Structured Perceptron (CSP, (Collins, 2002)). Unlike CSP, the update rule of SWVP explicitly exploits the internal structure of the predicted labels. We prove the convergence of SWVP for linearly separable training sets, provide mistake and generalization bounds, and show that in the general case these bounds are tighter than those of the CSP special case. In synthetic data experiments with data drawn from an HMM, various variants of SWVP substantially outperform its CSP special case. SWVP also provides encouraging initial dependency parsing results.


text:
---
layout: feature
title: 'Derivation'
shortdef: 'derivation'
udver: '2'
---

(Please note: this part of the documentation is not yet completed.)

Language-specific feature identifying the form of derivation applied
to a word.

### `AdvstO`: adverb derived in -сто/-стэ

Produces adverbs indicating manner

#### Examples

* [myv] _домкасто_ "in depth"

### `Dimin`: derivation with suffix -ыне/-ине/-не/-нэ

Produces diminutive derivations of nouns.

#### Examples

* [myv] _пулыне_ "a small tail"

### `GenAttr`: genitive attribute -Онь

Produces indefinite genitive-like modifiers from adverbs

#### Examples

* [myv] _алкуксонь_ "real"

### `NomAg`: derivation with suffix -ы/-и

Produces nomen agensis (non-temporal).

#### Examples

* [myv] _стада ваны_ "herder"
* [myv] _эри ялга_ "live in friend"

### `OkshnOms`: derivation with suffix -ОкшнОмс

Produces deverbal verbs indicating discontinuous past.

#### Examples

* [myv] _сакшкомс_ "to have arrived <and subsequentially left>"

### `Omka`: derivation with suffix -Омка

Produces deverbal nouns that generally indicate an instrument.

#### Examples

* [myv] _а тескеть карксозонзо поволезь ванстомкатне_ \n "and here are the amulets hung on his belt"

### `OvOms`: derivation with suffix -ОвОмс

Produces a verb form with epistemic modality and an inherent telicity but no volition.
With derivations from transitive verbs this may be close to a "get" passive, whereas the
intransitive derivation seems closer to a "manage to/happen to" reading.

 In grammars, it is requires a genitive modifiers,
but in literature it may also be used with a genitive modifier in a similar function to `Ozj`.

#### Examples

* [myv] _валськень правт лов_ \n "snow that has fallen in the morning"
* [myv] _ойсэ вадневть картуз_ \n "a hat that is smeared with grease"

### `Ozj`: derivation with suffix -Озь

Produces converb.

#### Examples

* [myv] _ютазь_ "having passed"

### `PronGak`: derivation with suffix -гак/-как/-ак

Produces indefinite pronouns, adverbs.

#### Examples

* [myv] _кияк_ "anybody"
* [myv] _мезеяк_ "anything"
* [myv] _косояк_ "anywhere"

### `Cond`: protasis marker, aka conditional -Ондеря-

Marks the protasis verb, which may be in the the so-called subjunctive (presumably this conditional) and indicative non-past and past (quite infrequent).

#### Examples

* [myv] _Мериндеряволь исяк — саевлинек эйкакшонть мартонок..._ "if he/she/it had said yesterday, we would have taken the child with us."

### `VSj`: derivation with suffix -сь

Produces participle-like form from verb.

#### Examples

* [myv] _синдсь политикадонть_ "about battered policy"

### `VerbYcja`: derivation with suffix -ыця/-иця

Used with verbs for participle type including a deictic element `ця/се`

#### Examples

* [myv] _сэредиця_ "someone who is ill"
* [myv] _эриця ялга_ "living friend, friend who is alive"

### `VerbYks`: derivation with suffix -ыкс/-икс

Used with verbs for participle type indicating potential

#### Examples

* [myv] _кадовикс_ "tending to be left"

### `VGen`: verbal genitive

Used with verbs to produce adnominal attributes without temporal dynamism.

#### Examples

* [myv] _апак учонь_ "unexpected"
* [myv] _салтонь куяр_ "salt pickle"

### `Voc`: vocative derivation with suffix -й

Used with proper nouns and kinship terms ending in vowels.

#### Examples

* [myv] _ялгай_ "friend"

### `Shka`: derivation with suffix -шка

Used to indicat approximate or near equivalent.

#### Examples

* [myv] _сатышка_ "enough"

### `VocKaj`: vocative derivation with suffix -кай

Used with common and proper nouns and kinship terms ending in vowels and consonants.

#### Examples

* [myv] _ялгакай_ "friend"
* [myv] _нумолкай_ "rabbit"

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
# Cheatsheet

You can uncomment Ruby command in script and run script or copy/paste commands in to irb. We use `jj` to display object responses and `puts` to output string responses.

Assets are in the `./scripts/assets` directory unless we are obtaining from remote.

All images and video are from [pexels](https://www.pexels.com)

## Upload

``` bash
ruby upload.rb
```

### default
Upload an image and supply a public id of 20 random characters

```ruby
jj Cloudinary::Uploader.upload("./assets/cheesecake.jpg")
```
### video
Upload video

```ruby
jj Cloudinary::Uploader.upload("./assets/video.mp4",resource_type:  "video")
```

### raw
Upload raw

```ruby
jj Cloudinary::Uploader.upload("./assets/BLKCHCRY.TTF",resource_type: "raw")
```

### auto

```ruby
jj Cloudinary::Uploader.upload("./assets/video.mp4",resource_type: "auto")
```

### Upload Options

#### Assign public id

```ruby
jj Cloudinary::Uploader.upload("./assets/face.jpg", public_id: "face")
```

#### Use filename, unique
Six (6) characters are added to filename to create public id.

```ruby
jj Cloudinary::Uploader.upload("./assets/cheesecake.jpg",use_filename:true,unique_filename:true)
```

#### Use filename, not unique

```ruby
jj Cloudinary::Uploader.upload("./assets/cheesecake.jpg",use_filename:true, unique_filename:false)```

#### Specify folder name

```ruby
jj Cloudinary::Uploader.upload("./assets/cheesecake.jpg",folder: "food/my_favorite/")
```

#### Let Cloudinary create folder on the fly from public id

```ruby
jj Cloudinary::Uploader.upload("./assets/dog.jpg", public_id: "food/my_favorite/dog")
```

### Remote asset upload

```ruby
jj Cloudinary::Uploader.upload("https://cdn.pixabay.com/photo/2015/03/26/09/39/cupcakes-690040__480.jpg")
```

## Preset

You can create these manually in the DAM or using script.

### Unsigned Preset
You can use this for front end widgets and API calls.  You don't need to hide secrets.  You would usually use this in an app hosted on a secured web page.  It can't be used to upload in Media Library. Before you can use unsigned presets you need to click on a link in setting in the DAM.

#### Create Un-Signed Preset
We're adding a tag and limiting formats that can be uploaded.

```ruby
jj Cloudinary::Api.create_upload_preset(name: "unsigned-image",
  unsigned: true,
  tags: "unsigned",
  allowed_formats: "jpg,png")
```

#### Use Un-Signed Preset in Upload

```ruby
jj Cloudinary::Uploader.unsigned_upload("./assets/logo.png","unsigned-image")
```

#### Use Un-signed Preset with upload widget
Locate `./scripts/index.html`.  Replace `<cloud-name>` with your cloud name.  Open with local http server to see how the unsigned preset can work with a widget.

### Signed Preset
Use the signed preset for backend scripts with access to API_SECRET credentials.  If you want to use a preset in the DAM it must be signed.

#### Create Signed Preset
We're adding a tag and limiting formats that can be uploaded.

```ruby
jj Cloudinary::Api.create_upload_preset(name: "signed-image",
  unsigned: false,
  tags: "signed",
  allowed_formats: "jpg,png")
```

#### Use Signed Preset

```ruby
jj Cloudinary::Uploader.upload("./assets/logo.png", upload_preset: "signed-image")
```

## Auto-upload and Fetch

Fetch and Auto-upload are techniques for moving assets from remote locations into your cloud.  While the Upload API allows you to load from remote locations, these techniques are good for loading assets into the cloud only when they are requested by the user.

Instead of using API calls to upload and cache assets, we'll create URLs and then when we request the URL in the browser, the asset will get loaded and cached.

### Fetch
Fetch lets you load an asset by specifying the remote URL with a "fetch" delivery type.  When using the Upload API we were using the "upload" delivery type and we didn't specify it because it was the default.  You saw the term `upload` in the URLs in the Upload API response.  In order to use fetch, we'll specify "fetch" when we create a URL.

```ruby
puts Cloudinary::Utils.cloudinary_url("https://cdn.pixabay.com/photo/2015/03/26/09/39/cupcakes-690040__480.jpg", type: "fetch")
```

### Auto-upload
In order to use Auto-Upload you need to go to the DAM settings upload tab.  Add a mapping between a directory in your cloud and a remote path.  For this exercise, create a mapping between `remote-media` and `https://cloudinary-training.github.io/cld-advanced-concepts/assets/`.  Notice we are specifying a specific asset, but a path.

Fetch can only be used for images, but Auto upload can be used for all asset types.

We use the URL helper in the Ruby SDK to create a URL.

#### Auto-upload Video

```ruby
puts Cloudinary::Utils.cloudinary_url("remote-media/video/snowboarding", {resource_type: "video",
   transformation:{width: 300, crop: "scale"}})
```

#### Auto-upload Image

```ruby
puts Cloudinary::Utils.cloudinary_url("remote-media/images/dolphin",
   {transformation:{width: 300, crop: "scale"}})
```

#### Auto-upload Raw

```ruby
puts Cloudinary::Utils.cloudinary_url("remote-media/raw/data.json", resource_type: "raw")
```

## Manage

### List all assets (default is 10)

```ruby
jj Cloudinary::Api.resources
```

### List up to 500 assets

```ruby
jj Cloudinary::Api.resources(max_results: 500)
```

###  Search by prefix (public id "starts with")

```ruby
jj Cloudinary::Api.resources(type:'upload', prefix:'sample')
```

### Rename an assets with overwrite (default overwrite is false)

```ruby
jj Cloudinary::Uploader.rename('cheesecake', 'my_cheesecake', {overwrite: true})
```

### Remove an asset

Deleting from a CDN is different that deleting from a database.  It can take time for the asset to be fully removed.  After you've removed an asset, when you got to your browser to check that its not available, remember that your browser can cache so be sure that browser caching is disabled when you test.

#### Upload API: `destroy`
Use `invalide:true` to remove from CDN.  May take some time depending on CDN.  You remove only 1 asset at a time with the Upload API.

```ruby
jj Cloudinary::Uploader.destroy("lake", invalidate: true)
```

#### Admin API: `delete_resource`
You can remove multiple assets at a time with the Admin API.  There is a daily quota.

```ruby
# upload 2 assets and them remove them
jj Cloudinary::Uploader.upload("./assets/dog.jpg", public_id: "dog")
j Cloudinary::Uploader.upload("./assets/lake.jpg", public_id: "lake")
jj Cloudinary::Api.delete_resources(public_ids = ["dog","lake"], invalidate: true)

```

### Tag on Upload
You can supply tags and other metadata like Context on upload.  You can then find assets by tag.

```ruby
jj Cloudinary::Uploader.upload("./assets/blackberry.jpg", public_id: "blackberry", tags: "fruit,berries")
jj Cloudinary::Api.resources_by_tag("berries",{tags: true})
```

### Tag after upload
You can add tags to assets that are already in the Media Library.  You can also include an option, `tags:true` to show all tags per asset found in the result.

```ruby
jj Cloudinary::Uploader.upload("./assets/lake.jpg", public_id: "lake")
jj Cloudinary::Uploader.add_tag("water", "lake")
jj Cloudinary::Api.resources_by_tag("water",{tags: true})

```

#### Remove all tags in a list of assets
First we remove all tags and then we try to access by tag.  We won't find the assets that have no tags.

```ruby
jj Cloudinary::Uploader.remove_all_tags(["blackberry","lake"])
jj Cloudinary::Api.resources_by_tag("fruit",{tags: true})
jj Cloudinary::Api.resources_by_tag("water",{tags: true})

```

## Upload for Transformations
In order to have a set of assets available for delivery scripts, run the `upload-for-transformation` script.

```bash
ruby upload-for-transformation.rb
```

## Optimization Transformations
Look at cropping, compression and optimal browser formats.  Cropping modes (scale, crop, thumb, fit, fill, and more) have different use cases and different options available.

### Cropping

#### scale: Default copping mode with 1 dimension is scale

```ruby
puts Cloudinary::Utils.cloudinary_url("cheesecake", transformation: {width: 300, crop: "scale"})
```

If you add a second dimension with the `scale` crop mode, it may skew the image depending the image's original aspect ratio.

```ruby
uts Cloudinary::Utils.cloudinary_url("cheesecake", transformation: {width: 300, height:300, crop: "scale"})
```

#### fit: Applying 2 dimensions to a crop mode without skew
You can use the `fit` mode to guarantee that the image will render without skew within the boundaries defined by the `width` and `height` options.  However, the dimensions of the image may not match the `width` and `height` when you use `fit`.

```ruby
puts Cloudinary::Utils.cloudinary_url("cheesecake", transformation: {width: 300, height:300, crop: "fit"})
```

#### pad: Apply 2 dimensions with no skew
Use padding to ensure that the image is the exact dimensions specified in the `height` and `width` options.

```ruby
puts Cloudinary::Utils.cloudinary_url("cheesecake", transformation: {width: 300, height:300, crop: "pad", background: "auto:border"})

```

#### crop: Intro to Gravity
Gravity provides focus.  You can apply compass point gravity or let Cloudinary find the focus using `gravity: auto`.  You can only use gravity with the `crop`, `fill`, `fill_pad` (auto only), and `thumb` crop modes.

#### Crop mode without gravity
Without gravity, all you see is a chunk of dog fur.

```ruby
puts Cloudinary::Utils.cloudinary_url("dog", transformation: {width: 300, height: 300, crop: "crop"})
```

#### Crop mode with gravity
In these examples you see the effect of gravity working with the `thumb` mode.

``` ruby
puts Cloudinary::Utils.cloudinary_url("dog", transformation: {width: 300, height: 300, crop: "thumb", gravity: "auto"})
puts Cloudinary::Utils.cloudinary_url("cheesecake", transformation: {width: 300, height: 300, crop: "thumb", gravity: "auto"})

```

#### fill vs thumb modes

```ruby
puts Cloudinary::Utils.cloudinary_url("face", transformation: {width: 300, height: 300, crop: "fill", gravity: "auto"})
puts Cloudinary::Utils.cloudinary_url("face", transformation: {width: 300, height: 300, crop: "thumb", gravity: "auto"})

```

#### debug gravity auto
Generate a URL with gravity auto and debug to better understand how the AI that detects objects is working.  The `gravity:auto` option appears in the URL as `g_auto`.

```ruby
puts Cloudinary::Utils.cloudinary_url("faces", transformation: {width: 300, height: 300, crop: "fill", gravity: "auto"})
```

The image below shows how Cloudinary recognizes faces.

<img width="400" alt="Gravity Auto Debug" src="./assets/gravity-debug.png">

```
https://res.cloudinary.com/<cloud name>/image/upload/c_crop,g_auto:debug,h_300,w_300/faces
```

#### gravity:face
Cloudinary can detect faces.  Specify gravity for the face.

```ruby
puts Cloudinary::Utils.cloudinary_url("working", transformation: {width: 300, height: 400, crop: "crop", gravity: "face"})
puts Cloudinary::Utils.cloudinary_url("working", transformation: {width: 300, height: 400, crop: "thumb", gravity: "face"})
```

### Compression

Compression is provided with the `quality` option.  You can specify a numeric value form 0-100 with 100 being the highest quality and the least compression.  You can also let Cloudinary determine the best quality with the least size by using `quality: auto`.  The is a recommended best practice.

Use the media debugger in the browser to compare file size in the following images.

```ruby
puts Cloudinary::Utils.cloudinary_url("cookies")
puts Cloudinary::Utils.cloudinary_url("cookies", transformation: { quality: "auto"})

```

### Browser file formats
Image file formats provide standards for storing image data and can be compressed or uncompressed.  Compressed formats can be lossy or non-lossy.  Different devices and browsers can render different file formats.  Cloudinary can optimize to provide the best format for the device or browser requesting the image.

Use `format: auto` which translates to `f_auto` to let Cloudinary return an image container that is optimized for the requesting browser. Format optimization handled at the CDN layer.

Support for file formats is constantly evolving.  Some examples of common image and video formats are:

* webp: Chrome, Edge, Firefox, Safari (image)
* jpg: Chrome, Edge, Firefox, Internet Explorer, Opera, Safari (image)
* webm: Chrome, Edge, Firefox (video)
* ogv: Chrome, Edge, Firefox (video)

In the example below we generate "auto everything"

```ruby
puts Cloudinary::Utils.cloudinary_url("lake", transformation: {height: 400, crop: "fill", gravity: "auto", quality: "auto", format: "auto"})
```

## Aesthetic Transformations
Use aesthetic options to achieve results and styling similar to what you find with CSS or Photoshop.

### radius
Similar to CSS radius.  The `radius: max` will generate a circle for a 1:1 aspect ratio.

```ruby
puts Cloudinary::Utils.cloudinary_url("dog", transformation: {width: 300, height: 300, crop: "thumb",
    gravity: "auto", format: "png" , quality: "auto",
    radius: "max"})
```

### borders
Add borders with a syntax similar to CSS.  You can use HTML Color names, rgb, or rgba.

```ruby
puts Cloudinary::Utils.cloudinary_url("blackberry", transformation: {
   border: "10px_solid_rgb:bde4fb",
   width: 300, height: 300, crop: "thumb",
   gravity: "auto", fetch_format: "auto" , quality: "auto",
   radius: "max"})
```

### Add background when there is padding

```ruby
 puts Cloudinary::Utils.cloudinary_url("face",
     transformation: { width: 300, height: 200, crop: "pad",
     format: "auto" , quality: "auto",
     background: "red"})
```
### Effect option

#### Outline transparent images
Use the `effect` option. Set the width of the outline in pixels.

```ruby
puts Cloudinary::Utils.cloudinary_url("grapes",
  transformation: { width: 300, crop: "scale",
    quality: "auto", effect: "outline:15", color: "orange"})
```

#### Improve color, contrast and light

```ruby
puts Cloudinary::Utils.cloudinary_url("lake",
   transformation: { width: 300, height: 300, crop: "thumb",
     gravity: "auto", fetch_format: "auto" , quality: "auto",
     effect: "improve"})
```

#### Art filters

##### "zorro" is one of many

```ruby
puts Cloudinary::Utils.cloudinary_url("lake",
   transformation: { width: 300, height: 300, crop: "thumb",
   fetch_format: "auto" , quality: "auto",
    effect: "art:zorro"})
```

##### "cartoonify"

```ruby

 puts Cloudinary::Utils.cloudinary_url("face",
  transformation: { width: 300, height: 300, crop: "thumb",
     gravity: "face", fetch_format: "auto" , quality: "auto",
     effect: "cartoonify"})
```

##### "tint": try different colors and intensities

```ruby
 puts Cloudinary::Utils.cloudinary_url("face",
   transformation: { width: 300, height: 300, crop: "thumb",
     gravity: "face", fetch_format: "auto" , quality: "auto",
     effect: "tint:40:magenta"})
```

##### "duotone"
This is a chained transformation.  It instructs Cloudinary to run transformations in sequence.  First a grayscale is set and then the grayscale is tinted. It's coded as an array of transformation objects.  In the URL, you'll see the transformations separated by `/`.

```ruby
 puts Cloudinary::Utils.cloudinary_url("face",
 transformation: [
   {transformation: [width: 300, height: 300, crop: "thumb",gravity: "face", effect: "grayscale"]},
  { transformation:[effect: "tint:40:magenta"]},
   { transformation:[fetch_format: "auto",quality: "auto"]}
   ]
 )
```

### Overlays
* Text can be laid over images or video
* Images can be laid over images or video
* Video can be laid over images or video

#### Text over image
Required options are font_family, font_size, and text.

```ruby
 puts Cloudinary::Utils.cloudinary_url("faces",
 transformation: { transformation: [
   {width: 300, height: 300, crop: "thumb"},
   {overlay: {font_family: "Arial", font_size: 30, text: "Tutoring"},
     background: "white", color: "blue",
     gravity: "north_west", y:10, x:10}
   ]
   }
 )
```

#### Image over video

```ruby
 puts Cloudinary::Utils.cloudinary_url("video",
   { resource_type:"video",
     transformation: [
     {width: 400, crop: "scale", },
     {overlay: "logo", height:25,gravity:"south_east"}
   ]
   }
 )
```

#### Text over video

```ruby

puts Cloudinary::Utils.cloudinary_url("video",
   { resource_type:"video",
     transformation: [
       {width: 300, crop: "scale"},
       {overlay: {font_family: "Arial", font_size:30, text:"Earth"},
       background:"white", color:"blue", gravity:"north_west", y:10, x:10}
   ]
   }
 )
```

## Named Transformations
You can create a transformation template by using named transformations.  They cleanup your URLs to make them better for SEO.  If you want to hide your transformations or underlying assets used in overlays, named transformations can help.

### Create a named transformation from a string

```ruby
jj Cloudinary::Api.create_transformation('standard','w_150,h_150,c_thumb,g_auto')
```

### Use named transformation
Notice that the named you use to create the named transformation gets prefixed with a `t_` when you use it in URL.

```ruby
puts Cloudinary::Utils.cloudinary_url("cheesecake",
  transformation: [{transformation:["standard"]}])
```

### Use a named transformation with f_auto

You can't include `f_auto` in a named transformation because it is handled at the CDN and not by internal Cloudinary servers.  You can chain the `f_auto` to your named transformation as shown below.

If the named transformation already exists you'll get an error letting your know.

```ruby
 puts Cloudinary::Utils.cloudinary_url("cheesecake",
   transformation: [{transformation:["standard"]},{transformation:[fetch_format: "auto"]}])

```

### A super complex chained transformation

#### The transformation

```ruby
jj Cloudinary::Utils.cloudinary_url("shirt_only.png",
  transformation: {transformation:[
    {overlay: "logo",effect: "brightness:-21",x:-10,y:-200, width:304, radius:"max"},
    {overlay: {font_family: "Coustard", font_size: 100,color:"rgb:999999", font_weight: "bold",
      text: "Hello Jon"}, opacity:70, y:0, x:-10, width: 365}
  ]})
```

#### make it a named transformation
Don't include `f_auto`

```ruby
 jj Cloudinary::Api.create_transformation("complex", {transformation:[
    {overlay: "logo",effect: "brightness:-21",x:-10,y:-200, width:304, radius:"max"},
    {overlay: {font_family: "Coustard", font_size: 100,color:"rgb:999999", font_weight: "bold",
      text: "Hello Jon"}, opacity:70, y:0, x:-10, width: 365}
  ]})
  ```

  ### The complex transformation is now easier to use
  We can add `f_auto` to it.

  ```ruby
puts Cloudinary::Utils.cloudinary_url("demo/shirt_only.png",
     transformation: [{transformation:["complex"]},{transformation:[fetch_format: "auto"]}])

  ```

repository: RenanBa/cld-intro-ruby

repo_name: RenanBa/cld-intro-ruby


text:
# redux-angular-react

Comparing the implementations of a "Todo List" with and without Redux, in Angular and React

## Features

- Fetch items
- Add item
- Mark item as done
- Remove item
- Filter items by category (all, active, completed)
- Filter items by text

## Usage

```bash
git clone https://github.com/avine/redux-angular-react.git

# First, install all dependencies
npm install

# Next, run each command in a different tab:

# Tab 1. Start server
npm run server

# Tab 2. Start angular app
npm run angular

# Tab 3. Start react app
npm run react
```

repository: avine/redux-angular-react

repo_name: avine/redux-angular-react


text:
# Stencil: A Compiler for Web Components

Stencil is a build tool for generating vanilla Web Components. It combines the best concepts of the most popular frameworks into a straight-forward, compile-time tool.

Stencil takes advantage of

- TypeScript
- JSX
- Async rendering
- V-DOM

With this in place, Stencil generates a Web Component that follows web standards and no particular framework.

Since Stencil generates standards compliant web components, they can work with many popular frameworks right out of the box, and can even be used without a framework. Stencil also enables a number of key capabilities on top of Web Components, in particular Server Side Rendering (SSR) without the need to run a headless browser, pre-rendering, and objects-as-properties (instead of just strings).

repository: romulocintra/stencil-site

repo_name: romulocintra/stencil-site


text:
# blood-art-to-png
Extract pictures from Monolith's Blood ART files into separate PNG.

Usage
-----
> python ./blood-art-to-png.py tilesXXX.art

Script will extract all sprites/textures into PNG (RGBA) files and will also create simple INI text file with additional informations about every one of them.

Example
-------
```
[header]
version=1
start=2048
end=2303
count=256

[tile002048.png]
index=2048
width=16
height=16
alpha=0
xoffset=0
yoffset=0
ext1=0
ext2=0

...

[tile002300.png]
index=2300
width=26
height=23
alpha=1
xoffset=3
yoffset=-1
ext1=0
ext2=0

...
```

Hopefully, header is self-explanatory. Every tile has its own section with index number, width and height in pixels, information about alpha channel (0 - image doesn't have any transparency, 1 - image has one or more transparent pixels), xoffset and yoffset (to align animated sprites) and ext1/ext2 (additional data, currently not used).

Notes
-----
Script is using [drj11/pypng](https://github.com/drj11/pypng) PNG library.

ART file specification was borrowed from **art2tga** by **Mathieu Olivier**.

Last but not least, thanks to [Ken Silverman](http://www.advsys.net/ken/) for his legendary **BUILD** engine.

repository: Cabalist/blood-art-to-png

repo_name: Cabalist/blood-art-to-png


text:
# RFD 109: Opsgenie Integration

## Required approvers

Engineering: @r0mant, @marcoandredinis, @hugoShaka
Product: @klizhentas, @xinding33
Security: @reedloden, @jentfoo

## What

This RFD proposes a plugin that allows Teleport to integrate with Opsgenie, allowing access requests to show up as alerts in Opsgenie. This plugin will differ from existing plugins by being part of the Teleport binary directly.
Doing so by creating a new Teleport service 'plugin_service' with the opsgenie plugin (and any future ones) being configurable resources. This will allow the plugins to be run either by themselves or alongside other Teleport services.

## Scope

The plugin will be able to run standalone or alongside other services as part of the new plugin_service.
The plugin will support auto-approval similar to PagerDuty plugin.

## Success criteria

### Plugin service
The creation of a Teleport service where plugins can be created as configurable resources similar to the existing 'app_service' and 'db_service'.

Plugins managed through this service should have the ability to be enabled and disabled dynamically via 'tctl'.

### Opsgenie plugin
Users are able to configure teleport to automatically create alerts in Opsgenie from access requests.
Alerts were chosen over incidents in Opsgenie as incidents are intended to be used for high priority alerts that indicate a service interruption.
Users are also able to configure auto approval flows to be met under certain conditions. E.g when a requester is on-call.

## Configuration UX

The plugin service will be configured using the existing Teleport YAML file in a section called 'plugin_service'.

```
plugin_service:
    enabled: true
    plugins:
    - "type": "opsgenie"
    - "type": "pagerduty"
    opsgenie:
        api_key: "path/to/key.txt" # Path to a file containing the Opsgenie API key
```
This example would only match plugin resources with the the labels 'type:opsgenie', or 'type:slack'.

The Opsgenie plugin (and any others created) can then be configured using resources.
Example plugin.yaml for Opsgenie that would match with this.
```
kind: plugin
metadata:
  name: opsgenie-plugin
  labels:
    type: opsgenie
spec:
  opsgenie:
    addr: "example.app.opsgenie.com" # Address of Opsgenie
    priority: "2" # Priority to create Opsgenie alerts with
    alert_tags: ["example-tag"] # List of tags to be added to alerts created in Opsgenie
    default_schedules: ["schedule1"] # Default on-call schedules to check if none are provided in the access request annotations
```

Given the above example teleport.yaml the following plugin resource will not match.
```
kind: plugin
metadata:
  name: slack-plugin
  labels:
    type: slack
spec:
  slack:
    addr: "example.slack.com"
```

The logging configuration will be shared with the main Teleport process.

### Getting an Opsgenie API key

In the Opsgenie web UI go to Settings -> App settings -> API key management. Create key with Read, Create and Update access.

### Executing

The plugin will be started using a command of the form given the appropriate 'plugin_service' is enabled in the config.

```
teleport start --config /etc/teleport.yaml
```

## UX

### Opsgenie plugin
Once an access request has been created, the Opsgenie plugin will create an alert in the service specified in the request annotation opsgenie_notify_services using the Opsgenie Alert API [Create](https://docs.opsgenie.com/docs/alert-api#create-alert) endpoint.

The appropriate on-call responder can then click the provided link to the access request and approve or deny it.

For auto approval of certain access requests the access request will be auto approved if the requesting user is on-call in one of the schedules provided in access request annotations.

Once an access request has been approved or denied the plugin will add a note to the alert and close the relevant alert tied to that access request.

Example role with services in the annotation that indicate that users with this roll can be on-call for those services.

```
kind: role
metadata:
  name: someRole
spec:
  allow:
    request:
      roles: [someOtherRole]
      annotations:
        opsgenie_notify_services: ["service1", "service2"] # These are the Opsgenie services alerts will be created under
        opsgenie_oncall_schedules: ["service1", "service2"] # These are the Opsgenie schedules checked during auto approval
```

## Implementation details

### Plugin service
The 'plugin_service' when enabled will watch for 'plugin' resources matching the labels specified in teleport.yaml.
When a plugin resource matching these labels is created the appropriate plugin will be started.
In the case of the Opsgenie plugin, the plugin startup will fail in the event the API key file field was not provided in the plugin_service configuration.

### Opsgenie plugin
In this section we will take a look at how the plugin will interact with the Opsgenie API.

### Authorization

The plugin will use the API key provided in the teleport.yaml config file when interacting with the Opsgenie API. This API key will be included in the headers of the requests made.

```
Authorization: GenieKey $apiKey
```

### Creating alerts
When the Opsgenie plugin creates alerts for incoming access requests the [Create](https://docs.opsgenie.com/docs/alert-api#create-alert) alert request will be of the form

```
{
	"message": "Access request from <someuser>",
	"description":"<someuser> requested permissions for roles <someroles> on Teleport at <someTime>.
 	Reason: <someReason>
 	To approve or deny the request, proceed to <link to the access request>",
	"responders":[
    	....
	],
	"tags": ["TeleportAccessRequest"],
	"priority":"<somePriority>"
}
```

On every review of the access request the alert created in Opsgenie will have a note added to it using the ‘[Add note to alert](https://docs.opsgenie.com/docs/alert-api#add-note-to-alert)’ endpoint. Then the alert will be closed using the ‘[Close alert](https://docs.opsgenie.com/docs/alert-api#close-alert)’ endpoint once the alert has either been approved or denied.

```
<Reviewer> reviewed the request at <someTime>.
Resolution: <StateEmojiAsUsedByExistingPLugins> <State>.
Reason: <Reason>
```

### Auto approval

To check if the requesting user of a request is currently on-call the ‘Who is on call API’s ‘[Get on calls](https://docs.opsgenie.com/docs/who-is-on-call-api#get-on-calls)’ endpoint will be used. 'https://<configured-opsgenie-address>/v2/schedules/<ScheduleName>/on-calls?scheduleIdentifierType=name'

Similar to the existing Pagerduty plugin for auto-approval to work, the user creating an Access Request must have a Teleport username that is also the email address associated with an Opsgenie account.

Access requests will be mapped to Opsgenie alerts by including the Access request ID in the tags field of the note.

### IaC

The Helm charts will be updated to support the new plugin-service.

## Security considerations

Potential for users to get access requests auto approved if they can get themselves onto the current on call rotation.
Since Teleport usernames are assumed to match the Opsgenie email address when checking on call there is potential for access requests to be auto approved unintentionally.

repository: gravitational/teleport

gha_language: Go

repo_name: gravitational/teleport


text:
# webpack CLI

The official CLI of webpack

## About

webpack CLI provides a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file, but often developers want to create a more custom webpack configuration based on their use-cases and needs. webpack CLI addresses these needs by providing a set of tools to improve the setup of custom webpack configuration.

## How to install

When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed!

Otherwise

```bash
npm install --save-dev webpack-cli
```

or

```bash
yarn add webpack-cli --dev
```

## Supported arguments and commands

### Usage

All interactions with webpack-cli are of the form

```bash
npx webpack-cli [command] [options]
```

If no command is specified then `bundle` command is used by default

### Help Usage

To display basic commands and arguments -

```bash
npx webpack-cli --help
```

To display all supported commands and arguments -

```bash
npx webpack-cli --help=verbose
```

or

```bash
npx webpack-cli --help verbose
```

### Available Commands

```
  build|bundle|b [entries...] [options]                 Run webpack (default command, can be omitted).
  configtest|t [config-path]                            Validate a webpack configuration.
  help|h [command] [option]                             Display help for commands and options.
  info|i [options]                                      Outputs information about your system.
  init|create|new|c|n [generation-path] [options]       Initialize a new webpack project.
  loader|l [output-path] [options]                      Scaffold a loader.
  plugin|p [output-path] [options]                      Scaffold a plugin.
  serve|server|s [entries...] [options]                 Run the webpack dev server.
  version|v [commands...]                               Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
  watch|w [entries...] [options]                        Run webpack and watch for files changes.
```

### Available Options

```
Options:
  -c, --config <value...>                          Provide path to a webpack configuration file e.g. ./webpack.config.js.
  --config-name <value...>                         Name of the configuration to use.
  -m, --merge                                      Merge two or more configurations using 'webpack-merge'.
  --disable-interpret                              Disable interpret for loading the config file.
  --env <value...>                                 Environment passed to the configuration when it is a function.
  --node-env <value>                               Sets process.env.NODE_ENV to the specified value.
  --define-process-env-node-env <value>            Sets process.env.NODE_ENV to the specified value. (Currently an alias for `--node-env`)
  --analyze                                        It invokes webpack-bundle-analyzer plugin to get bundle information.
  --progress [value]                               Print compilation progress during build.
  -j, --json [value]                               Prints result as JSON or store it in a file.
  --fail-on-warnings                               Stop webpack-cli process with non-zero exit code on warnings from webpack
  -d, --devtool <value>                            A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
  --no-devtool                                     Negative 'devtool' option.
  --entry <value...>                               A module that is loaded upon startup. Only the last one is exported.
  --mode <value>                                   Enable production optimizations or development hints.
  --name <value>                                   Name of the configuration. Used when loading multiple configurations.
  -o, --output-path <value>                        The output directory as **absolute path** (required).
  --stats [value]                                  Stats options object or preset name.
  --no-stats                                       Negative 'stats' option.
  -t, --target <value...>                          Environment to build for. Environment to build for. An array of environments to build for all of them when possible.
  --no-target                                      Negative 'target' option.
  -w, --watch                                      Enter watch mode, which rebuilds on file change.
  --no-watch                                       Negative 'watch' option.
  --watch-options-stdin                            Stop watching when stdin stream has ended.
  --no-watch-options-stdin                         Negative 'watch-options-stdin' option.

Global options:
  --color                                          Enable colors on console.
  --no-color                                       Disable colors on console.
  -v, --version                                    Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
  -h, --help [verbose]                             Display help for commands and options.
```

Checkout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md) to see list of all available options.

## Exit codes and their meanings

| Exit Code | Description                                        |
| --------- | -------------------------------------------------- |
| `0`       | Success                                            |
| `1`       | Errors from webpack                                |
| `2`       | Configuration/options problem or an internal error |

## CLI Environment Variables

| Environment Variable                | Description                                                         |
| ----------------------------------- | ------------------------------------------------------------------- |
| `WEBPACK_CLI_SKIP_IMPORT_LOCAL`     | when `true` it will skip using the local instance of `webpack-cli`. |
| `WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG` | when `true` it will force load the ESM config.                      |
| `WEBPACK_PACKAGE`                   | Use a custom webpack version in CLI.                                |
| `WEBPACK_DEV_SERVER_PACKAGE`        | Use a custom webpack-dev-server version in CLI.                     |
| `WEBPACK_CLI_HELP_WIDTH`            | Use custom width for help output.                                   |

## Configuration Environment Variables

You can use the following environment variables inside your webpack configuration:

| Environment Variable | Description                                  |
| -------------------- | -------------------------------------------- |
| `WEBPACK_SERVE`      | `true` if `serve\|s` is being used.          |
| `WEBPACK_BUILD`      | `true` if `build\|bundle\|b` is being used.  |
| `WEBPACK_WATCH`      | `true` if `--watch\|watch\|w` is being used. |

Checkout [webpack.js.org](https://webpack.js.org/api/cli/) for more detailed documentation of `webpack-cli`.

repository: webpack/webpack-cli

repo_name: webpack/webpack-cli


text:
# pdf_collector
Collecting interesting PDFs from websites using machine learning.

## Project overview

- Collect `.pdf` files from arbitrary websites.
- Index the files, allow users to vote on interesting files using a simple API.
- Feed the votes into a machine learning algorithm.
- Feed the machine learning predictions into the indexing.
- Iterate the procedure until "convergence".

## Project TODO

- **1. Scrape websites**
- [X] Download PDFs
- [X] Store PDFs, text, ID, url
- [X] Allow efficient updating

- **2. Processing and machine learning**
- [X] Preprocess text files
- [ ] Classify some texts manually
- [ ] Create ML model

- **3. Output the results**
- [ ] Pandas -> HTML
- [X] Allow user feedback


text:
### Get expense group configuration details

```http
GET /api/expense/expensereport/v1.1/ExpenseGroupConfiguration/ HTTP/1.1
Host: www.concursolutions.com
```

Retrieves the list of Expense Polices, Expense Types and Payment Types for the Expense Group the user specified in the OAuth access token is assigned to. Each Expense Policy contains a list of valid Expense Types. The Payment Types are associated with the user's Expense Group and apply to all the returned policies. Only the payment types that are valid for the Post Expense Entry endpoint are returned.

**NOTE**: The Concur Expense product is highly configurable, and each client may have a unique set of payment types. If a payment type is not included in the response, it is not available for use with this client.

#### Request

```http
GET https://www.concursolutions.com/api/expense/expensereport/v1.1/ExpenseGroupConfiguration/ HTTP/1.1
Authorization: OAuth {access token}
...
```

* **Parameters**
  * None.

* **Headers**

  | Name | Description |
  | ---- | ----------- |
  | `Authorization` | Authorization header with OAuth token for valid Concur user. |
  | `Accept` | `application/xml` |

#### Response

```http
HTTP/1.1 200 OK
Content-Type: application/xml

<ExpenseGroupConfiguration xmlns="http://www.concursolutions.com/api/expense/expensereport/2011/03" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <PaymentTypes>
        <PaymentType>
            <PaymentTypeID>nr74tQrD8PorkF6yvS0Sm8ZeSGsw</PaymentTypeID>
            <PaymentTypeName>Cash</PaymentTypeName>
        </PaymentType>
        <PaymentType>
            <PaymentTypeID>nr7AuTtrvkXwLOzEejFruFO$sN7eo</PaymentTypeID>
            <PaymentTypeName>Company Paid</PaymentTypeName>
        </PaymentType>
    </PaymentTypes>
    <PolicyAndExpenseTypesList>
        <PolicyAndExpenseTypes>
            <PolicyKey>ndrF8hjzl9FhH1Lvs0EuK1gi7LISbetxc</PolicyKey>
            <PolicyName>CA Expense Policy</PolicyName>
            <ExpenseTypes>
                <ExpenseType>
                    <ExpKey>BUSPR</ExpKey>
                    <ExpName>Promotional Items</ExpName>
                    <ParentExpKey>PROMO</ParentExpKey>
                    <ParentExpName>Business Promotions</ParentExpName>
                </ExpenseType>
                <ExpenseType>
                    <ExpKey>TRDSH</ExpKey>
                    <ExpName>Trade Shows</ExpName>
                    <ParentExpKey>PROMO</ParentExpKey>
                    <ParentExpName>Business Promotions</ParentExpName>
                </ExpenseType>
                <ExpenseType>
                    <ExpKey>LOCPH</ExpKey>
                    <ExpName>Local Phone</ExpName>
                    <ParentExpKey>COMMU</ParentExpKey>
                    <ParentExpName>Communications</ParentExpName>
                </ExpenseType>
            </ExpenseTypes>
        </PolicyAndExpenseTypes>
    </PolicyAndExpenseTypesList>
</ExpenseGroupConfiguration>
```

* **Content body**

  This request will return an `ExpenseGroupConfiguration` parent element. The `ExpenseGroupConfiguration` has a `PaymentTypes` child element and a `PolicyAndExpenseTypesList` child element.

  The `PaymentTypes` child element has a `PaymentType` child element for each configured payment type. The `PolicyAndExpenseTypesList` child element has a `PolicyandExpenseTypes` child element for each policy configured for this expense group.

  * **`PaymentType` elements**

    |  Element |  Description |
    | -------- | ------------ |
    |  PaymentTypeID |  The encrypted key for the payment type. This is the unique identifier for the payment type. |
    |  PaymentTypeName |  The name of the payment type. |

  * **`PolicyandExpenseTypes` elements**

    |  Element |  Description |
    | -------- | ------------ |
    |  PolicyKey |  The ID value of the policy. |
    |  PolicyName |  The name of the policy. |
    |  ExpenseTypes |  The parent element for the list of expense types in the policy. It contains an **ExpenseType** child element for each expense type in the policy. |

  * **`ExpenseType` elements**

    |  Element |  Description |
    | -------- | ------------ |
    |  ExpKey |  The expense type key. |
    |  ExpName |  The label of the expense type. |
    |  ParentExpKey |  The code of the expense type's parent. |
    |  ParentExpName |  The label of the expense type's parent. |
    |  SpendCategory |  The spend category assigned to the expense type for reporting purposes. |

branch_name: refs/heads/preview

extension: markdown