text:
---
title: Machine learning - A beginner’s guide to teaching artificial intelligence
date: 2017-12-05T00:50:28.678Z
description: 2017 is the year of hype for artificial intelligence and machine learning. Countless articles this year have extolled AI’s virtues…
---

](/machine-learning-a-beginners-guide-to-teaching-artificial-intelligence-40de2551ee0?source=post_page-----40de2551ee0--------------------------------)

2017 is the year of hype for artificial intelligence and machine learning. Countless articles this year have extolled AI’s virtues, explored the automation of menial tasks, and prophesied the end of work altogether. While we’ve all heard about AI’s potential after this year of endless press coverage, few have a basic understanding of how the technology works.

I’m not a computer scientist or AI expert. I’m still very much a student of AI, and I hope writing a brief primer aimed at non-technologists will help me (and maybe you?) understand how artificial intelligence learns a little better.

# How I explain machine learning

Machine learning is giving a computer the ability to learn without being explicitly programmed.

So, let’s take a step back to understand explicit programming. Explicit programming is how most of the software you’re familiar with works. Traditionally, software has defined goals, straightforward inputs, and clear outputs. While explicit programming can get very complicated, it is essentially a set of rules. For every action or input, the software follows a set of rules to generate an output.

# The problem with explicit programming

Explicit programming has served us well. It’s what powers the personal computer and the internet. It runs nearly all the software we use daily. Explicit programming is what we think of when we think of coding and computer science.

However, explicit programming has limitations, and those limitations are largely two-fold. First, since explicit programming is all about inputs, rules, and outputs, it relies on a software developer to write rules that apply to every possible input. In situations where there are hundreds or thousands of variable inputs, it becomes impractical to explicitly program rules for all the possible variables.

Second, explicit programming is static and bad at prediction. In most cases, once a software developer has written a piece of code, that code won’t change. It doesn’t have the ability to update itself in response to new variables. This static nature makes explicit programming bad at prediction, since it lacks the ability to fine tune its predictions when it gains new data.

“Tuning predictions in response to new data” is a very nerdy way of saying that explicitly programmed software can’t learn. But since the 1960s, computer scientists have been working on changing that.

# The golden age of machine learning

Helping a computer to learn requires two main things:

1.  A large dataset so the computer can make hundreds or thousands of mistakes while tuning its predictions
2.  Lots of processing power to assemble and examine the data and run hundreds or thousands of tests

We’re entering the golden age of machine learning because those two things are now readily available. Storage and processing power have increased exponentially over the decades in a phenomenon known as [Moore’s Law](https://en.wikipedia.org/wiki/Moore%27s_law).

With these two hardware challenges overcome, machine learning now relies on writing algorithms that tell a computer what to look for in a data set, without explicitly coding how to find the answer. The computer then uses trial and error, breeding the successful trials and adding random variation to try new things. Over the course of many tests and variations, the computer learns how to succeed at the task at hand.

It might be easiest to understand how the algorithm works visually. This video of a computer learning to play Super Mario is a great introduction:

# How is machine learning used today?

Machine learning has tons of applications, some of them are visible while many of them are hidden.

*   Machine learning helps Amazon decide which products to recommend to you based on your past purchases
*   Facebook uses a branch of machine learning known as computer vision to suggest which friends you should tag in your photos
*   Machine learning helps Siri and Alexa with voice recognition through trial and error
*   Gmail relies on machine learning to identify and filter spam
*   Netflix uses machine learning to predict which shows you’ll like based on the ones you’ve watched in the past

Basically, machine learning is useful anywhere a computer needs to make a prediction or a judgment. It can apply to fraud detection, bioinformatics, advertising, and financial modeling.

# Exercise caution: Machine learning has flaws

Machine learning is only as good as the algorithm it uses and the data set it gets trained on. Because machine learning is so complex, its code is notoriously difficult to debug and write correctly. When a machine learning algorithm fails, it can be difficult to pinpoint exactly why it failed.

Another problem is machine learning inherits the biases that are present in your data set. If your data is imprecise, skewed, or incomplete, the algorithm will still try to make sense of it. Conclusions drawn from too small of a data set are often outright wrong. Insufficient data is one reason why machine learning projects fail to deliver.

More insidious, however, are machine learning projects that inherit racial, class, age, or other biases from the data collectors or algorithm creators. Machine learning is only as good as the data it is trained on, and creating ethical datasets is a subject for an entire blog post in itself.

# The promise of AI

Over the coming years, AI will certainly make our lives easier by automating menial tasks. It’s possible these tasks could get as complex as self-driving cars and automated checkout at retail stores. While the jobs lost to automation is an important concern, another key is making sure everyone has equal access to automation and is treated fairly in a new automated world. Unfortunately, we haven’t found a way for a machine learning algorithm to teach ethics or morality quite yet.


text:
---
layout: default
---

# 1993-12-25 - One-Time Pads an Overall

## Header Data

From<EMAIL_ADDRESS>(Terry Smith)

To<EMAIL_ADDRESS>Message Hash: 78bfea18d3e2c3f609b4190eb658f4d434fa9225515c2e0ab27a4c0e10296198

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1993-12-25 16:21:50 UTC

Raw Date: Sat, 25 Dec 93 08:21:50 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Terry Smith)
Date: Sat, 25 Dec 93 08:21:50 PST
To<EMAIL_ADDRESS>Subject: One-Time Pads an Overall
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

<EMAIL_ADDRESS>wrote
>
>And I'll trust a public key cypher with a key disk (or Newton-like
>PDA) and a memorized passphrase a lot more than I'll trust a stack of
>CD-ROMs which I can't reasonably carry with me at all times.
>
 |-------------------------------|

You're absolutly right, but the point I was making was that any little
country that can maintain an embassy outside it's borders can also set
up a TOTALLY bullet proof code system with 10 grand tops of hardware.

                    Terry Smith - XANTH sysop - 1:259/510
                CI$ 70733,3013 PGP 2.3A KEY FREQABLE AS 'KEY'.
 My opinions are not that of my company. But one day they WILL be! And then -
                        the -+*WORLD*+- Bwaw ha ha !!.
                       Read the Tick and others by NEC.

---
 * TLX v1.55 * If you hate a man, give his daughter a Barbie.

