text:
# Calc
A RPN calculator for WoW

# RPN (postfix)
In short, RPN is a way of writing calculations where the function follows the set of values it works on.
Values are entered, and then the operands are given to work with the previous 1 or 2 values.
In the simple case of adding the values 1 and 2, a user would enter `1 2 +`, and the result would be the remaining value.

RPN does not depend on syntax and an order of operation.
It depends on the user to define that in the way that calculations are entered.

Implementing an RPN calculator can be done with a stack data structure.
Values are pushed on and functions pop off the required number of values and push on the result.
In the example above `1 2 +` pushes 1 and 2 onto the stack, `+` then pops off `1` and `2`, adds them together and pushes `3` back to the stack.
In the case of a function that takes a single value, like factorial(!), or `sin`, `5 !` pops off a single value, and pushes on the result.

Conversion of complicated equations is much simplier that one might expect.
In case the reader does not wish to research this on their own, I'll give a quick example.
To convert a Farhrenheit temperature to Celsius, one would use the equation: `(F - 32) / (9/5)`.
Converting the normal human body temperature of 98.6F is simply `98.6 32 - 9 5 / /`.
Working from left to right, this calculates `98.6 - 32` resulting in `66.6`, then `9 / 5` gives `1.8`.
The RPN *stack* would now look like `66.6 1.8` and with the final division, would produce the result of `37`.

Conversion from Celsius to Farhrenheit would be `C * 9/5 + 32`.
Converting 37 would give us `37 9 5 / * 32 +`, though other ways could be constucted to do the same calculation.
`9/5 * C + 32` could be written as `9 5 / 37 * 32 +`.

Feel free to search the web on how to use this amazingly simple notation.

## Commands
This uses `/calc <data>` to accept input.
If `<data>` is a value, or a known constant, or predefined variable, that value is pushed to the stack as the `x` value.
`/calc pi` would push the value of `pi` to the stack.
After each command, the values on the stack will be displayed.
`x` is the most recent, right most value, where `y` is the next value down.

### Constants
The constants currently supported are:
* `pi` - uses *Lua's* `math.pi` constant
* `e` - uses *Lua's* `math.exp(1)` to get `e`

### Operands
Operands normally act on the `x` or `y` values from the stack, and push the result back to the stack as `x`.
The operands currently supported are:
* `+` - adds `x` and `y`.
* `-` - subtracts `x` from `y`
* `*` - multiply `x` and `y`
* `/` - divide `y` by `x` (`9 5 /` yields `9 / 5`)
* `1/x` - reciprocal of `x`
* `^` - raises `y` to the power of `x`. `3 3 ^` yields `3^3`. `4 0.5 ^` yields the `sqrt(4)`
*     - `4 2 1/x ^` yields the square root of 4, and `9 3 1/x ^` yields the cube root of 9.
* `ln` - natural log of `x`. `e ln` yields 1
* `!` - factorial of `x`
* `sin` - sine of `x`
* `cos` - cosine of `x`
* `tan` - tangent of `x`
* `asin` - arcsin of `x`
* `acos` - arccos of `x`
* `atan` - arctan of `x`
* `ceil` - ceiling (round up)
* `floor` - floor (round down)
* `round` - normal round

### Commands
The current commands supported are:
* `AC` - All Clear - clear the entire stack
* `deg` - sets trig functions to use degrees
* `rad` - sets trig functions to use radians
* `swap` - swaps the last 2 values on the stack
* `pop` - pops the last value from the stack

### WowVariables
These will be replaced with the value at the time:
* `gold` - your money in units of gold.
* `silver` - your money in units of silver.
* `copper` - your money in units of copper.
* `health` | `hp` - your current max health.
* `power` - your usable power max (rage / energy / mana)
* `haste` - your haste rating
* `token` - current price, in gold, of the WoW Token

### Macros
Create a macro that can be easily and quickly called.
* `macro [add] <macroName> <macro string>`  -- creates <macroName> with <macro string>
* `macro list` -- show all the macros
* `macro del <macroName>` -- deletes macro <macroName>
* `<macroName>` -- replaces <macroName> with the macro

### Entering data
HP is notorius for using, or forcing the use of, **ENTER** to seperate values as they were entered on their calculators.
This can be simulated here with using a seperate `/calc` for each value, though that can get old and annoying in a hurry.
To streamline this a bit, the entire set of commands can be entered as a single space seperated line following `/calc`.

    /calc 3
    /calc 2
    /calc +
Would be the same as `/calc 3 2 +`.

### Usage outside of WoW
While this was intended to be an addon for WoW, I have installed this on a few machines as a command line tool.

The `calc.lua` source files creates a wrapper to allow `c.lua` to be used outside of WoW.
This removes some of the WoW specific commands, overwrites the `Print` function, and creates a running loop complete with commands to exit.

#### Install
Installation of this on a linux / Mac machine is fairly simple.
* Install LUA
* Copy `c.lua` and `calc.lua` to the `/usr/local/bin/` directory (other places can be used, edit `calc.lua` to allow discovery).
* Rename `calc.lua` to `calc` and make it executable.

You will now be able to call `calc` from the command line.
The new commands, 'exit' or 'quit', will quit the calculator.

repository: opussf/Calc

gha_language: Lua

repo_name: opussf/Calc


text:
%{
    "Id":"172",
    "Title": "gong cha still the best",
    "Url":"gongcha-wintermelon",
    "PubDate":"23-Jun-2012",
    "Tags": ["personal"],
    "Preview": "",
}%
[Source](http://markhughneri.com/blog/144/gongcha-wintermelon/
 "Permalink to the kimerran logs - Gong Cha â€“ Still the Best Milktea for Us")

# the kimerran logs - Gong Cha â€“ Still the Best Milktea for Us

published: Jun 23, 2012

Here's a post for my and Trisha's favorite Milktea in town. Just as promised, I treat her with a large Winter Melon milktea. Just went to Clinica Manila at SM Megamall to have my medical exam. Straight to MOA for a Gong Cha!

