text:
# Johnny Deps ![Build Status](https://circleci.com/gh/VividCortex/johnny-deps.png?circle-token=426f85f6d52ca0b308d1f6aab01dd219afdb4cb0)

Johnny Deps is a small tool from [VividCortex](https://vividcortex.com) that
provides minimalistic dependency versioning for Go repositories using Git. Its
primary purpose is to help create reproducible builds when many import paths in
various repositories are required to build an application. It's based on a Perl
script that provides subcommands for retrieving or building a project, or
updating a dependencies file (called `Godeps`), listing first-level imports for
a project.

## Getting started

Install Johnny Deps by cloning the project's Github repository and running the
provided scripts, like this:

```
git clone https://github.com/VividCortex/johnny-deps.git
cd johnny-deps
./configure --prefix=/your/path
make install
```

The `--prefix` option to `configure` is not mandatory; it defaults to
`/usr/local` if not provided (but you'd have to install as root in that case).
The binary will end up at the `bin` subdirectory, under the prefix you choose;
make sure you have that location specified in your `PATH`.

Note that Perl is required, although that's probably provided by your system
already. Also Go, Git and (if you're using makefiles) Make.

## Dependencies

Johnny Deps is all about project dependencies. Each project should have a file
called Godeps at its root, listing the full set of first-level dependencies;
i.e., all repositories with Go packages imported directly by this project. The
file may be omitted when empty and looks like this:

```
github.com/VividCortex/godaemon 2fdf3f9fa715a998e834f09e07a8070d9046bcfd
github.com/VividCortex/log 1ffbbe58b5cf1bcfd7a80059dd339764cc1e3bff
github.com/VividCortex/mysql f82b14f1073afd7cb41fc8eb52673d78f481922e
```

The first column identifies the dependency. The second is the commit identifier
for the exact revision the current project depends upon. You can use any
identifier Git would accept to checkout, including abbreviated commits, tags and
branches. Note, however, that the use of branches is discouraged, cause it leads
to non-reproducible builds as the tip of the branch moves forward.

## Introducing the tool

`jd` is Johnny Deps' main binary. It's a command line tool to retrieve projects
from Github, check dependencies, reposition local working copies according to
each project's settings, building and updating. It accepts subcommands much like
`go` or `git` do:

```
jd [global-options] [command] [options] [project]
```

Global options apply to all commands. Some allow you to change the external
tools that are used (go, git and make) in case you don't have them in your path,
or otherwise want to use a different version. There's also a `-v` option to
increase verbosity, that you can provide twice for extra effect. (Note that the
tool runs silently by default, only displaying errors, if any.)

It's worth noting that all parameters are optional. If you don't specify a
command, it will default to `build` (see "Building" below). If you don't specify
a project, `jd` will try to infer the project based on your current working
path, and your setting for `GOPATH`. If you're in a subdirectory of any of the
`GOPATH` components, and you're also in a Git working tree, `jd` would be happy
to fill up the project for you.

When in doubt, check `jd help`.

## Retrieving projects

Retrieving a Go application with Johnny Deps is just as easy as retrieving a
single base project. Run `jd get` and the full application, with all transitive
dependencies, will be set up in your environment. Here's what we'd type for one
of our applications:

```
jd get github.com/VividCortex/api-hosts
```

Johnny Deps will look for all required projects in your `GOPATH`, and download
those missing to the first component of `GOPATH`. It will even create the
directory stated in your `GOPATH` if it doesn't yet exist. As `jd` traverses the
graph of dependencies, it checks whether version conflicts exist. If it happens
to detect one, it will abort with a message like this:

```
Version mismatch detected for github.com/VividCortex/core
  561c9e9798307b875b8f90b89b7888eae4a983ce referenced by:
    github.com/VividCortex/api-hosts
    github.com/VividCortex/config
    github.com/VividCortex/nap
  but dfe3ff5362d778214272b56e2afcca0d96651911 referenced by github.com/VividCortex/shard
```

Here, the tool is telling you that two different versions of `core` are being
included. The first is the commit identifier at the top, that is shared as a
dependency for the three projects that follow. But `shard`, on the other hand,
is including a different commit for `core`, shown at the last line. If no
version mismatch is found, you'll end up with all projects required to build the
application you were interested in (`api-hosts` in the example above).

Besides retrieving required projects, `jd get` will reposition local copies
(whether they existed already or were just cloned) to the version stated in
`Godeps` files. Furthermore, if you're aiming at a specific commit (as
recommended), `jd` does an extra effort trying to checkout a branch whose tip
matches that commit, as opposed to leaving you in a detached HEAD state. That's
most probably what you want, cause it's probably a work in progress and you'll
be adding commits to that branch. (If you prefer a detached HEAD instead,
provide the `-d` flag to `get`.)

When choosing a branch to checkout for a given commit identifier, `jd` will
first search among all locals. If there's none whose tip matches the commit,
`jd` will try remote tracking branches instead. Among those matching, `jd`
selects one with a local branch by the same name, having the remote as an
upstream branch. If there's one available, that remote branch is merged into the
local, and the latter is checked out for use. Otherwise, `jd` keeps one of the
matching remotes with no local branch by the same name, and checks out a new
local branch with that remote set as upstream. (If local branches existed for
all candidate remotes, but none of them had the remote by the same name set as
upstream, then `jd` would abort with an appropriate message. In that case you
should either review your local branches, cause there's possibly an upstream
setting missing, or otherwise use `-d` to checkout in detached HEAD mode.) In
any case, if there's more than one choice and you're running with double `-v`,
you'd get a message displaying the other options as well.

It's worth noting that `jd` favors local operations as much as possible, to
avoid long round-trips to remote repositories. Hence, remotes won't be fetched
if the required revision is found locally. (That's particularly relevant when
including a branch name at the `Godeps` file cause, if found locally, the branch
will not be updated with remote changes.) Note also that, unless it actually
needs to move to a different release, `jd` will not insist in that your working
copy is clean. This is good from a developer's point of view, cause it allows
you to play with the application, trying modifications or fixes in the whole
code base, without `jd` complaining.

If the project you're interested in is not present in `GOPATH`, `jd get` will
clone it from the remote repository and checkout the master branch. But once you
have a local copy, `jd` will never checkout a different revision. (It will
change revisions for dependencies, but not for the main project you provide to
`jd get`.) You may reposition the working copy to your liking using Git
commands; `jd` will be happy to adjust dependencies accordingly. However, if you
want to force your main project into a specific revision, even before you have a
local copy, you can use the `-r` parameter to `jd get`, like so:

```
jd get github.com/VividCortex/api-hosts -r my-release
```

where the argument to `-r` can be anything you can checkout from Git: a commit
identifier (abbreviated or not), a branch or a tag.

After working copies for all projects in the application are set, `jd get` runs
a check on first level dependencies for the main project (i.e., the one either
you specified on the command line, or `jd` inferred from your current
directory). The check is run against the result of `go list`. `jd` will complain
if the sets don't match exactly, displaying both missing and not required
projects. If that's the case, you need to fix your `Godeps` file (see "Updating"
below).

## Building

Since building is what you'll be doing most of the time, `jd` conveniently
defaults to `build` if no command is provided. Furthermore, `jd` may be able to
retrieve the project out of your current working directory (see "Introducing the
tool" above). Hence, you'd typically be able to compile by typing only `jd` at
the command prompt. Not even your location within the project tree matters; the
tool works equally fine if run from deep inside the hierarchy.

Before the actual building process, `jd` runs the equivalent of a `jd get`
command. That's how it makes sure that you're actually using the correct
versions of all dependencies. (Keep in mind, though, that if your local copies
were already set to the correct revisions, it's okay to have local changes; even
in `Godeps` files.) The implicit `get` run by `build`, and the choice of `build`
as the default command, make the tool particularly easy to use to build projects
you don't even have. The following command retrieves the full dependencies for
the application and builds:

```
jd github.com/VividCortex/api-hosts
```

Furthermore, since the `-r` option to `build` is actually passed along to the
implicit `get`, you can readily set up a specific version by appending the
appropriate `-r` to the command above. (The same behavior goes to the `-d`
option to `build`.)

Johnny Deps calls `go build` at the project's root to build. But, in order to
accommodate special needs, `jd` checks for custom instructions first, resorting
to `go build` only if there are none. The highest priority goes to the Make
utility. If there's a file called `Makefile` or `makefile` at the project root,
then `make` is run. If an executable file called `build` is found, then that
will be invoked instead. Otherwise the tool resorts to `go build ./...`.

There's no need for a script if you need to `go install ./...` instead. Johnny
Deps will use the later if you ask it to `install` rather than `build`. However,
keep in mind that this has to be explicitly asked for; `jd` defaults to `build`
if no command is provided. The rest of the process works exactly like it does
for `build`, including the attempts at `make` and the `build` script. Even
though `jd` makes no difference between `build` and `install` when custom
scripts are used, the command name is made available in case different actions
are required in scripts themselves. This is published as the `JD_ACTION`
environment variable.

## Updating dependencies

Johnny Deps can't decide which releases to use from the project's you import.
But it can help writing the `Godeps` file. By running `jd update`, `jd` will
disregard the current dependencies in the `Godeps` file, overwriting it with the
latest master release for each project you depend upon, after pulling. Of
course, that may or may not work. Using the latest release for each dependency
could potentially lead to inconsistencies (version mismatches), that would make
`jd` complain. The dependencies file would have been changed anyway. It's your
responsibility to decide which projects to upgrade or withhold.

It's worth noting that `jd update` does not rely on the `Godeps` file to check
current dependencies; it takes them from `go list` instead. A nice consequence
is that new imports are automatically detected from the code and added to
`Godeps` with no manual intervention required. (And no longer needed imports
will be removed as well.) Note also that, although the old dependencies file is
overwritten, the new copy is not committed or even staged for commit in Git.
(Rationale: you should test that everything still works properly!) You can do
that with the rest of your changes, without leaving traces in history if you run
the update multiple times before you're done.

## Return codes

These are the return codes for `jd`:

* 0 - Success
* 1 - Error with parameters
* 2 - Bad dependencies or unable to read them
* 3 - Version mismatch detected
* 4 - External command failed
* 5 - Unable to checkout requested revision

## Workflows

Johnny Deps is intentionally agnostic about the specific workflow used. In
practice, people seem to fall into one of two camps that reflect how they think
about dependency management, and their differing goals.

The first category, roughly speaking, is those who would like to build from the
tip of their source control repositories all the time, but have a need for
pinning some things to a specific version. Those users may use branch names in
`Godeps` as opposed to commit identifiers, and change to a specific commit when
they need to pin a version. (Nevertheless, `jd` will not automatically fetch the
latest changes. See "Retrieving projects".)

The second school of thought holds that the `Godeps` file should contain
external dependencies and their exact versions, so that checking out a
particular revision of an application's repository and running `jd` will result
in exactly the same versions of all of the code used to build the application,
every time.

At VividCortex, we want to be able to reproduce a binary for debugging or other
purposes. All of our builds have a command-line flag called `--build-version`
that, when present, will result in the binary printing out the Git revision from
which it was built. We can thus easily reproduce any version by calling `jd
build` with that revision as the `-r` parameter. To embed the revision in the
binary, we use a specific shell script called `build` (see "Building" above)
that runs something like:

```
go build -ldflags "-X main.Godeps '$(git rev-parse HEAD)'"
```

At the application we set things up so that `--build-version` displays the
contents of the `main.Godeps` variable set by the compiler.

## Contributing

We welcome issue reports, suggestions, and especially pull requests:

1. Fork the project
2. Write your code in a feature branch
3. Add tests (if applicable)
4. Run tests (always!)
5. Commit, push and send Pull Request

Because this is a VividCortex internal tool that we're sharing publicly, we
may not want to implement some features or fixes.

### TODO

Add tests. Those we previously had are not appropriate for the new tool.

Optionally add support for other repositories, like Mercurial. This tool is now
targeted at Git on github.com, that is what we use at VividCortex.

## License

Copyright (c) 2013 VividCortex.
Released under the MIT License. Read the LICENSE file for details.

## Contributors

Johnny Deps is the combination of several different thought processes from
multiple authors, with inspiration from tools such as Ruby's Bundler and dep
gem, Python's pip, and others. Give credit to [@xaprb](https://github.com/xaprb)
and [@gkristic](https://github.com/gkristic).

![Johnny Deps](http://i.imgur.com/MuupBVC.jpg)

repository: VividCortex/johnny-deps

gha_language: Perl

repo_name: VividCortex/johnny-deps


text:
# ![aurelia-quickdev](aurelia-quickdev.png)

This library is a plugin for the [Aurelia](http://www.aurelia.io/) framework.  It's goal is to make using Xebics Quickdev with Aurelia as seamless as possible.

What's included:

1. An adapter for observing Quickdev entities.

## FAQ

**Why does Aurelia need an adapter to observe Quickdev entities?**

Quickdev entity properties have defined getters and setters created using Object.defineProperty.  Properties defined in this manner are incompatible with Object.observe, Aurelia's preferred way to do data-binding.  In situations where Object.observe cannot be used Aurelia falls back to dirty-checking which can be less performant.  We can avoid dirty-checking by providing Aurelia with an adapter that knows to subscribe to the Quickdev propertyChanged event in order to observe Quickdev entities.

## Using The Adapter

This guide uses [jspm](http://jspm.io/) and assumes you've already setup your Aurelia project according to the guide [here](http://aurelia.io/get-started.html).

1. Use jspm to install aurelia-quickdev.

  ```shell
  jspm install aurelia-quickdev
  ```
2. Install quickdev:

  ```shell
  jspm install quickdev
  ```
3. Use the plugin in your app's main.js:

  ```javascript
  export function configure(aurelia) {
    aurelia.use
      .standardConfiguration()
      .plugin('aurelia-quickdev');  // <--------<<

    aurelia.start().then(a => a.setRoot());
  }
  ```
4. Now you're ready to use Breeze in your Aurelia application:

  ```javascript

  ```

## Dependencies

* [aurelia-binding](https://github.com/aurelia/binding)
* [aurelia-dependency-injection](https://github.com/aurelia/dependency-injection)
* [quickdev](http://www.xebic.com/)

## Platform Support

This library can be used in the **browser** only.

## Building The Code

To build the code, follow these steps.

1. Ensure that [NodeJS](http://nodejs.org/) is installed. This provides the platform on which the build tooling runs.
2. From the project folder, execute the following command:

  ```shell
  npm install
  ```
3. Ensure that [Gulp](http://gulpjs.com/) is installed. If you need to install it, use the following command:

  ```shell
  npm install -g gulp
  ```
4. To build the code, you can now run:

  ```shell
  gulp build
  ```
5. You will find the compiled code in the `dist` folder, available in three module formats: AMD, CommonJS and ES6.

6. See `gulpfile.js` for other tasks related to generating the docs and linting.

## Running The Tests

To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:

1. Ensure that the [Karma](http://karma-runner.github.io/) CLI is installed. If you need to install it, use the following command:

  ```shell
  npm install -g karma-cli
  ```
2. Ensure that [jspm](http://jspm.io/) is installed. If you need to install it, use the following commnand:

  ```shell
  npm install -g jspm
  ```
3. Install the client-side dependencies with jspm:

  ```shell
  jspm install
  ```
4. You can now run the tests with this command:

  ```shell
  karma start
  ```

license: MIT

repository: mcginkel/aurelia-quickdev

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mcginkel/aurelia-quickdev


text:
# Digital Apprenticeships Service

## Employer Apprenticeship Service

|               |               |
| ------------- | ------------- |
|![crest](https://assets.publishing.service.gov.uk/government/assets/crests/org_crest_27px-916806dcf065e7273830577de490d5c7c42f36ddec83e907efe62086785f24fb.png)|Employer Apprenticeship Service|
| Build | ![Build Status](https://sfa-gov-uk.visualstudio.com/_apis/public/build/definitions/c39e0c0b-7aff-4606-b160-3566f3bbce23/101/badge) |
| Web  | https://manage-apprenticeships.service.gov.uk/  |

## Account Api

|               |               |
| ------------- | ------------- |
|![crest](https://assets.publishing.service.gov.uk/government/assets/crests/org_crest_27px-916806dcf065e7273830577de490d5c7c42f36ddec83e907efe62086785f24fb.png)| Account API |
| Client  | [![NuGet Badge](https://buildstats.info/nuget/SFA.DAS.Account.Api.Client)](https://www.nuget.org/packages/SFA.DAS.Account.Api.Client)  |

## Authorization Pipeline
### Purpose
A filter that determines whether the current user has access to a feature or not.

##Features
Config

A feature is defined as an enum in the FeatureType enum. Once defined the feature can be:

* Added to an operation (i.e. method on a controller)
* Added to a controller
* Added to an agreement
* Added to a json config that allows a whitelist to be defined

The json config has changed from

```JavaScript
{
    "Data": [{
        "Controller": "EmployerTeam",
        "Action": "Invite",
        "Whitelist"<EMAIL_ADDRESS>    }]
}
```

to

```JavaScript
{
    "Data": [{
		"FeatureType": "<value from enum",
		"Name": "...",
		"Enabled":  "true"|"false",
		"WhiteList": ["...", "...", "..."]
		"EnabledByAgreementVersion": 2
    }]
}
```

gha_language: C#

gha_license_id: MIT


text:
# Kale-With-Friends

## Overview

Eating local produce is healthy and helps boost the local economy, but knowing what is available and getting it when it's at its freshest can be a challenge. Kale With Friends (working title) connects consumers and producers so everyone is aware of what is available nearby, where to buy it and how much it costs. If you grow produce, whether in a backyard garden or large scale commercial farm, and are interested in selling it, KWF will bring the local consumers to you.

Kale With Friends is a social style site intended to connect consumers with local farmers and producers. There are two types of profiles: consumers and farmers. Farmers create their profile to advertise what they have available and where it can be bought. This could be at their own farm, or a nearby farmer's market. The consumer profile allows individuals to search nearby events and farms to see what is fresh and available, where to buy it, and even create meals based on what is currently in their fridge and what is available nearby. Users can search through a public cookbook, select their favorite recipes and see which ingredients are available locally.

## Approach

There are two main parts to this project: the social network and the meal planner/cookbook. We plan to split the work into these two sections and have a team of two people focusing on each part. There will be considerable overlap in the backend data between the two parts, so we will have to do design the data structures as a single team. All code and assets will be stored in a single GitHub repository and the site itself will be built using the Play Framework and Twitter Bootstrap. Once complete it will be deployable on Heroku.

## Deliverable 1
Users will be able to sign in, add items to their "fridge", search for recipes, and add them to their cookbook. Farmers will be able to sign in, and add and edit items to their stock. There will be a "local" page which contains a map of nearby places and a list of upcoming events (ex. farmers markets).

## Deliverable 2
In addition to the previous deliverable functionality, users will be able to create a social network by adding friends, and communicating with them by sharing recipes. Users will also be able to rate and comment on recipes and farmers. There will be a functioning meal planner that allows users to plan out their meals for upcoming weeks by chosing recipes and placing them on the calendar.

## Deliverable 3
In addition to the previous deliverable functionality, the stock (in the user's fridge and in the farmer's market) will have expiration dates. There will be a functioning meal planner that can take in a user's food preferences, a budget, their current fridge items, and their location, and automatically generate meals for the upcoming week, with recommendations on where to buy the ingredients that they need.

## Mockup
Home Page (Desktop)

Home Page (Mobile)

Profile Page (Desktop)

Profile Page (Mobile)

Friend's Profile Page (Desktop)

Friend's Profile Page (Mobile)

Farmer's Profile Page (Desktop)

Farmer's Profile Page (Mobile)

Cookbook Page (Desktop)

Cookbook Page (Mobile)

Recipe Page (Desktop)

Recipe Page (Mobile)

Local Maps Page (Desktop)

Local Maps Page (Mobile)

Meal Planner Page (Desktop)

Meal Planner Page (Mobile)

repository: amymalia/KaleWithFriends

gha_language: Java

repo_name: amymalia/KaleWithFriends


text:
### [CVE-2020-11076](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11076)
![](https://img.shields.io/static/v1?label=Product&message=puma&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-444%3A%20Inconsistent%20Interpretation%20of%20HTTP%20Requests%20('HTTP%20Request%20Smuggling')&color=brighgreen)

### Description

In Puma (RubyGem) before 4.3.4 and 3.12.5, an attacker could smuggle an HTTP response, by using an invalid transfer-encoding header. The problem has been fixed in Puma 3.12.5 and Puma 4.3.4.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/0xT11/CVE-POC
- https://github.com/ARPSyndicate/cvemon
- https://github.com/dentarg/cougar
- https://github.com/developer3000S/PoC-in-GitHub
- https://github.com/hectorgie/PoC-in-GitHub
- https://github.com/mo-xiaoxi/HDiff
- https://github.com/nomi-sec/PoC-in-GitHub
- https://github.com/soosmile/POC

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Generate

The `make generate` command auto-generates files across the Vector repository
(mostly documentation). This folder contains all of the inner-workings of that
command.

## Metadata

To start, you should be familiar with the Vector [`/.meta`](/.meta) directory.
This directory contains various metadata about the Vector project as a whole,
mostly configuration details but also link definitions and more. Its content is
loaded via the [`./util/metadata.rb`](./util/metadata.rb) file and represented
as an object.

## Templates

If a file in the Vector repo needs to be dynamically generated you can place
it in the [templates](templates) directory. The structure of this directory
should match the root Vector structure exactly, and only include files that
need to be generated. For example, the [`/README.md`](/README.md) is generated
by the [`/scripts/generate/templates/README.md.erb`](/scripts/generate/templates/README.md.erb)
template.

## Context

Context refers to the execution context used when rendering templates. This
is represented by the [`context.rb`](context.rb) file. All methods in this
file are available within templates. This is a single global context used in
all template files.

## Partials

The [`context.rb`](context.rb) file incudes a `#render_partial` method that can
be used to render partial templates that are commonly reused. These partials are
placed in [`templates/_partials`](templates/partials).

Partials should only be used when absolutely necessary.

repository: shanlashari/vector

repo_name: shanlashari/vector


text:
---
layout: post
title: Baby steps
subtitle: Else I might trip and hurt myself.
category: Monoceros
comments: true
meta: 28 May 2011 - Eugene, Oregon
---

So, you may have noticed that I've been off in my own little world with [Monoceros][].
I've been trying to become a bit more competent at the tools that I use before pushing out initial tests for you to peruse.
But you know what?  I mean this in the nicest way, I really do.

What I really meant to say was, "Hey, I really appreciate you a lot. But I really need to just get code out there, and I know it won't be the best."
You know what? That makes me feel liberated. Not that I don't care what you think, this is more of a personal victory than some petty realization.
I'll just toss out tests and features and get some feedback, that's safe right?

With that said, I think it's safe enough to point out that my test will suck.
I'm trying to be clever, writing tests for metaprogramming sounds so daunting. Perhaps painful?

Thank you for conspiring with me against myself,

~Johnneylee

[Monoceros]: https://github.com/Spaceghost/Monoceros "Monoceros@Github"

gha_language: Ruby


text:
## Users

A user account allows users to authenticate to an [organization](#administration-organizations) and to have access to the resources in it. You can restrict user access to the system and environments by assigning them specific [roles](#administration-roles). Additionally, every user is given an API key which is needed to use our APIs. All operations done by users are persisted and can be accessed through the activity log.

### List users

`GET /users`

```shell
# Retrieve visible users

curl "https://cloudmc_endpoint/api/v2/users" \
   -H "MC-Api-Key: your_api_key"
```
> The above command returns a JSON structured like this:

```json
{
  "data":[{
    "id": "e83540c7-75a0-4715-96dc-c10a364e0390",
    "userName": "habsgoalie123",
    "firstName": "Carey",
    "lastName": "Price",
    "email"<EMAIL_ADDRESS>    "creationDate": "2017-08-15T12:00:00.000Z",
    "status": "ACTIVE",
    "locale": "en",
    "organization": {
      "id": "8e3393ce-ee63-4f32-9e0f-7b0200fa655a",
      "name": "Canadiens"
    },
    "serviceConnections": [
      {
        "id": "5d841eb6-5913-4244-b001-917228e7aa64",
        "name": "Microsoft Azure"
      },
      {
        "id": "61e5dc38-441b-4c7d-8ac4-087ebaab23da",
        "name": "swifttest"
      }
    ],
    "lastLogin": "2022-05-20T15:56:27.000Z",
    "lastFailedLogin": "2022-04-16T18:50:21.000Z",
    "loginCount": 76,
    "failedLoginCount": 10,
    "isBusinessContact": false,
    "isTechnicalContact": false,
    "tfaEnabled": false,
    "deleted": false,
    "receivesEmailNotifications": false,
    "canResendUserCreationEmail": true,
    "backupCodesRemaining": 0,
    "primaryRoleBinding": {
      "id": "013b40ca-9837-4233-b28e-09f5828958e5",
      "role": {
        "isSystem": true,
        "name": "guest",
        "id": "ad6b03cc-b9f3-48ae-9406-2ad168afbe01",
        "isFixed": true
      }
    }
  }]
}
```

Retrieve information about users you have access to. If you want access to other users in your [organization or sub-organizations](#administration-organizations), you will need to be assigned the `Users read` permission. Without this permission, you will only see your own user in the list.

Attributes |
---------- | -----------
`id`
*UUID* | The id of the user.
`creationDate`
*string* | The date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) that the user was created.
`email`
*string* | The email of the user.
`firstName`
*string* | The first name of the user.
`lastName`
*string* | The last name of the user.
`organization`
*[Organization](#administration-organization)* | The organization to which the user belongs.
`primaryRoleBinding`
*RoleBinding* | The primary role assigned to this user. This role will always be a fixed role.
`serviceConnections`
*Array[[ServiceConnection](#administration-service-connections)]* | The service connection of the user
*includes*: `id`, `name`, `serviceCode`, `type`, and `state`
`status`
*string* | The current status of the user.
`userName`
*string* | The username of the user
`timezone`
*string* | The timezone of the user.
`locale`
*string* | The language set for the user.
`lastLogin`
*string* | The date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) of the last login by the user.
`lastFailedLogin`
*string* | The date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) of the last failed login by the user.
`loginCount`
*integer* | The count of successful logins for that user.
`failedLoginCount`
*integer* | The count of failed logins attempted by the user.
`isBusinessContact`
*boolean* | Indicates whether the user is a business contact.
`isTechnicalContact`
*boolean* | Indicates whether the user is a technical contact.
`receivesEmailNotifications`
*boolean* | Indicates whether the user email notifications.
`canResendUserCreationEmail`
*boolean* | Indicates whether the user creation email can be sent to the user.
`backupCodesRemaining`
*integer* | The number of backup codes remaining for the user.

### Retrieve a user

`GET /users/:id`

```shell
# Retrieve visible user
curl "https://cloudmc_endpoint/api/v2/users/fdf60a19-980d-4380-acab-914485111305" \
   -H "MC-Api-Key: your_api_key"
```
> The above command returns a JSON structured like this:

```json
{
  "data":{
    "id": "fdf60a19-980d-4380-acab-914485111305",
    "userName": "frodo",
    "firstName": "Frodo",
    "lastName": "Baggins",
    "email"<EMAIL_ADDRESS>    "creationDate": "2017-08-15T12:00:00.000Z",
    "status": "ACTIVE",
    "locale": "en",
    "organization": {
      "id": "c64dcd1d-9123-45e5-ad00-5d635c49176b",
      "name": "The Shire"
    },
    "serviceConnections": [
      {
        "serviceCode": "cs-acs-dev2",
        "name": "cs-acs-dev2",
        "id": "7430e95f-6029-444f-9677-9d2d54007138",
        "state": "PROVISIONED",
        "type": "cloudstack"
      },
      {
        "serviceCode": "cs-acs-dev1",
        "name": "cs-acs-dev1",
        "id": "9000c02b-cb33-4e4e-8d7b-f834f48e8fb9",
        "state": "ERROR_PROVISIONING",
        "type": "cloudstack"
      }
    ],
     "lastLogin": "2022-05-20T15:56:27.000Z",
    "lastFailedLogin": "2022-04-16T18:50:21.000Z",
    "loginCount": 76,
    "failedLoginCount": 10,
    "isBusinessContact": false,
    "isTechnicalContact": false,
    "tfaEnabled": false,
    "deleted": false,
    "receivesEmailNotifications": false,
    "canResendUserCreationEmail": true,
    "backupCodesRemaining": 0,
    "primaryRoleBinding": {
      "id": "013b40ca-9837-4233-b28e-09f5828958e5",
      "role": {
        "isSystem": true,
        "name": "guest",
        "id": "ad6b03cc-b9f3-48ae-9406-2ad168afbe01",
        "isFixed": true
      }
    }
  }
}
```

Retrieve information about a specific user. If you want access to other users in your [organization or sub-organizations](#administration-organizations), you will need to be assigned the `Users Read` permission.

Attributes |
---------- | -----------
`id`
*UUID* | The id of the user.
`creationDate`
*string* | The date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) that the user was created.
`email`
*string* | The email of the user.
`firstName`
*string* | The first name of the user.
`lastName`
*string* | The last name of the user.
`organization`
*[Organization](#administration-organization)* | The organization to which the user belongs.
`primaryRoleBinding`
*RoleBinding* | The primary role assigned to this user. This role will always be a fixed role.
`serviceConnections`
*Array[[ServiceConnection](#administration-service-connections)]* | The service connection of the user
*includes*: `id`, `name`, `serviceCode`, `type`, and `state`
`status`
*string* | The current status of the user.
`userName`
*string* | The username of the user
`timezone`
*string* | The timezone of the user.
`locale`
*string* | The language set for the user.
`lastLogin`
*string* | The date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) of the last login by the user.
`lastFailedLogin`
*string* | The date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) of the last failed login by the user.
`loginCount`
*integer* | The count of successful logins for that user.
`failedLoginCount`
*integer* | The count of failed logins attempted by the user.
`isBusinessContact`
*boolean* | Indicates whether the user is a business contact.
`isTechnicalContact`
*boolean* | Indicates whether the user is a technical contact.
`receivesEmailNotifications`
*boolean* | Indicates whether the user email notifications.
`canResendUserCreationEmail`
*boolean* | Indicates whether the user creation email can be sent to the user.
`backupCodesRemaining`
*integer* | The number of backup codes remaining for the user.
`identityProviderUsers`
*Array* | A list of objects containing the ids of users associated with the identity provider, and their subject ids.

### Create user

`POST /users`

```shell
# Create a user

curl -X POST "https://cloudmc_endpoint/api/v2/users" \
   -H "MC-Api-Key: your_api_key" \
   -H "Content-Type: application/json" \
   -d "request-body"
```
> Request body example:

```json
{
  "userName": "vader42",
  "firstName": "Anakin",
  "lastName": "Skywalker",
  "email"<EMAIL_ADDRESS>  "primaryRoleBinding": {
    "role": {
      "id": "4a1a44f3-ea74-4952-b9ef-ff3163c329d9",
    },
  },
  "organization": {
    "id": "645cf4ce-3699-40c5-a1a8-0b3e945f49ee"
  },
}
```

Create a user in a specific organization.

Users are created asynchronously on the underlying service(s) and progress is reflected in the state of the user's service connection(s).

You will need the `Create a new user` permission to execute this operation.

Required |
-------- | -----------
`userName`
*string* | Username of the new user. Should be unique across the organization.
`firstName`
*string* | First name of the user.
`lastName`
*string* | Last name of the user.
`email`
*string* | Email of the user. Should be unique across the organization.
`primaryRoleBinding.role.id`
*UUID* | The id of the primary role to assign to this user

Optional |
-------- | -----------
`organization`
*[Organization](#administration-organization)* | Organization in which the user will be created. *Defaults to your organization*.
*required:* `id`

Response |
---------- | -----------
`taskId`
*UUID* | The id of the task
`taskStatus`
*string* | The status of the task
`data`
*[user](#administration-users)* | The information about the created user

```shell
# Response body example
```
The responses' `data` field contains the created [user](#administration-users) with its `id`.

```json
{
  "taskId": "633a85e5-447b-41db-a9a2-da986325955c",
  "taskStatus": "PENDING",
  "data": {
    "id": "c1ad55a9-0301-4925-bedc-106d31a73047",
    "userName": "bkenobi",
    "email"<EMAIL_ADDRESS>    "firstName": "Ben",
    "lastName": "Kenobi",
    "canResendUserCreationEmail": true,
    "deleted": false,
    "failedLoginCount": 0,
    "isBusinessContact": false,
    "isTechnicalContact": false,
    "locale": "en",
    "loginCount": 0,
    "receivesEmailNotifications": false,
    "serviceConnections": [],
    "status": "ACTIVE",
    "tfaEnabled": false,
    "organization": {
      "id": "bdb2d571-2878-462c-8162-9a034d5ab602",
      "name": "System"
    },
    "primaryRoleBinding": {
      "id": "013b40ca-9837-4233-b28e-09f5828958e5",
      "role": {
        "isSystem": true,
        "name": "guest",
        "id": "ad6b03cc-b9f3-48ae-9406-2ad168afbe01",
        "isFixed": true
      }
    }
  }
}
```

### Update user

`PUT /users/:id`

```shell
# Update a user
curl -X PUT "https://cloudmc_endpoint/api/v2/users/fdf60a19-980d-4380-acab-914485111305" \
   -H "MC-Api-Key: your_api_key" \
   -H "Content-Type: application/json" \
   -d "request-body"
```
> Request body example:

```json
{
  "userName": "spidey1",
  "firstName": "Peter",
  "lastName": "Parker",
  "email"<EMAIL_ADDRESS>  "primaryRoleBinding": {
    "role": {
      "id": "4a1a44f3-ea74-4952-b9ef-ff3163c329d9",
    },
  },
}
```

Update a specific user. You will need the `Users update` permission to execute this operation.

Optional |
-------- | -----------
`userName`
*string* | The new username of the user. Should be unique across the organization.
`firstName`
*string* | The new first name of the user
`lastName`
*string* | The new last name of the user
`primaryRoleBinding.role.id`
*UUID* | The id of the primary role to assign to this user
`email`
*string* | The new email of the user. Should be unique across the organization.

##### Returns

The responses' `data` field contains the updated [user](#administration-users).

### Delete user

`DELETE /users/:id`

Users are deleted asynchronously on the underlying services.

The user model's status will be set to `DISABLED` prior to attempting the delete operation. This will prevent the user from login in or making API calls.

The user model will be deleted only when the user is removed from all environments AND from all underlying services.

If removing a user from an environment fails, no attempt will be made to delete the user model. This does not affect other attempts at removing the user from a different environment or deleting the user from a different service.

If deleting a user fails, subsequent delete attempts will be considered as a "force delete". A force delete entails reattempting to delete the user as explained above and then deleting the user model regardless of the response from the underlying services.

Delete a specific user. You will need the `Delete an existing user` permission to execute this operation.

```shell
# Delete a user
curl "https://cloudmc_endpoint/api/v2/users/dd01c908-371c-4ec5-9fd7-80b1bfac8975" \
   -X DELETE -H "MC-Api-Key: your_api_key"
```

Response                  |
--------------------------|-----------------------
`taskId`
*UUID*       | The id of the task
`taskStatus`
*string* | The status of the task

```shell
# Response body example
```

```json
{
  "taskId": "cd921b44-ca9f-4f6b-b184-f952e5ab010a",
  "taskStatus": "PENDING"
}
```

### Unlock user

`POST /users/:id/unlock`

```shell
# Unlock a user that was locked from the system

curl "https://cloudmc_endpoint/api/v2/users/dd01c908-371c-4ec5-9fd7-80b1bfac8975/unlock" \
   -X POST -H "MC-Api-Key: your_api_key"

```

A user with 10 consecutive unsuccessful logins will be automatically locked by our system. This API can be used to unlock a user in this situation. You will need the `Unlock user` permission to execute this operation.

repository: cloudops/cloudmc-api-docs

branch_name: refs/heads/cmc-dev

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: cloudops/cloudmc-api-docs


text:
---
layout: default
---

# 1997-05-11 - Re: The War is Underway (fwd)

## Header Data

From: Kent Crispin<EMAIL_ADDRESS>To: cypherpunks<EMAIL_ADDRESS>Message Hash: 0e1e0fbeecdd6f631716fd2429b27ab48f5a4c015e27b0509d8545a5577a8af9

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-05-11 23:25:45 UTC

Raw Date: Mon, 12 May 1997 07:25:45 +0800

## Raw message

```
{% raw  %}From: Kent Crispin<EMAIL_ADDRESS>Date: Mon, 12 May 1997 07:25:45 +0800
To: cypherpunks<EMAIL_ADDRESS>Subject: Re: The War is Underway (fwd)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Sun, May 11, 1997 at 01:18:43PM -0700, Lucky Green wrote:
> At 04:10 PM 5/10/97 -0700, Kent Crispin wrote:
>
> >Hence the value of the "Crypto is Cool" approach.  A valuable addition
> >would be crypto packages designed for high school kids.  All my many
> >nieces and nephews are on the net...
>
> I usually don't reply to these kind of posts, but since you have mentioned
> this before

Actually, you must be confusing me with someone else -- I can't, to
my recollection, remember ever having said anything about this
before.  (Of course, you could always go back in the archives and check.)
I was just responding to the idea mention by someone else (except
I think they worded it "ciphers are cool" or something like that).

> and since you obviously still don't deem it appropriate to get
> yourself up to speed by reading the archives, your idea has been discussed
> and tried.

With a memory like mine (and yours too, apparently) reading the
archives would do no good -- I can't remember a thousandth of all the
stuff I read, anyway.

> People won't use crypto unless it is either transparent, meaning put there
> *for* them by the OS vendor/application developer or because the see a need
> for using it. The few fanatics that use crypto because "it is cool" are
> inconsequential when the objective is bringing crypto to the masses.

I guess we are doomed, then.

--
Kent Crispin				"No reason to get excited",
<EMAIL_ADDRESS>	the thief he kindly spoke...
PGP fingerprint:   B1 8B 72 ED 55 21 5E 44  61 F4 58 0F 72 10 65 55
http://songbird.com/kent/pgp_key.html

{% endraw %}
```

## Thread

+ Return to [May 1997](/archive/1997/05)

+ Return to "[Jeremiah A Blatz <jer+@andrew.cmu.edu>](/authors/jeremiah_a_blatz_jer_at_andrew_cmu_edu_)"
+ Return to "[Kent Crispin <kent@songbird.com>](/authors/kent_crispin_kent_at_songbird_com_)"
+ Return to "[Lucky Green <shamrock@netcom.com>](/authors/lucky_green_shamrock_at_netcom_com_)"

+ 1997-05-11 (Mon, 12 May 1997 07:01:53 +0800) - [Re: The War is Underway (fwd)](/archive/1997/05/de510d4cadbab2d6f6158b0fe95dc5789eea3402972b4ddbcb2db21b686d32b4) - _Lucky Green<EMAIL_ADDRESS>  + 1997-05-11 (Mon, 12 May 1997 07:25:45 +0800) - Re: The War is Underway (fwd) - _Kent Crispin<EMAIL_ADDRESS>  + 1997-05-12 (Tue, 13 May 1997 04:09:55 +0800) - [Re: The War is Underway (fwd)](/archive/1997/05/6ed2dd03b87330042b722e9233b7fb7e05f997f7f5785f3d32e78d668ddefe6a) - _Jeremiah A Blatz<EMAIL_ADDRESS>


text:
> Only users with grant `server.importers` can see this section

# Neo4j to OrientDB Importer

In Studio 2.2 you can configure the execution of a new plugin, which allows you to import your Neo4j database into OrientDB in few simple steps.

Imported neo4j items are:

- nodes
- relationships
- unique constraints
- indexes

**NOTE**: This feature is available both for the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise) and the [OrientDB Community Edition](http://orientdb.com/download/).

This visual tool consists in a wizard composed of 2 simple steps.
Let's have a look at each configuration step.

### Step 1

In the first step you have to type the following required parameters:

- `Database Host`, as the address of the host where the neo4j server is available
- `Port`, as the port where your neo4j server is listening for new connections via the bolt binary protocol (default port is 7687)
- `User Name`, as the username to access the neo4j server
- `Password`, as the password to access the neo4j server

After you typed all the required parameters for the migration you can test the connection with the source database.

![Test Connection](./images/studio-neo4j-importer/studio-neo4jimporter-step1-tryConnection.png)

### Step 2

In the second step you have to specify the parameters about the OrientDB target database and some additional info:

- `Connection protocol`, as the protocol adopted during the migration in order to connect to OrientDB. You have to choose among:
  - plocal: persistent disk-based, where the access is made in the same JVM process
  - memory: all data remain in memory
- `OrientDB Database Name`, as the target database name where the Neo4j database will be migrated. The database will be created by the import tool if not present. In case the database already exists, the Neo4j to OrientDB Importer will behave accordingly to the checkbox below.
- `Log Level`, as the level of verbosity printed to the output during the execution. You can choose among:
  - NO
  - DEBUG
  - INFO
  - WARNING
  - ERROR
- `Overwrite Database`, checkbox to overwrite OrientDB target database if it already exists.
- `Create indices on edges`, checkbox to create indices on imported edges in OrientDB. In this way an index will be built for each Edge class on `'Neo4jRelId'` property.

![Neo4jImporter Step 2](./images/studio-neo4j-importer/studio-neo4jimporter-step2.png)

Once we have collected all the info, you can run your configured job through the `START MIGRATION` button, then the job progress monitor will be displayed:

![Job Running](./images/studio-neo4j-importer/studio-neo4jimporter-job-running.png)

At the end of the migration, statistics about the process are reported as shown below:

![Migration Job Completed](./images/studio-neo4j-importer/studio-neo4jimporter-job-completed.png)

### Migration Details

Internally, the _Neo4j to OrientDB Importer_ makes use of:

- the Neo4j's bolt connector based on the the Bolt binary protocol to read the graph database from Neo4j
- the OrientDB's java API to store the graph into OrientDB

The migration consists of four phases:

- **Phase 1**: Connection initialization to Neo4j
- **Phase 2**: Migration of nodes and relationships present in the source graph database
- **Phase 3**: Schema migration
- **Phase 4**: Shutdown of the connection to Neo4j and summary info reporting

#### General Migration Details

The following are some general migration details that is good to keep in mind:

- In case a node in Neo4j has no _Label_, it will be imported in OrientDB into the Class _"GenericClassNeo4jConversion"_.

- In case a node in Neo4j has multiple _Labels_, it will be imported into the `Class` _"MultipleLabelNeo4jConversion"_.

- List of original Neo4j _Labels_ are stored as properties in the imported OrientDB vertices (property: _"Neo4jLabelList"_).

- During the import, a not unique index is created on the property _"Neo4jLabelList"_. This allows you to query by _Label_ even over nodes migrated into the single `Class` _"MultipleLabelNeo4jConversion"_, using queries like:
  `SELECT FROM V WHERE Neo4jLabelList CONTAINS 'your_label_here'` or the equivalent with the [MATCH](../../sql/SQL-Match.md) syntax: `MATCH {class: V, as: your_alias, where: (Neo4jLabelList CONTAINS 'your_label'} RETURN your_alias`.

- Original Neo4j `IDs` are stored as properties in the imported OrientDB vertices and edges (`Neo4jNodeID` for vertices and `Neo4jRelID` for edges). Such properties can be (manually) removed at the end of the import, if not needed.

- During the import, an OrientDB index is created on the property `Neo4jNodeID` for all imported vertex `classes` (node's _Labels_ in Neo4j). This is to speed up vertices lookup during edge creation. The created indexes can be (manually) removed at the end of the import, if not needed.

- In case a Neo4j Relationship has the same name of a Neo4j _Label_, e.g. _"RelationshipName"_, the _Neo4j to OrientDB Importer_ will import that relationship into OrientDB in the class `E_RelationshipName` (i.e. prefixing the Neo4j's `RelationshipType` with an `E_`).

- Neo4j Nodes with same _Label_ but different case, e.g. _LABEL_ and _LAbel_ will be aggregated into a single OrientDB vertex `Class`.

- Neo4j Relationship with same name but different case, e.g. _relaTIONship_ and _RELATIONSHIP_ will be aggregated into a single OrientDB edge `Class`

- Migration of Neo4j's _"existence"_ constraints (only available in the Neo4j's Enterprise Edition) is currently not implemented.

- During the creation of properties in OrientDB, Neo4j `Char` data type is mapped to a `String` data type.

#### Details about Schema Migration

The following are some schema-specific migration details that is good to keep in mind:

- If in Neo4j there are no constraints nor indexes, and if after we drop, after the migration, the properties and indexes created for internal purposes (`Neo4jNodeID`, `Neo4jRelID`, `Neo4jLabelList` and corresponding indexes), the imported OrientDB database is schemaless.

- If in Neo4j there are constraints or indexes, the imported OrientDB database is schema-hybrid (with some properties defined). In particular, for any constraint and index:

      	- The Neo4j property where the constraint or index is defined on, is determined.

      	- A corresponding property is created in OrientDB (hence the schema-hybrid mode).

- If a Neo4j unique constraint is found, a corresponding unique index is created in OrientDB

      	- In case the creation of the unique index fails, a not unique index will be created. Note: this scenario can happen, by design, when migrating nodes that have multiple _Labels_, as they are imported into a single vertex `Class`).

- If a Neo4j index is found, a corresponding (not unique) OrientDB index is created.

#### Migration Best Practices

According to the migration logic shown so far, we can define the following best practices, adoptable before the migration towards OrientDB:

1. Check if you are using _Labels_ with same name but different case, e.g. _LABEL_ and _LAbel_ and if you really need them. If the correct _Label_ is _Label_, change _LABEL_ and _LAbel_ to _Label_ in the original Neo4j database before the import. If you really cannot change them, be aware that with the current version of the Neo4j to OrientDB Importer such nodes will be aggregated into a single OrientDB vertex `Class`.

2. Check if you are using relationships with same name but different case, e.g. _relaTIONship_ and _RELATIONSHIP_ and if you really need them. If the correct relationship is _Relationship_, change _relaTIONship_ and _RELATIONSHIP_ to _Relationship_ before the import. If you really cannot change them, be aware that with the current version of the Neo4j to OrientDB Importer such relationships will be aggregated into a single OrientDB edge `Class`.

3. Check your constraints and indexes before starting the import. Sometime you have more constraints or indexes than needed, e.g. old ones that you created on _Labels_ that you are not using anymore. These constraints will be migrated as well, so a best practice is to check that you have defined, in Neo4j, only those that you really want to import. To check constraints and indexes in Neo4j, you can type `:schema` in the Browser and then click on the "play" icon. Please delete the not needed items.

4. Check if you are using nodes with multiple _Labels_, and if you really need more than one _Label_ on them. Be aware that with current version of the Neo4j to OrientDB Importer such nodes with multiple _Labels_ will be imported into a single OrientDB `Class` ("_MultipleLabelNeo4jConversion_").

repository: orientechnologies/orientdb-docs

gha_language: CSS

repo_name: orientechnologies/orientdb-docs


text:
# Saving and Viewing PowerSystems Data

PowerSystems data can be serialized and deserialized in JSON.

```julia
PowerSystems.to_json(system, "system.json")
system = System("system.json")
```

It can be useful to view and filter the PowerSystems data in this format. There
are many tools available to browse JSON data.

Here is an example [GUI tool](http://jsonviewer.stack.hu) that is available
online in a browser.

The command line utility [jq](https://stedolan.github.io/jq/) offers even more
features. The rest of this document provides example commands.

## View the entire file pretty-printed.

```
jq . system.json
```

## View the PowerSystems component types.

```
jq '.data.components | keys' system.json
```

## View specific components.

```
jq '.data.components.ThermalStandard' system.json
```

## Get the count of a component type.

```
jq '.data.components.Bus  | length' system.json
```

## View specific component by index.

```
jq '.data.components.ThermalStandard | .[0]' system.json
```

## View specific component by name.

```
jq '.data.components.ThermalStandard | .[] | select(.name == "107_CC_1")' system.json
```

## View the field names for a component.

```
jq '.data.components.ThermalStandard | .[0] | keys' system.json
```

## Filter on a field value.

```
jq '.data.components.ThermalStandard | .[] | select(.active_power > 2.3)' system.json
```

## Output a table with select fields.

```
jq -r '["name", "econ.capacity"], (.data.components.ThermalStandard | .[] | [.name, .active_power]) | @tsv' system.json
```

## View the time_series information for a component.

```
jq '.data.components.ThermalStandard | .[0] | .time_series' system.json
```


text:
# fandom-react

Fandom FE challenge using react

### To Run

View the create-react-app [README](https://github.com/basandlin/fandom-react/blob/master/app/README.md) in the `/app` directory

### Considerations

- Clicking on the title logo will navigate you to the home page
- CSS variables were written with vanilla CSS and used in .scss files, per requirements
- A couple of widths were sacrificed in favor of using flexbox to be more dynamic. In the real world, I would have discussed this with a designer.
- In addition, I left out the talent calc background as it just appears to be dark. If it has linear gradient, I'm happy to demonstrate that with CSS.
- As I haven't written React in a good while, my progress was a bit slower than if I had used Vue. I chose to use React because this is the framework the team uses, and I wanted to demonstrate ability to adapt by getting caught up on the latest syntax.

### TO DO

1. "Liquids" Navigation dropdown. Although I didn't quite have time to import a dropdown and implement, this would have been next. Do note, though, that "Liquids" navigates to the sub-path "Flammable"
2. Lines between Talents in Talent Calculator
3. Talent border styling
4. unit tests

repository: basandlin/fandom-react

repo_name: basandlin/fandom-react


text:
---
title: Substrate Storage Deep Dive
date: 2019-12-09T16:14:03-08:00
author: Shawn Tabrizi
layout: post
permalink: /substrate/substrate-storage-deep-dive/
categories:
  - Substrate
tags:
  - storage
  - database
  - runtime
  - sub0
  - merkle
  - patricia
  - trie
---

##### In this post, I will share the video and slides I presented at the Substrate Developer Conference (Sub0) which gives a deep dive into the storage layers of the Substrate blockchain development framework.

This last week I was given the opportunity to present at the official Substrate Developer Conference where I gave a deep dive into the inner workings of Substrate storage.

As a runtime developer, you should know that storage is one of the most important things to keep in mind when designing and developing your new runtime modules. Having a deep understanding of how the different storage layers work and interact will be critical for you to make correct decisions moving forward.

Here is a video of my presentation, and the presentation itself:

## Video

## Presentation

## Questions?

Feel free to contact me with any questions you might have or any details you think I may have gotten wrong. As always, if you enjoy this content and want to continue to support me, take a look at my [donations page](https://shawntabrizi.com/donate/).


text:
---
title: "Week 5: Hash Maps and Edit Distance"
date: 2016-10-04 00:00
category: reference/moocs
status: draft
parent: data-structures-optimizing-performance
---

## Core: Hash Tables

* Hash table key idea: pigging back off the ``O(1)`` speed of arrays by convert data to an array index with a hash function.
* Simplest hash function: modulo.
  * Hash with 5 elements, add 11:
    * ``hash = 11 % 5``
  * Add char ``b``:
    * ``hash = int("b") % 5``
  * Add string ``hi``:
    * ``hash = (int("h") + int("i")) % 5``

## Core: Collisions in Hash Tables

* Linear probing: When you get a collision, just put the element in the next free slot.
  * Could potential result in slower inserts when hash table gets full.
  * Random probing: randomly place element somewhere on collision.
* Separate chaining: keep a list of elements at index locations. Just add elements to list on collision.
  * Has own drawbacks.

* Downsides to hash tables:
  1. Resizing cost:
    * When hash table gets too full (usually 70%), need to resize it.
    * Requires creating a new table and reinserting everything. Potentially very expensive.
  2. Ordering data:
    * Hash tables don't have implicit order in themselves.

## Core: Applications of Hash Tables

* HashSet vs HashMap
  * HashSet doesn't map to a value (standard set).
  * HashMap does.

# Edit Distance

## Core: Overview

* Generate valid words for misspelled words.
* Edit distance of words:
  * Start with ``speel``
  * Close == altered as little as possible.
  * Possible transformations:
    * 1 step away (single character transformation)
      * Substitution (change a single char): ``speel`` -> ``apeel``, ``sbeel``, ``spell``, ``speek``
      * Insertion (add a single char): ``speel`` -> ``bspeel``, ``sipeel``, ``speeel``.
      * Deletion (remove one char): ``speel`` -> ``seel`` -> ``spee``
* Simple spell suggestion algo:
  1. Generate all strings "1 away" from original.
  2. Discard all that aren't words.
* What if not enough? Make it 2 edits away.

## Core: Algorithm

1. Add misspelled words to a queue.
2. While not enough words generated and queue not empty:
  * Remove the a string from the queue.
  * Generate all "1 away" strings from the first string in the queue.
  * Add these to queue.
  * Keep strings that are actual words in a separate list.

## Core: Edit Distance

* What path of words is required to get from ``spell`` to ``mine``?
  * ``spell`` -> ``spill`` -> ``pill`` -> ``pile`` -> ``pine`` -> ``mine``
* Edit distance: number of modifications you need to make to one string to turn into another.
* Solution: build a tree to search problem space.
  * Problem: tree can get extremely large.
    * How many strings are "1 away" from initial word, where k is the length of the word?
        * Substitutions: 25 * k
        * Insertions: 25 * (k + 1)  (+1 because you can put an element at the end of the list.
        * Deletions: k
        * Add all together: 52k + 26 new strings
        * Do that for every element of the tree and daaaymn it's a big tree.
* Possible solutions:
  * Dynamic programming -> O(k^2)
  * Pruning: restrict the path to only valid words.

gha_language: Jupyter Notebook


text:
# ts-fetch-demo

This is a demo of the ts-fetch-userapi library available at @lab5e/ts-fetch-userapi

## Running the example

Launch with

```shell
npm install
npm run serve
```

..then go to [http://localhost:8080/](http://localhost:8080/).

The gist of the example is in the `retrieveProfile` function in [src/components/ProfileDemo.vue](src/components/ProfileDemo.vue).


text:
# marketing-page-luis

This project is the marketing and an About Us page of an app called 'prisoner skills'.

'Prisoner skills' allows prison management to broadcast the skill of inmates to
make better use of their time using their skills to make a wage and becoming more
employable after prison.

In the link below you can read some more information about what the app is supposed
to be able to do.

https://docs.google.com/document/d/1fLJbVS4zhBBMtriZPjBcUpb30szAPc5jLyGAdoEIb_s/edit#

The following link brings you to the github repository:
https://github.com/prisoner-skills-org/marketing-page-luis

To work on this project please visit the github repo and clone it.

Then save it on your local computer, checkout to a new branch and make a small change.
Then git add, commit and push your work.

Please create a pull request and ad the team leader as a reviewer.

You can now work on the project and whenever you make some progress add, commit and push it
so your reviewer can have a look at your work and merge it to the master branch if you did
a good job.

The index.html file is for the marketing page and the about.html file contains the html code for
the about page.

The CSS in this project works with a compiler! So you can nest your CSS code, build variables and mixins.
Please write the code in the .less files - the compiler will build the .css file!

All images for the marketing page and profile pics of all team members can be found in the img folder.

repository: prisoner-skills-org/marketing-page-luis

repo_name: prisoner-skills-org/marketing-page-luis


text:
# Multi-Attribute Login

WSO2 Identity Server lets you configure multiple attributes as the login identifier. While username is the default login identifier, users can have the option to enter a mobile number, email address or any attribute of their choice.

!!! info "Supported flows"

    Multi-attribute login is supported in the following flows:

    -   Identifier first authenticator
    -   Username & Password Authenticator
    -   Request path authenticator
    -   Authentication REST APIs
    -   Oauth Password grant
    -   Password recovery flow

The following section explains how to configure WSO2 identity server for multi-attribute login.

## Enable multi-attribute login

Follow the steps given below to enable multi-attribute login from the Management Console.

1.  Sign in to the Management Console using your tenant credentials.

    !!! info
        - The **admin** is the default administrative user in WSO2 Identity Server.
        - If you use multiple tenant domains, you need to configure multi-attribute login for each tenent.

2.  Go to **Main** > **Identity Providers** > **Resident** and expand **Account Management**.

3.  Expand **Multi Attribute Login** and select **Enable Multi Attribute Login**.

4.  Add claim URIs for claims that users are allowed to use as login identifiers.

    ![adding-claims-for-multi-attribute-login]({{base_path}}/assets/img/guides/adding-claims-for-multi-attribute-login.png)

5. Click **Update** to save the changes.

## Add regular expressions for allowed claims

Once you have configured WSO2 Identity Server for multi-attribute login, you need to provide regular expressions for the allowed claims. Some claims have regex defined by default.

If you need to define regex for a claim, follow the steps below.

1.  Open the Management Console.
2.  Go to **Main** > **Claims** and click **List**.
3.  Select the claim you want to provide the regular expression for and click **Edit**.
4.  Enter the regex pattern under the **Regular Expression** field.
5.  Click **Update** to save the changes.

![adding-regex-pattern-to-claims]({{base_path}}/assets/img/guides/adding-regex-pattern-to-claim.png)

Here are a few examples of regex patterns.

| Claim URI                           | Example Regex pattern    |
|-------------------------------------|-----------------------------------------------------------------|
| http://wso2.org/claims/emailaddress | `^([a-zA-Z0–9_\.\-])+\@(([a-zA-Z0–9\-])+\.)+([a-zA-Z0–9]{2,4})+$` |
| http://wso2.org/claims/mobile       | `^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$` |
| http://wso2.org/claims/username     | `^[a-zA-Z0–9._-]{3,}$`                                            |

You have now successfully set up WSO2 Identity Server to allow multi-attribute login.

## Try it out

When multi-attribute login is configured in WSO2 IS, application users can use any of the configured attributes to login.

In this example scenario, let's allow users to use the mobile number as a login identifier:

1.  Configure multi-attribute login for the claim `http://wso2.org/claims/mobile`.
2.  Go to the My Account: `https://localhost:9443/myaccount`.
3.  Enter mobile number as the login identifier and click **Continue**.

    ![adding-regex-pattern-to-claims]({{base_path}}/assets/img/guides/login-with-mobile-number.png)

!!! Tip
    - **What happens if two users use the same value for a claim?**

        Multi-attribute login will not work for these users. Retaining uniqueness for claim values avoids this conflict. Learn about [configuring the uniqueness of claims]({{base_path}}/learn/configuring-uniqueness-of-claims).

    - **Using email address as login attribute for super tenant users**

        Super tenant users need to append the tenant domain
        to the email address (Ex: `john<EMAIL_ADDRESS>when logging into a SaaS application.


text:
---
layout: default
---

# 1997-06-09 - Re: My War

## Header Data

From<EMAIL_ADDRESS>(Mike Duvos)

To<EMAIL_ADDRESS>Message Hash: 2f475dd489878b981edacfd19440ecf4eb3e49c2e2db727fc10de3053eb9d7cf

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-06-09 21:25:14 UTC

Raw Date: Tue, 10 Jun 1997 05:25:14 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Mike Duvos)
Date: Tue, 10 Jun 1997 05:25:14 +0800
To<EMAIL_ADDRESS>Subject: Re: My War
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

A Hysterical Person writes:

> Sounds like someone's afraid that se7en might trash his kiddie porn
> stock.

  How???

While I certainly think that society has every right to enforce reasonable
workplace health and safety standards within the commercial porn industry,
including setting reasonable age limits for employment therein, the
current ban on any and all depictions of the sexuality of minors, even
synthetic ones, is clearly an ideological purge of speech certain people
are uncomfortable with, and not some glowing crusade to protect children
from harm.

> It is disgusting and only extremely sick individuals take a part in
> it.

You're right.  Arrest Janet Reno immediately, and confiscate all motion
picture footage of the Waco child torchings.

> If you're defending it, then excuse me for rushing to judge, but you are a
> sick, disgusting ass-fuck that needs a good shot in the head.

Sounds like someones socioerotic rehearsal play was severely limited
during their formative years.  Guaranteed every time to produce a cranky
neurotic who displaces sexual arousal into anger when confronted with
erotic imagery involving the young and emotionally healthy.

Please post again when you have something to say about cryptography, and
try to stay away from the kiddie pool.

--
     Mike Duvos         $    PGP 2.6 Public Key available     $
<EMAIL_ADDRESS>   $    via Finger.                      $

{% endraw %}
```

## Thread

+ Return to [June 1997](/archive/1997/06)

+ Return to "[bennett_t1@popmail.firn.edu](/authors/bennett_t1_at_popmail_firn_edu)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "[Eric Cordian <emc@wire.insync.net>](/authors/eric_cordian_emc_at_wire_insync_net_)"
+ Return to<EMAIL_ADDRESS>(Igor Chudov @ home)](/authors/ichudov_at_algebra_com_igor_chudov__at__home_)"
+ Return to "[Kent Crispin <kent@songbird.com>](/authors/kent_crispin_kent_at_songbird_com_)"
+ Return to "[Lucky Green <shamrock@netcom.com>](/authors/lucky_green_shamrock_at_netcom_com_)"
+ Return to<EMAIL_ADDRESS>(Mike Duvos)](/authors/mpd_at_netcom_com_mike_duvos_)"
+ Return to "[Paul Bradley <paul@fatmans.demon.co.uk>](/authors/paul_bradley_paul_at_fatmans_demon_co_uk_)"
+ Return to "[se7en <se7en@dis.org>](/authors/se7en_se7en_at_dis_org_)"
+ Return to "[Steve Schear <azur@netcom.com>](/authors/steve_schear_azur_at_netcom_com_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "[tzeruch@ceddec.com](/authors/tzeruch_at_ceddec_com)"

+ 1997-06-09 (Mon, 9 Jun 1997 14:32:43 +0800) - [My War](/archive/1997/06/ad46f0c64df11c0a40cc0b6deba135d70f2de7b42ce414a9ec239ea0d4aec306) - _se7en<EMAIL_ADDRESS>  + 1997-06-09 (Mon, 9 Jun 1997 21:38:42 +0800) - [Re: My War](/archive/1997/06/d2eb639790cddf4008b227c2ebb0dcac4b214c86c2a050d17bc29e52e8bc6552) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
  + 1997-06-09 (Tue, 10 Jun 1997 00:14:21 +0800) - [Re: My War](/archive/1997/06/8d8cc71711ee1479b2ab2c68edec999061d0d18b00050abb7f70c38ea9811e81) - _Paul Bradley<EMAIL_ADDRESS>    + 1997-06-09 (Tue, 10 Jun 1997 04:37:46 +0800) - [Re: My War](/archive/1997/06/9d87e2b9d22c27616a7a2a752714d8c9dddf855d0eb2410b001beede80a61af7) -<EMAIL_ADDRESS>      + 1997-06-09 (Tue, 10 Jun 1997 05:25:14 +0800) - Re: My War -<EMAIL_ADDRESS>(Mike Duvos)_
        + 1997-06-10 (Tue, 10 Jun 1997 10:50:05 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/7ecf3968abd5e5b075961144d2286c8b94a90f7c5e68e4076973d8b288f8eb5b) - _Lucky Green<EMAIL_ADDRESS>          + 1997-06-10 (Tue, 10 Jun 1997 11:02:48 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/d6a79a5a4ecec2be3c0ef1bb2a5f5435e525d16c1c4f9adce752c6fba36ade77) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
          + 1997-06-10 (Tue, 10 Jun 1997 11:34:55 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/096cee4d4904c8ac518c93cb40ea201fd1c34c499e39ecaae44c234818bc59ea) - _Tim May<EMAIL_ADDRESS>            + 1997-06-10 (Tue, 10 Jun 1997 12:20:18 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/0950136085307d8a231572b3b7f88afb8e5c19ec0751423f7e44e293cbae0507) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
          + 1997-06-10 (Wed, 11 Jun 1997 03:56:31 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/9ee0bbc9d206486249ef4fae44fa6ed9ede3eec6dc2b73669c547bd471bdd332) -<EMAIL_ADDRESS>          + 1997-06-11 (Wed, 11 Jun 1997 08:32:29 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/052ce95bdeb87e758a0a740285bf1d27785ec6f66ddc029da608d4e95437d986) - _Steve Schear<EMAIL_ADDRESS>            + 1997-06-11 (Thu, 12 Jun 1997 04:55:04 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/75a0233f39d931c2d8cb7222b62edfc14926049d43ed2cd633f6ec1e2520ed20) -<EMAIL_ADDRESS>            + 1997-06-12 (Thu, 12 Jun 1997 12:18:53 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/01c025f34d2860ac0198c137139396b5f29051b75882b0ff4447c2626dc02a62) - _Steve Schear<EMAIL_ADDRESS>            + 1997-06-12 (Thu, 12 Jun 1997 13:19:27 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/e2d572dfb9a9cb82dead184e7c3ae7425da6fa3d3066f62517d4c7e30a337b3f) - _Kent Crispin<EMAIL_ADDRESS>              + 1997-06-12 (Thu, 12 Jun 1997 21:33:03 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/6d10db7019f01aff15d344d3bb8108d51b1ec9456eb0306d3ca002825b795a6d) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
            + 1997-06-13 (Fri, 13 Jun 1997 23:38:20 +0800) - [Re: Thoughtcrime   (Re: My War)](/archive/1997/06/a311064563b6adaf0c664ace4ac4d8a2f96daf701a5358a05acf133157278521) - _Steve Schear<EMAIL_ADDRESS>      + 1997-06-09 (Tue, 10 Jun 1997 06:09:21 +0800) - [Thoughtcrime   (Re: My War)](/archive/1997/06/5b33aac0380e988627f681e60985b305fda8579ced69e12dca38e9ec088cbe5e) - _Tim May<EMAIL_ADDRESS>  + 1997-06-09 (Tue, 10 Jun 1997 00:16:22 +0800) - [Re: My War](/archive/1997/06/bae9bdba0fce4a912b9807623c5c0a153ecdf0ce3d8246b8a5209a2dff1718d4) - _Eric Cordian<EMAIL_ADDRESS>  + 1997-06-10 (Wed, 11 Jun 1997 03:02:30 +0800) - [Re: My War](/archive/1997/06/7234b3286c9a70e29e92856db925cc134490c4748178fb585c4e8b3ac3493f44) -<EMAIL_ADDRESS>


text:
# We Were Kids

3D war game seen by kids imagination. Global Game Jam 6 (2019).

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Cloning

```
$ git clone https://github.com/msuliborski/we-were-kids
```

### Building

Using Unity Game Engine import project and hit play button. It should do everything automatically and let you run the game.

## Built with

* [Unity](https://unity.com/) - The world’s leading
real-time creation platform

## Authors

* **Michał Suliborski** - [msuliborski](https://github.com/msuliborski)
* **Jędrzej Szor** - [jedrekszor](https://github.com/jedrekszor)
* **Michał Kuśmidrowicz** - [ninjarlz](https://github.com/ninjarlz)
* **Olga Kardas** - [OlgaKar](https://github.com/OlgaKar)
* **Hanna Paluszkiewicz**

## License

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

repository: ninjarlz/we-were-kids

repo_name: ninjarlz/we-were-kids


text:
---
layout: post
title:      "Rails Project - Nested Resources"
date:       2021-06-07 16:18:05 -0400
permalink:  rails_project_-_nested_resources
---

The ‘resources’ syntax in Rails is a useful way to generate each of the CRUD routes. It will create all 7 routes for our actions (index, create, new, edit, update, show, destroy).

Nested routes/ resources are a good way of representing a belongs to and has many relationships in Rails. I struggled with nested resources during the lessons and labs at Flatiron, so I decided to write my blog post for my Rails project on how I implemented the nested resources inot my application.

For my Rails project I created a Restaurant Review website. A user can sign up/ log in, add restaurants and review any of the restaurants (created by them or others). For the nested resource for my project, I thought the perfect scenario would be to be able to view all the reviews for a particular restaurant. Since Restaurants has_many :reviews and a review belongs_to :restaurant, a review is technically considered the child object to a restaurant so it will be the nested resource under the restaurant. The code in my routes file looks like this:

  Rails.application.routes.draw do

      resources :reviews

       resources :restaurants do
	           resources :reviews, only: [:new, :index]
       end

   end

Notice we have the nested routes for :reviews under restaurants, but then we also have the regurlar :reviews routes outside of the nested so people can still edit, create and view reviews outside of the context of the specific restaurant.

The route that I will use for this nested resource would be:

`Restaurant_reviews	 GET 	/restaurants/: restaurant_id/reviews        	reviews#index`

And when were writing the link, our URI helper needs to take in a specific restaurant as an argument, so it would be something like this:

     ** Restaurant_reviews_path(@restaurant) **

Then in my reviews controller I made a conditional to account for whether the user is trying to see all of the reviews, or all the reviews for a particular restaurant:

```
    def index;
        if params[:restaurant_id]  ;
              @restaurant = Restaurant.find_by_id(params[:restaurant_id]);
              @reviews = @restaurant.reviews;
        else    ;
            @reviews = Review.all;
        end;
    end;
```

So if the restaurant_id is in the params, it finds all the reviews for that restaurant. Otherwise it just lists all the reviews that are saved in the database.

I definitely feel more comfortable on this topic after doing some extra research and writing this blog post on it, so I am going to try to do the same for future topics that are confusing to me at first. Happy coding 😊

extension: markdown


text:
# How To Set Up Environment for Development

A. Install required software:
1. [PhantomJS](http://phantomjs.org/) headless web browser for testing. If you use ```sudo apt-get install``` or ```brew install```, be sure the resulting version installed is >=1.9.7. Older versions may not include the GhostDriver Remote WebDriver required for working with Selenium.
2. [ImageMagick](http://www.imagemagick.org/) for comparing screenshots during development against last known good screenshots for testing.
3. [Node.js](http://nodejs.org/download/)
4. [Phash dependencies](https://github.com/aaronm67/node-phash)
B. When software is installed, open a terminal and enter the following commands:

```
$ git clone git@github.com:wikipathways/pathvisiojs.git #gets pathvisiojs source code
$ cd pathvisiojs/
$ npm update && npm install #uses npm (the node package manager) to install pathvisiojs dependencies
$ bower update && bower install #installs non-npm JS dependencies
```

C. Leave the [Selenium](http://docs.seleniumhq.org/) server terminal window open and running. Selenium is a web browser automation platform that tests the pathvisiojs code to ensure it works. Open a second terminal window and enter the following command:

repository: wikipathways/kaavio

repo_name: wikipathways/kaavio


text:
# ShipIt to Marketplace for Atlassian Bamboo

![Travis build status](https://travis-ci.org/mibexsoftware/shipit2marketplace.svg?branch=master)

*Ship your p2 apps to the Atlassian Marketplace with one click*

*Presented at the AtlasCamp 2016 in Barcelona*

**Available on the [Atlassian Marketplace](https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.shipit2mpac/server/overview)**

## About

This Bamboo task creates new versions of your Atlassian apps by uploading the app's JAR file to the Atlassian Marketplace
and by providing all necessary information for a new app version like release notes, build number, etc. automatically.
It supports two ways of creating new app versions:

1. You create a release with a new build from the JIRA release panel
2. You push new commits to a branch (e.g., master) or trigger a Bamboo build manually

For both use cases this app collects the necessary information like the release version, the name and the summary
from the associated JIRA version. This means that you don't have to supply all the information for a new Marketplace
version of your app manually, but instead this Bamboo task is able to do it for you. It also creates
release notes based on the JIRA issues associated with a JIRA project version.

All you need to do is to add this Bamboo task to your build and configure it as follows:

![Screenshot Bamboo task configuration](doc/task-config.png)

Then, create a release with a new build in JIRA:

![Screenshot of how to trigger a release in JIRA](doc/release-from-jira.png)

Or push some code to the branch that is tracked by a Bamboo plan. This creates a new plug-in version in the Atlassian Marketplace:

![New Marketplace version](doc/marketplace-version.png)

This Bamboo task also supports deployment projects (but it doesn't support remote agents yet). It can also create a
server as well as a datacenter app version from the same JAR.

## Installation

Download and install the ap from the [Atlassian Marketplace](https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.shipit2mpac/server/overview).

## Configuration

The Bamboo tasks configuration can be overridden by the following plan variables:

* shipit2mpac.jiraversion
* shipit2mpac.buildnr
* shipit2mpac.datacenter.buildnr
* shipit2mpac.release.notes
* shipit2mpac.release.summary
* shipit2mpac.plugin.base.version

Overriding the build number is useful if you do not want the app to deduce the build
number from the app's version number (e. g., an app's version 1.2.3 results in the deduced build number 100200300 for
server and 100200300 for datacenter).
To override this behaviour, just pass the build variable `shipit2mpac.buildnr` and `shipit2mpac.datacenter.buildnr`
from the JIRA release dialog or from the Bamboo manual build trigger dialog:

![Screenshot Bamboo variable to override the build number](doc/build-variable.png)

Overriding the release summary and release notes can be useful if you don't want to take the summary from the JIRA
version description and the deduced release notes from the resolved JIRA issues.

The app uses the last published app version with the highest build number as the base version for the new Marketplace
submission. This means that version-specific content like application compatibility is copied from that base version to the
newly created app version. If you want to use a different app version as your base version, you can override the
described behaviour with the Bamboo variable `shipit2mpac.plugin.base.version`.

The Bamboo task requires that you configure an artifact to deploy as your new app version.
See [this Atlassian page](https://confluence.atlassian.com/display/BAMBOO058/Sharing+artifacts) on how to achieve this.

gha_language: Scala


text:
# outliersTests

<!-- badges: start -->
[![Travis build status](https://travis-ci.org/linas-p/outliersTests.svg?branch=master)](https://travis-ci.org/linas-p/outliersTests)

<!-- badges: end -->

The R package for test proposed in article [Multiple outlier detection tests for parametric models](https://www.mdpi.com/2227-7390/8/12/2156).

The purpose of outliersTests is to provide statistical tests for absence of outliers hypothesis for various location-scale families of  distributions and give procedures for outlier identification when the hypothesis is rejected.  Normal, logistic, Cauchy, Laplace, Gumbel families are included. In the case of shape-scale families such as Weibull, lognormal or  loglogistic it is sufficient to take logarithms of observations and apply all procedures for Gumbel, normal or logistic families, respectively.

Key features:

* The most important functions: `bp_test`, `get_robust_estimates`.

## Installation

To get the current development version from github:

```R
# install.packages("devtools")
devtools::install_github("linas-p/outliersTests")
library(outliersTests)
```

## Usage

Most simple usage just call method `bp_test`:

```R
bp_test(example1, alternative = "greater", pvalue = TRUE)

```

For specified data more parameters can be indicated:

```R
set.seed(12)
x <- rcauchy(100)
ks.test(x, "pcauchy") # check cauchy distribution
x[12:22] <- 500
ks.test(x, "pcauchy") # check cauchy, not cauchy data
bp <- bp_test(x, alternative = "greater", distribution = "cauchy", pvalue = TRUE)
bp
x_after <- x[!bp$outlier]
ks.test(x_after, "pcauchy") # check cauchy, after outliers removal data cauchy again
```

The documentation of the usage is accesible as:

```R
?outliersTests # main description of package
?bp_test # documentation for the usage of the BP test
```

Most simple usage for regression just call method `BP_regression_test`:

```R
set.seed(12)
x <- 1:100
y <- 2 + 2*x + rnorm(100)
y[2:5] <- 10

estimates <- get_betas(x, y)
estimates

BP_regression_test(estimates$ri)

```

## Cite:

    Bagdonavičius, V.; Petkevičius, L. Multiple Outlier Detection Tests for Parametric Models. Mathematics 2020, 8, 2156.

    Bagdonavičius, V., & Petkevičius, L. (2020). A new multiple outliers identification method in linear regression. Metrika, 83(3), 275-296.

or

     @article{bagdonaviciusmulti2020,
        title={Multiple Outlier Detection Tests for Parametric Models},
        author={Bagdonavičius, Vilijandas and Petkevičius, Linas},
        journal={Mathematics},
        volume={8},
        number={12},
        pages={2156},
        year={2020},
        publisher={Multidisciplinary Digital Publishing Institute}
      }

      @article{bagdonavivcius2020new,
        title={A new multiple outliers identification method in linear regression},
        author={Bagdonavi{\v{c}}ius, Vilijandas and Petkevi{\v{c}}ius, Linas},
        journal={Metrika},
        volume={83},
        number={3},
        pages={275--296},
        year={2020},
        publisher={Springer}
      }

repository: linas-p/outliersTests

repo_name: linas-p/outliersTests


text:
# docker-setup

Docker compose setup for the platform

## Setup

```bash
git clone https://github.com/cuttle-ai/docker-setup
cd docker-setup
cp sample.env .env
ssh-keygen
cp ~/.ssh/id_rsa id_rsa
cp ~/.ssh/id_rsa.pub id_rsa.pub
```

Update the google client id and secret in the `.env` file.

For the first time run the following command to build and start the platform

```bash
sh setup.sh
```

Once setup, the platform can be started by running the following command

```bash
sh start.sh
```

repository: cuttle-ai/docker-setup

repo_name: cuttle-ai/docker-setup


text:
# pysyslogclient

Syslog client for Python 3 (RFC 3164/5424) for UNIX and Windows

## Description

Syslog client following

* RFC3164 (https://www.ietf.org/rfc/rfc3164.txt)
* RFC5424 (https://www.ietf.org/rfc/rfc5424.txt)

with UNIX and Windows support. TCP and UDP transport is possible.

If TCP is used, on every log message, that is send to the specified server,
and a connection error occured, the message will be dismissed and
a reconnect will be tried for the next message.

## Usage

A small CLI client is implemented in *client.py*. To call it, run

```
python -m pysyslogclient.cli
```

### Startup client

To setup the client for RFC 5424 over TCP to send to SERVER:PORT:

```
import pysyslogclient
client = pysyslogclient.SyslogClientRFC5424(SERVER, PORT, proto="TCP")
```

or for RFC3164:

```
import SyslogClient
client = pysyslogclient.SyslogClientRFC3164(SERVER, PORT, proto="TCP")
```

### Log a messsage

Log the message "Hello syslog server" with standard severity *INFO* as facility
*USER*. As program name *SyslogClient* the PID of the called python interpreter
is used.

```
client.log("Hello syslog server")

```

To specify more options, call log with more arguments. For example to log a
the message as program *Logger* with PID *1* as facility *SYSTEM* with severity
*EMERGENCY*, call log the following way:

```
client.log("Hello syslog server",
	facility=pysyslogclient.FAC_SYSTEM,
	severity=pysyslogclient.SEV_EMERGENCY,
	program="Logger",
	pid=1)
```

### Shutdown

To disconnect, call

```
client.close()
```

repository: scottpeterman/pysyslogclient

repo_name: scottpeterman/pysyslogclient


text:
# NAME

HTML::SocialMeta - Module to generate Social Media Meta Tags,

# VERSION

Version 0.5\_1

# SYNOPSIS

    use HTML::SocialMeta;
    # summary or featured image card setup
    my $social = HTML::SocialMeta->new(
        site => '',
        site_name => '',
        title => '',
        description => '',
        image   => '',
        fb_app_id => '',
        url  => '',  # optional
        ... => '',
        ... => '',
    );

    # returns meta tags for all providers
    # additional options 'featured_image',  'app', 'player'
    my $meta_tags = $social->create('summary');

    # returns meta tags specificly for a single provider
    my $twitter_tags = $social->twitter;
    my $opengraph_tags = $social->opengraph;

    my $twitter = $social->twitter;
    my $twitter->create('summary');

    # Alternatively call a card directly
    my $summary_card = $meta_tags->twitter->create_summary;

    ....
    # You then need to insert these meta tags in the head of your html,
    # one way of implementing this if you are using Catalyst and Template Toolkit would be ..

    # controller
    $c->stash->{meta_tags} = $meta_tags;

    # template
    [% meta_tags | html %]

# DESCRIPTION

This module generates social meta tags.

i.e  $social->create('summary') will generate:

    <meta name="twitter:card" content="summary"/>
    <meta name="twitter:site" content="@example_twitter"/>
    <meta name="twitter:title" content="You can have any title you wish here"/>
    <meta name="twitter:description" content="Description goes here may have to do a little validation"/>
    <meta name="twitter:image" content="www.urltoimage.com/blah.jpg"/>
    <meta property="og:type" content="thumbnail"/>
    <meta property="og:title" content="You can have any title you wish here"/>
    <meta property="og:description" content="Description goes here may have to do a little validation"/>
    <meta property="og:url" content="www.someurl.com"/>
    <meta property="og:image" content="www.urltoimage.com/blah.jpg"/>
    <meta property="og:site_name" content="Example Site, anything"/>
    <meta property="fb:app_id" content="123433223543"/>'

It allows you to optimize sharing on several social media platforms such as Twitter, Facebook, Google+
and Pinerest by defining exactly how titles, descriptions, images and more appear in social streams.

It generates all the required META data for the following Providers:

    * Twitter
    * OpenGraph

This module currently allows you to generate the following meta cards:

    $social->create()  $twitter->create_       $opengraph->create_
    summary            summary                 thumbnail
    featured_image     summary_large_image     article
    player             player                  video
    app                app                     product

# SUBROUTINES/METHODS

## Constructor

Returns an instance of this class. Requires `$url` as an argument;

- card

    OPTIONAL - if you always want the same card type you can set it

- site

    The Twitter @username the card should be attributed to. Required for Twitter Card analytics.

- site\_name

    This is Used by Facebook, you can just set it as your organisations name.

- title

    The title of your content as it should appear in the card

- description

    A description of the content in a maximum of 200 characters

- image

    A URL to a unique image representing the content of the page

- url

    OPTIONAL OPENGRAPH - allows you to specify an alternative url link you want the reader to be redirected

- player

    HTTPS URL to iframe player. This must be a HTTPS URL which does not generate active mixed content warnings in a web browser

- player\_width

    Width of IFRAME specified in twitter:player in pixels

- player\_height

    Height of IFRAME specified in twitter:player in pixels

- operating\_system

    IOS or Android

- app\_country

    UK/US ect

- app\_name

    The applications name

- app\_id

    String value, and should be the numeric representation of your app ID in the App Store (.i.e. 307234931)

- app\_url

    Application store url - direct link to App store page

- fb\_app\_id

    This field is required to use social meta with facebook, you must register your website/app/company with facebook.
    They will then provide you with a unique app\_id.

## Summary Card

The Summary Card can be used for many kinds of web content, from blog posts and news articles, to products and restaurants.
It is designed to give the reader a preview of the content before clicking through to your website.

    ,-----------------------------------,
    |   TITLE                 *-------* |
    |                         |       | |
    |   DESCRIPTION           |       | |
    |                         *-------* |
    *-----------------------------------*

Returns an instance for the summary card:

    $meta->create('summary');
    # call meta provider specifically
    $card->twitter->create_summary;
    $card->opengraph->create_thumbnail;

fields required:

    * card
    * site_name - OpenGraph
    * site - Twitter Site
    * title
    * description
    * image

## Featured Image Card

The Featured Image Card features a large, full-width prominent image.
It is designed to give the reader a rich photo experience, clicking on the image brings the user to your website.

    ,-----------------------------------,
    | *-------------------------------* |
    | |                               | |
    | |                               | |
    | |                               | |
    | |                               | |
    | |                               | |
    | |                               | |
    | *-------------------------------* |
    |  TITLE                            |
    |  DESCRIPTION                      |
    *-----------------------------------*

Returns an instance for the featured image card:

    $card->create('featured_image');
    # call meta provider specifically
    $card->twitter->create_featured_image;
    $card->opengraph->create_article;

Fields Required:

    * card - Twitter
    * site - Twitter
    * site_name  - Open Graph
    * creator - Twitter
    * title
    * image
    * url - Open Graph

## Player Card

The Player Card allows you to share Video clips and audio stream.

    ,-----------------------------------,
    | Title                             |
    | link                              |
    | *-------------------------------* |
    | |                               | |
    | |                               | |
    | |                               | |
    | |            <play>             | |
    | |                               | |
    | |                               | |
    | *-------------------------------* |
    *-----------------------------------*

Returns an instance for the player card:

    $card->create('player');
    # call meta provider specifically
    $card->twitter->create_player;
    $card->opengraph->create_video;

Fields Required:

    * site
    * title
    * description
    * image
    * player
    * player_width
    * player_height

image to be displayed in place of the player on platforms that does not support iframes or inline players. You should make this image the same dimensions
as your player. Images with fewer than 68,600 pixels (a 262 x 262 square image, or a 350 x 196 16:9 image) will cause the player card not to render.
Image must be less than 1MB in size

## App Card

The App Card is a great way to represent mobile applications on Social Media Platforms and to drive installs.

    ,-----------------------------------,
    |   APP NAME              *-------* |
    |   APP INFO              |  app  | |
    |                         | image | |
    |                         *-------* |
    |   DESCRIPTION                     |
    *-----------------------------------*

Return an instance for the provider specific app card:

    $card->create('app);
    # call meta provider specifically
    $card->twitter->create_app;
    $card->opengraph->create_product;

Fields Required

    * site
    * title
    * description
    * operatingSystem
    * app_country
    * app_name
    * app_id
    * app_url

## create

Create the Meta Tags - this returns the meta information for all the providers:

    * Twitter
    * OpenGraph
    * Google

You just need to specify the card type on create

    #'summary', 'featured_image', 'app', 'player'
    $social->create('summary');

## required\_fields

Returns a list of fields that are required to build the meta tags

    $social = HTML->SocialMeta->new();
    # @fields = qw{}
    my @fields = $social->required_fields('summary');

# BUGS AND LIMITATIONS

Please report any bugs at http://rt.cpan.org/.

Add support for Schema.org Rich Snippets
Improve Unit Tests
Add support for additional card types

# DEPENDENCIES

Moose - Version 2.0604
Namespace::Autoclean - Verstion 0.15
List::MoreUtils - Version 0.413

# DIAGNOSTICS

A. Twitter Validation Tool

https://dev.twitter.com/docs/cards/validation/validator

Before your cards show on Twitter, you must first have your domain approved. Fortunately,
it's a super-easy process. After you implement your cards, simply enter your sample URL into
the validation tool. After checking your markup, select the "Submit for Approval" button.

B. Facebook Debugger

https://developers.facebook.com/tools/debug

You do not need prior approval for your meta information to show on Facebook,
but the debugging tool they offer gives you a wealth of information about all your
tags and can also analyze your Twitter tags.

C. Google Structured Data Testing Tool

http://www.google.com/webmasters/tools/richsnippets

Webmasters traditionally use the structured data testing tool to test authorship markup and preview
how snippets will appear in search results, but you can also use see what other types of
meta data Google is able to extract from each page.

# AUTHOR

Robert Acock<EMAIL_ADDRESS>Robert Haliday<EMAIL_ADDRESS>
# CONFIGURATION AND ENVIRONMENT

# INCOMPATIBILITIES

# LICENSE AND COPYRIGHT

Copyright 2015 Robert Acock.

This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:

[http://www.perlfoundation.org/artistic\_license\_2\_0](http://www.perlfoundation.org/artistic_license_2_0)

Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the
Package. If you institute patent litigation (including a cross-claim or
counterclaim) against any party alleging that the Package constitutes
direct or contributory patent infringement, then this Artistic License
to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
 UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.