text:
This app is designed for people who are learning a language like Chinese or Japanese, where to learn a word you often have to learn how to write it, how to say it, and what it means, all seperately. This doesn't work so well on traditional flashcards, which only have two sides.

ThreeSides is also helpful if you're learning a third language through a second language. For example, studying German at an American university when your first language is Spanish. Then you can have a single flashcard with the German word, the English word, and the Spanish word.

# Installing

This is a webapp for iPad. Installing it is kind of tricky, but if you're not the Friendly Nerd then they should be able to help you.

ThreeSides needs to run a small webserver on your computer, which the iPad can connect to via WiFi. Once it's on your iPad, you only have to connect to the computer for updates. These install instructions are for a Mac, Linux will be very similar. If you're on Windows, sorry, I can't help you.

## Get Ready: Requirements

Python > 2.5 < 3.0
: If you have a Mac running Snow Leopard or later, you've got this already. Most Linux versions will also have this, otherwise it'll be in your repository.

Flask 0.9
: To install this Python package on Mac, open Terminal (in Applications/Utilities) type the following and press enter:

		sudo easy_install pip

	Enter your password as requested. Once it's finished, type

		sudo pip install flask

	Enter your password again, and once it's done Flask is installed.

## Get Set: Download & Startup

Download the zip of this repository, with the button next to "Clone in Mac" on the [github](https://github.com/lupiter/ThreeSides) page. Open the zip file, which will create a folder with a silly name. Rename the folder to ThreeSides, and move it to your Sites folder in your home directory. If you don't have a Sites folder, you can make one or use your Documents folder. Just remember to replace "Sites" in all the rest of these instructions with "Documents".

Open Terminal again (if you closed it). Now type

	cd Sites/ThreeSides
	python server.py

Okay! The server should be running now. You'll see a message like

	 * Running on http://<IP_ADDRESS>:5000/

Double-check that it's working: open Safari (or Firefox, or Chrome) and type in the url field

	localhost:5000

When you hit enter, it should load ThreeSides!

Next, you need to find the IP address of your computer on the network. Linux users: you're on your own for this bit.

On Mac, it's easy! Open System Preferences from the Apple menu. Under Internet & Wireless choose Network. On the left you should see Wi-Fi with a green jewel. On the right it should say "Status: Connected". Beneith that is a little sentence that tells you the name of the WiFi network you're on, and the IP address of your computer. This could be, for example `<IP_ADDRESS>` or `<IP_ADDRESS>` and you'll need to write that down somewhere.

## Go! Installing on your iPad

Get your iPad, and open Safari. Type in the url field the IP address of your computer, followed by `:5000`. So if the IP address was `<IP_ADDRESS>`, type

	<IP_ADDRESS>:5000

Press Go. Now ThreeSides will load. Excellent! To save it like an app to your homescreen, tap the action button (box with an arrow coming out), and choose Add to Home Screen. Pick Add, and it will appear on your home screen.

## Done: Finishing Up

Once you've installed ThreeSides on every iPad you like, you can stop the webserver on your computer. Just quit Terminal. It will say it's busy, are you sure? You're sure, you can quit. If you want to update ThreeSides, you can start from *Get Set* above.

# Using

I've tried to make ThreeSides as easy as possible to use. When you open it, you'll see a list of your "decks" of cards. When you add a new deck, you'll have the option of creating a "Learnt" deck. This is so you can easily move words you've learnt into a seperate pile---so you don't delete them, but can save them for exam time!

When you edit a deck, you can add new cards one at a time with the form. Or, you can type CSV in the big text field. This is useful if you have all your words in Excel or Numbers already. Just export to CSV, open the CSV file in TextEdit and copy the contents into an email to yourself. Then open the email on your iPad and copy the text into ThreeSides.

The CSV edit field also lets you copy out your cards so you can back them up, or share them with others.

When you tap a deck button, it will take you to the single card view. One of the three sides will be shown, and the other two masked. Tap them to reveal or hide each one. Press "next" for another random card from your deck. Press "move" to shift this card to your "learnt" deck, or any other deck.

#### Note
Please back up your cards! ThreeSides stores all your cards in Safari. They'll be there if you quit Safari, or restart your iPad. If you have to wipe your iPad, they'll be gone, and if you go into the Settings app and choose Safari and then "Clear Cookies and Data" that will also delete all your cards. Also, if you delete a deck in the app there's no way to get it back.

repository: lupiter/ThreeSides

repo_name: lupiter/ThreeSides


text:
Brackets-HTML5CodeHints
=======================

The Original is from https://github.com/coliff/Brackets-HTML5CodeHints and I extended it with own Code to support the Fat-Free Framework Templating Engine

Extend Brackets HTML code hints with more HTML5 elements and attributes such as Picture, Srcset, Template, inputmode as well as some HTML4 elements such as cellpadding, cellspacing and iframe. Also includes hints for Web Components and Schema.org.

Complete list of elements added:

**HTML4 Tags**
* acronym
* center
* frame ("frameborder", "name", "scrolling", "src")
* frameset ("rows")

**HTML4 Attributes**
* iframe ("frameborder", "scrolling")
* table ("cellpadding", "cellspacing", "height", "width")

**HTML5 Tags**
* content (Shadow DOM)
* picture
* template (Web Components)

**HTML5 Attributes**
* autocorrect
* autocapitalize
* inputmode
* itemscope, itemtype, itemprop (Microdata - Schema.org)
* onsearch
* srcset

**HTML5 Attribute Options**
* audio ("buffered", "played")
* autocomplete ("billing", "cc-name", "cc-number", "cc-css", "cc-exp-month", "cc-exp-year", "cc-type", "country", "email", "name", "postal-code", "region", "shipping", "street-address", "tel", "url")
* http-equiv ("X-UA-Compatible", "content-language")
* img ("sizes", "srcset")
* input ("autocorrect", "inputmode", "minlength")
* inputmode ("email", "numeric", "tel")
* link/rel ("canonical", "dns-prefetch", "import", "profile", "shortlink")
* meta/name ("format-detection", "publisher", "referrer", "robots", "theme-color", "viewport")
* meta/property ("al:ios:url", "al:ios:app_store_id", "al:ios:app_name", "al:android:url", "al:android:app_name", "al:android:package", "al:web:url") [applinks.org]
* script/type ("application/ld+json")
* source ("sizes", "srcset")
* textarea ("autocomplete", "spellcheck")
* video ("buffered", "crossorigin", "played")

If you spot a HTML tag or attribute missing that you'd like added please open an issue or pull-request.
https://github.com/coliff/Brackets-HTML5CodeHints

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
travetto: Email-Template
===

**Install: templating support for email module**
```bash
$ npm install @travetto/email-template
```

This is the primary templating email engine.  The templating process is built upon three primary ideas, with the final output being an [`inky`](https://github.com/zurb/inky) rendered html/text email.

## Asset Management
The templating process involves loading various assets (html, css, images), and so there is provision for asset management and loading.  The templating config allows for specifying of asset paths, with the following paths (in order of precedence):

1. `%ROOT%/resources`
1. `@travetto/email-template/resources`
1. `foundation-emails/scss` (specifically for `sass` files)

When looking up a resources, every asset folder is consulted, in order, and the first to resolve an asset wins.  This allows for overriding of default templating resources, as needed.  All email `.html` files, are loaded automatically and can be referenced by individual file name.  E.g. `/resources/email/receipt.html` can be referenced by the name `email/receipt`.

## Template Compilation

The general process is as follows:

1. Load in a general wrapper for email, located at `/resources/email/wrapper.html`.
1. Load in the general stylings as `sass`, from `/resources/email/app.scss`.
1. Resolving all mustache partial templates, at `/resources/email/**/*.html`.
1. Render the `inky` directives into the final `html` output.
1. Inline and optimize all images for email transmission.
1. Generate markdown version of email to support the alternate text format.
1. Render the final output via the `mustache` templating process, interpolating the contextual data into the final output.

## Common Email Elements
In building out emails, you may have common elements that you want to repeat.  If you have a common block, put that in a separate file and pull it in using partial notation, e.g. `{{{> email/common-element}}}`

## Images
When referencing an image from the `resources` folder in a template, e.g.

```html
<img src="/email/logo.png">
```

The image will be extracted out and embedded in the email as a multi part message.  This allows for compression and optimization of images as well as externalizing resources that may not be immediately public.

## Template Development
The module provides [`cli`](https://github.com/travetto/travetto/tree/master/module/cli) support for email template development. Running

**Shell: running template development environment**
```bash
$ npx trv email-template
```

In the development environment, you can toggle between HTML and text views, as well as provide JSON context for the email to see how it would look with real data. This process supports live reload, and should help facilitate any email design work.

## Supporting Libraries
Templating emails is achieved through a combination of multiple libraries, specifically:

* [`inky`](https://github.com/zurb/inky) is a email rendering framework that aims to provide a standard set of constructs for building visually appealing emails.  The version of inky being used is a complete rewrite to optimize for size and performance.
* [`sass`](https://github.com/sass/dart-sass) used for sass compilation.
* [`mustache`](https://github.com/janl/mustache.js/) allows for interpolation of variables for personalized emails.
* [`pngquant`](https://pngquant.org/) is used to compress images on the fly for bandwidth optimizations. `pngquant` is not installed as a dependency, but relies upon either the binary being already installed, or spinning up a `docker` container to use as a way of executing the binary.

**NOTE** Many of the libraries were chosen due to size and number of overall dependencies.  Any performance issues are mitigated accordingly.

## Example
A sample template could look like:

**Code: Example inky template with mustache support**
```xml
<row>
  <columns large="{{left}}">Bob</columns>
  <columns large="{{right}}"></columns>
</row>
```

which will then interpolate the context to replace `left` and `right`, and compile to a final html output. When using mustache expressions, make sure to use `{{{ }}}`, triple braces on complex text, to prevent mustache from escaping any characters.

## Example inky template with partials
Given two files, `resources/email/welcome.html` and `resources/email/footer.hml`

**Code: assets/welcome.html**
```xml
<row>
  <row>
    <columns large="{{left}}">Bob</columns>
    <columns large="{{right}}"></columns>
  </row>
  {{{> email/footer }}}
</row>
```

**Code: assets/footer.html**
```xml
<row>
  This is a footer
  <a href="{{salesLink}}">Sales Link</a>
</row>
```

The final template will render as

**Code: final output**
```xml
<row>
  <row>
    <columns large="{{left}}">Bob</columns>
    <columns large="{{right}}"></columns>
  </row>
  <row>
    This is a footer
    <a href="{{salesLink}}">Sales Link</a>
  </row>
</row>
```

gha_language: TypeScript


text:
Opinion Phrases
=======

In [Predicting what user reviews are about with LDA and gensim](http://www.vladsandulescu.com/topic-prediction-lda-user-reviews/) I played with extracting topics from short reviews and given a new review, tried to predict the most probable topic(s) it can be associated with. LDA relies on a bag-of-words model, which is a very popular document representation approach. The model disregards any syntactic dependencies between the words, i.e. any grammar, as well as word order in the documents. For a deeper read about the assumptions made by the LDA model, try to digest [Blei's paper](http://machinelearning.wustl.edu/mlpapers/paper_files/BleiNJ03.pdf)...if you dare!

Anyway, much of the research on opinion mining used the bag-of-words model, but as [Samaneh Abbasi Moghaddam](http://www.sfu.ca/~sam39/) also suggests in her PhD thesis [Aspect-based opinion mining in online reviews](http://summit.sfu.ca/item/12790), it is not clear whether this approach is actually the most effective. Instead, she experimented with a LDA model based on opinion phrases. The full details are found in her paper, but I will make a short summary of the method.
In a nutshell, she concluded that bag-of-opinion phrases outperform the bag-of-words topic models and using the grammar relationships outperforms the existing preprocessing techniques in extracting aspects from user reviews.

**What is an opinion phrase, anyway?**

An opinion phrase is defined as a pair (aspect, sentiment) like *camera nice* or *room clean*. This is the stuff that people are generally interested in when reading a review, these key points that sum up a user's experience with the product. A very simple way to extract these pairs is to look for nouns and then pick the nearest adjective around it. This approch has obvious shortcomings.

 Given a sentence, it can extract syntactic dependencies between words, output the words' base forms and even predict the overall sentiment of a text.

**What syntactical relations should be exploited?**

The following grammatical dependencies are used to extract and construct the opinion phrases inside a short sentence. They are all present and explained in her PhD thesis.
The [Stanford typed dependencies manual](http://nlp.stanford.edu/software/dependencies_manual.pdf) explains very well the grammatical representations used below.

In order to end-up with opinion phrases, first, basic patterns are extracted:

1. Adjectival complement (acomp): *The camera looks nice*, parsed to *acomp(nice, looks)*.

2. Adjectival modifier (amod): *This camera has great zoom* parsed to *amod(zoom, great)*;

3. "And" conjunct (conj and): *This camera has great zoom and resolution* parsed to *conj and(zoom, resolution)*.

4. Copula (cop): *The screen is wide* parsed to *cop(wide, is)*.

5. Direct object (dobj):  *I love the quality* parsed to *dobj(love, quality)*.

6. Negation modifier (neg): *The battery life is not long* parsed to *neg(long, not)*.

7. Noun compound modifier (nn): *The battery life is not long* parsed to *nn(life, battery)*.

8. Nominal subject (nsubj): *The screen is wide* parsed to *nsubj(wide, screen)*.

The simple patterns are then combined in a tree-like manner to obtain more valuable opinion phrases. (N indicates a noun, A an adjective, V a verb, h a head term, m a modifier, and < h, m > an opinion phrase)[1].

1.amod(N, A) →< N, A >
*This camera has great zoom and resolution → (zoom, great)*

2.acomp(V, A) + nsubj(V, N) →< N, A >
*The camera case looks nice --> (case, nice)*

3. cop(A, V ) + nsubj(A, N) →< N, A >
*The screen is wide and clear --> (screen, wide)*

4. dobj(V, N) + nsubj(V, N0) →< N, V >
*I love the picture quality --> (picture, love)*

5.
 +conj and(h1, h2) →

*This camera has great zoom and resolution --> (zoom, great), (resolution, great)*

6. < h, m1 > +conj and(m1, m2) →< h, m2 >
*The screen is wide and clear --> (screen, wide), (screen, clear)*

7. < h, m > +neg(m, not) →< h, not + m >
*The battery life is not long --> (battery life, not long)*

8. < h, m > +nn(h, N) →< N + h, m >
*The camera case looks nice --> (camera case, nice)*

9. < h, m > +nn(N, h) →< h + N, m >
*I love the picture quality --> (picture quality, love)*

Of course, these syntactical relations can be improved further on by looking up more combined patterns - did not think about this too much, but I have a gut feeling there are more combined patterns out there.

**Pruning the extracted patterns**

As you can see in the code if you look in the [GitHub repository](https://github.com/vladsandulescu/phrases), the pruning step is quite important, as the "tree leafs" are the most significant patterns to keep, the final ones.
I wanted opinion phrases like *fish had* and *bill paid* to go away, so I added the usual [stopwords](http://www.lextek.com/manuals/onix/stopwords2.html) removal to the pruning step. This basically means eliminating the patterns which contain any stopword.

**Some results**

Given a real-life user review:

*Great food and atmosphere.  Plenty of TVs to watch the games. The chef and his partners just opened this great location. Pumpkin Soup with pumpkin oil and croutons is such a great start to the Fall season. Wood fired oven pumping out flatbreads. Sweet Potato gnocchi made in house with roasted corn and gorgonzola crema is unbelievable. Very impressive selection of beer handles and delicious cocktails. Amazing view of the sunset as well. Can't wait to return.*

the extracted opinion phrases were:

["atmosphere Great", "food Great", "location great", "start great", "corn roasted", "gorgonzola crema roasted", "selection impressive", "view Amazing"]

Pretty good right?

Here's another one:

*This place is amazing. I come here at least once a month & am never disappointed. Food & service is always great. The buffalo burger it TDF as well as the bruschetta. Outside seating is so cute with a lights (great for date nights) live music inside is a wonderful touch. This place is great to meet with friends, family or date night.*

opinion phrases:

["place amazing", "service great", "burger buffalo", "seating cute", "touch wonderful", "seating Outside", "place great"]

By now, it should be pretty obvious to see how easier aggregating after specific aspects such as *place* and *service* is.

Another one:

*The mailing pack that was sent to me was very thorough and well explained,correspondence from the shop was prompt and accurate,I opted for the cheque payment method which was swift in getting to me. All in all, a fast efficient service that I had the upmost confidence in,very professionally executed and I will suggest you to my friends when there mobiles are due for recycling :-)*

opinion phrases:

["correspondence, prompt", "correspondence, accurate", "service, efficient"]

OK, one more and that's it:

*Aside from the wait to order and the other wait to get your food!  I was there for a late lunch on Friday and I opted to forgo my usual salad choice and go for the eggplant parm sandwich - yum!  Each bite of perfectly crusted eggplant had the most amazing tangy tomato sauce and melted cheese and it was oh so dlvine!  I had it on wheat bread and finished my entire sandwich (and yes, I ordered a full size!)   Don't try to special order at the restaurant - my boyfriend attempted to create his own sandwich and what he ended up with was nothing close to what he ordered. I can't wait to go back to 'make my own pizza' - i know about that thanks to him! I have a feeling that I'll be visiting this place quite a bit since I'm now living in the area after a recent move.  It's a good thing - well, it's a tasty thing, maybe not so good for the waistline!*

opinion phrases:

["salad choice usual", "lunch late", "salad choice forgo", "tomato sauce amazing", "eggplant crusted", "tomato sauce tangy", "sandwich finished", "sandwich entire", "size ordered", "size full", "sandwich create", "order special", "pizza make", "move recent", "bit visiting", "thing good", "thing tasty"]

In this last one, you may notice phrases like *thing good*, *sandwich entire*, *sandwich finished* and *sandwich create*, which don't really help much in any aggregation, so it would be nice to eliminate them.
This could easily be done by cleverly and time-consumingly shove words like *thing*, *entire* and *create* into the stopwords list. Otherwise, the LDA model should filter these out, assuming a lot of people don't mention the exact phrases.

Check out the [code repository](https://github.com/vladsandulescu/phrases), try extracting opinion phrases by running the code yourself and don't forget to tweet to me if you have any comments.

The code is written in Java and it requires Stanford CoreNLP 3.4, Stanford Parser, JUnit and Mongo Java driver (if you plan to run it over many reviews stored in Mongo, because why wouldn't you already keep the reviews in Mongo right?).
If you do not want to use Mongo, just call the *run* method in *Extract* class giving it the text to extract opinion phrases from.

That is basically it.

==================
[1]: [Abbasi Moghaddam, Samaneh. Aspect-based opinion mining in online reviews. Diss. Applied Sciences: School of Computing Science, 2013.](http://summit.sfu.ca/item/12790)

repository: sreeaurovindh/yelp-dv

repo_name: sreeaurovindh/yelp-dv


text:
# transformers lesson

use functions to return values.

## Topic

Return

## Quick Links

* [tutorial](/lessons/transformers/tutorial)
* [quiz](/lessons/transformers/quiz)
* [quiz answers](/lessons/transformers/quiz-answers)
* [challenges](/lessons/transformers/challenges)

## Class

Year 7

## Prior learning/place of lesson in scheme of work

Learn how to create **functions**, ` function() ` to make your code easier to read, debug, and update. We will be learning how to create functions as well as a global variable, input on button pressed as well simple commands such as show number.

## What the teacher needs to know

* Algorithm: An unambiguous set of rules or a precise step-bystep guide to solve a problem or achieve a particular objective.
* Command: An instruction for the computer to execute, written in a particular programming language.
* Data: A structured set of numbers, possibly representing digitised text, images, sound or video, which can be processed or transmitted by a computer, also used for numerical (quantitative) information.
* Decomposing: The process through which problems or systems are broken down into their component parts, each of which may then be considered separately.
* Hardware: The physical systems and components of digital devices; see also software.
* Input: Data provided to a computer system, such as via a keyboard, mouse, microphone, camera or physical sensors.
* Output: The information produced by a computer system for its user, typically on a screen, through speakers or on a printer, but possibly through the control of motors in physical systems.
* Programmable toys: Robots designed for children to use, accepting input, storing short sequences of simple instructions and moving according to this stored program.
* Program: A stored set of instructions encoded in a language understood by the computer that does some form of computation, processing input and/or stored data to generate output.
* Script: A computer program typically executed one line at a time through an interpreter, such as the instructions for a Scratch character.
* Selection: A programming construct in which one section of code or another is executed depending on whether a particular condition is met.
* Sequence: To place program instructions in order, with each executed one after the other.
* Simulation: Using a computer to model the state and behaviour of real-world (or imaginary) systems, including physical or social systems; an integral part of most computer games.
* Variables: A way in which computer programs can store, retrieve or change data, such as a score, the time left, or the user’s name.

**QuickStart Computing Glossary

## Documentation

* **function** : [read more...](/js/function)
* **return** : [read more...](/js/return)
* **call** : [read more...](/js/call)
* **global variable** : [read more...](/js/data)
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
* **local variable** : [read more...](/reference/variables/var)
* **show number** : [read more...](/reference/basic/show-number)

## Resources

* Activity: [tutorial](/lessons/transformers/tutorial)
* Activity: [quiz](/lessons/transformers/quiz)
* Extended Activity: [challenges](/lessons/transformers/challenges)

## Objectives

* learn how to create a function that performs a specific task to make your code easier to read, debug, and update
* learn how the return statement exits a function and returns a value to the code
* learn how to call an existing function in your script
* learn how to create a global variable to store data so that you can use it later in your code and accessible across functions and in nested code blocks
* learn how to run code when an input button is pressed
* learn how to create a local variable to store data, so that you can use it in your code
* learn how to show a number on the LED screen

## Links to the National Curriculum Programmes of Study for Computing

## Progression Pathways / Computational Thinking Framework

#### Algorithms

* Uses diagrams to express solutions.(AB)
*  Uses logical reasoning to predict  outputs, showing an awareness of inputs (AL)
*  Designs solutions  by decomposing a problem and creates a sub-solution for each of these parts. (DE) (AL) (AB)
* Represents solutions using a structured notation (AL) (AB)

#### Programming & Development

* Creates programs that implement algorithms to achieve given goals (AL)
*  Declares and assigns variables(AB)
* Uses a variable and relational operators within a loop to govern termination (AL) (GE)
* Uses a range of operators and expressions e.g. Boolean, and applies them in the context of program control. (AL)
* Selects the appropriate data types(AL) (AB

#### Data & Data Representation

* Uses filters or can perform single criteria searches for information.(AL)
* Defines data types: real numbers and Boolean (AB)

#### Hardware & Processing

* Knows that computers collect data from various input devices, including sensors and application software (AB)

#### Information Technology

* Collects, organizes, and presents data and information in digital content (AB)
* Makes appropriate improvements to solutions based on feedback received, and can comment on the success of the solution (EV)
* Recognises ethical issues surrounding the application of information technology beyond school.

Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algorithmic Thinking; EV = Evaluation; GE = Generalisation

## Activity

* time: 20 min.
* [tutorial](/lessons/transformers/tutorial)
* [quiz](/lessons/transformers/quiz)

## Extended Activity

* time: 20 min.
* [challenges](/lessons/transformers/challenges)

## Homework

* Extended Activity: [challenges](/lessons/transformers/challenges)

## Intended follow on

Publish script to the classroom.

repository: manoela-reis/pxt-calliope

gha_license_id: NOASSERTION

repo_name: manoela-reis/pxt-calliope


text:
treehouse-course-ids
====================

This app scrapes [Treehouse](http://teamtreehouse.com) to grab details about their tracks. Additional details may be scraped in the future.

Result as of 2015-01-15 is located in 2015-01-15.json

repository: sscotth/treehouse-course-ids

repo_name: sscotth/treehouse-course-ids


text:
# mp-t-watch-2020
Micropython on the LilyGo T-Watch-2020.
Firmware implementation based on the micropython lvgl implementation available at
https://github.com/OPHoperHPO/lilygo-ttgo-twatch-2020-micropython

# Load firmware
```
shell# git clone https://github.com/ndrogness/mp-t-watch-2020.git
shell# cd mp-t-watch-2020
shell# esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
shell# esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x1000 firmware.bin
```
# Setup watch face
Create config.json in which you setup your wifi settings
```
shell# cp example-config.json config.json
```


text:
# lxc

[![Build Status](https://travis-ci.org/tripledes/sjimenez-lxc.png?branch=master)](https://travis-ci.org/tripledes/sjimenez-lxc)

#### Table of Contents

1. [Overview](#overview)
2. [Module Description](#module-description)
3. [Resources](#resources)
4. [Usage](#usage)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Contributions](#contributions)
7. [NOTES](#notes)
8. [TODO](#todo)

## Overview

This module handles LXC (Linux Containers) from Puppet.
It is being developed and tested under Ubuntu 14.04 and Puppet >= 3.6.2.

## Module Description

The module installs LXC tools, LXC Ruby bindings and manages LXC service.

The bindings are needed for defining containers as the module includes types and
providers for container management.

For more information about LXC visit: [linuxcontainers.org](https://linuxcontainers.org/).

## Resources

### lxc

* Defines the container itself, allows the following parameters/properties:
  * name: container's name.
  * template: template to be used during container creation.
  * timeout: timeout (in seconds) to wait for container opertions to complete.
  * storage_backend: dir, lvm, btrfs, loop  or best.
  * storage_options: options to be passed to the chosen storage backend.
  * state: running, stopped or frozen.
  * ipv4: IPv4 address for eth0 (can be string or array).
  * ipv4_gateway: default IPv4 gateway.
  * restart: whether to restart the container after applying network configuration.

### lxc_interface

* Defines network interfaces other than eth0 and allows the following paramters/properties:
  * name: eth1, eth2...
  * container: container's name.
  * index: index number for the interface.
  * link: host interface where to link the container interface.
  * vlan_id: VLAN ID.
  * macvlan_mode: private, vepa or bridge.
  * type: defaults to veth.
  * ipv4: IPv4 address (can be string or array).
  * hwaddr: MAC.
  * restart: whether to restart the container after applying configuration.

## Usage

```Puppet
# Include lxc class
include 'lxc'

# Create ubuntu_test container based on ubuntu template, set its state to
# running, configure its network to IP address <IP_ADDRESS>/24 and default gateway
# <IP_ADDRESS>, using as storage the VG vg00 and LV ubuntu_test01.
lxc { 'ubuntu_test':
  ensure          => running,
  template        => 'ubuntu',
  ipv4            => '<IP_ADDRESS>/24',
  ipv4_gateway    => '<IP_ADDRESS>',
  storage_backend => 'lvm',
  storage_options => {'vgname' => 'vg00', 'lvname' => 'ubuntu_test01'},
}

# Will configure eth1 on container 'ubuntu_test', with two different IP addresses
lxc_interface { 'eth1':
  ensure    => present,
  container => 'ubuntu_test',
  index     => 1,
  link      => 'lxcbr0',
  type      => 'veth',
  ipv4      => ['<IP_ADDRESS>/16','<IP_ADDRESS>/24'],
  restart   => true,
}
```

## NOTES

* ```lxc``` provider will use the defaults from file */etc/lxc/default*
(on Ubuntu) to get network type and link default configuration, this should
change in future releases allowing to customize it as ```lxc_interface``` does.

* ```ipv4``` parameter on ```lxc``` provider might not work as expected if the
template in use configures network on the container to use DHCP. The container
will have 2 (or several) IPs on the first interface.

* All the networking settings, both in ```lxc``` and ```lxc_interface``` are only
applied/checked to/from the container's configuration file, for it to take effect the
container must be restarted (stopped/started), use ```restart => true``` if that's
what you need.

## TODO

* Add support for Ubuntu precise.
* Add support for current CentOS releases.
* Add lxc-cgroup provider.
* Get rid of duplications.
* Add Beaker to the game.

## Limitations

For now, the class lxc only works for Ubuntu 14.04, on other platforms with Ruby LXC
bindings installed, the types should work as expected.

The current state of the provider is quite basic, meaning it creates the container based
on the template assigned and manages its state. It doesn't do any further configuration as
IPs, shared folders, ... These features might come later.

## Contributions

Any contribution will be more than welcomed, specially in tests and Ruby parts,
I've tried to do my best, but it's far from perfect.

From version 0.2.0, a development branch is included in module's repository and all the
contributions should be made against it.

If a new feature is added, please, write the tests for it.

repository: vStone/sjimenez-lxc

repo_name: vStone/sjimenez-lxc


text:
---
layout: default
---

# 1993-10-19 - Re: Canon copier engine

## Header Data

From<EMAIL_ADDRESS>(Paul Baclace)

To<EMAIL_ADDRESS>Message Hash: b41ec1a58a482d88a434227ae538250d064fc72c76a65b4e05698d7f544bb007

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-10-19 17:47:31 UTC

Raw Date: Tue, 19 Oct 93 10:47:31 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Paul Baclace)
Date: Tue, 19 Oct 93 10:47:31 PDT
To<EMAIL_ADDRESS>Subject: Re: Canon copier engine
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>        The worrisome item was the statement that the copiers would add
>   some sort of unspecified marking to each copy made, allowing copies
>   to be traced back to their source.

Steganographic signatures.  Similarly, signatures are being put into explosives
(although they are somewhat traceable already) by using various mixtures of
trace elements.

Paul E. Baclace
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [October 1993](/archive/1993/10)

+ Return to "[Eric Blossom <eb@srlr14.sr.hp.com>](/authors/eric_blossom_eb_at_srlr14_sr_hp_com_)"
+ Return to<EMAIL_ADDRESS>(douglas craig holland)](/authors/holland_at_cs_colostate_edu_douglas_craig_holland_)"
+ Return to<EMAIL_ADDRESS>(Paul Baclace)](/authors/peb_at_procase_com_paul_baclace_)"

+ 1993-10-19 (Tue, 19 Oct 93 10:47:31 PDT) - Re: Canon copier engine -<EMAIL_ADDRESS>(Paul Baclace)_
  + 1993-10-19 (Tue, 19 Oct 93 14:57:36 PDT) - [Canon copier engine](/archive/1993/10/f6aa3f9d30fda5dda80830bffe1f880c06923ba51e343a2ce7edbef6ac9911fe) - _Eric Blossom<EMAIL_ADDRESS>    + 1993-10-20 (Wed, 20 Oct 93 08:22:32 PDT) - [Explosives tracers](/archive/1993/10/3e2712920c3589505a51bd971b3bb57d3299f49186a2a69bd222e22fc4ee0e10) -<EMAIL_ADDRESS>(douglas craig holland)_


text:
Import-BuildStep
----------------
### Synopsis
Imports Build Steps

---
### Description

Imports Build Steps defined in a module.

---
### Related Links
* [Convert-BuildStep](Convert-BuildStep.md)

* [Expand-BuildStep](Expand-BuildStep.md)

---
### Examples
#### EXAMPLE 1
```PowerShell
Import-BuildStep -ModuleName PSDevOps
```

---
### Parameters
#### **ModuleName**

The name of the module containing build steps.

> **Type**: ```[String]```

> **Required**: true

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **SourcePath**

The source path.  This path contains definitions for a given single build system.

> **Type**: ```[String]```

> **Required**: true

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **SourceFile**

The source path to a single item.

> **Type**: ```[String]```

> **Required**: true

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **BuildStepType**

The type the source file will be in a given build system.  By default, step.

> **Type**: ```[String]```

> **Required**: false

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **BuildStepName**

An optional name for the build step.  If none is provided, the filename will be used

> **Type**: ```[String]```

> **Required**: false

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **IncludeCommand**

A list of commands to include.

> **Type**: ```[String[]]```

> **Required**: false

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **ExcludeCommand**

A list of commands to exclude

> **Type**: ```[String[]]```

> **Required**: false

> **Position**: named

> **PipelineInput**:true (ByPropertyName)

---
#### **BuildSystem**

The different build systems supported.
Each buildsystem is the name of a subdirectory that can contain steps or other components.

Valid Values:

* ADOPipeline
* ADOExtension
* GitHubAction
* GitHubWorkflow

> **Type**: ```[String[]]```

> **Required**: false

> **Position**: named

> **PipelineInput**:false

---
#### **BuildSystemAlias**

A list of valid directory aliases for a given build system.
By default, ADOPipelines can exist within a directory named ADOPipeline, ADO, AzDO, or AzureDevOps.
By default, GitHubWorkflows can exist within a directory named GitHubWorkflow, GitHubWorkflows, or GitHub.

> **Type**: ```[IDictionary]```

> **Required**: false

> **Position**: named

> **PipelineInput**:false

---
#### **BuildSystemInclude**

> **Type**: ```[IDictionary]```

> **Required**: false

> **Position**: named

> **PipelineInput**:false

---
#### **BuildCommandType**

> **Type**: ```[IDictionary]```

> **Required**: false

> **Position**: named

> **PipelineInput**:false

---
### Outputs
* [Nullable](https://learn.microsoft.com/en-us/dotnet/api/System.Nullable)

---
### Syntax
```PowerShell
Import-BuildStep -ModuleName <String> [-IncludeCommand <String[]>] [-ExcludeCommand <String[]>] [-BuildSystem <String[]>] [-BuildSystemAlias <IDictionary>] [-BuildSystemInclude <IDictionary>] [-BuildCommandType <IDictionary>] [<CommonParameters>]
```
```PowerShell
Import-BuildStep -SourcePath <String> [-BuildSystem <String[]>] [-BuildSystemAlias <IDictionary>] [-BuildSystemInclude <IDictionary>] [-BuildCommandType <IDictionary>] [<CommonParameters>]
```
```PowerShell
Import-BuildStep -SourceFile <String> [-BuildStepType <String>] [-BuildStepName <String>] [-BuildSystem <String[]>] [-BuildSystemAlias <IDictionary>] [-BuildSystemInclude <IDictionary>] [-BuildCommandType <IDictionary>] [<CommonParameters>]
```
---

repository: StartAutomating/PSDevOps

gha_language: PowerShell

repo_name: StartAutomating/PSDevOps


text:
# knative event

[knative events](https://knative.dev/docs/eventing/) provide composable primitives to enable late-binding event sources and event consumers.

This example is based on the python [helloworld](https://knative.dev/docs/eventing/samples/helloworld/helloworld-python/).

A more typed approach would be to extend https://github.com/cloudevents/sdk-rust which is work under progress.

In this directory run the following command:

```
$ roche build
$ docker run -p 8080:8080 YOUR_REGISTRY_ID/dev-event
$ curl -s -d {} http://localhost:8080/
{"msg":"Hi from rust app!"}
```

To see the response headers use the -v flag.
```
$ curl -s -v -d {} http://localhost:8080/

*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> POST / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 2
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 2 out of 2 bytes
< HTTP/1.1 203 Non Authoritative Information
< ce-id: e670db49-cba1-486f-ad85-50b4a27eb838
< ce-source: knative/eventing/samples/hello-world
< ce-specversion: 0.3
< ce-type: dev.knative.samples.hifromknative
< content-length: 27
< content-type: application/json
< date: Thu, 10 Dec 2020 00:31:36 GMT
<
* Connection #0 to host localhost left intact
```

No image tag provided.
Going to use: docker.io/number9/dev-full:latest
Sending build context to Docker daemon  3.631kB
Step 1/12 : FROM number9/roche-baseimage-debug as builder
 ---> 603e43542443
Step 2/12 : COPY functions.rs /app-build/src/app/
 ---> Using cache
 ---> 00d2e882c933
Step 3/12 : RUN cargo build
 ---> Using cache
 ---> 7770ec40b6f9
Step 4/12 : FROM alpine
 ---> d6e46aa2470d
Step 5/12 : RUN apk add --no-cache libgcc
 ---> Using cache
 ---> 13dd42fef2e5
Step 6/12 : RUN addgroup -S rocheuser && adduser -S rocheuser -G rocheuser
 ---> Using cache
 ---> 8e52e3654f2d
Step 7/12 : WORKDIR "/app"
 ---> Using cache
 ---> c5290577d0f0
Step 8/12 : COPY --from=builder --chown=rocheuser /app-build/run.sh /app-build/Cargo.toml /app-build/target/debug/roche-service ./
 ---> Using cache
 ---> a5f9490070c4
Step 9/12 : USER rocheuser
 ---> Using cache
 ---> f8065a53411e
Step 10/12 : ENV PORT 8080
 ---> Using cache
 ---> b208b17127a6
Step 11/12 : EXPOSE 8080
 ---> Using cache
 ---> ea77183716e1
Step 12/12 : CMD ["./run.sh"]
 ---> Using cache
 ---> 3c16f946f1e4
Successfully built 3c16f946f1e4
Successfully tagged number9/dev-full:latest
    Finished test [unoptimized + debuginfo] target(s) in 0.23s
     Running target/debug/deps/full-6db207771b810bbf

running 1 test
tide::log Logger started
    level Info
      Running server on: http://localhost:8080/
tide::server Server listening on http://<IP_ADDRESS>:8080
tide::log::middleware <-- Request received
    method GET
    path /
surf::middleware::logger::native sending request
    req.id 0
    req.method GET
    req.uri https://httpbin.org/get
surf::middleware::logger::native request completed
    req.id 0
    req.status 200
    elapsed 410.920775ms
tide::log::middleware --> Response sent
    method GET
    path /
    status 200 - OK
    duration 412.615899ms
test tests::it_works ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests full

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

a717dfb97c16
```

repository: halvko/roche

branch_name: refs/heads/main

repo_name: halvko/roche


text:
{
  "date" : "2019-10-11",
  "keywords" : [ "shp file", "shp file format", "what is an shp file", "file", "shp example", "shp file extension","extension", "format" ],
  "author" : {
    "display_name" : "Kashif Iqbal"
  },
  "draft" : "false",
  "toc" : true,
  "title" : "SHP - ESRI Shapefile",
  "description":"Learn about SHP file format and APIs that can create and open SHP files.",
  "linktitle" : "SHP",
  "menu" : {
    "docs" : {
      "parent" : "gis"
    }
  },
  "lastmod" : "2019-09-10"
}

## What is a SHP file?

SHP is the file extension for one of the primary file types used for representation of ESRI Shapefile. It represents Geospatial information in the form of vector data to be used by Geographic Information Systems (GIS) applications. The format has been developed as open specifications in order to facilitate interoperability between ESRI and other software products.

## Data Representation ##

As mentioned, a shapefile format describes geospatial information of a data set as vector features. These vector features include:

* points
* lines
* polygons

These features in combination can represent almost any type of shapes like water wells, country boundaries, spatial points, rivers flow, lakes, etc. Each vector feature can have attributes that actually define the purpose of that feature. For example, a shapefile containing cities of Los Angeles can have city name and temperature as attributes which gives meaningful representation to the spatial data.

## Associated Files ##

A standalone shp file can not be used by software applications to make meaning of the data it contains. In order to make sense of the information contained in such a file, a shapefile makes use of following additional mandatory files.

* shx file - index file
* dbf file - a dBASE file that stores all the attributes of the shapes in the main file
* prj file - stores project information of the file

There can be other optional files as well that share the same name as the main file.

## File Format Specifications ##

Open specifications of shapefile are available online from ESRI in the form of [Technical Description](http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf) and elaborates the overall structure of the file in detail. Information in main .shp file consists of headers and records. The fixed-length file header is followed by variable-length records where every record is made up of a fixed-length record header followed by variable-length record contents.

### Main File Header ###

The main File Header starts from the beginning of the file and is 100 bytes in length.  Organization of this main file header along with byte position, value, type and byte order is as shown in the following table.

|Bytes|Field|Value|Type|Byte Order
---|---|---|---|---|
|0-3|File Code|9994|Integer|Big Endian
|4-23|Unused|0|Integer|Big Endian
|24-27|File Length|File Length|Integer|Big Endian
|28-31|Version|1000|Integer|Little Endian
|32-35|Shape Type|Shape Type|Integer|Little Endian
|36-67|Minimum Bounding Rectangle|Xmin, Ymin, Xmax and Ymax|double|Little Endian
|68-83|Bounding Box|Zmin, Zmax|double|Little Endian
|84-99|Bounding Box|Mmin, Mmax|double|

It is to be noted that the value of file length is the total length of the file in 16-bit words which also includes the fifty 16-bit words making up the header.

#### Shape Types ####

The values of shape types field in above table are as follow:

|Value|Shape Type
---|---|
|0|Null Shape
|1|Point
|3|Polyline
|5|Polygon
|8|MultiPoint
|11|PointZ
|13|PolyLineZ
|15|PolygonZ
|18|MultiPointZ
|21|PointM
|23|PolyLineM
|25|PolygonM
|28|MultiPointM
|31|MultiPatch

### Data Records ###

The main file header is followed by variable length records where each record consists of a fixed-length record header followed by variable-length record contents.

#### Record Header ####

Record header contains information about the record number and content length of the record in a fixed length of 8 bytes. The organization of record header is as shown follow:

|Bytes|Field|Value|Type|Byte Order
---|---|---|---|---|
|0-3|Record Number|Record Number|Integer|Big
|4-7|Record Length|Record Length|Integer|Big

#### Record Contents ####

A shapefile record contents consist of a shape type followed by the geometric data for that shape. A shape type of 0 represents a null shape that has no geometric data for the shape. The length of the record contents is reflection of the shape parts and vertices. Lets take an example of Point Shape type to elaborate how a record contains information about such a shape type.

A point represents a certain geographic location in the order X,Y where each coordinate is represented by a double-precision value. Following table shows the arrangement of a Point shape type.

|Bytes|Shape Type|Value|Type|Number|Byte Order
---|---|---|---|---|---|
|0-3|Shape Type|1|Integer|1|Little
|4-11|X|X|double|1|Little
|12-19|Y|Y|double|1|Little

Examples of other shape types can be found the ESRI technical description document.

## References ##

* [ESRI Shapefile Technical Description](http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf) by ESRI

gha_language: Mathematica


text:
# Predicting Tabletop Game Success

## Overview
Despite the growing trend towards digital singularity, tabletop games have seen unprecedented success. In 2017 alone, more than 5,000 board games were introduced into the U.S. market.1 Given the growing success of tabletop games within recent years, this project seeks to construct a linear regression model that predicts the success of tabletop games. The application of this project lies with tabletop game designers and publishers alike, who can use this model to produce games that are optimized towards consumer desires.
## Project Organization
    ├── README.md             <- The top-level README for developers using this project
    │
    ├── LICENSE               <- Copyright and permissive license
    │
    ├── Notebooks             <- Project source code in Jupyter notebook
    │   └── project4.py       <- Script with helper functions
    │
    ├── Reports               <- Various reports
    │   ├── proposal.pdf      <- Project proposal
    │   ├── summary.pdf       <- Project summary
    │   └── presentation.pptx <- Project presentation slide deck

## Data
The data was obtained via scraping information for 8,712 tabletop games from boardgamegeek.com (BGG), a massive online games database with information and metrics on over 81,000 tabletop games. After cleaning the data to account for missing data and outliers, I was left with 5,537 observations.

Because tabletop game sales were not readily available to the public, I utilized average community rating as my target variable. Though the BGG community is not a perfect representation of the general public nor is average rating a perfect indicator of game success, it is the closest available proxy in the absence of sales data.

## Tools
* ***Web Scraping:*** BeautifulSoup, Selenium
* ***Data Processing:*** Pandas, NumPy
* ***Modeling:*** Scikit-learn, Statsmodels
* ***Data Visualization:*** Matplotlib, Seaborn
* ***Presentation:*** Powerpoint

## LICENSE
MIT © Brooke Ann Coco


text:
# RubiX GKE Terraform

[![License](https://img.shields.io/badge/-Apache%202.0-blue.svg)](https://opensource.org/s/Apache-2.0)

## Usage
It is assumed you have [Terraform](https://www.terraform.io), [gcloud](https://cloud.google.com/sdk/gcloud/) and [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed locally. Also ensure you have billing enabled in GKE.

1. Clone this repo:
```
$ git clone git@github.com:rubixFunctions/r3x-gke-terraform.git
$ cd r3x-gke-terraform
```

2. Edit env vars in `.gtf-var` to suit your cluster. Once done run:
```
$ source .gtf-var
```

3. Run the following to execute the terraform:
```
$ terraform init
$ terraform plan
$ terraform apply
```

4. To ensure all knative services have been applied run the following:
```
$ kubectl get pods --namespace istio-system
$ kubectl get pods --namespace knative-serving
$ kubectl get pods --namespace knative-build
$ kubectl get pods --namespace knative-eventing
$ kubectl get pods --namespace knative-sources
$ kubectl get pods --namespace knative-monitoring
```

5. To allow outbound traffic run the following:
```
$ gcloud container clusters describe ${CLUSTER_NAME} \
  --zone=${CLUSTER_ZONE} | grep -e clusterIpv4Cidr -e servicesIpv4Cidr
```
The `istio.sidecar.includeOutboundIPRanges` parameter in the `config-network` map specifies the IP ranges that Istio sidecar intercepts. To allow outbound access, replace the default parameter value with the IP ranges of your cluster.

Run the following command to edit the `config-network` map:
```
$ kubectl edit configmap config-network --namespace knative-serving
```
Change the `istio.sidecar.includeOutboundIPRanges` parameter value from * to the IP range you need. Separate multiple IP entries with a comma. For example:
```
apiVersion: v1
data:
  istio.sidecar.includeOutboundIPRanges: '<IP_ADDRESS>/14,<IP_ADDRESS>/20'
kind: ConfigMap
metadata:
  ...
```

## Documentation
For full information on RubiX and deploying a function to Knative, refer to our [Documentation here.](https://github.com/rubixFunctions/r3x-docs/blob/master/README.md)

## License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details

gha_language: HCL


text:
---
layout: post
title: Hello World!
---

This blog is going to serve an an official space for all our progress updates, announcements and work showcases going forward. We want to be able to connect to people who share the same vision for robotic technologies in space, and we are looking forward to interacting with all of you all over the globe.

Now time for some good news, we have officially been accepted as competitors in the NASA Space Robotics Challenge Phase II....wooot wooott :confetti_ball::tada::fireworks::confetti_ball::tada:. You can find more about the challenge and its goals [here](http://www.spaceroboticschallenge.com).

Our team is currently small but passionate about this vision and we are looking forward to learning from the experience of being part of the challenge, and we will make sure to keep you posted via this blog on the updates regarding the challenges that we face along the way and the things we discover in the process.

Feel free to leave any comments below! And you can always contact us via email or twitter too, by heading over to the contact page.


text:
---
title: What is SynapseML?
sidebar_label: What is SynapseML?
hide_title: true
---

import useBaseUrl from "@docusaurus/useBaseUrl";

# What is SynapseML?

SynapseML (previously known as MMLSpark), is an open-source library that simplifies the creation of massively scalable machine learning (ML) pipelines. SynapseML provides simple, composable, and distributed APIs for a wide variety of different machine learning tasks such as text analytics, vision, anomaly detection, and many others. SynapseML is built on the [Apache Spark distributed computing framework](https://spark.apache.org/) and shares the same API as the [SparkML/MLLib library](https://spark.apache.org/mllib/), allowing you to seamlessly embed SynapseML models into existing Apache Spark workflows.

With SynapseML, you can build scalable and intelligent systems to solve challenges in domains such as anomaly detection, computer vision, deep learning, text analytics, and others. SynapseML can train and evaluate models on single-node, multi-node, and elastically resizable clusters of computers. This lets you scale your work without wasting resources. SynapseML is usable across Python, R, Scala, Java, and .NET. Furthermore, its API abstracts over a wide variety of databases, file systems, and cloud data stores to simplify experiments no matter where data is located.

SynapseML requires Scala 2.12, Spark 3.2+, and Python 3.8+.

import Link from '@docusaurus/Link';

<Link to="/docs/Get Started/Install SynapseML" className="button button--lg button--outline button--block button--primary">Get Started</Link>

## Papers

- [Large Scale Intelligent Microservices](https://arxiv.org/abs/2009.08044)

- [Conditional Image Retrieval](https://arxiv.org/abs/2007.07177)

- [SynapseML: Unifying Machine Learning Ecosystems at Massive Scales](https://arxiv.org/abs/1810.08744)

- [Flexible and Scalable Deep Learning with MMLSpark](https://arxiv.org/abs/1804.04031)

repository: dciborow/mmlspark

gha_language: Scala

repo_name: dciborow/mmlspark


text:
# Newton's Wells in Go

This program generates nice images by applying Newton's polynomial
root finding technique. The roots of the polynomial is given at the
command line. Then the application tries to find a root by getting
every pixel as a guess and measuring how long it takes to reach the
root from that point. If a point cannot reach the root, it is colored
black. Otherwise, the color of the pixel is darkened as it takes more
steps to reach the root.

## Installation

Assuming that you have the latest Go toolchain installed just run:

> `go get github.com/rebasar/newtons-wells`

If you want to build from git then first, make sure that you have the
necessary libraries installed:

> `go get github.com/ogier/pflag`
> `go get code.google.com/p/sadbox/color`

Then in this directory, run: `go build`

## Usage

```
Usage: ./newtons-wells [options]:

  -c, --concurrency=4: Number of CPU cores to use. Defaults to all the cores available.
  -y, --height=480: Height of the resulting image
  -h, --help=false: Usage information
  -o, --output="-": Output file name. If omitted, standard output will be used.
  -r, --roots="1+1i": Complex roots, separated by commas. Ex: 3+2i,1+1i
  -x, --width=640: Width of the resulting image
```

Example command:

> `./newtons-wells -x 1920 -y 1080 -o example.png -r 960+540i,480+540i,1420+540i`

## TODO

- Increase test coverage
- Newton's Wells is a problem that is embarassingly parallel by it's
  nature. The application should take advantage of this fact and use a
  number of goroutines to parallelize this process.
- The process can also be distributed among multiple hosts using some
  kind of rpc (see [net/rpc](http://golang.org/pkg/net/rpc/) package)

## Strech goals

- Instead of creating an image, let the pixel values stream separately
  so that it can be used for creating interactive visualizations.

repository: rebasar/newtons-wells

repo_name: rebasar/newtons-wells


text:
audioread
=========

.. image:: https://secure.travis-ci.org/beetbox/audioread.png
        :target: https://travis-ci.org/beetbox/audioread/

Decode audio files using whichever backend is available. The library
currently supports:

- `Gstreamer`_ via `PyGObject`_.
- `Core Audio`_ on Mac OS X via `ctypes`_. (PyObjC not required.)
- `MAD`_ via the `pymad`_ bindings.
- `FFmpeg`_ or `Libav`_ via its command-line interface.
- The standard library `wave`_, `aifc`_, and `sunau`_ modules (for
  uncompressed audio formats).

.. _Gstreamer: http://gstreamer.freedesktop.org/
.. _gst-python: http://gstreamer.freedesktop.org/modules/gst-python.html
.. _Core Audio: http://developer.apple.com/technologies/mac/audio-and-video.html
.. _ctypes: http://docs.python.org/library/ctypes.html
.. _MAD: http://www.underbit.com/products/mad/
.. _pymad: http://spacepants.org/src/pymad/
.. _FFmpeg: http://ffmpeg.org/
.. _Libav: https://www.libav.org/
.. _wave: http://docs.python.org/library/wave.html
.. _aifc: http://docs.python.org/library/aifc.html
.. _sunau: http://docs.python.org/library/sunau.html
.. _PyGObject: https://pygobject.readthedocs.io/

Use the library like so::

    with audioread.audio_open(filename) as f:
        print(f.channels, f.samplerate, f.duration)
        for buf in f:
            do_something(buf)

Buffers in the file can be accessed by iterating over the object returned from
``audio_open``. Each buffer is a bytes-like object (``buffer``, ``bytes``, or
``bytearray``) containing raw **16-bit little-endian signed integer PCM
data**. (Currently, these PCM format parameters are not configurable, but this
could be added to most of the backends.)

Additional values are available as fields on the audio file object:

- ``channels`` is the number of audio channels (an integer).
- ``samplerate`` is given in Hz (an integer).
- ``duration`` is the length of the audio in seconds (a float).

The ``audio_open`` function transparently selects a backend that can read the
file. (Each backend is implemented in a module inside the ``audioread``
package.) If no backends succeed in opening the file, a ``DecodeError``
exception is raised. This exception is only used when the file type is
unsupported by the backends; if the file doesn't exist, a standard ``IOError``
will be raised.

A second optional parameter to ``audio_open`` specifies which backends to try
(instead of trying them all, which is the default). You can use the
``available_backends`` function to get a list backends that are usable on the
current system.

Audioread is "universal" and supports both Python 2 (2.6+) and Python 3
(3.2+).

Example
-------

The included ``decode.py`` script demonstrates using this package to
convert compressed audio files to WAV files.

Version History
---------------

2.1.8
  Fix an unhandled ``OSError`` when FFmpeg is not installed.

2.1.7
  Properly close some filehandles in the FFmpeg backend (thanks to
  @RyanMarcus and @ssssam).
  The maddec backend now always produces bytes objects, like the other
  backends (thanks to @ssssam).
  Resolve an audio data memory leak in the GStreamer backend (thanks again to
  @ssssam).
  You can now optionally specify which specific backends ``audio_open`` should
  try (thanks once again to @ssssam).
  On Windows, avoid opening a console window to run FFmpeg (thanks to @flokX).

2.1.6
  Fix a "no such process" crash in the FFmpeg backend on Windows Subsystem for
  Linux (thanks to @llamasoft).
  Avoid suppressing SIGINT in the GStreamer backend on older versions of
  PyGObject (thanks to @lazka).

2.1.5
  Properly clean up the file handle when a backend fails to decode a file.
  Fix parsing of "N.M" channel counts in the FFmpeg backend (thanks to @piem).
  Avoid a crash in the raw backend when a file uses an unsupported number of
  bits per sample (namely, 24-bit samples in Python < 3.4).
  Add a ``__version__`` value to the package.

2.1.4
  Fix a bug in the FFmpeg backend where, after closing a file, the program's
  standard input stream would be "broken" and wouldn't receive any input.

2.1.3
  Avoid some warnings in the GStreamer backend when using modern versions of
  GLib. We now require at least GLib 2.32.

2.1.2
  Fix a file descriptor leak when opening and closing many files using
  GStreamer.

2.1.1
  Just fix ReST formatting in the README.

2.1.0
  The FFmpeg backend can now also use Libav's ``avconv`` command.
  Fix a warning by requiring GStreamer >= 1.0.
  Fix some Python 3 crashes with the new GStreamer backend (thanks to
  @xix-xeaon).

2.0.0
  The GStreamer backend now uses GStreamer 1.x via the new
  gobject-introspection API (and is compatible with Python 3).

1.2.2
  When running FFmpeg on Windows, disable its crash dialog. Thanks to
  jcsaaddupuy.

1.2.1
  Fix an unhandled exception when opening non-raw audio files (thanks to
  aostanin).
  Fix Python 3 compatibility for the raw-file backend.

1.2.0
  Add support for FFmpeg on Windows (thanks to Jean-Christophe Saad-Dupuy).

1.1.0
  Add support for Sun/NeXT `Au files`_ via the standard-library ``sunau``
  module (thanks to Dan Ellis).

1.0.3
  Use the rawread (standard-library) backend for .wav files.

1.0.2
  Send SIGKILL, not SIGTERM, to ffmpeg processes to avoid occasional hangs.

1.0.1
  When GStreamer fails to report a duration, raise an exception instead of
  silently setting the duration field to None.

1.0.0
  Catch GStreamer's exception when necessary components, such as
  ``uridecodebin``, are missing.
  The GStreamer backend now accepts relative paths.
  Fix a hang in GStreamer when the stream finishes before it begins (when
  reading broken files).
  Initial support for Python 3.

0.8
  All decoding errors are now subclasses of ``DecodeError``.

0.7
  Fix opening WAV and AIFF files via Unicode filenames.

0.6
  Make FFmpeg timeout more robust.
  Dump FFmpeg output on timeout.
  Fix a nondeterministic hang in the Gstreamer backend.
  Fix a file descriptor leak in the MAD backend.

0.5
  Fix crash when FFmpeg fails to report a duration.
  Fix a hang when FFmpeg fills up its stderr output buffer.
  Add a timeout to ``ffmpeg`` tool execution (currently 10 seconds for each
  4096-byte read); a ``ReadTimeoutError`` exception is raised if the tool times
  out.

0.4
  Fix channel count detection for FFmpeg backend.

0.3
  Fix a problem with the Gstreamer backend where audio files could be left open
  even after the ``GstAudioFile`` was "closed".

0.2
  Fix a hang in the GStreamer backend that occurs occasionally on some
  platforms.

0.1
  Initial release.

.. _Au files: http://en.wikipedia.org/wiki/Au_file_format

Et Cetera
---------

``audioread`` is by Adrian Sampson. It is made available under `the MIT
license`_. An alternative to this module is `decoder.py`_.

.. _the MIT license: http://www.opensource.org/licenses/mit-license.php
.. _decoder.py: http://www.brailleweb.com/cgi-bin/python.py

repository: asellappen/audioread

extension: rst

gha_language: Python

repo_name: asellappen/audioread


text:
# GRACE - GRAdient ComprEssion for distributed deep learning

## Context
Powerful computer clusters are used nowadays to train complex deep neural networks (DNN) on large datasets. Distributed training workloads increasingly become communication bound. For this reason, many lossy compression techniques have been proposed to reduce the volume of transferred data, and consequently, accelerate training.

## What is GRACE?
GRACE is a GRAdient ComprEssion framework for distributed deep learning.
It provides a general framework and an API for implementing gradient compression methods.
GRACE includes the implementation of popular compression algorithms surveyed in [Compressed Communication for Distributed Deep Learning: Survey and Quantitative Evaluation](http://hdl.handle.net/10754/662495).
GRACE supports both TensorFlow and Pytorch, and offers easy integration with training scripts. This simplifies
the process of implemeting and comparing across compression methods.

## Install
The `grace_dl` package can be install locally on your nodes. For Horovod support, it is required to apply
the patch provided. To avoid this manual setup, a docker image is provided with GRACE already installed along with a patched version of Horovod 0.18.2. You can find more information [here](INSTALLING.md).

## Concepts
The three main components of this framework are the `Communicator`, `Compressor`, and `Memory` abstract classes.
- `Communicator` implementations define the communication method used by GRACE.
- `Compressor` implementations provide the `compress` and `decompress` methods.
- `Memory` implementations provide the `update` and `compensate` methods.

## Supported frameworks
Currently the supported frameworks are:
- Horovod 0.18.2 ([TensorFlow 1.15 & 2.0](grace_dl/tensorflow))
- Horovod 0.18.2 ([PyTorch 1.3.0](grace_dl/torch))
- [PyTorch distributed](grace_dl/dist).

## Usage
To use GRACE:
- **As a User**: you need to change a few lines of code on your training script. Refer [here](TRAINING.md) for examples.
- **As an Implementer of new Compressors**: you need to implement a `Compressor` class, and optionally a `Memory` or even a `Communicator` class.
Refer [here](IMPLEMENTING.md) for more information.
- **For Benchmarking methods**: you can use the [training scripts](https://github.com/sands-lab/grace-benchmarks) and compare with [our data](https://github.com/sands-lab/grace-data).

## Running
Running a training script is no different with GRACE. See the Training guide for more information.

## Guides
- [Installing GRACE](INSTALLING.md)
- [Implementing GRACE components](IMPLEMENTING.md)
- [Training with GRACE](TRAINING.md)

## Citation

If you find this useful, please cite our work as:

Compressed Communication for Distributed Deep Learning: Survey and Quantitative Evaluation.

H. Xu, C.-Y. Ho, A. M. Abdelmoniem, A. Dutta, E. H. Bergou, K. Karatsenidis, M. Canini, P. Kalnis.

KAUST technical report, Apr 2020.

Here's a BibTeX blurb:

```
@TECHREPORT{grace,
    author = {Xu, Hang and Ho, Chen-Yu and Abdelmoniem, Ahmed M. and Dutta, Aritra and Bergou, El Houcine and Karatsenidis, Konstantinos and Canini, Marco and Kalnis, Panos},
    title = {{Compressed Communication for Distributed Deep Learning: Survey and Quantitative Evaluation}},
    institution = {KAUST},
    note = {http://hdl.handle.net/10754/662495},
    year = {2020},
    month = {Apr}
}
```

## Publications

* [Compressed Communication for Distributed Deep Learning: Survey and Quantitative Evaluation](http://hdl.handle.net/10754/662495).

  H. Xu, C.-Y. Ho, A. M. Abdelmoniem, A. Dutta, E. H. Bergou, K. Karatsenidis, M. Canini, P. Kalnis.

  KAUST technical report, Apr 2020.

## Mailing lists

There is no official mailing list set up yet. Feel free to reach out by email to any of the authors indicated in the [technical report](http://hdl.handle.net/10754/662495).

repository: amitport/grace

repo_name: amitport/grace


text:
---
title: Goldilocks and the Three Bears
author: Bertie
type: post
date: 2006-01-16
excerpt: "A certain winner for children  - how Goldilocks ate the Three Bears' porridge. "
url: /goldilocks-and-the-three-bears/
featured_image:
            src: "goldilocks.jpg"
            alt: "Picture by Bertie a retake of the classic illustration by Walter Crane."
tags:
  - Latest Stories
  - Small Stories
audio:
      mp3: goldilocks-shorter.mp3
      duration: 3:15
---
{% srcset "goldilocks.jpg", "alt text" %}

Based on the Charming version by the Victorian writer Andrew Lang.

Read by Natasha.

Once upon a time there were three bears, who lived together in a house of their own in a wood. One of them was a little, small wee bear; one was a middle-sized bear, and the other was a great, huge bear.

One day, after they had made porridge for their breakfast, they walked out into the wood while the porridge was cooling. And while they were walking, a little girl came into the house. This little girl had golden curls that tumbled down her back to her waist, and everyone called her by Goldilocks.

Goldilocks went inside. First she tasted the porridge of the great, huge bear, and that was far too hot for her. And then she tasted the porridge of the middle bear, and that was too cold for her. And then she went to the porridge of the little, small wee bear, and tasted that. And that was neither too hot nor too cold, but just right; and she liked it so well, that she ate it all up.

Then Goldilocks went upstairs into the bed chamber and first she lay down upon the bed of the great, huge bear, and then she lay down upon the bed of the middle bear and finally she lay down upon the bed of the little, small wee bear, and that was just right. So she covered herself up comfortably, and lay there until she fell fast asleep.

By this time, the three bears thought their porridge would be cool enough, so they came home to breakfast.

“Somebody has been at my porridge!” said the middle bear, in his middle voice.

Then the little, small wee bear looked at his, and there was the spoon in the porridge pot, but the porridge was all gone.

“Somebody has been at my porridge, and has eaten it all up!” said the little, small wee bear, in his little, small wee voice.

Then the three bears went upstairs into their bedroom.

“SOMEBODY HAS BEEN LYING IN MY BED!” said the great, huge bear, in his great, rough, gruff voice.

“Somebody has been lying in my bed!” said the middle bear, in his middle voice.

And when the small, wee bear came to look at his bed, there was the bed cover in its place, and the angelic face of a little girl snoring away, fast asleep.

“Somebody has been lying in my bed, and here she is!” Said the little, small wee bear, in his little, small wee voice.

Goldilocks jumped off the bed and ran downstairs, out of the door and down the garden path. She ran and she ran until she reached the house of her grandmama. When she told her grandmama about the house of the three bears who lived in the wood, her granny said: “My my, what a wild imagination you have, child!”

(Updated with shorter version September, 13, 2016).

repository: storynory/storystatic

repo_name: storynory/storystatic


text:
---
title: Reproducing Elixir's |> in Scala
date: September 27, 2014
tags: elixir, scala
category: elixir
---

Elixir includes a pipe operator `|>` which it borrowed from F#.  The way `|>` works it that given a function on the left it
takes the output of that function and applies it as the first argument of the following function.

```elixir
def inc(x), do: x + 1
def double(x), do: x * 2

1 |> inc |> double
```

This can be simulated in Scala.

The first step is to identify the type signature.  `1 |> inc` is saying any (`A`) can call a method `|>` and pass it a `Function1[A, B]`.

```scala
implicit class PipeOp[A](a: A) {
  def |>[B](f: Function1[A,B]): B = f(a)
}
```

That's it.  No, really, that's it.  That is the pipe operater implemented in Scala.

### Partial Application

It might seem limiting that it's restricted to a `Function1`.  What if, for exmaple, the function we
wanted to pipe was...

```scala
def incBy(incrementBy: Int, x: Int) = by + x
```

One thing we could do is partially apply the function.

```scala
1 |> incBy(5, _: Int)
```

For some reason this fails.  It seems like it should work as a partially applied function returns a function.  This might be a Scala compiler
bug.

```
<console>:13: error: missing parameter type for expanded function ((x$1) => inc2(5, x$1))
              incBy(5, _)
```

### Currying

The work around, and probably the better choice in the first place, is to just curry the function to begin with.

```scala
def incBy(inc: Int)(x: Int) = inc + x

...

1 |> incBy(5)
```


text:
JupyterHub (Local Spawner)
--------------------------

This repository contains an example of a customised deployment of JupyterHub for OpenShift, which creates notebook instances as local processes within the same pod as JupyterHub is running. It uses an image for running JupyterHub on OpenShift as an S2I builder to create the customised image containing configuration to use the local process spawner. A SQLite database is used to track users. A persistent volume is used to store data for both the database and JupyterHub. Any work done through a Jupyter notebook instance is also persistent across restarts.

Deploying the Example
---------------------

A template is provided for deploying this example. The one template will create a build configuration for creating the base image for JupyterHub. This image is S2I enabled, and a second build configuration is then used to create the customised JupyterHub with configuration from this repository. A deployment configuration, service and route is also created, to deploy the JupyterHub instance and make it available.

To create a deployment directly from the template run:

```
oc new-app https://raw.githubusercontent.com/jupyter-on-openshift/poc-hub-local-spawner/master/templates/jupyterhub.json
```

The name of the deployment created will be ``jupyterhub``. If you want to change the name, supply the additional option ``--param APPLICATION_NAME=jupyterhub``.

Once JupyterHub has finished deploying open it from your browser.

As a template is provided, you could also load the template into the project. This would then be selectable from the service catalog, or you could deploy from the loaded template on the command line.

Deleting the Application
------------------------

To delete the example JupyterHub instance which was deployed, run:

```
oc delete all,configmap,pvc --selector app=jupyterhub
```

repository: santhoshsthanikam/poc-hub-local-spawner

repo_name: santhoshsthanikam/poc-hub-local-spawner


text:
# vertx-kinesis-consumer-orchestra
**Terminolgy**
VKCO: Abbreviation for "Vert.x Kinesis consumer orchestra".

## Getting started
Don't want to read and just start? [Getting started](https://github.com/wem/vertx-kinesis-consumer-orchestra/wiki/Getting-started)

## Problem to solve
Short: Bring Kinesis records into the non-blocking, reactive and scaling Vert.x world.

There are some solutions out there to consume records from Kinesis. But either they follow basically another approach,
are not maintained anymore or lacks of features.

### Goals
- Performance -> When Kinesis is not the limiting factor, it becomes very important the processing of consumed records
can be done fast or even better, flexible scalable.
- Scalable -> This encompasses two aspects.
    - First scaling with Kinesis shards, so we should be able to reshard and the system get reorganized (or re-orchestrated)
    if this happens.
    - If we change something on record processing we should be able to assign more resources (hardware) to the system and
    afterwards the throughput / output should increase.
- Reliable -> The system should be enough reliable to handle ungracefully shutdowns and able to restart from the last known point
(in this case segments of records)
- Simple -> We want to save the user of this library from handling the whole iterator and error handling effort as possible.

## Concept
### Big picture

![Explanation](doc/explanation.png)

### One event loop per shard
The may most central concept behind VKCO is that each shard get consumer by exactly one event loop and this even when
multiple instances of VKCO within same application and same stream are running. This is also ensured when run VKCO
on different Vert.x instances, regardless if they are running in clustered mode or not (but it's recommended to run Vert.x clustered)

#### Over-committing
_We say explicitly "one event loop per shard" and not "one shard per event loop"._ It's possible to configure VKCO to consume
`n` shards on a single event loop. This can make sense where Kinesis is the limiting factor, and the afterward processing
is faster.

#### Fan out
As mentioned above each shard get consumed by exactly one event loop. The consumer verticle is the point where the consumed
records finally arrive. So it's up to the implementation how to scale the final processing of those records. According to
the picture above, e.g. a well scaling and performant approach could be to split each consumed bunch of records and dispatch them
over the event loops (maybe within consumer verticle).
So, for example with 1 shard -> 1 event loops consumes and `n` event loops proceeds. This may would be the more common
scenario where Kinesis is NOT the limiting factor.

### Entities
Entities the user of this library get directly contact with, or it's helpful to know anything about.

#### Redis
This library uses Redis for any persistence tasks and even resharding:
- Shard processing state -> Which shard get currently consumed or has finished (e.g. resharded)
- Shard iterator -> After each consumed bunch of records, the shard iterator has to be persisted for reliability.
- Deployment lock -> When more than one VKCO instance get started concurrently we must ensure they deploy the consumers
in sequential fashion to avoid one shard get consumed multiple times. To solve this a simple adaption of red-lock is used,
so in fact at a point in time during deployment only one VKCO instance owns this lock. **It's also guaranteed
when those VKCO instances are running on different Vert.x instances and they are not running in clustered mode**.
- Resharding -> When a shard or 2 shards get resharded, all corresponding VKCO instances must get notified.
As it's not mandatory to run Vert.x in clustered mode, when VKCO instances deployed on different Vert.x instances, we
must find another way to notify for such an event. Here Redis pub / sub comes into the game. **Note: When Vert.x is running
in clustered mode VKCO will use event bus instead of Redis pub / sub to notify about resharding events.**

> The decision for Redis was as it's able to take some tasks from Vert.x in clustered mode. So to prevent the user to
> get forced to run Vert.x clustered to use VKCO. And Redis should be enough reliable to act as persistence solution
> for this case, especially when Redis itself is running clustered.

#### Vert.x Kinesis consumer orchestra `ch.sourcemotion.vertx.kinesis.consumer.orchestra.VertxKinesisOrchestra`
Umbrella abstraction and entry point of the library. After the configuration and creating / start there should be no further action
needed to run it.

#### Consumer verticle `ch.sourcemotion.vertx.kinesis.consumer.orchestra.consumer.AbstractKinesisConsumerVerticle`
Entity that finally consumes (polling) records from Kinesis. The scope of a consumer is one single Kinesis shard.
Specifically this means, per orchestra (application, stream) there exists only one consumer per shard.

This is the point in this library where the user has to provide its own implementation.
Detailed description [Consumer verticle](https://github.com/wem/vertx-kinesis-consumer-orchestra/wiki/Consumer-verticle).

This README and the wiki will may grow further in the future.

For now, start coding: [Getting started](https://github.com/wem/vertx-kinesis-consumer-orchestra/wiki/Getting-started)

Have fun.

:-)

## Contribution and bug reports
Both is very welcome. Btw ... Code of conduct will follow.

repository: wem/vertx-kinesis-consumer-orchestra

gha_language: Kotlin

repo_name: wem/vertx-kinesis-consumer-orchestra


text:
# Statslabs::Matrix - The C++ Linear Algebra Library (in development) #

The repository contains the Statslabs::Matrix C++ linear algebra library code. Statslabs::Matrix is the fundamental package of Statslabs for statistical computing in C++.

## Overview

Statslabs::Matrix is the fundamental package of Statslabs for statistical computing in C++. The Statslabs.Matrix library code is based on the matrix design chapter in 'The C++ Programming Language (4th Edition)' and provides:
  + A Matrix Template: Construction and Assignment; Subscripting and Slicing
  + Matrix arithmetic operations: Scalar Operations; Additions; Multiplication
  + Matrix Implementation: slice; MatrixSlice; MatrixRef; Matrix List Initialization; Matrix Access; Zero-Dimensional Matrix
  + An interface to Intel(R) MKL BLAS operations which apply to the Matrix template

## Prerequisites

    CMake >= 3.6.0
    Intel Math Kernel Library (Intel MKL)

## Installation on Ubuntu / macOS
1. Clone the repository.
   ```sh
   git clone git@github.com:statslabs/matrix.git
   ```
2. Configure the project.
   ```sh
   cd matrix
   mkdir build && cd build
   cmake ..
   ```
   To build docs/examples/tests, configure matrix with the following cmake options:
   ```sh
   -DSLAB_INCLUDE_DOCS=ON
   -DSLAB_INCLUDE_EXAMPLES=ON
   -DSLAB_INCLUDE_TESTS=ON
   ```
3. Compile and install the library.
   ```sh
   make
   make install
   ```

## Example program
`examples/demo.cc`:
```c
#include <iostream>
#include "slab/matrix.h"

using namespace std;
using namespace slab;

int main() {
  mat A = {
      {1, 2, 3},
      {4, 5, 6},
      {7, 8, 9}
  };

  mat B = {
      {1, 2, 3},
      {4, 5, 6},
      {7, 8, 9}
  };

  // Element-wise addition
  cout << "A + B = " << A + B << endl;

  // Element-wise subtraction
  cout << "A - B = " << A - B << endl;

  // Element-wise multiplication
  cout << "A * B = " << A * B << endl;

  // Element-wise division
  cout << "A / B = " << A / B << endl;

  // Matrix multiplication
  cout << "matmul(A, B) = " << matmul(A, B) << endl;

  return 0;
}
```

## Integration of Matrix in your own project
To make the project simple enough, we will create a CMake project for `demo.cc`.

1. Make a project folder.
   ```sh
   mkdir example && cd example
   ```

2. Create `demo.cc` and `CMakeLists.txt` in the project folder where file `CMakeLists.txt` should look like:
   ```cmake
   cmake_minimum_required(VERSION 3.0)
   project(example)
   set(CMAKE_CXX_STANDARD 11)
   add_executable(example demo.cc)

   find_package(Matrix REQUIRED)
   target_link_libraries(example Statslabs::Matrix)
   ```

3. Perform a out-of-source build.
   ```sh
   mkdir build && cd build
   cmake ..
   make
   ```

4. Run the program.
   ```sh
   ./example
   ```

repository: statslabs/matrix

repo_name: statslabs/matrix


text:
---
description: Learn how to upgrade your Docker Trusted Registry to the latest major release.
keywords: docker, dtr, upgrade, install
redirect_from:
- /docker-trusted-registry/install/upgrade/
- /docker-trusted-registry/upgrade/upgrade-major/
title: Upgrade from 1.4.3
---

The first step in upgrading to Docker Trusted Registry (DTR) 2.0, is ensuring
you are running DTR 1.4.3. If that's not the case, start by upgrading your
installation to version 1.4.3, and then upgrade to DTR 2.0.

To upgrade from DTR 1.4.3 to 2.0 you first need to do a fresh installation of
DTR 2.0. Then you migrate the data from your DTR 1.4.3 installation to the 2.0
installation. Finally, you decommission your 1.4.3 by uninstalling it.

## Step 1. Upgrade DTR to 1.4.3

Make sure you're running DTR 1.4.3. If that's not the case, upgrade your
installation to the 1.4.3 version.

## Step 2. Install DTR 2.0

To upgrade to DTR 2.0, you first need to do a fresh installation of DTR 2.0.
This can be done on the same node where DTR 1.4.3 is already running or on a
new node.

If you decide to install the new DTR on the same node, you need
to install it on a port other than 443, since DTR 1.4.3 is already using it.
Use these instructions to install DTR 2.0:

* [Release notes](../../release-notes/index.md)
* [System requirements](../system-requirements.md)
* [DTR architecture](../../architecture.md)
* [Install DTR 2.0](../index.md)

## Step 3. Migrate metadata

Once you have your DTR 1.4.3 and the new DTR 2.0 running, you can migrate
configurations, accounts, and repository metadata from one installation to
another.

For this, you can use the `docker/dtr migrate` command. This command
migrates configurations, accounts, and repository metadata. It doesn't migrate
the images that are on the storage backend used by DTR 1.4.3.

Before running the migration, get the DTR 2.0 CA certificate used for the `--dtr-ca` parameter:

1. Log into the **DTR 2.0 web UI**, and navigate to the **Settings** screen.

2. In the **Domain** section, click the **Show TLS settings** link.

3. Copy the content of the **TLS CA** field.

    ![](../../images/dtr-integration-1.png)

To start the migration:

1.  Log into the host running DTR 1.4.3 using ssh.

2.  Use the docker/dtr migrate command.

    When you run the docker/dtr migrate command, Docker pulls the necessary
    images from Docker Hub. If the host where DTR 1.4.3 is not connected
    to the internet, you need to
    [download the images to the host](../install-dtr-offline.md).

     Validate your configurations

After the migration finishes, test your DTR 2.0 installation to make sure it is
properly configured.
In your browser navigate to the DTR 2.0 **Settings page**, and check that DTR:

* Is correctly licensed,
* The storage backend is correctly configured,
* The user authentication method is correctly configured.

You need to manually configure the following settings:

* Domain name,
* Certificates.

You can find the certificates of DTR 1.4.3 under `/usr/local/etc/dtr/ssl`.

## Step 5. Transfer image data to DTR 2.0

If utilizing local filesystem storage, the image data is not copied during by
the migrate command and should be transferred manually.

To transfer the images:

1.  Log into the host running DTR 2.0 using ssh.

2.  Get the filesystem volume path DTR 2.0 stores images:

    ```bash{% raw %}
    $ docker volume inspect --format '{{ .Mountpoint }}' $(docker volume ls -q | grep dtr-registry)
    {% endraw %}```

    The path returned will be similar to: `/var/lib/docker/volumes/dtr-registry-fa61225dc006/_data`

3.  Log into the host running DTR 1.4.3 using ssh.

4.  Copy the image data:

    ```bash
    $ scp -r /var/local/dtr/image-storage/local/* $DTR_HOST:$DTR_2_FS_VOLUME_PATH
    ```

    For example:

    ```bash
    $ scp -r /var/local/dtr/image-storage/local/* \
      dtr2:/var/lib/docker/volumes/dtr-registry-4fb637dbbecc/_data/
    ```

## Step 6. Test your installation

Now that you have a working installation of DTR 2.0, you should test that you
can push and pull images to it.
[Learn how to push and pull images](../../repos-and-images/pull-an-image.md).

## Step 7. Join replicas to your cluster

This step is optional.

To set up DTR for [high availability](../../high-availability/index.md),
you can add more replicas to your DTR cluster. Adding more replicas allows you
to load-balance requests across all replicas, and keep DTR working if a
replica fails.

To add replicas to a DTR cluster, use the `docker/dtr join` command. To add
replicas:

1.  Load you UCP user bundle.

2.  Run the join command.

    When you join a replica to a DTR cluster, you need to specify the
    ID of a replica that is already part of the cluster. You can find an
    existing replica ID by going to the **Applications** page on UCP.

    Then run:

    ```bash
    # Get the certificates used by UCP
    $ curl -k https://$UCP_HOST/ca > ucp-ca.pem

    $ docker run -it --rm \
      docker/dtr join \
      --ucp-url $UCP_URL \
      --ucp-node $UCP_NODE \
      --existing-replica-id $REPLICA_TO_JOIN \
      --ucp-username $USER --ucp-password $PASSWORD \
      --ucp-ca "$(cat ucp-ca.pem)"
    ```

    Where:

    * ucp-url, is the URL of the UCP controller,
    * ucp-node, is the node on the ucp cluster where the DTR  replica will be installed,
    * existing-replica-id, is the ID of the DTR replica you want to replicate,
    * ucp-username, and ucp-password are the credentials of a UCP administrator,
    * ucp-ca, is the certificate used by UCP.

3.  Check that all replicas are running.

    In your browser, navigate to the Docker **Universal Control Plane**
    web UI, and navigate to the **Applications** screen. All replicas should
    be displayed.

    ![](../../images/install-dtr-4.png)

4.  Follow steps 1 to 3, to add more replicas to the DTR cluster.

    When configuring your DTR cluster for high-availability, you should install
    3, 5, or 7 replicas.
    [Learn more about high availability](../../high-availability/index.md)

## Step 8. Decommission DTR 1.4.3

Once you've fully tested your new installation, you can uninstall DTR 1.4.3
by deleting `/usr/local/etc/dtr` and `/var/local/dtr` and removing all dtr
containers.

## Where to go next

* [Upgrade to DTR 2.x](index.md)
* [Monitor DTR](../../monitor-troubleshoot/index.md)


text:
# Your First Automated Canary Deployment in EKS

Welcome to your first automated canary deployment in EKS/Kubernetes.
By leveraging the [Harness](https://harness.io/platform/).

## Moving Pieces

There will be a few moving pieces.

* An Amazon EKS Cluster with the ability to deploy
* A Harness Account in which you [can sign up here](http://bit.ly/harness-aws-workshop)

## Description

During the deployment, will be deploying a stable then unstable version of the [Harness Sample Application](https://hub.docker.com/r/harness/cv-demo)
to show the virtues of an automated canary deployment.

Prometheus will be used to automate the canary deployment as the primary source of metric verification. The lab will walk through installing and configuring Prometheus.

repository: ravilach/aws-modernization-harness

repo_name: ravilach/aws-modernization-harness


text:
# CHANGELOG

## v2.3.*
This is `apiato/core` that works with `laravel 5.6`

### Added

### Fixed
- Fixed a small issue with the `HashIdTrait`

### Changed
- Updated Dependencies in `composer.json` file to the latest versions

### Removed

repository: parse-code/apiato

repo_name: parse-code/apiato


text:
# 20181113-01

**Summary:** Optimize check constraints for unique relationship/participations
**Details:** The old unique constraint for entity relationships, act relationship, and act participations consumed at minimum 48 bytes per index entry, this patch converts these unique indexes to use SHA1 which only consumes 20 bytes per entry. This saves significant space in deployments where > 10 million rows exist in these tables.
**Bug / Issues:** N/A
**Applies To:** SanteDB Server , OpenIZ Server
**Impacted Versions:** <IP_ADDRESS> - <IP_ADDRESS>
**Status:** Released \(November 13, 2018\)
**Impact:** Low
**RDBMS:** PostgreSQL

repository: santedb/dev-doc

repo_name: santedb/dev-doc


text:
# Massariella bufonia (Berk. & Broome) Speg., 1880 SPECIES

#### Status
SYNONYM

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

#### Published in
Anal. Soc. cient. argent. 1(4): 9 (1880)

#### Original name
Sphaeria bufonia Berk. & Broome, 1852

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Xylariales/Amphisphaeriaceae/Amphisphaeria/Amphisphaeria bufonia/ Syn. Massariella bufonia/README.md

repo_name: mdoering/backbone


text:
# Text Adventure 1
### Category: Binary Exploitation
### Author: Joshua Novak (rm -rf /#0797), Emily Baird (Analytical Engine#4954) and Brandon Arenas (Inga#5508)

---

## Description
Dracula left his terminal open. It's password protected but he's not very good at programming. He really should stick to evil magic...

## Hints
No hints. Everything needed is given in print statements.

## Solution
Solution is to overwrite the 9 byte password. The real obstacle is giving gets a null byte right after the first password so that strcmp will not compare the entire 256 byte buffer. Instead, it will stop at the 10th byte, the null byte.

For a detailed solution, see exploit.py in solve/

## Flag
magpie{d()nt_p@n!k_pIz}


text:
# Configure Office 365 API Projects for Distribution

### Summary ###
This page explains some steps developers should consider taking on their projects that leverage the Office 365 APIs prior to distributing them to other developers, their customers, or to source control systems such as Team Foundation Server, Git or Visual Studio Online.

Specifically this page will look at two steps:

- [Fixup Azure AD Graph Client NuGet Package Reference](#fixup-azure-ad-graph-client-nuget-package-reference)
- [Cleaning the `web.config` for app-specific details](#cleaning-the-webconfig-for-app-specific-details)

# Fixup Azure AD Graph Client NuGet Package Reference

All projects that leverage the Office 365 API SDKs by way of adding a connected service include a NuGet package that adds Office 365 & Azure AD references to the project created in Visual Studio.

The NuGet package added to the project by the **Office 365 API Tools** in Visual Studio is not present in the NuGet package registry and therefore attempts to perform a NuGet package restore will fail because it cannot find a matching package.

## Understanding the Problem ##

The **Office 365 API Tools for Visual Studio 2013**, version 1.3.41104.1, adds multiple NuGet packages to projects as part of completing the Add Connected Service wizard. One package in particular presents a challenge: **Microsoft Azure Active Directory Graph Client Library**.

The way Visual Studio works is that it, or addins, typically contain a local copy of the NuGet package so developers do not always have to be connected to the internet to download the NuGet packages. The package that the tools include has an ID of **Microsoft.Azure.ActiveDirectory.GraphClient** & a version of **1.0.22**.

When projects are committed to source control, typically the packages are not included as part of the commit because they can add a lot of extra storage space demands and unnecessarily increase the size of a package when sharing it with other developers. Therefore one of the first tasks developers do after getting a copy of the project from source control is to run [NuGet package restore](http://docs.nuget.org/docs/reference/package-restore).

The challenge is that a package with the same ID & version does not exist in the NuGet package registry; there is no package with an ID of **Microsoft.Azure.ActiveDirectory.GraphClient** & a version of **1.0.22**. The package does exist in the NuGet package registry, **[Microsoft.Azure.ActiveDirectory.GraphClient](http://www.nuget.org/packages/Microsoft.Azure.ActiveDirectory.GraphClient)**, but under different versions.

## Fixing the Azure AD Graph Client NuGet Package Reference ##

Until the Office 365 API Tools for Visual Studio 2013 are updated to fix this issue, it is recommended to alter the project prior to committing to your source control system, regardless if you are using Team Foundation Server, Visual Studio Online, Git or any other solution.

After creating the project, look within the project's `packages.config` file and search for a package with an ID of **Microsoft.Azure.ActiveDirectory.GraphClient** & version of **1.0.22**. The safest way to update the project is to uninstall & then reinstall the package.

Open the **Package Manager Console** in Visual Studio and enter the following to uninstall the package:

  ````powershell
  PM> Uninstall-Package -Id Microsoft.Azure.ActiveDirectory.GraphClient
  ````

  > If the uninstall throws an error about not finding the package, simply remove the package reference from the `packages.config` file manually & save your changes.

Now, install the public version of the same NuGet package from the public registry:

  ````powershell
  PM> Install-Package -Id Microsoft.Azure.ActiveDirectory.GraphClient -Version 2.0.2
  ````

  > The above example references a specific version of the Azure AD graph client that is known to work with the Office 365 APIs. Future versions may work so omitting the `-Version` argument is optional.

[back to top](#configure-office-365-api-projects-for-distribution)

# Cleaning the `web.config` for App-Specific Details

The **Office 365 API Tools** for Visual Studio add the ability to create a new Azure AD application with the necessary permissions for the Office 365 APIs using the **Connected Service** wizard in Visual Studio. When completing the wizard, multiple entries and customizations are made to the project's `web.config` file.

These modifications include the following add-in settings:

- **ida:ClientID**: The unique ID of the application created in your Azure AD tenant.
- **ida:Password**: The Azure AD application's key that was generated by the Connected Service wizard.
- **ida:AuthorizationUri**: The endpoint used to authenticate with Azure AD.

The **ida:ClientID** and **ida:Password** are unique to the Azure AD app. Some development teams may elect for each developer to code against their own app, similar to how developers work against their own local development database. Therefore you can think of the the **ida:ClientID** and **ida:Password** similar to database connection strings.

The next time a developer uses the Connected Service wizard to create a new Azure AD application of the project, the wizard will detect the **ida:CliendID** and try to connect to an application in the current user's Azure AD tenant. If a match is not found, the Connected Service wizard will throw an error.

Therefore, prior to committing the project to source control or before sharing with other developers, it is recommended to remove the values from the **ida:ClientID** & **ida:Password** add-in settings in the `web.config`.

[back to top](#configure-office-365-api-projects-for-distribution)

----------

### Related links ###
- [NuGet: App for SharePoint Web Toolkit](http://www.nuget.org/packages/AppForSharePointWebToolkit)
- [NuGet: Package Restore](http://docs.nuget.org/docs/reference/package-restore)
- [MSDN: Office 365 API Client Library NuGet Packages](http://msdn.microsoft.com/office/office365/HowTo/adding-service-to-your-Visual-Studio-project#O365NuGets)

### Applies to ###
-  Office 365 Multi Tenant (MT)
-  Office 365 Dedicated (D)

### Author
Andrew Connell - [@andrewconnell](https://twitter.com/andrewconnell)

### Version history ###
Version  | Date | Comments
---------| -----| --------
0.1  | December 31, 2014 | First draft