{% endraw %}
```

## Thread

+ Return to [December 1993](/archive/1993/12)

+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_netcom_com_timothy_c_may_)"
+ Return to<EMAIL_ADDRESS>(Terry Smith)](/authors/terry_smith_at_canrem_com_terry_smith_)"

+ 1993-12-21 (Tue, 21 Dec 93 11:59:49 PST) - [One-Time Pads an Overall Lose for Cypherpunks](/archive/1993/12/122843b84efcb39184fe02318a00ba780c7effbe34caadcd1d6355cd24b462a8) -<EMAIL_ADDRESS>(Timothy C. May)_
  + 1993-12-25 (Sat, 25 Dec 93 08:21:50 PST) - One-Time Pads an Overall -<EMAIL_ADDRESS>(Terry Smith)_

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# React.js Examples

A list of react.js example in html files format with react.js features. The files were created during I was learning react.js for practice. Files named with feature is for easy to look up for reference.

## Getting Started

You can simply open the files in browser to check the result

### Version
- React : 15.6.1
- React dom : 15.6.1
- Babel: 7.2.2

## License

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


text:
---
layout: post
title: Apex Probes Vs. Handheld Probes
date: '2018-06-06'
categories: Analysis
tags: [Apex]
---

# <center> R Analysis of the Apex Probes Vs. the Handheld Probes

* Hypotheses:
  - Null:
    - There will be no difference between the handheld and Apex Probes
  - Alternative:
    - The handheld probes will be more precise than the Apex probes
* Steps:
  - Test for assumptions of normality
    - **Density Plots**
![](https://github.com/maxzav17/Zavell_Lab_Notebook/blob/master/images/Apex.Density.png?raw=true)
**Fig 1.** Density Plots for each Quantitative Measurement to assess the normality in the data

    - **Q-Q Plots**
![](https://github.com/maxzav17/Zavell_Lab_Notebook/blob/master/images/Apex.Q-Q-Plot.png?raw=true)
**Fig 2.** Q-Q Plots for each Quantitative Measurement to assess the normalitt in the data

    - **Shapiro-Wilks Test**

| Measurement | P-Value |
|-------------|---------|
| pH    | 0.2934   |
| Temperature   | 2.932e-09   |
| PAR   | 0.5702  |
Table 1. P-Values from the Shapiro-Wilk Normality Test. We can assume normality for pH and PAR because the p-values are greater than 0.05. Does not assume normality for Temperature.

* Scatterplots:
  - **Points**
![](https://github.com/maxzav17/Zavell_Lab_Notebook/blob/master/images/Apex.Scatter.1.png?raw=true)
**Fig 3.** Scatterplot of the Handheld Vs. Apex Probes. The last three points are: 4/5/2018, 4/6/2018, and 4/9/2018.

  - **Points with lines**
![](https://github.com/maxzav17/Zavell_Lab_Notebook/blob/master/images/Apex.Scatter.2.png?raw=true)
**Fig 4.**  Scatterplot of the Handheld Vs. Apex Probes. The last three points are: 4/5/2018, 4/6/2018, and 4/9/2018. Lines do not represent data.

* Other Graphs
  - **Boxplot**
![](https://github.com/maxzav17/Zavell_Lab_Notebook/blob/master/images/Apex.Boxplot.png?raw=true)
**Fig 5.** Boxplots of Each Quantitative Measurement

* T-Test and Wilcox Test:
  - **Two Sample T-Test**

| | T-Value   | Degrees of Freedom | P-Value | 95 % CI |
|-|-----------|--------------------|---------|---------|
| pH   | 1.1098   | 31.791  | 0.2754 | -(0.0482 - 0.1635)   |
| PAR   | -1.3502   | 22.776   | 0.1902   | -(14.1991 - 2.9873)   |
**Table 2.** T-Tests were conducted in R.

  - **Wilcox Test**

| | W-Value | P-Value |
|-|---------|---------|
| Temperature   | 116.5   | 0.3331   |
**Table 3.** The Test was conducted in R.

* Conclusions:
  - We fail to reject the null hypothesis for all three measurements: pH, Temperature, and PAR.
Both visual and statistical tests were conducted to test for normality (Q-Q Plots, Density Plots, and
Shapiro-Wilk Normality Test). Temperature had a P-Value of 2.932e-09 and was therefore smaller than
0.05 and does not assume normality. Thus, a Wilcox Test was conducted on temperature instead of a
two-sample t-test. We fail to accept the null hypothesis because the p-value is above 0.05. Therefore, it
can be assumed that there is no difference between the Apex and handheld probes.


text:
# Changelog

## [0.4.0] - 18.03.2020

#### Markdown SCSS
- Added a mixin to get a default markdown styling, add to your app's `styles.scss`
  ```scss
  gewd-markdown {
    @import<EMAIL_ADDRESS>
    @include markdownCss();
    @include markdownDefaultDarkColor();
  }
  ```
- colors can be changed via css `var(--)`

#### Prerender:
- multiple fixes to run `@nguniversal/` prerender steps
  <br>*note: parsing markdowns or using the `WebWorker` can't be executed during pre-render, this still happens during runtime*

#### :boom: Breaking changes:
- merged InjectionTokens as `MarkdownOptionsInjectorToken` and moved to a different path `@gewd/markdown/service`
- mermaid options under `MarkdownOptionsInjectorToken` now are:
  ```ts
  mermaidPath: 'mermaid.min.js',
  mermaidOptions: {
    theme: 'neutral',
    // and others see  https://mermaid-js.github.io/mermaid/#/mermaidAPI?id=mermaidapi-configuration-defaults
  }
  ```

## [0.3.0] - 2020-02-25

#### Optimized
- `mermaid.js` calls

### [`<gewd-markdown>`]

#### Added
- `[useCache]="true"` this will use methods `getCached` and `saveCached` of `MarkdownCacheService`

  You can provide your own implementation of `MarkdownCacheService`:
    - to either cache the whole markdown
    - or the markdown parts (currently only mermaidjs)
- `[showRawMd]="false"` shows the raw markdown first before showing the rendered text
- `[allowMermaid]="false"`

### [`@gewd/markdown/utils`]

#### Added
- `simpleHash(text)`

## [0.2.0] - 2019-12-23

- :sparkles: Emoji Support inside Markdown-Worker
  Can be also used alone:
  - `@gewd/markdown/emoji-map`
     - `EMOJI_MAP`
     - `colonToUnicode(colonName)`
- :zap: more entry points to optimize builds
  - `@gewd/markdown/utils`
  - `@gewd/markdown/service`
  - `@gewd/markdown/worker-functions`

### :boom: Breaking changes:
- renamed `WorkerService` to `MarkdownService`
- `MarkdownService.compileMarkdown` added `triggerMermaid = false` argument

## [0.1.0] - 2019-12-16

Start of Changelog

repository: weber/gewd

repo_name: weber/gewd


text:
# Public Code Standard

The Public Code Standard is a method for developing civic and source code for public purposes.

## Help improve this standard

You can read more about how to help in the [contributing guide](CONTRIBUTING.md)

repository: ElenaFdR/standard

repo_name: ElenaFdR/standard


text:
---
layout: post
title: Alzheimer's Context Clock - Roadmap and Brainstorming
redirect_from:
  - /blog/posts/alzheimers-context-clock-roadmap-and-brainstorming/
---

This project is one I've been toying with for a long while. It's appeal contains a rare combination of programming, device/hardware, physical construction and sentimental aspects.

A little background: my grandmother is somewhere in the early-mid stages of Alzheimer's. For the most part, she remembers people and places when she sees them but definitely has a hard time drawing connections in the abstract. For example, if I'm in front of her she usually recognizes me (although it may take a bit), but if I'm not in the room "Jason" doesn't always register. Like others in her condition, it's not constant and some days are better than others.

She has always been an important part of my life and has been deeply involved for my entire life from childhood on into adulthood. It makes it all the more frustrating to watch her deteriorate and feel like you can't do anything about it. Of course I'm a maker so my initial reaction is to build a solution.

## First Attempt

A few years ago I wanted to build something that would assist her condition, preferably both entertaining and helping to reinforce connections in her brain. My idea was to make a website for family members to post photos and events (essentially a private family social network), which she could view on a stripped-down tablet customized for only viewing this website.
In hindsight, my heart might have been in the right place but I ignored virtually everything I've learned when it comes to design, user experience and adoption. There was no content because it required effort on behalf of people who never really "bought in". I tried integrating with Facebook but that opened up all sorts of problems in itself. On the other side, the tablet was still harder for her to use than I expected. Most of the time she would just forget it existed, and I didn't consider that even "simple" controls like touch (or a stylus) still aren't native to someone from her generation--and that's before even considering Alzheimer's.

## A New Direction

Taking what I learned from my previous failure, I looked heavily at what did and didn't work. Essentially:

**Good**

- Pretty pictures
- Associations (i.e. picture of "Jason" plus text to help connect the dots)

**Bad**

- User input of any kind
- Out of sight, out of mind
- Stale or limited content

While shopping around for gifts for Alzheimer's patients I was largely underwhelmed. One of the products that stood out was a clock that provided special context for the viewer. Instead of just displaying "3:30 pm" you would see "Wednesday afternoon" because afternoon has a much stronger association than the numbers themselves. This feature really clicked with me but I thought the product itself was incredibly expensive for something that really only showed one screen all the time.

It took no time at all to realize I could do something better with a Raspberry Pi, and it was amazing how quickly improvements came to mind. Why not show rotating slides with more than just time of day? What about seasonal or holiday context? Can I connect to it remotely and add slides periodically? It very quickly spiraled into a whole suite of features that acknowledged everyone of my previous mistakes or successes.

Pretty pictures? Check. Associations? Loads of them, in a wide variety User input? None at all, it will run itself Out of sight? Nope, it will look great sitting in a prominent spot. Fresh content? Absolutely.

## Roadmap

I see this project as having 3 main directions:

1. Hardware - the screen and Pi setup
2. Script - the python program that will handle the slideshow, and possible remote interaction
3. Enclosure - the actual case or frame to house the hardware

Hardware was largely a no brainer. A Raspberry Pi is more than capable, has plenty of storage space, low power consumption and the HDMI port opens up many display opportunities. For the display I quickly fell in love with this HDMI 4 Pi 10.1" Display at Adafruit. There are cheaper options but the IPS screen (1280x800) and HDMI input give it the size and clarity that I find critical. It needs to be big enough with a high resolution to be legible, but not so much that it's bulky and would be hard to find a home (i.e. a monitor). Housed properly it can be aesthetically pleasing as well and easy to integrate with the decor.

The enclosure has actually been the greatest challenge in the planning stage. The screen is roughly 6"x9" with some mounting tabs scattered around the edges. Unfortunately that size doesn't correlate to common picture frames, which was my first idea. I wanted something like a shadow box that would have the depth to house the components. After a lot of searching I stumbled across this Adafruit Tutorial where they mention building your own custom frame, which is what I have settled on for now. It will essentially be crown molding with about 2 inches of "box" behind it. I just picked up my materials and will have to post progress on that later.

The script is fun to build so far. Most of my Python experience is with web (Django) projects so I'm learning new things like TKinter and imaging tools. The script will have its own dedicated post(s) but in a nutshell I'm working towards:

- A base `/Images` directory which will contain all the different types of slides

- A dice roll determines the type of slide to show i.e. "Holiday", "Family" or "Seasonal"

- That type will have date range restrictions to determine which _sub-categories_ are "eligible" i.e. only show Christmas slides in December

- Another dice roll picks a random slide from the appropriate folder and shows it in fullscreen mode

- After ~20 seconds: Rinse. Repeat.

With my slide "types" being:
**Holidays** Pretty holiday themed photos with context text

**Seasons** Similar to holidays but covering a larger date range

**Family** Photos of family members with context, i.e. "Jason, your grandson"

**Locations** Important places from her life with text

**Time of Day** As noted before, "Wednesday afternoon"

**Hard Events** Static set of slides like "Your daughter's birthday"

**Scheduled Events** Can change over time i.e. "Your doctor appointment is this afternoon"

**Inspirational Quotes**, biblical slides or other positive affirmations that are eligible year-round

**Wish list / Things to learn**

- Programmatically drawn slides for things like time of day or reminders
- Event driven slides i.e. "It's Wednesday afternoon, you will be getting a haircut soon"
- Remote access for adding slides periodically
- Periodically poll a page on my site for new events to download in JSON format

That's pretty much where I'm at for now. I'll post my progress along the way.

gha_language: HTML

gha_license_id: NOASSERTION


text:
![Corda](https://www.corda.net/wp-content/uploads/2016/11/fg005_corda_b.png)

# Hello Corda!

This repo is an short introduction to the two day Corda training course. The instructional powerpoint that goes along with this content can be found here: https://github.com/corda/hello-corda/blob/master/HelloCorda.pdf

This repository is currently only available in Java.

# Instructions
Once you are all set up, you can start expanding on the class templates.
In order to send custom messages using this CorDapp - You will first fix `MessageState`, then `MessageFlow`, and lastly `MessageContract`.
There is a comment above each class that explains the change that needs to be done.
For more details follow the intructional powerpoint "HelloCorda.pdf" within this git repository.

### Running the tests
* Select `Baseline Test - Java` from the dropdown run configuration menu, and click the green play button.
* Individual tests can be run by clicking the green arrow in the line number column next to each test.
* When running flow tests you must add the following to your run / debug configuration in the VM options field. This enables us to use
* Quasar - a library that provides high-performance, lightweight threads.
* "-javaagent: /PATH_TO_FILE_FROM_ROOT_DIR/quasar.jar"

# Template Files

### Java

State:
* Template: `java-source/src/main/java/net/corda/hello/MessageState.java`
* Tests: `java-source/src/test/java/net/corda/hello/state/MessageStateTests.java`

Contract:
* Template: `java-source/src/main/java/net/corda/hello/MessageContract.java`
* Tests: `java-source/src/test/java/net/corda/hello/contract/SendMessageTests.java`

Flow:
* SendMessage template: `java-source/src/main/java/net/corda/hello/MessageFlow.java`
* SendMessage tests: `java-source/src/test/java/net/corda/hello/flow/SendMessageFlowTests.java`

Integration Test:
* HelloTests Test: `java-source/src/test/java/net/corda/hello/HelloTests.java`

# Running the CorDapp
While the functionality will differ, this application can be run before and after making the changes described in the tutorial.

### Java
* Terminal: Navigate to the root project folder and run `./gradlew clean java-source:deployNodes`, followed by
`./java-source/build/node/runnodes`

## Troubleshooting:
When running the flow tests, if you get a Quasar instrumention error then add:

```-ea -javaagent:lib/quasar.jar```

to the VM args property in the default run configuration for JUnit in IntelliJ.

repository: aspineon/hello-corda

repo_name: aspineon/hello-corda


text:
## Create StarWars Characters' Cards in a paginated Grid with sorting options

Your project is very Star Warsly themed and as part of the Web App you are building the project manager has asked you to create a two dimensional grid displaying Star Wars Characters' cards.

The data for the characters can be found at:
https://swapi.co/api/people

And it is paginated so you would get the data for a specific page as follows:

https://swapi.co/api/people?page=2

The card should contain information from the /people endpoint (name, age, gender etc.) Display whatever information you want. You have all the freedom here.

Here's how a card usually looks like:

https://material-ui.com/demos/cards/

## Paging functionality:

Clicking the next pagination control should load the next page and store it in some form of cache of your chosing. If there is no next page the button should be disabled.
Going to the previous page and then forward should not make an extra request for the currently loaded page data, instead it should load the data from cache.

Clicking the previous pagination control should load the previous page and store it in some form of cache of your chosing. If there is no previous page the button should be disabled.
Going to the next page and then backwards should not make an extra request for the currently loaded page it should instead load the page from cache.

Furthermore you are required to implement sorting of the characters by name.

Sorting by name on first click sorts the names of the characters only for the displayed page alphabetically. A - Z

Sorting the characters by name on second click sorts the names of the characters only for the displayed page alphabetically in reverse. Z - A.

Components needed hints:

- <StarWarsCharacterCard>
- <StarWarsCharactersGrid>
- <PaginatedContainer>

Good luck !


text:
# Image Sorting Application

We can sort out different kinds of images in well organised manner using this application. It is designed with pyqt5 and uses TensorFlow API and COCO pre-trained models to detect objects in the images which are then re-oganised in different folders according to their object names. After selecting required images we select the type of pre-trained model like _(ssdlite, ssd, fast-rcnn, faster-rcnn)_ then start the processing. The program will start going through every single image and separate them one by one according to the objects found in them. It can also be configured to save detection of the objects found in the images.

## Features of the application

There are multiple options to configure for desired results:-

1. *Image previewer:-* This window will show the current working image.
2. *Image:-* We change the number of images required from the total images found
3. *Threshold:-* We can set the threshold for the detection.

4. *Checkboxes of the application:-*
   - *Show Visualization:-* To see the bounding boxes in the images.
   - *Save Visualization:-* To save those bounding boxes with the images.
   - *Go through folders:-* This will walk and fetches images from folders inside folders.
   - *All Objects:-* Every object detected by the model will also count.

5. *Search bar:-* It is to search all the images containing the searched object for example if we search for “Cat” it only sort all the images of cat to one folder and ignore any other object which is not a cat.

6. *Select model:-* We can select different type of pre-trained models from the given list.

7. *Select Directory:-* Path to the directory to fetch the images.

8. *Save Directory:-* Path to the directory where the save will be saved by default it will save to the selected directory path.

9. *Start:-* When all the necessary information is fed then start button will enable and by pressing it will start the process of sorting.

repository: Saadmairaj/Image-Sorting-Application

repo_name: Saadmairaj/Image-Sorting-Application


text:
# Tree++

A Red Black Tree Implemented in C++

## Usage

At this point, this project is an experiment, but it may be fun to tinker
with and optimize. Here is a basic usage example.

```c++
#include "tree.hpp"

