text:
---
title: "Active Directory Synchronization"
source_url: 'https://github.com/SenseNet/sn-adsync/blob/master/docs/adsync.md'
category: Guides
version: v7.0
tags: [ad, adsync, install, nuget, packages, sn7]
description: At many companies users, groups and organization structure is stored and maintained in Active Directory - or in another storage, synced to AD. This is why sensenet is capable of synchronizing AD objects into both directions, from AD to the portal or back.

---

# Active Directory Synchronization
At many companies users, groups and organization structure is stored and maintained in **Active Directory** - or in another storage, synced to AD. This is why sensenet is capable of synchronizing AD objects into both directions:

- [AD to Portal sync](/docs/sync-ad-to-portal): AD users can be synchronized to the portal
- Portal to AD sync: portal users can be synchronized to AD servers (*this feature is not yet supported in sensenet 7*).

![Active Directory](https://github.com/SenseNet/sn-adsync/raw/master/docs/images/adsync-adexplorer.png "Active Directory")

Changes are updated with *batch synchronization* meaning that all changes are synchronized periodically in one step performed by a standalone application.

Some other Active Directory related features include the following:

- **eDir to Portal sync**: Novel eDir users can be synchronized to the portal as well.
- **Forms authentication from AD**: portal users can be authenticated against an AD on login regardless of login type (NTLM or Forms).

By setting up Active Directory synchronization users gain the following advantages:

- When using both sensenet and Active Directory server in an enterprise environment, user profiles need not to be maintained in both directories.
- Installing a new sensenet portal with Forms authentication into an environment with already existing AD server containing many users is easily done by using AD sync and activating *Forms authentication from AD*.

### Basic concepts and features
#### Object types
Synchronization affects the following types of objects:

| AD object | sensenet Content Repository object |
|-----------|---------------|
| user | User (or a derived type) |
|group | Group |
| organizationalUnit | Organizational Unit |
| Organization (only with eDir to Portal sync) | Organizational Unit |
| container | AD Folder |
| domain | Domain |

#### Sync-trees
Mapping of objects is configured by the definition of so-called *sync-trees*. A sync-tree defines the root element of the tree of synchronized objects both on the portal and in the AD. This means that whole object trees can be easily synchronized by simply defining the root element of the tree and the mapping of this root element to the portal / to the AD. Every object under the sync-tree root is mapped with respect to the mapping of the root objects. In order to customize which objects should be synchronized under in a sync-tree exceptions can be configured.

#### Servers and Domains
Different sync-trees may be defined on different servers and under different domains. This means that it is possible to sync objects from different domain controllers to the portal and to different domain controllers from the portal. Please note that the current implementation handles separate domains with the following restrictions:

- Moving of objects between domains hosted by different servers is not supported.
- Cross-reference of objects between domains hosted by different servers is not supported.
- Child domains hosted by separate servers must be synced to portal as if they were in no relation (should not be placed under each other)

#### Guid and last sync date
The synchronization of objects is based on the objects' *objectGuid* property in AD (the corresponding property of portal objects is called *syncGuid*). This means that whenever an object is updated the corresponding object to be updated is found by searching for the object having the same guid:

- When updating an AD object the corresponding portal object with the same guid is searched under ```/Root/IMS```
- When updating a portal object the corresponding AD object with the same guid is searched in *all sync-trees*

When a new object is created the *objectGuid* property of the AD object is copied into the *syncGuid* field of the portal object. In the **Portal to AD** direction the creation of a portal object triggers a creation of an AD object: the created AD object's *objectGuid* is copied back to the portal object's *syncGuid*.

The portal objects that are synchronized contain another property: *LastSync*. This date property shows the time of the last synchronization. This date is primarily used in AD to portal user and group synchronization: only those users' and groups' properties are synced that have been modified since the last synchronization (either in AD or in the portal). Note that moving objects in AD is always updated on the portal regardless of this property. Also note that moving objects on the portal will not update this property in the current implementation.

#### User synchronization
Syncing of users includes the following:

- creating new users
- updating user property changes
- renaming and moving users within AD server and sync-tree bounds
- deleting users

Notes:

- The different user properties in AD and on the portal can be mapped onto each other using the global AD sync settings.
- By default portal user property *Name* and AD user properties *Name* and *sAMAccountName* are mapped to each other:
  - renaming a portal user will cause the corresponding AD object's *Name* and *sAMAccountName* properties to be set to the portal user's *Name* property
  - renaming an AD user will cause the corresponding portal user's *Name* and *LoginName* fields to be set to the AD user's *sAMAccountName* property
  - the default *sAMAccountName* can be changed by defining a property mapping with *Name* **PortalProperty** and a custom AD property instead of *sAMAccountName* as **AdProperty**
- User properties in AD to portal direction are only updated when the AD object's *whenchanged* property exceeds the portal object's *lastSync* property or the content changed in the meantime in the Content Repository.
- **Multi-valued** AD properties are handled as **single-valued**: if not empty, the first item will be treated as the value of the property (eg. even if you give 2 other telephone numbers (*otherPhone*) only the first one will be synced to portal). In case you need to sync more properties of the same type create another property in the AD scheme (eg. *secondaryPhone*) and define a property mapping in the configuration.
- User deletions are never synchronized as physically deleting the user on the other server. For example if you delete a user on the portal, the corresponding user in AD is not deleted but set to disabled and moved to a special folder instead that can be defined in the configuration - the same applies to the other direction. Note that there might be special contstraints defined either on the portal or in AD that ensures that two objects never have the same property value for a configured property. In order to avoid the collision of properties of previously disabled and newly created users marked properties of a disabled user are *prefixed with the date of deletion*. Definition of these properties can also be set in the property mapping.

#### Group synchronization
Syncing of groups includes the following:

- creating new groups
- updating group membership changes
- renaming and moving groups within AD server and sync-tree bounds
- deleting groups

Notes:

- Group membership changes in AD to portal direction are only synced when the AD object's *whenchanged* property exceeds the portal object's *LastSync* property or the content has changed in the meantime in the Content Repository.
- Members are updated according to the following: the guid of AD group members is retrieved using the most suitable synctree to retrieve the user from AD. If no such synctree exists, the group's synctree IP will be used to connect to AD and get the user's guid. Portal user is then loaded using this guid, and group membership is updated. If a portal user by the given guid does not exist, the member is not added to the group.

#### Folder (Container/AD Folder/Organizational Unit) synchronization
Syncing of folders includes the following:

- creating new folders
- renaming and moving folders within AD server and sync-tree bounds
- deleting folders

Notes:

- Moving a folder to another location causes all of its children to be moved as well.
- Deleting a folder causes all of its child folders and groups to be deleted as well. Child users will be disabled and moved to a special *deleted* folder that can be defined in the configuration.
- If deleting/moving of child objects fails the folder is not deleted.

### Forms authentication from AD
There is a way to authenticate users against an Active Directory even when using **Forms authentication** (instead of using Windows Integrated authentication). This means that when a portal user logs in with Forms authentication, his/her password is checked against the user's password set in an Active Directory server and not against the one given on the portal.

#### Configuration
> This feature is not yet supported in sensenet 7.

The settings for *forms authentication from AD* be found in the ```sensenet/formsAuthenticationFromAD``` section of the web.config. Below you can see a fully featured skeleton of this configuration:

```xml
  <sensenet>
    <formsAuthenticationFromAD>
      <authSettings>
        <authSetting domain="" adServer="" virtualADUser="" customLoginProperty=""
customADAdminAccountName="" customADAdminAccountPwd="" />
      </authSettings>
    </formsAuthenticationFromAD>
  </sensenet>
```

You will also have to enable the AD DirectoryProvider in the web.config appsettings:

```xml
<add key="DirectoryProvider" value="SenseNet.DirectoryServices.ADProvider" />
```

The following settings can be customized using the ```<authSetting>``` node above:

- **domain**: the domain to be used with AD authentication.
- **adServer**: address of Active Directory server.
- **virtualADUser**: (*this feature is not available in sensenet 7.0*) when this attribute is set to true AD users don't need to be synced to portal to log in - when an AD user logs into the portal a special user is loaded (```/Root/IMS/BuiltIn/Portal/VirtualADUser```) and user properties are synced instantaneously in-memory (but no user is created on the portal).
- **customLoginProperty**: set it to the custom AD property used for authentication instead of login name (for example email) (*optional*).
- **customADAdminAccountName**: this property holds information about the user having sufficient rights to retrieve information from AD (*optional*).
- **customADAdminAccountPwd**: password of the previously defined *customADAdminAccountName* user (*optional*).

##### Example
The following xml is a simple example for setting up forms authentication from AD for a specific domain:

```xml
  <sensenet>
    <formsAuthenticationFromAD>
      <authSettings>
        <authSetting domain="NATIV" adServer="<IP_ADDRESS>" />
      </authSettings>
    </formsAuthenticationFromAD>
  </sensenet>
```

### Logging and Error Handling
Every initiated action is logged in the system. Should an error occur during an action, the execution will not hang. Instead the error is logged and the execution proceeds to the next action. Every single action and error is timestamped. In case of Portal to AD sync there is a possibility to redo/retry an unsuccessfully executed action.

##### AD to Portal log
A log file with a time stamp in its name is created next to the executor every time a synchronization is performed.

##### Portal to AD log
A daily logfile (rolling, max size is 200kB) is created in the web folder:

```txt
adsync.log
```

##### Example
A typical log file may have a content similar to the following:

```xml
2010.10.11. 16:04:48 Start Start: SyncAD2Portal, id: 54667c38-c2c2-49cd-95ee-ba076547b8a2, method:Void Main(System.String[]), ticks:53542326027
2010.10.11. 16:04:48 Information Caching portal users...
2010.10.11. 16:04:49 Information Caching portal groups...
2010.10.11. 16:04:49 Information Caching portal containers...
2010.10.11. 16:04:49 Information Syncing containers (domains, orgunits, containers) (OU=MyOrg,DC=Nativ,DC=local --> /Root/IMS/NATIV/MyOrg)
2010.10.11. 16:04:49 Verbose       Syncing (AD object: LDAP://<IP_ADDRESS>/OU=MyOrg,DC=Nativ,DC=local)
2010.10.11. 16:04:49 Verbose          New portal domain - creating under /Root/IMS (AD object: LDAP://<IP_ADDRESS>/DC=Nativ,DC=local)
2010.10.11. 16:04:49 Verbose          Updating portal domain properties (AD object: LDAP://<IP_ADDRESS>/DC=Nativ,DC=local; portal object: /Root/IMS/a9bed9ad-1218-4ae5-b578-83c310f19fb5)
2010.10.11. 16:04:49 Verbose          New portal orgunit - creating under /Root/IMS/NATIV (AD object: LDAP://<IP_ADDRESS>/OU=MyOrg,DC=Nativ,DC=local)
```


text:
# caps

![UML](UML11.png)

     ## dotenv

     STORE_NAME=Flowers

## output

```

EVENT { event: 'pickup',
    time: 2020-03-06T18:27:17.732Z,
    payload:
     { store: Flowers,
       orderID: 480ac237-5021-4b9e-8f5f-762cc7c7d8dc,
       customer: Miss Gladys Schinner,
       address: 13437 Lucius Lane }}
Driver: picked up 480ac237-5021-4b9e-8f5f-762cc7c7d8dc
EVENT { event: 'in-transit',
    time: 2020-03-06T18:27:18.738Z,
    payload:
     { store: Flowers,
       orderID: 480ac237-5021-4b9e-8f5f-762cc7c7d8dc,
       customer: Miss Gladys Schinner,
       address: 13437 Lucius Lane
DRIVER: delivered up 480ac237-5021-4b9e-8f5f-762cc7c7d8dc
VENDOR: Thank you for delivering  480ac237-5021-4b9e-8f5f-762cc7c7d8dc
EVENT { event: 'delivered',
  time:Sun Aug 29 2021 21:25:17 GMT-0700 (Pacific Daylight Time),
  payload:
   { store: Flowers,
     orderID: 480ac237-5021-4b9e-8f5f-762cc7c7d8dc,
     customer: Miss Gladys Schinner,
     address: 13437 Lucius Lane

     ```

license: MIT

repository: emanmkhareez/caps

branch_name: refs/heads/main

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: emanmkhareez/caps


text:
# `react-native` How to use` code-push` hot update

## Before you use

 -Q: "Apple App Store and Android App Store are not allowed to use hot update?"
   A: "Everyone is allowed."

   > Apple allows the use of hot update [Apple's developer agreement] (https://developer.apple.com/programs/ios/information/iOS_Program_Information_4_3_15.pdf), but stipulates that it cannot pop up boxes to prompt users to update, affecting the user experience.
   > Google Play also allows hot updates, but you must pop the box to inform users of the update. When it is released in the android market in China, you must close the update popup box, otherwise the application will be rejected with "Please upload the latest version of the binary application package" when reviewing the application.

 -Q: "Can the react-native development environment update mode be used directly in a production environment?"
   A: "No."

 -Q: "Is it complicated to use code-push?"
   A: "It's not complicated. Many online articles say it's complicated because the author didn't understand the official documentation carefully and thought that they had stepped into the pit."

 -Q: "Why is code-push recommended?"
   A: "Very good. In addition to the basic update functions, there are also statistics, hash calculation fault tolerance, and patch update functions. Microsoft projects, large companies have guaranteed technology, and open source. In recent years, Microsoft has embraced open source, and everyone is also Eye-catching. "

## Install dependencies

#### 1. [react-native-cli] (https://github.com/facebook/react-native) react-native command line tool, you can use the `react-native` command in the terminal after installation

`` `shell
$ npm install react-native-cli @ latest -g
`` `

#### 2. [code-push-cli] (https://github.com/Microsoft/code-push) Connect to Microsoft Cloud, manage and release updated command-line tools, and use `code-push in the terminal after installation `Command

`` `shell
$ npm install code-push-cli @ latest -g
`` `

#### 3. [react-native-code-push] (https://github.com/Microsoft/react-native-code-push) Integrate into the react-native project, follow the steps to install and modify the configuration integrated

`` `shell
$ react-native init CodePushDemo #Initiate a react-native project
$ cd CodePushDemo
$ npm install --save react-native-code-push @ latest #Install react-native-code-push
$ react-native link react-native-code-push #Connect to the project, prompt for input configuration can be ignored first
`` `

#### 4. [code-push-server] (https://github.com/lisong/code-push-server) Microsoft cloud service is too slow in China, you can use it to build your own server.

-[docker] (https://github.com/lisong/code-push-server/blob/master/docker/README.md) (recommend)
-[manual operation] (https://github.com/lisong/code-push-server/blob/master/docs/README.md)

## Create a server application

Based on code-push-server service

`` `shell
$ code-push login http: // YOUR_CODE_PUSH_SERVER_IP: 9027 #Log in to the browser to obtain a token, username: admin, password: 123456
$ code-push app add CodePushDemoiOS ios react-native #Create iOS version, get Production DeploymentKey
$ code-push app add CodePushDemoAndroid android react-native #Create android version, get Production DeploymentKey
`` `

## Configure CodePushDemo react-native project

#### iOS configuration

Edit the `Info.plist` file and add` CodePushDeploymentKey` and `CodePushServerURL`

1. The `CodePushDeploymentKey` value is set to the Production DeploymentKey value of CodePushDemo-ios.

2. Set the value of `CodePushServerURL` to the code-push-server service address http: // YOUR_CODE_PUSH_SERVER_IP: 9027 / When not on the same machine, please change YOUR_CODE_PUSH_SERVER_IP to the external network IP or domain name address.

3. Change the default version number 1.0 to three digits 1.0.0

`` `xml
...
<key> CodePushDeploymentKey </ key>
<string> YourCodePushKey </ string>
<key> CodePushServerURL </ key>
<string> YourCodePushServerUrl </ string>
...
`` `

#### android configuration

Edit `MainApplication.java`

1. Replace YourKey with CodePushDemo-android's Production DeploymentKey value

2. The value of `YourCodePushServerUrl` is set to the code-push-server service address http: // YOUR_CODE_PUSH_SERVER_IP: 9027 / When not on the same machine, please change YOUR_CODE_PUSH_SERVER_IP to the external network IP or domain name address.

3. Change the default version number 1.0 to three digits 1.0.0

`` `java
@Override
protected List <ReactPackage> getPackages () {
  return Arrays. <ReactPackage> asList (
      new MainReactPackage (),
      new CodePush (
         "YourKey",
         MainApplication.this,
         BuildConfig.DEBUG,
         "YourCodePushServerUrl"
      )
  );
}
`` `

## Add update check

You can refer to [code-push-demo-app] (https://github.com/lisong/code-push-demo-app/)
Can be added at the entry componentDidMount

`` `javascript
CodePush.sync ({
    installMode: CodePush.InstallMode.IMMEDIATE,
    updateDialog: true
});
`` `

Don't forget the head introduction

`` `javascript
import CodePush from "react-native-code-push"
`` `

## Run CodePushDemo react-native project

#### iOS

`` `shell
$ cd / path / to / CodePushDemo
$ open ios / CodePushDemo.xcodeproj
`` `
Open the menu Product> Scheme> Edit Scheme ...> Run in Xcode and change the Build Configuration to Release, then run the compilation

### android

`` `shell
$ cd / path / to / CodePushDemo
$ cd android
$ ./gradlew assembleRelease
$ cd app / build / outputs / apk #Install the completed package app-release.apk to your phone
`` `

## Publish updates to the service

iOS and android are released separately, so the CodePushDemo-ios and CodePushDemo-android applications are created

`` `shell
$ cd / path / to / CodePushDemo
$ code-push release-react CodePushDemo-ios ios -d Production #iOS version
$ code-push release-react CodePushDemo-android android -d Production #android version
`` `

## Examples

[code-push-demo-app] (https://github.com/lisong/code-push-demo-app)

### For more information refer to [code-push-server] (https://github.com/lisong/code-push-server)

repository: jakkireddy/code-push-server

branch_name: refs/heads/master

repo_name: jakkireddy/code-push-server


text:
# Namecheap Bulk Reuqeast

A simple script to register a list of domains.

## To start

1. Enter required domains you want to register in `domains.txt`
2. Run `./run.sh domains.txt`
3. The script will try to register domains in the order spceified in the input file.
4. Successfully registered domains will be written to `success.txt`

## Modifications you should/can make:

1. In the `run.py` you should set `Sandbox` to `False` if you want to use your real account.
2. Make sure you have enabled Namecheap API and whitelisted your server's IP address there.
3. Put your API key and IP address in `run.py`
4. Make sure provided values for domain registration are correct in `run.py` (address, phone number, ...)


text:
# :books: BookLibrary

![Build Status](https://travis-ci.com/Malte311/BookLibrary.svg?branch=master)
[![GitHub license](https://img.shields.io/github/license/Malte311/BookLibrary)](https://github.com/Malte311/BookLibrary/blob/master/LICENSE)
[![Documentation](https://img.shields.io/badge/-documentation-informational)](https://malte311.github.io/BookLibrary/)

> _BookLibrary_ is a library for book notes.
> In fact, _BookNoteLibrary_ would be a more appropriate name since the idea is to manage book notes -- not whole books.

## :whale: Installation (in three simple steps via Docker)

1. Download the `docker-compose.yml` file _or_ clone the whole repository:

```bash

git clone git@github.com:Malte311/BookLibrary.git

```

2. Adjust the `docker-compose.yml` file. Specify the correct url and adjust the port.

```yaml

version: "2"

services:
  web:
    image: quay.io/malte311/book-library:latest
    container_name: book-library
    ports:
      - "<IP_ADDRESS>:8080:80"
    volumes:
      - ./data/:/php-code/data/
    restart: always
    environment:
      - SERVERURL=https://example.com/book-library

```

3. Get the newest Docker image and start a Docker container (inside of the project folder):

```bash

docker-compose pull
docker-compose up -d

```

## :book: Usage
After the installation, run `php userAdministration.php add` on the command line in order to create an initial user. Afterwards, you can log into the application using the credentials you just created. This script allows you to _delete_, _edit_ or _list_ all available users as well. Simply replace the parameter `add` with `delete`, `edit` or `list`, respectively.

While logged in, you can view, filter and sort all book note files which are present in the `data/` directory. In order to get rid of the example files from this repository, simply delete them in the `data/` folder. For adding new book notes, place their corresponding markdown files in the `data/books/` folder (and optionally the book cover in the `data/covers/` folder). A detailed guide on how to manage the book note files can be found [here](https://github.com/Malte311/BookLibrary/blob/master/src/data/README.md).

The content of each book note file can be viewed by clicking on the corresponding card in the overview.

## :page_facing_up: License

This project is licensed under the terms of the [MIT License](https://github.com/Malte311/BookLibrary/blob/master/LICENSE).


text:
# REST API backend for `tele-therapie.at`

## Routes

### Fundamental

`GET /`

 * Health check

### Authentication

`POST /auth/request-login-email`

 * Authentication (request login code via email)

`POST /auth/login`

 * Authentication (submit login code)

`POST /auth/logout`

 * Authentication (logout all devices)

### Therapist user profiles

```
GET /me         (authenticated only)
GET /me/public
GET /me/pending
```

 * Get profile of logged in user

`PATCH /me  (authenticated only)`

 * Edit profile of logged in user

`DELETE /me  (authenticated only)`

 * Delete logged in user

### Retrieve therapist information

`GET /therapist/:id`

 * Retrieve full profile of a therapist

```
GET /therapists
    ?type={ergo|physio|logo}   optional therapist type
    &speciality=:labels        optional comma-separated list of speciality labels
    &limit=:num
    &offset=:num
```

 * Retrieve summary profiles of a set of therapists

### Speciality management

`GET /specialities/{ergo|physio|logo}`

 * Retrieve speciality list for a therapist type, in the order that
   the specialities appear in the site

### Therapist avatar images

```
GET /image/:id.{jpg|png}
GET /image/:id.{jpg|png}?thumbnail=true
```

 * Retrieve avatar image for a therapist: these links are generated by
   the backend and passed in responses to the `/therapists` and
   `/therapist/:id` routes

## API usage

### Unauthenticated

`GET /specialities` can be used to retrieve the speciality list for a
therapist type, although it generally shouldn't be needed in the
front-end, since edits to the category list in the admin interface
will trigger changes to JSON files in the site repository used to
generate the front pages for different therapist types.

`GET /therapists` is the main route used for the "matchmaker"
interface.

`GET /therapist/:id` can then be used to retrieve the full user
profile for an individual therapist.

Once a list of therapist summary profiles or a full profile has been
retrieved, the avatar image (thumbnail or full version) can be
retrieved using the `GET /image/:id.{jpg|png}` route, following the
link included in the therapist profile data.

**Resulting requirements**

 * Category list updates in the admin interface should propagate the
   new category data to the main site by updating a
   `site/data/specialities.json` file in GitHub. This means that the
   admin server must be able to perform operations on the GitHub
   repository (possibly as the logged in admin user by assigning the
   right permissions via GitHub OAuth).

 * The summary profiles returned from the `GET /therapists` route
   should include the minimum set of information needed to render a
   list of therapists filterable by speciality, Krankenkasse contract
   status, language and location. This includes a link to access a
   thumbnail image for the therapist. In particular, the summary
   profiles shouldn't include the full therapist profile text (which
   could be quite long).

 * The full profile accessed via the `GET /therapist/:id` should
   include everything, including a link to access the full size
   version of the therapist's avatar image.

### Authenticated

Therapist users authenticate to the system using "magic link" login
via the `/auth/request-login-email` and `/auth/login` routes.

**QUESTION: how to do the token stuff for Vue.js? Use JWT? Or just the
low-rent approach I've used up to now?**

**QUESTION: should it also be possible for therapists to sign up using
social login (Google or Facebook probably)?**

Once authenticated, the `/me` routes can be accessed to view and
modify the therapist's profile. The therapist can see both their
current publicly visible profile and their profile with any pending
edits applied to it. Any edits made to a therapist's profile are saved
as pending, and need to be reviewed by an administrator before
becoming publicly visible. (One exception to this is if a therapist
wants to delete their profile: that happens immediately.)

The therapist profile includes contact data (address, phone, email,
website), an ordered list of specialities the therapist can offer, an
ordered list of languages that the therapist can offer, a short
profile to appear in therapist lists, and a full long-text profile to
appear on the individual therapist's page.

**QUESTION: What to use for editing the therapist profiles? Some sort
of WYSIWYG editor outputting Markdown or something? What about letting
therapists upload images? (Something like https://quilljs.com/? Or
CKEditor, which is free for open source projects.)**

All communications with therapists about the pending, approved or
rejects status of edits to their profile will be sent over email.

**Resulting requirements**

 * There needs to be a way for a therapist to preview the summary and
   full view of their profile before submitting edits. This mechanism
   should be self-contained in the front end, implemented using
   Vue.js. (This should be relatively easy to do, since the profiles
   seen in search results will be rendered from the same data as the
   therapist is editing.)

 * There needs to be a way to send email. What are the GDPR
   implications of using Mailjet? (Actually looks pretty good, at a
   first glance: servers in EU, GDPR compliance statements, etc.)

 * The therapist profile editing page needs the following features:
    - Non-intrusive address completion
    - A good phone number input
    - A reorderable list of specialities (one of those two-column
      things with dragging between the lists?)
    - A reorderable list of languages with a good selector for common
      languages
    - Some sort of rich text editor for the full profile, perhaps
      including image upload

To start with let's have a single profile image, plain ASCII for both
profiles. We can add better editing and representation later on.

## API behaviour

### Fundamental

```
GET /
  => 200 OK with "ok"
```

### Authentication

```
POST /auth/request-login-email { "email"<EMAIL_ADDRESS>}
  => 204 No Content
     Generate login token
     Send email with login token to email address
```

```
POST /auth/login { "login_token": "dfkljwrj23fwkefdslkj4t" }
  => 400 Bad Request if token unknown
  => 200 OK + profile if valid token (/me)
```

```
POST /auth/logout
  => 404 Not Found if not authenticated
  => 204 No Content
```

### Therapist user profiles

```
GET /me
  => 404 Not Found if not authenticated
  => 200 OK
  {
    "id": 1234,
    "email"<EMAIL_ADDRESS>    "type": "ergo",
    "name": "Ian Ross",
    "street_address": "Drobollacher Seepromenade 17",
    "city": "Villach",
    "postcode": "9580",
    "country": "AT",
    "phone": "+436804451378",
    "website": "https://www.skybluetrades.net",
    "languages": ["en", "fr", "de"],
    "short_profile": "I'm totally not a therapist...",
    "full_profile": "I mean, really totally not.  Nothing to do with it, man.",
    "status": "approved",
    "photo": "svwe9fwvfj3.jpg",
    "specialities": ["Hand", "Neuro"]
  }
```

```
PATCH /me { "phone": "+436804451379" }
  => 404 Not Found if not authenticated
  => 200 OK returning full profile
```

(Also supports image upload using multipart encoding, which sets a new
image for the therapist)

```
DELETE /me
  => 404 Not Found if not authenticated
  => 204 No Content
```

### Retrieve therapist information

```
GET /therapist/1234
  => 404 Not Found if therapist ID not known
  => 200 OK with full profile
```

```
GET /therapists?type=ergo&speciality=Neuro&limit=5
  => 200 OK with summary profiles
  [
  { "id": 1234,
    "email"<EMAIL_ADDRESS>    "type": "ergo",
    "name": "Ian Ross",
    "city": "Villach",
    "postcode": "9580",
    "country": "AT",
    "phone": "+436804451378",
    "website": "https://www.skybluetrades.net",
    "languages": ["en", "fr", "de"],
    "short_profile": "I'm totally not a therapist...",
    "photo": "svwe9fwvfj3.jpg",
    "specialities": ["Hand", "Neuro"] },
    ...
  ]
```

### Speciality management

```
GET /specialities/ergo
  => 200 OK
  [ { "label": "Hand", "icon": "ergo-hand.png" },
    { "label": "Neuro", "icon": "ergo-neuro.png" },
    { "label": "Paediatric", "icon": "erog-paediatric.png" },
    { "label": "Psychiatric", "icon": "erog-psychiatric.png" },
    { "label": "Something else" },
    { "label": "Something else again" }
  ]
```

### Therapist avatar images

```
GET /image/rfgk43frf.jpg
  => 404 Not Found if not a known image ID
     200 OK with image data at size suitable for main therapist page
```

```
GET /image/rfgk43frf.jpg?thumbnail=true
  => 404 Not Found if not a known image ID
     200 OK with image data at size suitable for therapist list page
```

repository: ian-ross/ttat-api

repo_name: ian-ross/ttat-api


text:
# github-action-with-allure-report
A sample pytest-bdd project to trigger automated smoke tests, generate Allure Report and publish the same to GitHub Pages via GitHub Actions workflow

Allure Report: https://ashikkumar23.github.io/github-action-with-allure-report

![image](https://user-images.githubusercontent.com/63716186/140095537-3cc0b246-4d6c-4b91-8940-a9d61fc093da.png)


text:
---
title: "out of the box"
weight: 7
name: "Out of the box"
image: "out-of-the-box-hero.jpg"
---

For this study, a three-dimensional self-portrait,
I focus on a personality trait - my desire to always deviate from the norm, to think independently and to not confine myself to preconceived ideas. This notion of stepping away from the familiar, of refusing taboos, keeps me free and encourages me to try anything, without looking to be provocative. I believe this is the framework to the theatre of life. One must desire to leave it behind to be free, but one can never leave it behind totally. It’s the struggle that counts.

Here, I try to leave behind the framework, the box that contains us. Like the English expression, to think outside the box. With reference to the dramatising and preoccupation of the self, ever- present in today’s contemporary art.

repository: regisbruggheman/juliegauthron

repo_name: regisbruggheman/juliegauthron


text:
---
title: Widget layers, z-order, & parent frames
---

# Widget layers, z-order, & parent frames

When you have multiple widgets on a slide, you can control the layer (or
z-order) of the widgets, controlling which widgets are on top of others
in cases where two or more widgets overlap.

When adding a widget to an existing slide, you also have the option to
add it to the "parent frame" (and not to the slide), meaning that if
the slide changes, the widget will still be there.

Let's look at how all this works.

## Overlapping widgets, layers, & z-order

Any time you have two widgets that overlap, MPF must decide which widget
will be drawn "on top" of the other.

At the most basic level, any time you have more than one widget listed
in a config (whether it's in a `widget_player:`, `slide_player:`, or a
definition in a `slides:` or `widgets:` section), the widgets will be
drawn in the order they are in the config.

For example, here's a slide that has widget3.1, then widget3.2, then
widget3.3:

``` mpf-mc-config
slides:
  3_widgets:
    - type: text
      text: widget3.1
      color: red
      font_size: 80
      y: 40%
    - type: text
      text: widget3.2
      color: orange
      font_size: 80
      y: 50%
    - type: text
      text: widget3.3
      color: violet
      font_size: 80
      y: 60%
#! slide_player:
#!   show_slide: 3_widgets
##! test
#! post show_slide
#! advance_time_and_run .1
#! assert_text_on_top_slide "widget3.1"
```

The result is like this. Note that widget3.1 is on top of widget3.2,
which is on top of widget3.3:

![image](/mc/images/widget_layers_order.jpg)

In this example, all three widgets are 100% opaque, but if any of them
had opacity of less than 100%, then you would see the lower level widget
through the higher one. See the [Widget Opacity & Transparency](opacity.md)
guide for details.

You can also use the `z:` setting to manually set the relative order of
how you want the widgets to overlap. Widgets with higher `z:` values
will be drawn on top of those with lower values.

Here's the same example as before, but with `z:` values added:

``` mpf-mc-config
slides:
  3_widgets:
    - type: text
      text: widget3.1
      color: red
      font_size: 80
      y: 40%
      z: 1
    - type: text
      text: widget3.2
      color: orange
      font_size: 80
      y: 50%
      z: 100
    - type: text
      text: widget3.3
      color: violet
      font_size: 80
      y: 60%
      z: 2
#! slide_player:
#!   show_slide: 3_widgets
##! test
#! post show_slide
#! advance_time_and_run .1
#! assert_text_on_top_slide "widget3.1"
```

And the results:

![image](/mc/images/widget_layers_z.jpg)

Note that *widget3.2* is on top since it's `z:` is 100, then
*widget3.3* is next with `z: 2`, and finally *widget3.1* is on the
bottom with `z: 1`

Notes about z-order:

* The default `z:` value is `0`, so anytime you have a widget without
    a `z:` setting, it's like you have `z: 0`.
* The order the widgets are listed in the config file is only used as
    a tie-breaker if multiple widgets have the same `z:` settings. (This
    is why the first example worked, since all three widgets had
    `z: 0`.)
* You can mix-and-match order and `z:` settings.
* The actual numeric `z:` settings don't matter. You can have 1, 2, 3
    or 100, 200, 300, or 1, 20000, 1000000 or whatever you want.
* Setting `z:` values for widgets on a slide is only really used if
    you want to later use the widget player to add a widget to a slide
    in between certain existing widgets.
* In most slides, you will not mess with `z:` settings and instead use
    the order of the widgets in the config file to set the order they
    are on the slide.

## Adding widgets to parent frames

When you use the `widget_player:`, it will add the widget to the current
slide on the default display.

If you want to target a specific slide, you can add a `slide:` setting
to your widget player with the name of the slide.

In both cases, the widget player will add the widget to a slide.

However, it's also possible to add a widget to the "frame" which
holds the slides, meaning that the widget is shown "on top" of the
slide rather than as part of the slide.

Why would you want to do that?

Sometimes it's useful to have a widget which "stays put" even as the
underlying slides change.

One example is for tilt warnings. When the player gets a tilt warning,
you might want to show the text "WARNING" for 2 seconds. However if
you use the regular widget player to add this widget to the current
slide, then if that slide is replaced by another slide during those 2
seconds, your tilt warning will disappear too.

Another example is the scores. Maybe you want those to show along the
bottom on top of every slide? Or maybe something like the news crawl on
the bottom of the *Dialed In* display?

To do this, you can add the setting `z: -1` under the `widget_settings:`
section of your desired widget. Here's an example:

``` yaml
widget_player:
    trigger_event:
        my_widget:
            widget_settings:
               z: -1
```

This will make the widget added to the frame, and not to a slide,
meaning your widget will ride "on top" of every slide (and even on top
of any slide transitions that take place).

repository: missionpinball/mpf-docs

gha_language: Python

repo_name: missionpinball/mpf-docs


text:
# Note Taker

## Discription

This application allows users to generate and save notes with a title and text. This a is a very user friendly application that is powered by Express.JS.

## Application Link

Heroku App: https://fasica-note-taker.herokuapp.com/notes

## Usage

* Open the application
* Click on pencil at the top right of page
* Insert title
* Insert Text
* Click the save icon at the top right of the page
* To view new or old notes, naviage to the left of the screen and click on note of choice. The contents of the note clicked will be displayed to the right of the page.

## Technologies

* Express.js
* npm
* Heroku
* Node

## License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Copyright © 2021

## Questions

* Github: https://github.com/fasicasr
* Note Taker repository: https://github.com/fasicasr/hero-note-taker
* Email<EMAIL_ADDRESS>

repository: fasicasr/hero-note-taker

repo_name: fasicasr/hero-note-taker


text:
# Servitor
Minimize total distance between clients and servers.

/** Server Location optimization
 *
 * Minimizes the total distance between clients and servers.
 *
 * The client locations and the number of servers are specified.
 */

 /** Read problem spacifcation from stdin
 *
 * line 0: Number of servers to be located
 * line 1: Number of clients
 * line 2: client location
 * line 3: client location
 * ...
 */

 sample data:

 5
10
1 0 0
2 0 0
3 0 0
6 0 0
7 0 0
9 0 0
11 0 0
22 0 0
44 0 0
50 0 0

Two optimizing algorithms are implemented:

 - Exhaustive search gives the absolute minimum total distance, but is too slow from more than ~30 clients

 - K-Means clustering gives an answer in a reasonable time for larger number of clients with a total distance reasonably close to the absolute minimum

repository: JamesBremner/Servitor

repo_name: JamesBremner/Servitor


text:
# Getting Started

This page describes how to get started with the MyST parser, with a focus on enabling
it in the Sphinx documentation engine.

## Installation

[![PyPI][pypi-badge]][pypi-link]
[![Conda][conda-badge]][conda-link]

Installing the MyST parser provides access to two tools:

* A MyST-to-docutils parser and renderer.
* A Sphinx parser that utilizes the above tool in building your documenation.

To install the MyST parser, run the following in a
[Conda environment](https://docs.conda.io) (recommended):

```bash
conda install -c conda-forge myst-parser
```

or

```bash
pip install myst-parser[sphinx]
```

[pypi-badge]: https://img.shields.io/pypi/v/myst-parser.svg
[pypi-link]: https://pypi.org/project/myst-parser
[conda-badge]: https://anaconda.org/conda-forge/myst-parser/badges/version.svg
[conda-link]: https://anaconda.org/conda-forge/myst-parser

(parse-with-sphinx)=
## Enable MyST in Sphinx

Sphinx is a documentation generator for building a website or book from multiple source documents and assets. To get started with Sphinx, see their [Quickstart Guide](https://www.sphinx-doc.org/en/master/usage/quickstart.html).

To use the MyST parser in Sphinx, simply add: `extensions = ["myst_parser"]` to your `conf.py` and all documents with the `.md` extension will be parsed as MyST.

Naturally this site is generated with Sphinx and MyST!

## Writing MyST in Sphinx

Once you've enabled the `myst-parser` in Sphinx, it will be able to parser your MyST
markdown documents. This means that you can use the `.md` extension for your pages,
and write markdown in one of the following two flavors:

* [CommonMark Markdown](https://commonmark.org/) - the base flavor of markdown that is
  a standard across many communities.
* [MyST Markdown](syntax) - an extended flavor of CommonMark that includes syntax for
  Sphinx-specific functionality.

For example, you can include standard markdown like links: `[mylink](https://google.com)`
or MyST-specific syntax like roles: `` {myrole}`role content` ``.

For more information about the syntax that you can use with MyST markdown, see {doc}`syntax`.

```{tip}
Check out the [MyST-Markdown VS Code extension](https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight),
for MyST extended syntax highlighting.
```

## MyST configuration options

You can control the behavior of the MyST parser in Sphinx by modifying your `conf.py` file.
To do so, use the `myst_config` keyword with a dictionary of `key:val` pairs.

### Disable markdown syntax for the parser

If you'd like to either enable or disable custom markdown syntax, you may do so like so:

```python
myst_config = {
    "disable_syntax": ["list", "of", "disabled", "elements"]
}
```

Anything in this list will no longer be parsed by the MyST parser.

For example, to disable the `emphasis` in-line syntax, use this configuration:

```python
myst_config = {
    "disable_syntax": ["emphasis"]
}
```

emphasis syntax will now be disabled. For example, the following will be rendered
*without* any italics:

```md
*emphasis is now disabled*
```

For a list of all the syntax elements you can disable, see the
[`markdown-it-py` documentation](https://markdown-it-py.readthedocs.io/en/latest/using.html).

### Use bracket delimiters for math

You can also change the delimiters that are used for mathematics. By default, these
are **dollar signs (`$`)**. For example, to use brackets instead of dollar signs, use
this configuration:

```python
myst_config = {
    "math_delimiters": "brackets"
}
```

This will tell the MyST parser to treat the following as math:

```md
\[a=1\]
```

```{seealso}
The {py:class}`~myst_parser.sphinx_parser.MystParser` class API
and
[markdown-it-py](https://github.com/executablebooks/markdown-it-py)
for the list of syntax elements (known as rules) that you can disable.
```

repository: agaric/MyST-Parser

repo_name: agaric/MyST-Parser


text:
--------------------------------------------------------------------------------

## Treebank Statistics (UD_Latvian)

There are 190 `NUM` lemmas (5%), 212 `NUM` types (3%) and 424 `NUM` tokens (2%).
Out of 16 observed tags, the rank of `NUM` is: 6 in number of lemmas, 6 in number of types and 11 in number of tokens.

The 10 most frequent `NUM` lemmas: viens, viena, trīs, 000, 25, divi, divas, 1, 3, 50

The 10 most frequent `NUM` types:  viens, 000, 25, trīs, vienu, viena, 1, 3, 50, desmit

The 10 most frequent ambiguous lemmas: tūkstoši ([NUM]() 4, [NOUN]() 1), +371 ([PART]() 1, [NUM]() 1), 14.00 ([NUM]() 1, [SYM]() 1), III ([ADJ]() 2, [NUM]() 1)

The 10 most frequent ambiguous types:  +371 ([NUM]() 1, [PART]() 1), 14.00 ([NUM]() 1, [SYM]() 1), III ([ADJ]() 2, [NUM]() 1)

* +371
  * [NUM]() 1: Tel. +371 29145958
  * [PART]() 1: Tel. : +371 6777 5432
* 14.00
  * [NUM]() 1: 12. jūlijā 14.00 Malienas tautas namā - disenīte bērniem un pusaudžiem .
  * [SYM]() 1: Andra Vilka grāmatas " Grūtupa fenomens " atvēršanas svētki š.g. 15. novembrī plkst. 14.00 Jāņa Rozes grāmatnīcā Kr. Barona ielā 5
* III
  * [ADJ]() 2: Datu centrs " Dattum " būs vienīgais " Tier III " datu centrs Baltijas valstīs un Ziemeļvalstīs .
  * [NUM]() 1: Savukārt biznesa klienti Latvijā un ārzemēs saņems uzņēmējdarbībai vajadzīgus mākoņdatošanas un lieljaudas datu analīzes pakalpojumus , izmantojot kompānijas jauno augstas klases ( Tier III ) datu centru un datu pārraides maģistrāli no Krievijas caur Latviju uz Vāciju , Tartačuks sacīja .

## Morphology

The form / lemma ratio of `NUM` is 1.115789 (the average of all parts of speech is 1.616894).

The 1st highest number of forms (5) was observed with the lemma “divi”: divi, diviem, divos, divu, divus.

The 2nd highest number of forms (5) was observed with the lemma “viena”: viena, vienai, vienas, vienu, vienā.

The 3rd highest number of forms (4) was observed with the lemma “divas”: divas, divu, divām, divās.

`NUM` occurs with 4 features: [lv-feat/NumType]() (424; 100% instances), [lv-feat/Number]() (141; 33% instances), [lv-feat/Case]() (131; 31% instances), [lv-feat/Gender]() (130; 31% instances)

`NUM` occurs with 10 feature-value pairs: `Case=Acc`, `Case=Dat`, `Case=Gen`, `Case=Loc`, `Case=Nom`, `Gender=Fem`, `Gender=Masc`, `NumType=Card`, `Number=Plur`, `Number=Sing`

`NUM` occurs with 21 feature combinations.
The most frequent feature combination is `NumType=Card` (283 tokens).
Examples: 000, 25, viens, 1, 3, 50, trīs, 20, 200, 8000

## Relations

`NUM` nodes are attached to their parents using 14 different relations: [lv-dep/nummod]() (290; 68% instances), [lv-dep/compound]() (39; 9% instances), [lv-dep/nmod]() (38; 9% instances), [lv-dep/conj]() (16; 4% instances), [lv-dep/acl]() (11; 3% instances), [lv-dep/root]() (9; 2% instances), [lv-dep/nsubj]() (7; 2% instances), [lv-dep/name]() (3; 1% instances), [lv-dep/parataxis]() (3; 1% instances), [lv-dep/dobj]() (2; 0% instances), [lv-dep/iobj]() (2; 0% instances), [lv-dep/mwe]() (2; 0% instances), [lv-dep/ccomp]() (1; 0% instances), [lv-dep/nsubjpass]() (1; 0% instances)

Parents of `NUM` nodes belong to 11 different parts of speech: [NOUN]() (235; 55% instances), [SYM]() (71; 17% instances), [NUM]() (52; 12% instances), [VERB]() (24; 6% instances), [PROPN]() (14; 3% instances), [PUNCT]() (10; 2% instances), [ROOT]() (9; 2% instances), [X]() (6; 1% instances), [ADJ]() (1; 0% instances), [ADV]() (1; 0% instances), [PRON]() (1; 0% instances)

308 (73%) `NUM` nodes are leaves.

56 (13%) `NUM` nodes have one child.

41 (10%) `NUM` nodes have two children.

19 (4%) `NUM` nodes have three or more children.

The highest child degree of a `NUM` node is 6.

repository: kenwebb/docs

branch_name: refs/heads/pages-source

repo_name: kenwebb/docs


text:
# Caicloud.yml Reference

## Pre Build

Pre build container would run the commands and copy out outputs.

```yml
pre_build:
  context_dir: publish
  dockerfile_name: Dockerfile_prebuild
  image: golang:v1.5.3
    volumes:
      - .:/root
    environment:
      - key = value
    commands:
      - ls
      - pwd
    outputs:
        - file1
        - dir2
```

## Build

You must define context\_dir or dockerfile\_name to make Cyclone run build step from the configuration file.

```yml
build:
  context_dir: publish
  dockerfile_name: Dockerfile_publish
```

Cyclone would build a docker image from `<root_dir>/<context_dir>/<dockerfile_name>`, and the working directory is `<context_dir>`. If the image is built successfully, Cyclone would push it to the docker registry defined before running.

## Integration

Cyclone supports launching separate, ephemeral Docker containers as part of the integration process. This is useful, for example, if you require a database for running your tests.

The service conatienrs and the integration container are in default bridge network mode, so integration container could resolve the service names to the service containers by adding links. If you want to communicate with these containers, [add links to thses service containers](https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/) and use their names and the ports as endpoints. **If the image of service configurated as "BUILT_IMAGE", it will use the newly built image.**

```yml
integration:
  services:
    postgres:
      image: postgres:9.4.5
      enviroment:
        - key = value
      commands:
        - cmd1
        - cmd2
    app:
      image: BUILT_IMAGE
      enviroment:
        - key = value
      commands:
        - cmd1
        - cmd2
  environment:
    - key = value
  links:
    - postgres
  commands:
    - ls
    - pwd
    - ping postgress
```

## Post Build

Cyclone supports post build hook to complete the build process. Post build hook would be run in a isolated container, the root directory is mounted into the container as a volume. We suggest users to add necessary binaries to image, and implement the post build logic in `commands` field.

```yml
post_build:
  image: golang:v1.5.3
  environment:
    - key = value
  commands:
    - ls
    - pwd
```

## Depoly

Cyclone supports deploy the newest image for applications. It also support deploy the image to [Caicloud Cubernetes](https://caicloud.io/products/cubernetes) and [Google Kubernetes](http://kubernetes.io/).

#### Caicloud Cubernetes

```yml
#deploy
deploy:
  - deployment: redis-master
    cluster: cluster1_id
    namespace: namespace1_id
    containers:
      - container1
      - container2
  - deployment: redis-slave
    cluster: cluster2_id
    namespace: namespace2_id
    containers:
      - container1
      - container2
```

#### Google Kubernetes

```yml
#deploy
deploy:
  - type: kubernetes
    host: <cluster host>
    token: <cluster access token>
    cluster: cluster1_id
    namespace: namespace1_id
    deployment: redis-master
    containers:
      - container1
      - container2
  - type: kubernetes
    host: <cluster host>
    token: <cluster access token>
    cluster: cluster2_id
    namespace: namespace2_id
    deployment: redis-slave
    containers:
      - container1
      - container2
```

repository: liwandaniel/cyclone

repo_name: liwandaniel/cyclone


text:
# AwsJsonContacts

This project contains source code and supporting files for a serverless application that you can deploy with the SAM CLI. It includes the following files and folders.

- aws_json_contacts - Code for the application's Lambda function and Project Dockerfile.
- events - Invocation events that you can use to invoke the function.
- tests - Unit tests for the application code.
- template.yaml - A template that defines the application's AWS resources.

The application uses several AWS resources, including Lambda functions and an API Gateway API. These resources are defined in the `template.yaml` file in this project. You can update the template to add AWS resources through the same deployment process that updates your application code.

## Deploy the sample application

The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications. It uses Docker to run your functions in an Amazon Linux environment that matches Lambda. It can also emulate your application's build environment and API.

To use the SAM CLI, you need the following tools.

* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)
* Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community)

You may need the following for local testing.
* [Python 3 installed](https://www.python.org/downloads/)

To build and deploy your application for the first time, run the following in your shell:

```bash
sam build
sam deploy --guided
```

The first command will build a docker image from a Dockerfile and then copy the source of your application inside the Docker image. The second command will package and deploy your application to AWS, with a series of prompts:

* **Stack Name**: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name.
* **AWS Region**: The AWS region you want to deploy your app to.
* **Confirm changes before deploy**: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes.
* **Allow SAM CLI IAM role creation**: Many AWS SAM templates, including this example, create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. By default, these are scoped down to minimum required permissions. To deploy an AWS CloudFormation stack which creates or modifies IAM roles, the `CAPABILITY_IAM` value for `capabilities` must be provided. If permission isn't provided through this prompt, to deploy this example you must explicitly pass `--capabilities CAPABILITY_IAM` to the `sam deploy` command.
* **Save arguments to samconfig.toml**: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run `sam deploy` without parameters to deploy changes to your application.

You can find your API Gateway Endpoint URL in the output values displayed after deployment.

## Use the SAM CLI to build and test locally

Build your application with the `sam build` command.

```bash
AwsJsonContacts$ sam build
```

The SAM CLI builds a docker image from a Dockerfile and then installs dependencies defined in `hello_world/requirements.txt` inside the docker image. The processed template file is saved in the `.aws-sam/build` folder.

Test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the `events` folder in this project.

Run functions locally and invoke them with the `sam local invoke` command.

```bash
AwsJsonContacts$ sam local invoke AwsJsonContactsFunction --event events/event.json
```

The SAM CLI can also emulate your application's API. Use the `sam local start-api` to run the API locally on port 3000.

```bash
AwsJsonContacts$ sam local start-api
AwsJsonContacts$ curl http://localhost:3000/
```

The SAM CLI reads the application template to determine the API's routes and the functions that they invoke. The `Events` property on each function's definition includes the route and method for each path.

```yaml
      Events:
        LambdaContacts:
          Type: Api
          Properties:
            Path: /contact
            Method: post
```

## Unit tests

Tests are defined in the `tests` folder in this project. Use PIP to install the [pytest](https://docs.pytest.org/en/latest/) and run unit tests from your local machine.

```bash
AwsJsonContacts$ pip install pytest pytest-mock --user
AwsJsonContacts$ python -m pytest tests/ -v
```

## Cleanup

To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:

```bash
aws cloudformation delete-stack --stack-name AwsJsonContacts
```

## Resources

See the [AWS SAM developer guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) for an introduction to SAM specification, the SAM CLI, and serverless application concepts.

Next, you can use AWS Serverless Application Repository to deploy ready to use Apps that go beyond hello world samples and learn how authors developed their applications: [AWS Serverless Application Repository main page](https://aws.amazon.com/serverless/serverlessrepo/)

## Final Thoughts

The roles I have defined are "too open", I was mostly trying to get something working prior to tightening it up.  I don't know if I will actually have time to do so, but wanted to get something working out there nonetheless.

repository: Kritner/AwsJsonContacts

repo_name: Kritner/AwsJsonContacts


text:
# ♫ funny-status [![Build Status](https://travis-ci.org/neoziro/funny-status.png?branch=master)](https://travis-ci.org/neoziro/funny-status)

Check NPM and GitHub status with sound. ♪♬♩♫ ⚑

## Install

```sh
npm install -g funny-status
```

## Usage

### CLI

```
  Usage: funny-status [options]

  Options:

    -h, --help                  output usage information
    -V, --version               output the version number
    -t, --time [n]              Ping wait time
    -T, --timeout [n]           Services timeout
    -x, --threshold [n]         Number of consecutive success / failure required to play sound
    -s, --service [list]        Custom services (ex: "github,npm")
    -S, --success-sound [file]  Sound played when service up
    -F, --failure-sound [file]  Sound played when service down

```

### Node

```js
var FunnyStatus = require('funny-status').Daemon;
var status = new FunnyStatus();
status.start();
```

## Daemon

The options accepted are :

- `time`
    - Time between each ping.
- `threshold`
    - Number of consecutive success / failure required to play sound.
- `service`
    - Services to ping.
- `successSound`
    - Success sound played when a service wake up.
- `failureSound`
    - Failure sound played when a service break.
- `success`
    - Custom callback to handle success.
- `failure`
    - Custom callback to handle failure.

## Custom services

It's possible to use custom services. A service take a node style callback. If an error is returned, the service in considered down.

```js
var FunnyStatus = require('funny-status').Daemon;
var request = require('supertest');

function myWebsite(cb) {
  request('http://mywebsite.com')
    .get('/')
    .expect(200, cb)
}

var status = new FunnyStatus({
  service: myWebsite
});
status.start();
```

## Debug mode

```sh
DEBUG=true funny-status
```

## License

MIT


text:
# Cake OpenAPI Generator Addin
Cake Addin for code generation via the [OpenAPI Generator](https://openapi-generator.tech/) (f.k.a. Swagger Codegen)

## Motivation
The OpenAPI Generator tool provides a lot of powerful code generators, but since its implemented in Java, the only build tools directly supported are Maven and Gradle. This addin provides a simple wrapper around the command line version of the tool to invoke code generation from Cake.

## Installation
Since the addin is available on [NuGet](), it can simply be registered in your `build.cake` file using the `#addin` preprocessor directive:

``` csharp
#addin nuget:?package=Cake.OpenApiGenerator&version=<version>
```

As an additional dependency, Java needs to be installed and available to Cake. It may be either added to the `PATH` environment variable or registered manually in the build script:

``` csharp
Setup(context => {
    context.Tools.RegisterFile("/path/to/java(.exe)");
});
```

## Usage
Once the addin is registered, the alias `OpenApiGenerator` provides a wrapper around the OpenAPI Generator.
The first example shows a minimal example for the method `Generate`:

``` csharp
Task("My-Task")
    .Does(() =>
{
    OpenApiGenerator.Generate(new OpenApiGeneratorGenerateSettings()
    {
        Specification = "specification.yaml",
        Generator = "csharp",
        OutputDirectory = "./src"
    });
});
```

Alternatively, you may pass an `Action` that configures the `OpenApiGeneratorGenerateSettings`:

``` csharp
OpenApiGenerator.Generate(settings =>
{
    setttings.Specification = "specification.yaml";
    // ...
})
```

### Reproducible builds
By default, the latest version of the OpenAPI generator will be resolved and used.
Of course, this requires access to the Internet and may break builds that worked with previous tool versions.
It is recommended to pin the tool version as shown in the example below:

``` csharp
Task("My-Task")
    .Does(() =>
{
    OpenApiGenerator["3.3.4"].Generate(...);
});
```

This shorthand notation is useful for build scripts that only use the `OpenApiGenerator` once.
If there are multiple calls to the `OpenApiGenerator`, the version should be defined at the top of the build script or using a `Setup` method:

``` csharp
Setup(context =>
{
    OpenApiGenerator.ToolPackage.Version = "3.3.4";
});
```

### Validate specifications

``` csharp
OpenApiGenerator.Validate("specification.yaml", recommend: true);
```

### Batch processing

``` csharp
OpenApiGenerator.Batch("csharp-server.yaml", "javascript-client.yaml");

OpenApiGenerator.Batch(new OpenApiBatchSettings()
{
    ConfigurationFiles = new FilePathCollection(new FilePath[] { "csharp-server.yaml", "javascript-client.yaml" })
    // ...
});

OpenApiGenerator.Batch(settings =>
{
    settings.ConfigurationFiles.Add("csharp-server.yaml");
    settings.ConfigurationFiles.Add("javascript-client.yaml");
    // ...
});
```

### Advanced usage

``` csharp
Setup(context =>
{
    OpenApiGenerator.ToolPackage = new MavenPackage("io.swagger", "swagger-codegen-cli");
});

Task("Swagger-Codegen")
    .Does(() =>
{
    OpenApiGenerator.Generate(new OpenApiGeneratorGenerateSettings()
    {
        Specification = "./petstore.json",
        // Use Language (-l) instead of Generator (-g)
        Language = "html",
        OutputDirectory = "./src"
    });
});
```

``` csharp
Setup(context =>
{
    OpenApiGenerator.ToolPath = context.Tools.Resolve("openapi-generator");
});
```

## License
The software is licensed under the [MIT license](https://github.com/lukoerfer/cake-openapi-generator/blob/master/LICENSE).

repository: CryptoHoooligan/cake-openapi-generator

repo_name: CryptoHoooligan/cake-openapi-generator


text:
---
chapter: 14
title: Spicy carrot and sweet potato mash
layout: post

---
What was supposed to be a spicy carrot and sweet potato dish—turned out to be mushy sweet potatoes with carrot chunks. The disaster turned out to be one my favourite meals.

Sauté some sliced red onions into a pan and let them soften for a few minutes. Add a medium sized chopped sweet potato, ground cumin—mix and let it cook for about a minute. Add a few chopped carrots, chilli flakes, salt and enough water to cover a quarter of the pan. Cover the pan and cook for five minutes—then stir the mixture and continue cooking. Add more water if need but not too much.

Once the sweet potatoes start to become soft, mix and mash the sweet potatoes thoroughly with a large spoon. All the water that is left will get absorbed once you mash the sweet potatoes. If there is too much water you’ll end up with a soup! And don’t worry about the carrots, they will remain intact—this is if you’ve not overcooked everything.

When ready to serve add lemon juice and coriander—mix.

repository: rajiv-shah/rajiv-sh

repo_name: rajiv-shah/rajiv-sh


text:
![image](https://user-images.githubusercontent.com/39813384/123526776-74607a00-d6b0-11eb-971b-343d170d5ace.png)

## 💻 Technologies

#This project was developed using the following technologies:

- [React](https://reactjs.org)
- [Sass](https://sass-lang.com/)
- [TypeScript](https://www.typescriptlang.org/)

## 🚀 Getting started

```sh
Clone the project and access the folder
$ git clone https://github.com/GuuiPereira/letmeask
$ cd letmeask

# Install the dependencies
$ yarn

# Start the project
$ yarn start

```

## 📝 License

This project is licensed under the MIT License.

---

<p align="center">Made with 💜 by Guilherme Pereira </p>

repository: GuuiPereira/letmeask

repo_name: GuuiPereira/letmeask


text:
# admataz.com src code

The source for [admataz.com](http://admataz.com)

admataz has grown  - this is still relevant to my approach to this site.

## TL;DR
it's my site, I do what I like.

### This is my web site, and here’s the thinking behind it:

1. **Original**. The site reflects and records my ongoing ideas, expressions and professional work. This means regular subjective updates to the site content.

1. **Experimental**. The site code is created by me, using self-made tools over libraries and frameworks where I can. My personal site is an opportunity for learning, experimentation with my craft and developing core skills. This means regular unstable additions to the site functionality.

1. **Minimal and progressive**. The site design, features and technology only contain what is needed. This means less structure, navigation and technical capacity. It also means less bloat.

1. **Open**. When I produce original code for this site, I expose it, explain it and share it.

1. **Incomplete**. It's never finished because there's always space for growth and new ideas.

1. **Mine**. I am not a client or employer. I can do what I like, break the rules and be inefficient.

The site content resides in [src/content]('./src/content) as a mixture of markdown, json and come custom javascript. These are all built into the static wesite using [blockstatic](https://github.com/admataz/blockstatic) - a module I wrote while making this site.

There are some other interesting front-end javascript experiments in [src/components](src/components).

gha_language: SCSS


text:
---
id: version-1.0.0-datasources
title: Datasources
original_id: datasources
---

uStart was designed to easily connect with multiple data sources.

## Connection

Use `ustart.connect(URI)` method into `src/data/datasources.js` script to specify your connections.

```js
import { ustart } from "ustart";

ustart.connect(URI);
```

Define **URI** as environmental variable inside the `.env` file:

```bash
URI="[datasource]://user:pass@example.com:[port]/[dbname]"
```

That is all you have to do in your code to establish a connection.

## Relational Databases

uStart uses [Sequelize v5](http://docs.sequelizejs.com/) to connect with RDBMS. Sequelize is a promise-based Node.js ORM that supports 5 databases: Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.

At the moment, uStart can use PostgreSQL and MariaDB databases. Support for MySQL, SQLite and Microsoft SQL Server will be added in follow updates.

To establish a connection, you have to install manually the driver for the database of your choice:

```bash
npm install --save pg pg-hstore
npm install --save mariadb
```

> You don't have to install Sequelize, it is installed by default when you executed `ustart init`.

Inside `src/data/datasources.js` define your connections (you can use more than one):

```js
import { ustart } from "ustart";

ustart.connect(process.env.PG_URI);
ustart.connect(process.env.MARIADB_URI);
```

Add the endpoints into `.env` file:

```bash
PG_URI="postgres://user:pass@example.com:5432/dbname"
MARIADB_URI="mariadb://user:password@example.com:9821/database"
```
> Note that `PG_URI` and  `MARIADB_URI` are just recommended names, use whatever you need.

More info about **URI** format on [Sequelize dialects](http://docs.sequelizejs.com/manual/usage.html#dialects).

## NoSQL

uStart uses [Mongoose v5](https://mongoosejs.com) to connect to [MongoDB](https://www.mongodb.com/). Mongoose is installed by default and no extra driver is needed.

```js
import { ustart } from "ustart";

ustart.connect(process.env.MONGO_URI, { useNewUrlParser: true });
```

in your `.env` file:

```bash
MONGO_URI="mongodb://username:password@host:port/database?options..."
```

> Note that `MONGO_URI` is just recommended name, use whatever.

More info about **URI** format on [Mongoose connections](https://mongoosejs.com/docs/connections.html).

repository: ustart-dev/ustart

repo_name: ustart-dev/ustart


text:
# **Test Automation and EasyRepro: 01 - Overview and Getting Started**

## Summary:

EasyRepro is a framework that allow automated UI tests to be performed on a specific Dynamics 365 organization. You can use it to automate testing such as Smoke, Regression, Load, etc. The framework is built from the Open Source Selenium web drivers used by the industry across a wide range of projects and applications. The entire EasyRepro framework is Open Source and available on GitHub. The purpose of this article is to walk through the setup of the EasyRepro framework. It assumes you are familiar with concepts such as working with Unit Tests in Visual Studio, downloading NuGet packages and cloning repositories from GitHub.

## Getting Started

Now that you have a basic understanding of what EasyRepro is useful for you probably would like to start working with it. Getting EasyRepro Up and Running is very simple as the framework is designed with flexibility and agility in mind. However, like any other utility there is some initial learning and few hurdles to
get over to begin working with EasyRepro. Let's start with dependencies!

### Dependencies

The first dependency involves the EasyRepro assemblies and the Selenium framework. The second involve .NET, specifically the .NET framework (.NET core can be used and is included as a feature branch!). Finally depending on how you are working with the framework you will want to include a testing framework to design, build and run your unit tests.

### Choosing How to Consume the EasyRepro Framework

There are two ways of consuming the EasyRepro framework, one is using the NuGet packages directly while the other is to clone or download from the GitHub repository. The decision to use one over the other primarily depends on your need to explore or extend the framework and how you go about doing so. Working directly with the source code allows exploration into how EasyRepro interacts with Dynamics 365. However for extending the framework the approach of using the NuGet packages and building on top allows for increased flexibility.

### Downloading using NuGet Package Manager

The quickest way to get started with the EasyRepro framework is to simply add a NuGet package reference to your unit test project. You can do by running this command in the NuGet Package Manager command line:

![](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/1564863288683.jpg)

Create your unit test project and navigate to the NuGet Package Manager CLI. Use the Install-Package command to get the PowerApps.UIAutomation.Api package as show in the command below (v9.0.2 is the latest as of this writing please refer to [this link](https://www.nuget.org/packages/PowerApps.UIAutomation.Api/) for any updates:

```
Install-Package PowerApps.UIAutomation.Api -Version 9.0.2
```

This will get you the references needed to begin working with the framework immediately. Once installed you should the following packages begin to download into your unit test project:

![](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/1564952837073.png)

When complete the required assemblies are available and you can begin working with the EasyRepro framework. There are some settings needed for the framework to connect to your Dynamics 365 organization which if you're new to the framework maybe unknown. If so I would suggest reviewing the next section which initiates a clone of the EasyRepro framework which happens to include a robust amount of sample unit tests that show how to interact with the framework.

### Cloning from GitHub:

If you're new to the framework in my opinion this is the best way to begin familiarizing yourself how it works and how to build a wide range of unit tests. This is also the way to go if you want to understand how EasyRepro is built upon the Selenium framework and how to extend.

To begin go to the official EasyRepro project located at https://github.com/Microsoft/EasyRepro. Once you're there take a moment to review the branches available. The branches are structured in a GitFlow approach so if you're wanting to work with the latest in market release of Dynamics 365 review the releases/* branches. For the latest on going development I would suggest the develop branch.

Start by cloning the project locally to review the contents and see how the interaction between the frameworks occurs.

The gif below shows cloning to Azure DevOps but cloning locally directly from GitHub is also supported.

![]([https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/Clone%20from%20GitHub%20to%20Azure%20DevOps.gif](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/Clone from GitHub to Azure DevOps.gif))

#### Cloning locally from Azure DevOps:

Another alternative which I highly recommend is to clone to an Azure DevOps project which can then be cloned locally. This will allow us to automate with CI/CD which we will cover in another article. If you decided to clone to Azure DevOps from GitHub the next step is to clone locally.

The gif below shows cloning locally from an Azure DevOps repository.

![]([https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/Clone%20locally%20from%20Azure%20DevOps.gif](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/Clone locally from Azure DevOps.gif))

## Reviewing the EasyRepro Source Code Projects

The EasyRepro source code includes a Visual Studio solution with three class library projects and one for sample unit tests.

![](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/UIAutomation%20Solution%20and%20Projects.JPG)

The projects used by the Unified Interface are Microsoft.Dynamics365.UIAutomation.Api.UCI and Microsoft.Dynamics365.UIAutomation.Api.Browser. Most of the usage between EasyRepro and unit tests will happen with objects and commands within the Microsoft.Dynamics365.UIAutomation.Api.UCI project. This project contains objects to interact with Dynamics Unified Interface modules and forms. The Microsoft.Dynamics365.UIAutomation.Api.Browser project is limited to interacts with the browser driver and other under the hood components.

## Reviewing Sample Unit Tests

### Looking into the Open Account Sample Unit Test

The unit test project **Microsoft.Dynamics365.UIAutomation.Sample** contains hundreds of unit tests which can serve as a great learning tool to better understand how to work with the EasyRepro framework. I highly suggest exploring these tests when you begin to utilize the framework within your test strategy. Many general and specific tasks are essentially laid out and can be transformed to your needs. Examples include opening forms (**OpenRecord**), navigating  (**OpenSubArea**) and searching for records (**Search**), creating and updating records (**Save**).

For this exercise we will open up the **UCITestOpenActiveAccount** unit test, you can find this using Find within Visual Studio (Ctrl+F). Once found you should see something like the following:

Following the steps within the unit test you can see its designed to perform basic user actions to read an account. We start by logging into an organization (**Login**). Then we proceed to open the UCI application titled "Sales" (**OpenApp**). Once in the organization we open the Accounts sub area (**OpenSubArea**) and search for "Adventure" in the Quick Find View (**Search**). Finally we open the first record (**OpenRecord(0)**) in the quick find view results.

#### Exploring Test Settings

In the current sample Unit Test project the test settings are set in two places: the **app.config** file located in the root of the project and in the **TestSettings.cs** file, a class object used across all of the tests.

##### Application Configuration file

The **app.config** file includes string configurations that tell the tests what organization to login to, who to login as and other under the hood settings like which browser to run and how to run the tests.

Application Configuration File Settings

| **Property**      | **Description**                                              |
| ----------------- | ------------------------------------------------------------ |
| OnlineUsername    | String. Used to represent the test user name.                |
| OnlinePassword    | String. Used to represent the test user password.            |
| OnlineCrmUrl      | String. Used to represent the organization (i.e. https://<your org>.crm.dynamics.com/main.aspx) |
| AzureKey          | String. GUID representation of Azure Application Insights Instrumentation Key. |
| BrowserType       | String. Represents enum flag for Microsoft.Dynamics365.UIAutomation.Browser.BrowserType. |
| RemoteBrowserType | String. Represents enum flag for Microsoft.Dynamics365.UIAutomation.Browser.BrowserType. Only used if BrowserType is Remote. |
| RemoteHubServer   | String. Represents Selenium Server remote hub URL. Only used if BrowserType is Remote. |

For this article we will focus on simply running locally with the Google Chrome browser by setting the **BrowserType** to "Chrome". Also inside of the **app.config** file are three settings we need to modify called **OnlineUsername**, **OnlinePassword** and **OnlineCrmUrl**. In my case I am using a trial and as you can see below I am using a<EMAIL_ADDRESS>username and a "https://<orgname>.crm.dynamics.com/main.aspx" URL.

Before:

![](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/1565014621572.png)

After:

![](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/1565015235915.png)

##### Test Settings and the BrowserOptions object

Another key object is the **TestSettings** class and the various properties inside. This class tells the unit tests how to render the browser, where the browser driver can be located as well as other properties. The **TestSettings** class will need to be included in the Unit Test project and instantiate the **BrowserOptions** object as shown below:

![](https://raw.githubusercontent.com/aliyoussefi/D365-Testing/master/Media/Blogs/Blog1/BrowserOptions.JPG)

In the next post we will explore how these settings can change your experience working with unit tests and what options are available.

## Next Steps

### Conclusion

From this article you should be able to begin using EasyRepro with your Dynamics 365 organization immediately. The following articles will go into designing and debugging unit tests, extending the EasyRepro code, implementing with Azure DevOps and other topics. Let me know in the comments how your journey with EasyRepro is going or if you have any questions. Thanks!

url: https://raw.githubusercontent.com/aliyoussefi/TestingPowerPlatform/aba52b029807523142ee535c5fbea09552d1d31d/docs/Blogs/Test Automation and EasyRepro 01 - Overview and Getting Started.md

repository: aliyoussefi/TestingPowerPlatform

repo_name: aliyoussefi/TestingPowerPlatform


text:
---
layout: post
title: "Tomcat as Daemon"
date: 2010-04-29 09:21:37
tags: Neuigkeiten,CI,Tomcat
categories: [Neuigkeiten,CI,Tomcat]
post-type: blog
---
I had the problem to start the Apache Tomcat as a daemon under a different user. After creating an RPM which puts the appropriate files into the correct location i had to create a service script to start, stop and check the status of the Tomcat daemon. The most important thing here is to have a su -l username which will go to the different user in his home folder where i can call the startup.sh or shutdown.sh script. It is necessary to define the JAVA_HOME etc. in the users .bashrc to activate those information during the login.

repository: khmarbaise/octopress

gha_language: Ruby

repo_name: khmarbaise/octopress


text:
MusicRaft
=========

'MusicRaft' is an GUI for the ABC(plus) music notation. Its implementation went through a few incarnations:

- at first it was a wxpython GUI (a bit like the current easyABC which didn't exist at the time)
 - later I re-implemented it a Geany plugin. Recurrent problems with getting Geany python plugins workings on windows led
 me to abandon that approach.

 Musicraft is now built around PyQt (or alternatively PySide). It is in fact a very lightweight (and very limited!) IDE
 implemented as 'the raft' on top of which the plugin 'abcraft' is created.

![Alt text](./screenshots/Musicraft_017.png?raw=true "Editing ABCplus music source while viewing graphical ouput")

A separate plugin 'pyraft' supports editing of python3 source files. When a python script writes output with an HTML header,
pyraft dsiplays the HTML in a special 'Html' tab within  the display notebook.

![python screenshot](./screenshots/Musicraft_018.png?raw=true "Editing python progam source while viewing HTML ouput")

repository: wentaohub/MusicRaft

repo_name: wentaohub/MusicRaft


text:
# Corollospora pseudopulchella Nakagiri & Tokura, 1988 SPECIES

#### Status
ACCEPTED

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

#### Published in
Trans. Mycol. Soc. Japan 28(4): 428 (1988)

#### Original name
Corollospora pseudopulchella Nakagiri & Tokura, 1988

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# PLT :: Abbreviations

## ADT
1. Abstract Data Type
2. Algebraic Data Type

## CAF
Constant Applicative Form

## CHI
Curry-Howard isomorphism

## CPS
Continuation-Passing Style

## CS
Computer Science

## FP
Functional programming

## FPL
Functional programming language

## GADT
Generalized Algebraic Data Type

## NF
Normal form

## PL
Programming Language

## PLT
Programming Language Theory

## RTS
Runtime system

## SOP
Sum of products

## TCO
Tail-call optimization

## TCR
Tail-call recursion

## TPL
Programming Language Theory (Theory of Programming Languages)

## WHNF
Weak-head normal form

license: Unlicense


text:
# glob-html [![Build Status](https://travis-ci.org/claudetech/node-glob-html.svg?branch=master)](https://travis-ci.org/claudetech/node-glob-html)

A simple utility to expand or concatenate
glob expressions in HTML.

To avoid having to insert all scripts and stylesheets,
this tool makes the glob syntax available for both
development and production.

## Installation

### CLI installation

Run

```
$ npm install -g glob-html
```

and then use it with

```sh
$ glob-html OPTIONS file
```

For example,

```sh
$ glob-html -o dist/index.html -c -m public/index.html
```

will search for globs in `public/index.html`,
minify all files globbed and output minified versions
in `dist/js` and `dist/css`, and output the
HTML using minified versions in `dist/index.html`.

The following options are available

* concat: Should the files be concatenated. default: `false`
* minify: Should the files be minified. default: `false`
* minifyCss: Should CSS files be minified. Overrides `minify`. default: `false`
* minifyJs: Should JS files be minified. Overrides `minify`. default: `false`
* output: Where to save the output.
* tempPath: `'/tmp/'`
* tidy: Should the added HTML when expanding should be pretty formated. default: `true`
* group: The default group for globbed files. default: `'application'`
* basepath: The base path to search for globbed files. default: input file directory
* outdir: The output directory for generated CSS/JS. default: output file directory
* jsPrefix: The prefix for JS files, when saving minified output, relative to `outdir`. default: `'js'`
* cssPrefix: The prefix for CSS files, when saving minified output, relative to `outdir`. default: `'css'`

### Grunt installation

This tool is available as a grunt task.

```
$ npm install --save-dev grunt-html-glob
```

and in your Gruntfile, for example:

```javascript
module.exports = function (grunt) {
  grunt.initConfig({
    glob: {
      dev: {
        files: [{
          expand: true,
          cwd: 'public',
          src: ['**/*.html'],
          dest: 'public',
          ext: '.html'
        }]
      },
      options: {
        cssPrefix: 'stylesheets',
        jsPrefix: 'scripts'
      }
    }
  });

  grunt.loadNpmTasks('grunt-html-glob');
};
```

The options are the same as the CLI.
You can then just run the `glob` task.

```sh
$ grunt glob
```

## Basic usage

```slim
html
  head
    script(src="js/**/*.js" glob)
    link(rel="stylesheet" href="css/**/*.css" glob)
```

will become

```html
<html>
<head>
  <script src="js/app.js">
  <script src="js/other.js">
  <script src="css/main.css">
  <script src="css/other.css">
</head>
<body>
</body>
</html>
```

for development build and

```html
<html>
<head>
  <script src="js/application.min.js">
  <script src="css/application.min.css">
</head>
<body>
</body>
</html>
```

for production build, where `js/application.min.js` and
`css/application.min.css` will be concatenated and
minified versions of the globbed files.

## Files order

If alphabetical order does not fit your need, you can
use glob on single files, it will be inserted only once in the output.

```slim
html
  head
    script(src="js/this-one-is-first.js" glob)
    script(src="js/**/*.js" glob)
    link(rel="stylesheet" href="css/**/*.css" glob)
```

The files will always be concatenated in order of appearance.

## Groups

To customize the output for minified files, you can use groups.
All files in the same group will result in an output
called `GROUP_NAME.(js|css)` or `GROUP_NAME.min.(js|css)`

If not specified, the default group is `application`.
You can use name for the group, as long as it can be used as a file
name in your filesystem.

Here is an example with multiple groups:

```slim
html
  head
    script(src="js/src/app.js" group="application" glob)
    script(src="js/src/**/*.js" glob)
    script(src="js/vendors/jquery.js" group="vendors" glob)
    script(src="js/vendors/**/*.js" group="vendors" glob)
```

This will be expanded normally in development,
and will compile into `application.min.js` and `vendors.min.js`
in production.

repository: whisperingJack/Nook

repo_name: whisperingJack/Nook


text:
Here you find a couple of scripts to extract short summaries from multiple runs of a model.

# Best validation AER

To get a summary of best validation AER you can run

```bash
srun tail -n1 ~/experiments/nibm1/dx128-dh128-adam/*/*/*/log | egrep -o 'aer=([0-9.]+)' | python aer_stats.py > ~/experiments/nibm1/dx128-dh128-adam/report.txt
```

# Average validation AER at an epoch

To get a summary of validation AER per epoch you can run, for example,

```bash
egrep 'aer' ~/experiments/nibm1/handsards.en-fr/dx128-dh128-adam/1*/*/*/log | egrep -o 'Epoch [0-9]+|aer [0-9.]+' | python3 epochstats.py > ~/experiments/nibm1/handsards.en-fr/dx128-dh128-adam/epochs.txt
```

repository: KrishnaTarun/embedalign

repo_name: KrishnaTarun/embedalign


text:
---
title: 'Logic App: Parse CSV Sent From AZCopy To Azure Blob'
date: 2020-04-29T08:06:24-05:00
author: gerryw1389
layout: single
classes: wide
permalink: /2020/04/logic-app-parse-csv-sent-from-azcopy-to-azure-blob
categories:
  - Azure
tags:
  - Cloud
  - Orchestration
  - Azure-StorageAccounts
  - Azure-LogicApps
---
<!--more-->

### Description:

In this post, I will setup a RHEL 7 server to upload CSV's generated by an application to an Azure Blob. Once the CSV hits the blob, a logic app will trigger that will parse it and make decisions based on content within the CSV.

### To Resolve:

1. If you haven't already, download/install Storage Explorer. Then create a blob - `myTestBlob`
   - Generate SAS per [walkthrough](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10)
   - download the tool to the server and move it to the directory our application writes to:

   ```shell
   curl -s -D https://aka.ms/downloadazcopy-v10-linux | grep ^Location
   curl -o azcopy_v10.tar.gz https://azcopyvnext.azureedge.net/release20200501/azcopy_linux_amd64_10.4.3.tar.gz
   tar -xf azcopy_v10.tar.gz --strip-components=1
   mv azcopy /csv
   ```

2. Test uploading a CSV from the server to Azure Blob:

   ```shell
   azcopy copy "248.csv" "https://sasURL" --recursive=false
   # failed: see log and it says 'access denied'
   sudo azcopy copy "248.csv" "https://sasURL" --recursive=false
   # worked!
   ```

3. Build a logic app that will parse the CSV:

   - When a blob is added or modified (properties only)
     - Container: myTestBlob
     - Number of blobs to return: 10
     - Interval: 1
     - Frequency: Minute
   - Get Blob content:
     - Blob: List of Files id
     - Infer content type: Yes
   - Compose
     - Inputs: File Content
   - Compose 2:
     - Inputs: `split(outputs('Compose'),',')`
   - Initialize Variable:
     - Name = stringArray
     - Type = Array
     - Value = Outputs (from compose2)
   - Initialize Variable2:
     - Name = Action
     - Type = String
     - Value = `variables('stringArray')[8]`
   - Initialize Variable3:
     - Name = PermName
     - Type = String
     - Value = `variables('stringArray')[12]`
   - Initialize Variable4:
     - Name = PermName2
     - Type = String
     - Value = `variables('stringArray')[14]`
   - Delay:
     - Count = 1
     - Unit = Minute
   - Create Blob:
     - Folder path: /myTestBlob/processed
     - Blob Name: List of Files Displayname
     - Blob Content: File Content
   - Delete Blob
     - Blob: List of Files id

4. The Logic App will grab lines 9, 13, and 15 from the uploaded CSV and store them in variables. It will then copy the blob to a different folder and delete the original blob.
   - Next I would do something with information from these variables like call an Azure Automation runbook based on their contents (haven't got there yet)

5. Back on the RHEL box, set the script to upload every minute

   - Script

   ```shell
   #!/bin/bash
   for filename in /csv/*.csv; do
      echo "coping $filename to blob"
      /csv/azcopy copy $filename "https:sasURL" --recursive=false
      echo "moving $filename to destination"
      base=${filename##*/}
      mv "$filename" /csv/processed/$base
   done
   ```

   - Run every minute: [see this first](https://automationadmin.com/2018/02/setting-up-cron-job-using-crontab/) and set it to `* * * * * /root/script.sh`


text:
# RandomAnilistAnime

Is used to query a random anime from anilist and outputs the URL.

## Usage

`RandomAnime --count n` will give you `n` number of random animes

## Compile yourself

To compile for youself, you need the [go compiler](https://github.com/golang/go)

Then you can just run `go build .` in the repo

repository: Karitham/AniThings

repo_name: Karitham/AniThings


text:
# Data Compression And Encryption

# Data Compression

Data compression is the process of modifying, encoding or converting the bits structure of data in such a way that it consumes less space on disk.
It enables reducing the storage size of one or more data instances or elements. Data compression is also known as source coding or bit-rate reduction.

# Data Compression Methods

There are two kinds of compression: Lossless and Lossy.

Lossy compression loses data, while lossless compression keeps all the data. With lossless compression we don’t get rid of any data. Instead, the technique is based on finding smarter ways to encode the data. With lossy compression we get rid of data, which is why we need to distinguish data from information.

Lossless compression allows the potential for a file to return to its original size, without the loss of a single bit of data, when the file is uncompressed. Lossless compression is the usual approach taken with executables, as well as with text and spreadsheet files, where the loss of words or numbers would change the information. Lossless compression can compress the data whenever redundancy is present. Therefore, lossless compression takes advantage of data redundancy.

# Data Encryption

Data encryption is a security method where information is encoded and can only be accessed or decrypted by a user with the correct encryption key. Encrypted data, also known as ciphertext, appears scrambled or unreadable to a person or entity accessing without permission.

# Types of Encryption – Symmetric and Asymmetric

Encryption is often applied in two different forms, a symmetric key or an asymmetric key. A symmetric key, or secret key, uses one key to both encode and decode the information. This is best used for one to one sharing and smaller data sets. Asymmetric, or public key cryptography, uses two linked keys – one private and one public. The encryption key is public and can be used by anyone to encrypt. The opposite key is kept private and used to decrypt.

# How Data Encrytion Is Used

Data Encryption is used to deter malicious or negligent parties from accessing sensitive data. An important line of defense in a cybersecurity architecture, encryption makes using intercepted data as difficult as possible. It can be applied to all kinds of data protection needs ranging from classified government intel to personal credit card transactions. Data encryption software, also known as an encryption algorithm or cipher, is used to develop an encryption scheme which theoretically can only be broken with large amounts of computing power.


text:
# Button

For this example, we're going to be connecting to an Arduino, and when a putton
on it's pressed, an LED will be toggled.

Before you start this example, make sure you've got the `cylon-firmata` module
installed.

We'll get started by importing the Cylon module:

    var Cylon = require('cylon');

Now that we have Cylon imported, let's start making our robot:

    Cylon.robot({

Our robot will have a connection to an Arduino, and communicate with it via the
Firmata protocol:

      connections: {
        arduino: { adaptor: 'firmata', port: '/dev/ttyACM0' }
      },

This time, our robot will have two devices, an LED and a button:

      devices: {
        led: { driver: 'led', pin: 13 },
        button: { driver: 'button', pin: 2 }
      },

Our robot has very simple work, it will just toggle the LED whenever the button
sends the 'push' event:

      work: function(my) {
        my.button.on('push', my.led.toggle);
      }

And with all that done, we can start our robot:

    }).start();

repository: Dam-Buty/DroneByPitch

extension: markdown

repo_name: Dam-Buty/DroneByPitch