text:
### Local minikube installation

For Linux users that want to deploy a local Kubernetes instance, they might want to install [minikube](https://minikube.sigs.k8s.io/docs/start/).
Once installed, we can start the minikube with the following command:

```
minikube start --embed-certs=true
```
The above command, will initialize and start minikube service (it might take few minutes). Also, it will embed the required certificates and keys within the ~./kube/config file.

Once done, check that minikube is running properly:

```
owasp@owasp-virtual-machine:~$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
```

Then we need to change the docker-compose.yaml file.
First we need to get the base64 encode of the ~./kube/config file:

```
cat ~./kube/config | base64 | tr -d '\n'
```

Copy the output of the above command and set it as value for the ```LABS_KUBE_CONF``` variable:

```
# docker-compose.yaml
...
LABS_KUBE_CONF: HV1c5WWR6aGpWQ3RzVjFsSWFYcEhlQW81UkUxYU9ITnlZbWg0UkdK...a3RMUzB0TFFvPQ==
...
```

Since it might be possible to get file ownership issues, it's also suggested to set the absolute path for the ```volumes``` attribute, within the skf-api configuration section:

```
# docker-compose.yaml
...
...
skf-api:
    container_name: skf-api_container
    depends_on:
      - "rabbitmq"
      - "nginx"
      - "mysql"
    restart: always
    volumes:
      - /home/your_username/.kube/config:/home/user_api/.kube/config
...
...
```

We also need to change the value for the ```SKF_LABS_DOMAIN``` (localhost by default), with the minikube IP address (or with a hostname that resolves to the same IP) that you can find looking at  ~./kube/config (by default should be <IP_ADDRESS>):

```
# ~./kube/config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: base64_data_encoded
    extensions:
    - extension:
        last-update: Wed, 10 Nov 2021 17:46:33 CET
        provider: minikube.sigs.k8s.io
        version: v1.24.0
      name: cluster_info
    server: https://<IP_ADDRESS>:8443
  name: minikube
contexts:
- context:
...
...
```
```
# docker-compose.yaml
...
SKF_LABS_DOMAIN=http://<IP_ADDRESS>
...
```

At this point we could start the skf application (within the skf-flask directory) with:

```
docker-compose up
```
Observe the output logs:
it might be possible that the skf-api_container container will fail to 'touch' the /home/user_api/.kube/config, due to file permission issues (it has to do with how docker handles file ownership).
If you see such an error, connect as root to the skf-api_container:
```
docker exec -it -u0 skf-api_container /bin/bash
```
and change the /home/user_api/.kube/config permission as follow:
```
chmod 666 /home/user_api/.kube/config
```
We almost done, but we need to fix the last thing: when we started minikube, a new (separate) bridge network has been created and because of containers isolation (for more information check this [page](https://docs.docker.com/network/iptables/)), it won't be possible to get network communication between minikube and skf containers (as they will be in 2 different bridges).
So we need to add 2 custom rules to the ```DOCKER-USER``` chain in ```iptables``` to allow communication between the 2 bridges:
```
sudo iptables -I DOCKER-USER -i br-xxxxxxxxxxxx -o br-yyyyyyyyyyyy -j ACCEPT
sudo iptables -I DOCKER-USER -i br-yyyyyyyyyyyy -o br-xxxxxxxxxxxx -j ACCEPT
```
where ```br-xxxxxxxxxxxx``` and ```br-yyyyyyyyyyyy``` need to match the relevant bridge interfaces in your system (you can use ```brctl show``` to find them). Also, remember to make the iptabels rules persistent (i.e. using ```iptables-persistent```).

Finally you can run again:
```
docker-compose up
```

and you should be able to connect to the dashboard and deploy the labs.


text:
# list-table

This [Pandoc][] [Lua filter][] allows to convert lists of lists (bullet lists and/or ordered lists) into tables. This makes it easier to type long tables and tables with "complicated" content because you don't need to draw any ASCII art.

The filter can also convert tables to lists of lists, allowing full roundtripping.

[Pandoc]: https://pandoc.org
[Lua filter]: https://pandoc.org/MANUAL.html#option--lua-filter

## Version

This document describes filter version<PHONE_NUMBER>00.

## Contributing/hacking

**Don't modify `pandoc-list-table.lua` directly!**

The filter is written in [MoonScript][] which must be compiled to Lua with the `moonc` program to be used with Pandoc. If you want to do a pull request, or just hack on the filter, you should edit the [pandoc-list-table.moon](pandoc-list-table.moon) file, install MoonScript, then compile the filter code to Lua with `moonc pandoc-list-table.moon`, then check that your modifications work by running pandoc on suitable input with `pandoc-list-table.lua` specified as a Lua filter.

[MoonScript]: https://moonscript.org

## Compatibility

With Pandoc version 2.10 Pandoc's internal representation of tables changed from
the earlier simple model to a model which allows ["complex" tables](#a-note-on-terminology)
more similar to HTML tables (colspan/rowspan etc.), so that existing filters
written to work with the old simple Table object don't work with Pandoc 2.10.0
and Pandoc 2.10.1 After Pandoc version 2.10.1 the Lua filter engine supports, as
a compatibility measure, a new SimpleTable object type similar to the old simple
Table object, and provides functions to convert between SimpleTable objects and
the new "complex" Table type. As of Pandoc 2.10.1 Pandoc's Markdown reader and
writer do as yet not have any syntax supporting the new "complex" table
features, and since it is not clear how this filter might support complex tables
no support for the complex Table object type has been implemented in this filter
either.

Due to the changed table model in Pandoc 2.10 this filter does not work with
Pandoc versions 2.10.0 and 2.10.1 inclusive. As of filter version 20201001
(that's YYYYMMDD!) there is a check in place which uses the [SimpleTable][]
(see also the [SimpleTable pull request][])
constructor if it exists and throws an error if the [PANDOC_VERSION][] >= 2.10.0
but SimpleTable does not exist. Thus the filter should work both with nightlies
where SimpleTable exists and with the next release of Pandoc. If SimpleTable
exists the `table2lol` implementation now tries to convert complex Table objects
to SimpleTable objects, throwing an error with a hopefully helpful message if
conversion fails, and at the other end the `lol2table` implementation converts a
SimpleTable to a complex Table before returning (and also throws an error with a
hopefully helpful message in the unlikely event that such a conversion fails.)

This should mean that when Pandoc's readers and writers start to support
the new complex Table features this filter should still work unless you
try to convert tables actually *using* those features to lists. In the future
this filter may come to support at least some complex Table features along the
lines suggested in [Issue #1][issue_1], but don't hold your breath for it!

[SimpleTable]: https://pandoc.org/lua-filters.html#type-simpletable
[SimpleTable pull request]: https://github.com/jgm/pandoc/pull/6575
[PANDOC_VERSION]: https://pandoc.org/lua-filters.html#global-variables
[issue_1]: https://git.io/JU1XR

### A note on terminology

In this README a distinction is made between the following terms:

-   *complicated content*

    Table cell content which is hard or impossible to represent in the "ASCII
    art" table syntaxes of Pandoc's Markdown.

-   *complex Table*

    The new Table object type in the Lua filter engine from Pandoc 2.10 and on,
    which supports various HTML-like table features such as colspans and
    rowspans. This filted does as of its version 20201001 not support these
    features.

-   *simple Table*

    The old Table object type in the Lua filter engine before Pandoc 2.10,
    which did not support the new "complex" table features. This filter
    supports versions of Pandoc using this older Table object type.

-   *SimpleTable*

    The compatibility SimpleTable object type, similar to the old *simple Table*
    object type supported by the Lua filter engine in versions of Pandoc later
    than 2.10. This filter uses this object type when available.

## Usage

Obviously it would be dysfunctional if all lists of lists were converted to tables.  Hence you must tell the filter that you want to convert a given list of list to a table by wrapping the list in a div with the class `lol2table` (short for "list-of-lists-to-table":

````pandoc
:::lol2table
*   -   foo
    -   bar
    -   baz
*   -   +   tic
        +   pic
    -   +   tac
        +   pac
:::
````

When running this through pandoc with the filter enabled and with markdown as output format it is replaced with this:

````pandoc
+---------+---------+-----+
| foo     | bar     | baz |
+=========+=========+=====+
| -   tic | -   tac |     |
| -   pic | -   pac |     |
+---------+---------+-----+
````

Note how each item in the top level list becomes a table row and each item in the second level list becomes a table cell, while third level list remain lists. Note also that the filter handles the situation where there are only two items in the second second-level list: if any rows are shorter than the longest row they are padded with empty cells towards the end.

### Headerless tables

To turn a list of lists into a headerless table just include the class `no-header` (or `noheader`) on the wrapping div:

````pandoc
::: {.lol2table}
Table with header

1.  1.  foo
    2.  bar
    3.  baz

2.  1.  tic
    2.  tac
    3.  toc
:::

::: {.lol2table .no-header}
Table without header

1.  1.  foo
    2.  bar
    3.  baz

2.  1.  tic
    2.  tac
    3.  toc
:::
````

````pandoc
foo   bar   baz
----- ----- -----
tic   tac   toc

: Table with header

----- ----- -----
foo   bar   baz
tic   tac   toc
----- ----- -----

: Table without header
````

### Captions

The previous example also shows how to set a caption on the table: just include a paragraph with the caption text inside the div.

### Custom alignments and custom column widths

To specify the alignment of the table columns set an attribute `align` on the div.  Its value should be a comma separated "list" (and I mean *comma* separated, not comma-and-whitespace!) of any of the letters `d l c r` (for `AlignDefault`, `AlignLeft`, `AlignCenter`, `AlignRight` respectively):

````pandoc
::: {.lol2table align="l,c,r"}
*   -   foo
    -   bar
    -   baz
*   -   +   tic
        +   pic
    -   +   tac
        +   pac
:::
````

````pandoc
+---------+---------+-----+
| foo     | bar     | baz |
+:========+:=======:+====:+
| -   tic | -   tac |     |
| -   pic | -   pac |     |
+---------+---------+-----+
````

Likewise to specify the relative width of columns include an attribute `widths` on the div.  Its value should be a comma-separated (again really *comma* separated!) "list" of integers between 0 and 100, where each integer is the percentage of the available total width which should be the width of the respective column:

````pandoc
::: {.lol2table widths="20,40,10"}
*   -   foo
    -   bar
    -   baz
*   -   +   tic
        +   pic
    -   +   tac
        +   pac
:::
````

````pandoc
+-------------+---------------------------+------+
| foo         | bar                       | baz  |
+=============+===========================+======+
| -   tic     | -   tac                   |      |
| -   pic     | -   pac                   |      |
+-------------+---------------------------+------+
````

Naturally you can combine the two:

````pandoc
::: {.lol2table align="l,c,r" widths="20,40,10"}
*   -   foo
    -   bar
    -   baz
*   -   tic
    -   tac
:::
````

````pandoc
---------------------------------------------------
foo                        bar                  baz
-------------- ---------------------------- -------
tic                        tac

---------------------------------------------------
````

If you specify more alignments or widths than there are columns the extra alignments/widths will be ignored.

If you specify fewer alignments than there are columns the list of alignments is padded to the right length with copies of the rightmost alignment actually specified.  If you specify fewer widths than there are columns the list of widths is padded to the right length with zeroes.  This should cause Pandoc to distribute the remaining width between them.

## Roundtripping

To convert a table into a list of lists you wrap it in a div with the class `table2lol`:

````pandoc
:::table2lol

|foo|bar|baz
|---|---|---
|tic|tac|toc

:::
````

````pandoc
0.  1.  foo
    2.  bar
    3.  baz

1.  1.  tic
    2.  tac
    3.  toc
````

Note that the resulting lists always are numbered lists and that if there was a header row the numbering of the top-level list starts at zero.

### Keeping the div

If you include a class `keep-div` (or `keepdiv`) on the div the result will also be wrapped in a div, designed to make roundtripping easier:

````pandoc
::: {#alpha .lol2table .keep-div}
1.  1.  foo
    2.  bar
    3.  baz
2.  1.    1.  foo
    2.  bar
    3.  baz

1.  1.  tic
    2.  tac
    3.  toc
:::
````

## Author

Benct Philip Jonsson<EMAIL_ADDRESS>
## Copyright and license

This software is Copyright (c) 2020 by Benct Philip Jonsson.

This is free software, licensed under:

  The MIT (X11) License

http://www.opensource.org/licenses/mit-license.php

<!-- Vim: set et tw=80 ts=4 sts=4: -->

license: MIT

repository: bpj/pandoc-list-table

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: bpj/pandoc-list-table


text:
---
id: secure-your-endpoints
title: How to secure your endpoints
sidebar_label: How to secure your endpoints
slug: /secure-your-endpoints
---

## Guard.authorize

The `Guard.authorize` HOF will protect your endpoint and authorize your user based on your rules.
If the user is not authorized an `AuthorizationError` will be thrown.

Eg:

```typescript {10}
import Guard from "app/guard/ability"
import db, { Prisma } from "db"

type UpdateProjectInput = Pick<Prisma.ProjectUpdateArgs, "where" | "data">

async function updateProject({ where, data }: UpdateProjectInput) {
  return await db.project.update({ where, data })
}

export default Guard.authorize("update", "project", updateProject)
```

`authorize(ability, resource, callback)`

- **ability**

  The action that the user can perform.

  Default: `create, read, update, delete, manage`

  [More information](abilities)

- **resource**

  The subject of the action.

  Default: `all`

  [More information](resources)

- **callback** :

  It's your query or mutation

  `async (args) => Promise<any>`

## Guard.authorizePipe

If you are using pipes in your queries or mutations you can use Guard.authorizePipe as shown in the example. If the authorization fails it will throw an `AuthorizationError`

```typescript
import Guard from "app/guard/ability"
import { resolver } from "blitz"
import db from "db"
import * as z from "zod"

export const CreateProject = z.object({
  name: z.string(),
  dueDate: z.date().optional(),
  orgId: z.number().optional(),
})

export default resolver.pipe(
  resolver.zod(CreateProject),
  Guard.authorizePipe("create", "project"),
  // Set default orgId
  (input, { session }) => ({
    ...input,
    orgId: input.orgId ?? session.orgId,
  }),
  async (input, ctx) => {
    console.log("Creating project...", input.orgId)
    const project = await db.project.create({
      data: input,
    })
    console.log("Created project")
    return project
  },
)
```

`authorizePipe(ability, resource)`

- **ability**

  The action that the user can perform.

  Default: `create, read, update, delete, manage`

  [More information](abilities)

- **resource**

  The subject of the action.

  Default: `all`

  [More information](resources)

## Check rules inside a query/mutation

Sometimes you need to decide whether to execute portions of your code based on some conditions.
You can use `Guard.can` for this purpose.

```typescript {10}
...
async function updateProject({ where, data }: UpdateProjectInput, ctx: Ctx) {
    const { can: canSendEmail, reason } = Guard.can( "send", "project_email", ctx, { where, data });

	if (canSendEmail) await sendEmail()

	return await db.project.update({ where, data })
}
...
```

`Guard.can(ability, resource, ctx, args) // { can: boolean, reason: string }`

repository: dipankarmaikap/blitz-guard

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: dipankarmaikap/blitz-guard


text:
# Sync Environment Example

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/tommy351/kosko/tree/master/examples/web-sync-environment)

See [docs](https://kosko.dev/docs/using-in-browser) for more details.

gha_language: TypeScript


text:
---
layout: post
title: Looking for a better way to manage passwords?
date: '2011-11-10T22:41:00.001-06:00'
url: posts/2011/11/11/looking-for-better-way-to-manage/
author: Justin
tags:
- iOS
- mobile
- windows
- linux
- passwords
- www
- android
- computers
- lastpass
- mac
modified_time: '2011-11-10T23:07:45.561-06:00'
blogger_id: tag:blogger.com,1999:blog-3129376439018684576.post-4787699780568644572
blogger_orig_url: http://randommusingsbyjustin.blogspot.com/2011/11/looking-for-better-way-to-manage.html
---
I've been contemplating using various password management solutions over the last year or more ([LastPass][lp],
[KeePass][kp], [1Password][op]). I've finally made the jump and am starting to use it instead of remembering lots of
different password schemes for different sites. I ultimately landed on [LastPass][lp] even though they had a
[potential security breach][lp-breach]. The fact is that they handled it well and it seems that there was little,
if any, impact due to the way they store their data. If you're looking for a great solution to manage your passwords,
I'd recommend [LastPass][lp]. Check out [this great write-up on it on LifeHacker][lp-lh].
<!--more-->

[lp]: https://www.lastpass.com/
[kp]: https://keepass.info/
[op]: https://agilebits.com/onepassword
[lp-breach]: https://blog.lastpass.com/2011/05/lastpass-security-notification.html
[lp-lh]: https://lifehacker.com/5483119/the-easy-any+browser-any+os-password-solution

gha_language: HTML


text:
# NastyHosts Report Plugin
Gather reports of evil addresses in [NastyHosts](https://github.com/kacperzuk/nastyhosts).

### How to use

Run this in your NastyHosts installation

```bash
$ npm install nastyhosts-report-plugin
```

and add `"report"` to plugins in your NastyHosts `config.json`:

```json
{
  "plugins": [
    "report",
    "..."
  ]
}
```

repository: livehome/nastyhosts-report-plugin

repo_name: livehome/nastyhosts-report-plugin


text:
# Data Lakes with Spark

This project includes three files:

- etl.py Reads data from S3, processes that data using Spark, and writes them back to S3.
- dl.cfg Define configurations and AWS credentials.
- README.md Provide discussion and decisions for this ETL pipeline.

# Discussion and decisions for this ETL pipeline

## 1. The purpose of this data lake in context of the startup, Sparkify, and their analytical goals.

__Introduction__

A music streaming startup, Sparkify, has grown their user base and song database even more and want to move their data warehouse to a data lake. Their data resides in S3, in a directory of JSON logs on user activity on the app, as well as a directory with JSON metadata on the songs in their app.

This project create an ETL pipeline for a data lake hosted on S3 that extracts their data from S3, processes them using Spark, and loads the data back into S3 as a set of dimensional and fact tables. This will allow their analytics team to continue finding insights in what songs their users are listening to.

__Questions to anwser__

- What songs users are listening to?
- How many paying users are there?
- How many users downgraded the plan in the month?
- and others..

__Project Datasets__

- Song data: s3://udacity-dend/song_data
- Log data: s3://udacity-dend/log_data

## Song Dataset

The first dataset is a subset of real data from the Million Song Dataset. Each file is in JSON format and contains metadata about a song and the artist of that song. The files are partitioned by the first three letters of each song's track ID. For example, here are filepaths to two files in this dataset:

```txt
song_data/A/B/C/TRABCEI128F424C983.json
song_data/A/A/B/TRAABJL12903CDCF1A.json
```

And below is an example of what a single song file, TRAABJL12903CDCF1A.json, looks like.

```json
{"num_songs": 1, "artist_id": "ARJIE2Y1187B994AB7", "artist_latitude": null, "artist_longitude": null, "artist_location": "", "artist_name": "Line Renaud", "song_id": "SOUPIRU12A6D4FA1E1", "title": "Der Kleine Dompfaff", "duration": 152.92036, "year": 0}
```

## Log Dataset

The second dataset consists of log files in JSON format generated by this event simulator based on the songs in the dataset above. These simulate app activity logs from an imaginary music streaming app based on configuration settings.

The log files in the dataset you'll be working with are partitioned by year and month. For example, here are filepaths to two files in this dataset.

```txt
log_data/2018/11/2018-11-12-events.json
log_data/2018/11/2018-11-13-events.json
```

And below is an example of what the data in a log file, 2018-11-12-events.json, looks like.

```json
{"artist":null,"auth":"Logged In","firstName":"Walter","gender":"M","itemInSession":0,"lastName":"Frye","length":null,"level":"free","location":"San Francisco-Oakland-Hayward, CA","method":"GET","page":"Home","registration":1540919166796.0,"sessionId":38,"song":null,"status":200,"ts":1541105830796,"userAgent":"\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/36.0.1985.143 Safari\/537.36\"","userId":"39"}
{"artist":"Des'ree","auth":"Logged In","firstName":"Kaylee","gender":"F","itemInSession":1,"lastName":"Summers","length":246.30812,"level":"free","location":"Phoenix-Mesa-Scottsdale, AZ","method":"PUT","page":"NextSong","registration":1540344794796.0,"sessionId":139,"song":"You Gotta Be","status":200,"ts":1541106106796,"userAgent":"\"Mozilla\/5.0 (Windows NT 6.1; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/35.0.1916.153 Safari\/537.36\"","userId":"8"}
```

## 2. Database schema design and ETL pipeline defense.

![dw schema](./runtime/assets/images/sparkfy_dw_schema.jpg)

### Resources in use:

__DataFrames__

The dataframe api were used because internally spark can do richer optimizations under the hood.
This concept is equivalent to a table in a relational database and it's easer do some joins, select or agregation using SQL and dataframe api.

__S3A client__

S3A client support were used for perfomance improvement, Hadoop’s “S3A” client offers high-performance IO against Amazon S3 object store and compatible implementations. Only S3A is actively maintained by the Hadoop project itself.

### table's partitions:

- Songs table files are partitioned by year and then artist
- Time table files are partitioned by year and month
- Songplays table files are partitioned by year and month

# How to run

1. Clone this repository to your local machine

```shell
git clone https://github.com/paulo3011/sparkfy.git
```

2. Enter on the directory on that were cloned the repository:

```shell
cd ~/projects/paulo3011/sparkfy/project4-datalake-on-aws/runtime/
```

3. Install pyspark if necessary:

```shell
# create a virtual env to avoid permission problems and to isolate packages
python -m venv env
source ./env/bin/activate
# https://pip.pypa.io/en/stable/reference/pip_install/#options
# --user: Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%Python on Windows. (See the Python documentation for site.USER_BASE for full details.)
pip install pyspark==3.1.1 --user
```

4. Configure aws s3 credentials and path's:

Configure the necessary settings in the file:

- project4-datalake-on-aws/runtime/dl.cfg

5. Execute de python script

```shell
python etl.py
```

# Settings in use

## fs.s3a.multipart.size

How big (in bytes) to split upload or copy operations up into. A suffix from the set {K,M,G,T,P} may be used to scale the numeric value.

Seealso: https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/index.html

## spark.jars.packages

Comma-separated list of Maven coordinates of jars to include on __the driver and executor classpaths__. The coordinates should be groupId:artifactId:version. If spark.jars.ivySettings is given artifacts will be resolved according to the configuration in the file, otherwise artifacts will be searched for in the local maven repo, then maven central and finally any additional remote repositories given by the command-line option --repositories.

Seealso: https://spark.apache.org/docs/latest/configuration.html

## org.apache.hadoop:hadoop-aws

This jar is used to include S3A client support.

Seealso: https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/index.html

## spark.sql.adaptive.enabled

This feature coalesces the post shuffle partitions based on the map output statistics when both spark.sql.adaptive.enabled and spark.sql.adaptive.coalescePartitions.enabled configurations are true. This feature simplifies the tuning of shuffle partition number when running queries. You do not need to set a proper shuffle partition number to fit your dataset. Spark can pick the proper shuffle partition number at runtime once you set a large enough initial number of shuffle partitions via spark.sql.adaptive.coalescePartitions.initialPartitionNum configuration

## spark.sql.adaptive.coalescePartitions.enabled

When true and spark.sql.adaptive.enabled is true, Spark will coalesce contiguous shuffle partitions according to the target size (specified by spark.sql.adaptive.advisoryPartitionSizeInBytes), to avoid too many small tasks.

## spark.sql.adaptive.skewJoin.enabled

When true and spark.sql.adaptive.enabled is true, Spark dynamically handles skew in sort-merge join by splitting (and replicating if needed) skewed partitions.

# References

- https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/index.html
- https://spark.apache.org/docs/latest/configuration.html
- https://docs.qubole.com/en/latest/user-guide/engines/spark/spark-supportability.html
- http://hortonworks.com/wp-content/uploads/2016/03/asparagus-chart-hdp24.png
- https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies
- https://spark.apache.org/downloads.html
- https://stackoverflow.com/questions/60172792/reading-data-from-s3-using-pyspark-throws-java-lang-numberformatexception-for-i
- https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.5/bk_cloud-data-access/content/s3a-fast-upload-config.html
- https://stackoverflow.com/questions/31610971/spark-repartition-vs-coalesce
- https://mungingdata.com/apache-spark/broadcast-joins/
- https://www.slideshare.net/databricks/introducing-dataframes-in-spark-for-large-scale-data-science (logical plan)
- https://commons.wikimedia.org/wiki/File:SQL_Joins.svg
- https://spark.apache.org/docs/3.1.1/api/python/reference/pyspark.sql.html#functions
- https://spark.apache.org/docs/latest/sql-performance-tuning.html#adaptive-query-execution


text:
---
layout: default
title: Typography
parent: Style Guide
nav_order: 5
permalink: docs/style-guide/typography
---

# Typography
{: .no_toc }

<details open markdown="block">
  <summary>
    Table of Contents
  </summary>
  {: .text-delta }
1. TOC
{:toc}
</details>

---

## Type Scale

The type scale for the native SDK is using the system font based on device. For Android, the system font is Roboto and for iOS, the system font is San Francisco.

### Android SDK system font type scale
{: .no_toc}

![](/uploads/Android Type Scale.png)

### iOS SDK system font type scale
{: .no_toc}

![](/uploads/iOS Type Scale.png)

---

## Font Colours on Light Backgrounds

Colour is applied sparingly to text in the Native SDK to ensure WCAG AA Level standard for accessibility. Dark text is used for main blocks of text in the interface and in cases where text is overlaying light colour components.

![](/uploads/Font Colours on Light BG.png)

---

## Font Colours on Colour Backgrounds

By default, light or dark text should be used on colour backgrounds. Light text should be used on colour backgrounds when the contrast ratio meets the WCAG recommended 4.5:1 for normal text and 3:1 for large text.

![](/uploads/Font Colours on Colour BG.png)

Light and Dark text colours and sample custom text colour on colour backgrounds that pass AA level accessibility standards.

---

## Theming Examples

By default, the colour for text and icons on colour backgrounds are white for the native SDK.

gha_language: SCSS


text:
---
title: Kubernetes, Labels and Selectors
author: Brett Johnson
layout: post
categories:
  - Kubernetes
tags:
  - Kubernetes
versions:
  - software: Kubernetes
    versions:
    - v1.15.x
image: /assets/images/Kubernetes_logo.svg
---

Labels are a key/value formatted peice of metadata attached to an object within Kubernetes. Labels provide additional information about the object with relevance to the consumer or object. For example, a label can specify hardware characteristics of a node or if a workload is for testing of production.

Labels implicitly group like objects together while providing a lookup mechanism for users, controllers and external systems.

For this example, I have a deployment for a web service which runs on internal infrastructure and one which runs on DMZ infrastructure.

{% highlight yaml %}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-internal
spec:
  replicas: 4
  selector:
    matchLabels:
      run: nginx
      location: internal
  template:
    metadata:
      labels:
        run: nginx
        location: internal
    spec:
      containers:
      - image: nginx
        name: nginx
{% endhighlight %}

{% highlight yaml %}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-dmz
spec:
  replicas: 4
  selector:
    matchLabels:
      run: nginx
      location: dmz
  template:
    metadata:
      labels:
        run: nginx
        location: dmz
    spec:
      containers:
      - image: nginx
        name: nginx
{% endhighlight %}

The labels `run=nginx` and either `location=dmz` or `location=internal` are on the pods at deployment. An object can have multiple labels, but an object cannot have multiple labels with the same key. If an objects manifest has multiple label entries with the same key, the last value is applied.

The below code block shows the pods deployed by applying the above deployment manifests.

{% highlight bash %}
$ kubectl get pods --show-labels
NAME                            READY   STATUS    RESTARTS   AGE   LABELS
nginx-dmz-57cdc7848c-9bsft      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
nginx-dmz-57cdc7848c-l7clm      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
nginx-dmz-57cdc7848c-ngcqj      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
nginx-dmz-57cdc7848c-s9h6l      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
web-internal-6b444b6dd9-kd8w2   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-mxjqz   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-vm7hn   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-zwvp9   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
{% endhighlight %}

*NOTE:* The deployment controller automatically applies the `pod-template-hash` label.

Adding one or more `--selector` options to `kubectl get pods` filters the pods returned.

{% highlight bash %}
$ kubectl get pods --selector run=nginx --show-labels
NAME                            READY   STATUS    RESTARTS   AGE   LABELS
nginx-dmz-57cdc7848c-9bsft      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
nginx-dmz-57cdc7848c-l7clm      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
nginx-dmz-57cdc7848c-ngcqj      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
nginx-dmz-57cdc7848c-s9h6l      1/1     Running   0          18h   location=dmz,pod-template-hash=57cdc7848c,run=nginx
web-internal-6b444b6dd9-kd8w2   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-mxjqz   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-vm7hn   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-zwvp9   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
{% endhighlight %}

Use multiple selectors to get internal nginx pods.

{% highlight bash %}
$ kubectl get pods --selector run=nginx --selector location=internal --show-labels
NAME                            READY   STATUS    RESTARTS   AGE   LABELS
web-internal-6b444b6dd9-kd8w2   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-mxjqz   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-vm7hn   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-zwvp9   1/1     Running   0          18h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
{% endhighlight %}

The deployment controller uses a selector to identify which pods are part of a deployment. Creating a deployment also creates a replicaSet object which is monitored by the replication controller to ensure that the number of pods running matches the desired number.

Right now our deployments have 4 pods running in a ready state.

{% highlight bash %}
$ kubectl get deployments
NAME           READY   UP-TO-DATE   AVAILABLE   AGE
nginx-dmz      4/4     4            4           23h
web-internal   4/4     4            4           23h
{% endhighlight %}

{% highlight bash %}
$ kubectl get rs
NAME                      DESIRED   CURRENT   READY   AGE
nginx-dmz-57cdc7848c      4         4         4       23h
web-internal-6b444b6dd9   4         4         4       23h
{% endhighlight %}

Running `kubectl get rs -o yaml` displays the configuration of a replicaSet

{% highlight yaml %}
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  annotations:
    deployment.kubernetes.io/desired-replicas: "4"
    deployment.kubernetes.io/max-replicas: "5"
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2019-11-07T02:31:10Z"
  generation: 1
  labels:
    location: internal
    pod-template-hash: 6b444b6dd9
    run: nginx
  name: web-internal-6b444b6dd9
  namespace: default
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: Deployment
    name: web-internal
    uid: 0de8b806-c877-482d-90fb-186242024c91
  resourceVersion: "279401"
  selfLink: /apis/apps/v1/namespaces/default/replicasets/web-internal-6b444b6dd9
  uid: 3dd114b0-9005-42ee-9218-05901a816144
spec:
  replicas: 4
  selector:
    matchLabels:
      location: internal
      pod-template-hash: 6b444b6dd9
      run: nginx
  template:
    metadata:
      creationTimestamp: null
      labels:
        location: internal
        pod-template-hash: 6b444b6dd9
        run: nginx
    spec:
      containers:
      - image: nginx
        imagePullPolicy: Always
        name: nginx
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  availableReplicas: 4
  fullyLabeledReplicas: 4
  observedGeneration: 1
  readyReplicas: 4
  replicas: 4
{% endhighlight %}

Lets adust one of the labels used on a pod, so it no longer matches our `selector.matchLabels` spec and see what happens.

{% highlight bash %}
$ kubectl label pod web-internal-6b444b6dd9-kd8w2 run=notnginx --overwrite
$ kubectl get pods --selector location=internal --show-labels
$ kubectl get deployments
NAME           READY   UP-TO-DATE   AVAILABLE   AGE
nginx-dmz      4/4     4            4           23h
web-internal   3/4     4            3           23h

$kubectl get pods --selector location=internal --show-labels
NAME                            READY   STATUS    RESTARTS   AGE   LABELS
web-internal-6b444b6dd9-kd8w2   1/1     Running   0          23h   location=internal,pod-template-hash=6b444b6dd9,run=notnginx
web-internal-6b444b6dd9-mxjqz   1/1     Running   0          23h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-vm7hn   1/1     Running   0          23h   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-wbdvc   1/1     Running   0          35s   location=internal,pod-template-hash=6b444b6dd9,run=nginx
web-internal-6b444b6dd9-zwvp9   1/1     Running   0          23h   location=internal,pod-template-hash=6b444b6dd9,run=nginx$
{% endhighlight %}

The replica controller could only find 3 pods running using the matchLabel selector after we changing the `run` label on pod `web-internal-6b444b6dd9-kd8w2` and deployed another pod to remediate the issue.

Labels and selectors have many additional uses to the one covered in this post; they are a core part of the Kubernetes platform.

repository: SDBrett/jekyllblog

repo_name: SDBrett/jekyllblog


text:
ONOS Web UI - Topology View
===========================

Documentation for the Web UI _Topology View_.

[pic]: picture-icon.png
[topo]: https://wiki.onosproject.org/display/ONOS/GUI+Topology+View

([Wiki Page][topo])

### Overview
The _topology view_ provides a visual (cluster-wide) overview of the network
topology controlled by ONOS. When the topology view is instantiated it
requests topology information from the server; on receipt of that information,
the view renders a visualization of devices, hosts, and the links between them.
The view uses the web-socket connection established by the UI framework to
allow the server to drive updates to the view via topology events
(such as _addHost_, _updateDevice_, etc.)

![Sample image of 3-node cluster][pic]

### Quick help
Pressing slash `/` or backslash `\ ` will bring up the _Quick Help_ panel.
This gives an outline of the keystroke commands and mouse gestures available
to you in the _Topology View_. Pressing either of these keys again (or pressing
`Esc` will dismiss the panel).

![Image of Quick Help panel][pic]

* The top section lists global key-bindings (available on every view in the UI)
* The middle section lists view-specific bindings
  * The first and second columns show general commands for the
    _Topology View_
  * The third column shows commands for the currently active
    "topology overlay" (if any)
* The bottom section lists view-specific mouse gestures and other notes

### Toolbar
The key-bindings (listed in _Quick Help_) are also associated with buttons
on the toolbar. (This facilitates using the UI on a smart tablet).
The toolbar is initially hidden, but clicking on the arrow, or pressing
dot (`.`) will toggle its state.

The toolbar has three rows of buttons:

* The first row and half the second row provide basic functions
* The second half of the second row provides a radio-button-set
  of installed "overlays"
* The third row contains buttons contributed by the currently-active "overlay"

Hovering the mouse over a toolbar button will display a tooltip showing a
description of the button, and listing the key binding, e.g.
`Toggle Summary Panel (O)`.

#### Toolbar First Row

> note: wiki page should format this in a table, and include button icons

* `I` - show/hide ONOS cluster instance panel
* `O` - show/hide ONOS summary panel
* `D` - disable/enable details panel
  + The details panel is enabled by default, and is displayed when one or
    more topology elements are selected. Disabling this panel keeps it
    hidden even when something is selected.
* `H` - toggle host visibility
  + Shows or hides the hosts (and their links).
* `M` - toggle offline-device visibility
  + Devices that are offline (but that ONOS still knows about) are shown
    by default. This toggle will hide offline devices (and any hosts/links)
    connected to them).
* `P` - Toggle port highlighting
  + Port highlighting displays port numbers on links when the mouse
        hovers over the link. This feature can be disabled with this toggle.
* `B` - Toggle background geo map
  + The background geo-based map (if one is selected) can be shown or hidden.
* `G` - Select background geo map
  + Opens a dialog box which allows selection of a geographic region from
    a pre-defined set.
* `S` - Toggle sprite layer
  + The sprite layer (static shapes / text injected into the view) can be
    shown or hidden with this toggle.

#### Toolbar Second Row

(tbd)

#### Toolbar Third Row

(tbd)

#### Overlays
The ONOS Web UI comes bundled with the _Traffic Overlay_, which provides
traffic visualization functionality. Other applications running on ONOS
may also register topology overlays, which can be used to provide alternate
visualizations on the topology view.

> `F1` will select "no overlay active"; `F2` will select the traffic overlay.
> `F3`, `F4`, ... will select additional overlays, if they are registered and
> appear in the toolbar.

(WIP --- to be completed)

repository: opennetworkinglab/onos

gha_language: Java

repo_name: opennetworkinglab/onos


text:
# yelp\_uri

[![Build Status](https://travis-ci.org/Yelp/yelp_uri.svg)](https://travis-ci.org/Yelp/yelp\_uri)

## Installation

For a primer on pip and virtualenv, see the [Python Packaging User Guide](https://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html).

TL;DR: `pip install yelp_uri`

## Usage

Make a well-encoded URI from user input.

```python
    >>> weird_uri = 'http://münch.com/münch?one=m%C3%BCnch#m%FCnch'

    >>> import yelp_uri.encoding as E
    >>> well_encoded = E.recode_uri(weird_uri)
    >>> print(well_encoded)
    http://xn--mnch-0ra.com/m%C3%BCnch?one=m%C3%BCnch#m%C3%BCnch

```

Make a user-readable url, from either a well-encoded url or user input:

```python
    >>> print(E.decode_uri(well_encoded))
    http://münch.com/münch?one=münch#münch
    >>> print(E.decode_uri(weird_uri))
    http://münch.com/münch?one=münch#münch

```

`yelp_uri.search` has regexes for finding URLs in user-generated plaintext.

```python
    >>> plaintext = '''
    ...     Reference: http://en.wikipedia.org/wiki/Eon_(geology)
    ...     Follow @YelpCincy on Twitter (http://twitter.com/YelpCincy)
    ... '''
    >>> from yelp_uri.search import url_regex
    >>> for url in url_regex.finditer(plaintext): print(url.group())
    http://en.wikipedia.org/wiki/Eon_(geology)
    http://twitter.com/YelpCincy

```

license: Unlicense

gha_language: Python

gha_license_id: Unlicense


text:
---
layout: post
title: "Orysa;NAP1;1,OsNAP1_L1"
description: ""
category: genes
tags: [cytoplasm, nucleus, nucleocytoplasmic shuttling protein]
---

* **Information**
    + Symbol: Orysa;NAP1;1,OsNAP1_L1
    + MSU: [LOC_Os06g05660](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os06g05660)
    + RAPdb: [Os06g0149400](https://rapdb.dna.affrc.go.jp/locus/?name=Os06g0149400)

* **Publication**
    + [Interacting proteins and differences in nuclear transport reveal specific functions for the NAP1 family proteins in plants](http://www.ncbi.nlm.nih.gov/pubmed?term=Interacting proteins and differences in nuclear transport reveal specific functions for the NAP1 family proteins in plants%5BTitle%5D), 2005, Plant Physiol.

* **Genbank accession number**
    + [AJ438611](http://www.ncbi.nlm.nih.gov/nuccore/AJ438611)

* **Key message**
    + Through treatment of tobacco cells with leptomycin B and mutagenesis of nuclear export signal, we demonstrated that Nicta;NAP1;1 and Orysa;NAP1;1 shuttle between the cytoplasm and the nucleus.
    + Together, our results clearly show that Orysa;NAP1;1 is a nucleocytoplasmic shuttling protein.

* **Connection**

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


text:
#RAPPORTAGE

In deze app kan je recepten en ingredienten opzoeken kwa caloriën, ingredienten, of willekeurige recepten proberen.

![](https://github.com/iepping1/Final-Project/blob/master/docs/MainActivitySmall.png?raw=true)

## Final Overview of the diet app
![](https://github.com/iepping1/Final-Project/blob/master/docs/design1.png?raw=true)

### List of required modules and classes
| Recept|
| ----- |
|- Model1 for any non-random recipe search  > (Information about name, calory amount, id and image)|
|- Model2 for random and detailed recipes > (Information about name, vegetarian/glutenfree status, instructions, id and image)|

| Ingredient|
| ----- |
|- Model1 for initial ingredient search (Information about name, image and a placeholder text)|
|- Model2 for ingredients linked to recipes (Information about name, amount of ingredient used,, id and image) |
|- Model3 for detailed ingredients (Information about name, protein/fat/carb percentages, id and image) |

| AutoIngredientRequest |
| ------ |
| - Requests Array data from the autocomplete ingredient search endpoint |
| - Adds simple ingredients (Model1) to the Ingredient list, and to the Detail Activity if the user clicks an item on that list. |

| IngredientRequest |
| ------ |
| - Requests Object data from the extended ingredients Array inside the recipe information endpoint |
| - Adds ingredients (Model2) to the Ingredient list a user gets when they look up the ingredients of a recipe |

| RecipeRequest |
| ------ |
| - Requests Array data from multiple recipe endpoints, dependent on how the user got to the RecipeActivity (from main or ingredient activity) |
| - Receives message to determine which of two source URLs to use and what the content is (either used number of ingredients or total number of calories). |

| RandomRequest |
| ------ |
| - Requests Array data from the random recipe search endpoint, getting 5 results. |
| - Adds recipes (Model2) to the Random recipe list, and to the Recipe Detail Activity if the user clicks an item on that list. |

| IngredientDetailRequest |
| ------ |
| - Requests Object data from the food item information Data endpoint  |
| - Adds all information of the chosen ingredient (Model3) to the detail window |
| (Can only be accessed if the Ingredient was previously requested through IngredientRequest, due to a flaw in the API) |

| RecipeDetailRequest |
| ------ |
| - Requests Object data from the recipe information Data endpoints, if the user clicked on a recipe in the RecipeActivity |
| - Adds all information of the chosen recipe (Model2) to the detail window. |
| (If there are no instructions, a replacement placeholder text is given instead (No Instructions))|

| Other Modules |
| ----- |
| + Imagerequest - Helps each other request get images from the API |
| + An Adapter exists for each list in the app (Ingredient, Random & RecipeAdapter)|

#### API's and Frameworks used in the App.
All data used came from Spoonaculars food site (https://rapidapi.com/spoonacular/api/recipe-food-nutrition)
The Volley framework was used to extract JSONObject and JSONArray data from various RapidAPI endpoints.
Spoonacular divides its information across several actions. (GET, POST, SEARCH, DATA). Only the latter two were used for this app.

| List of used Spoonacular's Endpoints |
| ----- |
| https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/food/ingredients > *Has detailed Data information of all ingredients*|
| https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/food/ingredients/autocomplete > *Searches ingredients that fit a given text input the best*|
| https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/recipes > *Has detailed Data information of all recipes, including its ingredients*|
| https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/recipes/findByIngredients > *Searches recipes that use a requested ingredient*|
| https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/recipes/findByNutrients > *Searches recipes that do not exceed a requested nutrient treshold*|
| https://spoonacular-recipe-food-nutrition-v1.p.rapidapi.com/recipes/random?number=5 > *Searches 5 random recipes in the database*|

#### CHALLENGES.
Some obstacles were easy to overcome. Learning how to use the API through KEYS and subscribing to RapidAPI (for a montly fee of zero!) allowed me to access one of the most comprehensive food databases on the net.
Getting the right data was trickier, as each endpoint had its own method of storing its data. They stored their information in arraus, objects, or both. Some arrays and objects did not have names and had to be extracted more directly. Some arrays store their images with a full URL, while others did not. A lot of checks were required to streamline the visual output.
Getting the right variable to show up in the proper view proved to be a problem for a little while as well, in addition to the usual experimenting with style, state saves, dimensions and landscape views.
What required the most work was creating the link between one APi between the other. Thankfully the IDnumbers of all recipes and ingredients stayed the same throughout the database. By storing that IDnumber and passing it along as a message to the next activity, I could ensure that the user would find ingredients through recipes and vice versa. It also allowed me to (in most instances) pull up the Data endpoints of every item, regardless of which Search was used to get there.
Finally, an incredible amount of code was necessary for this project. The overall scope could be decreased a little by linking multiple searches to the same activity and request class and by declaring various ingredient/recipe models in one java class.

#### DECISIONS
Overall the app works close to what was intended, though it could have been more complex. Several features could not be added within the timeframe. (Though I gladly would have done it, if not for that). One such addition was the ability to add your favorite recipe to your own database; storing all the details of that recipe on your phone so you could pull it back up from a list just by going back to the main window. No such feature exists in the project now.
Another thing I would have liked to add was a more involved method of managing your diet. Right now you can guess how much calories you do not want to exceed and put that in as a limiter of sorts. But with an extra function, one might have been able to calculate by thenmselves how many calories they are allowed to have.
Dividing the calories between protein, carbs and fats would also have been a nice inclusion. Even if that demands a lot of information from the user as well. In general, it was possible to add more search options like finding recipes by protein percentage or whether or not they were vegetarian. But I didnt include those for the sake of keeping the app simple and not too confusing. That data can still eventually be found in the detail windows.
One regret was the choice of API. The quantity of data is a nice thing to have. But the work might have gone faster with a more streamlined database. As mentioned in the Challenges-section; one endpoint (Autocomplete Ingredient Search) lacked the id-variable, making it impossible to link it to most other endpoints (except the endpoint that searches Recipes based on an ingredients name). Because of that the IngredientDetailActivity doesnt have all of detailed information if you go there straight from the Main window. Perhaps this could have been avoided with a better API. But I was already too deep into the project to change sources halfway.
Lastly, a few stylistic touches were added in time (headers for the lists, spinners for progressbars). But the app is not very pretty to look at. Its not confusing, but I would have liked to add better backgrounds and get more creative with the spinners.

path: /Final Report.md

filename: Final Report.md


text:
# `subscription-relayer`

A single relayer server to demo how to collect Guild subscriptions from Safes using the AllowanceModule.

## How it works

The server uses the guild-app subgraph to fetch those subscriptions whose last contribution expired. Then calls the `guild.subscribe` function on the GuildApp contract to renew the subscription. If subscriber used a Safe w/AllowanceModule, the tx will be processes if there's enough allowance (allowance.amount - allowance.spent) for the current allowance period.

## Installation

```
yarn install
```

## Getting Started

### Environment Variables

Copy the `.env.sample` file and rename it to `.env`

* JSON_RPC -> RPC Endpoint (i.e. Infura)
* MNEMONIC -> Mnemonic phrase for the relayer server account (Account0 should have enough ETH to relay Txs)
* PORT -> Server port (default: 5000)
* SUBGRAPH_URL Guild App subgraph (default: https://api.thegraph.com/subgraphs/name/santteegt/gnosis-guild-app-rinkeby)

### Local Deployment

In order to deploy the server execute the command below.

```
yarn start
```

To trigger the relayer job, make a GET request to `http://localhost:5000`

## Future work

This module is just for demo purposes. In order to collect monthly subscriptions using a relayer in production, GuildApp should integrate with services lik GSN.

repository: alexkeating/gnosis-guild-app

repo_name: alexkeating/gnosis-guild-app


text:
# Macrocybe spectabilis (Peerally & Sutra) Pegler & Lodge, 1998 SPECIES

#### Status
ACCEPTED

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

#### Published in
in Pegler, Lodge & Nakasone, Mycologia 90(3): 499 (1998)

#### Original name
Tricholoma spectabile Peerally & Sutra, 1973

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
### DONT RELY ON MSF
##### Unless your only goal is to complete the box

- [ ] when ```www-data``` shell is obtained upload a linenum scripts and run it
- [ ] look for

        1. Files with unwanted permissions

        2. Files with SETUID binaries ```find / -perm -4000```

        3. Look for Cron Jobs

- [ ] always look for the users in the ```/home``` dirs, the passwords that found during the enumeartion phase will be the same password for the user as well
- [ ] ```sudo -l``` should be checked must
- [ ] Make a note of all password yoiu come accross the way to the shell and try ```su - <user>``` and try each passwords
- [ ] Keep an eye on the ```groups``` that the user belongs to
- [ ] After gaining the shell look for `network activity` of the machine
- [ ] While running the enumeration scripts, look for the network activities

repository: aniksarakash/hackthebox

path: /notes/gaining privesc(user&root).md

filename: gaining privesc(user&root).md

repo_name: aniksarakash/hackthebox


text:
# Hints

## General

- Read about keyword lists in the official [Getting Started guide][getting-started-keyword-lists].
- Read about keyword lists on [elixirschool.com][elixir-school-keyword-lists].
- Take a look at the [documentation of the `Keyword` module][keyword].

## 1. Explain wine colors

- You need to write the information given in the table as a keyword list.
- Take a look at some [examples][keyword-examples] of how to define a keyword list.

## 2. Get all wines of a given color

- There is a [built-in function][keyword-get-values] for getting the list of all values for a given key.

## 3. Get all wines of a given color bottled in a given year

- There is a [built-in function][keyword-get] for getting a single value for a given key.
- You do not need to implement the filtering of bottles on your own. You just need to conditionally use the already-implemented `filter_by_year/2` function.

## 4. Get all wines of a given color bottled in a given country

- There is a [built-in function][keyword-get] for getting a single value for a given key.
- You do not need to implement the filtering of bottles on your own. You just need to conditionally use the already-implemented `filter_by_country/2` function.

[getting-started-keyword-lists]: https://elixir-lang.org/getting-started/keywords-and-maps.html#keyword-lists
[elixir-school-keyword-lists]: https://elixirschool.com/en/lessons/basics/collections/#keyword-lists
[keyword]: https://hexdocs.pm/elixir/Keyword.html
[keyword-get-values]: https://hexdocs.pm/elixir/Keyword.html#get_values/2
[keyword-get]: https://hexdocs.pm/elixir/Keyword.html#get/3
[keyword-examples]: https://hexdocs.pm/elixir/Keyword.html#module-examples

repository: exercism/elixir

gha_language: Elixir

repo_name: exercism/elixir


text:
---
id: Const
title: Const
---

[Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts)

# Const

**Signature** (data type) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L25-L45)

```ts
export class Const<L, A> {
  constructor(readonly value: L) {}
  ...
}
```

## contramap

**Signature** (method) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L33-L35)

```ts
contramap<B>(f: (b: B) => A): Const<L, B>  { ... }
```

Added in v1.0.0

## fold

**Signature** (method) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L36-L38)

```ts
fold<B>(f: (l: L) => B): B  { ... }
```

Added in v1.0.0

## inspect

**Signature** (method) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L39-L41)

```ts
inspect(): string  { ... }
```

Added in v1.0.0

## map

**Signature** (method) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L30-L32)

```ts
map<B>(f: (a: A) => B): Const<L, B>  { ... }
```

Added in v1.0.0

## toString

**Signature** (method) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L42-L44)

```ts
toString(): string  { ... }
```

Added in v1.0.0

Added in v1.0.0

## const\_

**Signature** (constant) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L95-L99)

```ts
export const const_: Functor2<URI> & Contravariant2<URI> = ...
```

Added in v1.0.0

## getApplicative

**Signature** (function) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L85-L90)

```ts
export const getApplicative = <L>(M: Monoid<L>): Applicative2C<URI, L> => { ... }
```

Added in v1.0.0

## getApply

**Signature** (function) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L69-L76)

```ts
export const getApply = <L>(S: Semigroup<L>): Apply2C<URI, L> => { ... }
```

Added in v1.0.0

## getSetoid

**Signature** (function) [Source](https://github.com/gcanti/fp-ts/blob/master/src/Const.ts#L50-L52)

```ts
export const getSetoid = <L, A>(S: Setoid<L>): Setoid<Const<L, A>> => { ... }
```

Added in v1.0.0

repository: azoson/fp-ts

repo_name: azoson/fp-ts


text:
**AU Base Organization Profile** *[FMM Level [0](http://build.fhir.org/versions.html#maturity)]*

This profile defines an organisation administration details structure that includes core localisation concepts.

#### Identifiers
These definitions represent common data held in the Organization.identifier element:
* Healthcare Provider Identifier for Organisation - HPI-O [[1]](http://ns.electronichealth.net.au/id/hi/hpio/1.0/index.html){:target="_blank"} [[2]](http://meteor.aihw.gov.au/content/index.phtml/itemId/426830){:target="_blank"}
* My Health Record (PCEHR) Assigned Identity for Organisations - PAI-O [[1]](http://ns.electronichealth.net.au/id/pcehr/paio/1.0/index.html){:target="_blank"}
* Contracted Service Provider Number - CSP [[1]](http://ns.electronichealth.net.au/id/hi/csp/1.0/index.html){:target="_blank"}
* ASIC Identifiers - Australian Business Number, Australian Company Number, Australian Registered Body Number [[1]](https://www.abr.business.gov.au/HelpAbnFormat.aspx){:target="_blank"} [[2]](http://asic.gov.au/for-business/registering-a-company/steps-to-register-a-company/australian-company-numbers/australian-company-number-digit-check){:target="_blank"}

**Examples**

[Organisation with HPI-O](Organization-example0.html)

[Albion Hospital with Australian Business Number](Organization-example1.html)

repository: udaychandrupatla/au-fhir-base

repo_name: udaychandrupatla/au-fhir-base


text:
# Flask Dashboard

flask-dashboard is a web-application built using python flask to display data as charts on a dashboard.

![flask-dashboard screenshots](screenshot.png)

It uses ***flask app.route*** to route the url to its appropriate backend function. The html file is served using ***render_template*** function which uses jinja2 template. The html templates are rendered using ***jinja2 templating engine***, where the common structures of the plots are replicated using ***macros***.

The ***frontend*** uses ***bootstrap4*** for a responsive design and styling.

## Quick start

### Setup environment variable

This application uses only a secret key.

```shell
export SECRET_KEY="your-unique-secret-key-secret-only-to-you"
```

### Run

```shell
python app.py
```

## Roadmap

- [ ] Implment chartjs using a fetch call from the backend for passing data.
- [ ] Add a use case for the dashboard, using any open APIs available to fetch data.
- [ ] Add deployment documentation to Heroku or AWS.

repository: krish-adi/flask-dashboard

repo_name: krish-adi/flask-dashboard


text:
# Little Mix
This is a website on a music band. The girl band that goes by the name Little Mix. The website was created on 6-06-2021
### Developer
 Halima Yahya

 ## Description
 This website gives you a insight on a music band. This is a girl band called Little Mix. The website gives you a brief history about the girls as group and individually, their rise to fame. It also provides links to some of the band's music.
 ## Technologies used
 HTML and CSS have been used to develop the website.
 HTML has been used to create the main contents of the webpage, inserting images on the page and providing music links of the band.
 Css has been used to make the page visually appealing by use of different colors, changing font types and also adding animated slides to make the images change fromtime to time.
 ### licence
 Copyright <2021> Halima Yahya

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

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

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


text:
#Pepper Autocomplete

![Pepper Autocomplete Screenshot](https://pepper-autocomplete.com/static/images/pepper/python_example.gif)

Search millions of lines of open source code while you type.

Install:
```bash
apm install pepper-autocomplete
```

Toogle AutoComplete window:

Press `CTRL-0` in editor to open Preview.

Auto-Complete 'Tab-complete':

Press `CTRL-1` in editor to autocomplete.


text:
# IML-Mini-Project-5
Data and Task: Data selected for the mini project is Young-People-Survey dataset and the task for this mini project is to predict how suitable a person is to work as a student volunteer to help Alzheimer’s patient by predicting how empathetic he/she is.

INSTRUCTIONS:
1. hw5_miniproject folder includes src and data folder. src folder includes the python notebook file.
2. hw5_miniproject also includes other files such as Project.py file for code evaluation (Kindly change the relative path of the responses.csv file), Readme file, and the project report.


text:
Outlined Paper

```jsx
import Paper from "./Paper";

<Paper variant="outline" padding="0 1rem">
  <h1>hello there..!</h1>
  <p>this is an outlined paper</p>
</Paper>;
```

Elevated Paper

```jsx
import Paper from "./Paper";

<Paper variant="elevate" padding="1rem" borderRadius="0.2rem">
  <h1>hello there..!</h1>
  <p>this is an elevated paper</p>
</Paper>;
```

repository: smabbett/artix-component-library

repo_name: smabbett/artix-component-library


text:
BukkitDev Page: http://dev.bukkit.org/bukkit-plugins/landlord/

Landlord
========

Landlord is a bukkit plugin for players to prevent against griefing, stealing, and animal kills in a simplified manner.

Purpose
---------
Landlord aims to keep the minecraft experience simple and fluid for players while also protecting their land. The idea is for this plugin to protect player builds with minimal gameplay interference, while also allowing them to tweak the protection details in a simple and user-friendly way.

Functionality
---------------
Players claim land in chunks at a time for a configurable cost. That's all a player needs to do to protect their builds within that chunk. Each area of claimed land will have a very basic permissions system that users can choose to tweak with but also not touch if it isn't desired.

repository: jcdesimp/Landlord

branch_name: refs/heads/develop

repo_name: jcdesimp/Landlord


text:
##  SO Pick List (SO.R17)

<PageHeader />

**Form Details**
[ Form Details ](SO-R17-1/README.md)

**Purpose**
The SO.R17 procedure is used to print sales order picking lists. The picking
list includes the part numbers and quantities of each item to be included on
the order. The report provides a blank column that may be used to write in the
actual quantity pulled for each item. You may select specific orders to be
printed or all eligible orders. The user has the option to print the order
quantity or the open quantity on the

**Frequency of Use**
Sales order picking lists are usually printed in situations where the items to
be shipped are pulled from finished goods inventory. The frequency depends
upon the daily activity level of the business.

**Prerequisites**
Creation of SO records.

**Data Fields**

**Sales Order** The number of the sales order to be pulled.
**SO Date** The date the order was placed.
**Ship Via** The method of shipment or carrier to be used.
**Cust#** The sold to customer number.
**Name** The name of the customer.
**Ship To** The ship to address.
**Line** The line item numbers of the items.
**Part Number** The part number of the item to be shipped.
**Description** The description of the item to be shipped.
**Invloc** The inventory location from which the items are to be pulled.
**Order or Open Qty** Contains either the order or open qty, as selected by
the user.
**Pick Qty** A blank space provided for the person pulling the items to
indicate the actual quantity pulled.

<badge text= "Version 8.10.57" vertical="middle" />

<PageFooter />

repository: zumasys/docs

gha_language: JavaScript

repo_name: zumasys/docs


text:
# Project-for-52167-Programming-Scripting

## Final Project

### Background & data summary

The Iris dataset was collected by Edgar Anderson to investigate the morphologic variation of three classes (species) of Irises in Gaspé Peninsula (1). Fisher used this dataset in 1936 to discriminate between the classes (2). This multivariate data set records four variables of three classes of Iris (*Iris Setosa*, *Iris Versicolour*, *Iris Virginica*). Each class of Iris has 50 replicates, giving a total of 150 samples in the dataset. Four flower variables, as well as Iris class were recorded. Here each row representas a sample and each column represents a variable measured (3):

1.	sepal length (cm)
2.	sepal width (cm)
3.	petal length (cm)
4.	petal width (cm)
5.	Iris class

This dataset is frequently used as a demonstration dataset for teaching basic programming for data analytics and machine learning.

#### Exploration of data in python

First a dictionary was defined for the dataset called “iris_class”. This classified the three classes of iris and their samples for future use. Next, basic data exploration was executed using the Numpy library (4), this included minimum, maximum and mean (5) of each class of iris.

Both of these scripts were printed in the command line to check for errors. To allow for easier visualization, this data was then exported into a csv file (see attached iris_output.csv).

Next the data was graphed, as a basic x,y plot, using the Matplotlib library (4, 5). First six individual figures were plotted for all combinations of sepal length, sepal width, petal length, petal width, as x,y plots. The three iris classes were plotted as three different colours. As this was cumbersome, all six plots were included in one figure, with one legend.

[Python file](https://github.com/rochelle-fritch/Project-for-52167-Programming-Scripting/blob/master/Project.py)

#### Results from data exploration

From this basic data exploration we can see the two classes of iris, *Iris versicolor* and *Iris virginica*, are morphologically similar, whereas *Iris setosa* is quite distinct (Figure 1, Table 1).

*I. setosa* has both a shorter sepal and petal length, smaller petals overall, in length and width, and wider sepals compared the two other classes. *I. versicolor* has slightly smaller petals in length and width compared to *I. virginica*.

##### Table 1. Showing the minumum, maximum and mean for sepal and petal length and width (S = Sepal, P = Petal, L = Length, W = Width) for three classes of iris.

Iris class      | SL Min | SL Max | SL Mean | SW Min | SW Max | SW Mean | PL Min | PL Max | PL Mean | PW Min | PW Max | PW Mean
:-------------: | :----: | :----: | :-----: | :----: | :----: | :-----: | :----: | :----: | :-----: | :----: | :----: | :-----:
Iris-setosa     | 4.3    | 5.8    | 5.006   | 2.3    | 4.4    | 3.418   | 1      | 1.9    | 1.464   | 0.1    | 0.6    | 0.244
Iris-versicolor | 4.9    | 7      | 5.936   | 2      | 3.4    | 2.77    | 3      | 5.1    | 4.26    | 1      | 1.8    | 1.326
Iris-virginica  | 4.9    | 7.9    | 6.588   | 2.2    | 3.8    | 2.974   | 4.5    | 6.9    | 5.552   | 1.4    | 2.5    | 2.026

[CSV output file](https://github.com/rochelle-fritch/Project-for-52167-Programming-Scripting/blob/master/iris_output.csv)

![alt text](https://github.com/rochelle-fritch/Project-for-52167-Programming-Scripting/blob/master/Figure_1.png)
##### Figure 1. Six graphs of all combinations of sepal length, sepal width, petal length and petal width versus each other for three classes of iris.
[Figure_1.png](https://github.com/rochelle-fritch/Project-for-52167-Programming-Scripting/blob/master/Figure_1.png)

### References

1.	[Anderson, E. (1936) The Species Problem in Iris. Annals of the Missouri Botanical Garden, 23, 457-509.](https://www.jstor.org/stable/2394164?seq=1#page_scan_tab_contents)
2.	[Fisher, R.A. (1936) The use of multiple measurements in taxonomic problems. Annals of Eugenics, 7, 179-188.](https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.1469-1809.1936.tb02137.x)
3.	[Fisher, R.A. (1936) The Iris dataset.](http://archive.ics.uci.edu/ml/datasets/Iris)
4.	[NumPy](http://www.numpy.org/)
5.	[NumPy tutorial](https://docs.scipy.org/doc/numpy/user/quickstart.html)
6.	[Matplotlib](https://matplotlib.org/)
7.	[Matplotlib tutorial](https://matplotlib.org/tutorials/index.html)


text:
# Web Audio Tools 2015

"Web Audio Tools" presentation for the [first international Web Audio Conference](http://wac.ircam.fr/) in Paris, France.

[view slides](http://jsantell.github.io/web-audio-tools-2015)

## Abstract

As technologies evolve and mature, proper tooling is needed to increase adoption and combat complexity, and web audio is no exception.

An overture on the state of web audio tools, we will explore using both browser developer tools that take advantage of privileged platform code, and cross-browser drop-in libraries to provide introspection of the state of an audio context and nodes.  These tools can help beginners understand a complex new API, save a developer’s time debugging, and help browser implementers optimize their platform.

Attendees will leave with the knowledge of what tools are out there, workflows for inspecting, fixing, and optimizing a web audio environment, and how to make their own tools for a specific use case.

## License

The MIT License (MIT), Copyright (c) 2015 Jordan Santell


text:
---
layout: post
title:  "CSS level 4: matches selector"
description: "Based on a list of arguments, selecting elements easier."
type: Post
date: 2016-03-07
image: "https://cloud.githubusercontent.com/assets/1345662/13560552/4958f4e4-e3ff-11e5-8de4-20372d14ab0b.jpg"
alt: "A wooden box full of nuts"
lang: en
url_en: /matches-selector-css-4/
url_br: /css-4-seletor-matches/
---

CSS3 was already something really cool. Now, in version 4, or better saying, in *level 4*, as it will be divided from now, CSS has much more features. One of them is the `:matches` selector.

Using it, we could substitute something like that:

```css
div .highlight,
footer .highlight {
  color: blue;
}
```

For that:

```css
:matches(div, footer) .highlight {
  color: blue;
}
```

In other words, we get every `highlight` class that are children of a `div` or `footer`.

We could even make the inverse way, as in the example below: we select all `p` elements that have the `success` class or that is `first-child`.

```css
p:matches(:first-child, .success) {
  color: green;
}
```

See the Pen :matches selector by Raphael Fabeni (@raphaelfabeni) on CodePen.

[Here](http://codepen.io/raphaelfabeni/pen/LNGZYx/) the link with the example above.

Do you like it? Did I write something stupid? Do you want to improve? Open an [issue](https://github.com/raphaelfabeni/raphaelfabeni.github.io/issues) mentioning the post and let's talk about it.


text:
This folder contains code to evaluate correspondences on the TOPKIDS dataset using GRAMPA method.
The complete TOPKIDS dataset can be downloaded on vision.in.tum.de/~laehner/shrec16/.
See Section 3.3 in the paper https://proceedings.icml.cc/static/paper_files/icml/2020/1778-Paper.pdf for details.

1. Use shrec_grampa.m to calculate the geodesic error of gramps for matching kid shape i to shape j.

2. comparison.m evaluates Grampa after the princeton protocol and puts it in comparison to all methods that participated in the SHREC contest.

At first run, uncomment line 20 to generate grampa matching results for all 90 pairs of test graphs
curves(k,:)=shrec_grampa(i,j,path_kids,track);

At second run, comment line 20 and run the code.
A figure will be automatically created.

Please cite the following paper if you use this code for your research:

@article{FMWX19a,
  title={Spectral Graph Matching and Regularized Quadratic Relaxations {I}: The {G}aussian Model},
  author={Zhou Fan and Cheng Mao and Yihong Wu and Jiaming Xu},
  journal={arxiv preprint arXiv:1907.08880},
  year={2019}
}

@article{FMWX19b,
  title={Spectral Graph Matching and Regularized Quadratic Relaxations {II}: {Erd\H{o}s-R\'{e}nyi} Graphs and Universality},
  author={Zhou Fan and Cheng Mao and Yihong Wu and Jiaming Xu},
  journal={arxiv preprint arXiv:1907.08883},
  year={2019}
}

@InProceedings{SHREC16-topology,
	title = "SHREC’16: Matching of Deformable Shapes with Topological Noise",
	author = "Z. L\"ahner and E. Rodol\`a and M. M. Bronstein and D. Cremers and O. Burghard and L. Cosmo and A. Dieckmann and R. Klein and Y. Sahillioglu",
	booktitle = "Proc. of Eurographics Workshop on 3D Object Retrieval (3DOR)",
	year = "2016"
}

repository: xjmoffside/grampa

repo_name: xjmoffside/grampa


text:
# Roomvation
Roomvation is an ASP.NET MVC web application designed to keep track of conference room reservations.

### Assumptions
  - there is only one room in the system,
  - the administrator activates and locks users' accounts,
  - user needs an active account to be able to create a new reservation,
  - reservations can't overlap,
  - every reservation can be edited only before the meeting starts,
  - the creator can add other active users as meeting participants,
  - every reservation can be cancelled/deleted from the system at any time.

### Technology
 - ASP.NET MVC v5.2.3
 - Entity Framework v6.1.3 (Code First migrations)
 - Bootstrap CSS v4.0.0-alpha3
 - jQuery v3.1.1

repository: gmackiewicz/Roomvation

repo_name: gmackiewicz/Roomvation


text:
# myReads - Udacity Nanodegree project 1

A bookshelf app that allows you to select and categorize books you have read,
are currently reading, or want to read.
It also allows you to search through a database of books and add books to one of the shelfs.

## Getting Started

In order to install all the necessary node modules,
you need to run npm install

```
npm install
```

### Running a local environment

To run the app on localhost please run the following command.
That should open a browser window with the landing page of the app.

```
npm start
```

## Deployment

In order to create the production code, by compiling and transpiling the js,
run the following comming

```
npm run build
```

## Built With

* [React] (https://reactjs.org/)

## Authors

* **Sotiris Gordatos** (https://github.com/Sotrek)

## License

The MIT License (MIT)

Copyright (c) 2018 Sotiris Gordatos

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

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

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

repository: Sotrek/ReactND

repo_name: Sotrek/ReactND


text:
## :bell: Important

**Please notice that the following comparison data may not match with the latest releases of Neutralinojs, NW.js, and Electron. This benchmark was done in 2018. Please check https://github.com/Elanis/web-to-desktop-framework-comparison for a better benchmark and comparison.**

# Why Neutralinojs is better for lightweight apps? — proof

[Neutralinojs](https://github.com/neutralinojs/neutralinojs) framework was evaluated in comparison with Electron and NW.js considering disk consumption, memory consumption, easiness of development workflow and portability.

### Sample applications

Simple `Hello World` type application is used in each framework on Linux and Windows for the evaluation.

Figure 1: Sample cross-platform apps written using Electron, NW.js and Neutralino respectively on Linux.

Figure 2: Sample cross-platform apps written using Electron, NW.js and Neutralino respectively on Windows.

#### OS details

- Ubuntu 18.04.1 LTS
- Windows 10 Enterprise

## 1. Disk Consumption

### Node Webkit

#### Linux

```
Zipped SDK size                   95.8 MB
Project Size                      1 KB
Application bundle                97.2 MB
Application bundle (zipped)       36.9 MB
File count of project             5
```

#### Windows

```
Zipped SDK size                   72.7 MB
Project size                      2 KB
Application bundle                78.1 MB
Application bundle (zipped)       32.3 MB
File count of project             5
```

### Electron

#### Linux

```
Build package                     51.53 MB
node_modules count                147
File count of project             1539
Project size                      136.4 MB
Application bundle                128.6 MB
Application bundle (zipped)       51.5 MB
```

#### Windows

```
Build package                     53.16 MB
node_modules count                180
File count of project             1368
Project size                      125 MB
Application bundle                118 MB
Application bundle (zipped)       50.4 MB
```

### Neutralinojs

#### Linux

```
Portable SDK size                 5.8 MB
Portable SDK size (zipped)        1.1 MB
File count                        11
```
#### Windows

```
Portable SDK size                 5.53 MB
Portable SDK size (zipped)        1.01 MB
File count                        11
```
SDK and application bundle are similar things in Neutralino. We will be introducing an application builder CLI soon!. Alternatively project can be zipped as the application bundle. Special case is that a single application bundle will work on both platforms unlike other frameworks do.

See [proof](https://github.com/neutralinojs/evaluation/tree/master/files/disk/proof) directory for sample sources and binary releases.

## 2. Memory consumption

### NW.js

```
Linux                           ~ 40 - 42 MB
Windows                         ~ 40 - 45 MB
```

### Electron

```
Linux                           ~ 62 - 65 MB
Windows                         ~ 45 - 50 MB
```

### Neutralinojs

```
Linux                           ~ 8 - 9 MB
Windows                         ~ 6 - 7 MB
```

## 3. Easiness of Development Workflow

### Electron

### NW.js

### Neutralino

*Note - [neu-cli](https://neutralino.js.org/docs/#/tools/cli) offers an automated development workflow*

### Neutralino Debugging

Neutralino app is served via a socket. Therefore debugging can be done using a web browser.

Figure 3: Debugging a Neutralino based app using Google Chrome.

## 4. Performance

Neutralino's performance basically depends on the performance of C++ server implementation. Here is the result for `Neutralino.os.runCommand` for `ls` command for 100 samples. It took average 6 miliseconds to respond `ls` bash command.

| Label        | # Samples | Average | Median | 90% Line | 95% Line | 99% Line | Min | Max | Error % | Throughput | Received KB/sec | Sent KB/sec |
|--------------|-----------|---------|--------|----------|----------|----------|-----|-----|---------|------------|-----------------|-------------|
| HTTP Request | 100       | 6       | 6      | 8        | 9        | 11       | 4   | 13  | 0.000%  | 87.87346   | 12.36           | 22.05       |
| TOTAL        | 100       | 6       | 6      | 8        | 9        | 11       | 4   | 13  | 0.000%  | 87.87346   | 12.36           | 22.05       |

Result was captured by [Apache JMeter](https://jmeter.apache.org/) using [this](https://github.com/neutralinojs/evaluation/blob/master/files/testing/REST/api_test.jmx) test plan. See more details about this report [here](http://www.testingjournals.com/understand-summary-report-jmeter/).

## 5. Conclusion

According to the results of this expertiment Neutralino can be used as a lightweight alternative for Electron and NW.js. Furthermore another experiment needs to be done by using somewhat large cross platform application such as [draw.io](https://github.com/jgraph/drawio). There are some drawbacks such as Windows edition is based on IE etc.

## 6. Contribution

Refer guidelines [here](https://github.com/neutralinojs/neutralinojs#contribution)


text:
# arborium

https://arborium-forum.web.app

Source code for the client and server server side

To initialize, start with a Routify.dev template

Authentication is firebase, DB is Firestore, Google cloud functions

It is propabely very poorly coded (I've been into this for only 3 month) so sort out what you want to keep and throw away

It has been thought to handle a lot of votes on the messages(each node in the tree).
When loading a tree, we are not fetching a list of individual messages, were are fetching a document representing the tree itself, or a skimmed version of the tree, to reduce the number of reads to the DB.

The format of a tree document is basically a compressed version of a JSON file of a list of javascript object, each of these objects containing
 - the title of a given message (and not the content)
 - the ID of its parent message in the tree

Every time someone votes on a message, there are several things that have to be done:
 - the user's document in the DB needs to be updated with the new vote
 - the message itself needs to have its vote counter updated
 - the tree document must receive the new message if the vote corresponds to a new message
 - the skimmed tree document must receive the same input, and be recomputed in case the new vote triggers that message (and possibly the whole subsequent branch) to be removed from the skimmed tree

My solution considering the firestore limitation of 1 write/second per single document was to use a sub-collection called "votesTemp" on each user document.
Being a subcollection as firestore defines it, it means in one query we can access all the new votes that are scattered among all the user documents.
These "votesTemp" documents will be used to update the user's vote on a specific message and update the vote counters on the designated message, which wil trigger a recomputing of the tree and skimmed tree.

This is a heavy process requiring cloud functions. In order not to trigger that process every time a user compulsively changes his vote on a message, or in case there are 100 people voting on a message at the same time, we let the new votes accumulate in that "voteTemp" subcollection, and we run a scheduled function every 2 minutes that:
 - collects the whole subcollection,
 - filters out the irrelevant votes in case of one user switching his vote 10 times in the last two minutes,
 - updates each user's new vote on each user document,
 - sums up, per single message, among the recently filtered new votes subcollection, the increments to be applied to its votes counters
 - recomputes the trees after all the mesage documents have been updated

the files for the cloud functions that handle this process are the 3 typescript files in the "server" folder

security rules are probably flawed, check before using

Once again this is probabely poor work, first time attempt at coding a website, and might never grow more than just an example for real developers to pursue the idea.. So fork at will, make it decent, make money, whatever..

Questions welcome to<EMAIL_ADDRESS>


text:
# Module Documentation

## Module Control.Monad.Maybe.Trans

This module defines the `MaybeT` monad transformer.

#### `MaybeT`

``` purescript
newtype MaybeT m a
  = MaybeT (m (Maybe a))
```

The `MaybeT` monad transformer.

This monad transformer extends the base monad, supporting failure and alternation via
the `MonadPlus` type class.

#### `runMaybeT`

``` purescript
runMaybeT :: forall m a.  (Monad m) => (m (Maybe a) -> m (Tuple (Maybe a) w)) -> MaybeT m a -> MaybeT m (Tuple a w)
```

#### `liftPassMaybe`

``` purescript
liftPassMaybe :: forall m a w. (Monad m) => (m (Tuple (Maybe a) (w -> w)) -> m (Maybe a)) -> MaybeT m (Tuple a (w -> w)) -> MaybeT m a
```

#### `liftCallCCMaybe`

``` purescript
liftCallCCMaybe :: forall m a b. (((Maybe a -> m (Maybe b)) -> m (Maybe a)) -> m (Maybe a)) -> ((a -> MaybeT m b) -> MaybeT m a) -> MaybeT m a
```

gha_language: PureScript


text:
# chartpress

Automate building and publishing helm charts and associated images.

This is used as part of the JupyterHub and Binder projects.

Chartpress will:

- build docker images and tag them with the latest git commit
- publish those images to DockerHub
- rerender a chart to include the tagged images
- publish the chart and index to gh-pages

A `chartpress.yaml` file contains a specification of charts and images to build.

For example:

```yaml
charts:
  # list of charts by name
  # each name should be a directory containing a helm chart
  - name: binderhub
    # the prefix to use for built images
    imagePrefix: jupyterhub/k8s-
    # tag to use when resetting the chart values
    # with --reset command-line option (defaults to "set-by-chartpress")
    resetTag: latest
    # the git repo whose gh-pages contains the charts
    repo:
      git: jupyterhub/helm-chart
      published: https://jupyterhub.github.io/helm-chart
    # additional paths (if any) relevant to the chart version
    # outside the chart directory itself
    paths:
      - ../setup.py
      - ../binderhub
    # images to build for this chart (optional)
    images:
      binderhub:
        # Context to send to docker build for use by the Dockerfile
        # (if different from the current directory)
        contextPath: ..
        # Dockerfile path, if different from the default
        # (may be needed if contextPath is set)
        dockerfilePath: images/binderhub/Dockerfile
        # path in values.yaml to be updated with image name and tag
        valuesPath: image
        # additional paths (if any) relevant to the image
        # outside the image directory itself
        paths:
          - ../setup.py
          - ../binderhub
```

## Usage

In a directory containing a `chartpress.yaml`, run:

    chartpress

to build your chart(s) and image(s). Add `--push` to publish images to docker hub and `--publish-chart` to publish the chart and index to gh-pages.

```
usage: chartpress [-h] [--commit-range COMMIT_RANGE] [--push]
                  [--publish-chart] [--tag TAG]
                  [--extra-message EXTRA_MESSAGE]

Automate building and publishing helm charts and associated images. This is
used as part of the JupyterHub and Binder projects.

optional arguments:
  -h, --help            show this help message and exit
  --commit-range COMMIT_RANGE
                        Range of commits to consider when building images
  --push                push built images to docker hub
  --publish-chart       publish updated chart to gh-pages
  --tag TAG             Use this tag for images & charts
  --extra-message EXTRA_MESSAGE
                        extra message to add to the commit message when
                        publishing charts
```

### Caveats

#### Shallow clones

Chartpress detects the latest commit which changed a directory or file when determining the tag to use for charts and images.
This means that shallow clones should not be used because if the last commit that changed a relevant file is outside the shallow commit range, the wrong tag will be assigned.

Travis uses a clone depth of 50 by default, which can result in incorrect image tagging.
You can [disable this shallow clone behavior](https://docs.travis-ci.com/user/customizing-the-build/#Git-Clone-Depth) in your `.travis.yml`:

```yaml
git:
  depth: false
```

repository: SwissDataScienceCenter/chartpress

repo_name: SwissDataScienceCenter/chartpress


text:
# OrientJS - `select()`

Selection queries in OrientJS are those used to fetch data from the database, so that you can operate on it with your application.  The method is comparable to the [`SELECT`](../sql/SQL-Query.md) command in the OrientDB Console.

## Working with Selection Queries

In OrientJS, fetching data from the database uses the `select()` method.  The examples below operate on a database of baseball statistics, which has been initialized on the `db` variable.

### Selecting Records

Use the `select()` method to fetch records from the database.  For instance, say you want a lit of all players with a batting average of .300.

```js
var hitters = db.select().from('Player')
   .where({
      ba: 0.3
   }).all()
   .then(
      function(select){
         console.log('Hitters:', select);
      }
   );
```

### Searching Records

Using the `containsText()` method, you can search records for specific strings.  For instance, say that a user would like information on a particular player, but does not remember the player's full name.  So, they want to fetch every player with the string `Ty` in their name.

```js
var results = db.select().from('Player')
   .containsText({
      name: 'Ty'
   }).all()
   .then(
      function(select){
         console.log('Found Players:', select);
      }
   );
```

### Using Expressions

In the event that you would like to return only certain properties on the class or use OrientDB functions, you can pass the expression as an argument to the `select()` method.

For instance, say you want to know how many players threw right and batted left:

```js
var count = db.select('count(*)').from('Player')
   .where({
      threw:  'right',
      batted: 'left'
   }).scalar()
   .then(
      function(select){
         console.log('Total:', select);
      }
   );
```

### Returning Specific Fields

Similar to expressions, by passing arguments to the method you can define a specific field that you want to return.  For instance, say you want to list the teams in your baseball database, such as in building links on a directory page.

```js
var teams = db.select('name')
   .from('Teams').all()
   .then(
      function(select){
         console.log('Loading Teams:', select);
      }
   );
```

### Specifying Default Values

Occasionally, you may encounter issues where your queries return empty fields.  In the event that this creates issues for how your application renders data, you can define default values for certain fields as OrientJS sets them on the variable.

For instance, in the example of the baseball database, consider a case where for some historical players the data is either currently incomplete or entirely unavailable. Rather than serving null values, you can set default values using the `defaults()` method.

```js
var player = db.select('name').from('Player')
   .defaults({
      throws: 'Unknown',
      bats: 'Unknown'
    }).all();
```

repository: orientechnologies/orientdb-docs

gha_language: CSS

repo_name: orientechnologies/orientdb-docs


text:
# SessionHound & GroupHound
A pair of scripts to import session and local group information that has been collected from alternate data sources into BloodHound's Neo4j database.

## Problem
SharpHound's privileged session collection requires an account with elevated permissions to operate. When using BloodHound as a Blue tool to locate and resolve misconfigurations and identify dangerous behaviors, detailed and accurate session information is highly beneficial. An account that has local administrative rights on all endpoints is a security risk.

## Solution
Session information can be obtained from alternate sources. This information can be obtained by collecting the information from centrally logged local Windows Security Events or from other tools that can poll information about logged on users from live endpoints. It can be collected into a spreadsheet and added to the BloodHound database via Cypher queries.

## Setup
```
git clone https://github.com/xenoscr/SessionHound.git SessionHound
cd SessionHound
pip install -r requirements.txt
```

## SessionHound Usage
```
usage: SessionHound.py [-h] [--neo4j-uri NEO4J_URI] [-u USERNAME]
                       [--password PASSWORD] [--debug] [--dry-run]
                       csv

Import computer session data from a CSV file into BloodHound's Neo4j database.
The CSV should have two colums matching the following header structure:
['username', 'hostname']

positional arguments:
  csv                   The path to the CSV file containing the session data
                        to import.

optional arguments:
  -h, --help            show this help message and exit
  --neo4j-uri NEO4J_URI
                        Neo4j connection string (Default:
                        bolt://localhost:7687 )
  -u USERNAME, --username USERNAME
                        Neo4j username (Default: neo4j)
  --password PASSWORD   Neo4j password. If not provided on the command line,
                        you will be prompted to enter it.
  --debug               Print debug information.
  --dry-run             Verify connectivity to neo4j and check for CSV parsing
                        issues, but don't actually import data
```

## SessionHound CSV File Format
The CSV file needs to have two columns:
- username: The User Principal Name (UPN). i.e<EMAIL_ADDRESS>- hostname: The Host's FQDN. i.e. HOSTNAME.EXAMPLE.COM

### SessionHound CSV Example
```
username,hostname
user01@example.com,host01.example.com
user02@example.com,host01.example.com
user02@example.com,host02.example.com
```

## GroupHound Usage
```
usage: GroupHound.py [-h] [--neo4j-uri NEO4J_URI] [-u USERNAME]
                     [--password PASSWORD] [--debug] [--dry-run]
                     csv {adminto,canrdp,canpsremote,executedcom}

Import computer local group data from a CSV file into BloodHound's Neo4j
database. The CSV should have three colums matching the following header
structure: ['username', 'hostname', 'type']

positional arguments:
  csv                   The path to the CSV file containing the session data
                        to import.
  {adminto,canrdp,canpsremote,executedcom}
                        The access type: AdminTo, CanRDP, CanPSRemote, or
                        ExecuteDCOM.

optional arguments:
  -h, --help            show this help message and exit
  --neo4j-uri NEO4J_URI
                        Neo4j connection string (Default:
                        bolt://localhost:7687 )
  -u USERNAME, --username USERNAME
                        Neo4j username (Default: neo4j)
  --password PASSWORD   Neo4j password. If not provided on the command line,
                        you will be prompted to enter it.
  --debug               Print debug information.
  --dry-run             Verify connectivity to neo4j and check for CSV parsing
                        issues, but don't actually import data
```

## GroupHound CSV File Format
The CSV file needs to have three columns:
- username: The User Principal Name (UPN). i.e<EMAIL_ADDRESS>- hostname: The Host's FQDN. i.e. HOSTNAME.EXAMPLE.COM
- type: The object type. Group or User

### Groupound CSV Example
```
username,hostname,type
user01@example.com,host01.example.com,User
user02@example.com,host01.example.com,User
group01@example.com,host02.example.com,Group
group02@example.com,host02.example.com,Group
```

**NOTE:** If using Excel to prepare your CSV, saving the CSV in Unicode/UTF-8 format will cause some errors. To avoid these issues use the **CSV (Comma delimited)** option and not **CSV UTF-8 (Comma delimited)**.

repository: xenoscr/SessionHound

repo_name: xenoscr/SessionHound