int main()
{
    Tree<double> stellarMass = Tree<double>();
    double delta;

    stellarMass.set("Sun", 1.0);
    stellarMass.set("Sirius", 2.02);
    stellarMass.set("R136a1", 256.0);

    delta = stellarMass.get("R136a1") - stellarMass.get("Sun");

    // ...

    return 0;
}

```

## Run the tests

Validate output:

```
$ scripts/test.sh
```

Check for memory leaks - you must have `valgrind` installed on your system:

```
$ scripts/memtest.sh
```

![Tree gif](http://i.giphy.com/ygUwDJOjip2.gif)

repository: kahnvex/treepp

repo_name: kahnvex/treepp


text:
# Decision Tree
A decision tree is a graph that uses a branching method to illustrate every possible outcome of a decision. Lets start by taking a example of OR of two variables X1 and X2. The decison tree for the same is shown below :

We have total four possible combinations as shown in the truth table.
So at the beginning we have 2 True and 2 False outcomes to start with.

The first condition we check for is the value of X1. If X1 is true then we are sure that the result will be true and hence we arrive at 2 true and no false. Note that ,we only consider those rows of the table which are having X1 as true i.e. the first and the third row in the current example .That is why we have 2 total outcomes out of which 2 are true and none is false. This node is having a definite answer.If we arrive at this node there is no confusion as to which what our tree should return, therefore these are called pure nodes.

If X1 is false then the answer is dependant on the value of X2. If X2 is false the answer is false and if the answer is true the final result is true. We have three pure nodes here as shown in the pictorial representation of the decision tree.

Now if we are given any new data for prediction we just need to run it through our tree. For example if we get A and B as two values for testing. We check first if A is true. If A is true we have true as our answer else we need to check for the value of B. If B is true then our answer agin is true else we have false as the final outcome.

repository: SoumyaMalgonde/AlgoBook

path: /ml/Decision Tree/README.md

gha_language: Jupyter Notebook

repo_name: SoumyaMalgonde/AlgoBook


text:
# cs2263_hw01
Project name: cs2263_hw01.

Description: Parses commandline or batch file input into Java to perform basic mathematical functions.

Installation: Pull the repository from GitHub and save the file to your local machine.

Usage: Open the root directory within a command prompt.

Credits: Keagan York -Kyork1

License: MIT

branch_name: refs/heads/main


text:
# webspinner
[![PyPI](https://img.shields.io/pypi/v/webspinner.svg)](https://pypi.python.org/pypi/webspinner/)

Python utilities for working with data source types used by the dsgrid project
(i.e., AWS, PostgreSQL, and .parquet)

[Install](#install) | [Configure](#configure) | [Uninstall](#uninstall)

## Install

```bash
pip install webspinner
```

or

```bash
pip install git+ssh://git<EMAIL_ADDRESS>```

or

```bash
pip install git+https://github.com/dsgrid/webspinner.git@master
```

To get dependencies required for certain types of resources, add extras as in:

```
pip install webspinner[pgres]
pip install webspinner[aws]
pip install webspinner[parquet]
pip install webspinner[pgres,aws,parquet]
```

## Configure

webspinner provides code in support of accessing various dsgrid data sources.
That said, you may only need to access one or two data sources for your particular
project. Please configure access to the resources you need.

