text:
# decentraland-crypto-utils

This library includes a number of helpful pre-built tools that help you deal with common requirements that involve and interacting with data on the blockchain.

- [Avatar](#Avatar)
	- [Get user information](#get-user-information)
	- [Get user inventory](#get-user-inventory)
	- [Do user has an item](#do-user-has-an-item)
	- [Do user has one of those items](#do-user-has-one-of-those-items)
- [ERC20](#ERC20)
	- [Send ERC20](#send-ERC20)
	- [Send MANA](#send-MANA)
	- [Get allowance](#get-allowance)
	- [Set approval](#set-approval)
- [ERC721](#ERC721)
	- [Transfer ERC721](#transfer-ERC721)
	- [Get allowance](#get-allowance)
	- [Set approval](#set-approval-for-all)
- [Marketplace](#Marketplace)
	- [Search](#search)
	- [Create order](#create-order)
	- [Execute order](#execute-order)
	- [Cancel order](#cancel-order)
	- [Authorizations](#authorization)
- [Third Parties](#Third-Parties)
	- [Kyberswap](#Kyberswap)
		- [Retrieve currencies](#retrieve-currencies)
		- [Retrieve  a currency](#retrieve-a-currency)
		- [Get pairs](#get-pairs)
		- [Get quote](#get-quote)
		- [Get rate](#get-rate)
		- [Exchange](#exchange)

## Using the Crypto library

To use any of the helpers provided by the utils library

1. Install it as an `npm` package. Run this command in your scene's project folder:

```
npm install https://github.com/HPrivakos/decentraland-crypto-utils.git
```

2. Import the library into the scene's script. Add this line at the start of your `game.ts` file, or any other TypeScript files that require it:

```ts
import crypto from '../node_modules/decentraland-crypto-utils/index'

```

If you'll only be using part of this library in your scene, we recommend instead only importing the specific relevant subfolder/s. For example:

```ts
import mana from '../node_modules/decentraland-crypto-utils/mana/index'
import currency from '../node_modules/decentraland-crypto-utils/currency/index'
import nft from '../node_modules/decentraland-crypto-utils/nft/index'
import marketplace from '../node_modules/decentraland-crypto-utils/marketplace/index'
import wearable from '../node_modules/decentraland-crypto-utils/wearable/index'
```

3. In your TypeScript file, write `crypto.` and let the suggestions of your IDE show the available helpers.

## MANA Operations

### Send MANA to an address

To send MANA to a predefined address, use the `send()` function. This function requires the following arguments:

- `toAddress`: What ethereum address to send the MANA to
- `amount`: How many MANA tokens to send

```ts
crypto.mana.send(`0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`, 100)
```

For example, you could have a button that requests players to make a MANA payment to the scene cretor's personal wallet. The button could open a door, but only once the transaction is sent to pay the fee.

```ts
button.addComponent(new OnPointerDown(e => {
	crypto.mana.send(`0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`, 100).then(
		// open door
	)
  }
))
```

In this scenario, when players click on the button, they would be prompted by Metamask to accept the transaction, paying the required MANA sum plus an ETH gas fee dictated by the market at that time . Once that transaction is accepted on Metamask, the door will open.

> Note: What's in the `.then()` argument gets called once the transaction is

### Get a player's MANA Balance

crypto.mana.myBalance()

crypto.mana.balance()

## Other Currencies

## nfts

## The Marketplace

## Trading tokens with Kyberswap

## Calling Other contracts

## Avatar

### Get user information

To get information about an user, use the `getUserInfo` function.

`getUserInfo` has one optional argument:

- `address`: `string` which is the ETH address of an user

If an address is not specified, the function will use the address of the user

This example retrieves to data of an address and print the username in the console:

```ts
import avatar from '../node_modules/decentraland-crypto-utils/avatar/index'

avatar
  .getUserInfo('0x521b0fef9cdcf250abaf8e7bc798cbe13fa98692')
  .then(userInfo => {
    log(userInfo.metadata.avatars[0].name)
  })
```

### Get user inventory

To get information about an user, use the `getUserInventory` function.

`getUserInventory` has one optional argument:

- `address`: `string` which is the ETH address of an user

If an address is not specified, the function will use the address of the user

This example retrieves to data of an address and print a list of items in the console:

```ts
import avatar from '../node_modules/decentraland-crypto-utils/avatar/index'

avatar
  .getUserInventory('0x521b0fef9cdcf250abaf8e7bc798cbe13fa98692')
  .then(inventory => {
    log(inventory)
  })
```

### Do user has an item

To check the inventory of an user, use the `itemInInventory` function.

`itemInInventory` has one required argument:

- `wearable`: `string` which is the name of a wearable (e.g.: `dcl://dcl_launch/razor_blade_upper_body`)

and one optional argument:
- `equiped`: `boolean` if true, the item has to be equiped (default: false)

This example check if the user has the Razor Blade Jacket equiped:

```ts
import avatar from '../node_modules/decentraland-crypto-utils/avatar/index'

avatar
  .itemInInventory('dcl://dcl_launch/razor_blade_upper_body', true)
  .then(isItemEquiped => {
    if(isItemEquiped) log("The Razor Blade jacket is equiped")
    else log("This item is not equiped equiped")
  })
```

### Do user has one of those items

To check the inventory of an user, use the `itemsInInventory` function.

`itemsInInventory` has one required argument:

- `wearables`: `string` which is the name of a wearable (e.g.: `dcl://dcl_launch/razor_blade_upper_body`)

and one optional argument:
- `equiped`: `boolean` if true, the item has to be equiped (default: false)

This example check if the user has the Razor Blade Jacket equiped:

```ts
import avatar from '../node_modules/decentraland-crypto-utils/avatar/index'

avatar
  .itemInInventory('dcl://dcl_launch/razor_blade_upper_body', true)
  .then(isItemEquiped => {
    if(isItemEquiped) log("The Razor Blade jacket is equiped")
    else log("This item is not equiped equiped")
  })
```

repository: pablitar/decentraland-crypto-utils

gha_language: TypeScript

repo_name: pablitar/decentraland-crypto-utils


text:
# Zero to JupyterHub with Kubernetes

[JupyterHub](https://github.com/jupyterhub/jupyterhub) allows users to
interact with a computing environment through a webpage. As most devices
have access to a web browser, JupyterHub makes it is easy to provide and
standardize the computing environment for a group of people (e.g., for a
class of students or an analytics team).

This project will help you set up your own JupyterHub on a cloud/on-prem
k8s environment and leverage its scalable nature to support a large
group of users. Thanks to {term}`Kubernetes`,
we are not tied to a specific cloud provider.

```{admonition} Note
This project is under active development so information and tools may
change. *You can be a part of this change!* If you see anything that is
incorrect or have any questions, feel free to post on the community
[Discourse forum](https://discourse.jupyter.org/) or reach out in the
[Gitter chat](https://gitter.im/jupyterhub/jupyterhub) or create an
issue at the [issues
page](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues). If
you have tips or deployments that you would like to share, see the
[Community Resources section](community-resources).
```

This documentation is for Helm chart version {{chart_version}} that deploys
JupyterHub version {{jupyterhub_version}} and other components versioned
in {{requirements}}. The Helm chart requires Kubernetes version >={{kube_version}}
and Helm >={{helm_version}}.

## What To Expect

This guide will help you deploy and customize your own JupyterHub on a
cloud. While doing this, you will gain valuable experience with:

- **A cloud provider** such as Google Cloud, Microsoft Azure, Amazon
  EC2, IBM Cloud\...
- **Kubernetes** to manage resources on the cloud
- **Helm v3** to configure and control the packaged JupyterHub
  installation
- **JupyterHub** to give users access to a Jupyter computing
  environment
- **A terminal interface** on some operating system

It\'s also possible you end up getting some experience with:

- **Docker** to build customized image for the users
- **Domain registration** to make the hub available at
  <https://your-domain-name.com>

```{admonition} Note
For a more elaborate introduction to the tools and services that
JupyterHub depends upon, see our [page about that](tools).
```

## Setup Kubernetes

This section describes a how to setup a Kubernetes cluster on a
selection of cloud providers and environments, as well as initialize
Helm, a Kubernetes package manager, to work with it.

```{toctree}
:maxdepth: 2
kubernetes/index
```

## Setup JupyterHub

This tutorial starts from _Step Zero: Your Kubernetes cluster_ and
describes the steps needed for you to create a complete initial
JupyterHub deployment. Please ensure you have a working installation of
Kubernetes and Helm before proceeding with this section.

```{toctree}
:maxdepth: 2
jupyterhub/index
```

JupyterHub can be configured and customized to fit a variety of
deployment requirements. If you would like to expand JupyterHub,
customize its setup, increase the computational resources available for
users, or change authentication services, this guide will walk you
through the steps. See the [](helm-chart-configuration-reference) for a
list of frequently used configurable helm chart fields.

## Administrator Guide

This section provides information on managing and maintaining a staging
or production deployment of JupyterHub. It has considerations for
managing cloud-based deployments and tips for maintaining your
deployment.

```{toctree}
:maxdepth: 2
administrator/index
```

## Resources

This section holds all the references and resources that helped make
this project what it is today.

```{toctree}
:maxdepth: 2
resources/index
```

### Community Resources

This section gives the community a space to provide information on
setting up, managing, and maintaining JupyterHub.

```{admonition} Note
We recognize that Kubernetes has many deployment options. As a project
team with limited resources to provide end user support, we rely on
community members to share their collective Kubernetes knowledge and
JupyterHub experiences.
```

```{admonition} Contributing
If you would like to help improve this guide or Helm chart, please see the [issues
page](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues) as
well as the [contributor
guide](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/HEAD/CONTRIBUTING.md).
```

We hope that you will use this section to share deployments with on a
variety of infrastructure and for different use cases. There is also a
[community maintained list](community-resources) of users of this Guide and the JupyterHub Helm Chart.

### Institutional support

This guide and the associated helm chart would not be possible without
the amazing institutional support from the following organizations (and
the organizations that support them!)

- [UC Berkeley Data Science Division](https://data.berkeley.edu/)
- [Berkeley Institute for Data Science](https://bids.berkeley.edu/)
- [Cal Poly, San Luis Obispo](https://www.calpoly.edu/)
- [Simula Research Institute](https://www.simula.no/)

## Changelog

This section holds describes the changes between versions and how to upgrade
between them.

```{toctree}
:maxdepth: 1
changelog
```

branch_name: refs/heads/main

extension: md

gha_language: Python

gha_license_id: NOASSERTION

license_type: permissive


text:
## Apigee Hybrid on Anthos Baremetal on Google Compute Engine VMs with Terraform

This is a sample Apigee Hybrid installation on Anthos Cluster on bare metal
running on GCE Virtual Machines.
[Apigee hybrid](https://cloud.google.com/apigee/docs/hybrid/v1.7/what-is-hybrid)
is a platform for developing and managing API proxies that features a hybrid
deployment model. The hybrid model includes a management plane hosted by Apigee
in the Cloud and a runtime plane that you install and manage on one of the
[supported Kubernetes platforms](https://cloud.google.com/apigee/docs/hybrid/supported-platforms).
An [Apigee organization](https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure)
is the top-level container in Apigee. It contains all your API proxies and
related resources. This installation will create an evaluation Apigee
Organization with the same name as the ID of the Google Cloud Project you use.

### Pre-requisites

> **NOTE:** We have provided a [utility script](./resources/run_prerequisite.sh)
  that checks and configures some of the following project/organization level
  prerequisites. You may use it to validate some of the requirements that follow.
  Please ensure you have authenticated the `gcloud` CLI to use the GCP project
  you intend to use before running this script.

- A workstation with access to internet _(i.e. Google Cloud APIs)_ with the following installed
  - [Git](https://www.atlassian.com/git/tutorials/install-git)
  - [Google Cloud SDK](https://cloud.google.com/sdk/docs/install)
  - [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) (>= v0.15.5, < v1.2)

- A [Google Cloud Project](https://console.cloud.google.com/cloud-resource-manager?_ga=2.187862184.1029435410.1614837439-1338907320.1614299892)
  _(in which the resources for the setup will be provisioned)_
  - **Network:** The project must have a network called `default` with all the
    default firewall policies configured on it. If, default network creation is
    enabled for the organization, the project will already have it. In case the
    *`Skip default network creation`* policy is enforced, you can create a new
    VPC `network` called default in **auto mode**.
    _[See image for example.](./docs/images/default_network.png)_

  - **Quota:** The project must have the required quota. his sample requires 4
    VMs of `n1-standard-8` machine type. Ensure that there is enough quota for
    CPU, Memory and IP Addresses for the GCP Region you intend to use.

- A [Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
  in the project that satisfies **one** of the following requirements and its
  **[key file downloaded](/anthos-bm-gcp-terraform/docs/create_sa_key.md)** to the workstation:
    - The Service Account has `Owner` and `Apigee Organization Administrator` permissions
    - The Service Account has both `Editor`, `Project IAM Admin` and `Apigee Organization Administrator` permissions

- The following list of **Organizational Policy Constraints** enabled on the Google Cloud Organization your GCP Project is in:

    |  Policy Name                                 | Constraint Name                                   | Effective Polciy |
    |  ------------------------------------------- | ------------------------------------------------- | ---------------- |
    | Disable service account creation             | constraints/iam.disableServiceAccountCreation	   | Not Enforced     |
    | Disable service account key creation         | constraints/iam.disableServiceAccountKeyCreation  | Not enforced     |
    | Restrict VM IP Forwarding                    | constraints/compute.vmCanIpForward.               | Allowed All      |
    | Define allowed external IPs for VM instances | constraints/compute.vmExternalIpAccess	           | Allowed All      |
    | Shielded VMs                                 | constraints/compute.requireShieldedVm	           | Not Enforced     |
    | Require OS Login                             | constraints/compute.requireOsLogin.               | Not Enforced     |
    | Skip default network creation                | constraints/compute.skipDefaultNetworkCreation	   | Not Enforced     |
---

### Anthos on bare metal with Apigee on GCE VMs

The infrastructure for the Anthos on bare metal cluster is created using the
[anthos-bm-gcp-terraform](/anthos-bm-gcp-terraform) sample. The sample here
refers to the [anthos-bm-gcp-terraform](/anthos-bm-gcp-terraform) script as a
terraform module and provisions the GCE based infrastructure first. Then, it
executes additional steps that are specific to the Apigee installtion.

Once you complete this [quickstart guide](docs/quickstart.md) you will have the
following infrastructure setup in Google Cloud using Compute Engine VMs with
Anthos on bare metal running and Apigee installed. The diagram assumes that
none of the default values for the [variables](variables.tf) were changed other
than the ones mentioned in this guide.

![Bare metal infrastructure on Google Cloud using Compute Engine VMs](docs/images/abm_gcp_infra.png)

---
## Getting started

- [Terraform Module Information _(includes variables definitions)_](docs/variables.md)
- [Quickstart guide](docs/quickstart.md):
  - The terraform script sets up the GCE VM environment. The output of the
    script prints out the commands to follow to install Anthos on bare metal
    in the provisioned GCE VM and to **configure Apigee** in the new Anthos on
    bare metal cluster.

repository: GoogleCloudPlatform/anthos-samples

gha_language: HCL

repo_name: GoogleCloudPlatform/anthos-samples


text:
# Mapper Interactive

Mapper Interactive is a web-based framework for interactive analysis and visualization of high-dimensional point cloud data  built upon the Mapper algorithm. It is an open source software released under the MIT License.

The Mapper algorithm is a tool from topological data analysis first introduced by Gurjeet Singh, Facundo Mémoli and Gunnar Carlsson in 2007 (http://dx.doi.org/10.2312/SPBG/SPBG07/091-100).

## Installation

```bash
git clone git@github.com:MapperInteractive/MapperInteractive.git
cd MapperInteractive
python3 run.py
```

After running the above commands, you can run Mapper Interactive by visiting http://<IP_ADDRESS>:8080/ on the local machine (If possible, please use Chrome).

## Dependencies
This software requires [Kepler Mapper](https://kepler-mapper.scikit-tda.org/), [scikit-learn](https://scikit-learn.org/stable/), [NetworkX](https://networkx.github.io/) and [flask](https://flask.palletsprojects.com/en/1.1.x/) to run.

If you do not have these packages installed, please use the following command to intall them.

```bash
pip install scikit-learn
pip install networkx
pip install flask
pip install flask_assets
```

To perform linear regression, please also make sure you have [statsmodels](https://www.statsmodels.org/stable/index.html) installed.
```bash
pip install statsmodels
```

## Loading a dataset
When loading a dataset into the interface, please make sure to put the data file to be loaded in the folder ``app/static/uploads/``.

## Command-line API
Please refer to a user-guide [here](CLI_README.md) for the command-line API.

## Video

[![Screenshot of video](app/static/assets/video-teaser.png)](https://www.youtube.com/watch?v=z2VEkv1apF8)

## License

This project is licensed under the MIT License - see the `LICENSE` file for details.

## Contributing

Pull requests are welcomed.

## Cite

Mapper Interactive: A Scalable, Extendable, and Interactive Toolbox for the Visual Exploration of High-Dimensional Data.
Youjia Zhou, Nithin Chalapathi, Archit Rathore, Yaodong Zhao, Bei Wang.\
*IEEE Pacific Visualization (PacificVis)*, accepted, 2021.

https://arxiv.org/abs/2011.03209.

license: MIT

repository: tripti-agarwal/MapperInteractive

branch_name: refs/heads/master

gha_language: HTML

gha_license_id: MIT

repo_name: tripti-agarwal/MapperInteractive


text:
Stochastic Lens Simulator by Gzrrplox
=====================================

My first 4k intro, made for [Instanssi 2011](http://instanssi.org/arkisto/event/1/).

This was mainly an attempt at [Reyes](http://dx.doi.org/10.1145/37402.37414)-style
[stochastic rasterization](http://dx.doi.org/10.1145/964965.808590) with a GPU.
End result first generates motion paths with a vertex shader, then continues
to extracting bounding polygons with a geometry shader and finally does simple stochastic point sampling
with a fragment shader. The huge and noisy image is downscaled for display with a
separable gaussian filter in two passes.

Noises are also generated with GLSL.

- [Pouet](http://pouet.net/prod.php?which=56990)
- [Youtube](http://www.youtube.com/watch?v=QLhrBact-Mk)
- License: BSD3

repository: gzrrplox/stochastic-lens-simulator

repo_name: gzrrplox/stochastic-lens-simulator


text:
# Hue light

![hue light demo](../img/hue-light.gif)

This module will give your Hue light the color of the global status of CIMonitor.

- When there is an error status, the light will be red
- When there is a warning status, the light will be orange
- When there are no errors or warnings, the light will be green

## Requirements

In order to use this module, you need to have a Philips Hue light, and a Philips Hue hub!

## Configuration

To enable this module, add the module to the `config/config.json`:

```json
{
    "modules": [
        {
            "name": "HueLight",
            "config": {
                "hub": "---ip---",
                "path": "/api/---token---/lights/5/state"
            }
        }
    ]
}
```

The `config` object must be configured as following:

| key    | required? | description                                            |
| ------ | --------- | ------------------------------------------------------ |
| `hub`  | yes       | The IP-address of the Philips Hue hub                  |
| `path` | yes       | The path to the hue light containing the correct token |

Restart the application to enable the module.

## How to get the Hue light IP and path?

@todo: teach how to grab them from the chrome plugin

repository: jaytaph/CIMonitor

repo_name: jaytaph/CIMonitor


text:
# Implementing Serialize

The [`Serialize`] trait looks like this:

[`Serialize`]: https://docs.serde.rs/serde/ser/trait.Serialize.html

```rust
# extern crate serde;
#
# use serde::Serializer;
#
pub trait Serialize {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer;
}
#
# fn main() {}
```

This method's job is to take your type (`&self`) and map it into the [Serde data
model] by invoking exactly one of the methods on the given [`Serializer`].

[Serde data model]: data-model.md
[`Serializer`]: https://docs.serde.rs/serde/ser/trait.Serializer.html

In most cases Serde's [derive] is able to generate an appropriate implementation
of `Serialize` for structs and enums defined in your crate. Should you need to
customize the serialization behavior for a type in a way that derive does not
support, you can implement `Serialize` yourself.

[derive]: derive.md

## Serializing a primitive

As the simplest example, here is the builtin `Serialize` impl for the primitive
`i32`.

```rust
# extern crate serde;
#
# use std::os::raw::c_int as ActualI32;
#
# use serde::{Serialize, Serializer};
#
# #[allow(dead_code, non_camel_case_types)]
# struct i32;
#
# trait Serialize2 {
#     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
#     where
#         S: Serializer;
# }
#
impl Serialize for i32 {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
#         impl Serialize2 for ActualI32 {
#             fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
#             where
#                 S: Serializer,
#             {
        serializer.serialize_i32(*self)
#             }
#         }
#
#         let _ = serializer;
#         unimplemented!()
    }
}
#
# fn main() {}
```

Serde provides such impls for all of Rust's [primitive types] so you are not
responsible for implementing them yourself, but `serialize_i32` and similar
methods may be useful if you have a type that needs to be represented as a
primitive in its serialized form. For example you could [serialize a C-like enum
as a primitive number].

[primitive types]: https://doc.rust-lang.org/book/primitive-types.html
[serialize a C-like enum as a primitive number]: https://serde.rs/enum-number.html

## Serializing a sequence or map

Compound types follow a three-step process of init, elements, end.

```rust
# extern crate serde;
#
# use std::marker::PhantomData;
#
# struct Vec<T>(PhantomData<T>);
#
# impl<T> Vec<T> {
#     fn len(&self) -> usize {
#         unimplemented!()
#     }
# }
#
# impl<'a, T> IntoIterator for &'a Vec<T> {
#     type Item = &'a T;
#     type IntoIter = Box<Iterator<Item = &'a T>>;
#
#     fn into_iter(self) -> Self::IntoIter {
#         unimplemented!()
#     }
# }
#
# struct MyMap<K, V>(PhantomData<K>, PhantomData<V>);
#
# impl<K, V> MyMap<K, V> {
#     fn len(&self) -> usize {
#         unimplemented!()
#     }
# }
#
# impl<'a, K, V> IntoIterator for &'a MyMap<K, V> {
#     type Item = (&'a K, &'a V);
#     type IntoIter = Box<Iterator<Item = (&'a K, &'a V)>>;
#
#     fn into_iter(self) -> Self::IntoIter {
#         unimplemented!()
#     }
# }
#
use serde::ser::{Serialize, Serializer, SerializeSeq, SerializeMap};

impl<T> Serialize for Vec<T>
where
    T: Serialize,
{
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        let mut seq = serializer.serialize_seq(Some(self.len()))?;
        for e in self {
            seq.serialize_element(e)?;
        }
        seq.end()
    }
}

impl<K, V> Serialize for MyMap<K, V>
where
    K: Serialize,
    V: Serialize,
{
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        let mut map = serializer.serialize_map(Some(self.len()))?;
        for (k, v) in self {
            map.serialize_entry(k, v)?;
        }
        map.end()
    }
}
#
# fn main() {}
```

## Serializing a tuple

The `serialize_tuple` method is a lot like `serialize_seq`. The distinction
Serde makes is that `serialize_tuple` is for sequences where the length does not
need to be serialized because it will be known at deserialization time. The
usual examples are Rust [tuples] and [arrays]. In non-self-describing formats a
`Vec<T>` needs to be serialized with its length in order to be able to
deserialize a `Vec<T>` back out. But a `[T; 16]` can be serialized using
`serialize_tuple` because the length will be known at deserialization time
without looking at the serialized bytes.

[tuples]: https://doc.rust-lang.org/std/primitive.tuple.html
[arrays]: https://doc.rust-lang.org/std/primitive.array.html

## Serializing a struct

Serde distinguishes between four types of structs. [Ordinary structs] and [tuple
structs] follow the three-step process of init, elements, end just like a
sequence or map. [Newtype structs] and [unit structs] are more like primitives.

[Ordinary structs]: https://doc.rust-lang.org/book/structs.html
[tuple structs]: https://doc.rust-lang.org/book/structs.html#tuple-structs
[Newtype structs]: https://doc.rust-lang.org/book/structs.html#tuple-structs
[unit structs]: https://doc.rust-lang.org/book/structs.html#unit-like-structs

```rust
# #![allow(dead_code)]
#
// An ordinary struct.   Use serialize_newtype_struct.
struct Inches(u64);

// A unit struct. Use serialize_unit_struct.
struct Instance;
#
# fn main() {}
```

Structs and maps may look similar in some formats, including JSON. The
distinction Serde makes is that structs have keys that are compile-time constant
strings and will be known at deserialization time without looking at the
serialized data. This condition enables some data formats to handle structs much
more efficiently and compactly than maps.

Data formats are encouraged to treat newtype structs as insignificant wrappers
around the inner value, serializing just the inner value. See for example
[JSON's treatment of newtype structs].

[JSON's treatment of newtype structs]: json.md

```rust
# #![allow(dead_code)]
#
# extern crate serde;
#
use serde::ser::{Serialize, Serializer, SerializeStruct};

struct Color {
    r: u8,
    g: u8,
    b: u8,
}

impl Serialize for Color {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        // 3 is the number of fields in the struct.
        let mut state = serializer.serialize_struct("Color", 3)?;
        state.serialize_field("r", &self.r)?;
        state.serialize_field("g", &self.g)?;
        state.serialize_field("b", &self.b)?;
        state.end()
    }
}
#
# fn main() {}
```

## Serializing an enum

Serializing enum variants is very similar to serializing structs.

```rust
# #[allow(dead_code)]
enum E {
    // Use three-step process:
    //   1. serialize_struct_variant
    //   2. serialize_field
    //   3. end
    Color { r: u8, g: u8, b: u8 },

    // Use three-step process:
    //   1. serialize_tuple_variant
    //   2. serialize_field
    //   3. end
    Point2D(f64, f64),

    // Use serialize_newtype_variant.
    Inches(u64),

    // Use serialize_unit_variant.
    Instance,
}
#
# fn main() {}
```

## Other special cases

There are two more special cases that are part of the Serializer trait.

There is a method `serialize_bytes` which serializes a `&[u8]`. Some formats
treat bytes like any other seq, but some formats are able to serialize bytes
more compactly. Currently Serde does not use `serialize_bytes` in the
`Serialize` impl for `&[u8]` or `Vec<u8>` but once [specialization] lands in
stable Rust we will begin using it. For now the [`serde_bytes`] crate can be
used to enable efficient handling of `&[u8]` and `Vec<u8>` through
`serialize_bytes`.

[specialization]: https://github.com/rust-lang/rust/issues/31844
[`serde_bytes`]: https://docs.serde.rs/serde_bytes/

Finally, `serialize_some` and `serialize_none` correspond to `Option::Some` and
`Option::None`. Users tend to have different expectations around the `Option`
enum compared to other enums. Serde JSON will serialize `Option::None` as `null`
and `Option::Some` as just the contained value.


text:
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Page](./puppeteer.page.md) > [setContent](./puppeteer.page.setcontent.md)

## Page.setContent() method

Signature:

```typescript
setContent(html: string, options?: WaitForOptions): Promise<void>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  html | string | HTML markup to assign to the page. |
|  options | [WaitForOptions](./puppeteer.waitforoptions.md) | Parameters that has some properties. |

Returns:

Promise<void>

## Remarks

The parameter `options` might have the following options.

- `timeout` : Maximum time in milliseconds for resources to load, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [page.setDefaultNavigationTimeout(timeout)](./puppeteer.page.setdefaultnavigationtimeout.md) or [page.setDefaultTimeout(timeout)](./puppeteer.page.setdefaulttimeout.md) methods.

- `waitUntil`: When to consider setting markup succeeded, defaults to `load`. Given an array of event strings, setting content is considered to be successful after all events have been fired. Events can be either:
 - `load` : consider setting content to be finished when the `load` event is fired.
 - `domcontentloaded` : consider setting content to be finished when the `DOMContentLoaded` event is fired.
 - `networkidle0` : consider setting content to be finished when there are no more than 0 network connections for at least `500` ms.
 - `networkidle2` : consider setting content to be finished when there are no more than 2 network connections for at least `500` ms.

repository: yujiosaka/puppeteer

repo_name: yujiosaka/puppeteer


text:
---
title: "Verifiable Random Function"
---

{{<label vrf>}}

Filecoin uses the notion of a [Verifiable Random
Function](https://people.csail.mit.edu/silvio/Selected%20Scientific%20Papers/Pseudo%20Randomness/Verifiable_Random_Functions.pdf)
(VRF). A VRF uses a private key to produce a digest of
an arbitrary message such that the output is unique per signer and per message.
Any third party in possession of the corresponding public key, the message and
the VRF output can verify if the digest has been computed correctly and from the
correct signer. Using a VRF in the ticket generation process allows anyone to
verify if a block comes from an eligible block producer (see {{<sref tickets
"Ticket Generation" >}} for more details).

BLS signature can be used as the basis to construct a VRF. Filecoin transforms
the BLS signature scheme it uses (see {{<sref signatures Signatures>}} into a
VRF, Filecoin uses the random oracle model and deterministically hash the
signature to produce the final digest. Filecoin uses
[Blake2b-256](https://blake2.net/) (Blake2b with an output size of 256 bits) as
the hash function. The algorithm is the following:
```
VRFOutput = Blake2b-256(DST || BLSSignature(message))
```

where `DST` is a domain separation tag in order to treat the hash
function as an independent random oracle in the VRF output. The tag for VRF is
set to
```
DST = "VRF" // encoded as an ASCII string
```

**Note**: The message given to the BLS signature scheme for using it in the VRF
context should also contain a domain separation tag. The relevant separation tag
are mentionned in the relevant places throughout the specs.

{{< readfile file="vrf.id" code="true" lang="go" >}}
{{< readfile file="vrf.go" code="true" lang="go" >}}

gha_language: Shell


text:
# My Resources

---

### Python

I use python as my primary programming language and I have tried to really make use of what the community has to offer to help me with my tasks. I do things from scratch in the beginning but then I heavily refactor and prefer to use popular, up-to-date libraries with well-tested code. I mostly work with machine learning

* [Standard Stack](python/software_stacks/standard_stack.md)
* [Integrated Development Environments](python/ides.md)
* [Earth Science Stack](python/software_stacks/earthsci.md)
* [Deep Learning Software](dl_overview.md)
* [Good Programming Practices](python/good_code/good_code.md)

---

### Gaussian Processes

I have worked extensively with Gaussian processes (GPs) and I have also done quite a lot of research on the literature and software side of most modern GPs.I have a detailed webpage where I outline some of the most modern Gaussian processs.

Webpage: [jejjohnson.github.io/gp_model_zoo](https://jejjohnson.github.io/gp_model_zoo/#/)

I also work a lot with Gaussian process regression and how they deal with uncertainty. In this setting, I have looked specifically at what happens when we want to propagate uncertainty from the inputs through the GP function through training and/or predictions. I have had some success with this but the literature was very scattered when I first started. So I decided to

Webpage: [jejjohnson.github.io/uncertain_gps](https://jejjohnson.github.io/uncertain_gps/#/)


text:
# Family Tree

## Weighting

* **experimental** 1,2,4,8,16

## Frequency

* **Never, Rarely, Occasionally, Sometimes, Often, Usually, Always** 0,1,2,3,4,5,6

## Lists

* **male first name** `json-file:male-first-name`

* **female first name** `here:female-first-name`

* **common last name**  `web:common-name`

* **code name**  `json-web:code-name`

## Mappings

* **title** `json-file:title`
* **sex** `json-web:sex`

## Models

### Male

* **first name** `male first name`
* **last name** always; 1 of `common last name`
* **code name** always; 1 of `code name`
* **sex** `sex:M`; `title:mr`

### Female

* **first name** `female first name`
* **last name** always; 1 of `common last name`
* **sex** *female*; `title:dr`

### Parent

* **son** sometimes ;1 to 8 of `male`
* **daughter** sometimes ;0 to 7 of `female`

## References

* **boys** 3 of `male`
* **girls** 3 of `female`
* **parents** 4 of `parent`

repository: flarebyte/dazzling-fiction

gha_language: JavaScript

repo_name: flarebyte/dazzling-fiction


text:
## Getting Started
_If you haven't used [grunt](http://gruntjs.com/) before, be sure to check out
the [Getting Started](http://gruntjs.com/getting-started) guide._

From the same directory as your project's Gruntfile and package.json, install
this plugin with the following command:

```bash
npm install grunt-lintspaces --save-dev
```

Once that's done, add this line to your project's Gruntfile:

```js
grunt.loadNpmTasks('grunt-lintspaces');
```

Inside your `grunt.js` file add a section named `lintspaces`. This section
specifies the tasks. Each task takes sources and options as parameters.

repository: schorfES/grunt-lintspaces

repo_name: schorfES/grunt-lintspaces


text:
---
layout: post
title: Using Slack Effectively
---

It can sometimes be challenging to collaborate with team members especially in a setting where everyone is remote.
I wanted to improve this for our team, and since Slack was one of the most widely used means of communication and collaboration, I wanted to look into how other teams
were using Slack effectively. These are some things I found, along with some personal thoughts, that I think are important to keep in mind:

1. Clear up noise by leaving channels you don’t need to be in and managing notifications. It’s not rude to leave a channel. Make sure notifications are set only for direct messages, mentions, or keywords.

2. Don’t use @here or @channel unless it’s an emergency and you need everyone’s attention right away. This avoids work disruption. Use @username only as needed during work hours. Slack highlights channels with new messages so members will eventually see them. Be respectful of others’ time.

3. Set “do not disturb” if you know you’re going to be focused on something for a set amount of time. This will avoid context switching by keeping work uninterrupted.

4. Say no to DMs. Slack was not intended to be an instant messenger so try to avoid it unless the conversation is personal. If you’re talking about something project related, use a public channel since it could be useful for others. Members can also chime in and assist or provide another view point.

5. Favor one long message over multiple short ones. When you’re typing a message, try to communicate all your thoughts in one message. This makes it easier to respond using a thread and prevents others from having to wait until you finish your thoughts. Use the edit button to correct typos together with strikethrough to correct mistakes.

6. Favor threads to respond to messages. They keep the discussion in one place and makes it easier for others to catch up or have multiple discussions at once in one channel. You should always think of your post as starting a new thread.

7. If it’s taking too long to discuss something over Slack, resort to a call.

8. Embrace the inherent transparency of Slack, it was built for this. “We encourage conversations to happen in the most public venue they can,” CEO Stewart Butterfield has said of how Slack uses Slack. “There’s a lot of value sometimes to ask a question and get the answer in the biggest public forum that it could happen in.” Avoid private channels if not sharing protected information among members. Public channels allow users to loop in others as needed and track conversations. It also avoids having multiple branches related to the same conversation and promotes collaboration.

9. Don’t use group DMs. If you’re having to DM multiple people, move that conversation to a channel.

10. Assume best intent. Sometimes tone and context are lost in text.

11. Encourage and empower people to speak up. Ask opinions from teammates who tend to be more quiet or shy.

12. Before posting or asking something, search Slack and/or Confluence to see if you can find the answer. If someone answers your question, consider creating or adding to a Confluence page so that others can find the answer in the future.

13. Discussions for Jira tickets and Github pull requests should happen inside the ticket or pull request. This keeps the conversation tied to the piece of work being done. If you need immediate attention, send a team member the link to the source.

14. Favor emojis over text. If you can respond with an emoji, it’s more succinct and avoids creating unnecessary unread messages and notifications.

References:

* https://about.gitlab.com/handbook/communication/#slack
* https://zapier.com/blog/slack-etiquette-at-zapier/
* https://mode.com/blog/mode-slack-guidelines/#Modes-slack-guidelines
* https://techqueria.org/communities/slack/community-guidelines/
* https://lattice.com/library/how-hr-can-keep-slack-a-safe-productive-space
* https://slack.com/blog/collaboration/chief-product-officer-tamar-yehoshua-how-we-use-slack-at-slack


text:
BI_Orchestrator
 ----------------------------------------------------------------
+ Main file:  orchestrator.py
+ Task: Invokes various functions configured in an input file. Triggered via multiple rules (BI_DailyOrchestratorTrigger for dev)
See dailyRuns.json for a sample config file
+ Environment Parameters:
> BI_DailyOrchestratorDBNonPopularTrigger = config_files/dailyRunsDBNonPopular.json # path to config file for non-popular DBs

> BI_DailyOrchestratorTrigger = config_files/dailyRunsDemo.json # path to config file for non-db techs

> CONFIG_BUCKET = sample-bi # bucket containing config files

> JSON_CONFIG_FILE_NAME = config_files/dailyRunsDemo.json # backup value for config file

> LAMBDA_FUNC_NAME = DEV_BI_SUMO_QUERY
+ Sample Test Payload: lambda-payloads.json
+ Trigger: Yes
> BI_DailyOrchestratorTrigger:  cron(35 20 * * ? *) # A sample trigger. Each trigger name will be mapped to a config file (see EVs above)

> BI_DailyOrchestratorDBNonPopularTrigger: cron(0 15 * * ? *) # Another sample trigger


text:
# DanskeBank-CodingChallenge

> Coding Challenge Javascript Implementation

---

## About the Project

This project is intended to the selection process to work for [<FuturePros_IT/> programme by Danske Bank Group IT](https://danskebank.lt).
I implemented this project to show and demonstrate my skills with pure Javascript.

---

## Demonstration

 - Hosted Demonstration - [DanskeBank-CodingChallenge](https://danske.amrfarouqa.website)

---

## Description

This is a game where user can modify an array. When the array is modified, user receives feedback if game is winnable and the game output is shown.
The Game requires:
 - Accepting array as input parameter
 - Determining if the goal is reachable
 - Display Game Output

 Program uses pure Javascript. No libraries required to run this Game.

---

## Usage Examples

---

## License

MIT License

Copyright (c) [2020] [amrfarouqa]

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.

---

## Author Info

- Email - [aamrfarouqaa<EMAIL_ADDRESS>- Website - [https://amrfarouqa.website](https://amrfarouqa.website)

repository: amrfarouqa/DanskeBank-CodingChallenge

repo_name: amrfarouqa/DanskeBank-CodingChallenge


text:
---
description: >-
  This section describes the necessary steps and procedures to author your own
  C#/.NET based plugins
---

# Plugin Libraries

All SanteDB components (the iCDR, dCDR, and UI) all leverage common packages. These packages are shared among a variety of the infrastructure components.

![Library Relationship](<../../../../.gitbook/assets/image (86).png>)

When implementing your plugin, if, for example, you target .NET Framework and use the SanteDB.Server.Plugin package, then your plugin will not work on the dCDR. Conversely if you only reference APIs in the SanteDB Core Libs package then your plugin will work on all platforms SanteDB supports.

The general rule is:

* If you're creating a global .NET plugin select .NET Standard 2.0 as the project type
* If you're creating a SanteDB dCDR based plugin use either .NET Standard 2.0 or .NET Framework 4.7
* If you're creating a SanteDB iCDR based plugin use .NET Framework 4.7

## Adding Nuget Dependencies

Once you've decided where your plugin fits into the SanteDB ecosystem you'll have to add your Nuget dependencies. All SanteDB Nuget packages are registered on the central Nuget repository, the table below identifies which SanteDB Nuget packages provide which functionality.

repository: santedb/dev-doc

repo_name: santedb/dev-doc


text:
[![NPM License][npm-license-image]][npm-license-url]
[![NPM Version][npm-version-image]][npm-version-url]
[![NPM Downloads][npm-downloads-image]][npm-downloads-url]
[![Ubuntu CI Status][github-actions-linux-image]][github-actions-linux-url]
[![Windows CI Status][github-actions-win-image]][github-actions-win-url]
[![Coverage Status][codecov-image]][codecov-url]

[npm-license-image]: https://img.shields.io/npm/l/eslint-plugin-i18n.svg
[npm-license-url]: https://www.npmjs.com/package/eslint-plugin-i18n
[npm-version-image]: https://img.shields.io/npm/v/eslint-plugin-i18n.svg
[npm-version-url]: https://www.npmjs.com/package/eslint-plugin-i18n
[npm-downloads-image]: https://img.shields.io/npm/dt/eslint-plugin-i18n.svg
[npm-downloads-url]: https://www.npmjs.com/package/eslint-plugin-i18n
[github-actions-linux-image]: https://github.com/chejen/eslint-plugin-i18n/actions/workflows/linux.yml/badge.svg
[github-actions-linux-url]: https://github.com/chejen/eslint-plugin-i18n/actions/workflows/linux.yml
[github-actions-win-image]: https://github.com/chejen/eslint-plugin-i18n/actions/workflows/windows.yml/badge.svg
[github-actions-win-url]: https://github.com/chejen/eslint-plugin-i18n/actions/workflows/windows.yml
[codecov-image]: https://codecov.io/github/chejen/eslint-plugin-i18n/branch/master/graph/badge.svg?branch=master
[codecov-url]: https://app.codecov.io/gh/chejen/eslint-plugin-i18n?branch=master

eslint-plugin-i18n
===================

ESLint rules for internationalization.

# Installation

Install [ESLint](https://www.github.com/eslint/eslint) as a dev-dependency:

```sh
$ npm install --save-dev eslint
```

Install ` eslint-plugin-i18n` as a dev-dependency:

```sh
$ npm install --save-dev eslint-plugin-i18n
```

# Configuration

Add `plugins` section to your `.eslintrc` and specify eslint-plugin-i18n as a plugin:

```json
{
  "plugins": [
    "i18n"
  ]
}
```

Finally, enable the rules that you would like to use.

```json
{
  "rules": {
    "i18n/no-chinese-character": 1,
    "i18n/no-greek-character": 1,
    "i18n/no-japanese-character": 1,
    "i18n/no-korean-character": 1,
    "i18n/no-russian-character": 1,
    "i18n/no-thai-character": 1
  }
}
```

# List of supported rules

* [no-chinese-character](docs/rules/no-chinese-character.md): Prevent usage of Chinese characters.
* [no-greek-character](docs/rules/no-greek-character.md): Prevent usage of Greek characters.
* [no-japanese-character](docs/rules/no-japanese-character.md): Prevent usage of Japanese characters.
* [no-korean-character](docs/rules/no-korean-character.md): Prevent usage of Korean characters.
* [no-russian-character](docs/rules/no-russian-character.md): Prevent usage of Russian characters.
* [no-thai-character](docs/rules/no-thai-character.md): Prevent usage of Thai characters.

# License

eslint-plugin-i18n is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

# Changelog

## v2.1.0 - June 17, 2021
- Added rule options to support identifier linting.
- Dropped the support of node < 12 for development environment (due to lint-staged and mocha)

## v2.0.0 - July 4, 2020
- Dropped support for node < 10
- Added JSX support


text:
---
layout: post
author: Vincent Chen
---
Post one is live.  This is going to make website creation so much easier.

**What we've accomplished today**

A lot, to be fairly honest. The control panel mechanism (henceforth called the Scrubber) has been mostly finalized, and members from that group have migrated over to drive train.

Drive train has settled into a basic outline of 6 wheels involving Colson wheels. For now, I think the drive train will contain all Colson wheels, though traction wheels could be added if the Colson wheels don't entirely work.

Jekyll has been set up. Obviously. Otherwise this site wouldn't exist. CSS is still *very* barebones, but the basic structure should be set up correctly.

The robot project has been created. Yuri began coding the drive train, which is just normal tank. For now we'll assume that it'll be two motors on each side.

**What we want to accomplish next time**

- Finish Jekyll Framework
- Get a bit further on Drive Train coding
- Learn PID
- Begin familiarizing everyone with WPILib 2020

Alright, that's it. Regular posts will happen once coding really gets into full-swing.


text:
# DEMO(Autodeployed -> not working now) http://shareitalpha.herokuapp.com/

# ShaReIt (Still in brainstorming and development).
  - p2p Share magnet link application.
  - Real time actualizations via socket.io
  - Real time webs and other nodes db sync.
  - Customizable and modular.
  - SteemIt like system to earn money with like(maybe some day).

# How to start

  - CLONE THE REPOSITORY
  - npm install
  - node app.js

# Adding new posts (DEPRECATED)
  - open http://localhost:8080/
  - postman to http://localhost:8080/api/upload with the next body

  ```json
  {
  "title" : "A very special title",
  "imgLink": "http://someimage.com/something.png",
  "magnet" : "magnet:?xt=urn:sha1:PDAQRAOQQRYS76MRZJ33LK4MMVZBDSCL",
  "description" : "Put some description here"
}
```
  - Ready, u can see real time posting in your web, and if there is another one in other server connected and peeared u can see it in that too. :)

If u are interested in make contributions, you are welcome :)


text:
![Nextflow logo](https://github.com/nextflow-io/trademark/blob/master/nextflow2014_no-bg.png)

*"Dataflow variables are spectacularly expressive in concurrent programming"*

[Henri E. Bal , Jennifer G. Steiner , Andrew S. Tanenbaum](https://dl.acm.org/doi/abs/10.1145/72551.72552)

![Nextflow CI](https://github.com/nextflow-io/nextflow/workflows/Nextflow%20CI/badge.svg)
[![Nextflow version](https://img.shields.io/github/release/nextflow-io/nextflow.svg?colorB=26af64&style=popout)](https://github.com/nextflow-io/nextflow/releases/latest)
[![Nextflow Twitter](https://img.shields.io/twitter/url/https/nextflowio.svg?colorB=26af64&&label=%40nextflow&style=popout)](https://twitter.com/nextflowio)
[![Nextflow Publication](https://img.shields.io/badge/Published-Nature%20Biotechnology-26af64.svg?colorB=26af64&style=popout)](https://www.nature.com/articles/nbt.3820)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?colorB=26af64&style=popout)](http://bioconda.github.io/recipes/nextflow/README.html)
[![Nextflow license](https://img.shields.io/github/license/nextflow-io/nextflow.svg?colorB=26af64&style=popout)](https://github.com/nextflow-io/nextflow/blob/master/COPYING)

Quick overview
==============
Nextflow is a bioinformatics workflow manager that enables the development of portable and reproducible workflows.
It supports deploying workflows on a variety of execution platforms including local, HPC schedulers, AWS Batch,
Google Cloud Life Sciences, and Kubernetes. Additionally, it provides support for manage your workflow dependencies
through built-in support for Conda, Spack, Docker, Podman, Singularity, Modules, and more.

## Contents
- [Rationale](#rationale)
- [Quick start](#quick-start)
- [Documentation](#documentation)
- [Tool Management](#tool-management)
  - [Conda environments](#conda-environments)
  - [Spack environments](#spack-environments)
  - [Docker, Podman and Singularity](#containers)
  - [Environment Modules](#environment-modules)
- [HPC Schedulers](#hpc-schedulers)
  - [SGE](#hpc-schedulers)
  - [Univa Grid Engine](#hpc-schedulers)
  - [LSF](#hpc-schedulers)
  - [SLURM](#hpc-schedulers)
  - [PBS/Torque](#hpc-schedulers)
  - [HyperQueue (experimental)](#hpc-schedulers)
  - [HTCondor (experimental)](#hpc-schedulers)
  - [Moab](#hpc-schedulers)
- [Cloud Support](#cloud-support)
  - [AWS Batch](#cloud-support)
  - [Google Cloud Batch](#cloud-support)
  - [Google Life Sciences](#cloud-support)
  - [Kubernetes](#cloud-support)
- [Community](#community)
- [Build from source](#build-from-source)
- [Contributing](#contributing)
- [License](#license)
- [Citations](#citations)
- [Credits](#credits)

Rationale
=========

With the rise of big data, techniques to analyse and run experiments on large datasets are increasingly necessary.

Parallelization and distributed computing are the best ways to tackle this problem, but the tools commonly available to the bioinformatics community often lack good support for these techniques, or provide a model that fits badly with the specific requirements in the bioinformatics domain and, most of the time, require the knowledge of complex tools or low-level APIs.

Nextflow framework is based on the dataflow programming model, which greatly simplifies writing parallel and distributed pipelines without adding unnecessary complexity and letting you concentrate on the flow of data, i.e. the functional logic of the application/algorithm.

It doesn't aim to be another pipeline scripting language yet, but it is built around the idea that the Linux platform is the *lingua franca* of data science, since it provides many simple command line and scripting tools, which by themselves are powerful, but when chained together facilitate complex data manipulations.

In practice, this means that a Nextflow script is defined by composing many different processes. Each process can execute a given bioinformatics tool or scripting language, to which is added the ability to coordinate and synchronize the processes execution by simply specifying their inputs and outputs.

Quick start
============

Download the package
--------------------

Nextflow does not require any installation procedure, just download the distribution package by copying and pasting
this command in your terminal:

```
curl -fsSL https://get.nextflow.io | bash
```

It creates the ``nextflow`` executable file in the current directory. You may want to move it to a folder accessible from your ``$PATH``.

Download from Conda
-------------------

Nextflow can also be installed from Bioconda

```
conda install -c bioconda nextflow
```

Documentation
=============

Nextflow documentation is available at this link http://docs.nextflow.io

HPC Schedulers
==============

*Nextflow* supports common HPC schedulers, abstracting the submission of jobs from the user.

Currently the following clusters are supported:

  + [SGE](https://www.nextflow.io/docs/latest/executor.html#sge)
  + [Univa Grid Engine](https://www.nextflow.io/docs/latest/executor.html#sge)
  + [LSF](https://www.nextflow.io/docs/latest/executor.html#lsf)
  + [SLURM](https://www.nextflow.io/docs/latest/executor.html#slurm)
  + [PBS/Torque](https://www.nextflow.io/docs/latest/executor.html#pbs-torque)
  + [Flux](https://www.nextflow.io/docs/latest/executor.html#flux)
  + [HyperQueue (beta)](https://www.nextflow.io/docs/latest/executor.html#hyperqueue)
  + [HTCondor (beta)](https://www.nextflow.io/docs/latest/executor.html#htcondor)
  + [Moab](https://www.nextflow.io/docs/latest/executor.html#moab)

For example to submit the execution to a SGE cluster create a file named `nextflow.config`, in the directory
where the pipeline is going to be launched, with the following content:

```nextflow
process {
  executor='sge'
  queue='<your execution queue>'
}
```

In doing that, processes will be executed by Nextflow as SGE jobs using the `qsub` command. Your
pipeline will behave like any other SGE job script, with the benefit that *Nextflow* will
automatically and transparently manage the processes synchronisation, file(s) staging/un-staging, etc.

Cloud support
=============
*Nextflow* also supports running workflows across various clouds and cloud technologies. Managed solutions from major
cloud providers are also supported through AWS Batch, Azure Batch and Google Cloud compute services.
Additionally, *Nextflow* can run workflows on either on-prem or managed cloud Kubernetes clusters.

Currently supported cloud platforms:
  + [AWS Batch](https://www.nextflow.io/docs/latest/awscloud.html#aws-batch)
  + [Azure Batch](https://azure.microsoft.com/en-us/services/batch/)
  + [Google Cloud Batch](https://cloud.google.com/batch)
  + [Google Cloud Life Sciences](https://cloud.google.com/life-sciences)
  + [Kubernetes](https://www.nextflow.io/docs/latest/kubernetes.html)

Tool management
================

Containers
----------------

*Nextflow* has first class support for containerization. It supports both [Docker](https://www.nextflow.io/docs/latest/docker.html) and [Singularity](https://www.nextflow.io/docs/latest/singularity.html) container engines. Additionally, *Nextflow* can easily switch between container engines enabling workflow portability.

```nextflow
process samtools {
  container 'biocontainers/samtools:1.3.1'

  """
  samtools --version
  """

}
```

Conda environments
------------------

[Conda environments](https://www.nextflow.io/docs/latest/conda.html) provide another option for managing software packages in your workflow.

Spack environments
------------------

[Spack environments](https://www.nextflow.io/docs/latest/spack.html) provide an option to build software packages from source using Spack, a popular package manager within the HPC community.

Environment Modules
-------

[Environment modules](https://www.nextflow.io/docs/latest/process.html#module) commonly found in HPC environments can also be used to manage the tools used in a *Nextflow* workflow.

Community
=========

You can post questions, or report problems by using the Nextflow [discussions](https://github.com/nextflow-io/nextflow/discussions)
or the Nextflow [Slack community chat](https://www.nextflow.io/slack-invite.html).

*Nextflow* also hosts a yearly workshop showcasing researcher's workflows and advancements in the langauge. Talks from the past workshops are available on the [Nextflow YouTube Channel](https://www.youtube.com/channel/UCB-5LCKLdTKVn2F4V4KlPbQ)

The [nf-core](https://nf-co.re/) project is a community effort aggregating high quality *Nextflow* workflows which can be used by the community.

Build from source
=================

Required dependencies
---------------------

* Compiler Java 11 or later
* Runtime Java 11 or later

Build from source
-----------------

*Nextflow* is written in [Groovy](http://groovy-lang.org) (a scripting language for the JVM). A pre-compiled,
ready-to-run, package is available at the [Github releases page](https://github.com/nextflow-io/nextflow/releases),
thus it is not necessary to compile it in order to use it.

If you are interested in modifying the source code, or contributing to the project, it worth knowing that
the build process is based on the [Gradle](http://www.gradle.org/) build automation system.

You can compile *Nextflow* by typing the following command in the project home directory on your computer:

```bash
make compile
```

The very first time you run it, it will automatically download all the libraries required by the build process.
It may take some minutes to complete.

When complete, execute the program by using the `launch.sh` script in the project directory.

The self-contained runnable Nextflow packages can be created by using the following command:

```bash
make pack
```

Once compiled use the script `./launch.sh` as a replacement for the usual `nextflow` command.

The compiled packages can be locally installed using the following command:

```bash
make install
```

A self-contained distribution can be created with the command: `make pack`.  To include support of GA4GH and its dependencies in the binary, use `make packGA4GH` instead.

IntelliJ IDEA
---------------

Nextflow development with [IntelliJ IDEA](https://www.jetbrains.com/idea/) requires a recent version of the IDE (2019.1.2 or later).

If you have it installed in your computer, follow the steps below in order to use it with Nextflow:

1. Clone the Nextflow repository to a directory in your computer.
2. Open IntelliJ IDEA and choose "New > Project from Existing Sources..." in the "File" menu bar.
3. Select the Nextflow project root directory in your computer and click "OK".
4. Then, choose the "Gradle" item in the "Import project from external model" list and click on "Finish" button to finalize the import.
5. When the import process completes, select the "Project structure" command in the "File" menu bar.
6. In the showed dialog click on the "Project" item in the list of the left, and make sure that
   the "Project SDK" choice on the right contains Java 11 (or later, up to 18).
7. Set the code formatting options with settings provided [here](https://github.com/nextflow-io/nextflow/blob/master/CONTRIBUTING.md#ide-settings).

Contributing
============

Project contribution are more than welcome. See the [CONTRIBUTING](CONTRIBUTING.md) file for details.

Build servers
=============

  * [Travis-CI](https://travis-ci.org/nextflow-io/nextflow)
  * [GitHub Actions](https://github.com/nextflow-io/nextflow/actions)

License
=======

The *Nextflow* framework is released under the Apache 2.0 license.

Citations
=========

If you use Nextflow in your research, please cite:

P. Di Tommaso, et al. Nextflow enables reproducible computational workflows. Nature Biotechnology 35, 316–319 (2017) doi:[10.1038/nbt.3820](http://www.nature.com/nbt/journal/v35/n4/full/nbt.3820.html)

Credits
=======

Nextflow is built on two great pieces of open source software, namely Groovy
and Gpars.

YourKit is kindly supporting this open source project with its full-featured Java Profiler.
Read more http://www.yourkit.com

repository: nextflow-io/nextflow

gha_language: Groovy

repo_name: nextflow-io/nextflow


text:
<!-- This file is generated from source code in the Shopify/hydrogen repo. Edit the files in /packages/hydrogen/src/utilities/isServer and run 'yarn generate-docs' at the root of this repo. For more information, refer to https://github.com/Shopify/shopify-dev/blob/master/content/internal/operations/hydrogen-reference-docs.md. -->

The `isServer` utility is a function that returns a `boolean` indicating
if the code was run on the server.

## Arguments

None

## Return type

A `boolean` indicating if the code was run on the server.

## Example code

```tsx
import {isServer} from '@shopify/hydrogen';

export function MyComponent() {
  if (isServer()) {
    return <p>I ran on the server</p>;
  }

  return <p>I ran on the client</p>;
}
```

## Related utilities

- [`isClient`](api/hydrogen/utilities/isclient)


text:
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  #  Project Title
     Readme Generator

  ##  Description
    This is a command -line application which generates a professional readme file dynamically using user's inputs

  ## Table of Contents

  * [Description](#description)
  * [Usage](#usage)
  * [License](#license)
  * [Contribution](#contribution)
  * [Usage](#usage)
  * [Tests](#tests)
  * [Questions](#questions)

  ## Installation

  To install dependencies, run the below command :

    npm init

  ## Usage
     run the command node index.js

  ## License

  This repository is covered under the license 'MIT License
  '
  Refer https://opensource.org/licenses/MIT for more detailed info

  ## Contribution
     none

  ## Tests
     none

## Questions

If you have any questions reach me @
Email: [archana.nagaraj<EMAIL_ADDRESS>Github : [archana-nagaraj](https://github.com/archana-nagaraj)


text:
# ABOUT BAD IMAGE FORMAT

## SHORT DESCRIPTION

Describes some possible causes of a `BadImageFormatException` or
`InvalidProgramException` when using the `New-ILDelegate` command.

## LONG DESCRIPTION

The `BadImageFormatException` or `InvalidProgramException` is thrown by the
Common Language Runtime (CLR) whenever it detects invalid IL. This topic will
go over some of the potential reasons this can occur. This is far from an
exhaustive list and mostly goes over the common cases.

### Invalid evaluation stack state

When returning from a method the evaluation stack must either be empty (in the
case of a `void` return method) or contain exactly one item (in the case of a
return).

The following example shows an evaluation stack with too many items.

```powershell
il { [int]@() } {
    # Load `0` as an int32 onto the eval stack.
    ldc.i4.0

    # Load a second `0` as an int32 onto the eval stack.
    ldc.i4.0

    # The CLR expects only a single item on the eval stack, but sees two.
    ret
}
```

The following example shows an evaluation stack with too few items.

```powershell
il { [int]@() } {
    # Load `0` as an int32 onto the eval stack.
    ldc.i4.0

    # Pull an int32 off the eval stack and pass to Console.WriteLine as an
    # argument.
    call { [void] [Console]::WriteLine([int]) }

    # Eval stack is empty, but the method is declared to return an int32.
    ret
}
```

### .maxstack is too low

Methods must declare to the CLR the maximum amount of items that they will put
on the evaluation stack. The default for this module (when not specified with
`.maxstack`) is `8`.

```powershell
il { [void]@() } {
    ldc.i4.0
    ldc.i4.0
    ldc.i4.0
    ldc.i4.0
    ldc.i4.0
    ldc.i4.0
    ldc.i4.0
    ldc.i4.0

    # Since `.maxstack` has not been specified it has defaulted to 8. This
    # nineth item will result in invalid IL. Adding `.maxstack 9` would make
    # this valid.
    ldc.i4.0
    pop; pop; pop; pop; pop; pop; pop; pop; pop
    ret
}
```

```powershell
il { [void]@() } {
    .maxstack 1
    ldc.i4.0

    # Since `.maxstack` was declared as 1, this second item will result in
    # invalid IL. Changing `.maxstack` to 2 would make this valid.
    ldc.i4.0
    pop; pop
    ret
}
```

### Leaving a structured exception handling region incorrectly

Exiting a structured exception handling (SEH) region requires a specific
instruction for each type of SEH region.

The following table describes which instruction to use when exiting each SEH
region type.

| SEH Type  | Instruction        |
| --------- | ------------------ |
| `catch`   | `leave.s`, `leave` |
| `finally` | `endfinally`       |
| `fault`   | `endfault`         |
| `filter`  | `endfilter`        |

Incorrect:

```powershell
il { [void]@() } {
    .try {
        newobj { [void] [Exception].new() }
        throw
    }
    catch {
        # Invalid, cannot `ret` from a catch block.
        ret
    }
}
```

Correct:

```powershell
il { [void]@() } {
    .try {
        newobj { [void] [Exception].new() }
        throw
    }
    catch {
        # Pop the exception off the eval stack.
        pop
        leave.s exitSEH
    }

    exitSEH: ret
}
```

### Missing `ret`

A method must use the `ret` instruction to exit, regardless of if it has a
non-void return.

Incorrect:

```powershell
il { [void]@() } {
    ldstr 'Does not return, but still must exit with ret'
    call { [void] [Console]::WriteLine([string]) }
}
```

Correct:

```powershell
il { [void]@() } {
    ldstr 'Does not return, but still must exit with ret'
    call { [void] [Console]::WriteLine([string]) }
    ret
}
```

repository: SeeminglyScience/ILAssembler

repo_name: SeeminglyScience/ILAssembler


text:
---
layout: default
---

# 1993-09-05 - Denning in Govt Comp News

## Header Data

From: "L. Detweiler"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 5085030c961c21e267e8f21da992616b7b96695c57d7b456ce4183c644b8d7d0

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-09-05 03:46:30 UTC

Raw Date: Sat, 4 Sep 93 20:46:30 PDT

## Raw message

```
{% raw  %}From: "L. Detweiler"<EMAIL_ADDRESS>Date: Sat, 4 Sep 93 20:46:30 PDT
To<EMAIL_ADDRESS>Subject: Denning in Govt Comp News
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

FYI, on sci.crypt W.H. Murray passes along quotes of D. Denning in an
article in Government Computer News, p14, Aug. 30, 1993 by Kevin Power.
If anyone could scan this for the cypherpunk collection it would be appreciated.

===cut=here===

From<EMAIL_ADDRESS>Subject: Denning on Skipjack
Date: Fri, 3 Sep 1993 00:25:00 GMT

In Government Computer News, p14, August 30, 1993, Kevin Power quotes
Dorothy Denning as saying "I am 100 percent certain that there are no
weak keys."

William Hugh Murray, Executive Consultant, Information System Security
49 Locust Avenue, Suite 104; New Canaan, Connecticut 06840
1-0-ATT-0-700-WMURRAY; WHMurray at DOCKMASTER.NCSC.MIL

From<EMAIL_ADDRESS>Subject: And again, Denning on SKIPJACK
Date: Fri, 3 Sep 1993 02:30:00 GMT

In the same article kevin Power quotes Denning as having said "The
people at NSA have done more to evaluate than the public algorithm in
DES.  They're way ahead of the game."

I hope Dr. Denning never said anything like that for the record.  Even
if it were true, it would not be knowable.  It would be unprofessional
to make such an unscientific assertion.

William Hugh Murray, Executive Consultant, Information System Security
49 Locust Avenue, Suite 104; New Canaan, Connecticut 06840
1-0-ATT-0-700-WMURRAY; WHMurray at DOCKMASTER.NCSC.MIL

From<EMAIL_ADDRESS>Subject: Denning and the cost of attack against SKIPJACK
Date: Fri, 3 Sep 1993 02:20:00 GMT

On page 14 of the August 30, 1993 issue of Government Computer News
Kevin Power reports that Dorothy Denning told the Computer System
Security and Privacy Advisory Board that SKIPJACK would not be
compromised by exhaustive attack methods in the next 30 to 40 years.

[...]

{% endraw %}
```

## Thread

+ Return to [September 1993](/archive/1993/09)

+ Return to "["L. Detweiler" <ld231782@longs.lance.colostate.edu>](/authors/l_detweiler_ld231782_at_longs_lance_colostate_edu_)"

+ 1993-09-05 (Sat, 4 Sep 93 20:46:30 PDT) - Denning in Govt Comp News - _"L. Detweiler"<EMAIL_ADDRESS>


text:
# chat-app

Simple ionic2 chat app with a microservice oriented backend (users api, chat server, pull notifications service).

## Set up

On OSX, you'll need to install the following:

```
$ brew install nginx docker docker-machine docker-compose thrift
$ npm install -g ionic@beta
$ docker-machine create --driver virtualbox default
$ eval "$(docker-machine env default)"
```

Clone this repo and generate the thrift code for the pull notifications by doing:

```
$ ./gen-rpc-thrift.sh
```

Setup and start nginx so that the requests to localhost are redirected to the docker-machine:

```
$ cp nginx-conf/server /usr/local/etc/nginx/servers/distributed
$ cp nginx-conf/proxy-headers /usr/local/etc/nginx/includes/
$ sudo nginx
```

Finally, run the app by running the following two commands on different terminal sessions:

```
$ docker-compose up
$ ionic serve
```

You can build the app (only tested for android) using standard ionic commands. You'll need additional android
dependencies to do so.

```
$ ionic build android
$ ionic run android --consolelogs --serverlogs --livereload
```

## Deploying

Ideally, this app should be deployed to Google Container Engine, using Kubernetes and a GCE persistent disk for MongoDB.

## Possible improvements

1. Redis backend to scale the chat server to multiple nodes.
2. Load messages in the app in chunks when entering a chat room.
3. Allow to send other types of media
4. Store messages history (not so important, not the purpose of this app)
5. Add new contact information to the notifications.
6. Push notifications instead of poll notifications.

repository: miguelfrde/chat-app

repo_name: miguelfrde/chat-app