Â Trisha and I had our first taste of Gong Cha Milk Tea at Food Choices and since then (when the craving comes and when there's budget), we will go looking for the closest branch and sip on our favorite.
How about you? What's your favorite Gong Cha milktea?

![gongcha winter melon tea 2][1]

![gongcha winter melon tea 2][2]

### Share and Enjoy

* * *

* * *

[1]: http://markhughneri.com/blog/assets/loading.gif
[2]: http://www.sisigbytes.com/food/wp-content/uploads/sites/2/2012/06/gongcha-winter-melon-tea-2.jpg

license: MIT

repository: kimerran/kimerran-blog

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: kimerran/kimerran-blog


text:
## Build CLI from Source

You can build the CLI tool with

- [node.js](users-node.html)
- [Java](users-java.html)
- [Python](users-python.html)
- [Go](users-go.html)
- [Rust](users-rust.html)
- [C#](users-cs.html)

If possible you should use the node.js tool as it works on all operating systems and has syntax coloring.

repository: hjson/hjson

gha_language: HTML

gha_license_id: MIT

repo_name: hjson/hjson


text:
October CMS Webpack Theme Boilerplate
==========

This is an example theme for October CMS that includes:

- Webpack (using Laravel Mix)
- Bootstrap
- Font Awesome
- jQuery
- Autoprefixer

To use it:

- [Install October CMS](https://octobercms.com/docs/setup/installation)
- Create a new folder in October /themes folder (call it for example my-awesome-theme)
- Clone the repo in your theme folder
- Activate the theme from October backend settings

To modify it:

- Open a terminal, go to your theme folder and run `npm install` (node_modules folder will be created)
- Install more packages using `npm install --save`
- Require your installed packages in src/js/app.js
- Modify the js and scss files
- Run `npm run dev` (`npm run watch` to recompile when something changes)
- [Add new pages, partials, content files...](https://octobercms.com/docs/cms/themes)

When you are ready for production:

- Run `npm run prod`
- You don't need to upload `node_modules` and `src` folders to the production host if you don't compile your assets there

Enjoy!

branch_name: refs/heads/eski

gha_language: PHP


text:
# Security

## User Accounts
Any "Person" in ChurchCRM may be promoted to a "User."  By default, a "Person" in ChurchCRM is not allowed to log into the system until an administrator provisions them with a user account.

## Role Based Access Control
ChurchCRM contains many roles to control access to your church's sensitive data:
### Add Records

### Edit Records

### Delete Records

### Manage Properties and Classifications

### Manage Groups and Roles

### Manage Donations and Finance

### View, Add, and Edit Notes

### Edit Self

### Canvasser

### Admin

## Granular Permissions
In addition to the above roles, the following actions are controlled granularly "Per-User":

###bEmailMailto

###sMailtoDelimiter

###bCreateDirectory

###bExportCSV

###bUSAddressVerification

###bAddEvent

###bSeePrivacyData

## Developer Notes
Security is currently handled by $_SESSION variables.  If a user has been assigned a given role, the name of that role will be present as a key in the $_SESSION array.

```
if($_SESSION['bAdmin'])
{
  #This user has been assigned the Admin role
}
```

repository: bradgearon/ChurchCRM

repo_name: bradgearon/ChurchCRM


text:
Use a CSV file to create/setup QR Codes

3 Columns in the CSV file

1. The base10 version of the ID.

2. The base60 versio of the id or omitted.  You need to specify one of base10, or base60.

3. The Destination URL with templating to send this to.

4. The data to be associated with this QR

Example:

```
3,,http://www.2c-why.com/demo3?id60={{.id60}}
,400,http://www.2c-why.com/demo3?id60={{.id60}}&id10={{.id10}}&tom=jerry
```

On the first line set the QR with an id of 3 (base 10) to `http://www.2c-why.com/demo3?id60=3`.

ON the 2nd line set the QR with a base 60 id of 400 to `http://www.2c-why.com/demo3?id60=400&id10=5184&tom=jerry`.

repository: andey-robins/school

gha_language: JavaScript

repo_name: andey-robins/school


text:
# 1.6 Reflection #

**Paste a link to your [USERNAME].github.io repository.**
- http://cyberpolin.github.io/

**Explain how to create a repository on GitHub and clone the repository to your local computer to a non-technical person.**
- Ok, first of all, think about github as a library, where you want to keep your personal books, or at least copy of them, in that way you can be certain that the important information it’s safe. In that way if something happens to your books you always could go to the library (github) and make a copy of them again.

Now what if you are writing a book, but you need help from other writers, or you have to write chapter one, and others have to do chapter two or three?, so in that way anyone can work at home and go to the library and add their advance, in that way when you go to github (library) you can pull the latest changes to the book or project, and you also left the changes you has made. In the same way other writer could ask for your changes, and always have the latest copy.

What about if somebody want to add a extra chapter to your book? The he could clone it make the new chapter and pull a request from you, the main writer, then you can review that chapter and allow the new chapter or not.

I have to make a confession to you, we are not talking about a library or books, we are talking about computer file, and do this is pretty easy just go to github, and create a repository.
https://www.youtube.com/watch?v=5qmltBssKDY

Once you do that just go to terminal, and clone that repository by typing "git clone \<the repository https url\>"
Now you have your own copy Congratulations!

**Describe what open source means.**
- It's mostly a way of development, and the main characteristic is that the source code is open, that means anyone can see it, usually any Open Source project use a specific license like MIT or Apache.

**What do you think about Open Source? Does it make you nervous or protective? Does it feel like utopia?**
- Is pretty cool and a hippie idea, the nice thing about open source is to get help improving your code, or getting traction on a project, in the other hand, if you have a solution that you think is unique and don't want to share it, Open Source is not for you.

**Assess the importance of using licenses.**
- Is a way of establishing the rules if somebody want to use your code, there are several types of licenses, ones that allow a lot, like adding, editing , using, or even selling. Other kind of license prohibit a lot of stuff.

**What concepts were solidified in the challenge? Did you have any "aha" moments? What did you struggle with?**
- Using the git flow in general, and i loved the markdown part, i'm struggling with the git commands, i just need to remember them.

**Did you find any resources on your own that helped you better understand a topic? If so, please list it.**
- Doesn't help me to understand what is git, but help me with the flow we should use, though is a more complex flow what they propose is a cool implementation.
http://danielkummer.github.io/git-flow-cheatsheet/

gha_language: Ruby


text:
---
layout: post
title: "Neural Machine Translation with Supervised Attention"
date: 2016-09-14 09:31:40
categories: arXiv_CL
tags: arXiv_CL Attention NMT
author: Lemao Liu, Masao Utiyama, Andrew Finch, Eiichiro Sumita
mathjax: true
---

* content
{:toc}

##### Abstract
The attention mechanisim is appealing for neural machine translation, since it is able to dynam- ically encode a source sentence by generating a alignment between a target word and source words. Unfortunately, it has been proved to be worse than conventional alignment models in aligment accuracy. In this paper, we analyze and explain this issue from the point view of re- ordering, and propose a supervised attention which is learned with guidance from conventional alignment models. Experiments on two Chinese-to-English translation tasks show that the super- vised attention mechanism yields better alignments leading to substantial gains over the standard attention based NMT.

##### Abstract (translated by Google)

##### URL
[https://arxiv.org/abs/1609.04186](https://arxiv.org/abs/1609.04186)

##### PDF
[https://arxiv.org/pdf/1609.04186](https://arxiv.org/pdf/1609.04186)


text:
---
title: PSYC 11 Time traveling literature review lab
author: Jeremy R. Manning
date: April 25, 2022
mainfont: Palatino
geometry: margin=1in
colorlinks: true
linkcolor: green
fontsize: 12pt
header-includes:
  - '`\usepackage{emoji}`{=latex}'
---

# \emoji{stopwatch} Overview

>> "The future is not set.  There is no fate but what we make for ourselves"
>>
>> --Kyle Reese, *The Terminator*

Have you ever wished you could go back in time to get a do-over?  How'd that
work out for you?  Unfortunately this lab probably won't give you the chance for a do-over, either.
But the good news is that, using the powers of "make believe," you're going to
have your shot at righting some scientific wrongs-- almost as good as fixing your own personal greatest mistakes, right?
Let's just assume you agree and move on...

In this lab, you'll play the role of a time-traveling scientist.  In the usual
 (i.e., non--time-traveling) way of doing science, you don't get to see what the
 "answer" is in advance.  Instead, you try to do the best you can at designing
 and carrying out a good study, analyzing the data in reasonable ways, interpreting the results
 given what you know at the time, and so on.  But the true test of a scientific
 finding is something that we don't typically have immediate access to: **time**.  Specifically,
 *future* time.    It's only
 after further studies are carried out, your ideas are poked and prodded by
 other scientists, etc., that we start to get a sense of whether a finding is "real."  *But what if it didn't have to be that way?*

As a *time-traveling* scientist, this week you'll get the chance to skip ahead to years after
your original study is carried out.  You'll read papers written *after* your study that
followed up on the original, explored similar questions, or used similar approaches.
Then, unlike real-world you, the time-traveling scientist version of yourself will get
to re-frame your original study, but with the benefit of foresight.

# \emoji{stopwatch} Learning objectives

The major goal of this lab is to explore the "discussion" section of scientific papers.
The primary goal of the discussion section is to situate
the current study's findings within the context of the broader literature.  Discussion
sections also often suggest potential areas for future exploration or follow-up
work.  In this lab, you'll carry out a literature search, read several scientific
articles organized around a chosen theme, and draft a simulated discussion section.
In particular, you will:

  - Learn about and practice writing a discussion section
  - Practice carrying out an effective literature search
  - Practice reading, summarizing, discussing, and interpreting scientific articles
  - Practice synthesizing key findings across multiple papers and studies
  - Practice communicating clearly and directly

# \emoji{stopwatch} Procedure

Each group will begin the lab exercise by finding, reading, and summarizing
a 10--30 year old scientific paper.  This paper will serve as a sort of "template," in that
you'll pretend (for the purposes of this exercise) that your group was in
the process of writing up the study described in that paper.  In other words,
even though that template study was actually carried out 10--30 years ago,
you'll pretend it was just completed today.  Like the magical sci-fi device
featured in your favorite time travel story, your imagination can make you a
*mental* time traveler, sending your consciousness back through the turbulent oceans of time-- but without
all of that pesky temporal paradox stuff, like accidentally destroying
the universe by meeting yourself in the past.

Next, you'll find several more modern papers (written within roughly the last 10 years)
that *cite* the template paper.  These will help to illustrate how the template paper
has "aged" with respect to the broader literature.  You'll also find an additional
more modern paper (again, written within roughly the last 10 years) that does *not*
cite the template paper, but focuses on a similar question, paradigm, or theme.
This last paper will help to provide additional context regarding "alternative"
approaches and interpretations for the template study.

After having found, read, and interpreted these paper's you'll draft a new
discussion section for the template paper, as though you were writing up the
paper for publication.  However, whereas the template paper could only cite work published *prior*
to when it was written, your revised version will have the benefit of knowing
whether the original paper stood the test of time *after* its publication.  This will
provide an opportunity to potentially re-interpret the template study's key findings,
discuss new pitfalls and limitations not raised in the original paper, and re-think
future directions, all with the benefit of knowing the "future" relative to the original paper (i.e., hindsight relative to today, but foresight relative to the template paper's original time of writing-- isn't time travel fun?).

## \emoji{luggage} Part 1: Find an (old) paper to use as a "template"

The first thing you'll need (as a group) is a paper.  To make this lab exercise work, you should find something
with the following characteristics:

  - The paper should be published sometime in the 1990--2010 range
  - The paper should be published in a peer-reviewed journal
  - The paper should have at least 25 citations
  - The paper should not be retracted (i.e., if you go to the publisher's website and click on the paper, it should not have a retraction notice)
  - The paper should be about an interesting topic that you won't get bored reading about, writing about, and/or discussing
  - The paper should be about something psychology-related and/or neuroscience-related
  - The paper should be something you haven't read before (i.e., nobody in your group should have read the paper)
  - The paper should be less than 20 pages long (much shorter is fine)
  - It should be *empirical* (i.e., describing an experiment and reporting the results-- as opposed to a review paper, opinion paper, theory paper, etc.)
  - You should be able to understand the paper (e.g., don't pick something inscrutable or super complicated)

The easiest way to search for papers is using [Google Scholar](https://scholar.google.com/).
If you use the search box while on Dartmouth's campus, the PDFs for the articles that come up
should be free for you to read (paid for by the generosity of the Dartmouth library system!).
If you're off campus, you'll need to use a [Virtual Private Network](https://services.dartmouth.edu/TDClient/1806/Portal/KB/ArticleDet?ID=66806) to replicate that functionality.  Google Scholar also
lists citation and reference information in a convenient way within its search results, making it
ideal for this lab exercise.

[Semantic Scholar](https://www.semanticscholar.org/) is another useful tool for carrying out
literature searches.  It is similar to Google Scholar in many respects, although
the way keywords are applied to find articles works a bit differently.  You'll likely find
that you prefer either Google Scholar or Semantic Scholar, depending on which better
matches the way you search and think.

A third interesting way to find papers is through the [Elicit](https://elicit.org/) AI Research Assistant tool.
This is a somewhat new option (and you'll need to sign up for a free account in order to use it).  The idea is that it's based around "questions" rather than keywords.  It's worth trying out!

Ultimately, each group should find a single template paper.  Share a PDF on Slack
in the [#literature-review-lab](https://psyc11.slack.com/archives/C03CSKEU684)
channel.  Think of this paper's time of writing as the moment your group is
time-traveling back to.

## \emoji{luggage} Part 2: Find papers that cite your template paper

Your next job is to find 5 papers that *cite* your (original) template paper.  If you
find your template paper on Google Scholar, you can easily find other papers
that cite it by clicking the "Cited by" link.  (Feel free to use other
approaches to finding citing papers too.)  Try to find a set of 5 papers
with the following properties:

  - All of the papers should explore similar or related questions to the original
  - All of the papers should be written in 2011 or later
  - All of the papers should be published in peer-reviewed journals
  - None of the papers should be retracted
  - None of the papers should have overlapping co-authors with the original
  - At least one paper should be cited *more* than the original
  - Try to find at least 1 paper that attempted to replicate the original study's experiment
  - Try to find at least 1 paper that carried out a follow-up study to the original
  - Try to find at least 1 "review" paper (i.e., that synthesizes across several related studies)

Share PDFs of your group's set of 5 papers on Slack in the
[#literature-review-lab](https://psyc11.slack.com/archives/C03CSKEU684)
channel.

## \emoji{luggage} Part 3: Find a related paper that does *not* cite your template paper

The seventh paper in your collection should be about a similar topic as your
template paper, but should *not* cite the original template paper.  (It's OK
if this seventh paper cites one or more of the 5 citing papers you found in Part 2
of the lab.)  You can use any of the above literature search tools (Google Scholar,
  Semantic Scholar, Elicit) or others to track down this last paper.  Your paper should
  have the following properties:

  - It should haven been written in 2011 or later
  - None of the co-authors should overlap with the original paper
  - The paper should either attempt to answer a similar question to the original paper, or should
use a similar experimental paradigm
  - The paper should be published in a peer-reviewed journal
  - The paper should not be retracted

Share a PDF of this last paper in the
[#literature-review-lab](https://psyc11.slack.com/archives/C03CSKEU684)
channel on Slack.

## \emoji{luggage} Part 4: Summarize everything

However your group deems appropriate, create a brief summary of each of the seven papers
you found (original, 5 citing papers, 1 non-citing paper).  Everyone should read the
original paper, but it's not critical for everyone to read every other paper in detail.  Share
your summaries with your other group members so that everyone can have some insights into what
each paper is about.  (The summaries don't need to be shared outside of your group; they're just
for your own internal use.)  Some suggestions:

  - Describe what the main question of each paper was
  - Describe how the main question was explored
  - Describe what the "answer" to the paper's main question was
  - Describe or discuss any relevant overlap with the template paper-- e.g., similarities and differences
  in the overall approach, findings, interpretation, etc.

## \emoji{luggage} Part 5: Discuss and brainstorm

As a group, think about the set of papers you've added to your collection.
Using the post-2011 papers as a guide, consider the questions like the following:

  - Were there follow-up studies to the original?
  - Were there unanswered questions in the original study that have now been explored further?
  - Have the original conclusions or interpretations held up?  Have they been criticized or interpreted differently in later studies?
  - Were the approaches taken across the different papers similar?  If not, what do you see as
  the main strengths and weaknesses of each approach?
  - Did all of the papers reach similar conclusions?  Or if different conclusions were reached, are the conclusions logically compatible?  Which do you "trust" most, and why?
  - What do you think it all *means*?  For example, what do you think the *true* answer to the question posted in the original "template" paper is?
  - Also come up with some still-unanswered questions and discuss how they could be studied in future (e.g., post-today) work

# \emoji{stopwatch} Writing your lab report

Your lab report (recommended length: roughly 2--5 pages) should take the form of a formal discussion section in a scientific paper.
You should write as though *you* had carried out the original study (the one in
described in your template paper) today, in 2022.  Use the papers you found
in parts 2 and 3 to situate "your" study within the broader literature.
Describe strengths and weaknesses of your approach relative to other potential approaches.
Propose an interpretation of your findings (this can match the original paper's interpretations, but it doesn't *need* to match the original).  Also discuss potential alternative interpretations, and their relative merits and shortcomings.  Your discussion section should take the following form:

  - First, summarize the question, approach, and key finding of the original study
  - Next discuss other related work, and describe how it compares or contrasts with the original study's approach, findings, interpretations, etc.
  - Draw your conclusions about what you think it all *means* (e.g., what do you think the "true" answer to the key question is?)
  - Describe some still unanswered questions and propose how they might be studied in future work.
  - Make sure to include a bibliography!

# \emoji{stopwatch} Closing discussion points

This lab marks the end of our explorations of formal scientific papers:

  - The *Introduction* section motivates the paper, captures the reader's interest, defines the key question(s), and summarizes the overarching approach and key findings
  - The *Methods* section describes the approach in detail, reminding the reader of the study's motivation and/or key findings as needed
  - The *Results* section describes what the study found, reminding the reader of the study's motivations and methods as needed
  - The *Discussion* section re-summarizes the approach and key findings, with a focus on situating the study within the context of the broader literature

As we step back, we can see that a recurring theme across all of these sections is that writing them effectively
essentially requires re-stating the same ideas, but with a different focus each time.
In each section you need to summarize "what you did" and "what you found."  The trick is to
use the repetition to your advantage to improve clarity and define emphasis.

The discussion section is ultimately what shapes the impression people will have
in their minds when they finish reading your paper.  Your study can have fantastic motivation,
clear methods, and strong results.  Those are all necessary elements of a strong "core"
for your paper.  But the discussion section is when you make your case for why it *matters*.
In other words, by the time you get to the point of writing up a study, you've probably invested
a lot of time and resources.  What did you learn?  Why should people care?    Consider your reader's perspective, too.  What
do *they* care about?  They've invested time in *reading* your paper; now show them it was worth
that effort!

As with most things in science, there is no one "right" way to write a discussion section.
To help guide you, think about what is effective at convincing *you*.  If you put yourself
in your reader's place, what's the most important takeaway message?  What's the most
effective framing?  What do your readers need to know in order to care about what you did,
and how can you maximize that impact?  What others take away from your paper will
determine how your science stands up to the test of time.

repository: ContextLab/experimental-psychology

branch_name: refs/heads/main

repo_name: ContextLab/experimental-psychology


text:
---
id: 6iWgBj1cyWKECI8MoOUGEO
title: 'AWS re:Invent re:Actions — Controlling risk is important, but confusing'
slug: aws-re-invent-re-actions-controlling-risk-is-important-but-confusing
pub_date: '2018-12-03'
tags:
  - aws
  - cloud-computing
  - events
  - innovation
categories_blog: healthcare
author: 3azwOe9v3O4YSuyU0gsuo6
summary: >-
  Last week the Datica team visited Las Vegas for the annual AWS re:Invent
  conference. Here are a few observations from Datica's point of view.
lead: >-
  Last week the Datica team visited Las Vegas for the annual AWS re:Invent
  conference. As always, the event did not disappoint. AWS knows how to put on a
  show, getting grander every year. Here are a few observations from Datica's
  point of view.
featured_image: /assets/general/blog/AWS-Re-Invent-2018-crowd.jpg
share_image: /assets/general/blog/blog-aws-reinvent-2018-1-share.jpg
cta_ref: 6fm8uDgwG4eaQ2mQUUuSMQ
related_entries:
  - 7vYtFWVvoWOqGoaugOEQco
  - 68S9DjjmjCgQwkE0GooK64
  - 1qpvQVpmaYgMG0gKCwaOEY
  - 5xoRY6Vp1C222IgKW4Emo8
  - 4ItmAo1t5SIG8MsiEa2K2K
discovery_topic: aws-hipaa
---
## The MBAs got a hold of the cloud

In last year’s review I made a comment that has since been a story I tell when discussing the state of the cloud. It went something like this:

*In 2014, 2015, and [2016](https://datica.com/blog/aws-reinvent-recap-2/), the cloud was still portrayed as a toy for developers. Most vendors on the expo floor focused on developer empowerment, and most tools were about building things. The sky was the limit.*

*Then in [2017](https://datica.com/blog/re-invent-day-2-looking-toward-the-future/), it's like the MBAs got a hold of the cloud. It was stark how many new vendors flooded the expo, peddling tools to help control costs and security concerns.*

If we thought 2017 was about shifting away from being a toy, 2018 cemented that the future of the cloud is about controlling the cloud.

The overwhelming majority of vendors present were focused on tools to manage security, compliance, cost, and governance. In short, _risk_.

This is actually a good thing, much to the likely disappointment of engineers: Now that the cloud is considered a strategic part of the "business" it must be managed as if it's part of the business. Consequently, more cloud adoption is definitely on the horizon.

![reinvent 18 exterior](/assets/general/blog/reinvent_18_exterior_.jpg)

## It is hard for buyers to know what to buy

While the overwhelming majority of tools are now focused on controlling the cloud, which is a good thing, the negative side is that the space around how to control your cloud is very confusing.

Many tools tout "guardrails" and "policy-driven development", among many other terms of art. In the end, no matter how you slice it, there are too many companies saying too many different things while doing too similar of jobs. The recipe is buyer confusion, which isn't going to help with cloud adoption. An anecdote to underscore the point: across from the Datica booth was ZoHo — you know, the old-school CRM company — featuring a security monitoring service for AWS services; similarly, behind the Datica booth was CapitalOne — you know, the credit card company — who offered an undifferentiated security automation platform.

By our count, there were over 35 different companies with a booth (plus consultancies like Accenture,  et al) featuring some sort of security or governance tool. Dizzying.

This point is a good reminder to explain why Datica is different. We are very conscious of the fact that the security and compliance landscape has evolved considerably the last few years, which is why we are laser-focused on solving the specific problem Datica is best positioned to solve: managing healthcare-specific compliance on AWS, Azure, and GCP.

We uniquely solve this problem because we are focused on the business problem of compliance, and *not* the technical or functional a single developer faces. The best way to explain is through the concept of the [maturity model](https://datica.com/academy/how-to-optimize-your-compliance-posture-with-a-maturity-model/).

### Visualizing the business problems of compliance

Fig. 1: Capability Maturity Model. The first stage, Privacy, is the most basic, with last stage achieving more complete compliance.

What is a Control?

Example: "Users shall only be provided with access to
    internal and external network services that
    they have been specifically authorized to use.
    Authentication and authorization mechanisms
    shall be applied for users and equipment."

Each piece of technology needs to go through a similar process.

This is an example Capability Maturity Model that some frameworks use to understand the maturity of controls.

Over the last five years, Datica has been the expert at understanding the exact policies and procedures required to turn HIPAA-eligible services on the public cloud into architectures that can pass a [HITRUST CSF assessment](https://datica.com/blog/5-steps-to-hitrust-csf-certification/). The focus on policies and procedures (levels 1 and 2) then allows our customers to implement (level 3) the appropriate security controls with context. When complete, customers can then be assured that measuring and managing (levels 4 and 5) lead to the compliance verification required to pass audits. _That's what matters._

In contrast, the plethora of security tools flooding the space are just that—security tools, a.k.a level 3 implementation tools. They are functional pieces of software that allow developers to do security for the sake of security. Which, to be clear, is not a bad thing—all security is good in practice. However, within a healthcare context, organizations must be able to document and attest to security implementations that map all the way back to regulatory rules.  Privacy → Security → Compliance. The challenge of unaware security still exists with all other security tools, but not with Datica.

## _AWS Comprehend_ is interesting

[AWS launched a new service called Comprehend.](https://www.wsj.com/articles/amazon-starts-selling-software-to-mine-patient-health-records-1543352136) It's a natural language processor (NLP) tool for unstructured data sitting within EHRs. It was developed by a talented team led by Arun Ravi.

Compliance is an area that still needs to be managed. An important disclaimer about compliance by the product:

_"[AWS Comprehend](https://aws.amazon.com/comprehend/) does not meet the requirements for de-identification of protected health information under HIPAA. You are responsible for reviewing any output provided by Amazon Comprehend Medical to ensure it meets your needs."_

We are interested to see the use cases develop over the next few years. If you are working on a project and are interested in this service, but are unsure about the compliance requirements, feel free to email us.

It should be said, too, that getting the data is a critical requirement to use Comprehend. Datica's EHR integration service CMI is still the best service available. When combined with one of our compliance management tools, Comprehend is positioned to make an influential impact on clinical care. We're excited to see what our customers will do with it.

## Outposts is the actual interesting part about healthcare and the cloud in 2019

Lastly, the announcement about the partnership with VMware to install AWS services and APIs on-prem via the new AWS service called Outposts was very interesting in a healthcare context.

This announcement is an interesting concession by AWS. With it, they are acknowledging that not only will it take time (decades) for certain cloud workloads to migrate from old data centers to the public cloud, but that some workloads _will never_ migrate.

Azure has been operating under this point of view for a while with [Azure Stack](https://azure.microsoft.com/en-us/overview/azure-stack/), and this appears to be AWS's answer. Azure has had  success in this area; time will tell if AWS can match it.

Why this matters in healthcare should be pretty obvious: only a tiny fraction of healthcare workloads have actually made it to the public cloud so far. The vast majority still sit with legacy systems, buried in a basement or at a co-location facility.

* __Compliance is _still_ a confusing concern__ for many healthcare organizations, with a majority still preferring to control even the data center in order to pass audits.
* __Update cycles are the longest of any industry.__ Many systems are at least 10 years old! It takes years for patches to happen.
* __"If it's not broke, don't fix it."__ What does that phrase mean within a healthcare context? Well, "break" doesn't mean using an outdated database... "break" means, _"Did people die?"_ Long story short: changing software that has proven to not kill people, to unknown software that could break and kill people, is a very different calculus than non-healthcare developers realize.
* __EHRs will never be on the public cloud,__ generally speaking. Athena is making the biggest push and could do it, with Cerner an interesting observer. But, over the next decade, EHRs will never be on the cloud. Therefore with the central patient data repository sticking on-prem, why start to split your data to the public cloud?

These are among many other developments. The bottom line is that AWS Outposts, along with Azure Stack, are the true trojan horses to try to bridge healthcare data from old data centers to the public cloud.


text:
# Somfy motorized window coverings (ZWave)

Translator for the Somfy motorized window coverings : https://www.somfysystems.com/products/controls-integration/z-wave

## Setup Your Hardware

This translator depends on the openzwave-shared node package.

For non-Windows platforms, follow the instructions for your platform from this site: [https://github.com/OpenZWave/node-openzwave-shared]

For Windows do the following:
  1. npm install openzwave-shared  (this will fail)
  1. install open-zwave (https://github.com/OpenZWave/open-zwave)
  2. modify bynding.gyp to point to the openzwave source. For instance:
			['OS=="win"', {
				"variables": {
					"OZW_HOME": "C:/src/open-zwave"
				},
				"include_dirs": [
					"<!(node -e \"require('nan')\")",
					"<(OZW_HOME)/cpp/src",
					"<(OZW_HOME)/cpp/src/value_classes"
				],
				"defines": [
					"OPENZWAVE_ETC=<(OZW_HOME)/config",
					"OPENZWAVE_SECURITY=1"
				],
				'msvs_settings': {
					'VCLinkerTool': {
						'AdditionalDependencies': ['setupapi.lib', '<(OZW_HOME)/cpp/build/windows/vs2010/x64/Release/OpenZWave.lib']
					}
				}
			}]
  3. Build the zwave VS2010 project in cpp\build\windows\vs2010. Select the x64\Release target.
  4. Rebuild the openzwave-shared node module

The following hardware is required:
	1. A Somfy motorized window shade
	2. A Z-Wave to Radio Technology Somfy Interface device (https://www.somfysystems.com/products/controls-integration/z-wave -- Cat No. 1811265)
	3. A ZWave USB dongle, such as http://aeotec.com/z-wave-usb-stick

Follow the instructions with the Somfy Zwave interface device for pairing the Somfy window shade.

## Installing Dependencies
To install dependencies for this translator, run:

```bash
npm install
```

## Test Device
After everything is installed, run:

```bash
node node_modules/opent2t-onboarding-zwave/test.js -n 'Somfy' -f '^Somfy*'
```

The -f parameter is a regular expression to identify the window shade by matching its manufacturer name.

If there is an Somfy window shade nearby, you should see output similar to:

```bash
Onboarding device            : Somfy
advertisementLocalNameFilter : ^Somfy*
found peripheral: {"homeId":25478028,"nodeId":3}
Found peripheral matching filter with ID: d3026b5699424729b0910945a7761833
```

Copy the ID of the window shade that was discovered, and use that to run the translator test file:

```bash
node test -i d3026b5699424729b0910945a7761833
```

You should see the window shade move up and down. You should also see output similar to:

```bash
Initialising OpenZWave 1.4.78 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : C:/src/open-zwave/config
        User settings path : C:\src\OT2T\translators\view1\org.OpenT2T.Sample.SuperPopular.WindowTreatment\Somfy\js\node_modules\openzwave-shared\build\Release/../../
        Option Overrides : --ConsoleOutput false
connecting to COM3
close
open
close
open
```

Let's step through what's going on here. The manifest.xml for this translator documents the onboarding type
for this translator is org.OpenT2T.Onboarding.ZWave. This basically just describes what sort of setup, pairing or
auth information is required to interact with the device. In the case of this onboarding type, success means you get
an ID parameter. This parameter needs to be provided to the translator for it to work.

repository: VictorVuong/translators

repo_name: VictorVuong/translators


text:
# Ceriospora caudae-suis Ingold, 1951 SPECIES

#### Status
SYNONYM

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

#### Published in
Trans. Br. mycol. Soc. 34: 210 (1951)

#### Original name
Ceriospora caudae-suis Ingold, 1951

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Sordariales/Annulatascaceae/Pseudoproboscispora/Pseudoproboscispora caudae-suis/ Syn. Ceriospora caudae-suis/README.md

repo_name: mdoering/backbone


text:
# Slot: gene_to_expression_site_association_stage_qualifier

stage at which the gene is expressed in the site

URI: [biolink:gene_to_expression_site_association_stage_qualifier](https://w3id.org/biolink/vocab/gene_to_expression_site_association_stage_qualifier)

## Domain and Range

[GeneToExpressionSiteAssociation](GeneToExpressionSiteAssociation.md) ->  OPT [LifeStage](LifeStage.md)

## Parents

 *  is_a: [stage qualifier](stage_qualifier.md)

## Children

## Used by

 * [GeneToExpressionSiteAssociation](GeneToExpressionSiteAssociation.md)

## Other properties

|  |  |  |
| --- | --- | --- |
| **Examples:** | | {'value': 'UBERON:0000069', 'description': 'larval stage'} |

repository: biolink/biolinkml

gha_language: Python

repo_name: biolink/biolinkml


text:
{"firstName": "Elvan",
"lastName": "Serin",
"photo":false,
<EMAIL_ADDRESS>"lang":"en"}
---

Born in İzmir, 1985.
Graduated from Bilkent University in 2009.
MFA degree from Yeditepe University.

Solo Exhibitions:
- İşbank Sanat Galerisi, İzmir, 2012
- Galeribu, İstanbul, 2013

Artist Residencies:
- Affect Agora Artist Residency, Berlin, 2012
- Ceramic Artist in Residence, Neumünster, 2013

Selected Group Exhibitions:
- Nevnesil Savunma Sanatı, 2011
- Galeri Apel, İstanbul, Kupa, 2017
- Galeri Apel, İstanbul, Komşu, 2017
- Meleklerin Payı, Depo, İstanbul, 2017

[![Drawing on paper](img/image_1.jpg)](img/image_1.jpg)

Drawing on paper; 75x55cm; 2015

[![Ink on wood](img/image_2.jpg)](img/image_2.jpg)

Ink on wood; 60x23cm; 2016

[![Stitch on tulle fabric](img/image_3.jpg)](img/image_3.jpg)

Stitch on tulle fabric; 75x50cm; 2016

[![Detail](img/image_4.jpg)](img/image_4.jpg)

Detail

repository: mareksl/wdrodze

repo_name: mareksl/wdrodze


text:
---
title: Regular Expressions
description: Notes on Regular Expressions
first-published: 2014-01-16
---

*   [RegExr](http://www.regexr.com/) an online tool to help you build
    regular expressions.
*   [Regex Golf](http://regex.alf.nu/) an online Regex Golf game to
    help you sharpen your regex-building skills.

repository: marios-zindilis/website-sources

repo_name: marios-zindilis/website-sources


text:
#[UcaseFirst](http://xenforo.com/community/resources/ucasefirst.84) <img align="left" src="logo.png" width="40" height="40" />

This is an addon for the forum software XenForo. Adjust the thread title *automatically* only in the *first* letter of the thread title when creating a new thread. The difference between this and the `Sentence case` from XenForo, is that when using `Sentence case` option, it will lowercase all others words from the thread title.

To configure go to Options > Threads, Discussions and Conversations > Automatically Adjust Case of Discussion Titles as shown in the image:

Works on XenForo 1.2, 1.3, 1.4.

![How to configure](seeme.png)

## 1.1.1
- Make use of event hints in code event listeners

## 1.1.0
- Fixed an error when trying to create a thread without title

## 1.0.0
- Released

repository: Fuhrmann/xenforo-ucase-first

repo_name: Fuhrmann/xenforo-ucase-first


text:
I thought to officially complete courses on numpy stack in python and completing all tools completely.
So here is a blog doing and learningg it.
A+A will add the array with itself.
In python if we did this then it means that I am concatenating the same array.
np.array([]) is used to make an array.
np.sqrt(), np.log(), np.exp(name_of_array) will help in element wise operations.
For loops are avoided as they are very slow in python also.
zip function is used to combine elements of various array having same indexes and to unxip then we use * keyword so that we get back the arrays we want, like :
nam=["ABhishek","Manjeet","Kaur"]
roll=[1,2,3]
so now
mapped=zip(nam,roll)
now change mapped as you want to show it, it depends upon what do you want with your zipped variable.
You can show them as an array so that,
list(mapped) or as a set by set(mapped) Now to unzip you can use
name,rollno=zip(*mapped)
now name would contain,
["ABhishek","Manjeet","Kaur"]
and roll will contain,
[1,2,3]
Now to dot product two vectors, say
a=[1,2,3]
b=[1,2,3]
onw way= for e,f in zip(a,b)
dot+=e*f
another way to do same is to use a*b num.sum(a*b). or (a*b).sum()
or by using dot function of numpy as,
np.dot(a,b);
or a.dot(b);
To get the angle between two vectors, we can use the formula as specified below,
cosangle-a.dot(b)/ np.sqrt((a*a).sum())*np.sqrt((b*b).sum())
np.arccos(cosangle) will gove us the angle between vectors a, and b
And always use np method( that is a.dot(b) or np.dot(a,b)) as it is a lot times faster than simple loops.
np.random.random((10,10)) will give 10 by 10 matrix
for random numbers, you can use np.random.randn(10,10). YOu have to send individual parameters.
Now .mean() and .variance() will give you respectively those parameters.

setTimeout() is an asychronous function.

gha_language: CSS


text:
# Walk through a git repo with ease.

gwalk is a utility written in go that can navigate through the evolution of git repo.

Start with the inital commit in master, and move forward one by one to learn all about the code you are reading.

## Usage
```
$ gwalk -b master
$ gwalk --help :
  -b string
        branch to use (default "master")

Available actions - init,next,prev,exit
```

## TODO
- Improved error handling
- Better logging to stdout
- Support for other versioning systems

repository: vishnu-narayanan/gwalk

repo_name: vishnu-narayanan/gwalk


text:
In this folder, the original XLMR.base model should be stored, if needed for
fine-tuning the XLMR model.

### How to download XLMR.base
Replace `{root}` by the path to the root or just the folder of your local copy
of the git repository.
``` shell
cd {root}/models/xlmr.base
wget https://dl.fbaipublicfiles.com/fairseq/models/xlmr.base.tar.gz
# unpack the archive
tar -xzvf xlmr.base.tar.gz

# move model file out of nested folder
mv xlmr.base/model.pt model.pt
# remove nested folder, helper files are contained in data/eiopa/1-external
rm -r xlmr.base
rm xlmr.base.tar.gz
```
After following the steps above, this folder should only contain the `model.pt` checkpoint
file and this `README.md`.

repository: DeNederlandscheBank/nqm

repo_name: DeNederlandscheBank/nqm


text:
[![Slack](https://img.shields.io/badge/Slack-Channel-blue.svg)](https://redarrowlabs.slack.com/messages/tournavation-2015/)
[![HuBoard](http://img.shields.io/badge/Hu-Board-7965cc.svg)](https://huboard.com/redarrowlabs/tournavation-2015/)
[![Dependency Status](https://david-dm.org/redarrowlabs/tournavation-2015.svg)](https://david-dm.org/redarrowlabs/tournavation-2015)
[![devDependency Status](https://david-dm.org/redarrowlabs/tournavation-2015/dev-status.svg)](https://david-dm.org/redarrowlabs/tournavation-2015#info=devDependencies)

# Tournavation-2015
MKE Tournavation project for 2015.

## What is Tournavation
Tournavation is a social innovation project led by Red Arrow Labs and Dohmen Foundation.  The goal is to address a social issue voted on by the community, and create a technical solution to help alleviate the problem.  The project is developed by a volunteer team from the community, and gifted back as an open source project.

## The Idea
Health disparities are inextricably linked with poverty (Milwaukee Health Report, 2013). At the core of the issue are three root causes that Health STEMheroes addresses: (1) lack of real-time information for both public servants and citizens, which hinders effective resource allocation to those most in need; (2) disempowerment of those in poverty, particularly adolescents, to understand and improve their own health; and (3) far too few students (especially females and students of color) pursuing studies and careers in science, technology, engineering, math (STEM), especially as such jobs boom in Milwaukee and would provide a path out of economic poverty that negatively affects health outcomes.

## The Solution
The goal of this application is to allow Health Mentors to create experiments for Participants to track Health Behaviors and learn from the results.

## About this project
This is an ES7 Node.js isomorphic/universal project with a RESTfull web API.  [Express](http://expressjs.com/en/index.html) is used for the HTTP server, as well as routing HTTP requests.  [React](https://facebook.github.io/react/) and [Alt](http://alt.js.org/) are leveraged for rendering and handling application flow.

## Getting started
* [Read the wiki]( https://github.com/redarrowlabs/tournavation-2015/wiki) to learn about the project
* Clone the repo with `git clone  https://github.com/redarrowlabs/tournavation-2015.git`
* Using<EMAIL_ADDRESS>`npm@3.5.1`](https://nodejs.org/en/), & [`MongoDB@3.2`](https://www.mongodb.org/)
* Install and start MondoDB on `mongodb://localhost:27017`
* `npm install`
* `npm run dev`
* Open browser to localhost:3000

## Contributing to this project
Anyone and everyone is welcome to contribute. Please take a moment to review the [guidelines for contributing](CONTRIBUTING.md).

* [Bug reports](CONTRIBUTING.md#bugs)
* [Feature requests](CONTRIBUTING.md#features)
* [Pull requests](CONTRIBUTING.md#pull-requests)

## TL;DR
 * [alt ^0.18.1](https://github.com/goatslacker/alt)
 * [express ^4.13.3](https://github.com/strongloop/express)
 * [immutable ^3.7.5](https://github.com/facebook/immutable-js)
 * [jade ^1.11.0](https://github.com/pugjs/jade)
 * [mongoose ^4.3.1](https://github.com/Automattic/mongoose)
 * [react ^0.14.3](https://github.com/facebook/react)
 * [react-dom ^0.14.3](https://github.com/EtienneLem/react-dom)
 * [react-router ^1.0.0](https://github.com/rackt/react-router)
 * [superagent ^1.5.0](https://github.com/visionmedia/superagent)
 * [Globalize ^1.1.0-rc.7](https://github.com/jquery/globalize)
 * [babel.js](https://github.com/babel/babel)
 * [webpack](https://github.com/webpack/webpack)

## Project Breakdown
### API `(src/server/api)`
The boilerplate code for the [Express](http://expressjs.com/en/index.html) server should be pretty much done, so adding a new route should be pretty easy and straight forward.
 * Create a new route under `src/server/api/routes` (the file name should be descriptive of its purpose)
 * Export a function that will depend on an Express router, and add the desired routes to it
 * The routes should contain the business logic needed
 * If data access is needed, create a new Model under `src/server/api/models`
```
 export default function (router) {
  	router.route('/tests').get(function(req, res) {
  	    res.send({ message: 'Test get' });
  	});

  	router.route('/tests/:id').get(function(req, res) {
  	    res.send({ message: 'Test get: {_id}' });
  	});

  	router.route('/tests').post(function(req, res) {
  	    res.send({ message: 'Test post' });
  	});

  	router.route('/tests/:id').put(function(req,res){
  	    res.send({ message: 'Test put: {_id}' });
  	});

  	router.route('/tests/:id').delete(function(req, res) {
  	    res.send({ message: 'Test delete: {_id}' });
  	});
  }
```
Data access is done through Mongoose to MongoDB.
 * Create a new model under `src/server/api/models` (the file name should be descriptive of its purpose)
 * Define a schema for the model
 * Export the new model
```
  import mongoose from 'mongoose';
  var Schema = mongoose.Schema;

  var schema = new Schema({
  	name: String,
    key: String,
    data: Schema.Types.Mixed,
  });

  export default mongoose.model('Test', schema);
```

### Web Server / Client
Code for client facing code can be found under `src/shared`.  This is the client side running code and what is rendered server side.  This is built with [React](https://facebook.github.io/react/) and Flux ([Alt](http://alt.js.org/) implementation).  This breaks the code down into actions, stores, and components.

#### Actions
Actions can be defined as the tasks that the application need to perform from user, or even application, events.  Actions are used to dispatch events to stores, as well has make API calls.  These are basic classes, wrapped by Alt.  Actions should be wrapped in the Alt resolver for asynchronous work (and handled for server side rendering).  The result of the work should be dispatched out for notifications.  When a new action class is added, it needs to be registered in `src/shared/actions/index.js`.
```
class TestActions {

  constructor() {
    // Add dispatch only actions
    this.generateActions(
      'updateTests',
    );
  }

    fetchTests() {
      return (dispatch, alt) =>
        alt.resolve(async () => {
          var data = await alt.api.fetchAll('tests');
          alt.getActions('tests').updateAllTests(data);
        });
    }
}

export default HealthBehaviorActions;
```

### Stores
Stores are what hold (immutable) state for the application.  When an action dispatches, it is the store that is listening to update the state.  Like actions, stores are classes that get wrapped by (immutable) Alt.  This makes it an immutable store, so state needs to be set a little differently then traditional Alt stores.  When binding to a store, a convention is used: store methods need to be named `on<ActionMethodName>`.  For example, if there was and action for `fetchTests`, then the store needs `onFetchTests` to bind for dispatch events.  Similarly with Actions, Stores need to be registered in `src/shared/stores/index.js`.
```
import Immutable from 'immutable';
var immutableAlt = require('alt-utils/lib/ImmutableUtil');

@immutableAlt
class TestStore{
  displayName = 'TestStore'
  constructor() {
    this.bindActions(this.alt.getActions('tests'));

    this.state = Immutable.Map({
      tests: new Immutable.List([])
    });
  }

  onFetchTests() {
    this.setState(
      this.state.set('tests',
        this.state.get('tests').clear()));
  }

  onUpdateTests(payload) {
    this.setState(
      this.state.set('tests',
        Immutable.fromJS(payload)));
  }
};

export default TestStore;
```

### Components
Components are React classes that render HTML.  They use stores to get state, and actions to trigger events in the application.  The application component hierarchy is defined by routes (`src/shared/routes.js`), and components can only comprise of one HTML node/element, which can contain child components.  If a component requires any properties, they should be passed in from the parent component.  The state should be set in `getInitialState()`, and updated by listening to the store(s) of interest when the component is mounted.
```
export default React.createClass ({

  // call initial fetch to load data, called on both client and server
  componentWillMount() {
    const { flux } = this.context;
    flux.getActions('tests').fetchAllHealthBehaviors();
  },

  // begin listening to store
  componentDidMount() {
    const { flux } = this.context;
    flux.getStore('tests').listen(this.stateChanged);
  },

  // remove listener when component is unmounted
  componentWillUnmount() {
    onst { flux } = this.context;
    flux.getStore('tests').unlisten(this.stateChanged);
  },

  stateChanged(state) {
    this.setState({
    	tests: state.get('tests')
    });
  },

  getInitialState() {
    const { flux } = this.context;
    return {
    	tests: flux.getStore('tests').getState().get('tests')
    };
  },

  renderListItem(test) {
    return (
      <li key={test.get('id')}>
      	{test.get('start')} - {test.get('end')}
      </li>
    );
  },

  render() {
    const { tests } = this.state;
    return (
      <div>
        <span>Logged data:</span>
    	<ul>{ tests.map(this.renderListItem) }</ul>
      </div>
    );
  }
});
```

### Globalization
[Globalize](https://github.com/jquery/globalize) is used as the globalization engine.  Resource files are one per locale, and are found in `src/shared/globalization`.

### SSL/TLS
The production server runs under HTTPS while development is HTTP only.  To configure SSL, set the environment variables SSL_CERT_PATH and SSL_KEY_PATH to the path of the SSL certificate and key.
[Let's Encrypt](https://letsencrypt.org/) is one trusted Certificate Authority providing free certificates.  A certificate that is signed by an untrusted Certificate Authority or a certificate that is self-signed will display a warning in the browser before the user can proceed.  Production certificates should be signed by a trusted Certificate Authority, as forcing users to bypass this warning allows certain attacks.
For testing purposes, a self-signed certificate is enough and any users will need to bypass the warning.  Using the openssl command below, a self-signed certificate can be created.
```
openssl req -x509 -newkey rsa:2048 -keyout self-signed.key -out self-signed.crt -days XXX -nodes
```
Additionally when using self-signed certificates, set the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0.  This setting bypasses authentication of the SSL certificate on the Node server.  Do not use this setting in production, as it allows many of the attacks that HTTPS was designed to prevent.

## License
[MIT License (MIT)](LICENSE.md)


text:
# withPrismicUnpublishedPreview

This [higher order component][hoc] (HOC) is used to preview unpublished pages
within your app. It automatically renders a page template component with content
from a document that yet to be published. This HOC relies on being added to your
app's
[404 page](https://www.gatsbyjs.com/docs/how-to/adding-common-features/add-404-page/)
to correctly detect an unpublished page.

If you choose to keep your access token private by not providing it as part of
the plugin's options, this HOC will also display a modal allowing an editor to
provide it. It will save the token locally within the browser for future preview
updates.

**Note**: When viewing your unpublished preview page during development, Gatsby
will display its default development 404 page. To preview content on the
unpublished preview page, click the "Preview custom 404 page" button that
appears toward the top of the page. This will hide Gatsby's default development
404 component and render your page instead.

```typescript
function withPrismicUnpublishedPreview(
  WrappedComponent: React.ComponentType,
  repositoryConfigs: {
    repositoryName: string
    linkResolver: LinkResolver
    htmlSerializer?: HTMLSerializer
    transformFieldName?: FieldNameTransformer
    componentResolver: (
      nodes: PrismicNode[],
    ) => React.ComponentType | undefined | null
    dataResolver?: (
      nodes: PrismicNode[],
      data: Record<string, unknown>,
    ) => Record<string, unknown>
  }[],
): React.ComponentType
```

- **`WrappedComponent`**
The page component to which Prismic unpublished
  previews will be connected. This should be your app's 404 page.

- **`repositoryConfigs`**
A set of configuration values for each Prismic
  repository used in your app.

The following configuration should be provided for each Prismic repository used
in your app:

- **`linkResolver`**
The [Link Resolver][link-resolver] used for the Prismic
  repository. This should be the same Link Resolver provided to
  [`gatsby-source-prismic`][gsp] in your app's `gatsby-config.js`.

- **`htmlSerializer`**
The optional [HTML Serializer][html-serializer] used
  for the configured Prismic repository. This should be the same HTML Serializer
  provided to [`gatsby-source-prismic`][gsp] in your app's `gatsby-config.js`.

- **`transformFieldName`**
The optional field name transformer for the
  configured Prismic repository. This should be the same `transformFieldName`
  function provided to [`gatsby-source-prismic`][gsp] in your app's
  `gatsby-config.js` if used. Most projects will not need to provide a value for
  this option.

- **`componentResolver`**
A function that determines the component to render
  during an unpublished preview. This function will be provided a list of nodes
  that match the URL of the page. Using the list of nodes, the appropriate page
  template component should be returned

  The components returned from this function must be wrapped in
  [`withPrismicPreview`](./api-withPrismicPreview.md) in order for the component
  to properly resolve the preview.

  In most cases, the [`componentResolverFromMap()`](#componentResolverFromMap)
  helper function can be used as an easy way to map a Prismic document type to a
  component.

- **`dataResolver`**
A function that determines the data provided to the
  resolved component's `data` prop. This function will be provided a list of
  nodes that match the URL of the page and the wrapped component's original
  `data` prop. Using the list of nodes and the original data, an object of data
  should be returned that matches the shape of the resolved page template's
  GraphQL query.

  In most cases, this can be left empty. The default `dataResolver` will
  automatically retrieve the first matching node and add it to the existing
  `data` prop using the node's typename.

## `componentResolverFromMap()`

This helper function is a simple method to determine which component to display
during an unpublished preview. While `componentResolver` provides you with a
list of nodes that match the URL of the previewed document, this list will
usually only include one node. `componentResolverFromMap()` uses this assumption
to allow you to provide just set of document types and their matching components
to render. The first node's type in the list is used to select the component.

See the the next section for an example of `componentResolverFromMap()`.

## Typical Example

This example uses `withPrismicUnpublishedPreview()` to automatically display an
unpublished document's content. The HOC is used on the app's 404 page to allow
any non-existent page to be converted into a preview.

The 404 page component is written as a standard Gatsby page without any special
preview-specific code. In most cases, you can simply add
`withPrismicUnpublishedPreview()` around the default export to an existing page
template to enable unpublished preview support.

Note that this means your 404 page can still use its own GraphQL query to
display Prismic content. When an unpublished preview is active, this data will
continue to be accessible within the previewed component.

```javascript
// src/pages/404.js

import * as React from 'react'
import { graphql } from 'gatsby'
import {
  withPrismicUnpublishedPreview,
  componentResolverFromMap,
} from 'gatsby-plugin-prismic-previews'

import { linkResolver } from '../linkResolver'

import PageTemplate from './PageTemplate'

const NotFoundPage = ({ data }) => {
  const page = data.prismicPage

  return (
    <div>
      <h1>{page.data.title.text}</h1>
    </div>
  )
}

export default withPrismicUnpublishedPreview(PageTemplate, [
  {
    repositoryName: 'my-repository-name',
    linkResolver,
    componentResolver: componentResolverFromMap({
      page: PageTemplate,
    }),
  },
])

export const query = graphql`
  query NotFoundPage {
    prismicPage(id: { eq: "404" }) {
      _previewable
      data {
        title {
          text
        }
      }
    }
  }
`
```

[hoc]: https://reactjs.org/docs/higher-order-components.html
[link-resolver]: https://prismic.io/docs/technologies/link-resolver-gatsby
[gsp]: https://github.com/angeloashmore/gatsby-source-prismic
[html-serializer]:
  https://prismic.io/docs/technologies/html-serializer-javascript
[usemergeprismicpreviewdata]: ./useMergePrismicPreviewData.md

repository: plusxp/prismic-gatsby

repo_name: plusxp/prismic-gatsby


text:
## Overview

Merlin is a platform for deploying and serving machine learning models. The project was born of the belief that model deployment should be:

* **Easy and self-serve**: Human should not become the bottleneck for deploying model into production.
* **Scalable**: The model deployed should be able to handle Gojek scale and beyond.
* **Fast**: The framework should be able to let user iterate quickly.
* **Cost efficient**: It should provide all benefit above in a cost efficient manner.

Merlin attempts to do so by:

* **Abstracting infrastructure**: Merlin uses familiar concept such as Project, Model, Version, and Endpoint as its core component and abstract away complexity of deploying and serving ML service from user.
* **Autoscaling**: Merlin is built on top Knative and KFServing to provide a production ready serverless solution.

## Getting Started

To install Merlin in your local machine, click [Local Development](./docs/getting-started/deploying-merlin/local_development.md).

## Documentation

Go to the [docs](/docs) folder for the full documentation and guides.

### Python SDK Documentation

Click [here](https://merlin-sdk.readthedocs.io) to getting started on using the Python SDK.

### API Documentation

To explore the API documentation, run:

```bash
make swagger-ui
```

## Client Libraries

We use [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) to automatically generate Golang and Python clients for Merlin API. To genarate the client libraries, run:

```bash
make generate-client
```

## Notice

Merlin is a community project and is still under active development. Your feedback and contributions are important to us. Please have a look at our [contributing guide](CONTRIBUTING.md) for details.

repository: babywyrm/merlin

repo_name: babywyrm/merlin


text:
anycluster (POSTGIS version)
============================

[https://anycluster.org](https://anycluster.org)

anycluster provides Server-Side clustering of map markers for Geodjango. It is suitable for large amounts of markers.
Depending on your server and personal feeling, it works very well with 200.000 to 500.000 markers.

The postgis version is recommended. There is a mysql version with limited functionality: https://github.com/biodiv/anycluster-mysql

Documentation
-------------

http://anycluster.readthedocs.org/en/latest/

ChangeLog
---------
- [22.04.2023] anycluster 2.0 (breaking changes, see docs), npm, Django 4.x, updated docs
- [09.09.2019] support for Django 2.x and above (python 3), added leaflet support
- [08.10.2015] major code improvements
- you now need to add {% csrf_token % } somewhere in your template

Features
--------

This application offers 2 methods of clustering:
- grid-based clustering
- clustering based on geometric density of the points (needs PSQL extension)
- cluster contents of any geographic area defined as Polygon/Multipolygon
- get all elements contained in a cluster

... and has a builtin caching mechanism: if the user pans a map, only the new areas are processed.

And lots of optional customization possibilities:
- works with OpenLayers, google maps and Leaflet
- define what happens if you click on a cluster
- use your own cluster graphics
- define gridsize and other cluster parameters
- apply filters to your clusters
- use specialized markers/pins if count is 1

Performance Tips
----------------

- index your GIS database columns correctly
- usage of a SSD can be 10-20 times faster compared to HDD

repository: biodiv/anycluster

repo_name: biodiv/anycluster


text:
# [My Mind](https://my.mindnode.com/iLmnWSNcvYYUMHxtwZkjKh6gJMNyZpzgLXjupniC#237.7,357.1,5)
![](https://i.imgur.com/rfh1MzA.png)

Aside from this wiki. I also use many interactive mind maps. You can see all the mind maps I have made [here](https://my.mindnode.com/iLmnWSNcvYYUMHxtwZkjKh6gJMNyZpzgLXjupniC#237.7,357.1,5).

## Why I made them
I use these mind maps for many things. Since these maps are interactive and allow you to neatly link information together, they are much better suited for some formats. Like visualising different topics and their relations:

![](https://i.imgur.com/xubfa1T.png)

Which you can see and explore [here](https://my.mindnode.com/83qmKgoATj8TyKzprzsPfoirxa2g9WmFGx3xpr1J#1506.8,-1099.0,2).

I can then also instantly access any of these mind maps or any entry in this wiki from [Alfred My Mind](https://github.com/nikitavoloboev/alfred-my-mind) workflow:
![](https://i.imgur.com/wdPE5dK.png)

Which as the name suggests, acts as my second brain that I use to quickly access anything I [have indexed for myself](../knowledge/knowledge-indexing.md). I share it because I wish other people took this idea and made their own _Alfred My Mind_ or a _Knowledge wiki_ but for their own use. Sharing knowledge and tools like that is very powerful and makes a big difference. As I use and reuse other people's work and knowledge many times a day. It never hurts to add to the mix.

Essentially mind maps act as a digital augmentation of my mind in many ways. I want to visualise knowledge and thoughts and ideas I have and share most of these things with other people through this wiki, [the longer articles I write](../sharing/my-articles.md), the [YouTube videos I make](../sharing/my-youtube.md)  and of course finally through the [code I write](../sharing/my-github.md) to make useful tools, apps and interactive visualisations that all can use and enjoy.

## How to use these mind maps
Every mind map I made and shared is linked to some other mind map in some way and [this map](https://my.mindnode.com/iLmnWSNcvYYUMHxtwZkjKh6gJMNyZpzgLXjupniC#237.7,357.1,5) is the starting point.

Some nodes contain a description which is indicated by this little symbol here that you can click:
![](https://i.imgur.com/PuhNjSN.png)

I use various emojis to indicate certain things like indicating that a node links to another map with 🗺.

With all that said. The best way to know about me as a person, what I like and what I am into and what I am working on is to read through this wiki. With time, it will contain essentially [everything that I know](everything-I-know.md) _in my own words_.

This wiki acts as a first class citizen and anything that I ultimately want to share or have shared will be written down here, somewhere. Most of the mind maps I have made will be linked to from here and will have some description of the map too.

repository: henfee/knowledge

repo_name: henfee/knowledge


text:
# MTG League Tracker
MTG League Tracker is a Wordpress Plugin to display standings for trading card game [Magic: The Gathering](https://magic.wizards.com/) leagues and tournaments. Initially developed for the [Austrian Magic Championship](https://www.austrianmagic.at/), MTG League Tracker could be useful for similar projects.
The plugin relies on [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/) to handle events. Tournament result files (XML) from [Wizard Event Reporter](https://wpn.wizards.com/wer) (WER) can then be uploaded. Standings are automatically updated and displayable via shortcodes.

## Project Status
The plugin is marked as **EXPERIMENTAL**, as many options are still hard-coded and the data handling might be volatile, due to features still missing.

## Local Development
If you want to test the plugin locally, just use the provided Docker environment.

```
docker-compose up -d
```

The site is reachable under `http://localhost:8080/` shortly after.

Don't forget to install [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/) plugin once your site is up and running before activating MTG League Tracker.

If your Wordpress installation in Docker doesn't let you install plugins, make sure to set the correct permissions.
```
docker-compose exec -T wordpress bash
```
or
```
docker exec -it wp_mtg_league_wordpress_1 bash
```

and then
```
chown -cR www-data:www-data /var/www/html/wp-content
```

## Debugging with XDebug
TODO

## Authors
* **Johannes Kühnel** - https://github.com/JohannesKuehnel

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


text:
# Changelog

## v1.2.2 (2021-06-04)

### Bug Fixes and Other Changes

 * fix d-wave schema constraints

## v1.2.1 (2021-05-26)

### Bug Fixes and Other Changes

 * Add schema helper methods, modify device level tests, and fix some docs

## v1.2.0 (2021-05-24)

### Features

 * Noise operators

### Bug Fixes and Other Changes

 * Revert "fix: change documentation for deviceLevelParameters (#86)"
 * change documentation for deviceLevelParameters

### Testing and Release Infrastructure

 * tox for GitHub checks

## v1.1.4 (2021-05-11)

### Bug Fixes and Other Changes

 * allow null values to be passed in for optional parameters

## v1.1.3 (2021-04-16)

### Bug Fixes and Other Changes

 * move device-specific schemas into their own files

## v1.1.2 (2021-04-15)

### Bug Fixes and Other Changes

 * error message typo

## v1.1.1 (2021-03-26)

### Bug Fixes and Other Changes

 * add device level parameters and device-specific parameters

## v1.1.0.post6 (2021-03-19)

### Testing and Release Infrastructure

 * Run unit tests for dependent packages

## v1.1.0.post5 (2021-03-11)

### Testing and Release Infrastructure

 * Add Python 3.9

## v1.1.0.post4 (2021-03-03)

### Testing and Release Infrastructure

 * Make python-package consistent with other repos

## v1.1.0.post3 (2021-03-01)

### Documentation Changes

 * fix time unit for D-Wave metadata from milliseconds to microseconds

## v1.1.0.post2 (2021-01-06)

### Testing and Release Infrastructure

 * Add CodeCov badge
 * Upload coverage report to Codecov

## v1.1.0.post1 (2020-12-30)

### Testing and Release Infrastructure

 * Add build badge
 * Use GitHub Actions for CI

## v1.1.0.post0 (2020-12-04)

### Testing and Release Infrastructure

 * Make tox commands consistent with other repos

## v1.1.0 (2020-11-23)

### Features

 * Add explicit qubit allocation

## v1.0.3 (2020-11-03)

### Bug Fixes and Other Changes

 * Feature/lower latency

## v1.0.2.post2 (2020-10-30)

### Testing and Release Infrastructure

 * updating codeowners

## v1.0.2.post1 (2020-09-10)

### Testing and Release Infrastructure

 * fix black formatting

## v1.0.2.post0 (2020-09-09)

### Testing and Release Infrastructure

 * Add CHANGELOG.md

## v1.0.2 (2020-09-04)

## Bug Fixes

* Update the schema validation for GateModelParameters to be more strict, this will avoid Pydantic to auto convert String integers to int.

## v1.0.1 (2020-08-25)

## Bug Fixes

* Update the Rigetti task result schema to allow for the program duration to be zero.

## v1.0.0.post1 (2020-08-14)

The only way to update a description in PyPi is to upload new files;
however, uploading an existing version is prohibited. The recommended
way to deal with this is with
[post-releases](https://www.python.org/dev/peps/pep-0440/#post-releases).

## v1.0.0 (2020-08-13)

This is the public release of the Amazon Braket Python Schemas!

Amazon Braket Python Schemas is an open source library that contains the schemas for Braket, including:
* intermediate representations (IR) for Amazon Braket quantum tasks and offers serialization and deserialization of those IR payloads. Think of the IR as the contract between the Amazon Braket SDK and Amazon Braket API for quantum programs.
* schemas for the S3 results of each quantum task
* schemas for the device capabilities of each device


text:
# Contract Management

## Definitions
![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+) Company

![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+) Contractor

![#ff0000](https://placehold.it/15/ff0000/000000?text=+) Fusion system

#### Roles
*These roles each have the possibility for a counter part on the contractor side, however the descriptions below apply only to the company side, as defined in ARIS. Contractors can have their own definitions.*

The persons assigned to the roles will by default have the ability to perform actions like manage personnel and approve/reject request.

> **Company Representative (CR)** ![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+)![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+)
>
> This role acts as the company's single point of contact towards the contractor/supplier when the agreement has been awarded. Agreement is a collective term which covers contracts, amendments, purchase orders and framework agreements.
>
> This role acts as the leader of the agreement team.

> **Procurement Responsible (PR)** ![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+)![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+)
>
> The responsible person for planning, coordinating and executing the procurement process, and with a delegated authority to commit the company towards suppliers, ensuring right quality and commercial terms.

#### Contracts
Contracts in this context, are POs of a certain scale, originating in SAP and resolved from common library.

Common library will provide list available contracts for a specific project (project master), and provides the contract number, contract name and the company name.

#### Affiliate account
A guest account in the company Azure AD. This means the user can sign in to the company systems using their own e-mail. To get this account; **1.** the e-mail must be invited; **2.** the user receives a mail with a link; **3** the user has to follow the link and agree to the company terms.

# Request flow

## The overall process

>  ### 1. Allocation
> The contract is allocated by a company employ with correct permission. This permission is granted to persons with procurement positions in the selected project, or super-users with said permission for all projects.
> Contracts are listed from common library for the selected project.
>
> **If the contract does not appear, it must be added to common library. This can be done by raising a Service Now ticket**

> ### 2. Manage Personnel
> ![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+) CR/PR can define personnel that will be available for the request process.
> This step is isolated from the request process, to give a clear view of users that is involved in the contract, and a workspace to manage general user info, like relevant disciplines, davinci code, linked in profile etc.
>
> Once a user is added to the personnel list, the system will do a check to see if that user has an affiliate account. This is indicated with a **grey**/**yellow**/**green** icon.
>
> ![#a6a6a6](https://placehold.it/15/cacaca/000000?text=+) **Grey** indicates the user does not have an account.

> ![#f0b913](https://placehold.it/15/f0b913/000000?text=+) **Yellow** means the user has **not** accepted the invitation yet. That results in the user not being able to sign in.

> ![#1fcf00](https://placehold.it/15/1fcf00/000000?text=+) **Green** the user can sign in and use company services.

> ### 3.1 Requests - create/submit
> ![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+) CR/PR and any other users with a position in the contract can create requests to add personnel to the contract.
> If a non-CR/PR user creates the request, the CR/PR has to approve for the request to be submitted to the ![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+) CR for approval.
>
>  **If a person is not available for requests, the user might not have a green status**

> ### 3.2 Requests - approve
>  ![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+) CR receives the request for approval. The  CR can review the request information, like position information and suggested person.
>
>   The ![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+) CR can discuss the request with the ![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+) contractor side and suggest changes. Requests can be edited by the ![#d66dd3](https://placehold.it/15/d66dd3/000000?text=+) contractor side until rejected or approved.

> ### 3.3 Requests - provisioning
> When the ![#6f30a0](https://placehold.it/15/6f30a0/000000?text=+) approves the request, the ![#ff0000](https://placehold.it/15/ff0000/000000?text=+) system will provision the position to the org chart. Once this is done, the user will begin to get access to different systems.
>
>  **The request will be in the provisioning status until the system confirms this has been done successfully. If nothing happens within a few minutes, a Service Now ticket should be raised**

repository: skam-equinor/fusion-app-resources

repo_name: skam-equinor/fusion-app-resources


text:
## Using SigV4 Scala Example
This example showcases how to use SigV4 plugin with Scala to connect to Amazon Keyspaces, using
the DataStax V4 driver.

### Prerequisites
For connecting via SigV4 and role based authentication you will want to set the following environment
variables (or set a default profile), see [Using Credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html) for more information
```
    AWS_SECRET_ACCESS_KEY
    AWS_ACCESS_KEY_ID
```

Under `./resources/application.conf` you will find the configuration used to connect to Amazon Keyspaces.  Use this to change the details of your connection.

### Running the example.

You can run this from Intellij by `New Project from existing Sources` and selecting build.sbt and accepting the defaults.

If you wish to run the example from the command line simply run sbt at the command line.

```
$ sbt run
```

repository: zachzhaoamzn/amazon-keyspaces-examples

gha_license_id: NOASSERTION

repo_name: zachzhaoamzn/amazon-keyspaces-examples


text:
# Change Log

## Version 2.3.1 (2016-09-05)
* New: Added disclaimer before registering for courses
* Fixed MyCourses login
* Fixed drawables on pre-Lollipop
* Fixed course search
* Removed horizontal schedule page in walkthrough

## Version 2.3.0 (2016-07-16)
* New: Support for Android Nougat
* Fixed course search
* Fixed bug when removing favorite place

## Version 2.2.5 (2016-04-05)
* Fix: Fix login issue with regards to the new proxy cookie Minerva sets

## Version 2.2.4 (2016-03-10)
* Fix: Reverted Instabug to 1.x to fix the multiple crashes that 2.x was causing

## Version 2.2.3 (2016-03-08)
* Fix: Fixed crash when parsing Sunday as the day of the week a course is offered (character was recently changed)
* Fix: Fixed crash because of wrong order of email and LinkedIn info in the About section
* Fix: Fixed crash where list converters would not be found on Android 4.x
* Update: Started ignoring some unnecessary exceptions when sending crashes to Crashlytics

## Version 2.2.2 (2016-03-08)
* Fix: Fixed crash that happened when trying to update a semester on courses that haven't been loaded from storage yet

## Version 2.2.1 (2016-03-08)
* Fix: Attempt to fix the missing converter for the schedule on some devices
* Update: Updated to support libraries v23.2.0, now using VectorDrawables everywhere

## Version 2.2.0 (2016-03-02)
* Completely refactored the downloading and parsing of the info to be quicker and more efficient
* Made the loading screen much faster
* Stopped using Gson, starting using Moshi
* Added button to become a beta tester in the app
* Added GitHub button
* Now redirecting to the McGill walkthrough for setting up the email
* Switched to Instabug 2.0
* Added some managers for some of the data to make it more synchronous and less error prone
* Added option to display the schedule in 24 hour format
* Removed the user info that was unused
* Unified app icon
* A ton of small bug fixes

## Version 2.1.0 (2016-02-06)
* Started using Dagger for dependency injection almost everywhere
* Removed Hungarian notation from all of the models
* Replaced Joda Time with Android Three Ten
* Removed unused fields on some models
* Temporarily disabled the landscape orientation fo the schedule because it is not rendering correctly since the activity switch

## Version 2.0.3 (2016-01-28)
* Switched from fragments to activities
* Set up dependency to the Android Utils library

## Version 2.0.2 (2016-01-12)
* Fixed some reported crashes
* Fixed bug where about page would not load
* Fixed bug where transcript would not load on pre-Lollipop devices
* Removed unnecessary color state lists
* Refreshed the Settings UI

## Version 2.0.1 (2015-11-20)
* Open sourced the whole project
* Switched to min SDK 15
* Switched to Gradle
* Removed FontAwesome and switched to material design VectorDrawables
* Fixed Facebook sharing
* Fixed Twitter sharing
* Added Crashlytics
* Added Instabug
* Significantly optimized the Connection class
* Fixed bug where app would crash if ebill was empty
* Set up the Marshmallow permissions
* Refactored the whole code base
* Minor UI tweaks

## Version 2.0.0 (2015-02-10)
* Fixed dev mode

## Version 2.0.0 (2015-02-10)
* Removed wishlist option for semesters that you can't currently register for

## Version 2.0.0 (2015-02-09)
* Fixed NPE crash reported on Google Play (NPE on class list)

## Version 2.0.0 (2015-02-08)
* Bug fixes
* Material design
* Added a Search Functionality to the Map
* Added new categories to filter by on the map
* Added an End User License Agreement (EULA)

## Version 1.0.1 (2014-09-24)
* Fixed bug where the current date would be shown even if you chose a semester in the past or future

## Version 1.0.1 (2014-09-23)
* Loading screen only updates the essentials (current/future semesters + transcript + ebill)
* Added skip button on loading screen
* Date is now taken into account for classes
* Fixed some parsing bugs
* Added close button to walkthrough
* Removed the default faculty in walkthrough
* Can now download files from MyCourses
* Fixed bug where logging out would not log you out of MyCourses

## Version 1.0.0 (2014-09-08)
* Initial Release

repository: jguerinet/MyMartlet

branch_name: refs/heads/develop

gha_language: Kotlin

repo_name: jguerinet/MyMartlet


text:
# DataRow, DataTable, and DataSet Materializers

These materializers support the legacy DataRow, DataTable, and DataSet types. They are slower than the Row, Table, and TableSet equivalents, but have the advantage of being bindable to data grids in Windows Forms and WebForms.

## Options

* `.ToDataRow` supports the `RowOptions` enumeration.
* `.ToDataSet` expects a list of table names.

## SQL Generation

These materializers do not request any columns. See the associated command builder for the behavior.

repository: hellfirehd/Chain

repo_name: hellfirehd/Chain


text:
# How to add a gravatar profile picture in Laravel

Gravatar is a service that allows to use their profile images with external api calls,
it is another way to handle user profile pictures instead of storing those in the database.

Here a little guide of how we can implement this feature.

* * *

Steps
-----

* Create a trait to add gravatars to any model
* Show a user avatar in blade templates
* Add a gravatar as the default profile picture in jetstream

* * *

## Create a trait to handle the gravatar

You can add a user method or if other models would use the gravatar image you can separate the code into a trait:

```php
namespace App\Traits;

trait HasGravatar {

    /**
     * The attribute name containing the email address.
     *
     * @var string
     */
    public $gravatarEmail = 'email';

    /**
     * Get the model's gravatar
     *
     * @return string
     */
    public function getGravatarAttribute()
    {
        $hash = md5(strtolower(trim($this->attributes[$this->gravatarEmail])));
        return "https://www.gravatar.com/avatar/$hash";
    }

}
```

Now any model can use the trait as User model:

```php
use App\Traits\HasGravatar;

class User extends Model
{
    use HasGravatar;
}
```

## Render an image in a blade view:

Now you only need to pass a user to the view and use it as below:

```php
<img src="$user->gravatar" height="150" width="150" />
```

## Use gravatars with Jetstream

If you are working with Jetstream there is a simple way to change the default initial letters to a gravatar.

Just override the method that was originally added to the User model by this trait `Laravel\Jetstream\HasProfilePhoto`

Instead of this:

```php
/**
 * Get the default profile photo URL if no profile photo has been uploaded.
 *
 * @return string
 */
protected function defaultProfilePhotoUrl()
{
    return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';
}
```

In your User model you can override with this:

```php
/**
 * Get the default profile photo URL if no profile photo has been uploaded.
 *
 * @return string
 */
protected function defaultProfilePhotoUrl()
{
    return $this->getGravatarAttribute();
}
```

## Conclusion

There are is a simple and flexible way to handle how to **add profile avatar images with gravatar in Laravel**.

If you are new to Laravel, I would recommend checking out this [Introduction to Laravel 7](https://www.youtube.com/watch?v=ZYDBQcnkj38&list=PL_UnIDIwT95Mn-Txakyt5x183aVXdve2R) free course by **DevDojo**.


text:
# docker-compose-pgweb

Run

```
docker-compose up -d
```

and you'll get [pgweb](http://sosedoff.github.io/pgweb/) running on port 8081 on your machine.

Note: You can use `host.docker.internal` as your host machine's hostname. See https://nickjanetakis.com/blog/docker-tip-65-get-your-docker-hosts-ip-address-from-in-a-container for example.


text:
---
title: "Deploy an ECS cluster using Fargate"
chapter: false
weight: 42
---

To illustrate automatic scanning, we will now deploy a sample ECS cluster that scales using Fargate.  For the purposes of the lab this will consist of this sample PHP appliction running in a Docker Compose environment - https://hub.docker.com/r/amazon/amazon-ecs-sample.

1. Create a cluster configuration and create a cluster

    ```
    ecs-cli configure --cluster tutorial --default-launch-type FARGATE --config-name tutorial --region us-east-1

    ecs-cli up --cluster-config tutorial --ecs-profile tutorial-profile
    ```

    The output should show a VPC and two Subnets have been created:-

    ```
    INFO[0000] Created cluster                    cluster=tutorial region=us-east-1
    INFO[0000] Waiting for your cluster resources to be created...
    INFO[0000] Cloudformation stack status       stackStatus=CREATE_IN_PROGRESS
    INFO[0060] Cloudformation stack status       stackStatus=CREATE_IN_PROGRESS
    VPC created: vpc-046ed77edcd796e19
    Subnet created: subnet-045df8f58a51b2291
    Subnet created: subnet-0e4623283c4907ea7
    Cluster creation succeeded.
    ```

3. We will use a bash script to create our ECS cluster.  So first lets instantiate the script by copying and pasting the following commands

    ```
    cd /home/ec2-user/environment

    curl -s https://gist.githubusercontent.com/johnfitzpatrick/d55097212d9bb4e1442383a5e3339b01/raw/272b0f1a45fa8a54571ebb707b7e7d51e4db0fb5/deploy-amazon-ecs-sample.sh > deploy-amazon-ecs-sample.sh

    chmod +x deploy-amazon-ecs-sample.sh
    ```

3. Now run the script `deploy-amazon-ecs-sample.sh`, copying and pasting the VPC & Subnet values from the above out when prompted

    ```bash
    ./deploy-amazon-ecs-sample.sh
    ```

    **Note** You can subsequently get the VPC and Subnet details requested from the [CloudFormation UI](https://console.aws.amazon.com/cloudformation/home)

    ![ECS Cluster](/images/40_module_2/image7.png)

    This script will

    - Retrieve the id of the default security group for the VPC created, and allows inbound access on port 80

    - Create a `ecs-params.yml` file using the subnets and security group already retrieved. This file should look as follows

        ```
        version: 1
        task_definition:
            task_execution_role: ecsTaskExecutionRole
            ecs_network_mode: awsvpc
            task_size:
              mem_limit: 0.5GB
              cpu_limit: 256
        run_params:
            network_configuration:
              awsvpc_configuration:
                subnets:
                  - "subnet-045df8f58a51b2291"
                  - "subnet-0e4623283c4907ea7"
                security_groups:
                  - "sg-3a1f94b6"
                assign_public_ip: ENABLED
        ```

    - Create a `docker-compose.yaml` to instantiate the image `amazon/amazon-ecs-sample`.  This file looks as follows

        ```
        version: '3'
        services:
            web:
              image: amazon/amazon-ecs-sample
              ports:
                - "80:80"
              logging:
                driver: awslogs
                options:
                  awslogs-group: tutorial
                  awslogs-region: us-east-1
                  awslogs-stream-prefix: web
        ```

        Optionally, for details of this script you can run the following command

        ```bash
        cat ./deploy-amazon-ecs-sample.sh
        ```

6. Once the script has completed you can see details of of the ECS cluster on the [Amazon ECS UI](https://console.aws.amazon.com/ecs/home?region=us-east-1#/clusters/tutorial/services)

![Cluster Tutorial](/images/40_module_2/image5.png)