text:
Schemium
==============
Build Command Line Interface applications on a simple way.

## Instalation
    $ npm install schemium -g

## Usage (`--help`)
    Usage: schemium <command> [<option>]

    command, c        add a new command

    init, i           Create a new CLI project
    --path, -p        path to create

    project, p        projects
    --use, -u
    --list, -ls
    --add, -a
    --remove, -rm

## Roadmap
```
    scm init --name "shooter-cli"
    scm command --add "add" --template "prompt"
    scm command --add "list" --template "list"
    scm command --add "fire"
    scm publish

    scm init --name "angularjs-cli"
    scm command --add "init"
    scm command --add "add" --template "prompt"
    scm publish

    scm init --name "uimmer-cli"
    scm module --add **
    scm module --add **/frontend
    scm add scm-angularjs@brab0:ng
    scm remove scm-angularjs
    my-cli new@ng --template "blank"
    my-cli ng:add --module "sample" --test --service --controller --view
    my-cli console ng
    my-cli@ng> add  --module "sample"
```

## License
```
MIT License

Copyright (c) 2017 Rodrigo Brabo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

```


text:
# ThumbGen

[![CI Status](https://img.shields.io/travis/michaelCfrick/ThumbGen.svg?style=flat)](https://travis-ci.org/michaelCfrick/ThumbGen)
[![Version](https://img.shields.io/cocoapods/v/ThumbGen.svg?style=flat)](https://cocoapods.org/pods/ThumbGen)
[![License](https://img.shields.io/cocoapods/l/ThumbGen.svg?style=flat)](https://cocoapods.org/pods/ThumbGen)
[![Platform](https://img.shields.io/cocoapods/p/ThumbGen.svg?style=flat)](https://cocoapods.org/pods/ThumbGen)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

ThumbGen is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'ThumbGen'
```

## Author

michaelCfrick<EMAIL_ADDRESS>
## License

ThumbGen is available under the MIT license. See the LICENSE file for more info.

license: MIT

repository: MiChrFri/ThumbGen

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: MiChrFri/ThumbGen


text:
# Real World Example

This example extends [Redux's Real World example](https://github.com/reactjs/redux/tree/master/examples/real-world) to create many of the components as isolated redux component.

```sh
git clone https://github.com/ioof-holdings/redux-dynostore.git

cd redux-subspace/examples/real-world
npm install
npm start
```

Or check out the [sandbox](https://codesandbox.io/s/github/ioof-holdings/redux-dynostore/tree/master/examples/real-world).

repository: ioof-holdings/redux-dynostore

gha_language: JavaScript

repo_name: ioof-holdings/redux-dynostore


text:
//[kaspresso](../index.md)/[com.kaspersky.kaspresso.device.apps](index.md)

# Package com.kaspersky.kaspresso.device.apps

## Types

|  Name|  Summary|
|---|---|
| [Apps](-apps/index.md)| [androidJvm]
Brief description

The interface to work with installer, launcher and package manager.

Required: Started AdbServer     1. Download a file "kaspresso/artifacts/adbserver-desktop.jar"     2. Start AdbServer => input in cmd "java jar path_to_file/adbserver-desktop.jar" Methods demanding to use AdbServer in the default implementation of this interface are marked.     But nobody can't deprecate you to write implementation that doesn't require AdbServer.

Content
interface [Apps](-apps/index.md)

| [AppsImpl](-apps-impl/index.md)| [androidJvm]
Brief description

The implementation of the [Apps](-apps/index.md) interface.

Content
class [AppsImpl](-apps-impl/index.md)(**logger**: [UiTestLogger](../com.kaspersky.kaspresso.logger/-ui-test-logger/index.md), **context**: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), **uiDevice**: UiDevice, **adbServer**: [AdbServer](../com.kaspersky.kaspresso.device.server/-adb-server/index.md)) : [Apps](-apps/index.md)


text:
# Hooks

Rect hooks for Lido Finance projects.
Part of [Lido UI Components](https://github.com/lidofinance/ui/#readme)

## Install

```bash
yarn add @lidofinance/hooks
```

## Usage

```ts
import { useMergeRefs } from '@lidofinance/hooks'
```

Check out our Storybook at [https://ui.lido.fi](https://ui.lido.fi)

repository: andrewriveradev/ui

branch_name: refs/heads/main

repo_name: andrewriveradev/ui


text:
Dryad Documentation
======================

Dryad's basic documentation philosophy includes 4 levels of
visibility:
1. "Very" public documents -- High-level descriptions and information, on the [Main Dryad website](https://datadryad.org)
2. Public documentation -- Technical documents and other details about dryad. Stored in Github, usually within [this directory](https://github.com/CDL-Dryad/dryad-app/tree/main/documentation)
3. Private documentation -- Internal details, for Dryad staff. Stored in [CDL's Confluence](https://confluence.ucop.edu/display/Stash/Dryad+Developer+Corner)
4. Private working documents -- Documents that are edited frequently. Stored in Dryad's Google Dive.

# Dryad Technical Introductory Notes

## Demo Instance of Dryad

Our demo instance of Dryad is available at [https://dryad-stg.cdlib.org](https://dryad-stg.cdlib.org) and you may submit and test freely.

## Github Repositories & Similar

* The main application for Dryad is at [https://github.com/CDL-Dryad/dryad-app](https://github.com/CDL-Dryad/dryad-app) with minor customizations and configuration for an installation.

    * The stash_engine and stash_datacite modules hold most of the code for the user interface.

    * The stash_api module is where we've implemented our API.

    * The stash_discovery module is a relatively thin wrapper and customization around Geoblacklight.

``    * The repository contains some other libraries/gems for things such as Merritt deposits or harvesting.

## Documentation

* We have an [installation guide](dryad_install.md) for installing the user-interface part of Dryad along with some of the basic depedencies.

* A basic generalized introduction to Dryad's architecture is
  available at https://datadryad.org/stash/our_platform .

* [API documentation and specification](https://datadryad.org/stash/api) and [API READMEs](apis)

* A (somewhat dated) database [Entity-Relationship diagram](other_files/dash_er_2018-06.pdf).

    * Note most things are related to stash_engine_resources if you have trouble following all the lines.  stash_engine_identifiers has many resources.

    * "dcs" means DataCite Schema

* [Dataset submission flow](submission_flow.md), one of our longest and more complicated flows.  (Login is also somewhat complicated, but people don’t spend a lot of time doing it.)

* The UI Library from the UX team and how to integrate CSS and major UI changes into the Dash application.  https://github.com/CDL-Dryad/dryad-app/blob/main/ui-library/README.md

* Please see [how to set up and run tests locally](local_testing_setup.md) so you can add tests and run current tests to be sure nothing breaks.

## Merritt

Dryad uses Merritt to store and manage the individual files associated
with each dataset.

* [Merritt Architecture](https://github.com/CDLUC3/mrt-doc/wiki/Architecture)

* [Merritt’s low-level storage](https://github.com/CDLUC3/mrt-doc/wiki/Storage)

## Development Process

* Development progress is tracked in the [GitHub CDL-Dryad Development Tracker](https://github.com/CDL-Dryad/dryad-product-roadmap/projects)

repository: CDL-Dryad/dryad-app

gha_language: Ruby

gha_license_id: MIT

repo_name: CDL-Dryad/dryad-app


text:
---
layout: post
title: "Barcamp Hanoi 2 will come soon :)"
author: hoatle
date: 2009-02-20 08:11
comments: true
categories:
    - "en"
tags:
    - "Barcamp Hanoi"
cover:
description:
keywords:
published: true
---

Hi everyone,

To tell the truth, I'm a little envious of some HCM city (Saigon) geeks' activities, especially about Barcamp Saigon 1 and their #H3 :(. What about in Hanoi? Just correct me if I'm wrong but it seem there
hasn't been any such interesting events in Hanoi. Here I just want to mention and introduce Barcamp Hanoi 2. You can just google some keyworks orderly to get info: barcamp to have general ideas about what is barcamp, barcampsaigon to know what Saigon geeks did to complete the task of organizing barcamp saigon 1. Then the last keywork is barcamphanoi to know more about Barcamp Hanoi organization status :). And then I will call for organizers + volunteers + participants + some more other things :)

<!-- more -->

Firstly, about Barcamp Hanoi 2. Why 2? Good question :P, do you know that Barcamp Hanoi 1 was first organized in Vietnam, esp. in Hanoi :). Just check this: http://blog.exoplatform.org/2007/12/28/barcamp-hanoi/ So, Barcamp Hanoi 1 was organized by eXo employees (esp. by jeremi) just in internal eXo Platform SEA employees. And Now we (Hanoi geeks, bloggers, volunteers...) are organizing Barcamp Hanoi 2.

After the great success of Barcamp Saigon 1, some efforts to organize Barcamp Hanoi 2
started but in slow progress. Sometime it was supposed to happen before Tet holiday, then just some weeks after Tet holiday. But now we're still preparing for it and the progress is very fast. This post is also
for the purpose of preparation for Barcamp Hanoi 2. Please just check out what is happening in
Barcamp Hanoi 2 organization: http://groups.google.com.vn/group/barcamphanoi?hl=en.
So here I'm calling for organizers for Barcamp Hanoi 2 :). It's open to everyone :). Now the number of organizers can not be counted more than 10 and there are many things to do. Some points just remember: Just join in organizer team when you have passionation + know the spirit of barcamp :). Some volunteers needed for doing other things like food-prepare (don't worry, you do not have to cook any meal :P),
T-shirt design (for designers), sponsorship for persuasive speakers and many other things you can do for Barcamp Hanoi 2.

To participants: Know about barcamp spirit, know about barcamp rules, huh :P. No audience (exept for volunteers), just participants: think about what you will share for Barcamp Hanoi 2 (IT based topic),
and what topics you're interesting. We will have some forms to get info soon. We will make Barcamp Hanoi 2 as great and relaxed as possible. If too many people will go for registering Barcamp Hanoi 2, we will have
to filter out out some people :( because of time + venue + other problems.

- Some expectations:

    + What: call it Barcamp Hanoi 2 ;)
    + When: April 12 (supposed)
    + Where: RMIT Hanoi or Genetic BK or other?
    + Who: any one interested in joining barcamp, participants but not audience :)
    + How many people there: About 200 geeks. So think about some interesting topics to have your seat at Barcamp Hanoi 2. The seats are limited :)
    + official tag for Barcamp Hanoi 2: barcamphanoi
    + official website for Barcamp Hanoi 2 will be updated soon, just check it here http://barcamphanoi.org
    + Twitter to follow: http://twitter.com/barcamphanoi

Links:

- Google group for organizers: http://groups.google.com.vn/group/barcamphanoi?hl=en (English)

Hey, it's time for us to join Barcamp Hanoi 2. What you are waiting for? Spread the world about this event is a resprectedly helpful action.

Just ping some of us here to get more info:

1. Hoat Le (http://hoatle.net)

email: hoatlevan at gmail dot com

yahoo: wild_tiger8607

skype: hoatlevan

twitter: http://twitter.com/hoatle

Thanks for reading :)

extension: markdown


text:
## Docker images

| image | cloning image | description |
|---|---|---|
| [aws](./aws/Dockerfile) | `docker pull aplazame/alpine:aws` | includes `awscli` |
| [node](./node/Dockerfile) | `docker pull aplazame/alpine:node` | `FROM node:10-alpine` includes bash, git, curl, rsync, make, ssh |
| [python](./python/Dockerfile) | `docker pull aplazame/alpine:python` | includes `python3` |
| [rsync](./rsync/Dockerfile) | `docker pull aplazame/alpine:rsync` | just includes bash, ssh and rsync |
| [terraform](./terraform/Dockerfile) | `docker pull aplazame/alpine:terraform` | includes `terraform` |
| [packer](./packer/Dockerfile) | `docker pull aplazame/packer:version` | includes `packer` |
| [packer](./aws-nuke/Dockerfile) | `docker pull aplazame/aws-nuke:version` | includes `aws-nuke` |

These docker images are being published in [Docker HUB](https://hub.docker.com/r/aplazame/alpine)

Docker Hub is set up for automatically create new images when a semver tag is created in [github releases](./releases)

## CircleCI Orbs

Orbs is a system that CircleCi has for share jobs, commands, and executors across different repositories.

#### Aplazame Orbs

| orb name | description |
|---|---|
| [aplazame/s3](https://circleci.com/orbs/registry/orb/aplazame/s3) | provides jobs and commands for deploying to s3 using docker image `aplazame/alpine:aws` |
| [aplazame/rsync](https://circleci.com/orbs/registry/orb/aplazame/rsync) | provides jobs and commands for deploying via rsync using docker image `aplazame/alpine:rsync` |

#### CircleCI CLI Tool Installation

> Run this command for a [quick installation](https://circleci.com/docs/2.0/local-cli/#quick-installation)
>
> also check [alternative installation methods](https://circleci.com/docs/2.0/local-cli/#alternative-installation-methods)

``` sh
curl -fLSs https://circle.ci/cli | bash
```

#### Validate Orbs

```
make validate-orbs

# this runs
# circleci orb validate ./circle-orbs/s3.yml
# circleci orb validate ./circle-orbs/rsync.yml
```

#### Publishing Orbs

Create a personal access token in: https://circleci.com/account/api

> Requires using a valid CIRCLECI_CLI_TOKEN
> CIRCLECI_CLI_TOKEN environment variable is not required when [CircleCI CLI Tool Setup](#circleci-cli-tool-setup)

``` sh
make publish-orbs CIRCLECI_CLI_TOKEN=a098a098...
```

> Increasing minor or mayor version

``` sh
# for minor
make publish-orbs ORB_VERSION=minor CIRCLECI_CLI_TOKEN=a098a098...

# for mayor
make publish-orbs ORB_VERSION=mayor CIRCLECI_CLI_TOKEN=a098a098...
```

#### CircleCI CLI Tool Setup

```
circleci setup
```

![image](https://user-images.githubusercontent.com/2305833/74728531-3a24d400-5243-11ea-8c39-2cef53f2d9fc.png)

repository: aplazame/docker-alpine

gha_language: Smarty

repo_name: aplazame/docker-alpine


text:
![gulp-beer](https://raw.githubusercontent.com/lordgiotto/gulp-beer/master/assets/logo.png)

**gulp-beer**: better error reporting.

gulp-beer is a simple error handler function that provides some extra features:

- **Interactive System Notification** (thanks to [node-notifier](https://github.com/mikaelbr/node-notifier))
- **Custom Server for Errors** (opened on notification click) that display all your errors in a more pleasent and straightforward way.

**Interactive System Notification**
![system notification](https://raw.githubusercontent.com/lordgiotto/gulp-beer/master/assets/screens/notification.png)

**Custom Server for Errors**
![error server](https://raw.githubusercontent.com/lordgiotto/gulp-beer/master/assets/screens/server.png)

## Installation

```
$ npm install --save-dev gulp-beer
```

## Usage

Require gulp-beer in your *gulpfile.js*:

```js
var gulpBeer = require('gulp-beer');
```

than simply pass required function as error handler function wherever you like:

```js
gulp.src('*')
  // stream error
  .on('error', gulpBeer)
  // Plumber
  .pipe(plumber({errorHandler: gulpBeer}))
  // Other error listener
  .pipe(sass().on('error', gulpBeer))
```

You can also call it manually if an error object must be handled

```js
var customFunction(err, result) {
  if (err) gulpBeer(err);
}
```

## (!!) Start error server (!!)

Since error server prevents the gulp process to finish, it has to be started manually when needed (usually when performing a watching task).

Error Handler function expose the server object, so you can do:

```js
gulpBeer.server.start() // to start the error server
```

```js
gulpBeer.server.stop() // to stop the error server
```

A simple usage example:

```js
var gulp = require('gulp');
var gulpBeer = require('gulp-beer');
var plumber = require('gulp-plumber');
var sass = require('gulp-sass');

function build() {
	return gulp.src('./src/css/*.scss')
  		.pipe(plumber({errorHandler: gulpBeer}))
        .pipe(sass())
        .pipe(gulp.dest('./dist/css'));
}

gulp.task('build', build);
gulp.task('watch', function() {
    gulpBeer.server.start();
    gulp.watch('./src/css/*.scss', ['build']);
});

```

Otherwise, if you prefer start it automatically, take a look at the option server.autostart in the "customize handler" section.

## Customize Handler

If you like, you can customize the error handler function and the error server.

First of all require the custom module:

```js
var gulpBeerFactory = require('gulp-beer/custom');
```
This will return a factory for the error handler function, which accepts some options as first parameter.

```js
var errorHandler = gulpBeerFactory(options);
```

#### Options
---

`consoleError` [function] : the function that will be used to print the error in the console.

It receives the error object as first argument, decorated with a custom property:

  - `serverUrl` [string | false]: the link to the custom error server related to this specific error

---

`title` [string] Title of the system notification

---

`sound` [boolean | string] Notification sound as described [here](https://github.com/mikaelbr/node-notifier#cross-platform-advanced-usage)

---

`icon` [boolean | string] Notification sound as described [here](https://github.com/mikaelbr/node-notifier#cross-platform-advanced-usage)

---

`server` [object | false] Server configuration object. If `false` the server start will be prevented also if started manually.

Server configuration object accepts the following properties:

- `port` [number] : Port on which the server will listen
- `autostart` [boolean] : If true, the server will be started automatically
- `silent` [boolean] : Silents server console output

repository: lordgiotto/gulp-beer

repo_name: lordgiotto/gulp-beer


text:
---
layout: post
title:  "Markov Word Net?"
date:   2017-09-18 12:00:00 -0500
categories: journal
---
NLP research regularly utilizes lexical resources to impart some linguistic intelligence to software. See [Ignatow and Mihalcea, 2017](#references) (chapter 4) for a basic introduction. One very important resource is [WordNet](https://wordnet.princeton.edu/) and it's derived resources, such as [WordNet-Affect](http://wndomains.fbk.eu/wnaffect.html) and [SentiWordNet](http://sentiwordnet.isti.cnr.it/) ([GitHub repo here](https://github.com/kevincobain2000/sentiment_classifier)).

Text processing in NLP builds on raw text to create a more information-rich corpus. This enhanced corpus serves as a better foundation for analysis of a corpus. See [Ignatow and Mihalcea, 2017](#references) (chapter 5) for an introduction.

## WordNet

WordNet and it's related resources classify words in the English language according to synsets and relations. Each Synsets, or synonym set, is related to other synsets by relations. A few selected WordNet relations are listed below for relation *Y* of word *X*:

| Relation   | Part of Speech | Definition |
| ---------- | -------------- | ---------- |
| `Hypernym` | Noun & Verb    | Hypernym *Y* is a superset of *X*      |
| `Hyponym`  | Noun & Verb    | Hyponym *Y* is a subset of *X*         |
| `Troponym` | Verb           | Troponym *Y* is a means of doing *X*   |
| `Antonym`  | Adjective      | Antonym *Y* has opposite meaning of *X |

## Text Processing

There are several potentially useful resources for enhancing a corpus of tweets. **Part of speech tagging**, **syntactic parsing**, and **sentiment analysis** top the list.

There are many schemes for part of speech (POS) tagging. One of the more complex sets of tags comes from the [Penn TreeBank](http://repository.upenn.edu/cgi/viewcontent.cgi?article=1603&context=cis_reports). A POS tagger steps through a corpus and assigns tags from the tool's set to words/chunks/sentences in the corpus.

Syntactic parsing builds on a corpus to identify dependencies or sentence structure.

Semantic classification identifies the sentiment of a piece of text, for example if a tweet is happy or sad or mad.

*These 3 tools will be my focus of research for this week (17-23 Sept.)*

## Markov Probabilities

### WordNet

If it is possible to calculate transition-state probabilities for the transition from a given bigram or trigram to any word in the corpus, it should be possible to compute those transition probabilities at a hypernym level or whole synset level. Essentially, we could create a probabilistic representation of the kinds of things a corpus writes about.

### Text Processing

Similarly as for WordNet word classification, we should be able to describe the sentiment, syntactic structure and part-of-speech trends for an individual probabilistically using Markov chains.

Taken all together, Markov chains may have the potential to describe more than the transition properties between an n-gram window and the following word in a corpus. If we can describe both semantic **and** syntactic information in the corpus, maybe we can enforce grammatical construction on generated text while maintaining the sense of authorship.

#### References
Gabriel Ignatow and Rada Mihalcea. 2017. *Text mining: a guidebook for the social sciences*. SAGE, Los Angeles, 1st edition.

repository: andrew-pyle/msis-project

repo_name: andrew-pyle/msis-project


text:
# Accounting Service

- [**Business Logic**](#business-logic)
- [**APIs**](#apis)
   - [RESTful APIs](#restful-apis)
   - [gRPC APIs](#grpc-apis)
- [**Commands**](#commands)
   - [Outbound Commands](#outbound-commands)
   - [Inbound Commands](#inbound-commands)
- [**Events**](#events)
   - [Outbound Events](#outbound-events)
   - [Inbound Events](#inbound-events)
- [**Database**](#database)

## Business Logic

## APIs
### RESTful APIs
[API Documentation (Swagger UI)](http://localhost:8081/swagger-ui.html)
| Method | URL | Request | Response | Description |
|----|----|----|----|----|
| GET | `/accounts/{accountId}` | | `GetAccountResponse` JSON | Get an account by account ID. |

### gRPC APIs
**None**

## Commands
### Outbound Commands
**None**

### Inbound Commands
- Inbound command channel name: `accountingService`

| Command | Description |
|-----|----|
| AuthorizeCommand | |
| ReverseAuthorizationCommand | |
| ReviseAuthorizationCommand | |

## Events
### Outbound Events

| Event | Target Service(s) | Description |
|----|----|----|
| AccountAuthorizationFailedEvent | None |
The Accounting Service notifies other services about the authorization of an account failed. |
| AccountAuthorizedEvent | None |
The Accounting Service notifies other services about the authorization of an account successed |
| AccountCreatedEvent | None |
The Accounting Service notifies other services about an account has been created. |

### Inbound Events

| Source Service | Event | Description |
|----|----|----|
| Consumer Service | ConsumerCreatedEvent |
The Consumer Service notifies other services about a new consumer record has been created.
The Accounting Service will create a new account record for the new consumer record. |

### Database

repository: nv-krishna/microservices-patterns

repo_name: nv-krishna/microservices-patterns


text:
---
layout: post
title: Spork it up!
author: cathlin_lord
date: '2019-04-3 10:07:32'
intro_paragraph: ''
categories: misc
---
For me and many others, dining has been a large contributor to my waste.
Being a college student without a kitchen, most of my food is from dining halls,
which some of provide disposable utensils for when purchasing on-the-go meals.
Students, professionals, and take-out eaters are often contributing to the
plastic build up in landfills through once-use utensils and it’s time to make
this come to an end! The solution? Sporks! Sporks! Sporks! Apparently KFC has
been doing something right, now it’s just time to make the sporks reusable. It’s
every utensil you could need for a meal in one and Light My Fire of Sweden is
here to provide. This company provides multiple types of sporks all made from
bioplastics. I know, that contains the word “plastic” in it, but that’s okay!
Bioplastic can mean two things, either bio-based or biodegradable. This meaning
they are plant based products and can be recycled or broken down by natural
material.
To reach the same effect as the toothbrushes, you can also find bamboo sporks!)

Get yours now!

![Spork Photo](/img/uploads/spork.jpg)

gha_language: CSS


text:
LMS(Library Mangement System) is a python based project designed using sqlite db.

The main features include:
1. A student cannot issue more than two copies of the same book
2. A student cannot issue more than two books
3. Admin password checker
4. A proper record log to see which book has been issued to whom

It has two portals:

1. Admin has to create an account(if first time user) and then login. all details of everything will be stored in the db. the admin can:
  1. Add/remove books
  2. Add/delete students from student list
  3. Can see who has taken which book
  4. Can update the no. of books available in the Library

2. Librarian can:
  1. Issue books
  2. Return books
  3. Can see which book is taken by which student
  4. Can see what books are taken by a particular student

repository: SanjogSamuelSamantaray/projects

repo_name: SanjogSamuelSamantaray/projects


text:
# SVScanner - Scanner Vulnerability And Massive Exploit.

[![Version](https://img.shields.io/badge/SVScanner-1.2-brightgreen.svg?maxAge=259200)]()
[![Stage](https://img.shields.io/badge/Release-Stable-brightgreen.svg)]()
[![Build](https://img.shields.io/badge/Supported_OS-Linux-orange.svg)]()
[![Build](https://img.shields.io/badge/Supported_OS-Windows-blue.svg)]()

Is a tool for scanning and massive exploits. Our tools target several open source cms.

---
SVScanner is a tool made with the PHP programming language by **Eka Syahwan** (radenvodka). This tool is intended to scan vulnerabilities and also exploit the target vulnerabilities. It is called massive because we can scan it "massively". We can enter hundreds or even millions list of target at once. Suitable in combination with **reverse-ip** tools.

## Dependencies :
- ```php-curl```
- ```php-cli```

Minimum requirement for SVScanner is PHP 7.0

## Getting Started with Linux
~~~
git clone https://github.com/radenvodka/SVScanner.git
cd SVScanner
php svscanner.php
~~~

## Getting Started with Windows
~~~
Download Xampp (PHP7)
Download SVScanner : https://github.com/radenvodka/SVScanner/releases
Open with cmd php svscanner.php
~~~

## Credits
- [Eka Syahwan](https:/bugrecon.or.id)
- [Edo Maland](https://github.com/Screetsec)
- [LinuxSec](https://www.linuxsec.org)
- Pak Haxor
- FaturFreak

## Article
- [Mencari Kerentanan dan Melakukan Massive Exploit pada WordPress dengan SVScanner](https://www.linuxsec.org/2018/09/svscanner.html)
- [SVScanner – Scanner Vulnerability And Massive Exploit](https://www.kitploit.com/2018/09/svscanner-scanner-vulnerability-and.html)

## Contribute
Send the live target and what exploits are used to<EMAIL_ADDRESS>
## Disclaimer
Note: modifications, changes, or changes to this code can be accepted, however, every public release that uses this code must be approved by writing this tool (Eka S)


text:
# EDD

EDD stands for **Extended Data Dictionary**, which run against a `DataFrame` and typically provides

* Basic statistics on numerical fields
* Distinct count on string fields
* Some distributions captured by histogram

Smv provides a group of `DataFrame` helper methods, as summarized bellow

* `df.smvEdd("v")` - print statistics on column `v`, different output for different data types
* `df.smvHist("k")` - print histogram on column `k`
* `df.smvFreqHist("k")` - print histogram on column `k`, sorted by frequency
* `df.smvBinHist(("k", 100.0))` - print histogram of `k` (as numeric) by bins (bin size 100 in the example)
* `df.smvConcatHist("k1", "k2")` - print joint histogram on `k1` and `k2` with values concatenated with `_` in between
* `df.smvCountHist("k")` - print histogram of `k`'s frequency

Please refer SMV API doc for more up-to-date list.

### smvEdd

`smvEdd` will print different summaries of a given column depends on the type of the column.
Here are some examples,

String type column
```python
>>> employmentByState.smvEdd("ST")
ST                   Non-Null Count         52
ST                   Null Count             0
ST                   Min Length             2
ST                   Max Length             2
ST                   Approx Distinct Count  52
```

Numeric type column
```python
>>> employmentByState.smvEdd("EMP")
EMP                  Non-Null Count         52
EMP                  Null Count             0
EMP                  Average                2170425.7884615385
EMP                  Standard Deviation     2330941.3442028034
EMP                  Min                    202724.0
EMP                  Max                    1.2319102E7
```

Boolean type column
```python
>>> employmentByState.withColumn("isBig", col("EMP") > 1000000).smvEdd("isBig")
Histogram of isBig: Boolean
key                      count      Pct    cumCount   cumPct
false                       20   38.46%          20   38.46%
true                        32   61.54%          52  100.00%
-------------------------------------------------
```

When call `smvEdd()` without a parameter on a `DataFrame`, it will perform the summary
calculation on all the columns and report.

For some data like the following
```
k t p v   d                    b
z 1 a 0.2 1901-07-01 00:00:... null
z 2 a 1.4 2015-04-02 00:00:... true
z 5 b 2.2 2013-09-30 00:00:... true
a 1 a 0.3 2015-12-04 00:00:... false
```

The edd summary report is like this
```python
>>> testDF.smvEdd()
k                    Non-Null Count         4
k                    Min Length             1
k                    Max Length             1
k                    Approx Distinct Count  2
t                    Non-Null Count         4
t                    Average                2.25
t                    Standard Deviation     1.8929694486000912
t                    Min                    1.0
t                    Max                    5.0
p                    Non-Null Count         4
p                    Min Length             1
p                    Max Length             1
p                    Approx Distinct Count  2
v                    Non-Null Count         4
v                    Average                1.025
v                    Standard Deviation     0.9535023160258536
v                    Min                    0.2
v                    Max                    2.2
d                    Time Start             "1901-07-01 00:00:00"
d                    Time Edd               "2015-12-04 00:00:00"
Histogram of d: Year
key                      count      Pct    cumCount   cumPct
1901                         1   25.00%           1   25.00%
2013                         1   25.00%           2   50.00%
2015                         2   50.00%           4  100.00%
-------------------------------------------------
Histogram of d: Month
key                      count      Pct    cumCount   cumPct
04                           1   25.00%           1   25.00%
07                           1   25.00%           2   50.00%
09                           1   25.00%           3   75.00%
12                           1   25.00%           4  100.00%
-------------------------------------------------
Histogram of d: Day of Week
key                      count      Pct    cumCount   cumPct
2                            2   50.00%           2   50.00%
5                            1   25.00%           3   75.00%
6                            1   25.00%           4  100.00%
-------------------------------------------------
Histogram of d: Hour
key                      count      Pct    cumCount   cumPct
00                           4  100.00%           4  100.00%
-------------------------------------------------
Histogram of b: Boolean
key                      count      Pct    cumCount   cumPct
false                        1   33.33%           1   33.33%
true                         2   66.67%           3  100.00%
-------------------------------------------------
```

### smvHist

When print the histogram on a string column, the result will be sorted by the keys,
```python
>>> testDF.smvHist('k')
>>> Histogram of k: String sort by Key
key                      count      Pct    cumCount   cumPct
a                            1   25.00%           1   25.00%
z                            3   75.00%           4  100.00%
-------------------------------------------------
```

Please note by default `smvHist` on a numeric column will be **BIN size 100.0**,
instead of 1. Please use `smvBinHist` to specify BIN size.
```python
>>> testDF.smvHist("t")
>>> Histogram of t: with BIN size 100.0
key                      count      Pct    cumCount   cumPct
0.0                          4  100.00%           4  100.00%
-------------------------------------------------
```

### smvFreqHist

`smvFreqHist` do the same as `smvHist`, while it sort the result by frequency with
decending order,
```python
>>> testDF.smvFreqHist("k")
>>> Histogram of k: String sorted by Frequency
key                      count      Pct    cumCount   cumPct
z                            3   75.00%           3   75.00%
a                            1   25.00%           4  100.00%
-------------------------------------------------
```

### smvBinHist

`smvBinHist` print distributions on numerical columns with applying the specified BIN,

```python
>>> testDF.smvBinHist(('v', 1))
>>> Histogram of v: with BIN size 1.0
key                      count      Pct    cumCount   cumPct
0.0                          2   50.00%           2   50.00%
1.0                          1   25.00%           3   75.00%
2.0                          1   25.00%           4  100.00%
-------------------------------------------------
```

### smvConcatHist

One may need to print the joint distribution (or histogram) of several columns,
`smvConcatHist` is the way to do it,
```python
>>> testDF.smvConcatHist(["k", "t"])
>>> Histogram of k_t: String sort by Key
key                      count      Pct    cumCount   cumPct
a_1                          1   25.00%           1   25.00%
z_1                          1   25.00%           2   50.00%
z_2                          1   25.00%           3   75.00%
z_5                          1   25.00%           4  100.00%
-------------------------------------------------
```
The values of the columns will be concatenated with `_` separated.

### smvCountHist

`df.smvCountHist("k")` is equivalent to
```python
df.groupBy("k").agg(count(lit(1)).alias("N")).smvBinHist(("N", 1))
```

It basically prints the distribution of the value frequency on a specific column.
```python
>>> testDF.smvCountHist("k")
Histogram of N_k: with BIN size 1.0
key                      count      Pct    cumCount   cumPct
1.0                          1   50.00%           1   50.00%
3.0                          1   50.00%           2  100.00%
-------------------------------------------------
```

repository: TresAmigosSD/SMV

gha_language: Python

repo_name: TresAmigosSD/SMV


text:
## Exercise 1: Create and run a Docker application

**Duration**: 40 minutes

In this exercise, you will take the starter files and run the node.js application as a Docker application. You will create a Dockerfile, build Docker images, and run containers to execute the application.

### Task 1: Test the application

The purpose of this task is to make sure you can run the application successfully before applying changes to run it as a Docker application.

1. From Azure Cloud Shell, connect to your build agent if you are not already
   connected. (If you need to reconnect, please review the instructions in the
   "Before the HOL" document.)

2. Type the following command to create a Docker network named "fabmedical":

   ```bash
   docker network create fabmedical
   ```

3. Run an instance of mongodb to use for local testing.

   ```bash
   docker container run --name mongo --net fabmedical -p 27017:27017 -d mongo
   ```

4. Confirm that the mongo container is running and ready.

   ```bash
   docker container list
   docker container logs mongo
   ```

   ![In this screenshot of the console window, docker container list has been typed and run at the command prompt, and the “api” container is in the list. Below this the log output is shown.](media/Ex1-Task1.4.png)

5. Connect to the mongo instance using the mongo shell and test some basic commands:

   ```bash
   mongo
   ```

   ```text
   show dbs
   quit()
   ```

   ![This screenshot of the console window shows the output from connecting to mongo.](media/Ex1-Task1.5.png)

6. To initialize the local database with test content, first navigate to the content-init directory and run npm install.

   ```bash
   cd content-init
   npm install
   ```

   > **Note**: In some cases, the `root` user will be assigned ownership of your user's `.config` folder. If this happens, run the following command to return ownership to `adminfabmedical` and then try `npm install` again:

   ```bash
   sudo chown -R $USER:$(id -gn $USER) /home/adminfabmedical/.config
   ```

7. Initialize the database.

   ```bash
   nodejs server.js
   ```

   ![This screenshot of the console window shows output from running the database initialization.](media/Ex1-Task1.7.png)

8. Confirm that the database now contains test data.

   ```bash
   mongo
   ```

   ```text
   show dbs
   use contentdb
   show collections
   db.speakers.find()
   db.sessions.find()
   quit()
   ```

   This should produce output similar to the following:

   ![This screenshot of the console window shows the data output.](media/Ex1-Task1.8.png)

9. Now navigate to the content-api directory and run npm install.

   ```bash
   cd ../content-api
   npm install
   ```

   > **Note**: In some cases, the `root` user will be assigned ownership of your user's `.config` folder. If this happens, run the following command to return ownership to `adminfabmedical` and then try `npm install` again:

   ```bash
   sudo chown -R $USER:$(id -gn $USER) /home/adminfabmedical/.config
   ```

10. Start the API as a background process.

    ```bash
    nodejs ./server.js &
    ```

    ![In this screenshot, nodejs ./server.js & has been typed and run at the command prompt, which starts the API as a background process.](media/image47.png)

11. Press ENTER again to get to a command prompt for the next step.

12. Test the API using curl. You will request the speaker's content, and this will return a JSON result.

    ```bash
    curl http://localhost:3001/speakers
    ```

    ![In this screenshot, made a curl request to view speakers.](media/image47_1.png)

13. Navigate to the web application directory, run npm install and ng build.

    ```bash
    cd ../content-web
    npm install
    ng build
    node ./app.js &
    ```

    ![In this screenshot, after navigating to the web application directory, nodejs ./server.js & has been typed and run at the command prompt, which runs the application as a background process as well.](media/image48.png)

    > **Note**: In some cases, the `root` user will be assigned ownership of your user's `.config` folder. If this happens, run the following command to return ownership to `adminfabmedical` and then try `npm install` again:

    ```bash
    sudo chown -R $USER:$(id -gn $USER) /home/adminfabmedical/.config
    ```

14. Press ENTER again to get a command prompt for the next step.

15. Test the web application using curl. You will see HTML output returned without errors.

    ```bash
    curl http://localhost:3000
    ```

16. Leave the application running for the next task.

17. If you received a JSON response to the /speakers content request and an HTML response from the web application, your environment is working as expected.

### Task 2: Browsing to the web application

In this task, you will browse to the web application for testing.

1. From the Azure portal select the resource group you created named fabmedical-SUFFIX.

2. Select the build agent VM named fabmedical from your list of available resources.

   ![In this screenshot of your list of available resources, the first item is selected, which has the following values for Name, Type, and Location: fabmedical-soll (a red arrows points to this name), Virtual machine, and East US 2.](media/linuxVM.png)

3. From the Virtual Machine blade overview, find the IP address of the VM.

   ![In the Virtual Machine blade, Overview is selected on the left and Public IP address <IP_ADDRESS> is highlighted on the right.](media/linuxIP1.png)

4. Test the web application from a browser. Navigate to the web application using your build agent IP address at port 3000.

   ```text
   http://[BUILDAGENTIP]:3000

   EXAMPLE: http://<IP_ADDRESS>:3000
   ```

5. Select the Speakers and Sessions links in the header. You will see the pages display the HTML version of the JSON content you curled previously.

6. Once you have verified the application is accessible through a browser, go to your cloud shell window and stop the running node processes.

   ```bash
   killall nodejs
   killall node
   ```

### Task 3: Create Docker images

In this task, you will create Docker images for the application --- one for the API application and another for the web application. Each image will be created via Docker commands that rely on a Dockerfile.

1. From cloud shell connected to the build agent VM, type the following command
   to view any Docker images on the VM. The list will only contain the mongodb
   image downloaded earlier.

   ```bash
   docker image ls
   ```

2. From the content-api folder containing the API application files and the new Dockerfile you created, type the following command to create a Docker image for the API application. This command does the following:

   - Executes the Docker build command to produce the image

   - Tags the resulting image with the name content-api (-t)

   - The final dot (".") indicates to use the Dockerfile in this current directory context. By default, this file is expected to have the name "Dockerfile" (case sensitive).

   ```bash
   docker image build -t content-api .
   ```

3. Once the image is successfully built, run the Docker images listing command again. You will see several new images: the node images and your container image.

   ```bash
   docker image ls
   ```

   Notice the untagged image. This is the build stage which contains all the intermediate files not needed in your final image.

   ![The node image (node) and your container image (content-api) are visible in this screenshot of the console window.](media/image59.png)

4. Navigate to the content-web folder again and list the files. Note that this folder has a Dockerfile.

   ```bash
   cd ../content-web
   ll
   ```

5. View the Dockerfile contents -- which are similar to the file in the API folder. Type the following command:

   ```bash
   cat Dockerfile
   ```

   Notice that the content-web Dockerfile build stage includes additional tools for a front-end Angular application in addition to installing npm packages.

6. Type the following command to create a Docker image for the web application.

   ```bash
   docker image build -t content-web .
   ```

7. When complete, you will see seven images now exist when you run the Docker images command.

   ```bash
   docker image ls
   ```

   ![Three images are now visible in this screenshot of the console window: content-web, content-api, and node.](media/image60.png)

### Task 4: Run a containerized application

The web application container will be calling endpoints exposed by the API application container and the API application container will be communicating with mongodb. In this exercise, you will launch the images you created as containers on the same bridge network you created when starting mongodb.

1. Create and start the API application container with the following command. The command does the following:

   - Names the container "api" for later reference with Docker commands.

   - Instructs the Docker engine to use the "fabmedical" network.

   - Instructs the Docker engine to use port 3001 and map that to the internal container port 3001.

   - Creates a container from the specified image, by its tag, such as content-api.

   ```bash
   docker container run --name api --net fabmedical -p 3001:3001 content-api
   ```

2. The `docker container run` command has failed because it is configured to connect to mongodb using a localhost URL. However, now that content-api is isolated in a separate container, it cannot access mongodb via localhost even when running on the same docker host. Instead, the API must use the bridge network to connect to mongodb.

   ```text
   ><EMAIL_ADDRESS>start /usr/src/app
   > node ./server.js

   Listening on port 3001
   Could not connect to MongoDB!
   MongoTimeoutError: Server selection timed out after 30000 ms
   npm ERR! code ELIFECYCLE
   npm ERR! errno 255
   npm ERR<EMAIL_ADDRESS>start: `node ./server.js`
   npm ERR! Exit status 255
   npm ERR!
   npm ERR! Failed at the<EMAIL_ADDRESS>start script.
   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

   npm ERR!  The content-api application allows an environment variable to configure the mongodb connection string. Remove the existing container, and then instruct the docker engine to set the environment variable by adding the `-e` switch to the `docker container run` command. Also, use the `-d` switch to run the api as a daemon.

   ```bash
   docker container rm api
   docker container run --name api --net fabmedical -p 3001:3001 -e MONGODB_CONNECTION=mongodb://mongo:27017/contentdb -d content-api
   ```

4. Enter the command to show running containers. You will observe that the "api" container is in the list. Use the docker logs command to see that the API application has connected to mongodb.

   ```bash
   docker container ls
   docker container logs api
   ```

   ![In this screenshot of the console window, docker container ls has been typed and run at the command prompt, and the "api" container is in the list with the following values for Container ID, Image, Command, Created, Status, Ports, and Names: 458d47f2aaf1, content-api, "docker-entrypoint.s...", 37 seconds ago, Up 36 seconds, <IP_ADDRESS>:3001->3001/tcp, and api.](media/image61.png)

5. Test the API by curling the URL. You will see JSON output as you did when testing previously.

   ```bash
   curl http://localhost:3001/speakers
   ```

6. Create and start the web application container with a similar `docker container run` command -- instruct the docker engine to use any port with the `-P` command.

   ```bash
   docker container run --name web --net fabmedical -P -d content-web
   ```

7. Enter the command to show running containers again, and you will observe that both the API and web containers are in the list. The web container shows a dynamically assigned port mapping to its internal container port 3000.

   ```bash
   docker container ls
   ```

   ![In this screenshot of the console window, docker container ls has again been typed and run at the command prompt. <IP_ADDRESS>:32768->3000/tcp is highlighted under Ports.](media/image62.png)

8. Test the web application by fetching the URL with curl. For the port, use the dynamically assigned port, which you can find in the output from the previous command. You will see HTML output, as you did when testing previously.

   ```bash
   curl http://localhost:[PORT]/speakers.html
   ```

### Task 5: Setup environment variables

In this task, you will configure the "web" container to communicate with the API container using an environment variable, similar to the way the mongodb connection string is provided to the api.

1. From cloud shell connected to the build agent VM, stop and remove the web container using the following commands.

   ```bash
   docker container stop web
   docker container rm web
   ```

2. Validate that the web container is no longer running or present by using the -a flag as shown in this command. You will see that the "web" container is no longer listed.

   ```bash
   docker container ls -a
   ```

3. Open the Dockerfile for editing using Vim and press the "i" key to go into edit mode.

   ```bash
   vi Dockerfile
   <i>
   ```

4. Locate the EXPOSE line shown below and add a line above it that sets the default value for the environment variable, as shown in the screenshot.

   ```Dockerfile
   ENV CONTENT_API_URL http://localhost:3001
   ```

   ![In this screenshot of Dockerfile, the CONTENT_API_URL code appears above the next Dockerfile line, which reads EXPOSE 3000.](media/hol-2019-10-01_19-37-35.png)

5. Press the Escape key and type ":wq" and then press the Enter key to save and close the file.

   ```text
   <Esc>
   :wq
   <Enter>
   ```

6. Rebuild the web application Docker image using the same command as you did previously.

   ```bash
   docker image build -t content-web .
   ```

7. Create and start the image passing the correct URI to the API container as an environment variable. This variable will address the API application using its container name over the Docker network you created. After running the container, check to see the container is running and note the dynamic port assignment for the next step.

   ```bash
   docker container run --name web --net fabmedical -P -d -e CONTENT_API_URL=http://api:3001 content-web
   docker container ls
   ```

8. Curl the speakers path again, using the port assigned to the web container. Again, you will see HTML returned, but because curl does not process javascript, you cannot determine if the web application is communicating with the api application. You must verify this connection in a browser.

   ```bash
   curl http://localhost:[PORT]/speakers.html
   ```

9. You will not be able to browse to the web application on the ephemeral port because the VM only exposes a limited port range. Now you will stop the web container and restart it using port 3000 to test in the browser. Type the following commands to stop the container, remove it, and run it again using explicit settings for the port.

   ```bash
    docker container stop web
    docker container rm web
    docker container run --name web --net fabmedical -p 3000:3000 -d -e CONTENT_API_URL=http://api:3001 content-web
   ```

10. Curl the speaker path again, using port 3000. You will see the same HTML returned.

    ```bash
    curl http://localhost:3000/speakers.html
    ```

11. You can now use a web browser to navigate to the website and successfully view the application at port 3000. Replace [BUILDAGENTIP] with the IP address you used previously.

    ```bash
    http://[BUILDAGENTIP]:3000

    EXAMPLE: http://<IP_ADDRESS>:3000
    ```

12. Commit your changes and push to the repository.

    ```bash
    git add .
    git commit -m "Setup Environment Variables"
    git push
    ```

    Enter credentials if prompted.

1. First, cleanup the existing containers.

   ```bash
   docker container stop web && docker container rm web
   docker container stop api && docker container rm api
   docker container stop mongo && docker container rm mongo
   ```

2. Navigate to your home directory (where you checked out the content repositories) and create a docker compose file.

   ```bash
   cd ~
   vi docker-compose.yml
   <i>
   ```

   Type the following as the contents of `docker-compose.yml`:

   ```yaml
   version: "3.4"

   services:
     mongo:
       image: mongo
       restart: always

     api:
       build: ./content-api
       image: content-api
       depends_on:
         - mongo
       environment:
         MONGODB_CONNECTION: mongodb://mongo:27017/contentdb

     web:
       build: ./content-web
       image: content-web
       depends_on:
         - api
       environment:
         CONTENT_API_URL: http://api:3001
       ports:
         - "3000:3000"
   ```

   Press the Escape key and type ":wq" and then press the Enter key to save and close the file.

   ```text
   <Esc>
   :wq
   <Enter>
   ```

3. Start the applications with the `up` command.

   ```bash
   docker-compose -f docker-compose.yml -p fabmedical up -d
   ```

   ![This screenshot of the console window shows the creation of the network and three containers: mongo, api and web.](media/Ex1-Task6.17.png)

4. Visit the website in the browser; notice that we no longer have any data on the speakers or sessions pages.

   ![Browser view of the web site.](media/Ex1-Task6.18.png)

5. We stopped and removed our previous mongodb container; all the data contained in it has been removed. Docker compose has created a new, empty mongodb instance that must be reinitialized. If we care to persist our data between container instances, docker has several mechanisms to do so. First, we will update our compose file to persist mongodb data to a directory on the build agent.

   ```bash
   mkdir data
   vi docker-compose.yml
   ```

   Update the mongo service to mount the local data directory onto to the `/data/db` volume in the docker container.

   ```yaml
   mongo:
     image: mongo
     restart: always
     volumes:
       - ./data:/data/db
   ```

   The result should look similar to the following screenshot:

   ![This screenshot of the VIM edit window shows the resulting compose file.](media/Ex1-Task6.19.png)

6. Next, we will add a second file to our composition so that we can initialize the mongodb data when needed.

   ```bash
   vi docker-compose.init.yml
   ```

   Add the following as the content:

   ```yaml
   version: "3.4"

   services:
     init:
       build: ./content-init
       image: content-init
       depends_on:
         - mongo
       environment:
         MONGODB_CONNECTION: mongodb://mongo:27017/contentdb
   ```

7. To reconfigure the mongodb volume, we need to bring down the mongodb service first.

   ```bash
   docker-compose -f docker-compose.yml -p fabmedical down
   ```

   ![This screenshot of the console window shows the running containers stopping.](media/Ex1-Task6.21.png)

8. Now run `up` again with both files to update the mongodb configuration and run the initialization script.

   ```bash
   docker-compose -f docker-compose.yml -f docker-compose.init.yml -p fabmedical up -d
   ```

9. Check the data folder to see that mongodb is now writing data files to the host.

   ```bash
   ls ./data/
   ```

   ![This screenshot of the console window shows the output of the data folder.](media/hol-2019-10-12_09-42-16.png)

10. Check the results in the browser. The speaker and session data are now available.

    ![A screenshot of the sessions page.](media/Ex1-Task6.24.png)

### Task 7: Push images to Azure Container Registry

To run containers in a remote environment, you will typically push images to a Docker registry, where you can store and distribute images. Each service will have a repository that can be pushed to and pulled from with Docker commands. Azure Container Registry (ACR) is a managed private Docker registry service based on Docker Registry v2.

In this task, you will push images to your ACR account, version images with tagging, and setup continuous integration (CI) to build future versions of your containers and push them to ACR automatically.

1. In the [Azure Portal](https://portal.azure.com/), navigate to the ACR you created in Before the hands-on lab.

2. Select Access keys under Settings on the left-hand menu.

   ![In this screenshot of the left-hand menu, Access keys is highlighted below Settings.](media/image64.png)

3. The Access keys blade displays the Login server, username, and password that will be required for the next step. Keep this handy as you perform actions on the build VM.

   > **Note**: If the username and password do not appear, select Enable on the Admin user option.

4. From the cloud shell session connected to your build VM, login to your ACR account by typing the following command. Follow the instructions to complete the login.

   ```bash
   docker login [LOGINSERVER] -u [USERNAME] -p [PASSWORD]
   ```

   For example:

   ```bash
   docker login fabmedicalsoll.azurecr.io -u fabmedicalsoll -p +W/j=l+Fcze=n07SchxvGSlvsLRh/7ga
   ```

   ![In this screenshot of the console window, the following has been typed and run at the command prompt: docker login fabmedicalsoll.azurecr.io --u fabmedicalsoll --p +W/j=l+Fcze=n07SchxvGSlvsLRh/7ga](media/image65.png)

   **Tip: Make sure to specify the fully qualified registry login server (all lowercase).**

5. Run the following commands to properly tag your images to match your ACR account name.

   ```bash
   docker image tag content-web [LOGINSERVER]/content-web
   docker image tag content-api [LOGINSERVER]/content-api
   ```

6. List your docker images and look at the repository and tag. Note that the repository is prefixed with your ACR login server name, such as the sample shown in the screenshot below.

   ```bash
   docker image ls
   ```

   ![This is a screenshot of a docker images list example.](media/image66.png)

7. Push the images to your ACR account with the following command:

   ```bash
   docker image push [LOGINSERVER]/content-web
   docker image push [LOGINSERVER]/content-api
   ```

   ![In this screenshot of the console window, an example of images being pushed to an ACR account results from typing and running the following at the command prompt: docker push [LOGINSERVER]/content-web.](media/image67.png)

8. In the Azure Portal, navigate to your ACR account, and select Repositories under Services on the left-hand menu. You will now see two, one for each image.

   ![In this screenshot, content-api and content-web each appear on their own lines below Repositories.](media/image68.png)

9. Select content-api. You will see the latest tag is assigned.

   ![In this screenshot, content-api is selected under Repositories, and the Tags blade appears on the right.](media/image69.png)

10. From the cloud shell session attached to the VM, assign the v1 tag to each image with the following commands. Then list the Docker images to note that there are now two entries for each image: showing the latest tag and the v1 tag. Also note that the image ID is the same for the two entries, as there is only one copy of the image.

    ```bash
    docker image tag [LOGINSERVER]/content-web:latest [LOGINSERVER]/content-web:v1
    docker image tag [LOGINSERVER]/content-api:latest [LOGINSERVER]/content-api:v1
    docker image ls
    ```

    ![In this screenshot of the console window is an example of tags being added and displayed.](media/image70.png)

11. Repeat Step 7 to push the images to ACR again so that the newly tagged v1 images are pushed. Then refresh one of the repositories to see the two versions of the image now appear.

    ![In this screenshot, content-api is selected under Repositories, and the Tags blade appears on the right. In the Tags blade, latest and v1 appear under Tags.](media/image71.png)

12. Run the following commands to pull an image from the repository. Note that the default behavior is to pull images tagged with "latest." You can pull a specific version using the version tag. Also, note that since the images already exist on the build agent, nothing is downloaded.

    ```bash
    docker image pull [LOGINSERVER]/content-web
    docker image pull [LOGINSERVER]/content-web:v1
    ```

### Task 8: Setup CI Pipeline to Push Images

In this task, you will use YAML to define a pipeline that builds your Docker
image and pushes it to your ACR instance automatically.

1. In your cloud shell session connected to the build agent VM, navigate to the
   `content-web` directory:

   ```bash
   cd ~/content-web
   ```

2. Next create the pipeline YAML file.

   ```bash
   vi azure-pipelines.yml
   ```

   Add the following as the content (replacing SHORT_SUFFIX with your short
   suffix such as SOL):

   ```yaml
   name: 0.1.$(Rev:r)

   trigger:
     - master

   resources:
     - repo: self

   variables:
     dockerRegistryServiceConnection: "Fabmedical ACR"
     imageRepository: "content-web"
     containerRegistry: "$(containerRegistryName).azurecr.io"
     containerRegistryName: "fabmedical[SHORT_SUFFIX]"
     dockerfilePath: "$(Build.SourcesDirectory)/Dockerfile"
     tag: "$(Build.BuildNumber)"
     vmImageName: "ubuntu-latest"

   stages:
     - stage: Build
       displayName: Build and Push
       jobs:
         - job: Docker
           displayName: Build and Push Docker Image
           pool:
             vmImage: $(vmImageName)
           steps:
             - checkout: self
               fetchDepth: 1

             - task: Docker@2
               displayName: Build and push an image to container registry
               inputs:
                 command: buildAndPush
                 repository: $(imageRepository)
                 dockerfile: $(dockerfilePath)
                 containerRegistry: $(dockerRegistryServiceConnection)
                 tags: |
                   $(tag)
                   latest
   ```

3.  Now login to Azure DevOps to create your first build. Navigate to the
   `content-web` repository and choose 'Set up Build', after that select **Existing Azure Pipeline YAML file** and then **continue**

   ![A screenshot of the content-web repository with an arrow pointed at the Set up Build button](media/hol-2019-10-01_19-50-16.png)

   ![A screenshot of the content-web repository with an arrow pointed at the Set up Build button](media/pipiline.png)

5. Azure DevOps will automatically detect the pipeline YAML you added. You can
   make additional edits here if needed. Select `Run` when you are ready to
   execute the pipeline.

   ![A screenshot of the "Review your pipeline YAML" page.  An arrow points at the Run button](media/hol-2019-10-02_07-33-16.png)

6. Azure DevOps will queue your first build and execute the pipeline when an
   agent becomes available.

   ![A screenshot of Azure DevOps Pipeline with a queued job.](media/hol-2019-10-02_07-39-24.png)

7. The build should take about five minutes to complete.

   ![A screenshot of Azure DevOps Pipeline with a completed job.](media/hol-2019-10-02_08-28-49.png)

   > **Note**: The build may fail due to an authorization error related to the
   > Docker Registry Service connection. If this is the case, then select
   > "Authorize Resources" and run the build again.
   > ![A screenshot showing an authorization failure error. An arrow points to the Authorize Resources button.](media/hol-2019-10-02_07-30-37.png)

8. Next, create the `content-api` build. Select the `content-api` repository.
   This repository already includes `azure-pipelines.yaml`. Choose 'Set up
   Build'.

9. A screenshot of the "Review your pipeline YAML" step, with the containerRegistryName property highlighted.](media/hol-2019-10-18_06-32-34.png)

10. When you are finished editing, select `Run` to execute the pipeline.

11. While the `content-api` build runs, setup one last build for `content-init` by following the same steps as the previous `content-api` build, remembering to update the `[SHORT_SUFFIX]` value on the "Review your pipeline YAML" step.

12. Visit your ACR instance in the Azure portal, you should see new containers
    tagged with the Azure DevOps build number.

    ![A screenshot of the container images in ACR.](media/Ex1-Task7.28.png)

path: /Hands-on lab/01-infra.md


text:
_After you complete this course, you will be able to:_

- Comprehend how serverless computing works and ways it can be used in cloud applications

- Distinguish use cases and patterns compatible with Serverless

- Create and manage serverless functions using the IBM Cloud Functions platform

- Use packages to organize your functions and create reusable building blocks

- Automate your functions using alarm events

- Expose functions as to the web accessible endpoints and as APIs that return different content types

- Navigate the web user interface to perform similar tasks that mirror CLI commands


text:
# Test Capabilities

* [Test Capabilities - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Test_Capabilities)
	* Testing capabilities takes place when adversaries may need to test capabilities externally to refine development goals and criteria and to ensure success during an operation. Certain testing may be done after a capability is staged.

-------------------------------
### Review logs and residual traces
* [Review logs and residual traces - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1135)
	* Execution of code and network communications often result in logging or other system or network forensic artifacts. An adversary can run their code to identify what is recorded under different conditions. This may result in changes to their code or adding additional actions (such as deleting a record from a log) to the code.

-------------------------------
### Test ability to evade automated mobile application security analysis performed by app stores
* [Test ability to evade automated mobile application security analysis performed by app stores - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1170)
	* Many mobile devices are configured to only allow applications to be installed from the mainstream vendor app stores (e.g., Apple App Store and Google Play Store). An adversary can submit multiple code samples to these stores deliberately designed to probe the stores' security analysis capabilities, with the goal of determining effective techniques to place malicious applications in the stores that could then be delivered to targeted devices.

-------------------------------
### Test callback functionality
* [Test callback functionality](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1133)
	* Callbacks are malware communications seeking instructions. An adversary will test their malware to ensure the appropriate instructions are conveyed and the callback software can be reached.

-------------------------------
### Test malware in various execution environments
* [Test malware in various execution environments - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1134)
	* Malware may perform differently on different platforms (computer vs handheld) and different operating systems (Ubuntu vs OS X), and versions (Windows 7 vs 10) so malicious actors will test their malware in the environment(s) where they most expect it to be executed.

-------------------------------
### Test malware to evade detection
* [Test malware to evade detection - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1136)
	* An adversary can run their code on systems with cyber security protections, such as antivirus products, in place to see if their code is detected. They can also test their malware on freely available public services.

-------------------------------
### Test physical access
* [Test physical access - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1137)
	* An adversary can test physical access options in preparation for the actual attack. This could range from observing behaviors and noting security precautions to actually attempting access.

-------------------------------
### Test signature detection for file upload/email filters
* [Test signature detection for file upload/email filters - Pre-ATT&CK](https://attack.mitre.org/pre-attack/index.php/Technique/PRE-T1138)
	* An adversary can test their planned method of attack against existing security products such as email filters or intrusion detection sensors (IDS).


text:
#### Integrations
##### CrowdStrike Falcon
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>636*.
- Fixed an issue where the ***cs-falcon-resolve-detection*** command was missing "closed" and "reopened" statuses from the *status* argument list.

repository: demisto/content

repo_name: demisto/content


text:
# generator-dmg [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
> Generator to scaffold a gambeoy project using rgbds

## Installation

First, install [Yeoman](http://yeoman.io) and generator-dmg using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
npm install -g generator-dmg
```

Then generate your new project:

```bash
yo dmg
```

### Install wine
You will need to install wine to run the emulator that executes the rom.
```bash
brew install wine
```

### Building and running the ROM-image
```bash
./run.sh
```

## Getting To Know Yeoman

 * Yeoman has a heart of gold.
 * Feel free to [learn more about Yeoman](http://yeoman.io/).

## License

MIT © [Andre Uschmann](andre-uschmann.de)

[npm-image]: https://badge.fury.io/js/generator-dmg.svg
[npm-url]: https://npmjs.org/package/generator-dmg
[travis-image]: https://travis-ci.org/uschmann/generator-dmg.svg?branch=master
[travis-url]: https://travis-ci.org/uschmann/generator-dmg
[daviddm-image]: https://david-dm.org/uschmann/generator-dmg.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/uschmann/generator-dmg

repository: uschmann/generator-dmg

repo_name: uschmann/generator-dmg


text:
# SpecIF Viewer and Editor [![Build Status](https://travis-ci.org/GfSE/SpecIF-Viewer.svg?branch=master)](https://travis-ci.org/GfSE/SpecIF-Viewer)
An app for your web-browser to view, edit\* and transform system specifications. (Features of the SpecIF Editor are marked with an asterisk\*).

SpecIF is the 'Specification Integration Facility'. It's purpose is to combine partial specifications from different tools in a single model to allow
- to search, navigate and audit partial results in a common context
- to exchange model information between organizations and tools.

Please have a look at the [SpecIF Homepage](https://specif.de) for further information.

## Features
- Import 'specif' and 'specif.zip' file with schema and consistency check
- Import 'reqif' an 'reqifz' file (experimental)
- Import MS-Excel 'XLSX', 'XLS' and 'CSV' file
- Import 'BPMN-XML' file
- Import Archimate Open-Exchange (experimental)
- Import from an URL or the local file system
- Browse the content ('resources') along the supplied hierarchy
- Display model-element details when hovering over a representation on a diagram (in case of SVG images with annotated model-element identifier)
- Create, clone and update resources with an input form derived from the respective resource class*
- Move single nodes and subtrees in the hierarchy by drag'n'drop*
- Inspect the semantic net ('statements')
- Create statements according to the options defined in the statement classes*
- Delete selected resources and statements*
- Filter using text fragments ('full text search'), resource classes or enumerated property values
- Report some model-based statistics, such as used resource classes or used property enumerated values
- Export 'html' file with embedded SpecIF data
- Export 'specif.zip' file
- Export 'reqifz' file (Requirements Interchange Format)
- Export 'Turtle' file (experimental)
- Export 'ePub' file
- Export MS-Word OOXML file

## Compatibility
- Mozilla Firefox
- Google Chromium and Chrome
- Microsoft Edge
- Apple Safari _(beware of performance issues in case of bigger models)_
- Opera
- Microsoft Internet Explorer is _not any more_ supported

## Maturity
The software code is a reference implementation and has not been designed for high data volume and other production requirements.
Any contribution to this collaborative effort is highly welcome!

## Demonstration
The app has been installed for demonstration
- View the [dimmer example](https://specif.de/apps/view#import=../examples/Dimmer.specifz) in SpecIF format,
- View a [BPMN example](https://specif.de/apps/view#import=../examples/Fahrtbeginn.bpmn) in BPMN 2.0 XML format,
- View a [XLSX example](https://specif.de/apps/view#import=../examples/Requirements.xlsx) in XSLX format,
- View the [SpecIF Vocabulary](https://specif.de/apps/view#import=../examples/Vocabulary.specifz) in SpecIF format,
- Start the [viewer](https://specif.de/apps/view) to load and view your own files.
- Start the [editor](https://specif.de/apps/edit) to load and edit your own files.

The installation provided for your convenience is neither intended to be highly available nor scalable.
You may use the [latest release](https://github.com/GfSE/SpecIF-Viewer/releases) of the software for
your own installation, see below.

## Compatibility
- Mozilla Firefox
- Google Chromium and Chrome
- Microsoft Edge
- Opera
- Apple Safari _(beware of performance issues in case of bigger models)_
- Microsoft Internet Explorer is _not any more_ supported

## Installation
For any purpose other than demonstration please install the latest [release](https://github.com/GfSE/SpecIF-Viewer/releases)
on a web server of your choice. Just unpack the files and load 'yourPath/view' or 'yourPath/edit' with a web-browser.

## Running the App Locally
First, make sure you have NodeJS and NPM installed.

Then, install all dependencies:
```bash
  npm install
```

After installing all dependencies, run the build script:
```bash
  npm run start
```

### On Windows

After creating the build directory with the executables, you may start the local web-server:
```
  http-server
```

- Then, navigate to localhost -> build -> view.html to open the SpecIF Viewer
- Temporarily deactivate ```Cross-Origin Restrictions``` and ```Local File Restrictions``` in your browser, if you encounter a blank screen.
Make sure to re-activate these settings, later.

## Acknowledgements
This work has been sponsored by [enso-managers gmbh](http://enso-managers.de) and [adesso SE](http://adesso.de), both Berlin.

repository: GfSE/SpecIF-Viewer

gha_language: TypeScript

repo_name: GfSE/SpecIF-Viewer


text:
PHP-LUA integrated docker image
========================

The docker image provides official [PHP](https://hub.docker.com/_/php) image with integrated [LUA](https://www.lua.org) interpreter and installed [lua](https://www.php.net/manual/ru/book.lua.php) library.

# Build
To build image
```bash
docker build -t php-lua .
```

# Run
To run interactive shell
```bash
docker run -it --rm -v $(pwd):/repo php-lua bash
```

repository: gaainf/php-lua

gha_language: Dockerfile

repo_name: gaainf/php-lua


text:
# Preface {#concept_52252_zh .concept}

This document describes how to install and use Go SDK v4.0.0 and later for Table Store. It is assumed that you have activated Alibaba Cloud Table Store and created an AccessKeyId and AccessKeySecret.

-   If you have not activated Alibaba Cloud Table Store or want to learn more about Table Store, visit the [Table Store homepage](https://www.alibabacloud.com/product/table-store).

-   If you have not created an AccessKeyId and AccessKeySecret, log on to [Alibaba Cloud AccessKey console](https://ak-console.aliyun.com/#/accesskey) to create an AccessKey.

## Download the SDK {#section_um1_dr2_2fb .section}

-    [SDK package](https://github.com/aliyun/aliyun-tablestore-go-sdk) \(including the package, source code, and samples\).

-   For more information about how to install the SDK package, see [Installation](intl.en-US/SDK Reference/Go SDK/Installation.md#).

## Version { .section}

Latest version: 4.1.0

repository: nickfox-taterli/ots

repo_name: nickfox-taterli/ots


text:
# ampt
A Multi-Phase Transport model for high-energy nuclear collisions. The main source codes are from Zi-Wei Lin (http://myweb.ecu.edu/linz/ampt/)

repository: tuos/ampt

gha_language: Fortran

repo_name: tuos/ampt


text:
# Funqual - User defined static call tree constraints in C++

Funqual is a tool that examines standard C++17 code and checks for user-defined constraints to the call-tree.  Think of it as a type system for function calls.  You can't add an int and a string therefore you shouldn't be able to call a blocking function from a nonblocking function.

This tool introduces two ideas into your project:  the idea of function "qualified type" (is this function preemptive? nonreentrant? blocking? nonblocking? etc), and the idea of a "call tree constraint" (functions of type X can/cannot call functions of type Y).  Using these constructs, the programmer can statically assert that their program's call tree conform to whatever set of constraints they can think of.

Funqual has been successfully used to find issues in several small to medium sized projects.  Past use cases have been:
 - checking that non-reentrant functions are not called from signal handlers and other preemptive contexts
 - checking that syscalls are not called in high frequency control loops for a robotic controls library
 - checking that kernel startup code does not call functions associated with subsystems that aren't available at startup time

# Using

Function declarations can be annotated using any of the following syntaxes in source code:

```
#define QTAG(TAG) __attribute__((annotate("funqual::" #TAG)))

int foo(char *arg) QTAG(function_qualified_type) {
    ...
}

int QTAG(function_qualified_type) foo(char *arg);

class Bar {
    int foo(char *arg) QTAG(function_qualified_type);
};
```

Call tree constraints are added to a special rules file.  The rules file is passed to the funqual tool using the `-t` argument.  Below is an example of a rules file:

```
rule restrict_indirect_call preemptive non_reentrant
rule restrict_indirect_call nonblocking blocking
rule require_call realtime realtime
```

This file encodes the following rules:
 - functions with type `preemptive` may not call (whether direct or indirect) functions of type `non_reentrant`
 - functions with type `nonblocking` may not call (whether direct or indirect) functions of type `blocking`
 - functions wiht type `realtime` may only call functions of type `realtime`

In the future, a syntax may be added to encode call tree constraints in the program source without the need for an external rules file.

## Example usage

You must have the clang module installed.  Install with the following: `python3 -m pip install clang`.

For a quick demo, run with the following command:

`python3 parse.py example/header.hpp -t example/ext_tags.qtag`

You should see output similar to the following:

```
Rule violation: `non_reentrant` function indirectly called from `preemptive` context
        Path:   example/header.hpp::foo() (41,6)
        -calls: example/header.hpp::call_printf() (32,6)
        -calls: example/header.hpp::(#include)::printf(const char *__restrict, ...) (362,12)

Rule violation: `non_reentrant` function indirectly called from `preemptive` context
        Path:   example/header.hpp::foo() (41,6)
        -calls: example/header.hpp::do_something_that_calls_printf() (36,6)
        -calls: example/header.hpp::call_printf() (32,6)
        -calls: example/header.hpp::(#include)::printf(const char *__restrict, ...) (362,12)

Rule violation: `non_reentrant` function indirectly called from `preemptive` context
        Path:   example/header.hpp::foo() (41,6)
        -calls: example/header.hpp::do_something_that_calls_printf() (36,6)
        -calls: example/header.hpp::(#include)::printf(const char *__restrict, ...) (362,12)

Rule violation: `non_reentrant` function indirectly called from `preemptive` context
        Path:   example/header.hpp::foo() (41,6)
        -calls: example/header.hpp::(#include)::printf(const char *__restrict, ...) (362,12)

Rule violation: `non_reentrant` function indirectly called from `preemptive` context
        Path:   example/header.hpp::Wowza::UpsideDown() (11,10)
        -calls: example/header.hpp::(#include)::printf(const char *__restrict, ...) (362,12)

Rule violation: `realtime` function calls a function that is not `realtime`
        Path:   example/header.hpp::Wowza::UpsideDown() (11,10)
        -calls: example/header.hpp::(#include)::printf(const char *__restrict, ...) (362,12)
```

# Building

This tool runs against libClang 3.8 with the patch supplied in the file pylibclang_get_overridden_cursors.patch.  I'm currently in the process of getting this patch added to libClang.  Fortunately, since these are only patches to the python bindings, you will not need to rebuild any part of libclang to get this working.

# Future work

Since starting work on funqual I have finished grad school and started a full time job.  Updates from me will be sparse.  There is some low-hanging fruit as far as improvements go, though:
 - Dramatically improve speed by supporting incremental linting.  Users generally only change 3 or 4 files between lintings so why should we parse every file from scratch?
 - Merging patches into mainline libClang
 - Packaging into a .deb

repository: chubbymaggie/funqual

repo_name: chubbymaggie/funqual


text:
```@meta
CurrentModule = MathOptInterface
DocTestSetup = quote
    import MathOptInterface as MOI
end
DocTestFilters = [r"MathOptInterface|MOI"]
```

# [The Test submodule](@id test_module)

The `Test` submodule provides tools to help solvers implement unit tests in
order to ensure they implement the MathOptInterface API correctly, and to check
for solver-correctness.

We use a centralized repository of tests, so that if we find a bug in one
solver, instead of adding a test to that particular repository, we add it here
so that all solvers can benefit.

## How to test a solver

The skeleton below can be used for the wrapper test file of a solver named
`FooBar`.

```julia
# ============================ /test/MOI_wrapper.jl ============================
module TestFooBar

import FooBar
using Test

import MathOptInterface as MOI

const OPTIMIZER = MOI.instantiate(
    MOI.OptimizerWithAttributes(FooBar.Optimizer, MOI.Silent() => true),
)

const BRIDGED = MOI.instantiate(
    MOI.OptimizerWithAttributes(FooBar.Optimizer, MOI.Silent() => true),
    with_bridge_type = Float64,
)

# See the docstring of MOI.Test.Config for other arguments.
const CONFIG = MOI.Test.Config(
    # Modify tolerances as necessary.
    atol = 1e-6,
    rtol = 1e-6,
    # Use MOI.LOCALLY_SOLVED for local solvers.
    optimal_status = MOI.OPTIMAL,
    # Pass attributes or MOI functions to `exclude` to skip tests that
    # rely on this functionality.
    exclude = Any[MOI.VariableName, MOI.delete],
)

"""
    runtests()

This function runs all functions in the this Module starting with `test_`.
"""
function runtests()
    for name in names(@__MODULE__; all = true)
        if startswith("$(name)", "test_")
            @testset "$(name)" begin
                getfield(@__MODULE__, name)()
            end
        end
    end
end

"""
    test_runtests()

This function runs all the tests in MathOptInterface.Test.

Pass arguments to `exclude` to skip tests for functionality that is not
implemented or that your solver doesn't support.
"""
function test_runtests()
    MOI.Test.runtests(
        BRIDGED,
        CONFIG,
        exclude = [
            "test_attribute_NumberOfThreads",
            "test_quadratic_",
        ],
        # This argument is useful to prevent tests from failing on future
        # releases of MOI that add new tests. Don't let this number get too far
        # behind the current MOI release though. You should periodically check
        # for new tests to fix bugs and implement new features.
        exclude_tests_after = v"0.10.5",
    )
    return
end

"""
    test_SolverName()

You can also write new tests for solver-specific functionality. Write each new
test as a function with a name beginning with `test_`.
"""
function test_SolverName()
    @test MOI.get(FooBar.Optimizer(), MOI.SolverName()) == "FooBar"
    return
end

end # module TestFooBar

# This line at tne end of the file runs all the tests!
TestFooBar.runtests()
```

Then modify your `runtests.jl` file to include the `MOI_wrapper.jl` file:
```julia
# ============================ /test/runtests.jl ============================

using Test

@testset "MOI" begin
    include("test/MOI_wrapper.jl")
end
```

!!! info
    The optimizer `BRIDGED` constructed with [`instantiate`](@ref)
    automatically bridges constraints that are not supported by `OPTIMIZER`
    using the bridges listed in [Bridges](@ref). It is recommended for an
    implementation of MOI to only support constraints that are natively
    supported by the solver and let bridges transform the constraint to the
    appropriate form. For this reason it is expected that tests may not pass if
    `OPTIMIZER` is used instead of `BRIDGED`.

## How to debug a failing test

When writing a solver, it's likely that you will initially fail many tests.
Some failures will be bugs, but other failures you may choose to exclude.

There are two ways to exclude tests:

 - Exclude tests whose names contain a string using:
   ```julia
   MOI.Test.runtests(
       model,
       config;
       exclude = String["test_to_exclude", "test_conic_"],
   )
   ```
   This will exclude tests whose name contains either of the two strings
   provided.

 - Exclude tests which rely on specific functionality using:
   ```julia
   MOI.Test.Config(exclude = Any[MOI.VariableName, MOI.optimize!])
   ```
   This will exclude tests which use the `MOI.VariableName` attribute,
   or which call `MOI.optimize!`.

Each test that fails can be independently called as:
```julia
model = FooBar.Optimizer()
config = MOI.Test.Config()
MOI.empty!(model)
MOI.Test.test_category_name_that_failed(model, config)
```

You can look-up the source code of the test that failed by searching for it
in the `src/Test/test_category.jl` file.

!!! tip
    Each test function also has a docstring that explains what the test is
    for. Use `? MOI.Test.test_category_name_that_failed` from the REPL to
    read it.

Periodically, you should re-run excluded tests to see if they now pass. The
easiest way to do this is to swap the `exclude` keyword argument of `runtests`
to `include`. For example:
```julia
MOI.Test.runtests(
    model,
    config;
    exclude = String["test_to_exclude", "test_conic_"],
)
```
becomes
```julia
MOI.Test.runtests(
    model,
    config;
    include = String["test_to_exclude", "test_conic_"],
)
```

## How to add a test

To detect bugs in solvers, we add new tests to `MOI.Test`.

As an example, ECOS errored calling [`optimize!`](@ref) twice in a row. (See
[ECOS.jl PR #72](https://github.com/jump-dev/ECOS.jl/pull/72).) We could add a
test to ECOS.jl, but that would only stop us from re-introducing the bug to
ECOS.jl in the future, but it would not catch other solvers in the ecosystem
with the same bug. Instead, if we add a test to `MOI.Test`, then all solvers
will also check that they handle a double optimize call.

For this test, we care about correctness, rather than performance. therefore, we
don't expect solvers to efficiently decide that they have already solved the
problem, only that calling [`optimize!`](@ref) twice doesn't throw an error or
give the wrong answer.

**Step 1**

Install the `MathOptInterface` julia package in [`dev` mode](https://pkgdocs.julialang.org/v1/managing-packages/#developing-1):
```julia
julia> ]
(@v1.6) pkg> dev MathOptInterface
```

**Step 2**

From here on, proceed with making the following changes in the
`~/.julia/dev/MathOptInterface` folder (or equivalent `dev` path on your
machine).

**Step 3**

Since the double-optimize error involves solving an optimization problem,
add a new test to [src/Test/test_solve.jl](https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Test/test_solve.jl):
```julia
"""
    test_unit_optimize!_twice(model::MOI.ModelLike, config::Config)

Test that calling `MOI.optimize!` twice does not error.

This problem was first detected in ECOS.jl PR#72:
https://github.com/jump-dev/ECOS.jl/pull/72
"""
function test_unit_optimize!_twice(
    model::MOI.ModelLike,
    config::Config{T},
) where {T}
    # Use the `@requires` macro to check conditions that the test function
    # requires to run. Models failing this `@requires` check will silently skip
    # the test.
    @requires MOI.supports_constraint(
        model,
        MOI.VariableIndex,
        MOI.GreaterThan{Float64},
    )
    @requires _supports(config, MOI.optimize!)
    # If needed, you can test that the model is empty at the start of the test.
    # You can assume that this will be the case for tests run via `runtests`.
    # User's calling tests individually need to call `MOI.empty!` themselves.
    @test MOI.is_empty(model)
    # Create a simple model. Try to make this as simple as possible so that the
    # majority of solvers can run the test.
    x = MOI.add_variable(model)
    MOI.add_constraint(model, x, MOI.GreaterThan(one(T)))
    MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
    MOI.set(
        model,
        MOI.ObjectiveFunction{MOI.VariableIndex}(),
        x,
    )
    # The main component of the test: does calling `optimize!` twice error?
    MOI.optimize!(model)
    MOI.optimize!(model)
    # Check we have a solution.
    @test MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMAL
    # There is a three-argument version of `Base.isapprox` for checking
    # approximate equality based on the tolerances defined in `config`:
    @test isapprox(MOI.get(model, MOI.VariablePrimal(), x), one(T), config)
    # For code-style, these tests should always `return` `nothing`.
    return
end
```

!!! info
    Make sure the function is agnostic to the number type `T`; don't assume it
    is a `Float64` capable solver.

We also need to write a test for the test. Place this function immediately below
the test you just wrote in the same file:
```julia
function setup_test(
    ::typeof(test_unit_optimize!_twice),
    model::MOI.Utilities.MockOptimizer,
    ::Config,
)
    MOI.Utilities.set_mock_optimize!(
        model,
        (mock::MOI.Utilities.MockOptimizer) -> MOIU.mock_optimize!(
            mock,
            MOI.OPTIMAL,
            (MOI.FEASIBLE_POINT, [1.0]),
        ),
    )
    return
end
```

Finally, you also need to implement [`Test.version_added`](@ref). If we added
this test when the latest released version of MOI was `v0.10.5`, define:
```julia
version_added(::typeof(test_unit_optimize!_twice)) = v"0.10.6"
```

**Step 6**

Commit the changes to git from `~/.julia/dev/MathOptInterface` and
submit the PR for review.

!!! tip
    If you need help writing a test, [open an issue on GitHub](https://github.com/jump-dev/MathOptInterface.jl/issues/new),
    or ask the [Developer Chatroom](https://jump.dev/chatroom/).

gha_language: Julia

gha_license_id: NOASSERTION


text:
# dotnetcore-build-x86-Linux
.NET Core does not have official support for x86 processors on Linux. However the developers have been working hard making it a reality and it's 99% ready. If you're willing to take the increased risk of finding a bug you may want to try anyway. But without an official download you'll need to build you're own copy of .Net Core. This repository contains what I found successful when building .NET Core for x86 Linux. It's here to help anybody attempting to do the same.

## General instructions
You'll need a supported Linux machine with a supoprted processor. I used Debian 9 running with an amd64 processor. Check out the [coreclr build documentation](https://github.com/dotnet/coreclr/tree/master/Documentation/building) for more inforamtion on what is supported.

### Building
`BuildDotNetCore.sh` contains all the commands you should need. Make a local copy of it on the machine you will be using to build. Then just run it like this.

```BASH
  chmod 755 BuildDotNetCore.sh
  sudo ./BuildDotNetCore.sh buildclr
  sudo ./BuildDotNetCore.sh buildfx
  sudo ./BuildDotNetCore.sh buildoutput
```

If you are feeling lucky you can run all 3 steps with one line. But if this is you're first time I would recomend just doing the 3 seperate. That way if something goes wrong you'll know where to resume from.

```BASH
  sudo ./BuildDotNetCore.sh build
```

Be prepared to leave it running for a while. This isn't a quick process. This will create a folder named  `dotnetcore`.

### Running
Copy the `dotnetcore` folder and BuildDotNetCore.sh to your x86/Linux machine. You can then start your app with something like this.

```BASH
  dotnetcore/corerun /path/to/foo.dll
```

You can also create a more traditional scenario by copying the .NET core files to /usr/share/dotnet. `BuildDotNetCore.sh` can do this for you also.

```BASH
  sudo ./BuildDotNetCore.sh install
  dotnet /path/to/foo.dll
```

The files can be removed just as easily

```BASH
  sudo ./BuildDotNetCore.sh uninstall
```

## Caveats

### Offical support
.Net Core still does not 100% support x86 on Linux. I've been using it without much issue, but I did run into one problem closing named pipes. This wasn't a deal breaker for me. Just be aware you have an increased risk of finding a bug. So this probably isn't suitable for a business enviroment.

If you think you have found a bug you should report it to either [coreclr](https://github.com/dotnet/coreclr/issues) or [corefx](https://github.com/dotnet/corefx/issues). Don't report it here. Microsoft is working on supporting this scenario and will appricate your help.

### Me
I'm just one guy trying to help others by sharing what I've learned. I don't have the time or knowledge to provide much low level assistance. I have plenty of experiance as a developer but am rather green when it comes to Linux and C++. I may have made a mistake that becomes apparent in your situation. I'll attempt to help out if you report the problem. If you see something that could be improved let me know.

### Version
I made `BuildDotNetCore.sh` get and build the v2.1-preview1 branch. The offical .Net Core 2.1 should be comming out in a few months after I write this. You can easily change the branch in the first few lines of `BuildDotNetCore.sh`. I've also successfully build the master, v2.0.6, and v2.0.5 branches.

license: Unlicense

gha_license_id: Unlicense


text:
---
layout: page
title: Interesting Links
---

Here I have collected together some links to other poets  that I admire and to poetry resources.

## OTHER POETS .

- [Kate Tempest](https://www.katetempest.co.uk)
- [Sean Lionadh](https://seanlionadh.com)
- [Joanna Hoffman](https://joannahoffman.wordpress.com)
- [Paul Muldoon](https://www.paulmuldoonpoetry.com)
- [Simon Armitage](https://www.simonarmitage.com)
- [Moniza Alvi](https://www.moniza.co.uk)
- [Benjamin Zephaniah](https://benjaminzephaniah.com)
- [ Brian Patten](http://www.brianpatten.co.uk)
- [Akala](http://www.akala.moonfruit.com)
- [George the Poet](https://www.georgethepoet.com/)
- [Roger Robinson](https://rogerrobinsononline.com/)
- [Alex Asher](https://spokenlabel.bandcamp.com/album/alex-asher-spoken-label-march-2019)
- [Polly Bull](https://pollybull.org/)
-[Manny the Poet](http://emmanuelcarriere17.wixsite.com)
- [Joseph Fasano](http://josephfasano.net/)
-

## POETRY RESOURCES

- [Poetry Foundation](https://www.poetryfoundation.org)
- [Poetry Society](https://poetrysociety.org.uk)
- [Famous English Poets and Poems](http://famouspoetsandpoems.com/country/England/English_poets.html)
- [Magma Poetry](https://magmapoetry.com/)
- [Poetry London](https://poetrylondon.co.uk/)