[PostgreSQL](#posgresql) | [AWS](#aws) | [.parquet](#parquet)

### PosgreSQL

#### Dependencies

```
pip install pgpasslib psycopg2
```

Install [pgAdmin](https://www.pgadmin.org/download/) or another PostgreSQL client.
Then identify or create your [pgpass file](https://www.postgresql.org/docs/9.1/static/libpq-pgpass.html).
On Mac and Linux, the file to edit or create is `~/.pgpass`. On Windows it is
`%APPDATA%/Roaming/postgresql/pgpass.conf`, where `%APPDATA%` is the AppData
subdirectory under your user profile (i.e., `C:/Users/$USER/AppData`). If the
file does not yet exist, simply create a new text file named `pgpass.conf`.
Once the file exists, add the lines like:

```
POSTGRES_SERVER_ADDRESS:*:*:$USER:YOUR_PASSWORD
```

replacing `POSTGRES_SERVER_ADDRESS` with the PostgreSQL server to connect to,
`$USER` with your actual username, and `YOUR_GISPGDB_PASSWORD` with your actual
password. The dsgrid team typically connects to `<IP_ADDRESS>` or its alias
`gds_edit.nrel.gov`.

**On Mac and Linux** be sure to set the permissions to

```
chmod 600 ~/.pgpass
```

If the permissions are too permissive, your run may not start.

#### Configuration file arguments

Project-specific defaults can be stored in a text file, e.g., `webspinner.config`
or `config.ini` with a `[PGRES]` section and any or all of the following arguments:

```
[PGRES]
user = your_user_name
dbase = database_name
host = host_address
port = port_number
```

The defaults can then be loaded in at any time (e.g., at the top of a script or
a notebook) by passing the configuration filepath into the `webspinner.configure`
function.

### AWS

#### Dependencies

```
pip install pyathena awscli
```

Set up your AWS access credentials by issuing the following command in the terminal.
(FYI there are [other ways](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#guide-configuration)
to set up your credentials if you're interested.)

```
>> aws configure
AWS Access Key ID [None]: <your key>
AWS Secret Access Key [None]: <your secret key>
Default region name [None]: us-west-2
Default output format [None]: json
```

#### Configuration file arguments

Project-specific defaults can be stored in a text file, e.g., `webspinner.config`
or `config.ini` with an `[AWS]` section and any or all of the following arguments:

```
[AWS]
s3_staging_dir = data_staging_dir_on_s3
region_name = aws_region_name
schema_name = aws_database_schema_name
work_group = aws_work_group_name
```

The defaults can then be loaded in at any time (e.g., at the top of a script or
a notebook) by passing the configuration filepath into the `webspinner.configure`
function.

### .parquet

If you plan to work with .parquet files, also install pyarrow.

```
pip install pyarrow
```

## Uninstall

```
pip uninstall webspinner
```

repository: dewittpe/webspinner

repo_name: dewittpe/webspinner


text:
# Transition year sensitivity analysis (one at a time approach)
This folder contains the dakota files and jupyter notebooks
that generate the results for the impact of variation of transition year
on a EG01-EG30 transition scenario.

To run the simulation, type this into the command line:

`dakota -i transition-year.in -o transition-year.out`

This will generate 5 sqlite output files in the
`../../../cyclus-files/oat/transition-year/` directory. Example name of output file: `ty0.sqlite`.
They contain the results for EG01-30 transition scenario with varying MOX PWR transition year
80,81,82,83,84 years. Use the `transition-year.ipynb` jupyter notebook to analyze
environmental impact, resource utilization, and goodness of transition evaluation metrics
from these sqlite files.

To obtain the results for proliferation risk evaluation metrics we need to run
the same analysis as above but with `<explicit_inventory>true</explicit_inventory>`
in the control segment of the cyclus input file.
The distinction between these output files and the non-exp ones is that
explicit inventory tracking is turned on.
This is required to use the isotopic capabilities in cymetric.
These simulations take significantly longer to run.
To run this simulation, type this into the command line:

`dakota -i transition-year-exp.in -o transition-year-exp.out`

This will generate 5 sqlite output files in the
`../../../cyclus-files/oat/transition-year/` directory. Example name of output file: `ty0.sqlite`.
They contain the results for EG01-30 transition scenario with varying MOX PWR transition year
80,81,82,83,84 years. Use the `transition-year-pu.ipynb` jupyter notebook to analyze
environmental impact, resource utilization, and goodness of transition evaluation metrics
from these sqlite files.


text:
# Apixu changing policy and operating under the new name "weatherstack"

In October 2019 Apixu will stop working, the business has been renamed "weatherstack". The new business no longer provides a free forecast but does provide current weather.

Since the forecast will no longer be free I will not be adaping this library to the new service.

Please consider using the DarkSkyWeather library instead:

https://github.com/Bodmer/DarkSkyWeather

# ESP8266 and ESP32 Apixu weather client

Arduino client library for https://www.apixu.com/

Collects current weather plus daily forecasts.

Requires the JSON parse library here:
https://github.com/Bodmer/JSON_Decoder

The ApixuWeather_Test example sketch sends collected data to the Serial port for API test.

repository: Bodmer/ApixuWeather

repo_name: Bodmer/ApixuWeather


text:
# tailwind-admin-dashboard
This is a FREE admin dashboard made with Tailwind CSS. It includes:

Demo [here](https://yzipperer.github.io/tailwind-admin-dashboard/)

```
  - Top navigation bar
  - Side navigation bar
  - grid container
  - Total YTD Sales Overview
  - Dashboard Widgets:
    - Total YTD Orders
    - Average Order Total
    - Total Products
    - Total Inventory
```

# Overview Page

![Overview](https://github.com/yZipperer/tailwind-admin-dashboard/blob/main/images/Readme/github-overview-page.PNG)

## Other Tailwind Projects:

TailwindCSS eCommerce Store: [Demo](https://yzipperer.github.io/tailwind-store/) > [Source Code](https://github.com/yZipperer/tailwind-store)

repository: yZipperer/tailwind-admin-dashboard

repo_name: yZipperer/tailwind-admin-dashboard


text:
# Nixpkgs

> Since: v1.19

After releasing to GitHub, GitLab, or Gitea, GoReleaser can generate and publish
a _nixpkg_ to a [Nix User Repository][nur].

The `nix` section specifies how the pkgs should be created:

```yaml
# .goreleaser.yaml
nix:
  - #
    # Name of the recipe
    #
    # Default: ProjectName
    # Templates: allowed
    name: myproject

    # IDs of the archives to use.
    # Empty means all IDs.
    ids:
      - foo
      - bar

    # GOAMD64 to specify which amd64 version to use if there are multiple
    # versions from the build section.
    #
    # Default: v1
    goamd64: v1

    # URL which is determined by the given Token (github, gitlab or gitea).
    #
    # Default depends on the client.
    # Templates: allowed
    url_template: "https://github.mycompany.com/foo/bar/releases/download/{{ .Tag }}/{{ .ArtifactName }}"

    # Git author used to commit to the repository.
    commit_author:
      name: goreleaserbot
      email<EMAIL_ADDRESS>
    # The project name and current git tag are used in the format string.
    #
    # Templates: allowed
    commit_msg_template: "{{ .ProjectName }}: {{ .Tag }}"

    # Path for the file inside the repository.
    #
    # Default: pkgs/<name>/default.nix
    # Templates: allowed
    path: pkgs/foo.nix

    # Your app's homepage.
    #
    # Templates: allowed
    homepage: "https://example.com/"

    # Your app's description.
    #
    # Templates: allowed
    description: "Software to create fast and easy drum rolls."

    # License name.
    license: "mit"

    # Setting this will prevent goreleaser to actually try to commit the updated
    # package - instead, it will be stored on the dist folder only,
    # leaving the responsibility of publishing it to the user.
    #
    # If set to auto, the release will not be uploaded to the repository
    # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
    #
    # Templates: allowed
    skip_upload: true

    # Runtime dependencies of the package.
    #
    # Since: v1.20.
    dependencies:
    - zsh
    - chromium
    - name: bash
      os: linux
    - name: fish
      os: darwin

    # Custom install script.
    #
    # Default: 'mkdir -p $out/bin; cp -vr $binary $out/bin/$binary', and
    #   `makeWrapper` if `dependencies` were provided.
    # Templates: allowed
    install: |
      mkdir -p $out/bin
      cp -vr ./foo $out/bin/foo

    # Custom additional install instructions.
    # This has the advantage of preventing you to rewrite the `install` script
    # if the defaults work for you.
    #
    # Since: v1.20
    # Templates: allowed
    extra_install: |
      installManPage ./manpages/foo.1.gz

    # Custom post_install script.
    # Could be used to do any additional work after the "install" script
    #
    # Templates: allowed
    post_install: |
      installShellCompletion ./completions/*

{% include-markdown "../includes/repository.md" comments=false %}
```

!!! tip

    Learn more about the [name template engine](/customization/templates/).

## Things not yet implemented

- Generating packages that compile from source (using `buildGoModule`)
- Generating packages when `archives.format` is `binary`

Both issues are in [the radar][iss4034].
You're welcome to contribute. 😄

## Dependencies

### `nix-prefetch-url`

The `nix-prefetch-url` binary must be available in the `$PATH` for the
publishing to work.

[iss4034]: https://github.com/goreleaser/goreleaser/issues/4034

### GitHub Actions

To publish a package from one repository to another using GitHub Actions, you
cannot use the default action token.
You must use a separate token with content write privileges for the tap
repository.
You can check the
[resource not accessible by integration](/errors/resource-not-accessible-by-integration/)
for more information.

## Setting up a NUR

To set up a Nix User Repository, follow the instructions in their
[repository][nur].

Then, you'll need to:

- publish a release with GoReleaser: it should create the package at
  `./pkgs/{name}/default.nix` or whatever path you set it up to
- make sure `./flake.nix` is correct with what you want, especially the
  `systems` bit
- add your package to `./default.nix`
- edit your `README.md` removing the template stuff

That's it!

[nur]: https://github.com/nix-community/NUR

{% include-markdown "../includes/prs.md" comments=false %}

repository: goreleaser/goreleaser

gha_language: Go

repo_name: goreleaser/goreleaser


text:
# TurboGraft
Turbograft extends [Turbolinks](https://github.com/rails/turbolinks), allowing you to perform partial page refreshes.

`Graft` - (noun) a shoot or twig inserted into a slit on the trunk or stem of a living plant, from which it receives sap.

In botany, one can take parts of a tree and splice it onto another tree.  The DOM is a tree.  In this library, we're cutting off sub-trees of the DOM and splicing new ones on.

 Turbolinks works by intercepting navigation requests and loading them via Ajax when possible, swapping the body tag of the document with the newly loaded copy. Turbograft builds on this to allow you to perform a partial page refresh on specified DOM nodes by adding a refresh key. This allows you reduce page load time, while the feeling of a native, single-page application.

## One render path
Turbograft gives you the ability to maintain a single, canonical render path for views. Your ERB views are the single definition of what will be rendered, without the worry of conditionally fetching snippets of HTML from elsewhere. This approach leads to clear, simplified code.

## Client-side performance
Partial page refreshes mean that CSS and JavaScript are only reloaded when you need them to be. Turbograft improves on the native, single-page application feel for the user while keeping these benefits inherited from Turbolinks.

Head asset tracking means that you can split your large CSS and Javascript bundles into smaller area bundles, decreasing your page weight and further increasing the responsiveness of your app.

## Simplicity
Turbograft was built with simplicity in mind. It intends to offer the smallest amount of overhead required on top of a traditional Rails stack to solve the problem of making a Rails app feel native to the browser.

## Status
[![Gem Version](https://badge.fury.io/rb/turbograft.svg)](http://badge.fury.io/rb/turbograft)
[![Build Status](https://travis-ci.org/Shopify/turbograft.svg?branch=master)](http://travis-ci.org/Shopify/turbograft)

## Installation

* Replace `gem "turbolinks"` with `gem "turbograft"` in your Gemfile
* Replace `//= require turbolinks` with `//= require turbograft` in _app/assets/javascripts/application.js_
* Run `bundle install`

## Dependencies

Turbograft requires a browser that supports [`Promise`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), or a polyfill (e.g., [core-js](https://github.com/zloirock/core-js).)

## Usage

Much of Turbograft’s functionality relies on attributes HTML elements. These attributes are currently namespaced to `data-tg-*` (e.g. `data-tg-refresh`).

Versions of Turbograft older than 0.2.0 did not use this namespacing. The old attribute names (e.g. `refresh`) are deprecated.

### Partial page refresh

```html
<div id="content" data-tg-refresh="page">
  ...
</div>
```

```html
<a href="#" id="partial-refresh-page" data-tg-refresh="page" onclick="event.preventDefault(); Page.refresh({url: '<%= page_path(@next_id) %>',onlyKeys: ['page']});">Refresh the page</a>
```

This performs a `GET` request, but our client state is maintained. Using the `data-tg-refresh` attribute, we tell TurboGraft to grab the new page, but only refresh elements where `data-tg-refresh="page"`.  This is the lowest-level way to use TurboGraft.

`data-tg-refresh` attributes on your DOM nodes can be considered somewhat analoguous to how `class` will apply styles to any nodes with that class.  That is to say, many nodes can be decorated `data-tg-refresh="foo"` and all matching nodes will be replaced with `onlyKeys: ['foo']`.  Each node with `data-tg-refresh` must have its own unique ID (this is how nodes are matched during the replacement stage).  At the moment, `data-tg-refresh` does not support multiple keys (e.g., `data-tg-refresh="foo bar"`) like the `class` attribute does.

### onlyKeys
You can specify multiple refresh keys on a page, and you can tell TurboGraft to refresh on one or more refresh keys for a given action.

```html
<button id='refresh-a-and-b' href="<%= page_path(@id) %>" onclick="event.preventDefault(); Page.refresh({url: '<%= page_path(@id) %>', onlyKeys: ['section-a', 'section-b']});">Refresh Section A and B</button>
```

### exceptKeys
You can also tell TurboGraft to refresh the page, but exclude certain elements from being refreshed.

```html
<button id='refresh-a-and-b' href="<%= page_path(@id) %>" onclick="event.preventDefault(); Page.refresh({url: '<%= page_path(@id) %>', exceptKeys: ['section-a', 'section-b']});">Refresh everything but Section A and B</button>
```

### data-tg-refresh-never
The `data-tg-refresh-never` attribute will cause a node only appear once in the `body` of the document. This can be used to include and initialize a tracking pixel or script just once inside the body.

```html
<div data-tg-refresh-never>
  <%= link_to "Never refresh", page_path(@next_id), id: "next-page-refresh-never", "data-tg-refresh" => "page" %>
</div>
```

### updatePushState
Defaults to `true`. When set to false it prevents `Page.refresh()` from updating the url in the browser.

## data-tg-remote

The `data-tg-remote` option allows you to query methods on or submit forms to different endpoints, and gives partial page replacement on specified refresh keys depending on the response status.

It requires your `<form>`, `<a>`, or `<button>` to be marked up with:

* `data-tg-remote`: (optionally valueless for `<form>`, but requires an HTTP method for links) the HTTP method you wish to call on your endpoint
* `href`: (if node is `<a>` or `<button>`) the URL of the endpoint you wish to hit
* `data-tg-refresh-on-success`: (optional) The refresh keys to be refreshed, using the body of the response. This is space-delimited
* `data-tg-full-refresh-on-success-except`: (optional) Replaces body except for specififed refresh keys, using the body of the XHR which has succeeded
* `data-tg-refresh-on-error`: (optional) The refresh keys to be refreshed, but using body of XHR which has failed. Only works with error 422. If the XHR returns and error and you do not supply a refresh-on-error, nothing is changed
* `data-tg-full-refresh-on-error-except`: (optional) Replaces body except for specified refresh keys, using the body of the XHR which has failed.  Only works with error 422
* `data-tg-remote-once`: (optional) The action will only be performed once. Removes `data-tg-remote-method` and `data-tg-remote-once` from element after consumption
* `data-tg-full-refresh`: Rather than using the content of the XHR response for partial page replacement, a full page refresh is performed. If `data-tg-refresh-on-success` or `data-tg-refresh-on-error` is defined, the page will be reloaded on those keys. If both `data-tg-refresh-on-success` and `data-tg-refresh-on-error` are not defined, a full page refresh is performed. Defaults to true if neither refresh-on-success nor refresh-on-error are provided
* `data-tg-remote-norefresh`: Prevents `Page.refresh()` from being called, allowing methods to be executed without updating client state

Note that as `data-tg-refresh-on-*` pertains to partial refreshes and `data-tg-full-refresh-on-*-except` pertains to full refreshes, they are incompatible with each other and should not be combined.

### Examples

Call a remote method:

```html
<a href="#" data-tg-remote="post" data-tg-refresh-on-success="page section-a section-b">Remote-method</a>
```

The Rails way:

```erb
<%= link_to "Remote method", method_path, 'data-tg-refresh-on-success' => 'page section-a section-b', 'data-tg-full-refresh' => 'true', 'data-tg-remote' => 'post' %>
```

Post to a remote form:

```html
<div id="results" data-tg-refresh="results">
  Use the field below to submit some content, and get a result.
</div>
<form data-tg-remote="" action="/pages/submit" method="post" data-tg-refresh-on-success="results" data-tg-refresh-on-error="results">
  <input name="form-input" type="text">
  <button type="submit">Submit</button>
</form>
```

### tg-remote events

* `turbograft:remote:init`: Before XHR is sent
* `turbograft:remote:start`: When XHR is sent
* `turbograft:remote:always`: Always fires when XHR is complete
* `turbograft:remote:success`: Always fires when XHR was successful
* `turbograft:remote:fail`: Always fires when XHR failed
* `turbograft:remote:fail:unhandled`: Fires after `turbograft:remote:fail`, but when no partial replacement with refresh-on-error was performed (because no `data-tg-refresh-on-error` was supplied or because `data-tg-remote-norefresh` was present)

Each event also is sent with a copy of the XHR, as well as a reference to the element that initated the `data-tg-remote-method`.

### data-tg-static

With the `data-tg-static` attribute decorating a node, we can make sure that this node is not replaced during a fullpage refresh.  Contrast this to partial page refreshes, where we normally specify the set of elements that need to change.  With `data-tg-static`, we can define a set of elements (by annotating them with this attribute) that must never change.

The internal state of any nodes marked with `data-tg-static` will remain, even though the entire page has been swapped out.  A partial page refresh with `onlyKeys` targeting a node inside of the `data-tg-static` node is also possible, persisting your static element but swapping the innards.

Though, if you were to refresh the page at a higher level -- e.g., refreshing an ancestor of the `data-tg-static`, the static aspect is no longer obeyed and it is replaced!

Examples of where this may be useful include:

- running `<video>` or `<audio>` element
- a client-controlled static nav

### data-tg-refresh-always

For the lazy developer in all of us, we can use the attribute `data-tg-refresh-always` when we want to be sure we've absolutely replaced a certain element, if it exists.  An example of such a node you may want to apply this might be an unread notification count -- always being sure to update it if it exists in the response.

### data-tg-remote-noserialize

When serializing forms for tg-remote calls, turbograft will check to ensure inputs meet the following criteria:

- the input has a `name` attribute
- the input does not have the `disabled` attribute

and

- the input does not have the `data-tg-remote-noserialize` attribute
- no ancestor of the input has the `data-tg-remote-noserialize` attribute

The `data-tg-remote-noserialize` is useful in scenarios where a whole section of the page should be editable, i.e. not `disabled`, but should only conditionally be submitted to the server.

## Head Asset Tracking
### NOTE: This functionality is experimental, has changed significantly since 0.3.0, and may change again in the future before 1.0
The Turbohead module allows you to track css and javascript assets in the head of the document and change them intelligently. This can be useful in large applications which want to lighten their asset weight by splitting their script and style bundles by area.

When a `<script>` or `<link>` tag with a unique name in it's `data-turbolinks-track` is encountered in a response document Turbograft will insert it into the active DOM and, if it's a script, force it to execute.

If an asset with a different `src`/`href` but the same `data-turbolinks-track` value is found upstream, turbograft will force a full page refresh. This prevents potential multiple executions of a script bundle when a new version of your app is shipped.

As of version `0.4.0`, this functionality has been made backwards compatible. If `data-turbolinks-track="true"` head assets are present, turbograft will cause a full page refresh when the set is changed in any way.

## Example App

There is an example app that you can boot to play with TurboGraft.  Open the console and network inspector and see it in action!  This same app is also used in the TurboGraft browser testing suite.

```
./server
```

## jQuery and memory leaks

When turbograft replaces or removes a node it uses native DOM API to do so. If any objects use jQuery to listen to events on a node then these objects will leak when the node is replaced because jQuery will still have references to it. To clean these up you'll need to tell jQuery that they're removed. This can be done with something like:

```coffeescript
document.addEventListener 'page:after-node-removed', (event) ->
  $(event.data).remove()
```

## Contributing

1. Fork it ( http://github.com/Shopify/turbograft/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Write some tests, and edit the example app
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request

## Testing

- `./server` and visit http://localhost:3000/teaspoon to run the JS test suite in the browser
- `bundle exec teaspoon` will run the JS test suite from the command line. Uses Selenium by default, but can be configured using the TEASPOON_DRIVER environment variable
- `bundle exec rake test` to run the browser test suite

repository: Shopify/turbograft

gha_language: JavaScript

repo_name: Shopify/turbograft


text:
# STAC EO Profile

This document explains the fields of the STAC Earth Observation (EO) Profile, which adds to the core fields of a STAC `Item`. EO data is considered to be data that
represents a snapshot of the earth for a single date and time. It could consist of multiple spectral bands in any part of the electromagnetic spectrum. Examples of EO data
 include sensors with visible, short-wave and mid-wave IR bands (e.g., the OLI instrument on Landsat-8), long-wave IR bands (e.g. TIRS aboard Landsat-8), as well as SAR
 instruments (e.g. Sentinel-1).

## EO Extension Description
These are fields that extend the `Item` object, as well as the items's assets field and `Collection` level metadata. The EO Profile generally assumes that you are
using the [STAC collection extension](stac-collection-spec.md), so puts all the repetitive fields at the `Collection` level. Since the collection extension is still
being fleshed out it is also acceptable to just put the required Collection fields as `Item` level properties.

## Item additions

| element             | type info                 | name                    | description                                                                                |
|----------------------|---------------------------|-------------------------|---------------------------------------------------------------------------------------------|
| eo:gsd | float | Ground Sample distance | The minimum distance between pixel centers available, in meters |
| eo:crs     | string    | ref system             | CRS of the datasource in full WKT format. null if no crs
| eo:cloud_cover     | integer (optional)   | Cloud Cover Pct    | Percent of cloud cover (1-100) |
| eo:off_nadir      | float (optional)   | Off nadir    | Viewing angle. 0-90 degrees, measured from nadir
| eo:azimuth      | float (optional)   | Azimuth    | Viewing azimuth angle. 0-360 degrees, measured clockwise from north
| eo:sun_azimuth    | float (optional)   | Sun Azimuth | Sun azimuth angle. 0-360 degrees, measured clockwise from north
| eo:sun_elevation  | float (optional)   | Sun Elevation | Sun elevation angle. 0-90 degrees measured from horizon
| eo:collection             | string  (optional  | Collection Name       | The name of the STAC `Collection` this `Item` belongs to |

All of these values go in the 'properties' object of the STAC Item. As can be seen most are optional, though they are highly recommended for Earth Observation
imagery. It is likely more optional fields will be added as multiple providers expose the fields they use and consensus as to common names and values emerge.
For now if you are a provider with fields you'd like to add just put them under your own prefix, but also propose its use in an [issue](https://github.com/radiantearth/stac-spec/issues).

### Item Field Descriptions in Properties

**eo:gsd** is the nominal Ground Sample Distance for the data, as measured in meters on the ground. Since GSD can vary across a scene depending on projection, this should be the average GSD in the center of the image. If the data includes multiple bands with different GSD values, this should be the best GSD available. If there are different
GSD values in the bands those should be specified in the `eo:bands` section of the Collection, specified below.

**eo:crs**: The Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, provided in [Well-Known Text (WKT) format](https://en.wikipedia.org/wiki/Well-known_text). This field is required. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control Points, eo:crs should be set to null.

**eo:cloud_cover**: An estimate of cloud cover as a percentage of the entire scene. If not available the field should not be provided.

**eo:off_nadir**: The angle from the sensor between nadir (straight down) and the scene center. Measured in degrees (0-90).

**eo:azimuth**: The angle measured from the sub-satellite point (point on the ground below the platform) between the scene center and true north. Measured clockwise in degrees (0-360)

**eo:sun_azimuth**: From the scene center point on the ground, this is the angle between truth north and the sun. Measured clockwise in degrees (0-360).

**eo:sun_elevation**: This is the angle from the tangent of ths scene center point to the sun. Measured in degrees (0-90).

**eo:collection**: This should refer to the `collection_name` field in the Collection metadata that is referenced in the `links` section of the `Item`. This is
used to enable filtering between different collections, which is important when more than one collection is contained in a single catalog.

### Item:links additions

Additionally there should be an entry in the `links` array that is called `collection`, as specified in the [STAC collection extension](stac-collection-spec.md).

```
{ "rel": "collection", "href": "link/to/collection/record" }
```

See that spec for more information.

### Item:assets additions

One of the unique features of Earth Observation data is that providers arrange their assets in all sorts of different ways. Some, like Landsat, provide a file for
each band, while others combine bands in to multiple files. Some provide multi-band 'analytic' products as well as 3 band 'visual' ones, and then the order of the
bands that they include are often different.

The EO profile includes a full definition of the bands in the `Collection` file, but then each asset will specify what bands it covers, and in what order.

| element             | type info                 | name                    | description                                                                                |
|----------------------|---------------------------|-------------------------|---------------------------------------------------------------------------------------------|
| eo:bands | string array | Bands (optional) | An array of strings that index the `eo:bands` field in a `Collection`.

The strings in the array should be the lookup for the dictionary of the `eo:bads` section of a `Collection`, specified below.

## Collection additions

These fields belong in the `Collection` file, which is a dependency of the EO profile (if you are experimenting withnot using a collection link
then these fields are still required, and should be in the Item properties - they will just be duplicative). The `collection_name` is required for the
extension, and is used in the `Item` to enable search by collection. It is also recommended to use the `collection_description` so a more informative
description can be displayed to users.

| element             | type info                 | name                    | description                                                                                |
|----------------------|---------------------------|-------------------------|---------------------------------------------------------------------------------------------|
| eo:platform            | string                      | Unique name of platform | Specific name of the platform (e.g., landsat-8, sentinel-2A, larrysdrone) |
| eo:instrument        | string                      | Instrument used     | Name of instrument or sensor (e.g., MODIS, ASTER, OLI, Canon F-1) |
| eo:bands  | dictionary    | Band Info | Band specific metadata (see below)

**eo:platform** is the name of the specific platform the instrument is attached to. For satellites this would be the name of the satellite (e.g., landsat-8, sentinel-2A), whereas for drones this would be a unique name for the drone.

**eo:instrument** The instrument is the name of the sensor used, although for Items which contain data from multiple sensors this could also name multiple sensors. For example, data from the Landsat-8 platform is collected with the OLI sensor as well as the TIRS sensor, but the data is distributed together and commonly referred to as OLI_TIRS.

**eo:bands** This is a dictionary of band information where each key in the dictionary is an identifier for the band (e.g., "B01", "B02", "B1", "B5", "QA"). See below for more information on band metadata.

### eo:bands in Collection
The bands field of a `Collection` is a dictionary where the index identifies a specific band. This is often a band number (e.g., 1, B1, B01), but can be a string (like 'udm' for an unusable data mask band, and can be any unique identifier. It is used in the `eo:bands` property of an asset in an `Item

| element             | type info                 | name                    | description                                                                                |
|----------------------|---------------------------|-------------------------|---------------------------------------------------------------------------------------------|
| common_name | string (optional) | Common name | The name commonly used to refer to this specific band (see below)
| gsd | float (optional) | Ground sample distance | The average distance between pixel centers as measured in meters on the ground. Defaults to eo:gsd if not provided
| accuracy | float (optional) | Geolocation Accuracy | The expected accuracy of the scene registration, in meters
| center_wavelength | float (optional) | Center wavelength | The center wavelength of the band, in microns
| full_width_half_max | float (optional) | Full width at half maximum | The width of the band, as measured at half the maximum transmission, in microns

### eo:bands in Collection Field Descriptions

**common_name** is a name commonly used to refer to the band to make it easier to search for bands across instruments. See below for a list of accepted common names.

**gsd** is the nominal Ground Sample Distance for this band, as measured in meters on the ground. Since GSD can vary across a scene depending on projection, this should be the average GSD in the center of the image.

**accuracy** is the expected error between the measured location and the true location of a pixel, in meters on the ground.

**center_wavelength** is the center wavelength of the band, measured in microns.

**full_width_half_max** (FWHM) is a common way to describe the size of a spectral band. It is the width, in microns, of the bandpass measured at a half of the maximum transmission. Thus, if the maximum transmission of the bandpass was 80%, the FWHM is measured as the width of the bandpass at 40% transmission.

### Common Band Names
The band's common_name is the name that is commonly used to refer to that band's spectral properties. The table below shows the common name based on the average band range for the band numbers of several popular instruments.

| Common Name     | Band Range (μm) | Landsat 5 | Landsat 7 | Landsat 8 | Sentinel 2 | MODIS |
|----------------------|---------------------------|-------------------------|---------------------------------------------------------------------------------------------|------------------------------------|------------------------------------|------------------------------------|
| coastal |  0.40 - 0.45 |      |            |     1    |     1    |
|blue    |  0.45 - 0.5 |  1    |      1     |     2    |     2    |       3
|green   |  0.5 - 0.6  |  2    |      2     |     3    |     3     |      4
|red     |  0.6 - 0.7  |  3    |      3     |     4    |     4      |     1
|pan     |  0.5 - 0.7  |       |      8    |     8     |            |
|nir     |  0.77 - 1.00 | 4    |      4     |     5     |    8       |    2
|cirrus  |  1.35 - 1.40 |       |           |     9     |    10      |    26
|swir16    | 1.55 - 1.75 | 5     |     5     |     6    |     11     |     6
|swir22     |2.1 - 2.3  |  7     |     7     |     7     |    12     |     7
|lwir11    | 10.5 - 11.5 |       |           |     10     |          |      31
|lwir12    | 11.5 - 12.5 |        |          |     11     |          |      32

### Sample data

See the [examples/](examples/) folder for a full landsat definition.

repository: mojodna/stac-spec

repo_name: mojodna/stac-spec


text:
# Cryptopia

# ANNOUNCEMENT

See https://github.com/brunoarueira/cryptopia/issues/1#issuecomment-496508157

This is a crytopia's api wrapper gem. This gem implements all the public api
(see https://www.cryptopia.co.nz/Forum/Thread/255) and part of the private api
(see #5).

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cryptopia'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install cryptopia

## Usage

Must of the api endpoints follow a camel case name and for the endpoints which
have prefixed with ```Get```, was removed e.g GetMarkets => markets

## Examples

### Public API

    #!/usr/bin/env ruby

    require 'pp'
    require 'bundler/setup'
    require 'cryptopia'

    api = Cryptopia::Api::Base.new

    # List currency markets
    result = api.currencies
    result['Data'].each {|currency| pp currency}

    # ...
    # {"Id"=>501,
    #  "Name"=>"Byteball Bytes",
    #  "Symbol"=>"GBYTE",
    #  "Algorithm"=>"Scrypt",
    #  "WithdrawFee"=>2.0e-05,
    #  "MinWithdraw"=>4.0e-05,
    #  "MaxWithdraw"=>20000000.0,
    #  "MinBaseTrade"=>2.0e-05,
    #  "IsTipEnabled"=>false,
    #  "MinTip"=>0.0,
    #  "DepositConfirmations"=>1,
    #  "Status"=>"OK",
    #  "StatusMessage"=>nil,
    #  "ListingStatus"=>"Active"},
    # ...

    # Find a specific market
    pp api.market('ETH_BTC')

    # => {"Success"=>true,
    #     "Message"=>nil,
    #     "Data"=>
    #      {"TradePairId"=>5203,
    #       "Label"=>"ETH/BTC",
    #       "AskPrice"=>0.05662816,
    #       "BidPrice"=>0.05657025,
    #       "Low"=>0.05487982,
    #       "High"=>0.05877784,
    #       "Volume"=>868.02571841,
    #       "LastPrice"=>0.05662816,
    #       "BuyVolume"=>5465012.72839449,
    #       "SellVolume"=>672.33031819,
    #       "Change"=>-0.95,
    #       "Open"=>0.05717244,
    #       "Close"=>0.05662816,
    #       "BaseVolume"=>49.31616924,
    #       "BuyBaseVolume"=>10.12366787,
    #       "SellBaseVolume"=>19039274.25315152},
    #

### Private API

    #!/usr/bin/env ruby

    require 'pp'
    require 'bundler/setup'
    require 'cryptopia'

    api = Cryptopia::Api::Base.new(
      ENV.fetch('CRYPTOPIA_API_KEY'),
      ENV.fetch('CRYPTOPIA_API_SECRET')
    )

    # List your balance for all currencies
    pp api.balance

    # => {"Success"=>true,
    #     "Error"=>nil,
    #     "Data"=>
    #      [{"CurrencyId"=>762,
    #        "Symbol"=>"$PAC",
    #        "Total"=>0.0,
    #        "Available"=>0.0,
    #        "Unconfirmed"=>0.0,
    #        ...

    # List your balance for a single currency
    pp api.balance('Currency' => 'ETH')

    # => {"Success"=>true,
    #     "Error"=>nil,
    #     "Data"=>
    #      [{"CurrencyId"=>530,
    #        "Symbol"=>"ETH",
    #        "Total"=>0.0,
    #        "Available"=>0.0,
    #        "Unconfirmed"=>0.0,
    #        "HeldForTrades"=>0.0,
    #        "PendingWithdraw"=>0.0,
    #        "Address"=>nil,
    #        "Status"=>"OK",
    #        "StatusMessage"=>nil,
    #        "BaseAddress"=>nil}]}

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/brunoarueira/cryptopia. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Cryptopia project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/brunoarueira/cryptopia/blob/master/CODE_OF_CONDUCT.md).

repository: brunoarueira/cryptopia

gha_language: Ruby

repo_name: brunoarueira/cryptopia


text:
# DeepCollege

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/deepcollege/deeplearning/master)
[![Discord](https://img.shields.io/discord/102860784329052160.svg)](https://discord.gg/MAMPnmm)
----

### Introduction

This project aims to create a collection of Jupyter notebooks discussing important topics in Deep Learning.

### The tour sequence

- Linear Classifier
- Linear Regression
- Support Vector Machine
- Gradient Descent (No framework)
- Forward props & Back props
- Multilayer Perceptron
- Neural Net (No framework, only numpy)
   - vectors & tensors
   - Different neural net layers (dense, dropout, max-pooling layers)
- Data preprocessing (house price dataset, catvsdog, IMDB)
- K Mean Clustering
- CNN (Pytorch, TF, Keras) -> classify whales photos
- Callbacks (early stopping and etc)
- TF Dashboard
- Training model in the cloud
- Sentiment Analysis (binary classification)
- Sentiment analysis (multi-classification)
- Word2vec
- Hyperparamter Tuning
- Transfer Learning
- Generate song lyrics and stories
- Hyperparameter tuning
- Feature engineering
- Linear regression Kaggle competition using the above knowledge
- Generative Models
- GAN basic
- StarGAN
- CycleGAN
- Reinforcement learning

### Pre-requesties

- Basic Python Knowledge
- Some Machine Learning
- Basic idea about Deep Learning

### Installation

1. Anaconda

Anaconda is a package management platform Data Scientists that lets you easily manage and install dependencies in
cross-platform manner. It also ships with *Jupyter Notebook*, which plays a critical role in order to contribute to this
project.

For more detail about why you should use Anaconda? https://www.quora.com/Why-should-I-use-anaconda-instead-of-traditional-Python-distributions-for-data-science

Installation per platform:
- Windows: [Install Python on Windows (Anaconda)](https://medium.com/@GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444)
- Mac: [Install Python on Mac (Anaconda)](https://medium.com/@GalarnykMichael/install-python-on-mac-anaconda-ccd9f2014072)

2. Docker

Details will be added shortly

### How do you contribute?

1. Join the Discord channel [https://discord.gg/MAMPnmm](https://discord.gg/x6S6ce)
2. Goto _#request-to-join_ channel and post your Github Account name!
3. Once you are granted with access to the project, please create a git branch with your name
4. Complete each topic and challenge in order of number sequence
   - for example: 000-Linear-Classification -> 001-Linear-Regression
5. Reference existing code submissions from contributors or Wiki pages
6. I will post Jupyter Notebooks with sample code or challenges to complete

repository: PaoloBenigni/deeplearning

repo_name: PaoloBenigni/deeplearning


text:
Intel(R) AMT LMS
================
Intel Local Manageability Service allows applications
to access the Intel Active Management Technology (AMT) firmware via
the Intel Management Engine Interface (MEI).

## Build prerequisites

### Windows

#### ACE
1. Download ACE library from [ACE Download page](http://download.dre.vanderbilt.edu/).
2. Configure ACE_ROOT environmental variable with download location.
3. Configure ACE_LIB environmental variables with %ACE_ROOT%\lib.
4. Copy ace-config-win.h to ${ACE_ROOT}/ace/config.h - note that Windows LMS requires ACE compiled with WCHAR support.
5. Build ACE library.

#### libxml
1. Download libxml from [GNOME Download page](https://gitlab.gnome.org/GNOME/libxml2/-/archive/master/libxml2-master.zip') and build it or use prebuilt binary.
2. Configure LIBXML2_LIBRARY environmental variable with compiled library full path.
3. Configure LIBXML2_INCLUDE_DIR environmental variable with full path to libxml2 include directory.

### Linux

#### ACE
 * You can use the ACE package provided by your distribution (libace-dev package in Debian).
 * Alternatively:
   1. Download ACE library from [ACE Download page](http://download.dre.vanderbilt.edu/).
   2. Configure ACE_ROOT environmental variable with download location.
   3. Configure ACE_LIB environmental variables with ${ACE_ROOT}/lib.
   4. Build ACE with default Linux configuration [Building and Installing ACE on UNIX](http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix).

### Cross-platform

#### MeTee library
CMake script downloads the MeTee library sources from [GitHub](https://github.com/intel/metee)
if the library is not found in the system paths (git installation and correct proxy setup are required).
Alternatively, in order to use pre-compiled MeTee one can set the following environment variables:
 * METEE_LIB_PATH to pre-compiled library path
 * METEE_HEADER_PATH to headers path

#### OpenWsman library
The in-tree copy of OpenWsman library is located at CIM_Framework/openwsman/ directory.
The sources are from 2.6.9 version from [GitHub](https://github.com/Openwsman/openwsman) with local modifications:
* Static analysis fixes
* Passwords are stored encrypted on Windows
* CMake build enabled on Windows

#### GoogleTest (only for builds with unit-tests enabled)

For builds that includes unit-tests CMake script downloads googletest from [GitHub](https://github.com/google/googletest).
To skip automatic download one can download it manually to Common/googletest directory.

## Build dependencies

### Windows
* VisualStudio 2017 with CMake support.

### Linux
#### Tools
* cmake
* C++ compiler
* python3

#### Libraries

* gio-2.0 (libglib2.0-dev package in Debian)
* libcurl (libcurl4-openssl-dev package in Debian)
* libxerces-c (libxerces-c-dev package in Debian)
* libnl-3 (libnl-3-dev package in Debian)
* libnl-route-3 (libnl-route-3-dev package in Debian)
* libxml2 (libxml2-dev package in Debian)

##### Optional dependencies for building DBus interface documentation:
* xsltproc
* docbook-xsl

#### NetworkManager or Connman support

LMS utilizes network service for querying the host network parameters, it can work with NetworkManager, Connman, or directly with netlink.
To select network service set CMake flags:
* NETWORK_NM=ON NETWORK_CM=OFF for Network Manager (this is a default one),
* NETWORK_NM=OFF NETWORK_CM=ON for Connman,
* NETWORK_NM=OFF NETWORK_CM=OFF to use netlink directly (with reduced functionality).
You can not set both flags to ON.

## Build

### Windows

Note: The DLL signature check tests Intel(R) signatures, so external build should disable DLL signature check.

1. Create `build` directory
2. Run `cmake -G "Visual Studio 15 2017" -A <Build_arch> -DIGNORE_DLL_SIGNATURES=YES <srcdir>` from the `build` directory (best to set build_arch to Win32)
3. Run `cmake --build . --config Release --target package -j <nproc>` from the `build` directory to build an archive with all executables and libraries (e.g. lms-1.0.0-win32.zip)

### Linux

#### Debian-base distributions

1. Create `build` directory
2. Run `cmake -DCMAKE_INSTALL_PREFIX=/usr <srcdir>` from the `build` directory
3. Run `make -j$(nproc) package` from the `build` directory to build a Debian package (e.g. lms-1.0.0-Linux.deb)

#### Other distributions

1. Create `build` directory
2. Run `cmake <srcdir>` from the `build` directory
3. Run `make -j$(nproc)` from the `build` directory to build project

## Install

### Windows

1. Unpack bin directory from build-generated archive.
2. Run `lms-installer.bat install` from unpacked archive.

### Linux

#### Debian-base distributions

1. `sudo dpkg -i <generated .deb package>`

#### Other distributions

1. `make install` from the `build` directory

## Debug

### Linux

LMS prints debug logs to syslog with prefix "lms_svc". If syslog filter is installed, messages are routed to /var/log/lms.log

Messages with level WARNING and up are logged by default. Use UNS/linux_scripts/lms_enable_logging_severity.sh script to set desired log level.

LMS service should be restarted to pick up a new log level.

### Windows

LMS prints debug logs to the file, located at C:\Windows\SysWOW64\Gms.log. The file is trimmed at service start.

Messages with level DEBUG and up are logged by default. Use UNS/windows_scripts/lms_enable_logging_severity.bat script to set desired log level.

LMS service should be restarted to pick up a new log level.


text:
# Executive-Dashboard

## Prerequisites

-pip

## Installation

This project requires Python 3.x.

Download or clone the repository, then enter the following commands in command line:

```shell
pip install pandas
pip install matplotlib
pip install -r requirements.txt
```

## Usage

In order to run this program, enter the following:

```shell
python exec_dash.py
```

Then, follow the instructions.

## Component Testing

If you wish to run a test, enter the following:

```shell
pytest
```

gha_language: Python


text:
parallax-bay

A GatsbyJS static site with a parallax effect on hero section, created with GSAP and Emotion.js. Warning: Temporarily not working correctly on mobile.

Preview available here: parallaxbay.gatsbyjs.io.

## 🔬 Technologies used

1.  **GatsbyJS**

    "A React-based open-source framework for creating websites and apps."

    [`https://www.gatsbyjs.com/`](https://www.gatsbyjs.com/)

1.  **gsap**

    "Professional-grade JavaScript animation for the modern web."

    [`https://greensock.com/gsap/`](https://greensock.com/gsap/)

1.  **Emotion**

    "A library designed for writing css styles with JavaScript, with powerful and predictable style composition."

    [`https://emotion.sh/docs/introduction`](https://emotion.sh/docs/introduction)

## 🖥 Installation

Clone the parallax-bay repository.

```bash
$ git clone https://github.com/se7t/parallax-bay.git
```

Use the package manager [yarn](https://yarnpkg.com/) to install parallax-bay.

```bash
$ yarn install
```

## 🧰 Usage

To start the development server, use the package manager [yarn](https://yarnpkg.com/)

```bash
$ yarn run develop
```
 or [Gatsby CLI](https://www.gatsbyjs.com/docs/reference/gatsby-cli/)

```bash
$ gatsby develop
```

## 📄 License

[MIT](https://github.com/se7t/parallax-bay/blob/master/LICENSE.md)


text:
# 9: Good MERNing
Up until now, our data layer has been a simple JSON file. For a real application, this will not be sufficient. We need a robust database solution. Traditionally, we would use _relational_ databases, controlled using a special language called **SQL**. Relational databases are still alive and well (The Moodle is based on one), but they are sometimes not the best tool for the job. Enter **NoSQL**, or Document-based Databases.

## ~~SQL~~ → NOSQL
### SQL
In a traditional database, we have **tables**. Think of them like spreadsheets of information. Maybe there's a table for Students. And each row has unique data for that student.

ID | First | Last | Year
--|--
1 | Johnny | Teststudent | 2050
2 | Jane | Teststudent | 2050
3 | Abraxas | Teststudent | 2054

You get the idea. But maybe we need another table of Classes that students can take. So like...

ID | Name | Subject | Teacher
--|--
1 | Web Apps I | Computer Science | Taggart
2 | Web Apps II | Computer Science | Taggart
3 | Intro to Patroni | Defense Against the Dark Arts | Potter

A bunch of these tables put together in a related way create a relational database. How do they relate? Well, let's say we want to enroll Abraxas in Intro to Patroni. We might have a third table called Enrollments, that looks like this:

ID | Course_ID | Student_ID
--|--
1 | 3 | 3
2 | 1 | 2
2 | 1 | 1

This table—a **join table**, to be precise—tells us that Abraxas is taking Intro to Patroni, Jane is take Web Apps II, and Johnny is taking Web Apps I. We created this database from just the related IDs of the other tables, not names or anything else. Why?

To retrieve not only enrollment data but full student info as well, we'd need to do a join operation between these two tables. An SQL query for all courses taken by Abraxas might look like:

    SELECT *
    FROM Enrollments
    INNER JOIN Courses
    ON Enrollments.Course_ID=Courses.ID
    INNER JOIN Students
    ON Enrollments.Student_ID=Students.ID;

That whole thing will return a joined table that includes matching rows/columns from Enrollments, Courses, and Students tables.

You can imagine writing these queries gets old, especially when you have to use string concatenation to produce them on the server side.

(Fun fact: such string-concatenated SQL commands were the _only_ way to get data into web applications for a long time.)

In NoSQL, we solve the problem a different way. We use document-based data structures to embed relative information.

### NoSQL
In many cases, SQL is too much solution for our problem. With data coming cheaper and cheaper, it is often easier to _embed_ related data inside a single record.

Imagining such documents as JSON is pretty easy. Consider an embedded version of `Enrollments`:

    [
      {
        id: 1,
        course: {
          name: "Web Apps I",
          teacher: {
            id: 1,
            firstName: "Michael",
            lastName: "Taggart",
          },
          student: {
            id: 1,
            firstName: "Johnny",
            lastName: "Teststudent",
            year: 2050
          }
        }
      },
      {
        id: 2,
        course: {
          name: "Web Apps I",
          teacher: {
            id: 1,
            firstName: "Michael",
            lastName: "Taggart",
          },
          student: {
            id: 2,
            firstName: "Jane",
            lastName: "Teststudent",
            year: 2050
          }
        }
      },
    ]

Now that's a pretty 1:1 reproduction of the old SQL data model. But with these embedded arrays, new possibilities open up. We could create a set of `Enrollments` that has a key for `students` and just contains an array of student records inside.

What's the downside? Well, with embedded data, when something changes, there's no automatic update for any document that uses embedded versions of the changed data. For example, if I change the year or last name of one of the students, SQL doesn't care because it just pulls the student record with an `INNER JOIN`. The ID doesn't change, so we're fine. But with embedded databases, these Enrollment records could have bad data in them if I changed the student elsewhere.

Often you'll find a hybrid approach that uses embedded data for non-volatile information and ID references for changing information. That's okay too.

So we're going to learn about a database that is easy to use with Node/Express, called [MongoDB](https://www.mongodb.com/). Mongo is a very popular NoSQL Database. I like it because it works like JavaScript and integrates well with Node. In fact, all the technologies we're discussing work so well together, they have their own group name: The MERN Stack.

Mongo, Express, React, Node: The MERN Stack.

## Primary Objective: Play with Mongo
In class, we're going to set up Mongo on your computers. Your objective is to follow the [Mongo Documentation](https://docs.mongodb.com/getting-started/shell/) to learn how to create documents from the shell and then retrieve/filter them.

## Primary Objective: Port Todos to Mongo
No React necessary; this will all be server-side. Modify our Node/Express server to use Mongo as its database instead that janky JSON file. I've already imported [Mongoose](http://mongoosejs.com/), a great Mongo driver for Node/Express. The rest is up to you.


text:
# Magento Extension - ReCaptcha

## Requirements

  * PHP >= 7.1
  * Magento 1.9.x or OpenMage LTS

## Installation

### Composer

Require this module via composer

```
composer require func0der/magento-extension-recaptcha
```

### Manually

Put the contents of the `src` folder in your Magento root folder.

## How to use

In the admin area of Magento, find the settings for frontend use in

`Customer -> Customer configuration -> CAPTCHA`

and for the admin area

`Advanced -> Admin -> CAPTCHA`

From there, select the *Captcha Type* to be *ReCaptcha*.

Afterwards put in your *Site Key* and your *Secret Key*. Optionally chose a theme.

**Please be aware, that you need to put your keys in the admin settings *and* in the customer CAPTCHA settings, to use them at both places.**

## Uninstall

### Important!

Before you uninstall this module, make sure to change the `type` of the captcha back to
'Internal' in the admin interface.
Else the internal captcha will not work anymore.

### Composer

Run:

```
composer remove func0der/magento-extension-recaptcha
```


text:
# Application Architecture Guide

## Overview

A blockchain application is more than the consensus engine and the transaction logic (eg. smart contracts, business logic) as implemented in the ABCI app. There are also (mobile, web, desktop) clients that will need to connect and make use of the app. We will assume for now that you have a well designed transactions and database model, but maybe this will be the topic of another article. This article is more interested in various ways of setting up the "plumbing" and connecting these pieces, and demonstrating some evolving best practices.

## Security

A very important aspect when constructing a blockchain is security. The consensus model can be DoSed (no consensus possible) by corrupting 1/3 of the validators and exploited (writing arbitrary blocks) by corrupting 2/3 of the validators. So, while the security is not that of the "weakest link", you should take care that the "average link" is sufficiently hardened.

One big attack surface on the validators is the communication between the ABCI app and the tendermint core. This should be highly protected. Ideally, the app and the core are running on the same machine, so no external agent can target the communication channel. You can use unix sockets (with permissions preventing access from other users), or even compile the two apps into one binary if the ABCI app is also writen in go. If you are unable to do that due to language support, then the ABCI app should bind a TCP connection to localhost (<IP_ADDRESS>), which is less efficient and secure, but still not reachable from outside. If you must run the ABCI app and tendermint core on separate machines, make sure you have a secure communication channel (ssh tunnel?)

Now assuming, you have linked together your app and the core securely, you must also make sure no one can get on the machine it is hosted on.  At this point it is basic network security. Run on a secure operating system (SELinux?). Limit who has access to the machine (user accounts, but also where the physical machine is hosted).  Turn off all services except for ssh, which should only be accessible by some well-guarded public/private key pairs (no password). And maybe even firewall off access to the ports used by the validators, so only known validators can connect.

There was also a suggestion on slack from @jhon about compiling everything together with a unikernel for more security, such as [Mirage](https://mirage.io) or [UNIK](https://github.com/emc-advanced-dev/unik).

## Connecting your client to the blockchain

### Tendermint Core RPC

The concept is that the ABCI app is completely hidden from the outside world and only communicated through a tested and secured [interface exposed by the tendermint core](/docs/specs/rpc). This interface exposes a lot of data on the block header and consensus process, which is quite useful for externally verifying the system. It also includes 3(!) methods to broadcast a transaction (propose it for the blockchain, and possibly await a response). And one method to query app-specific data from the ABCI application.

Pros:
* Server code already written
* Access to block headers to validate merkle proofs (nice for light clients)
* Basic read/write functionality is supported

Cons:
* Limited interface to app. All queries must be serialized into []byte (less expressive than JSON over HTTP) and there is no way to push data from ABCI app to the client (eg. notify me if account X receives a transaction)

### Custom ABCI server

This was proposed by @wolfposd on slack and demonstrated by [TMChat](https://github.com/wolfposd/TMChat), a sample app. The concept is to write a custom server for your app (with typical REST API/websockets/etc for easy use by a mobile app). This custom server is in the same binary as the ABCI app and data store, so can easily react to complex events there that involve understanding the data format (send a message if my balance drops below 500). All "writes" sent to this server are proxied via websocket/JSON-RPC to tendermint core. When they come back as deliver_tx over ABCI, they will be written to the data store. For "reads", we can do any queries we wish that are supported by our architecture, using any web technology that is useful. The general architecture is shown in the following diagram:

<img alt="Application Architecture" src="../assets/images/tm-app-example.png">

Pros:
* Separates application logic from blockchain logic
* Allows much richer, more flexible client-facing API
* Allows pub-sub, watching certain fields, etc.

Cons:
* Access to ABCI app can be dangerous (be VERY careful not to write unless it comes from the validator node)
* No direct access to the blockchain headers to verify tx
* You must write your own API (but maybe that's a pro...)

### Hybrid solutions

Likely the least secure but most versatile. The client can access both the tendermint node for all blockchain info, as well as a custom app server, for complex queries and pub-sub on the abci app.

Pros:
* All from both above solutions

Cons:
* Even more complexity
* Even more attack vectors (less security)

## Scalability

Read replica using non-validating nodes? They could forward transactions to the validators (fewer connections, more security), and locally allow all queries in any of the above configurations. Thus, while transaction-processing speed is limited by the speed of the abci app and the number of validators, one should be able to scale our read performance to quite an extent (until the replication process drains too many resources from the validator nodes).

## Example Code

* [TMChat](https://github.com/wolfposd/TMChat)


text:
#  Shipping Methods

Enabled Shipping Methods within the store.

##  Shipping Method Object – Properties

| Name | Type | Description |
| --- | --- | --- |
| id | int | shipping method id |
| name | string | display name for shipping method |
| method_name | string | shipping method name |

repository: hegrec/slate

repo_name: hegrec/slate