text:
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Setup

-   Run the command `npm i -d` in the `with-one-login-per-subdomain` directory.
-   Add the following to your hosts configs `/etc/hosts` to allow for multi tenancy locally

```
<IP_ADDRESS>   a.example.com
<IP_ADDRESS>   b.example.com
```

> **_NOTE:_** For the demo, the subdomain is extracted from user's email provider, ex. for<EMAIL_ADDRESS>`a` would be the subdomain. A valid email address is required for password reset and email verification, to use these features in the demo you would need to add that email provider as a subdomain in the `/etc/hosts` file.
> Example:
>
> -   To use<EMAIL_ADDRESS>you would need to add `gmail.example.com` to your `/etc/hosts`
> -   On starting the demo, navigate to `http://gmail.example:3000` and signup/signin

## Available Scripts

In the project directory, you can run:

### `npm i && npm start`

Runs the app in the development mode.\
Open [http://a.example.com:3000](http://a.example.com:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

repository: marequen/supertokens-auth-react

repo_name: marequen/supertokens-auth-react


text:
#It came about after this that

"And so." This phrase is used here to mark a new event in the story. (See: [[:en:ta:vol2:translate:writing_newevent]])

#Look

"Listen." Joseph uses this word to get Potiphar's wife's attention.

#my master does not pay attention to what I do in the house

"my master has no concern about his household with me in charge." This can be written in positive form. AT: "my master trusts me with his household" (See: [[:en:ta:vol2:translate:figs_doublenegatives]])

#he has put everything that he owns under my care

When something is "put under someone's care," it means that the person is responsible for it's care and safe-keeping. AT: "he has put me in charge of everything that belongs to him" (See: [[:en:ta:vol1:translate:figs_metaphor]])

#No one is greater in this house than I am

Here the author speaks of authority as if it were greatness. AT: "I have more authority in this house than anyone else" (See: [[:en:ta:vol1:translate:figs_metaphor]])

#He has not kept back anything from me but you

This can be stated in positive form. AT: "He has given me everything except you"(See: [[:en:ta:vol2:translate:figs_litotes]])

#How then can I do this great wickedness and sin against God?

Joseph uses a question for emphasis. This can be written as a statement. AT: "I certainly cannot do such a wicked thing and sin against God." (See: [[:en:ta:vol1:translate:figs_rquestion]])

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: post
title: Violator VM Walkthrough
tags: vulnhub
---

## for the [Violator](https://www.vulnhub.com/entry/violator-1,153/) VM hosted on Vulnhub from knightmare.

I picked it as it seems to suit me because it's a beginner-level VM with no contrived and complicated storyline injecting unrealistic scenarios to the VM. Some VMs on vulnhub are good and map to real-life situations that I can take away from for my personal work and some are too contrived to be useful beyond critical thinking.

[]({{ site.baseurl }}/)

Here's my first walkthrough, and this is for the [Violator](https://www.vulnhub.com/entry/violator-1,153/) VM hosted on Vulnhub from knightmare.

First of all, I used netdiscover to find the vm in my Nat Network range, then Nmap to discover open ports, which finds ports 21 (FTP) and 80 (http) open.

I visit the http content through the browser and see this:

[]({{ site.baseurl }}/)

Nikto then finds that it's running apache 2.4.7, but nothing exciting like a wordpress install.

Attempt a scan with Zed Attack Proxy which finds nothing.

Attempt a scan with dirbuster which finds nothing.

Save the image of Foghorn Leghorn and run it through exiftool to see if there's any promising exif data but nothing there either.

I also tried to set netcat listening on a few ports that I noticed through wireshark were maybe being probed by the VM but nothing there either.

There's also nothing in the source except for that link to a Depeche Mode album named "Violator", so that's probably important and all the site is going to offer us, so the only other avenue for exploration that we have is the FTP port.

Attempts to enumerate users through patator also find nothing, but there is a nice banner message letting us know that it's running ProFTPD 1.2.5rc3, for which an exploit exists on [exploit-db](https://www.exploit-db.com/exploits/36742/).

So I FTP into there with no credentials and I'm left with a fully-functional command prompt(!) which allows me to transfer files internally. I start with /etc/passwd and send it to /var/www/html and access it through the browser:

[]({{ site.baseurl }}/)

[]({{ site.baseurl }}/)

so we can see from here 4 interesting users: dg, mg, af and aw. From checking the linked wiki it looks like these are initials of Depeche Mode bandmembers. So let's use that same FTP exploit to grab their home directories and see what's in there, by just moving the entire directories to the web directory and viewing again through the browser.

[]({{ site.baseurl }}/)

DG has some binaries relating to another FTP program, MG has nothing, AF has a program called "Minarke" which I google to find out is an enigma machine, and AW has a hint file telling us we have an enigma to solve, which seems to map back to that enigma machine, so I download the compressed file through the browser and save it for later.

So going back to the FTP before, but this time I try logging in as DG. It needs a password, so I try the songs from the tracklist of the original Violator release one by one and find "policyoftruth" lets me in. This lets me explore the user directories with higher permissions, and it turnds out the "MG" user home isn't empty at all, but contains instructions for manipulating the enigma machine to decode somethig, but since there's nothing to decode yet I'll save that for later too.

I used a PHP tcp reverse webshell from the ever-helpful /usr/share/webshells dir in Kali and upload that with my FTP access to the /var/www/html directory, executing it through the web browser directly. I just set my port to 1234 and then ran nc -lvp 1234 and as soon as the browser hit the file it picked up the request, but of course it's run under the www-data user, so not terribly helpful, but it's easier to explore than through ftp.

So what do we have? a shell with no permissions to transfer but can do some low-level executions, and an FTP access which can do no executions but can transfer. Usually useless BUT i found this [exploit](https://www.exploit-db.com/exploits/39166/) for the linux kernel that the box is running under (using **uname -a** to enumerate the kernel version) which makes them now a match made in heaven. I used the FTP account to upload that into /tmp as a .c file and used my reverse webshell under www-data to compile and execute it and BANG! root access!

[]({{ site.baseurl }}/)

so inside a hidden folder within the root user's directory is a .rar file, so i copy that to /var/www/html and download it through the browser (because I'm lazy). This contains artwork.jpg but is password-protected, so I compile a list of the same original tracklisting from the violator album, with variations on spacing and capitalisation and run it through johntheripper (after using **rar2john crocs.rar > password.hashes**) to try and get a working password:

[]({{ site.baseurl }}/)

and inside this is the artwork.jpg image which is the cover art for the violator album, i used exiftool again **exiftool -t artwork.jpeg** to view the exif data and there's a long string of unintelligible text which needs to be decoded!

[]({{ site.baseurl }}/)

so this brings us back to the enigma machine, which it turns out I couldn't figure out so i followed the instructions on this handy [website](http://www.dcode.fr/enigma-machine-cipher) as below, so we can see how the intimidating-looking instructions map to actions:

[]({{ site.baseurl }}/)

the final message after decoding looks like this:

>ONE FINAL CHALLENGE FOR YOU BGHX CONGRATULATIONS FOR THE FOURTH TIME ON SNARFING THE FLAG ON VIOLATOR ILL PRESUME BY NOW YOULL KNOW WHAT I WAS LISTENING TO WHEN CREATING THIS CTF I HAVE INCLUDED THINGS WHICH WERE DELIBERATLY AVOIDING THE OBVIOUS  ROUTE IN TO KEEP YOU ON YOUR TOES ANOTHER THOUGHT TO PONDER IS THAT BY ABUSING PERMISSIONS YOU ARE ALSO BY DEFINITION A VIOLATOR SHOUTOUTS AGAIN TO VULNHUB FOR HOSTING A GREAT LEARNING TOOL A SPECIAL THANKS GOES TO BEN RANDGKNSB FOR TESTING AND TO GTMLK FOR THE OFFER TO HOST THE CTF AGAIN KNIGHTMARE

So that was satisfying, if often very infuriating but I've tried to include the straight-line path here as much as I could :)


text:
## Alpaca - Easy Web Forms for jQuery ##

Alpaca is a plugin for jQuery, jQuery UI and jQuery Mobile that makes it easy to render beautiful HTML5 Web Forms for web and mobile applications.

Alpaca is built around JSON-Schema for expression of the form object model, types, properties, validation logic and constraints. It provides a comprehensive and extensible control library with support for wizards, layout, I18N and pluggable templating engines (like EJS and jQuery Templating).

Alpaca is an open-source, community-led project licensed under Apache 2.0.

### Project Home Page

For information about the Alpaca Project, visit its home page at http://www.alpacajs.org.

We've collected videos, tutorials, API documentation and much more to help you get started.

### Compatibility

Alpaca is compatible with jQuery 1.8.x and jQuery 1.9.0 using the jQuery Migrate Plugin.

### Discussion Board

If you have a question about Alpaca, please visit the [Alpaca Forums](http://www.cloudcms.org/forums/categories/alpaca).

This is a place where we encourage the community and developer community to get together to support one another in their Alpaca-related
projects.

### Authors

+ [@drq](http://github.com/drq)
+ [@uzquiano](http://github.com/uzquiano)
+ [@cloudcms](http://github.com/cloudcms)

Thanks for assistance and contributions:

+ [@Maethorin](http://github.com/Maethorin)
+ [@jlanders68](http://github.com/jlanders68)
+ [@JocelynDelalande](http://github.com/JocelynDelalande)

repository: JocelynDelalande/alpaca

repo_name: JocelynDelalande/alpaca


text:
---
title: Weekly Overview
module: 4
---

# Week 4 Overview
Drawing, Shapes, and Color

Active: {{ site.data.dates[page.module][0] }}

Homework Due: {{ site.data.dates[page.module][1] }}

This week you will make your first creative work with p5! Specifically, I am asking you to make a "self-portrait" or a "monster" drawing, using only p5 functions and procedures. We will cover a number of additional functions and topics this week to help you with this task.

This week will focus almost entirely on programming in p5. There will be no new material or review for Git, GitHub, syncing local and remote repositories, markdown, Atom, or your weekly readme. We have covered those topics in the past few weeks. However, you hopefully recognize that these topics will be critical to your ability to complete, upload, and submit this week's homework. So, if you are still having problems with these areas, please get help from;

- The Media Arts Lab (McGill, rm 127).
- The GitHub issue's board.
- The previous week's content and videos.
- Your classmates (and that study group you should work to setup).
- The Lab Assistants.
- The TA.
- The [help]({{site.baseurl}}/help) page.
- My office hours.

OK, on to this weeks content!

# Week 4 Code Examples Bundle Download

If you would like to download the entire bundle of code examples from week 4, lease use the following link!

[**Week 4 Code Examples Bundle download**](https://github.com/Montana-Media-Arts/120_CreativeCoding/raw/master/lecture_code/week04.zip)


text:
# A Porter brig Mixin

This mixin contains the [brig](https://docs.brigade.sh/topics/brig/) CLI for use
in [Porter](https://porter.sh) bundles.

Check out Porter's [Mixin](https://porter.sh/author-bundles/#mixins)
doc on how to utilize mixins when authoring bundles.

# Install

Use the `porter` [CLI](https://porter.sh/install/) to install this
mixin via its feed URL.

```console
$ porter mixin install brig --feed-url https://vdice.github.io/porter-brig-mixin/atom.xml
installed brig mixin v0.1.0 (d605dfc)
```

Now you are ready to use the mixin in a Porter bundle!

Check out the `examples/` directory for usage examples.

# Usage

This mixin isn't yet opinionated about either v1 or v2 of the brig CLI and
doesn't have `brig`-specific action support yet.

However, one benefit of this is, as long as the `brig` version you wish to use
exists on Brigade's [releases](https://github.com/brigadecore/brigade/releases)
list, you can specify in your porter.yaml file like so:

```
mixins:
  - brig:
      clientVersion: v2.0.0-alpha.5
```

And use the mixin in an action like so:

```
install:
  - brig:
      description: Print brig version
      arguments:
        - --version
```

repository: vdice/porter-brig-mixin

branch_name: refs/heads/main

repo_name: vdice/porter-brig-mixin


text:
---
layout: contact-us
permalink: /contact-us/
breadcrumb: Contact Us
title: Contact Us
---

### **Feedback**

### **Address**

**The Treasury**

Strategy Group, Prime Minister's Office

100 High Street,

03-01 The Treasury,

Singapore 179434

[Get Directions](https://www.google.com/maps/place/The+Treasury/@1.2909338,103.8474264,17z/data=!3m1!4b1!4m5!3m4!1s0x31da19a0dae52961:0x874a6ef518dc0dad!8m2!3d1.2909284!4d103.8496151){:target="_blank"}

**Revenue House**

National Climate Change Secretariat, Strategy Group, Prime Minister’s Office and

National Population and Talent Division, Strategy Group, Prime Minister’s Office

55 Newton Road,

11-01 Revenue House,

Singapore 307987

[Get Directions](https://www.google.com/maps/place/55+Newton+Rd,+11+Revenue+House,+Singapura+307987/@1.3193874,103.8399072,17z/data=!3m1!4b1!4m5!3m4!1s0x31da19e7aa771f9f:0xa8abef003aca9434!8m2!3d1.319382!4d103.8420959){:target="_blank"}

repository: nyp-sophiaw/isomerpages-stratgroup

repo_name: nyp-sophiaw/isomerpages-stratgroup


text:
# Nectria grammicospora Ferd. & Winge, 1908 SPECIES

#### Status
SYNONYM

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

#### Published in
in Raunkiaer, Bot. Tidsskr. 29(1): 11 (1908)

#### Original name
Nectria grammicospora Ferd. & Winge, 1908

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Hypocreales/Bionectriaceae/Bionectria/Bionectria grammicospora/ Syn. Nectria grammicospora/README.md

repo_name: mdoering/backbone


text:
# What is an interceptor

Interceptor is one of extensible points of Safewhere Identify that allows for intercepting login flows when:

- [Authentication connection's interceptor](CodeReferences/IAuthenticationInterceptorService.cs): this type of interceptor is invoked after Identify receives a token, but before Identify creates a login session for a user. This enables some good use cases such as custom validation rules for claims that an Identity Provider has to return, or asking a user for more user information before creating a login session.
- [Protocol connection's interceptor](CodeReferences/IProtocolInterceptorService.cs): this type of interceptor is invoked before claims transformation pipeline is run. The advantage of an intercepter versus a custom claims transformation is that you can implement use cases that need user interactions.

As you can probably see now, the two interfaces have identical members and only the interface names differ. We chose that design to simplify how Identify can initiate the interceptor objects internally.

## Interceptor: further technical details

Although the members and their parameters are well-explained by comments on those code files, real trouble is on the contextId parameter, the Intercept/OnPostBack model, and mandatory form parameters.

### ContextId

The context id is generated by Identify internally and passed to interceptors. When an interceptor needs to break a login flow, e.g. when it needs to show a UI to collect inputs from a user and submit, the submit request needs to contain the context id so that Identify can restart the on-going login session.

We recommend that you add a ContextId property to your view model and set it to the contextId parameter.

### The Intercept/OnPostBack model

An interceptor has two steps:

- Intercept: the method is executed when an interceptor is called the first time.
- OnPostBack: when the interceptor shows a UI to a user and after the user submits data, Identify will call OnPostBack to handle that submission request.

Before 5.3, handling interceptor is a standalone step in a login flow so the Intercept/OnPostBack model made sense. From 5.3 we have turned interceptor into a sub step of a chain of commands happened before or after an event occurs. Ideally, there should be only the Intercept method that handles both Intercept and OnPostBack and the interceptor itself what it should do: showing something to a user or processing data submitted by the user. Anyway, in order to restrict changes that would break existing installations, we stick with the current Intercept/OnPostBack for now.

As a side note, if your interceptor doesn't need user interaction, implementation will be a lot easier because you don't need to care about the on postback phase.

### Interceptor's view: mandatory form parameters

When an interceptor shows a UI, it essentially breaks the login flow. Thus, when the interceptor view submits data to Identify, the submit request needs to post a bunch of mandatory parameters to Identify to help it "restarting" the login flow. The easiest way to do that is to render those mandatory parameters as hidden fields using a single line of code:

```cs
@Html.Partial("RenderFormParameters", new RenderFormParametersModel(Model.ContextId))
```

For example:

```cs
@using Safewhere.IdentityProvider.RuntimeModel
@using Safewhere.IdentityProviderModel
@using System.Web.Mvc.Html
@using Safewhere.External.Samples

@model SampleModel

@section TitleHeader{
    Partner Selection
}
@section InitScript{

}
@section TitleContent{
    Partner Selection
}
@section MainContent{
    <h2>You are acessing a sample application.</h2>
    <form method="post">
        @Safewhere.Web.Mvc.Security.HtmlHelper.AntiForgeryToken()

        <input type="submit" value="OK" tabindex="0" />

        @Html.Partial("RenderFormParameters", new RenderFormParametersModel(Model.ContextId))
    </form>
}
```

And the model class definition is:

```cs
    public class SampleModel
    {
        public string ContextId { get; set; }
    }
```

Remember the ContextId parameter that we recommeded you to add to your model class? This is where it is used.

Notice that there is a call to AntiForgeryToken in the sample. You will need it when your interceptor is used with a connection type whose endpoint is protected by AntiForgeryToken validation such as the Username & Password connection. What if you need to use an interceptor for both connections that supports and doesn't support AntiForgeryToken validation? You can safely put the line to render AntiForgeryToken in the view. The endpoint that doesn't support token validation will just ignore it. As a side note, security-wise all endpoints should have AntiForgeryToken validation turned on, but in practice endpoints such as Saml 2.0's are designed to receive POST requests from external systems.

## Sample code

This sample solution has 3 examples for interceptors:
- [Authentication connection's interceptor](../ExternalSamples/SocialSecurityNumberConfirmationInterceptorService.cs)
- [Protocol connection's interceptor](../ExternalSamples/PartnerSelectionInterceptorService.cs )
- [A walkthrough to implement a new interceptor](interceptor-walkthrough.md)

## Q&A

repository: Safewhere/Safewhere-Identify-samples

gha_language: C#

gha_license_id: MIT

repo_name: Safewhere/Safewhere-Identify-samples


text:
# Day 32: _Project 6: Animation_ (Part One)

_Follow along at https://www.hackingwithswift.com/100/swiftui/32_.

# 📒 Field Notes

This day covers Part One of _`Project 6: Animation`_ in the [100 Days of SwiftUI Challenge](https://www.hackingwithswift.com/100/swiftui/32).

It focuses on several specific topics:

- Animation: Introduction
- Creating implicit animations
- Customizing animations in SwiftUI
- Animating bindings
- Creating explicit animations

## Animation: Introduction

From the description:

> In this technique project we’re going to look at a range of animations and transitions with SwiftUI.

## Creating implicit animations

With the `.animation()` modifier, we can essentially place a "hook" into our composed view that tells SwiftUI to animate any animatable properties of this view declared _above_ the modifier. Pretty handy.

## Customizing animations in SwiftUI

The spirit of an animation lies in its easing function. Fortunately, SwiftUI gives us plenty of tools to craft easing functions in the argument that we pass to `.animation.`

## Animating bindings

SwiftUI animates by drawing a series of views that "interpolate" between the animation start and end state within a specified duration.

Naturally, this built-in view drawing is a perfect match for reactive view bindings.

# 📸 Screenshots

# 🔗 Additional Related Links

- One of My Favorite Books: _[The Animator's Survival Kit](http://www.theanimatorssurvivalkit.com/)_
- [Playing with SwiftUI Buttons](https://alejandromp.com/blog/2019/06/09/playing-with-swiftui-buttons/)

license: Unlicense

gha_license_id: Unlicense


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.1]

### Added
- Ability to specify timeouts for readiness and livenss probes

## [3.1.0]

### Added
- Ability to provide external Secret with credentials

## [3.0.1]

### Changed
- Fixed incorrect podAnnotations indentation

## [3.0.0]

### Added
- Support for Kubernetes 1.22
- New value `ingress.pathType` to control how the ingress path should be interpreted by the underlying load balancer.
- New value `ingress.ingressClassName` that replaces the old ingress annotation used to select the ingressClass.

### Removed
- Support for Kubernetes versions prior to 1.19

### Changed
- Helm api version
## [2.2.1]

### Fixed
- Can now pass in empty `auth.actions` without pypiserver erroring

## [2.2.0]

### Changed

- Allowed configuration of user and group
- Allowed mountPropagation field configuration for a PV

## [2.1.0]

### Changed

- Changed apiVersion of Deployment from extensions/v1beta1 to apps/v1 (not considered a breaking change as it's availble since v1.9)
- Changed apiVersion of Ingress from extensions/v1beta1 to networking.k8s.io/v1beta1 (not considered a breaking change as it's availble since v1.14)
- Fixing continuous integration

## [2.0.0]

### Breaking Changes

- `podLabels` replaces `deployment.labels`

### Added

- Added `podAnnotations` and `podLabels` to deployment template
- Added `apiVersion` to `Chart.yaml`

### Changed

- Bumped application version to `1.3.2`
- Changed comment in `values.yaml`

## [1.1.0]

### Added

- Ability to add labels to deployments/pods:
  The deployment.labels map is applied to the deployment and the pods

- Ability supply additional command line arguments to pypiserver:
  The pypiserver.extraArgs list is added to the pypiserver startup command

### Changed

- Default appVersion (version of pypiserver) is now 1.3.0

### Removed

## [1.0.1]

### Added

- Bug fix: Setting fsGroup to 1000 in case of enabled persistence
  (due to possibly missing write permissions as volumes are mounted as root owned folder by docker)

### Changed

### Removed

repository: owkin/charts

gha_language: Mustache

repo_name: owkin/charts


text:
---
title: Installation
description: Documentation for the Stripe Checkout payment provider for Vendr, the eCommerce solution for Umbraco v8+
---

There are currently two ways to install the Stripe payment provider for Vendr into your solution. Using the Umbraco package distribution, installed via the Umbraco back-office, or using our NuGet packages, installed directly into your projects code base via the NuGet Package Manager. Where possible, it is our recommendation to use the NuGet packages as these allow a great level of ease/control when upgrading later on.

## Umbraco Package Installation

To install the Stripe payment provider Umbraco package, you will need to download the package file manually from the Vendr package page on the [Umbraco Developer Portal](https://our.umbraco.com/packages/website-utilities/vendr/). On this page, scroll down to the **Package Files** section and locate the Stripe payment provider package, clicking it to initiate a download.

![Umbraco package files list](/media/screenshots/package-files-list.png)

Once downloaded you should manually install the package by uploading it to the **local package installer** located in your back-office **Packages > Install Local** section. Once uploaded, follow the on-screen instructions provided to complete the install.

![Installing an Umbraco Package via Local Umbraco Package](/media/screenshots/umbraco_local_package_install.png)

## NuGet Package Installation

To install the Stripe payment provider via NuGet you can run the following command directly in the NuGet Manager Console window:

```bash
PM> Install-Package Vendr.PaymentProviders.Stripe
```

Alternatively, you can also find and install the NuGet package via the NuGet Package Manager GUI.

![Installing Vendr via the NuGet Package Manager GUI](/media/screenshots/nuget_package_manager_gui.png)

## Upgrading

<message-box type="warn" heading="Before you upgrade">

Before upgrading, it is always advisable to take a complete backup of your site/database. Every effort has been made to ensure that Vendr will upgrade gracefully, but there is always a risk that something may not install as expected.

</message-box>

Vendr uses Umbraco Migrations to install all of it's features meaning upgrades follow the exact same process as the installation processes detailed above, installing the latest version of a package over the top of the existing package installation. Vendr is then clever enough to detect the current state of your site and only install the features that are missing.

repository: vendrhub/vendr-documentation

gha_language: Batchfile

repo_name: vendrhub/vendr-documentation


text:
---
# layout: note_tutorial
title: Code tutorial
catalog: true
tags:
  - Api_docs
  - conceptual_topics
permalink: api_conceptual_topics_code_tutorial.html
folder: api_docs
summary: How to document with authentication
# sidebar: api_sidebar
# topnav: topnav
---

This part gleaned tips around articulating conceptual topics for an API product out of [Tom's API documentation tutorial](https://idratherbewriting.com/learnapidoc/docapis_codesamples_bestpractices.html).

## Focus on the why, not the what

> Explain why you're doing, what you're doing, not the detailed play-by-play of what's going on, especially when the *what* refers more to standard programming mechanics that aren't unique to your API.
> -    **what**: In this code, several arguments are passed to jQuery's `ajax` method. The response is assigned to the data argument of the callback function, which in this case is success.
> -    **why**: Use the `ajax` method from jQuery because it allows for asynchronous responses that won't block the loading of your page.


text:
# ion-tabs

Tabs are a top level navigation component to implement a tab-based navigation.
The component is a container of individual [Tab](../tab/) components.

`ion-tabs` is a styleless component that works as a router outlet in order to handle navigation.
This component does not provide any UI feedback or mechanism to switch between tabs.
In order to do so, an `ion-tab-bar` should be provided as a direct child of `ion-tabs`:

```html
<ion-tabs>
  <ion-tab tab="home">Home Content</ion-tab>
  <ion-tab tab="settings">Settings Content</ion-tab>

  <ion-tab-bar slot="bottom">

    <ion-tab-button tab="home">
      <ion-label>Home</ion-label>
      <ion-icon name="home"></ion-icon>
      <ion-badge>6</ion-badge>
    </ion-tab-button>

    <ion-tab-button tab="settings">
      <ion-label>Settings</ion-label>
      <ion-icon name="settings"></ion-icon>
    </ion-tab-button>

  </ion-tab-bar>
</ion-tabs>
```

Note that both `ion-tabs` and `ion-tab-bar` can be used as standalone elements. They don’t depend on each other to work, but they are usually used together in order to implement a tab-based navigation that feels like a native app.

`ion-tab-bar` always needs `slot="bottom"` in order to be projected into `ion-tabs` at the right place.

## The "tab" property

Each `ion-tab-button` will activate one of the tabs when tapped.
In order to link the button to the `ion-tab` container, a matching `tab` property must be used.

```html
<ion-tab tab="settings">
[...]
<ion-tab-button tab="settings">
```

This `ion-tab-button` and `ion-tab` are now linked by the common `tab` property.

The `tab` property identifies each tab, and it has to be unique within the scope of the same `ion-tabs`. It's important to set the same property to `ion-tab` and `ion-tab-button`, even if you are only using one. e.g. You could use the `ion-tab-bar` without using `ion-tabs`. In this case you should still give each `ion-tab` the property of `tab="something"`.

### Router integration

When the ionic's router (`ion-router`) is used, the `tab` property matches the "component" of `ion-route`:

The following route within the scope of a `ion-tabs` outlet:

```html
<ion-route url="/settings-page" component="settings"></ion-route>
```

Would match the following tab:

```html
<ion-tab tab="settings" component="settings-component"></ion-tab>
```

### Angular Router integration

Using tabs with Angular's router is fairly straight forward. Here you only need to define tab which is the reference to the route.

```html

<ion-tabs>
  <ion-tab-bar slot="bottom">
    <ion-tab-button tab="schedule">
      <ion-icon name="calendar"></ion-icon>
      <ion-label>Schedule</ion-label>
    </ion-tab-button>
  </ion-tab-bar>
</ion-tabs>
```

repository: scrpgil/ionic-docs

repo_name: scrpgil/ionic-docs


text:
---
name: Mick Chapuk
title: Instructor
collection: faculty
role: adjunct
order: 6
date: "2019-05-08"
slug: "/faculty/mick-chapuk"
thumbnail: ./faculty_mick.jpg
---

Joseph M. Chapuk is an artist/curator/facilitator/journeyman. He has exhibited his paintings, mixed media work, and installations in New York, Los Angeles, and Philadelphia, as well as the Lehigh Valley. His work is concerned with the interaction of the self in the socio-political milieu of the 21st century. Charles Biasiny-Rivera, director of En Foco in New York, has described Chapuk’s work as “Angry and raw – successfully in your face a work of witness.” Chapuk has an MFA from California State University, Los Angeles; a BFA from Otis Art Institute; and a BA in English from Colby College.

In 2006, he developed the concept for “Some Serious Business – Art of the Valley,” which converted 25,000 sq. ft. of Bethlehem steel property into a one-time only venue for installations by art faculty from colleges and universities in the Lehigh Valley. In 2007 he was the curator for “ACE at the Allentown Museum.” He was the director/curator/facilitator for ARTspace@NCC, an ad hoc gallery at Northampton Community College’s Fowler Family Southside Center from 2006 – 2007. He currently teaches Painting, Drawing, Art History, and Art and Visual Thinking at NCC.

Office Phone: 610-332-8650
Email: <a href="mailto:jchapuk<EMAIL_ADDRESS>

repository: mkober/nccart

repo_name: mkober/nccart


text:
---
title: "Interval scale"
date: 2022-10-03
tags:
- seed
- PHIL321A
---

Any interval scale can be linearly transformed (ordinal transformation) between each other and not be affected

Assign to each outcome $x$ a value $v(x)$ such that $v(x) \geq v(y) \iff x \geq y$ and $v(x) = v(y) \iff x \sim y$

## von Neumann-Morgenstern Theorem (vNM)

We need interval scales for most of the rules for [[thoughts/Decisions under ignorance|DUI]], and we need them for [[thoughts/Decisions under risk|DUR]]. vNM tells us how to construct an interval utility scale.

We find your utility for $x$ by measuring the risks that you are willing to take to get $x$. vNM shows that your utility for a lottery is equal to its expected utility.

> If your preferences have enough structure (i.e., if they satisfy the vNM conditions), then they can be represented by a utility function u (unique up to positive linear transformation) which has the expected utility property.

### Lotteries
- We have a set of basic prizes/outcomes
- We can compose lotteries (if $L_1$ and $L_2$ are lotteries, then so is $[pL_1, (1-p)L_2]$)
	- This creates compound lotteries

![[thoughts/images/vNM.png]]

Peterson argues that vNM is ok for descriptive [[thoughts/Decision theory|decision theory]] but not normative decision theory (vNM does not distinguish the meaning of utility from the measurement of utility)

Normative decision theory involves prescribing actions which needs a strong version of EU max: acts are rational because they maximize expected utility. This demands a concept of utility that is independent from the measurement of utility itself (or we get a circular argument)

### Axioms
1. vNM 1, Completeness: $A \succ B$ or $A \sim B$ or $B \succ A$
2. vNM 2, Transitivity: if $A \succ B$ and $B \succ C$ then $A \succ C$
3. vNM 3, Independence: $A \succ B$ if and only if $ApC \succ BpC$
4. vNM 4, Continuity: if $A \succ B \succ C$ there $\exists p, q$ such that $ApC \succ B \succ AqC$
5. vNM 5, Probability: it does not matter if you are awarded prize A if you first roll a die and then roll it again, or make a double roll, provided that you only get the prize if you get two sixes
	1. If $pq + (1-p)r = s$ then $(AqB)p(ArB) \sim AsB$

path: /content/thoughts/interval scale.md

branch_name: refs/heads/hugo

filename: interval scale.md

gha_language: SCSS


text:
### [CVE-2016-8739](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8739)
![](https://img.shields.io/static/v1?label=Product&message=Apache%20CXF&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=XXE%20risk&color=brighgreen)

### Description

The JAX-RS module in Apache CXF prior to 3.0.12 and 3.1.x prior to 3.1.9 provides a number of Atom JAX-RS MessageBodyReaders. These readers use Apache Abdera Parser which expands XML entities by default which represents a major XXE risk.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/0ang3el/Unsafe-JAX-RS-Burp
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
asyncinflux
============

[![Travis Build Status](https://api.travis-ci.org/lateefj/asyncinflux.png?branch=master)](https://travis-ci.org/lateefj/asyncinflux)

Async InfluxDB writer Python library.
-------------------------------------

This is just a little hack for writing async to an influx database. IT REQUIRES gevent.

```sh
pip install gevent asyncinflux --upgrade
```

repository: lateefj/asyncinflux

repo_name: lateefj/asyncinflux


text:
# csv_dbs_examples
It is CSV "DBs" examples.
Purpose is to have convenient set of CSV files for testing CSV imports and joins in other systems, like `csvsql` or Base,Kexi import, etc. Also to provide "hello world" examples from few systems for convenient overview.

# Installation of dependencies

## csvsql, csvlook
http://csvkit.readthedocs.io/en/0.9.1/install.html

	pip install csvkit

## ODS - LibreOffice Base

* More about [LibreOffice Base](https://en.wikipedia.org/wiki/LibreOffice)
* File assumes you linked csv inputs under : `/tmp/csv_dbs_examples/csv_inputs`

# Inputs

	$ csvlook csv_inputs/CDs.csv

| CDTitle  | ArtistID | LocID |
| -------- | -------- | ----- |
| CDTitle1 | A1       | L1    |
| CDTitle2 | A1       | L2    |
| CDTitle3 | A2       | L1    |
| CDTitle4 | A2       | L2    |

	$ csvlook csv_inputs/Artists.csv

| ArtistID | Artist  |
| -------- | ------- |
| A1       | Artist1 |
| A2       | Artist2 |

	$ csvlook csv_inputs/Locations.csv

| LocID | Location  |
| ----- | --------- |
| L1    | Location1 |
| L2    | Location2 |

# Notes

## csvsql

	$ csvsql --query 'SELECT CDTitle,Location,Artist FROM CDs JOIN Artists ON CDs.ArtistID=Artists.ArtistID JOIN Locations ON CDs.LocID = Locations.LocID' "$@"

Produces:

| CDTitle  | Location  | Artist  |
| -------- | --------- | ------- |
| CDTitle1 | Location1 | Artist1 |
| CDTitle2 | Location2 | Artist1 |
| CDTitle3 | Location1 | Artist2 |
| CDTitle4 | Location2 | Artist2 |

# Screenshots

## LibreOffice Base - imported csv files

![LibreOffice Base - Database Wizard - Step 1](screenshots/LibreOffice_Base_DB_Wizard_Step1_Screenshot_20170514.png)

![LibreOffice Base - Database Wizard - Step 2](screenshots/LibreOffice_Base_DB_Wizard_Step2_Screenshot_20170514.png)

![LibreOffice Base Tables Example](screenshots/LibreOffice_Base_Tables_Screenshot_20170514.png)

![LibreOffice Base Form Example](screenshots/LibreOffice_Base_Form_Example_of_Locations_to_CDs_to_Artists_Resolution_Screenshot_20170514.png)


text:
---
layout: documentation
title: Query Cache Behavior
---

# Query Cache Behavior #

The `query_cache` behavior gives a speed boost to Propel queries by caching the transformation of a PHP Query object into reusable SQL code.

## Basic Usage ##

In the `schema.xml`, use the `<behavior>` tag to add the `query_cache` behavior to a table:

```xml
<table name="book">
  <column name="id" required="true" primaryKey="true" autoIncrement="true" type="integer" />
  <column name="title" type="varchar" required="true" primaryString="true" />
  <behavior name="query_cache" />
</table>
```

After you rebuild your model, all the queries on this object can now be cached. To trigger the query cache on a particular query, just give it a query key using the `setQueryKey()` method. The key is a unique identifier that you can choose, later used for cache lookups:

```php
<?php
$title = 'War And Peace';
$books = BookQuery::create()
  ->setQueryKey('search book by title')
  ->filterByTitle($title)
  ->findOne();
```

The first time Propel executes the termination method, it computes the SQL translation of the Query object and stores it into a cache backend (APC by default). Next time you run the same query, it executes faster, even with different parameters:

```php
<?php
$title = 'Anna Karenina';
$books = BookQuery::create()
  ->setQueryKey('search book by title')
  ->filterByTitle($title)
  ->findOne();
```

>**Tip**The more complex the query, the greater the boost you get from the query cache behavior.

## Parameters ##

You can change the cache backend and the cache lifetime (in seconds) by setting the `backend` and `lifetime` parameters:

```xml
<table name="book">
  <column name="id" required="true" primaryKey="true" autoIncrement="true" type="integer" />
  <column name="title" type="varchar" required="true" primaryString="true" />
  <behavior name="query_cache">
    <parameter name="backend" value="custom" />
    <parameter name="lifetime" value="600" />
  </behavior>
</table>
```

To implement a custom cache backend, just override the generated `cacheContains()`, `cacheFetch()` and `cacheStore()` methods in the Query object. For instance, to implement query cache using Zend_Cache and memcached, try the following:

```php
<?php
class BookQuery extends BaseBookQuery
{
  public function cacheContains($key)
  {
    return $this->getCacheBackend()->test($key);
  }

  public function cacheFetch($key)
  {
    return $this->getCacheBackend()->load($key);
  }

  public function cacheStore($key, $value)
  {
    return $this->getCacheBackend()->save($key, $value);
  }

  protected function getCacheBackend()
  {
    if (self::$cacheBackend === null) {
      $frontendOptions = array(
         'lifetime' => 7200,
         'automatic_serialization' => true
      );
      $backendOptions = array(
        'servers' => array(
          array(
            'host' => 'localhost',
            'port' => 11211,
            'persistent' => true
          )
        )
      );
      self::$cacheBackend = Zend_Cache::factory('Core', 'Memcached', $frontendOptions, $backendOptions);
    }

    return self::$cacheBackend;
  }
}
```

extension: markdown


text:
# Narya Streamlit Viewer

This is a simple Streamlit interface to apply the [Narya](https://github.com/DonsetPG/narya) API to an image to generate tracking data from soccer broadcast footage. Results are visualized with [mplsoccer](https://github.com/andrewRowlinson/mplsoccer) package.

# Demo

![](demo.gif?raw=true)

repository: larsmaurath/narya-streamlit-viewer

repo_name: larsmaurath/narya-streamlit-viewer


text:
Introduction to Computer Music
==================

![Intro to Computer Music title image](media/intro-computermusic.png)

A seminar introduction to computer music with examples in Pure Data first given in May 2014 - [the slides are up on Academia](https://www.academia.edu/7218890/Introduction_to_Computer_Music_with_Pd).

The idea of this talk is tell composers and musicians all about why computer music is super awesome and that they should all try out Pure Data (Pd).

I've included my [lecture slides](intro-presentation.md) and a set of 12 "first steps" Pd patches to experiment with.

In the lecture, these patches are live-coded on stage, hopefully I'll get a screen cast up at some point.

Have fun! Make some sounds!

repository: cpmpercussion/ComputerMusicIntro

repo_name: cpmpercussion/ComputerMusicIntro


text:
---
layout: post
title: Fanbatis 0.4 is here!
permalink: /fanbatis-0-4-is-here
---

Introducing Fanbatis 0.4
========================

The biggest change is on Sqlmaps which have been enhanced to make the
DSLs do more work.

This was the old way to query

    class BlogSqlMap : SqlMap{
      @Select
      Blog getBlogBySubject(Str subject){
        one(sql<|
            select * from blog where subject = #{subject}
        |>)
      }
    }

Here’s the new and sexy way

    class BlogSql {
      Blog getBlogBySubject(Str subject){
        S<|
           select * from blog where subject = #{subject}
        |>
      }
    }

-   There is no need to extend SqlMap
-   There is no need to mark your methods `Select (or `Insert,
    `Update or `Delete)
-   Methods can be static or not
-   There is no need to call methods like one(), list(), insert(),
    delete()

If you want you can embed sqlmaps directly in the domain object, for
eg.,

    class Blog{
      ...
      static Blog findById(Int id){S<|
          select * from blog where id = #{id}
      |>}
    }

and call it like

    Blog.findById(1)

Note: This however might or might not be a good idea. If for example you
are using fanquery and Fantom on client, this might not be really good
idea since these methods doesn’t make much sense in Javascript.

The Filter class has been removed and you and write any custom where
clause directly in the Db.one or Db.list methods. eg

    Blog[] blogs := Db.list(Blog#, "subject = #{param.subject}", ["subject", "My Blog"])

Apart from these big changes, there are few performance improvements and
some bug fixes.

[Read Fanbatis docs](http://www.talesframework.org/fanbatis/)


text:
---
title: "Texture Mapping"
date: 2023-03-28
tags:
- seed
---

Hides geometric simplicity by using images convey illusion of geometry. Usually maps points on a 3D surface to a 2D point on a [[thoughts/texture|texture]] to modify some property of the 3D surface (e.g. displacement, colour, reflectance, etc.)

## Mipmapping
Similar to [[thoughts/object detection#Gaussian Image Pyramid|Gaussian Image Pyramids]]

Mipmaps (also MIP maps) or pyramids are pre-calculated, optimized sequences of images, each of which is a progressively lower resolution representation of the previous.

(fun fact: MIP stands for *multum in parvo* -- many things in a small place)

They are intended to increase rendering speed and reduce aliasing artifacts. A high-resolution mipmap image is used for high-density samples, such as for objects close to the camera; lower-resolution images are used as the object appears farther away.

Interpolation within a MIPMAP level is done either by using the nearest texel or interpolating between neighbouring texels. Interpolation between MIPMAP levels can be done by doing linear interpolation of the values of the location at the two levels.

### Figuring out which MIPMAP level to use
On a pixel, we calculate the area that it takes up on the texture (the pixel footprint area). By projecting the boundaries of the pixel onto the texture, the area of the pixel footprint area can be computed using the magnitude of the cross product $A = \lVert r_1 \times r_2 \rVert$

See notes on [[thoughts/imaging#Sampling|sampling]]

path: /content/thoughts/texture mapping.md

filename: texture mapping.md


text:
# pathio
--
    import "github.com/Clever/pathio"

Package pathio is a package that allows writing to and reading from different
types of paths transparently. It supports two types of paths:

    1. Local file paths
    2. S3 File Paths (s3://bucket/key)

Note that using s3 paths requires setting two environment variables

    1. AWS_SECRET_ACCESS_KEY
    2. AWS_ACCESS_KEY_ID

## Usage

```go
var DefaultClient = &Client{}
```
DefaultClient is the default pathio client called by the Reader, Writer, and
WriteReader methods. It has S3 encryption enabled.

#### func  Reader

```go
func Reader(path string) (rc io.ReadCloser, err error)
```
Reader Calls DefaultClient's Reader method.

#### func  Write

```go
func Write(path string, input []byte) error
```
Write Calls DefaultClient's Write method.

#### func  WriteReader

```go
func WriteReader(path string, input io.ReadSeeker) error
```
WriteReader Calls DefaultClient's WriteReader method.

#### type Client

```go
type Client struct {
}
```

Client is the pathio client used to access the local file system and S3. It
includes an option to disable S3 encryption. To disable S3 encryption, create a
new Client and call it directly: `&Client{disableS3Encryption: true}.Write(...)`

#### func (*Client) Reader

```go
func (c *Client) Reader(path string) (rc io.ReadCloser, err error)
```
Reader returns an io.Reader for the specified path. The path can either be a
local file path or an S3 path. It is the caller's responsibility to close rc.

#### func (*Client) Write

```go
func (c *Client) Write(path string, input []byte) error
```
Write writes a byte array to the specified path. The path can be either a local
file path or an S3 path.

#### func (*Client) WriteReader

```go
func (c *Client) WriteReader(path string, input io.ReadSeeker) error
```
WriteReader writes all the data read from the specified io.Reader to the output
path. The path can either a local file path or an S3 path.


text:
## TAG Teleconference
##### 10 October 2019

Present: Lukasz, Peter, Hadley, David, Yves, Alice

Regrets: Kenneth, Dan, Tess

Scribe: David

---

Agenda:

* [Modal window](https://github.com/w3ctag/design-reviews/issues/427) - @hober, @cynthia, @alice
* [Service Worker Scope Pattern Matching explainer](https://github.com/w3ctag/design-reviews/issues/417) - @cynthia, @torgo, @kenchris
* [WebSocketStream](https://github.com/w3ctag/design-reviews/issues/394) - @dbaron, @kenchris
* [hrefTranslate attribute](https://github.com/w3ctag/design-reviews/issues/301) - @dbaron, @torgo, @hadleybeeman

---

### [WebSocketStream](https://github.com/w3ctag/design-reviews/issues/394)

David: looked at issue, not sure whether it's worth more now or waiting (per Adam's comment)

Hadley: How are they doing an origin trial if there's no draft spec?

(some discussion of origin trials and continued changes to specs)

Peter: could close and ask to reopen when they have more

David: or alternatively maybe I should look a little more now... 2 weeks?

### [hrefTranslate attribute](https://github.com/w3ctag/design-reviews/issues/301)

Hadley: discussed recently?

(looks like we discussed it 4 weeks ago)

Hadley: (reads chrishtr's [last comment](https://github.com/w3ctag/design-reviews/issues/301#issuecomment-537765252))  Still seems like it's changing relationships: putting the referring site in the position of being the user agent.  I feel like we keep going in circles on this.

Hadley: Also 4 comments up... misses that what we meant by "one browser" is that the only browser team involved is Google.

Hadley: Fundamentally I think this is from the ethical principles -- just not the way we think things work.

Alice: curious what you thought of chrishtr's answers to the second quoted question in [this comment](https://github.com/w3ctag/design-reviews/issues/301#issuecomment-537741688)

Hadley: As someone who cares about Privacy, it frightens me that we would transfer responsibility for knowing my preferences to the website.  He says relying on the UA only is too limiting to know what preferences are, works against openness, decentralization, and choice.  It doesn't in the way I think about those terms.  I feel like his last sentence about "smart sites" is useful but very different from offering suggestions to the next site.

Hadley: I'm stuck -- we already closed this "unsatisfied"; that's what I keep coming back to.  I think we're fundamentally on different pages here about how the web works.

Peter: I'm also consider the explanier suggests it would influence the `Accept-Language` HTTP header... which it really shouldn't be doing.

Hadley: Have we written that down?

Peter: Not sure.

Hadley: We had in our feedback a year ago, from Paris... we talked about `Accept-Language` from the UA as an alternative.  So I don't think it was in the explainer then.

Peter: I agree it's the wrong design; I don't see anything convincing me otherwise.

Alice: how convinced are you about the use cases they've explained?

Hadley: not convinced because the way I'm reading the use cases, they're use cases about developer of one website wanting more control about what happens on another website.

Peter: Only thoughts are either (a) close again or (b) invite Dave to a call to try to explain to us what we're missing?

Hadley: I'm up for that.

Alice: I could...

Hadley: Did we have a call with him before?

David: I think so.

Peter: I'm happy to if we think it would make progress.  Make the offer... leave it up to him?

Hadley: I don't remember chrishtr being in the discussion then -- maybe a conversation with both would be useful?

Alice: I'm happy to ask if they could join us.

### [Modal window](https://github.com/w3ctag/design-reviews/issues/427)

Peter: Alice, Anything we should talk about here?

Lukasz: Security questionnaire looks very interesting.  I think it's not finished yet.  Look at the answer to parts 2, for example.  Still .5 -- in progress.  Not sure what long term implication of introducing this new context.

Alice: I see that Marcos had commented that he intended to have a look and needed a few days.  Over to WICG discourse... I guess involved in that?

Alice: ? and Sangwhan also wanted to have a look... bump this for next week, and capture Lukasz's comments?

Alice: Comment if they want to finish filling out the security questionnaire?

Alice: ... I can do that if Lukasz isn't.  Lukasz, did you want to comment about the security and privacy questionnaire, or shall I?

Lukasz: I can comment!!

Peter: Bump this to next week, when hopefully rest of the folks are here.

### Call time

We're continuing with this call time, although next week it will be 1 hour earlier for Americans since they end summer time this weekend.

branch_name: refs/heads/gh-pages


text:
# UPDATE

Upgraded to work over Moltin v2 and is now using the latest [js-sdk](https://github.com/moltin/js-sdk)

# Adventure Works catalog for Moltin

A set of scripts to setup the [Adventure Works](https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks) product catalog in your [Moltin](https://moltin.com/) store.

## Motivation

I was building a conversational eCommerce chatbot for [my talk at API Strat](http://boston2016.apistrat.com/speakers/pavel-veller) and I needed a robust but easy to use API-first commerce platform with a decent free plan. This is how I discovered [Moltin](https://moltin.com/).

The next thing I needed was a sample store that would have categories and products with images and variants (like `color` and `size`). I also needed historical orders to build a recommendation model with [Cognitive Services Recommendations API](https://www.microsoft.com/cognitive-services/en-us/recommendations-api). This is how I discovered [Adventure Works](https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks).

## Usage

To create your Adventure Works catalog in Moltin you'll need [node.js](https://nodejs.org/en/) (go for the latest 8.x as I am using ES6/7 straight up with no build step). Then:

* Sign up for Moltin and create a new store. Go to the store settings to get your API keys.

* Set up two environment variables

```
export MOLTIN_CLIENT_ID="<Client ID>"
export MOLTIN_CLIENT_SECRET="<Client Secret>"
```

* Download Adventure Works OLTP Script from [here](https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorks-oltp-install-script.zip) and unzip (for example to `~/Downloads/Adventure Works 2014 OLTP Script`)

* Clone this repository

```
git clone git@github.com:pveller/adventureworks-moltin.git
```

* Install [ImageMagick](http://www.imagemagick.org/) and [GraphicsMagic](http://www.graphicsmagick.org/). I am using [gm](https://www.npmjs.com/package/gm) to pre-process images and it needs these two. On Mac, it is as simple as:

```
brew install imagemagick
brew install graphicsmagick
```

* Install packages

```
npm install
```

* Run `app.js` and supply the path to your Adventure Works files as a command line argument

```
node app.js "/Users/<yourself>/Downloads/Adventure Works 2014 OLTP Script"
```

If you haven't set up your Moltin store's credentials as global environment variables, you can run `app.js` like this:

```
$ MOLTIN_CLIENT_ID="<Client ID>" MOLTIN_CLIENT_SECRET="<Client Secret>" node app.js "<path to catalog>"
```

If you are re-running the script, you can selectively skip certain steps or require that a script first cleans up your store:

```
node app.js "path" --clean=<entity> --clean=<another entity> --skip=<step> --skip=<another step>
```

You can clean: `products`, `categories`, `variants`, and `files` (images). To request that multiple entities be cleaned please use `--clean=<entity>` for each entity.

You can skip: `convert-images`, `preprocess-csv`, `categories`, and `products`. The first two you really only need to run once over the freshly downloaded Adventure Works catalog data. The `products` step uploads missing images, creates missing variations, and creates products and variants.

Moltin API is rate-limited so the script does everything sequentially. It will run for about ten to twenty minutes and you should see something like this in your console:

```
Read 4 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductCategory.csv file
Read 37 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductSubcategory.csv file
Read 128 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductModel.2.csv file
Read 762 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductModelProductDescriptionCulture.csv file
Read 504 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductProductPhoto.csv file
Read 504 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/Product.csv file
Read 762 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductDescription.2.csv file
Read 31465 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/SalesOrderHeader.csv file
Read 101 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/ProductPhoto.csv file
Read 121317 objects from /Users/pavel_veller/Downloads/Adventure Works 2014 OLTP Script/SalesOrderDetail.csv file
Organizing categories into a hierarchy
Assigning images and categories to variants
Assigning description, variants, and modifiers to products
Organizing orders into a hierarchy
Attaching SKUs to orders
Catalog cleanup: removing Products
...
Importing products
Creating product [Classic Vest]
Assigning product [Classic Vest] to category [Vests]
Assiging applicable variations to Classic Vest
Assigning image no_image_available_large.png to 53da5576-d7d4-4970-9a0a-d27cd8585b09
Creating a product variant Classic Vest, S - VE-C304-S
Assigning image no_image_available_large.png to adcfd934-2a8e-4bec-b4cd-1b971b5e8b75
Creating a product variant Classic Vest, M - VE-C304-M
Assigning image no_image_available_large.png to e99d7450-eb43-488f-882a-1e9bfd5070b2
Creating a product variant Classic Vest, L - VE-C304-L
Assigning image no_image_available_large.png to acc9974a-2e96-4669-a821-5bdd4efb3256
...
Products import complete
New moltin catalog is ready to go
```

## License

MIT

repository: pveller/adventureworks-moltin

repo_name: pveller/adventureworks-moltin


text:
# Cat Theme

A slight blog theme, inspired by [Mirror](https://github.com/LoeiFy/Mirror).

The reason I call this theme as `Cat` is hoping that it can expand to all blog engines with its flexibility.

[DEMO IS HERE](https://kilerd.github.io/Cat/)

## Motivation

As there is no theme which meet my needs, and then I create it.

## Support

- wordpress
- typecho
- html source
- [hugo](https://github.com/hoofs/Cat) supported from [hoofs](https://github.com/hoofs)

## Usage

- html source

  - download html source `/html`

  - change html content, all what you need to change are at between `<!--` and `-->` or between `<!-- xxx begin-->` and `<!-- xxx end-->`

- typecho

  - download folder `/typecho/cat` to your computer
  - move  folder `cat` to the template folder of your blog.
  - turn it on at your blog management dashbroad.
  - set parameters

- wordpress

  - download folder `/wordpress/cat` to your computer
  - move  folder `cat` to the template folder of wordpress.
  - turn it on at your blog management dashbroad.
  - set parameters

- hugo
  - please see [hoofs/Cat](https://github.com/hoofs/Cat) for detail.

## API Refrences

- `Avatar URL`

  The URL of your avatar showing on the header of theme.

- `Analytics Code`

  Analytics Code which is showing on the footer.

## Contributors

- [hoofs](https://github.com/hoofs)

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/Kilerd/Cat/blob/master/LICENSE) file for details

## Acknowledgments

- [Mirror](https://github.com/LoeiFy/Mirror)
- [yue.css](https://github.com/lepture/yue.css)
- [typo.css](https://github.com/sofish/typo.css)

repository: awesome-archive/Cat

repo_name: awesome-archive/Cat


text:
# PNG Corruption

## Introduction

This is a tool, that can corrupt PNG Images and therefore create Interesting Visual Artifacts.
Focused on IDAT Chunk.

## Prerequisites

- CMake
- Clang

## Installation

1. `cd bin`
2. `cmake ..`
3. `make`
4. Run the newly created binary (in case you don't use an image, the default image will be used)
`./png-corruption`
`./png-corruption -f my-image.png -o out.png --info --increment 1`

## License

[MIT License](../LICENSE)

repository: youngtrashbag/PNG-research

repo_name: youngtrashbag/PNG-research


text:
+++
Tags = ["react", "testing", "mocha", "chai", "enzyme", "talks"]
date = "2016-06-24T10:22:10+01:00"
title = "Unit Testing React Applications with Mocha, Chai and Enzyme Talk"
+++

In April 2016, I gave a talk at [Red Badger](https://red-badger.com/)'s [React London User Group](http://www.meetup.com/London-React-User-Group/) meetup in London, on the topic of "Unit Testing React Applications with Mocha, Chai and Enzyme".

The talk introduces the fundamentals of testing a React application with AirBnB's excellent [Enzyme](https://github.com/airbnb/enzyme) library, and explains my approach to both unit and integration testing apps using the combination of [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) and [Enzyme](https://github.com/airbnb/enzyme).

Both the [code samples](http://bit.ly/ReactTestingCode), and the [slides](http://bit.ly/ReactTestingPresentation) are available on GitHub.

You can watch the talk on [YouTube](http://bit.ly/ReactTestingTalk) or below:

{{< youtube kkqArkYV4fw >}}

repository: tomduncalf/blog

repo_name: tomduncalf/blog


text:
# File Content Linter
File content linter is a utility, aimed for Continuous Integration, for validating that important information does not appear in text files in a given directory.

Our main usage of it is to make sure code we publish to Open Source does not include internal stuff, like credentails or server names.

## Highlights
* Command line interface
* Built with Perl
* TeamCity support using script interaction

## Getting started

### Prerequisite
Perl is required in order to run File Content Linter.

Follow installation instructions [here](https://www.perl.org/) to install it.
### Usage

perl find-in-files.pl --path="<PATH TO TARGET DIRECTORY&gt"; --term="<REGEX TO SEARCH FOR>" [--exclude="<REGEX TO EXCLUDE FILES>"] [--output="<LOCAL|TEAMCITY>"]

##### path (required)
Path to the directory to scan

##### term (required)
Regex describing what to look for

##### exclude (optional)
Regex describing what to look for

##### output (optional)
Output type for matches.

__LOCAL__ (default): for local machine run. Output will be FILENAME:LINENUMBER:MATCH:LINE

__TEAMCITY__: for output that allows integration with TeamCity
### Example

perl ./find-in-files.pl --path="~/dev/myproject/" --term="password" --exclude="\.crt$" --output="TEAMCITY"

This command will scan all the files under ~/dev/myproject/ except files with __crt__ extension for the word __password__, each match will create an output that TeamCity will recognize as failed test.

## Development

### How to contribute
We encorage contribution via pull requests on any feature you see fit.

When submitting a pull request make sure to do the following:
* Check that new and updated code follows OhioBox existing code formatting and naming standard
* Run all unit and integration tests to ensure no existing functionality has been affected
* Write unit or integration tests to test your changes. All features and fixed bugs must have tests to verify they work
Read [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more details about creating pull requests


text:
+++
# Experience widget.
widget = "experience"  # See https://sourcethemes.com/academic/docs/page-builder/
headless = true  # This file represents a page section.
active = true  # Activate this widget? true/false
weight = 40  # Order that this section will appear.

title = "Experience"
subtitle = ""

# Date format for experience
#   Refer to https://sourcethemes.com/academic/docs/customization/#date-format
date_format = "Jan 2006"

# Experiences.
#   Add/remove as many `[[experience]]` blocks below as you like.
#   Required fields are `title`, `company`, and `date_start`.
#   Leave `date_end` empty if it's your current employer.
#   Begin/end multi-line descriptions with 3 quotes `"""`.
[[experience]]
  title = "Juan de la Cierva - Postdoctoral Research Fellow"
  company = "Universitat Politècnica de Valencia (UPV)"
  company_url = "http://www.upv.es"
  location = "Valencia (Spain)"
  date_start = "2019-09-01"
  date_end = ""
  description = """
  Responsibilities include:

  * Development of systems for the characterization of food stuff
  * Experimental tests
  * Data analysis and collection
  * Writing scientific papers
  """

[[experience]]
  title = "José Castillejo - Visiting Postdoctoral Research Fellow"
  company = "University of California, Davis (UCDavis)"
  company_url = "https://www.ucdavis.edu"
  location = "California (USA)"
  date_start = "2020-02-01"
  date_end = "2020-07-31"
  description = """Exploring new ultrasonic techniques for monitoring mechanical changes at early stages of food digestion"""

 [[experience]]
  title = "Postdoctoral Research Fellow"
  company = "Universitat Politècnica de Valencia (UPV)"
  company_url = "http://www.upv.es"
  location = "Valencia (Spain)"
  date_start = "2018-07-01"
  date_end = "2019-08-31"
  description = """APOSTD fellow by Generalitat Valenciana: Studying correlation between textural and ultrasonic properties in food stuff"""

 [[experience]]
  title = "Data Scientist"
  company = "WooM Fertility"
  company_url = "https://woomfertility.com"
  location = "Madrid (Spain)"
  date_start = "2018-02-01"
  date_end = "2018-06-30"
  description = """Fertility and health habbits data analysis from WooM app users, trying to bring new and useful insights for women looking for getting pregnant"""

 [[experience]]
  title = "Postdoctoral Researcher"
  company = "Spanish National Research Council (ITEFI-CSIC)"
  company_url = "https://www.csic.es"
  location = "Madrid (Spain)"
  date_start = "2017-01-01"
  date_end = "2018-06-30"
  description = """"""

 [[experience]]
  title = "Visiting Postdoctoral Research Fellow"
  company = "Harvard University"
  company_url = "https://www.harvard.edu"
  location = "Cambridge (MA, USA)"
  date_start = "2016-08-01"
  date_end = "2019-01-01"
  description = """"""

 [[experience]]
  title = "Visiting PhD Student"
  company = "The University of Glasgow"
  company_url = "https://www.gla.ac.uk"
  location = "Glasgow (UK)"
  date_start = "2015-08-20"
  date_end = "2016-01-01"
  description = """Short research stay funded by the Spanish Government (EEBB FPI) """

 [[experience]]
  title = "Visiting PhD student"
  company = "Massachusetts Institute of Technology (MIT)"
  company_url = "https://www.mit.edu/"
  location = "Cambridge (MA, USA)"
  date_start = "2014-08-20"
  date_end = "2015-01-01"
  description = """Short research staty tay funded by the Spanish Government (EEBB FPI)"""

 [[experience]]
  title = "Ph.D. student fellow (FPI)"
  company = "Spanish National Research Council (ITEFI-CSIC)"
  company_url = "https://www.csic.es"
  location = "Madrid (Spain)"
  date_start = "2013-02-01"
  date_end = "2017-01-31"
  description = """Ph.D. student fellow: FPI awarded under MINECO competitive call """

 [[experience]]
  title = "Researcher"
  company = "Spanish National Research Council (ITEFI-CSIC)"
  company_url = "https://www.csic.es"
  location = "Madrid (Spain)"
  date_start = "2012-01-17"
  date_end = "2013-01-16"
  description = """Researcher in the project TARGET (“Intelligent and green Technologies for the generation of  structures of composite materials"""

 [[experience]]
  title = "Researcher"
  company = "Universidad Politécnica de Madrid (CTB-UPM)"
  company_url = "http://www.ctb.upm.es"
  location = "Madrid (Spain)"
  date_start = "2010-03-01"
  date_end = "2012-01-01"
  description = """"""

 [[experience]]
  title = "Intern"
  company = "Telefónica r+d"
  company_url = "http://www.tid.es"
  location = "Madrid (Spain)"
  date_start = "2009-12-01"
  date_end = "2010-01-01"
  description = """Intern at an European Project"""

+++


text:
# Time Of Use (TOU)

This app sets the state of an arbitrary entity according to the current TOU rate. Currently it is set up for Xcel Energy in Colorado.

You can use the `device` in other apps or automations. The states are "on-peak", "shoulder", and "off-peak". There is also an attribute called "lametric_icon" that is a red, yellow, or green icon for the respective TOU states.

## Sample config

```yaml
tou_mode_manager:
  module: tou
  class: StateManagerXcelColorado
  device: input_select.tou_mode
```

repository: moenaxel/appdaemon-apps

repo_name: moenaxel/appdaemon-apps


text:
## Rails 7.0.0.alpha2 (September 15, 2021) ##

*   No changes.

## Rails 7.0.0.alpha1 (September 15, 2021) ##

*   Emit Active Support instrumentation events from Active Storage analyzers.

    Fixes #42930

    *Shouichi Kamiya*

*   Add support for byte range requests

    *Tom Prats*

*   Attachments can be deleted after their association is no longer defined.

    Fixes #42514

    *Don Sisco*

*   Make `vips` the default variant processor for new apps.

    See the upgrade guide for instructions on converting from `mini_magick` to `vips`. `mini_magick` is
    not deprecated, existing apps can keep using it.

    *Breno Gazzola*

*   Deprecate `ActiveStorage::Current.host` in favor of `ActiveStorage::Current.url_options` which accepts
    a host, protocol and port.

    *Santiago Bartesaghi*

*   Allow using [IAM](https://cloud.google.com/storage/docs/access-control/signed-urls) when signing URLs with GCS.

    ```yaml
    gcs:
      service: GCS
      ...
      iam: true
    ```

    *RRethy*

*   OpenSSL constants are now used for Digest computations.

    *Dirkjan Bussink*

*   Deprecate `config.active_storage.replace_on_assign_to_many`. Future versions of Rails
    will behave the same way as when the config is set to `true`.

    *Santiago Bartesaghi*

*   Remove deprecated methods: `build_after_upload`, `create_after_upload!` in favor of `create_and_upload!`,
    and `service_url` in favor of `url`.

    *Santiago Bartesaghi*

*   Add support of `strict_loading_by_default` to `ActiveStorage::Representations` controllers.

    *Anton Topchii*, *Andrew White*

*   Allow to detach an attachment when record is not persisted.

    *Jacopo Beschi*

*   Use libvips instead of ImageMagick to analyze images when `active_storage.variant_processor = vips`.

    *Breno Gazzola*

*   Add metadata value for presence of video channel in video blobs.

    The `metadata` attribute of video blobs has a new boolean key named `video` that is set to
    `true` if the file has an video channel and `false` if it doesn't.

    *Breno Gazzola*

*   Deprecate usage of `purge` and `purge_later` from the association extension.

    *Jacopo Beschi*

*   Passing extra parameters in `ActiveStorage::Blob#url` to S3 Client.

    This allows calls of `ActiveStorage::Blob#url` to have more interaction with
    the S3 Presigner, enabling, amongst other options, custom S3 domain URL
    Generation.

    ```ruby
    blob = ActiveStorage::Blob.last

    blob.url # => https://<bucket-name>.s3.<region>.amazonaws.com/<key>
    blob.url(virtual_host: true) # => # => https://<bucket-name>/<key>
    ```

    *josegomezr*

*   Allow setting a `Cache-Control` on files uploaded to GCS.

    ```yaml
    gcs:
      service: GCS
      ...
      cache_control: "public, max-age=3600"
    ```

    *maleblond*

*   The parameters sent to `ffmpeg` for generating a video preview image are now
    configurable under `config.active_storage.video_preview_arguments`.

    *Brendon Muir*

*   The ActiveStorage video previewer will now use scene change detection to generate
    better preview images (rather than the previous default of using the first frame
    of the video). This change requires FFmpeg v3.4+.

    *Jonathan Hefner*

*   Add support for ActiveStorage expiring URLs.

    ```ruby
    rails_blob_path(user.avatar, disposition: "attachment", expires_in: 30.minutes)

    <%= image_tag rails_blob_path(user.avatar.variant(resize: "100x100"), expires_in: 30.minutes) %>
    ```

    If you want to set default expiration time for ActiveStorage URLs throughout your application, set `config.active_storage.urls_expire_in`.

    *aki77*

*   Allow to purge an attachment when record is not persisted for `has_many_attached`.

    *Jacopo Beschi*

*   Add `with_all_variant_records` method to eager load all variant records on an attachment at once.
    `with_attached_image` scope now eager loads variant records if using variant tracking.

    *Alex Ghiculescu*

*   Add metadata value for presence of audio channel in video blobs.

    The `metadata` attribute of video blobs has a new boolean key named `audio` that is set to
    `true` if the file has an audio channel and `false` if it doesn't.

    *Breno Gazzola*

*   Adds analyzer for audio files.

    *Breno Gazzola*

*   Respect Active Record's primary_key_type in Active Storage migrations.

    *fatkodima*

*   Allow `expires_in` for ActiveStorage signed ids.

    *aki77*

*   Allow to purge an attachment when record is not persisted for `has_one_attached`.

    *Jacopo Beschi*

*   Add a load hook called `active_storage_variant_record` (providing `ActiveStorage::VariantRecord`)
    to allow for overriding aspects of the `ActiveStorage::VariantRecord` class. This makes
    `ActiveStorage::VariantRecord` consistent with `ActiveStorage::Blob` and `ActiveStorage::Attachment`
    that already have load hooks.

    *Brendon Muir*

*   `ActiveStorage::PreviewError` is raised when a previewer is unable to generate a preview image.

    *Alex Robbin*

*   Add `ActiveStorage::Streaming` module that can be included in a controller to get access to `#send_blob_stream`,
    which wraps the new `ActionController::Base#send_stream` method to stream a blob from cloud storage:

    ```ruby
    class MyPublicBlobsController < ApplicationController
      include ActiveStorage::SetBlob, ActiveStorage::Streaming

      def show
        http_cache_forever(public: true) do
          send_blob_stream @blob, disposition: params[:disposition]
        end
      end
    end
    ```

    *DHH*

*   Add ability to use pre-defined variants.

    ```ruby
    class User < ActiveRecord::Base
      has_one_attached :avatar do |attachable|
        attachable.variant :thumb, resize: "100x100"
        attachable.variant :medium, resize: "300x300", monochrome: true
      end
    end

    class Gallery < ActiveRecord::Base
      has_many_attached :photos do |attachable|
        attachable.variant :thumb, resize: "100x100"
        attachable.variant :medium, resize: "300x300", monochrome: true
      end
    end

    <%= image_tag user.avatar.variant(:thumb) %>
    ```

    *fatkodima*

*   After setting `config.active_storage.resolve_model_to_route = :rails_storage_proxy`
    `rails_blob_path` and `rails_representation_path` will generate proxy URLs by default.

    *Ali Ismayilov*

*   Declare `ActiveStorage::FixtureSet` and `ActiveStorage::FixtureSet.blob` to
    improve fixture integration.

    *Sean Doyle*

Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/activestorage/CHANGELOG.md) for previous changes.

license: MIT,Ruby

repository: afonsocdaniel/rails

detected_licenses: MIT Ruby

repo_name: afonsocdaniel/rails


text:
# OpenPegasus

This repository is the OpenPegasus source code starting with OpenPegasus 14.1.

This was cloned from the OpenPegasus work at OpenGroup.

The intial release of OpenPegasus in github is OpenPegasus version 14.2 based on
the OpenPegasus 2.14.1 release available from the OpenPegasus web site.

This release corrects a number of issues with OpenPegasus 2.14.1 including:

1. Compiles with current gcc compilers.

2. Compatible with OpenSSL 1.1.x and the new API.  It also supports older versions.

3. Supports DMTF experimental schemas and includes DMTF schema 2.41.0 Experimental.

4. Development and release moved to github.

Availability:

The source code is available from the github repository project OpenPegasus
at:

    https://github.com/OpenPegasus/OpenPegasus.git

Note that the clone of OpenPegasus root directory is OpenPegasus and that
directory includes the pegasus directory (source and support code) and a docs
directory where over time most of the documentation will be acccumulated.

A tarball and zip file will be made available.

repository: rchateauneu/OpenPegasus

repo_name: rchateauneu/OpenPegasus


text:
---
permalink: "/task-force-2-2/"

title: "OSIPI Task Force 2.2: ASL contributions"
aims: Collect and harmonise ASL code snippets from developers
description: |
    Task force 2.2 will develop a library of open-source functions, and scripts for ASL perfusion imaging analysis. This is aimed at developers of ASL perfusion methods looking for specific functionality or development templates, or who want to share their own in-house developments with others. Contributions will be sourced from the community, and include individual functions and scripts in various programming languages. Task force 2.2 will organise these in a coherent and well-documented library structure as defined by task force 2.1, then identify and develop any missing functionality. Note that an inventory of full pipelines are in TF1.1.
leads:
  - name: Ananth Madhuranthakam
    location: UT Southwestern, TX, USA
    website: https://www.linkedin.com/in/ananth-madhuranthakam-4771189/
    role: Lead
    email<EMAIL_ADDRESS>  - name: Maria Mora
    location: Technical University of Munich, Germany
    website: https://www.linkedin.com/in/maría-g-mora-álvarez-97455531/
    role: Co-lead
    email<EMAIL_ADDRESS>members:
  - Sudipto Dolui
  - Rebeca Echeverria Chasco
  - Patrick Hales
  - Li Zhao
  - Henk-Jan Mutsaerts
  - Yiming Wang
  - Limin Zhou
status:
  - Lead identified
  - March 31, 2020 Co-lead identified
  - May 01, 2020 - Roadmap Defined
  - Aug. 15, 2020 - Scope Defined
links:
  - website: https://drive.google.com/drive/folders/16VPJ4Wq-YW8GA5cddMpKgWKs4Ua5dPEV
    description: |
      Task force folder on drive - storage space for public or private documents developed by the task force.
  - website: https://osipi.slack.com/archives/CQV6GNPMJ
    description: |
      Task force slack channel - for discussions between task force members.
---

{% include taskforce_content.md %}
<!--- Please include your task force contents below, free formatting -->
### TF2.2 Roadmap
Our 2 year (2020-2022) roadmap can be found [here](https://docs.google.com/document/d/1TXWPi6hiTA3bSQu0PbbNjnlNoVClik53Psp3QkVtvww/edit).

### TF2.2 Scope Document
Our scope document can be found [here](https://docs.google.com/document/d/1ioVbJKTfeoIGwCYcq6IsWwl9o_W4wRfeSFHXo6msCQQ/edit#heading=h.xh5k7d7orbcg). Suggestions are more than welcome, and if you'd like to contribute and/or join please contact any of the leads!

gha_language: JavaScript


text:
# Swedbank Pay Design Guide

[![Version][version-badge]][version-tag]
![Tag][github-actions-badge]
[![Codecov][codecov-badge]][codecov-status]
[![Dependabot Status][dependabot-badge]][dependabot]
[![Dependencies Status][dep-badge]][dep-status]
[![devDependencies Status][devdep-badge]][devdep-status]

[![Swedbank Pay Design Guide][og-image]][swpdg]

## Installing / Getting started

The following guides are for further development of the Design Guide, and are
not necessary if you only plan to use the Design Guide in your project.

### Prerequisites

Design Guide requires [Node.js][nodejs] (includes npm).

### Installing

1. Open a terminal and navigate to repo root
2. `npm ci`
3. `npm start`
4. Go to `http://localhost:3000`
5. Works? If not, contact us on Slack ([`#design-guide-general`][slack] – only
   available to Swedbank Pay and PayEx employees).
6. Get to work.

### Set up Git Hooks

- Open a terminal and navigate to repo root
- Run `git config core.hooksPath .githooks`

## Developing

It is important to note that as a developer, this project supports two brands:
**Swedbank Pay** _and_ **PayEx**. [Webpack][webpack] is configured to accept a
brand flag which is used to collect different sets of theme variables.
**Swedbank Pay** is default flag. E.g. `npm start` sets the theme to
**Swedbank Pay**, while `npm run start:payex` sets the theme to … you guessed
it, **PayEx**. Check out the `package.json` file for additional scripts.

### Built with

- [React][react]
- [Less][less]

### Setting up Dev

- Running the command `npm start` starts the Webpack dev server, (which is
  configured in `~/webpack.config.js`). If any changes is made to this file, or
  any files directly influencing this file (i.e. any loaders or plugins) you
  need to restart the server.
- The script `npm start` will start the dev server in development mode. If you
  wish to run the dev server in production-like environment run the command
  `npm run start:prod`.

#### Importing components

When importing different components in the files you create, you can use
shortcuts for common paths. The shortcuts are as following:

|   Shortcut    | Description                                                                            |
| :-----------: | :------------------------------------------------------------------------------------- |
|      `~`      | root of the project (example `import package from "~/package";`)                       |
|    `@src`     | `~/src`-folder (example `import dg from "@src/scripts";`)                              |
| `@components` | `~/src/App/components`-folder (example `import Alert from "@components/Alert";`)       |
|  `@docutils`  | `~/src/App/Documentation/utils`-folder (example `import { DocToc } from "@docutils";`) |
| `@constants`  | `~/src/constants`-folder                                                               |

The shortcuts are specified in the `~/.babelrc`-file. Specifying the
prefix-shortcuts in the `~/jsconfig.json`-file enables path intellisense for
the shortcuts (at least in VSCode).

### Building

To start building, run the command `npm run build` to start in dev-mode, or
`npm run build:prod` for production-mode. This will make webpack start bundling
everything and make static files in the `~/dist/`-folder. Also make sure all
tests pass, or make changes to them accordingly.

> Note: Running the command `npm run build:prod` will delete all files already
> located in `~/dist`.

## Versioning

Design Guide uses [semantic versioning][semver]. This means that internally,
Design Guide will use a `major.minor.patch` version number to signal what the
changes in each release surmount to. This also means both CSS and JavaScript
files are versioned in lockstep, so whenever a new version of the CSS is
released, a new version of the JavaScript will be as well.

## Tests

1. Open a terminal and navigate to repo root
2. Run the command `npm test`
    - Many of the tests are snapshot based, and runs against already created
      snapshots. If you need to update the snapshots due to changes run the
      command `npm run test:update`.
    - A test coverage report is generated after running the tests. This can be
      found in `~/coverage`.

> Note: Snapshot testing is pretty unforgiving, so if you make __ANY__ changes
> to how a component, which already has a snapshot, is rendered, the tests
> __WILL__ crash! So make sure to run `npm run test:update` before committing.

## Code style

Coding style rules are set in `~/.eslintrc` & `~/.stylelintrc`.

__*Make sure to follow the syntax rules enforced by ESLint & Stylelint.*__

## Contributing

- Bug reports: File bugs as Github [issues][issues].
- Feature suggestions: File as Github issue or discuss the feature on Slack
  ([`#design-guide-general`][slack]).
- Code contributions: Code contributions are highly encouraged, but discuss
  the feature/bugfix in an issue or on Slack before you start coding.

## Creating a release

Before merging to master to create a release, make sure you follow these steps:

1. Make sure the linting (`npm run lint`) and unit tests pass (`npm test`).
2. Update the version in `~/package.json`.
3. Make sure the changelog is correct (date and version) and only contains
   changes for the current release.
4. Update the version in the URL of the `version-badge` and `version-tag`
   at the bottom of this `README.md` file.
5. Commit the changes and create a pull request from your branch to `develop`.
6. When approved and merged, create a new pull request from `develop` to
   `master`.
7. When approved, rename the merge commit to `Release x.x.x` and merge.
8. Change branch to `master`.
9. Create and push a new tag with the new release commit.

GitHub Actions will now create and deploy a release on both github and
[`design.swedbankpay.com`][swpdg].

After pushing to master, create a pull request to `develop` that deletes the
release notes content but keeps the headers.

## Core development team

- [Erik Hallaraaker][erikhallaraaker]
- [Håkon Mosvoll][hmosvoll]
- [Thomas Lorntzen][VikingTristan]

## Contents of this project

| Folder        | Description |
|:--------------|:------------|
| `~/coverage`  | Test coverage report for the project (not commited to the repository).
| `~/dist`      | Static files generated by [Webpack][webpack] (not commited to the repository).
| `~/src`       | All the source files.
| `~/build`     | 404 and index files that serve as root domain redirectors to newest release.
| `~/tools`     | Various tools, mostly related to the build/deploy process.

## Notable files

| File                | Description |
|:--------------------|:------------|
| `.babelrc`          | [Babel][babel] configuration.
| `.eslintignore`     | List of files/directories ESLint will ignore (similar to `.gitignore`)
| `.eslintrc`         | [Eslint][eslint] configuration.
| `.sentryclirc`      | [Sentry][sentry] configuration used by Webpack to configure a new release on sentry. _(Do __not__ change the line `token = <token>`, as this placeholder is used by GitHub Actions to insert the sentry api key.)_
| `.stylelintrc`      | [Stylelint][stylelint] configuration.
| `CHANGELOG.md`      | Collection of changes made to the project. Insert your changes here.
| `RELEASE-NOTES.md`  | Latest release notes of changes made to the project. Insert your changes here. This file is used by GitHub Actions to create a release body on GitHub.
| `jest.config.js`    | [jest][jest] configuration.
| `jest.setup.js`     | Script file that will run before jest executes the tests, this includes [enzyme][enzyme] setup, polyfills and other useful snippets.
| `webpack.config.js` | [Webpack][webpack] configuration.

## Copyright, license and credits

Code and documentation © Swedbank Pay and contributors, released under the [MIT License](LICENSE).

Inspired by [Bootstrap][bootstrap] and [Materialize][materialize].

  [version-badge]:        https://img.shields.io/badge/Version-4.7.0-blue.svg
  [version-tag]:          https://github.com/swedbankpay/design.swedbankpay.com/releases/tag/4.7.0
  [github-actions-badge]: https://github.com/SwedbankPay/design.swedbankpay.com/workflows/Tag/badge.svg
  [codecov-badge]:        https://codecov.io/gh/swedbankpay/design.swedbankpay.com/branch/develop/graph/badge.svg
  [codecov-status]:       https://codecov.io/gh/swedbankpay/design.swedbankpay.com
  [dependabot-badge]:     https://api.dependabot.com/badges/status?host=github&repo=SwedbankPay/design.swedbankpay.com
  [dependabot]:           https://dependabot.com
  [dep-badge]:            https://david-dm.org/swedbankpay/design.swedbankpay.com/status.svg
  [dep-status]:           https://david-dm.org/swedbankpay/design.swedbankpay.com
  [devdep-badge]:         https://david-dm.org/swedbankpay/design.swedbankpay.com/dev-status.svg
  [devdep-status]:        https://david-dm.org/swedbankpay/design.swedbankpay.com?type=dev
  [og-image]:             https://repository-images.githubusercontent.com/191536903/4ef09b80-53ec-11ea-9f50-8fa24f706dfb
  [swpdg]:                https://design.swedbankpay.com
  [nodejs]:               https://nodejs.org/en/
  [slack]:                https://payex.slack.com/messages/C0L3W8B2S/
  [react]:                https://reactjs.org/
  [less]:                 http://lesscss.org/
  [webpack]:              https://webpack.js.org/
  [semver]:               http://semver.org/
  [issues]:               https://github.com/swedbankpay/design.swedbankpay.com/issues
  [erikhallaraaker]:      https://github.com/erikhallaraaker
  [hmosvoll]:             https://github.com/hmosvoll
  [VikingTristan]:        https://github.com/VikingTristan
  [babel]:                https://babeljs.io/
  [eslint]:               https://eslint.org/
  [sentry]:               https://sentry.io
  [stylelint]:            https://stylelint.io/
  [jest]:                 https://facebook.github.io/jest/
  [enzyme]:               http://airbnb.io/enzyme/
  [bootstrap]:            http://getbootstrap.com/
  [materialize]:          https://materializecss.com/

repository: VikingTristan/ubiquitous-potato

repo_name: VikingTristan/ubiquitous-potato


text:
Recurly Java Integration Library - Sample Application
=====================================================

Recurly JS Client Library
-------------------------

Recurly.js is a Javascript library which allows you to easily embed and customize PCI compliant forms within
your website. HMAC digital signatures are used to verify information sent to Recurly via your user's browser.
The signature validates that parameters you have specified in your HTML have not been tampered with before
being received by Recurly. The [Recurly JS Client Library](https://github.com/tfoxcroft/recurly_integration)
consists of helper methods to create and verify signatures.

The Sample Application
-----------------------

The sample application is a simple Spring Roo application which follows the Maven project structure.

Running The Sample Application
------------------------------

Assuming you have maven installed, start the sample application by running the following from the root directy of the
project:

    mvn tomcat:run

Open a browser and go to
[http://localhost:8080/recurly-integration-sample-app](http://localhost:8080/recurly-integration-sample-app)


text:
---
layout: post
title: "OsMT1f"
description: ""
category: genes
tags:
---

* **Information**
    + Symbol: OsMT1f
    + MSU: [LOC_Os12g38010](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os12g38010)
    + RAPdb: [Os12g0567800](https://rapdb.dna.affrc.go.jp/locus/?name=Os12g0567800)

* **Publication**
    + [Clustered metallothionein genes are co-regulated in rice and ectopic expression of OsMT1e-P confers multiple abiotic stress tolerance in tobacco via ROS scavenging](http://www.ncbi.nlm.nih.gov/pubmed?term=Clustered metallothionein genes are co-regulated in rice and ectopic expression of OsMT1e-P confers multiple abiotic stress tolerance in tobacco via ROS scavenging%5BTitle%5D), 2012, BMC Plant Biol.

* **Genbank accession number**

* **Key message**

* **Connection**

[//]: # * **Key figures**


text:
# todo-react-graphql
TODO project made with React, Redux, GraphQL, and PostgreSQL

## How to run this code

First of all, download or clone this repository.

After that, go to the project folder and type this on command line:

Open 2 terminals on project root folder.

In the first terminal, type:
```
> cd backend; npm install; npm start
```

In the second terminal, type:
```
> cd frontend; npm install; npm start
```

A new window should open in your default browser and you can play around with my app.

## Features

### Frontend
- [x] Apollo client
- [x] Redux
- [x] Load all TODO tasks
- [x] Add new TODO task
- [x] Remove TODO task
- [ ] Edit TODO task
- [ ] Mark TODO task as completed
- [ ] Sort TODO task by priority
- [ ] Sort TODO task by due date

### Backend
- [x] Node and Apollo Server
- [x] Apollo Server
- [x] Knex

### Who am I

I'm a software engineer who loves mobile development. You can know more about me reading [my articles](http://blog.josenaves.com), reading my [tweets](http://twitter.com/josenaves), reading my [code](http://github.com/josenaves).

repository: josenaves/todo-react-graphql

repo_name: josenaves/todo-react-graphql


text:
---
layout: post
title: Day 36 Activities
---

### Yaamini & I spent the day at the hatchery cleaning and taking water chemistry. Here's the report.

#### Arrived at the hatchery; pH looked good according to the Durafets:

![pH at arrival](https://github.com/laurahspencer/LabNotebook/blob/master/images/2017-03-24_pH.JPG?raw=true)

#### Yaamini took care of water chemistry measurements while I drained, cleaned, and re-situated the oysters. Again, we used Rick's probe for salinity, as well as recording uS/cm with our salinity probe.

#### Found some stringy, mucus substance in tanks #2 & #3 (both low pH, at the center and eastern valves):

![tank 2](https://github.com/laurahspencer/LabNotebook/blob/master/images/2017-03-24_Tank2.JPG?raw=true)

#### Close-up on mucus:
![tank 2 mucus](https://github.com/laurahspencer/LabNotebook/blob/master/images/2017-03-24_Tank2-mucus.JPG?raw=true)

#### As usual, after cleaning I moved the tanks around within treatment, which in effect moved the probes to new tanks.  Here's a nice view of the system:

![nice vew](https://github.com/laurahspencer/LabNotebook/blob/master/images/2017-03-24_Nice-system-photo.JPG?raw=true)

repository: laurahspencer/LabNotebook

gha_language: CSS

repo_name: laurahspencer/LabNotebook


text:
# AppImageHub [![Build Status](https://travis-ci.org/AppImage/appimage.github.io.svg?branch=master)](https://travis-ci.org/AppImage/appimage.github.io)

https://appimage.github.io/

Entirely open source data for app stores and software centers with crowd-sourced and automated open source app reviews.

Given an URL to an AppImage, it inspects the AppImage and puts it into a community-maintained catalog. The idea is that all the metadata travels inside the AppImage, so besides adding an URL to this repository no additional information is asked, since it comes with the AppImage itself.

## How to submit AppImages to the catalog

Create a new file using [this link](https://github.com/AppImage/AppImageHub/new/gh-pages/data) and send a Pull Request. The file should contain one line with a link to the GitHub repository that hosts AppImages on its Releases page. Alternatively, a link to the AppImage. Nothing else. Then send a Pull Request to this repository. Travis CI will instantly perform an automated review of the AppImage, and in case it succeeds, you will see a __green__ result in your pull request. If you get a __red__ result, check the log of the Travis CI build, and fix it.

## How to use

Not just yet...

App stores and software centers can consume the metadata collected by this project. See [AppImage ecosystem](https://github.com/AppImage/AppImageKit/wiki/Ecosystem). Currently no app stores or software centers are known to already use this data. If you would like to use this data, please contact us first on #AppImage at irc.freenode.net, so that we can discuss an output format that would serve your needs best.


text:
# RandomForestClassifier

```python
from sklearn.datasets import make_classification

X, y = make_classification(n_samples=100, n_features=20, random_state=22)
```

use $xslearn.utils.train\_test\_split()$ to split data

```python
from xslearn.utils import train_test_split

X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=33)
print(X_train.shape)
print(X_test.shape)
print(y_train.shape)
print(y_test.shape)
# output:
# (80, 20)
# (20, 20)
# (80,)
# (20,)

```

RandomForestClassifier(n_estimators=10, criterion='gini', max_depth=None, max_samples=None, max_features='auto', max_leaf_nodes=None, bootstrap=True, oob_score=False, n_jobs=-1, verbose=0, random_state=None)

- n_estimators:  base estimator's numbers.
- criterion: cart tree's split method.
- max_depth: cart tree's max depth.
- max_samples: sampling ratio, None denotes sampling all the dataset; float number denotes sampling ratio of all dataset, which should be in [0., 1.]; int number denotes sampling number.
- max_features: samling feature ratio, 'auto' denotes sampling feature numbers k = $log_2d$, where d denotes all feature's numbers; you can also specify this parameter as float or int.
- max_leaf_nodes: cart tree's max leaf node numbers.
- bootstrap: whether use bootstrap sampling.
- oob_score: use out-of-bag datas.
- n_jobs: use multi-thread; -1 equals to 1.
- verbose: display training detail.
- random_state: random seed.

compare `RandomForestClassifier`  with `DecisionTreeClassfier`

```python
from xslearn.models import DecisionTreeClassifier

model1 = DecisionTreeClassifier()
model1.fit(X_train, y_train)
model1.score(X_test, y_test)
# print result in console
'''
fit complete -> time cost: 0.629613s
accuracy on test data is  0.85
'''

```

```python
from xslearn.models import RandomForestClassifier

model2 = RandomForestClassifier(n_estimators=5)
model2.fit(X_train, y_train)
model2.score(X_test, y_test)
# print result in console
'''
fit complete -> time cost: 0.208873s
fit complete -> time cost: 0.114928s
fit complete -> time cost: 0.223865s
fit complete -> time cost: 0.223862s
fit complete -> time cost: 0.127921s
accuracy on test data is  0.9
'''
```

**accuracy on test data raised from 0.85 to 0.9**

We can use **multi-thread** to speed up training:

```python
from xslearn.models import RandomForestClassifier

model2 = RandomForestClassifier(n_estimators=5, n_jobs=8)
model2.fit(X_train, y_train)
model2.score(X_test, y_test)
```


text:
# Objects in Depth

- Object's characteristics are identity, value and type

- `id()` - builtin function that returns the memory address of the object in CPython.

- Object's type using `obj.__class__` or `type(obj)`.
- For classes defined on the runtime(user defined classes), we can change the type of the objects by setting/updating the `__class__` attribute.

- An object can be made a callable by implementing `__call__` method. `builtins.callable` function can be used to test if an object is a callable. We could also check for a callable using below snippet.

```Python
from typing import Callable
isinstance(id, Callable)
```

## Methods

- Methods in a classes are functions but when invoked the instance is always passed as implicit first argument by the interpreter.
- When method of an object is captured in a variable, `method` class is instantiated with the instance stored in `__self__` and function stored in `__func__`.

```Python
class C:
    def f():
        print("Nothing")

c = C()
f = c.f
print(type(f)) # method
print(id(c) == id(f.__self__))

# invoking via the method object
f()
# or
f.__func__(__f.__self__)
```

- In a user defined class, a function with atleast one argument can be added as a method outside of the class definition.

```Python
class C:
    ...

def print_type(obj):
    print(type(obj))

# Added a method to the class in the runtime
C.type = print_type
c = C()
# this works
c.type()
```

## Metaclasses

- Class has metaclass and a class is an object of its metaclass
- When a class is called, its meta class method is invoked with the class as the implicit argument.

```Python
class Meta(type):
    def __call__(*args):
        print("Inside meta class call", args)

class C(metaclass=Meta):
    ...

# instantiating C will invoke the Meta.__call__ method
c = C() # Meta.__call__(C)

```

---

## References

- [Python unlocked](https://www.amazon.in/Python-Unlocked-Arun-Tigeraniya/dp/1785885995)

gha_language: Python