text:
# Recommended Data Science Resources from the Su & Wu labs
A running list of things that we find helpful to learn and/or do data science. Particularly helpful resources are indicated by an asterisk.

# Concepts
* [Tidy Data](https://r4ds.had.co.nz/tidy-data.html) *
* [Tidy Data - the academic description](https://vita.had.co.nz/papers/tidy-data.pdf)

# Pandas
* [Python for Data Analysis by Wes McKinney](https://wesmckinney.com/pages/book.html)
* [Checking for Missing<EMAIL_ADDRESS>
# R
* [Tidyverse](https://www.tidyverse.org/) *
* [RStudio Cheatsheets](https://www.rstudio.com/resources/cheatsheets/) *

repository: SuLab/data-science-resources

repo_name: SuLab/data-science-resources


text:
# Note of Course 14.(Deep Reinforcement Learning)

## Reinforcement Learning.
- Problems involving an agent interacting with an environment, which provides numeric reward signals.
- Goal: Learn how to take actions in order to maximize reward.
- agent: give action to environment, and receive reward from environment.
- environment: give state to agent

## Markov Decision Process.
- Mathematical formulation of the RL problem.
- Markov property: Current state completely characterises the state of the world.
- Definitions: Value function and Q-value function.
- How good is a state?
	- The value function at state s, is the expected cumulative rward from following the policy from state s
- How good is a state-action pair?
	- The Q-value function at state s and action a, is the expected cumulative reward from taking action a in state s and then following the policy.
	- Q* (optimal) satisfies the following Bellman equation.

## Q-learning.
- Q-learning: Use a function approximator to estimate the action-value function.
- If the function approximator is a deep neural nework -> deep 1-learning.
- experience replay: to solve the related samples problem.

## Policy Gradients.
- Problem: The Q-function can be very complicated, But the policy can be much simpler.

## Reinforce algorithm.
- does not depend on transition probability.
- Variance reduction
	- push up probabilities of an action seen, only by the cumulative future reward from that state.

## Recurrent attention model(RAM)
- use attention.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# ModularAdapter

The `RecyclerView.Adapter` that makes your life easy!

 - **Improves your architecture**: The modular nature of the `ModularAdapter` allows splitting up your `Adapters` into a few very small and simple components making it easy for your to create beautiful lists.
 - **Simple to use, almost no boilerplate**: Creating an `Adapter` for a `RecyclerView` has never been this simple. Just a few lines of code and picking an appropriate `ItemManager` implementation is all you need to do.
 - **Takes care of the heavy lifting**: By introducing `ItemManager` components the `ModularAdapter` allows you to accomplish complex behaviors in your `RecyclerView` with just a few lines of code.
 - **Extremely lightweight**: `ModularAdapter` is not a huge library with tons of functionality you are never going to need. The footprint of this library is tiny and you only need to include exactly the functionality you are going to need into your project.

[![Build Status](https://travis-ci.org/Wrdlbrnft/ModularAdapter.svg?branch=master)](https://travis-ci.org/Wrdlbrnft/ModularAdapter)
[![BCH compliance](https://bettercodehub.com/edge/badge/Wrdlbrnft/ModularAdapter)](https://bettercodehub.com/)

# How do I add it to my project?

Just add this dependency to your build.gradle file:

```
implementation 'com.github.wrdlbrnft:modular-adapter:<IP_ADDRESS>'
```

# How do I use it?

## Implementing the Adapter

There are two ways to create a `ModularAdapter` in your project. First you can subclass it like any other `Adapter`:

```java
public class ExampleAdapter extends ModularAdapter<ExampleModel> {

    public ExampleAdapter(Context context, ItemManager<ExampleModel> itemManager) {
        super(context, itemManager);
    }

    @Override
    protected ViewHolder<? extends ExampleModel> onCreateViewHolder(LayoutInflater inflater, ViewGroup parent, int viewType) {
        final View itemView = inflater.inflate(R.layout.item_example, parent, false);
        return new ExampleViewHolder(itemView);
    }
}
```

As you can see above in that case all you have to do is implement the `onCreateViewHolder()` method. The `ModularAdapter` takes care of binding the data.

However you can also quickly create a `ModularAdapter` using the `ModularAdapter.Builder` class:

```java
final ModularAdapter<ExampleModel> adapter = new ModularAdapter.Builder<>(context, itemManager)
        .add(ExampleModel.class, new ModularAdapter.ViewHolderFactory<ModularAdapter.ViewHolder<ExampleModel>>() {
            @Override
            public ModularAdapter.ViewHolder<ExampleModel> create(LayoutInflater layoutInflater, ViewGroup parent) {
                final View itemView = inflater.inflate(R.layout.item_example, parent, false);
                return new ExampleViewHolder(itemView);
            }
        })
        .build();
```

Both ways are equivalent, however when you have lists with many simple models the second method is usually favourable. If you are reusing the Adapter in many places and/or want to implement complex behavior you should go with the first method.

The `ItemManager` instance you can see in the constructors above is the data source for a `ModularAdapter` instance. It takes care of providing the data to the `ModularAdapter` as well as notifying it about changes. The `ModularAdapter` comes with a few different implementations for most use cases and if you need something special you can implement it yourself!

You can find more information about the different provided `ItemManager` implementations further down on this page.

## Implementing the ViewHolders

ViewHolders used in a `ModularAdapter` have to be subclasses of `ModularAdapter.ViewHolder`. They are responsible for binding the data to the `View`s in your `RecyclerView`. An example implementation looks like this:

```java
public class ExampleViewHolder extends ModularAdapter.ViewHolder<ExampleModel> {

    private final TextView mValueView;

    public ExampleViewHolder(View itemView) {
        super(itemView);

        mValueView = itemView.findViewById(R.id.value);
    }

    @Override
    protected void performBind(ExampleModel item) {
        mValueView.setText(item.getValue());
    }
}
```

The method `performBind()` is called by the `ModularAdapter` when it is necessary to bind new data to the `View` managed by your `ViewHolder`.

# About ItemManagers

`ItemManager`s are responsible for managing items for the `ModularAdapter`. They hold the data that is supposed to be displayed in the `RecyclerView` and take care of notifying the `ModularAdapter` about changes to that data.

Currently there are two `ItemManager` implementations available right out of the box:

 - `StaticListItemManager`: A very simple `ItemManager` implementation that just displays a `List` of items. You should use this whenever you have a predefined unchanging `List` of models - for example for a known list of options the user can select one of. Changes to that `List` are not supported by the `StaticListItemManager`.
 - `SortedListItemManager`: This `ItemManager` displays a dynamic collection of items in a sorted order determined by a `Comparator`. It is useful whenever you want to display a `List` of models in a particular order - for example sorted by date. Another thing this `ItemManager` excels at is high performance filtering and random changes to the underlying data even for very long lists up to 100.000 items. All changes to the data are automatically fully animated in the `RecyclerView`.

You can find more information about these `ItemManager` implementations below.

## StaticListItemManager

This `ItemManager` is useful for displaying a static `List` of items. To use the `StaticListItemManager` add this dependency to your build.gradle file:

```groovy
implementation 'com.github.wrdlbrnft:static-list-item-manager:<IP_ADDRESS>'
```

After that you can use it in your code like this:

```java
final List<ExampleModel> models = ...

final ItemManager<ExampleModel> itemManager = new StaticListItemManager<>(models);
final ExampleAdapter adapter = new ExampleAdapter(context, itemManager);
recyclerView.setAdapter(adapter);
```

This `ItemManager` does not support making any changes to the `List` of items once it has been created.

## BasicItemManager

This `ItemManager` is useful for displaying a simple `List` of items, however it does not fully support item animations. To use the `BasicItemManager` add this dependency to your build.gradle file:

```groovy
implementation 'com.github.wrdlbrnft:basic-item-manager:<IP_ADDRESS>'
```

After that you can use it in your code like this:

```java
final List<ExampleModel> models = ...

final ModifiableItemManager<ExampleModel> itemManager = new BasicItemManager<>();
final ExampleAdapter adapter = new ExampleAdapter(context, itemManager);
recyclerView.setAdapter(adapter);
```

You can add or modify the items in the list at any time like this:

```java
final List<ExampleModel> models = ...

itemManager.newTransaction()
        .replaceAll(models)
        .commit();
```

## FireStoreItemManager

This `ItemManager` can be used to list Items stored in a [**Firebase FireStore**](https://firebase.google.com/docs/firestore/) collection.

To use `FireStoreItemManager` just add this dependency to your build.gradle file:

```groovy
implementation 'com.github.wrdlbrnft:fire-store-item-manager:<IP_ADDRESS>'
```

You need to pass three things to the `FireStoreItemManager to make it work:

 - An `Activity` reference
 - A `CollectionReference` which references the collection you want to display
 - An `ItemMapper` instance. It is responsible for mapping the `DocumentSnapshot` objects which are returned from `FireStore` to your model objects.

You can use it like this:

```java
final CollectionReference reference = mFireStoreDb.collection("users")

final ItemManager<UserModel> itemManager = new FireStoreItemManager<>(activity, reference, snapShot -> new UserModel(snapShot.getString("name")));
final UserAdapter adapter = new UserAdapter(context, itemManager);
recyclerView.setAdapter(adapter);
```

## SortedListItemManager

This `ItemManager` is useful whenever you want to display a `List` of models in a particular order - for example sorted by date. Another thing this `ItemManager` excels at is high performance filtering and random changes to the underlying data even for very long lists up to 100.000 items. All changes to the data are automatically fully animated in the `RecyclerView`.

To use the `SortedListItemManager` just add this dependency to your build.gradle file:

```groovy
implementation 'com.github.wrdlbrnft:sorted-list-item-manager:<IP_ADDRESS>'
```

You need two things for the `SortedListItemManager` to perform its magic:

 - Every model class managed by the `SortedListItemManager` has to implement the `SortedListItemManager.ViewModel` interface.
 - You need a define a `Comparator` which determines the order of the items in your `RecyclerView`

### Implementing the SortedListItemManager.ViewModel interface

All models managed by the `SortedListItemManager` have to implement the `SortedListItemManager.ViewModel` interface. This interface requires you to implement two methods in your model:

 1. **`isSameModelAs()`**: This method is used to determine if two models refer to the same thing. Imagine it like this: If you have a list of movies and you update the list (for example when the user is filtering the list) `isSameModelAs()` will be used by the `SortedListItemManager` to determine if the same model is still present in the list.
 2. **`isContentTheSameAs()`**: This method is used to determine if the content of a model is equal to some other model. For example after two "same" model have been found using `isSameModelAs()` then `isContentTheSameAs()` will be used to check if data in the model has been modified and if a change animation has to be played in the `RecylerView`.

The canonical way to implement the above methods is like this:

```java
public class ExampleModel implements SortedListItemManager.ViewModel {

    private final long mId;
    private final String mValue;

    public ExampleModel(long id, String value) {
        mId = id;
        mValue = value;
    }

    public long getId() {
        return mId;
    }

    public String getValue() {
        return mValue;
    }

    @Override
    public <T> boolean isSameModelAs(T item) {
        if (item instanceof ExampleModel) {
            final ExampleModel other = (ExampleModel) item;
            return other.mId == mId;
        }
        return false;
    }

    @Override
    public <T> boolean isContentTheSameAs(T item) {
        if (item instanceof ExampleModel) {
            final ExampleModel other = (ExampleModel) item;
            return mValue != null ? mValue.equals(other.mValue) : other.mValue == null;
        }
        return false;
    }
}
```

### Defining a Comparator for your SortedListItemManager

The `Comparator` used by the `SortedListItemManager` can be implemented like any `Comparator` that would be used for sorting:

```java
final Comparator<ExampleModel> alphabeticalComparator = new Comparator<ExampleModel>() {
    @Override
    public int compare(ExampleModel a, ExampleModel b) {
        return a.getText().compareTo(b.getText());
    }
};
```

If you display only one type of model in your `RecyclerView` this is most of the time all you need. However for more complex situations in which you are dealing with many different types of models and/or have complex sorting logic the `SortedListItemManager` comes with a handy tool to simplify the job: The `ComparatorBuilder` class.

It can be used like this:

```java
final Comparator<ExampleModel> comparator = new ComparatorBuilder<>()
        .setGeneralOrder(SomeModel.class, AnotherModel.class)
        .setOrderForModel(SomeModel.class, new Comparator<SomeModel>() {
            @Override
            public int compare(SomeModel a, SomeModel b) {
                return a.getText().compareTo(b.getText());
            }
        })
        .setOrderForModel(AnotherModel.class, new Comparator<AnotherModel>() {
            @Override
            public int compare(AnotherModel a, AnotherModel b) {
                return Integer.signum(a.getRank() - b.getRank());
            }
        })
        .build();
```

In the above example `setGeneralOrder()` is used to set the order of models based on their type. In this specific example it means all `SomeModel` models will appear before `AnotherModel` models. The `setOrderForModel()` calls below it are used to set how each type of model should be ordered specifically. In this case it means that `SomeModel` instances are ordered by comparing their text field and `AnotherModel` instances are ordered based on their rank field.

### Using the SortedListItemManager

Once you have implemented the `SortedListItemManager.ViewModel` interface in your models and created a `Comparator` you can use the `SortedListItemManager` like this:

```java
final ItemManager<ExampleModel> itemManager = new SortedListItemManager(ExampleModel.class, comparator);
final ExampleAdapter adapter = new ExampleAdapter(context, itemManager);
recyclerView.setAdapter(adapter);
```

Updating the items displayed in the `RecyclerView` works like this:

```java
final List<ExampleModel> models = ...

itemManager.newTransaction()
        .replaceAll(models)
        .commit();
```

This will automatically animate any changes to the data and it is considered best practice to just use the above code to update the whole list of items in the `SortedListItemManager` whenever there is a change to the data (for example when filtering).

In the above code `newTransaction()` creates a new `ModifiableItemManager.Transaction`. By calling methods like `replaceAll()` on the Transaction you can modify data in the `RecyclerView` however any changes you make are only executed and animated on screen once you call `commit()`.

Besides `replaceAll()` there are other methods you can use to modify data in a `Transaction`:

 - `add()`: Adds one or a `Collection` of models. If a model added this way already exists in the `RecyclerView` it will be updated if necessary.
 - `remove()`: Removes one or a `Collection` of models.
 - `removeAll()`: Removes all models from the `RecyclerView`

Of course you can mix and match as many of these calls together in one `Transaction` however the simpler your transactions the better.

### Dealing with large lists

If you manage 25.000+ items with a `SortedListItemManager` the `Transaction` may take up to half a second to be executed, but you don't need to worry about blocking the UI thread. The `SortedListItemManager` does all its work efficiently in a separate `Thread` so your UI will stay fluid and responsive.
However you might want to show a progress spinner or some other loading indicator to the user while the `SortedListItemManager` does its thing. For especially this use case you can use the `StateCallback` of the `SortedListItemManager`. You can consume it like this:

```java
itemManager.addStateCallback(new ItemManager.StateCallback() {
    @Override
    public void onChangesInProgress() {
        // A Transaction is in progress so show a loading indicator
    }

    @Override
    public void onChangesFinished() {
        // All pending Transactions have been executed so hide the loading indicator again
    }
});
```

repository: xaverkapeller/ModularAdapter

repo_name: xaverkapeller/ModularAdapter


text:
# KBase authentication server

This repo contains the second iteration of the KBase authentication server.

Build status (master):
[![Build Status](https://travis-ci.org/kbase/auth2.svg?branch=master)](https://travis-ci.org/kbase/auth2) [![codecov](https://codecov.io/gh/kbase/auth2/branch/master/graph/badge.svg)](https://codecov.io/gh/kbase/auth2)

## Current endpoints

### UI

UI endpoints are not versioned and not necessarily stable - behavior may change as needed to
support the auth UI.

Note that the HTML UI supplied in this repo is a minimal implementation for the purposes of
testing. In many cases a manual refresh of the page will be required to see
changes. Further, once a checkbox is manually checked or unchecked that state
will not change, even with a refresh - to see changes reset the form.

`/`
General server information including git commit, version, and server time.

`/admin`
Global admin tasks - force reset all passwords, revoke all tokens, view a token, search for users.

`/admin/customroles`
View, add, and delete custom roles.

`/admin/config`
View and edit the server configuration.

`/admin/localaccount`
Create a local account.

`/admin/user/<user name>`
View user, disable user, reset password, force password reset, and modify user roles.

`/admin/user/<user name>/tokens`
View and revoke tokens for a specific user.

`/customroles`
View custom roles. This page is publicly viewable to any user with a valid token.

`/link`
Link accounts.

`/login`
Login to a provider based account. Stores a cookie with a token.

`/localaccount/login`
Login to a local account. Stores a cookie with a token.

`/localaccount/reset`
Reset the password for a local account.

`/logout`
Logs the user out.
Removes the user's token from the database as well as any temporary link tokens associated with
the user. Removes the login, temporary login, and temporary link cookies except if JSON output
is requested, in which case it is expected that the UI manages the login token
(but not the temporary tokens).

`/me`
User page. Update name and email address, remove roles.

`/tokens`
List, create, and revoke tokens.

### API

API endpoints are versioned and behavior should not change in a backwards incompatible manner
without a change in version.

All API calls require a valid token in the `Authorization` header except legacy API endpoints,
which continue to use their original protocol. All endpoints produce JSON data unless otherwise
noted.

Tokens are opaque strings - no particular structure should be assumed, and token string contents
may change without notice.

`GET /api/V2/me`
See the current user's profile.

`PUT /api/V2/me`
Update the current user's email address and display name. Takes JSON encoded data with the
keys `display` and `email`.

`GET /api/V2/users/?list=<comma separated user names>`
Validate a set of user names and get the users' display names. Returns a map of username ->
display name. Any usernames that do not correspond to accounts will not be included in the map.

`GET /api/V2/users/search/<prefix>/?fields=<comma separated fields>`
Find users based on a prefix of the username or any parts of the display name, where parts are
delimited by whitespace. By default the search occurs on all fields; setting the fields query
parameter can restrict the search fields and thus possibly speed up the search. Current field names
are `username` and `displayname`; any other field names are ignored. Returns a map of
username -> display name. At most 10,000 names are returned.

`GET /api/V2/token`
Introspect a token.

`POST /api/V2/token`
Create an agent token. Takes JSON encoded data with the keys `name` for a required token name
string and `customcontext` for an optional map of user-supplied creation context to be saved
with the token, and returned when the token is queried.

`GET /api/v2/admin/anonids?list=<comma separated anonymous user IDs>`
Translate anonymous user IDs to user names. `Admin` (and exactly `Admin`) permission
is required. At most 10000 IDs are allowed, but the URL size limit effectively limits the count
to less than that. Disabled users are not returned; IDs not found in the database are omitted from
the map.

RETURNS:
```
{
  <anonymous ID 1>: <user name 1>,
  ...
  <anonymous ID N>: <user name N>
}
```

#### Legacy

Endpoints (mostly) identical to the original Globus and KBase auth endpoints are provided for
backwards compatibility.

`POST /api/legacy/KBase/Sessions/Login`
The legacy KBase API.

`GET /api/legacy/globus`
The legacy globus API. Endpoints are /goauth/token and /users.

### Test Mode

Test mode allows integration of the auth service into test harnesses for dependent services and
applications by providing endpoints for creating test users, tokens, and roles on the fly. A
subset of the API above is supported (see below).

To enable test mode, add the following line to the service `deploy.cfg` file:

	test-mode-enabled=true

Test mode should never be enabled for production services.

All test mode data is stored in separate collections from the standard data in the service data
stores, and is automatically deleted one hour after creation. Test mode user accounts have no
passwords and no linked identities and so logging into test mode accounts is impossible,
although tokens can be created arbitrarily. Note that test mode user accounts are more or less
arbitrarily specified as local accounts in the API.

Test mode data is only accessible via endpoints under the `/testmode` root endpoint.

#### Standard endpoints

These endpoints mimic the behavior of the standard API endpoints above, but only interact with
test mode data.

`GET /testmode`

`GET /testmode/api/V2/me`

`GET /testmode/api/V2/token`

`GET /testmode/api/V2/users`

`POST /testmode/api/legacy/KBase/Sessions/Login`

`GET /testmode/api/legacy/globus`

#### Data manipulation endpoints

These endpoints allow a test harness to create and modify test mode users, tokens, and roles.
No authentication is required.

`POST /testmode/api/V2/testmodeonly/user`
Create a user. Takes JSON encoded data with the keys `user` for the user name and `display` for
the user's display name.

`GET /testmode/api/V2/testmodeonly/user/<username>`
Get a user's data.

`POST /testmode/api/V2/testmodeonly/token`
Create a token. The user to which the token is assigned must exist. Takes JSON encoded data with
the keys `user` for the user name, `name` for an optional token name, and `type` for the token
type. `type` is one of `Login`, `Agent`, `Dev`, or `Serv`.

`POST /testmode/api/V2/testmodeonly/customroles`
Create a custom role. Takes JSON encoded data with the keys `id` for the role id and `desc` for
the role description. Posting a role with an existing ID overwrites the description of the role.

`GET /testmode/api/V2/testmodeonly/customroles`
Get the list of extant custom roles.

`PUT /testmode/api/V2/testmodeonly/userroles`
Set a user's roles, overwriting any current roles. Takes JSON encoded data with the keys `user`
for the user name of the user to modify, `roles` for a list of built-in roles to grant to the
user, and `customroles` for a list of custom role ids to grant to the user. Allowed `roles` are
`DevToken`, `ServToken`, `Admin`, and `CreateAdmin`. Note that these roles don't grant
any actual privileges in test mode. Omitting `roles` and `customroles` removes all roles from
the user.

`DELETE /testmode/api/V2/testmodeonly/clear`
Removes all test mode data from the system.

## Admin notes

* It is expected that this server always runs behind a reverse proxy (such as
  nginx) that enforces https / TLS and as such the auth server is configured to
  allow cookies to be set over insecure connections.
  * If the reverse proxy rewrites paths for the auth server, cookie path
    rewriting must be enabled for the /login and /link paths. Nginx example:

		location /auth/ {
			proxy_pass http://localhost:20002/;
			proxy_cookie_path /login /auth/login;
			proxy_cookie_path /link /auth/link;
		}

* Get Globus creds [here](https://developers.globus.org)
  * Required scopes are:
    * urn:globus:auth:scope:auth.globus.org:view_identities
    * email
* Get Google OAuth2 creds [here](https://console.developers.google.com/apis)
* Get OrcID creds [here](https://orcid.org/content/register-client-application-0)
  * Note that only the public API has been tested with the auth server.
* In version 0.6.0, the canonicalization algorithm for user display names changed and the
  database needs to be updated.
  * See the `--recanonicalize-display-names` option for the `manage_auth` script. This can
    be run while the server is live **after** updating to version 0.6.0.
  * Once the names have been recanonicalized, the `--remove-recanonicalization-flag` can be
    used to remove flags set on database objects to avoid reprocessing if the recanonicalize
    process does not complete.

## Requirements

Java 8 (OpenJDK OK)
Apache Ant (http://ant.apache.org/)
MongoDB 2.6+ (https://www.mongodb.com/)
Jetty 9.3+ (http://www.eclipse.org/jetty/download.html)
    (see jetty-config.md for version used for testing)
This repo (git clone https://github.com/kbase/auth2)
The jars repo (git clone https://github.com/kbase/jars)
The two repos above need to be in the same parent folder.

## To start server

start mongodb
if using mongo auth, create a mongo user
cd into the auth2 repo
`ant build`
copy `deploy.cfg.example` to `deploy.cfg` and fill in appropriately
`export KB_DEPLOYMENT_CONFIG=<path to deploy.cfg>`
`cd jettybase`
`./jettybase$ java -jar -Djetty.port=<port> <path to jetty install>/start.jar`

## Administer the server

Set a root password:
`./manage_auth -d <path to deploy.cfg> -r`

Login to a local account as `***ROOT***` with the password you set. Create a
local account and assign it the create administrator role. That account can
then be used to create further administrators (including itself) without
needing to login as root. The root account can then be disabled.

## Start & stop server w/o a pid

`./jettybase$ java -DSTOP.PORT=8079 -DSTOP.KEY=foo -jar ~/jetty/jetty-distribution-9.3.11.v20160721/start.jar`
`./jettybase$ java -DSTOP.PORT=8079 -DSTOP.KEY=foo -jar ~/jetty/jetty-distribution-9.3.11.v20160721/start.jar --stop`

Omit the stop key to have jetty generate one for you.

## Developer notes

### Adding and releasing code

* Adding code
  * All code additions and updates must be made as pull requests directed at the develop branch.
    * All tests must pass and all new code must be covered by tests.
    * All new code must be documented appropriately
      * Javadoc
      * General documentation if appropriate
      * Release notes
* Releases
  * The master branch is the stable branch. Releases are made from the develop branch to the master
    branch.
  * Update the version as per the semantic version rules in
    `src/us/kbase/auth2/service/common/ServiceCommon.java`.
  * Tag the version in git and github.

### Running tests

* Copy `test.cfg.example` to `test.cfg` and fill in the values appropriately.
  * If it works as is start buying lottery tickets immediately.
* `ant test`

### UI

* Some fields are arbitrary text entered by a user. These fields should be HTML-escaped prior to
  display. Currently the fields include:
  * Custom role descriptions
  * The reason for why a user account was enabled and disabled.
  * User display names and email addresses.
  * Token names
  * Token custom context

Use common sense when displaying a field from the server regarding whether the field should be
html escaped or not.

### Templates

All the HTML templates for the test UI are in the /templates directory and are
[mustache](https://mustache.github.io/) templates.

### Exception mapping

In `us.kbase.auth2.lib.exceptions`:
`AuthException` and subclasses other than the below - 400
`AuthenticationException` and subclasses - 401
`UnauthorizedException` and subclasses - 403
`NoDataException` and subclasses - 404

`JsonMappingException` (from [Jackson](https://github.com/FasterXML/jackson)) - 400

Anything else is mapped to 500.

## Ancient history

https://github.com/kbaseIncubator/auth2proto


text:
The Repulse device can push or pull the center of the terrain, creating an implosion or explosion type outward distortion.

## Properties

- **Amount**: The amount of distortion. Negative values push the center outwards; positive values pull the center inwards.
- **Scale**: The size of the distortion.
- **X/Y**: The center of the distortion.

repository: QuadSpinner/GeoGlyph-Docs

branch_name: refs/heads/dev

repo_name: QuadSpinner/GeoGlyph-Docs


text:
---
permalink: "/adding-sensors-to-the-web-of-things/"
cover: img.jpg
title: "Adding Sensors to the Web of Things"
description: "We’re big fans of connecting the web to the “Internet of Things.” This guest post from Samsung Open Source Group’s Philippe Coval, following up this post from last year from ziran sun on Internet of things and GRPR, gives some details on how we’re been progressing on this over the past year, specifically when it comes to sensors."
category: WoT
img: https://miro.medium.com/max/1200/0*N4edp2L2KgMEnOId.png
author: RzR
authorImg: https://miro.medium.com/fit/c/96/96/1*nP3-EBaH0sUGehI_8PC2YQ.jpeg
tags: [WoT, Mozilla, Sensors, Opensource, Webofthings]
---

# Adding Sensors to the Web of Things

*We’re big fans of connecting the web to the “Internet of Things.” This guest post from Samsung Open Source Group’s Philippe Coval, following up this post from last year from [ziran sun](undefined) on [Internet of things and GRPR](https://medium.com/samsung-internet-dev/web-internet-of-things-and-gdpr-1182bbc3162f), gives some details on how we’re been progressing on this over the past year, specifically when it comes to sensors.*

## CONTEXT:

Since Internet was widely deployed and massively adopted, the world changed so much so regulations are also evolving.

In 2018 [GDPR from EU](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation), was established. [Articles 25 and 32](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32016R0679&from=EN#d1e3063-1-1) are encouraging services operators to invest into “[PrivacyByDesign](https://en.wikipedia.org/wiki/Privacy_by_design)” systems, [IoT is obviously part of this](https://medium.com/samsung-internet-dev/web-internet-of-things-and-gdpr-1182bbc3162f).

## THINGS PROJECT:

The paradigm shift from “cloud centric IoT” to the Edge is a good opportunity for [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) projects.

Mozilla’s Things project is one of them, this is no need to introduce Mozilla’s organization, it is mostly known for Firefox web-browser or MDN website. But do you know about their [commitment to keep the web open by developing opensource focusing on user privacy and promote decentralized architectures](https://blog.mozilla.org/opendesign/)?

Things framework is inspired by [“Web Of Things”](https://en.wikipedia.org/wiki/Web_of_Things) concepts and is somehow decentralized because user data stays in user’s network unless explicitly shared to a peer, this a good base to experiment with.

My first “Mozilla-IoT” contribution was the “generic sensors adapter” for the Things gateway.

Today we will focus on Mozilla’s gateway, as it is the core component of the whole “Things” framework. [“Version 0.8.0 was released”](https://github.com/mozilla-iot/gateway/releases) on this 2019’s spring, so you can try it your own on Raspberry Pi.

The Raspberry Pi 3 is the reference platform, RPi 2 is working fine too but it should be possible to port to other single board computers (supporting GnuLinux like [ARTIK](https://www.slideshare.net/rzrfreefr/webthingiotjstizenrtcdl201820181117rzr) , etc).

The post will explain how to get started and how to establish basic automation using [I2C sensors on gateway’s device](https://discourse.mozilla.org/t/creating-i2c-add-on/26696/4) along actuators (all with [“PrivacyByDesign”](https://en.wikipedia.org/wiki/Privacy_by_design) ) or without any cloud connection).

To get started, first install the gateway according to [project’s straightforward instructions](https://iot.mozilla.org/gateway/).

>

## PREPARE SD CARD:

To use adapter version 0.4.0 or later of gateway is needed, but I encourage to install a fresh latest release.

Let’s download the Raspbian based image [“gateway-0.8.0.img.zip”](https://github.com/mozilla-iot/gateway/releases/download/0.8.0/gateway-0.8.0.img.zip) and dump contents of the 1.2 GB archive to SD card (4GB should be enough as 3.2 GB will be used).

    sudo apt-get install sudo wget unzip file # Adapt if not on Debian or derived

    version="0.8.0" # Or later
    url="https://github.com/mozilla-iot/gateway/releases/download/${version}/gateway-${version}.img.zip"

    lsblk # Identify your sdcard adapter ie:
    dev=/dev/disk/by-id/usb-Generic-TODO

    sudo sync && file "$dev"
    wget -O- "$url" | funzip | sudo dd of="$dev" bs=8M oflag=dsync
    sync

## FIRST BOOT:

Next, install the SD card in your Raspberry Pi, (Older RPis could work too, even if you no wifi adapter).

When it has completed the first boot, you can check on your router that the [Avahi](https://en.wikipedia.org/wiki/Avahi_(software)) daemon is registering “gateway.local” using [mDNS (multicast DNS)](https://en.wikipedia.org/wiki/Multicast_DNS)

It should takes a couple of minutes to get up, if unsure you can ping ‘gateway.local’.

## LOGGING IN:

Either you connect to the gateway by WiFi or Wired (running in your LAN), for later case you should be able to access the web server by a fixed address.

If WiFi adapter is present on your RPI then first page will be redirected to WiFi configuration page:

    URL: http://gateway.local/wifi-setup
    Connect to a Wi-Fi network?

    ...
    @TizenHelper
    FreeWifi_secure
    public
    ...

    [Skip]

We can skip it for now, by pressing the bottom “Skip” button.

    URL: http://gateway.local/connecting

    Wi-Fi setup skipped

    The gateway is now being started.
    Navigate to gateway.local in your web browser
    while connected to same network as the gateway to continue setup.

    Note: If you are unable to load gateway.local,
    look up the gateway's IP address on your router.

After a short delay, the user should be able to reconnect to the entry page:

    URL: http://gateway.local/

    Welcome
    Choose a secure web address for your gateway:
    .mozilla-iot.org

    [X] Please keep me updated about new features and contribution opportunities. Privacy Policy

    [Skip]

The gateway can be registered on mozilla.org for remote management, but we can skip this for now.

Then administrator is now welcome to register new users:

    URL: http://gateway.local/signup/

    Welcome

    Create your first user account:

    Name: [user]
    Email: [user@localhost]
    Password: [password]
    Confirm Password: [password]

    [Next]

Now we’re ready to use it:

    URL: http://gateway.local/things

    No devices yet. Click + to scan for available devices.

    [+]

    [Menu:]

    [Things]
    [Rules]
    [Floorplan]
    [Settings]
    [Log out]

## FILLING DASHBOARD:

You can start filling your dashboard with Virtual Resources,

First hit the “burger menu” icon on top left, go to “settings” page, and then go to the “addons” page, press on button left “+” button.

    URL: http://gateway.local/settings/addons/discovered

    virtual-things-adapter 0.1.4
    Mozilla IoT Virtual Things Adapter
    by Mozilla IoT

Here you can “Add” a “Virtual Things” adapter, it will be then download from community repository, and status will change from “Installing…” to “Added”

Then get back to previous page using top left “back” arrow.

It should be listed along ThingURLAdapter on the adapters page:

    URL: http://gateway.local/settings/adapters

    ThingURLAdapter (thing-url-adapter)
    VirtualThingsAdapter (virtual-things)

You can then go back to the “Things” page (it’s the first entry in the menu); we can start adding “things” by pressing the bottom “+” icon.

    URL: http://gateway.local/things

    Virtual On/Off Color Light
    Color Light

    [Save]

Then press “Save” and “Done” at bottom of list.

From this point, you can decide to control a virtual lamp from the UI, and even establish some basic rules (second entry in menu) with more virtual resources.

![Virtual Things](https://cdn-images-1.medium.com/max/2048/1*1dW_JE8VeHU_a98nW1ExzQ.png)*Virtual Things*

## SENSING REALITY:

Because IoT is not about virtual worlds ([is it?](https://social.samsunginter.net/@rzr/101867385704982854)), let’s see how to deal with the physical world using sensors and actuators.

For sensors, there are many way to connect them to computers using analog or digital inputs on different buses.

To make it easier for applications developers, this can be abstracted by following [W3C’s generic sensors API](https://w3c.github.io/sensors/).

While working on IoT.js’s modules, I made a [“generic-sensors-lite”](https://www.npmjs.com/package/generic-sensors-lite) module that abstracted a couple of I2C drivers from the NPM repository.

To verify the concept, I have made an [adapter for Mozilla’s IoT Gateway (which is running Node.js)](file:///local/home/philippe/var/cache/url/git/ssh/github.com/TizenTeam/blog/src/blog/content/posts/2019-05-21--generic-sensors-adapter-for-mozilla-things/%5Bhttps://github.com/rzr/mozilla-iot-generic-sensors-adapter) , so I published the generic-sensors-lite NPM module first for NodeJs (it’s supporting both runtimes).

Of course you’ll need at least one real sensor attached to the I2C pins of the board.

Today only 3 modules are supported, and they are easy to find:

* [BH1750](https://www.amazon.com/HiLetgo-BH1750FVI-Digital-Intensity-Arduino/dp/B01DLG4NZC/ref=rzr-21#): for [measuring illuminance](https://www.slideshare.net/SamsungOSG/iotivity-from-devices-to-the-cloud-71867171/14#) (module is about 1 or 2 USD)

* [BMP085](https://www.amazon.com/JBtek-Barometric-Pressure-Temperature-Altitude/dp/B00UUS12PO/ref=rzr-21#): for measuring temperature, or any compatible sensor (ie: BMPX8X)

* [TCS34725](https://www.amazon.com/Adafruit-Color-Sensor-Filter-White/dp/B00OKCRU5M/ref=rzr-21#): [color sensor](https://github.com/samsunginternet/color-sensor-js)

For actuators, either you use virtual things, or use GPIO adapter and make some wiring on PI header.

## INSTALL MOZILLA-IOT-GENERIC-SENSORS-ADAPTER:

Since addon landed in repository so the procedure is same:

Go to addon menu, select, add, it’s trivial

    URL: http://gateway.local/settings/addons

    Generic Sensors 0.0.8 Generic Sensors devices support....

Then add our sensors things:

    URL: http://gateway.local/things

    Ambient Light Sensor
    (Multi Level Sensor)
    [Save]

    Color Sensor
    (Custom thing)
    [Save]

    Temperature Sensor
    (Multi Level Sensor)
    [Save]

Then “Done” button at bottom of page.

Then they will appear on page and they should be turned on individually on respective page:

* [http://gateway.local/things/generic-sensors-0#](http://gateway.local/things/generic-sensors-0#) (Ambient)

* [http://gateway.local/things/generic-sensors-1#](http://gateway.local/things/generic-sensors-1#) (Color)

* [http://gateway.local/things/generic-sensors-2#](http://gateway.local/things/generic-sensors-2#) (Temperature)

To get value updated in the UI, they need to be turned on first.

>

## SIMULATE:

If you don’t have any sensors devices, they can be mocked using “simulator” controllers,

For example the Color Sensor is removed, it can be edited from adaptor’s schemas:

From Menu / Settings / Addons / Generic Sensors / Configure

    URL: http://gateway.local/settings/addons/config/generic-sensors-adapter

    generic-sensors
    (...)
    type: customSensor
    sensorType: colorSensor
    sensorController: tcs34725
    (...)

Replace “sensorController” value to “simulator”, and press Apply. Then back to “things” page, add the “Color Sensor” , turn it on and you’ll see the color updated randomly each seconds.

Note that color sensor is [not yet an approved “W3C generic sensor”](https://github.com/w3c/ambient-light/issues/9#) but it can be a good example to learn IoT.js, WebThings or even do some [UI/XR experiments](https://github.com/samsunginternet/color-sensor-js#).

## MORE:

If you have or want other sensors to be supported, [just file a ticket in “generic-sensors-lite”](https://github.com/rzr/generic-sensors-lite/issues) .

Developing on device is also possible.

[Canonical link](https://medium.com/samsung-internet-dev/sensors-webthings-bc48ad9963dd)

gha_language: HTML

gha_license_id: MIT


text:
---
name: [CONTRIBUTORS ONLY] Verify an content creator
description: Verify an content creator. Ensure that the creator exists online with atleast one social link/website.
title: [@community/verify-creator] Request to verify Creator Name Here
assignee: ThePinsTeam, AndreiJirohHaliliDev2006
label: "verify-creator"
---

## Metadata

```yml
# PLEASE READ ME FIRST BEFORE FILLING UP BELOW THIS TEXT!
# 1. Commented out fields are optional but free free to uncomment them and fill up.
# 2. Required fields usually have placeholders, please replace them with real data.
# 3. Full schema/reference for the YAML-styled form is on docs/YAML-Reference.md
# PLEASE READ ME FIRST BEFORE FILLING UP ABOVE THIS TEXT!

slug: creator-name-here
name: Creator Name Here
about: 72-character info about the creator
type: creator
categories:
  - Please see docs/Categories.md for the full list
socialLinks:
  - type: undefined
    url: https://example.com
    isMirror: false
    isUnofficial: false
```

---

<details>

<summary>Sign-off details are hidden by default, click me to see.</summary>

## Sign-off

By submiting this issue, you agree to:

* [our Community Code of Conduct](https://github.com/MadeByThePinsHub/policies/blob/main/CODE_OF_CONDUCT.md); and
* [the contributing guidelines](https://github.com/RecapTime/verify/blob/main/CONTRIBUTING.md)

By submitting this issue, you also agree that the information you filed up are
accurate at the time of submission. The project maintainers has the right to block
submissions from certain users who submit inaccurate information about an specific
entity you wish want to be added to the registry.

* [ ] Please replace `[ ]` with `[X]` to agree to the above terms.
</details>

repository: fossabot/verify

branch_name: refs/heads/main

repo_name: fossabot/verify


text:
Pattern: Irregular whitespace

Issue: -

## Description

This rule enforces whitespace usage around an operator, bracket or block opener based on _PEP 8_ style guide. Warning is raised when any of the following rules is violated:
- Any of the following operators is surrounded by one space: `==, !=, <>, <=, >=, <, >, =, +=, -=, *=, **=, /=, //=, &=, |=, ^=, %=, >>=, <<=`
- Any opening bracket ( `(, [, {` ) is not followed by any space.
- Any closing bracket ( `), ], }` ) is not preceded by any space.
- Any comma is not preceded by any space, and is followed by one space.
- Any block opener colon is not preceded by any space.

Example of **incorrect** code:

```python
if x == 4 : print x , y ; x , y = y , x
```

Example of **correct** code:

```python
if x == 4: print x, y; x, y = y, x
```

The guidelines provided by _PEP 8_ are intended to improve the readability of code and make it consistent across the wide spectrum of Python code.

## Further Reading

* [PEP 8 - Whitespace in Expressions and Statements](https://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
---
layout: leftnav-page-content
title: Gyms
permalink: /persons-with-disabilities/inclusive-gyms/
breadcrumb: Inclusive Sports Facilities
collection_name: persons-with-disabilities
second_nav_title: "Inclusive Sports Facilities"
---

![Inclusive Gym](/images/DSMP-inclusivegym.jpg)

ActiveSG gymnasiums across Singapore are currently undergoing transformations to cater to people from all walks of life. New and upgraded ActiveSG gyms are equipped with specialised machines with adaptable features, such as removable seats for wheelchair users, and Natural Transmission pneumatic technology to ensure all movements, weight and resistance adjustments are safe and easy on the joints.

Persons with disabilities, seniors, and beginner gym goers can seek the assistance of ActiveSG Fitness Instructors to create a specialised training plan utilising these machines.

##### Gym Locations

    Jurong West Sports Centre
    20 Jurong West Street 93, Singapore 648965

Operating Hours

    Toa Payoh Sports Centre
    301 Lor 6 Toa Payoh, Singapore 319392

Operating Hours

    Enabling Village
    20 Lengkok Bahru, #01-05 Enabling Village, Singapore 159053

Operating Hours

    Heartbeat@Bedok
    11 Bedok North Street 1, Singapore 469662

Operating Hours

    Our Tampines Hub
    1 Tampines Walk, Singapore 528523

Operating Hours

repository: isabelfoo/isomerpages-sportcares

repo_name: isabelfoo/isomerpages-sportcares


text:
---
title: Introduction
type: index
weight: 1
---

LaraDock strives to make the PHP development experience easier and faster.

It contains pre-packaged Docker Images that provides you a wonderful *development* environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.

LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal...).

## Quick Overview

Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL`, `Redis` and `beanstalkd`:

1 - Clone LaraDock inside your PHP project:

```shell
git clone https://github.com/Laradock/laradock.git
```

2 - Enter the laradock folder and run this command:

```shell
docker-compose up -d nginx mysql redis beanstalkd
```

3 - Open your `.env` file and set the following:

```shell
DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
```

4 - Open your browser and visit localhost: `http://localhost`.

```shell
That's it! enjoy :)
```

## What is Docker?

[Docker](https://www.docker.com) is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of [operating-system-level virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) on Linux, Mac OS and Windows.

## Why Docker not Vagrant!?

[Vagrant](https://www.vagrantup.com) creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds.

Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you **lightweight** Virtual Containers, that share the same kernel and allow to safely execute independent processes.

In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.

Most importantly Docker can run on Development and on Production (same environment everywhere). While Vagrant is designed for Development only, (so you have to re-provision your server on Production every time).

## LaraDock VS Homestead (For Laravel Developers)

> LaraDock It's like Laravel Homestead but for Docker instead of Vagrant.

LaraDock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).

- Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.

- LaraDock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.

Running a virtual container is much faster than running a full virtual Machine. Thus **LaraDock is much faster than Homestead**.

## Demo Video

What's better than a **Demo Video**:

- LaraDock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
- LaraDock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
- LaraDock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
- LaraDock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)

## Features

- Easy switch between PHP versions: 7.0, 5.6, 5.5...
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
- Run your own combination of software: Memcached, HHVM, Beanstalkd...
- Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI...
- Easy to customize any container, with simple edit to the `Dockerfile`.
- All Images extends from an official base Image. (Trusted base Images).
- Pre-configured NGINX for Laravel.
- Easy to apply configurations inside containers.
- Clean and well structured Dockerfiles (`Dockerfile`).
- Latest version of the Docker Compose file (`docker-compose`).
- Everything is visible and editable.
- Fast Images Builds.
- More to come every week..

## Supported Software (Containers)

- **Database Engines:**
	- MySQL
	- PostgreSQL
	- MariaDB
	- MongoDB
	- Neo4j
	- RethinkDB
- **Cache Engines:**
	- Redis
	- Memcached
	- Aerospike
- **PHP Servers:**
	- NGINX
	- Apache2
	- Caddy
- **PHP Compilers:**
	- PHP-FPM
	- HHVM
- **Message Queuing Systems:**
	- Beanstalkd
	- Beanstalkd Console
	- RabbitMQ
	- RabbitMQ Console
- **Tools:**
	- PhpMyAdmin
	- PgAdmin
	- ElasticSearch
	- Selenium
	- Minio
	- Workspace
		- PHP7-CLI
		- Composer
		- Git
		- Linuxbrew
		- Node
		- Gulp
		- SQLite
		- xDebug
		- Envoy
		- Deployer
		- Vim
		- Yarn
		- ... Many other supported tools are not documented. (Will be updated soon)

>If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :)

## Chat with us

You are welcome to join our chat room on Gitter.

[![Gitter](https://badges.gitter.im/LaraDock/laradock.svg)](https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

gha_language: PHP


text:
In the previous exercise, we learned how to use cookies to store the user's
view times.  But in this exercise, we will try to use sessions to do the same
thing.

visit `/`:
=>
respond body: `1 views`
set-cookie: `koa:sess=…`

visit `/` again:
=>
respond body: `2 views`
set-cookie: `koa:sess=…`

HINT

In this exercise, we will use `koa-session`, so install it:

```
npm install koa-session
```

`koa-session` is based on signed cookies, so we must set `app.keys`.

```
const Koa = require('koa');
const session = require('koa-session');

const app = new Koa();
app.keys = ['secret', 'keys'];

app.use(session(app));
```

Then you can use `ctx.session` in koa handlers.

READ MORE

`koa-session` uses cookie-based sessions, and `koa-generic-session` is a more
generic implementation, as in Express.

```
https://github.com/koajs/session
https://github.com/koajs/generic-session
```

repository: AruSeito/kick-off-koa

repo_name: AruSeito/kick-off-koa


text:
---
title: "Nocode tools to help businesses survive COVID19"
created_at: 2020-03-25T10:42:14.000Z
published_at: 2020-03-25T22:33:36.000Z
---
So I made a thing today, to help small local businesses survive COVID19.

It’s a listing (another one!) of free tools, called "[Tools for COVID19](https://outsprint.io/covid19)" to help brick-&-mortar businesses quickly implement a digital presence with little effort.

Some background: I was really enamoured by [@bentossell](https://twitter.com/bentossell/status/1241296396445257728?s=21)'s efforts. He made nocode tools and app templates on Glideapps to help anyone struggling with running a restaurant/eatery now, to quickly transit to delivery/pick-up business model. The free [Glideapps app template](https://restauranteurs.glideapp.io/) for restaurant owners allows them to set up a mobile ordering app within hours - get food menu online, make orders, receive payment. No programming required. Great for sole proprietors and small-medium food businesses who aren't always tech-savvy, don’t have buffer resources to ride out this market slump, and need new solutions fast.

After Ben made this, he went on to make a few more: an app for [check in daily with loved ones](https://dailylog.glideapp.io/), a [community board](https://asdfghdse.carrd.co/) for volunteers and businesses, and an app for patients to book [video appointments with doctors](https://drmedical.glideapp.io/). I started sharing these around, and soon, I found more and more such tools. Now _someone_ had to collect them, isn't it?!

Moreover, with many countries in or going into lockdown, businesses are being ordered to close temporarily, or just simply affected by the lower footfall due to social distancing. Singapore is no different. We just closed all entertainment venues like bars, pubs, cinemas. All tuition centres for students closed too. No gatherings of more than 10 people. Foreigners barred from entry or transit, meaning flights are down. Pilots from our prestigious Singapore Airlines are told to take no pay leave. Businesses in tourism, entertainment, education, food and beverage, shopping, are all gravely affected. Some of our favourite local stores—especially the small, mom-and-pop type of shops—may never come back.

As fate would have it, a gentle nudge and spark by my friend Gaurav from civic tech collective [better.sg](https://better.sg/) today was just the push I needed to create this directory to (try to) help businesses, especially local small-medium enterprises, to survive the economic fallout from the COVID19 pandemic. There's a need to quickly adapt to the new market environment through new businesses models, services and product offerings. Some [trends](https://cowriters.app/words/businesses-gaining-from-covid19-disorder-383055e7581e5eb56f) I observed:

*   Remote experiences goes mainstream
*   At-home over in-store consumption
*   Supply chain to your door
*   Sanitation all of the day, all of the time

The list of tools will go some way to help businesses go remote/digital, especially for brick-and-mortar stores. And it needs to be done fast, therefore many of them are nocode tools. It's based on the need for speed and remote delivery that I collected these tools and resources to help businesses 'pivot' and to innovate. Most if not all do not need any programming knowledge to set up, and many are free or low cost.

Admittedly this is just version 0.1. I'm not even sure this will be useful, to be honest, since I’m not even in F&B/tuition/healthcare/etc. It’s just a collection of links I saw shared on Facebook and Twitter, made this site quickly within a day and launched it, so that actual users, F&B owners, small business owners can try it and give feedback.

Please forward if you know anyone who might benefit from this. Happy to hear how it helped, or not. ??

\-

### [https://outsprint.io/covid19](https://outsprint.io/covid19)


text:
* Make sure you're running jdk8
* Make sure you have gpg configured with a key that is known to the sonatype keyservers
* Make sure you have your sonatype credentials configured in ~/.sbt:

  credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)

* ./release.sh
* git push --tags
* close and release the release staging repo on oss.sonatype.org
* delete the snapshot staging repo on oss.sonatype.org
* create a release in github with a short changelog

repository: scala-steward/ssl-config

gha_license_id: NOASSERTION

repo_name: scala-steward/ssl-config


text:
Description
===========

Installs irssi

Requirements
============

## Platform:

* Debian/Ubuntu

Recipes
=======

## default

Installs the irssi package.

License and Author
==================

- Author:: Jared R Baldridge<EMAIL_ADDRESS>- Copyright:: 2013, Jared R Baldridge

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

repository: vgadreau/demo

repo_name: vgadreau/demo


text:
Pattern: Missing use of `refute_kind_of(Class, object)`

Issue: -

## Description

Enforces the use of `refute_kind_of(Class, object)` over
`refute(object.kind_of?(Class))`.

## Examples

``` ruby
# bad
refute(object.kind_of?(Class))
refute(object.kind_of?(Class), 'message')

# good
refute_kind_of(Class, object)
refute_kind_of(Class, object, 'message')
```

## Further Reading

- <https://github.com/rubocop/minitest-style-guide#refute-kind-of>


text:
After you have download the package at:

https://github.com/UoA-CompSci/fullcalendar-uoa-ui/raw/master/scripts.zip

and unzipped the package, you must add your key and calendar id to the simple.html to access your calendar.

on line 29 replace the '1' with your calendar number
on line 20 replace the Token with your Token

![alt tag](images/gettingstarted1.jpg)


text:
---
layout: post
title: "Get it brilliant"
date: 2011-12-30 18:20
comments: true
categories:
---

I wrote a post in September 2011 in the [Noverse Blog](http://www.noverse.com/blog/) called [Get It Brilliant](http://www.noverse.com/blog/2011/09/get-it-brilliant/) on the what you really need to achieve to create amazing software products.

Since that article was written, I have worked on two products that you will see early next year. Both are properly designed and architected. Both are working, right, fast and intuitive. All that's left is to do is ship.

Its going to be a brilliant 2012.

extension: markdown

gha_language: JavaScript


text:
# Casino_War

As a group project, we implemented a classical casino game called Casino War using Javascript, CSS and HTML.
Instruction and rules are explained in the game console.

## [Play Now](http://casinowar.fun/)


text:
+++
title = "azure_network_interface Resource"
platform = "azure"
draft = false
gh_repo = "inspec-azure"

[menu.inspec]
title = "azure_network_interface"
identifier = "inspec/resources/azure/azure_network_interface Resource"
parent = "inspec/resources/azure"
+++

Use the `azure_network_interface` InSpec audit resource to test the properties and configuration of the Azure Network interface.

## Azure REST API Version, Endpoint, and HTTP Client Parameters

{{% inspec_azure_common_parameters %}}

## Installation

{{% inspec_azure_install %}}

## Syntax

An `azure_network_interface` resource block identifies an AKS Cluster by `name` and `resource_group`, or the `resource_id`.

```ruby
describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORKINTERFACENAME') do
  it { should exist }
end
```

```ruby
describe azure_network_interface(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}') do
  it { should exist }
end
```

## Parameters

`resource_group`
: Azure resource group where the targeted resource resides.

`name`
: Name of the AKS cluster to test.

`resource_id`
: The unique resource ID.

Either one of the parameter sets can be provided for a valid query:

- `resource_id`
- `resource_group` and `name`

## Properties

`primary?`
: Indicates whether this is a primary network interface on a virtual machine.

`ip_configurations`
: A list of [IPConfigurations](https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaceipconfigurations/get#networkinterfaceipconfiguration) of the network interface.

`private_ip`
: The private IP address of the interrogated network interface's primary IP configuration.

`private_ip_address_list`
: A list of all the private IP addresses of the interrogated network interface.

`has_private_address_ip?`
: Indicates whether the interrogated network interface has a private IP address.

`public_ip`
: The public IP address ID of the interrogated network interface's primary IP configuration. `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}`.

`public_ip_id_list`
: A list of all the public IP address IDs of the interrogated network interface.

`has_public_address_ip?`
: Indicates whether the interrogated network interface has a public IP address.

For properties applicable to all resources, such as `type`, `name`, `id`, and `properties`, refer to [`azure_generic_resource`]({{< relref "azure_generic_resource.md#properties" >}}).

Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaces/get#networkinterface) for other properties available.

Any attribute in the response may be accessed with the key names separated by dots (`.`). For example, `properties.<attribute>`.

## Examples

### Test if IP forwarding is enabled

```ruby
describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  its('properties.enableIPForwarding') { should be_true }
end
```

### Test if the primary IP configuration is set to correct private IP address

```ruby
describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  its('private_ip') { should cmp '<IP_ADDRESS>' }
end
```

## Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://docs.chef.io/inspec/matchers/).

### be_primary

Tests if a network interface is the primary network interface on a virtual machine.

```ruby
describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  it {should be_primary}
end
```

### have_public_address_ip

Test if a network interface has a public IP address.

```ruby
describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  it { should have_public_address_ip}
end
```

### have_private_address_ip

Test if a network interface has a private IP address.

```ruby
describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  it { should have_private_address_ip}
end
```

### exists

```ruby
# If we expect 'NETWORK_INTERFACE_NAME' to always exist.

describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  it { should exist }
end
```

### not_exists

```ruby
# If we expect 'NETWORK_INTERFACE_NAME' to never exist.

describe azure_network_interface(resource_group: 'RESOURCE_GROUP', name: 'NETWORK_INTERFACE_NAME') do
  it { should_not exist }
end
```

## Azure Permissions

{{% azure_permissions_service_principal role="contributor" %}}

repository: inspec/inspec-azure

gha_language: Ruby

repo_name: inspec/inspec-azure


text:
# State of New York Mortgage Agency (SONYMA) Target Areas by Census Tract

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/state-of-new-york-mortgage-agency-sonyma-target-areas-by-census-tract) |
| Metadata | [Link](https://data.ny.gov/api/views/43kr-jb2c) |
| Data: JSON | [100 Rows](https://data.ny.gov/api/views/43kr-jb2c/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.ny.gov/api/views/43kr-jb2c/rows.csv?max_rows=100) |
| Host | data.ny.gov |
| Id | 43kr-jb2c |
| Name | State of New York Mortgage Agency (SONYMA) Target Areas by Census Tract |
| Attribution | NYS Homes & Community Renewal |
| Category | Economic Development |
| Tags | mortgage, fha, hfa, single family, capital program, housing plan |
| Created | 2016-06-17T12:58:08Z |
| Publication Date | 2016-06-20T20:10:06Z |

## Description

Listing of SONYMA target areas by US Census Bureau Census Tract or Block Numbering Area (BNA).
The State of New York Mortgage Agency (SONYMA) targets specific areas designated as ?areas of chronic economic distress? for its homeownership lending programs. Each state designates ?areas of chronic economic distress? with the approval of the US Secretary of Housing and Urban Development (HUD). SONYMA identifies its target areas using US Census Bureau census tracts and block numbering areas. Both census tracts and block numbering areas subdivide individual counties. SONYMA also relates each of its single-family mortgages to a specific census tract or block numbering area.
New York State identifies ?areas of chronic economic distress? using census tract numbers. 26 US Code ? 143 (current through Pub. L. 114-38) defines the criteria that the Secretary of Housing and Urban Development uses in approving designations of ?areas of chronic economic distress? as: i) the condition of the housing stock, including the age of the housing and the number of abandoned and substandard residential units, (ii) the need of area residents for owner-financing under this section, as indicated by low per capita income, a high percentage of families in poverty, a high number of welfare recipients, and high unemployment rates, (iii) the potential for use of owner-financing under this section to improve housing conditions in the area, and (iv) the existence of a housing assistance plan which provides a displacement program and a public improvements and services program.
The US Census Bureau?s decennial census last took place in 2010 and will take place again in 2020. While the state designates ?areas of chronic economic distress,? the US Department of Housing and Urban Development must approve the designation. The designation takes place after the decennial census.

## Columns

```ls
| Included | Schema Type    | Field Name  | Name                | Data Type | Render Type |
| ======== | ============== | =========== | =================== | ========= | =========== |
| No       | time           | :updated_at | updated_at          | meta_data | meta_data   |
| Yes      | series tag     | county      | County              | text      | text        |
| Yes      | series tag     | fips        | FIPS                | text      | number      |
| Yes      | numeric metric | bggeoid10   | Block Group GEOID10 | number    | number      |
| No       |                | latitude    | Latitude            | number    | number      |
| No       |                | longitude   | Longitude           | number    | number      |
```

## Time Field

```ls
Value = updated_at
Format & Zone = seconds
```

## Series Fields

```ls
Excluded Fields = latitude,longitude
```

## Data Commands

```ls
series e:43kr-jb2c d:2016-06-17T05:58:12.000Z t:county=Albany t:fips=36001 m:bggeoid10=360010001001

series e:43kr-jb2c d:2016-06-17T05:58:12.000Z t:county=Albany t:fips=36001 m:bggeoid10=360010001002

series e:43kr-jb2c d:2016-06-17T05:58:12.000Z t:county=Albany t:fips=36001 m:bggeoid10=360010002001
```

## Meta Commands

```ls
metric m:bggeoid10 p:long l:"Block Group GEOID10" d:"Geographic identifier for the block group; based on 2010 Census." t:dataTypeName=number

entity e:43kr-jb2c l:"State of New York Mortgage Agency (SONYMA) Target Areas by Census Tract" t:attribution="NYS Homes & Community Renewal" t:url=https://data.ny.gov/api/views/43kr-jb2c

property e:43kr-jb2c t:meta.view v:id=43kr-jb2c v:category="Economic Development" v:attributionLink=http://www.nyshcr.org/Topics/Home/Buyers/ v:averageRating=0 v:name="State of New York Mortgage Agency (SONYMA) Target Areas by Census Tract" v:attribution="NYS Homes & Community Renewal"

property e:43kr-jb2c t:meta.view.owner v:id=xzik-pf59 v:profileImageUrlMedium=/api/users/xzik-pf59/profile_images/THUMB v:profileImageUrlLarge=/api/users/xzik-pf59/profile_images/LARGE v:screenName="NY Open Data" v:profileImageUrlSmall=/api/users/xzik-pf59/profile_images/TINY v:displayName="NY Open Data"

property e:43kr-jb2c t:meta.view.tableauthor v:id=xzik-pf59 v:profileImageUrlMedium=/api/users/xzik-pf59/profile_images/THUMB v:profileImageUrlLarge=/api/users/xzik-pf59/profile_images/LARGE v:screenName="NY Open Data" v:profileImageUrlSmall=/api/users/xzik-pf59/profile_images/TINY v:roleName=publisher v:displayName="NY Open Data"
```

## Top Records

```ls
| :updated_at | county | fips  | bggeoid10    | latitude   | longitude   |
| =========== | ====== | ===== | ============ | ========== | =========== |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>01 | 42.6637001 | -73.7369472 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>02 | 42.6739886 | -73.7409837 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>01 | 42.6669773 | -73.7499358 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>02 | 42.6600676 | -73.7544078 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>03 | 42.6584451 | -73.7554372 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>04 | 42.6564868 | -73.7557630 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>01 | 42.6631036 | -73.7698705 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>02 | 42.6645485 | -73.7721939 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>03 | 42.6651756 | -73.7757182 |
|<PHONE_NUMBER>  | Albany | 36001 |<PHONE_NUMBER>01 | 42.6711145 | -73.7634485 |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
kurento-hello-world
===================

Kurento Java Tutorial: Hello World (WebRTC in loopback).

Running this tutorial
---------------------

In order to run this tutorial, please read the following [instructions].

What is Kurento
---------------

Kurento is a WebRTC media server and a set of client APIs making simple the development of advanced video applications for WWW and smartphone platforms. Kurento Media Server features include group communications, transcoding, recording, mixing, broadcasting and routing of audiovisual flows.

Installation
-------------

Make sure that GnuPG is installed
sudo apt-get update \
  && sudo apt-get install --no-install-recommends --yes \
     gnupg
Define what version of Ubuntu is installed in your system
# Run ONLY ONE of these lines:
DISTRO="xenial"  # KMS for Ubuntu 16.04 (Xenial)
DISTRO="bionic"  # KMS for Ubuntu 18.04 (Bionic)
Add the Kurento repository to your system configuration
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83

sudo tee "/etc/apt/sources.list.d/kurento.list" >/dev/null <<EOF
# Kurento Media Server - Release packages
deb [arch=amd64] http://ubuntu.openvidu.io/6.11.0 $DISTRO kms6
EOF
Install KMS(Kurento Media Server)
sudo apt-get update \
  && sudo apt-get install --yes kurento-media-server
Start/Stop KMS
sudo service kurento-media-server start
sudo service kurento-media-server stop

repository: shivanikanojia/Kurent-Demo

repo_name: shivanikanojia/Kurent-Demo


text:
# Toronto boss reveals why Sonny Bill Williams is worth $10m

Published at: **2019-11-07T22:46:53+00:00**

Author: **Online Editors**

Original: [Rugbypass](https://www.rugbypass.com/news/toronto-boss-reveals-why-sonny-bill-williams-is-worth-10m)

          By Christopher Reive, NZ Herald

The Toronto Wolfpack believe their investment in Sonny Bill Williams will set them up for years to come.
Williams agreed to a two-year deal reported to be worth $10 million with the English Super League franchise, joining the team for their 2020 and 2021 campaigns.
It’s a sizeable paycheck for the former All Blacks midfielder, but one the Wolfpack’s commercial vice president Jon Pallett said was worth writing.

        Continue reading below…

        Click here to see the video

Speaking to the Radio Sport Breakfast, Pallett said the franchise believes they will be reaping the benefits of Williams’ signing long after his two-year contract has expired.
“There’s very few sport stars on the planet that transcend their sport. In our sport, Sonny Bill Williams has been and is that player.We’re not going to get the accountants doing the maths on the calculators, but certainly we think there is a commercial value to having a player like this,” Pallett said.
“There’s certainly a huge value to us in terms of our fan base, and the community work that we do, and obviously the sponsorships and ticket sales that go with it. We know that bringing in a player like this plays a big part in growing our brand in not only Toronto but globally and hopefully has a legacy thereafter.”
Pallett was hopeful Williams’ signing would put league on the map in the competitive Toronto sport market in the same way David Beckham’s signing with Major league Soccer’s LA Galaxy did for the competition.
“We do know there is a big value off the field for acquiring a player of this nature, especially in this market; it’s sports mad,” Pallett said
“The NBA champions are here, the Toronto Maple Leafs are one of the most famous hockey teams out there…we are in a competitive space, but the fans are responsive. They do love a superstar and this city has had a history of bringing in superstars who have done well and grown whatever sport it was that they’re playing. There’s a big value to having a big name player like this and we’re seeing that today with the media reaction we’ve had.”
The move signals Williams’ return to league after five years of playing the 15-man code. It will be his third stint in league, after beginning his career with a five-year tenure in a Canterbury Bulldogs jersey before playing for the Sydney Roosters in 2013 and 2014. He was expected to join the Wolfpack after Christmas for their preseason campaign.

        This article first appeared on nzherald.co.nz and was republished with permission.

        In other news:

        Click here to see the video

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
DVH
===
DVH [Dicom Viewer Html5]is a cordova driven android app to view dicom images.Based on the angular app ng-dicomviewer
which is capable of viewing dicom images from the phone memory.Designed to use it simpler and easier.

Not fully DICOM compliant, see Dicom-Support for details

All coding/implementation contributions and comments are welcome.

Features available
==================
 Annotation:

  circle

  line

  rectangle

  ellipse

  circle

 Window level tool

 Filters:

  plain

  invplain

  rainbow

  hot

  sharpen

  sobel

 Image information

Released under MIT licence

==========================

Declaration

 This app is not intended for clinical or diagnostic use. Any use of this viewer for diagnosis or in a clinical setting is strongly discouraged and should be avoided. This app is provided “as is” without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. In no event, shall author is liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever resulting from the use of this app, data or technical information accessed and viewed with this app, whether or not advised of the possibility of damage, under any theory of liability, arising out of or in connection with the use or performance of this app.

repository: LuongPV/DVH

repo_name: LuongPV/DVH


text:
# Long-Term Investing Trading Bot

## Project Goals
- Learn how to use and implement a financial data API
- Create a robust program that can run autonomously with error handling
- Apply the bot to investing in order to generate a profit
- Learn about financial risk management by incorporating risk management strategies into the bot's decision-making algorithm
- Integrate machine learning and neural network algorithms for optimal trading strategies
- Gain experience with performance analysis using back testing

Our project’s objective is to develop and rigorously test a financial trading bot which can value invest in companies from a large cross section of the US market. The bot should be able to determine when to sell, should a position become overvalued or meets a stop-loss. Furthermore, the bot shall only purchase any one security up to a maximum percentage of the total portfolio. The bot will use an API to pull financial ratio data from any time period of any security and utilize this data to make an informed decision on whether or not to buy or sell a security.

## Features

- __Portfolio Management__
     * Risk Management
     * Risk Analysis
- __Machine Learning__
     * Use a variety of ML models to understand market data and aid decision making process
     * Use Tensorflow neural network models to process and pick winners among the total US stock market
- __Simulated Trades__
     * Method of executing and storing "trades" on an accessible CSV file
     * Profit/Loss calculation on simulated trades
- __Deployable__
     * The bot is designed to be deployed onto the cloud for large data input and long runtimes

## License
By: Vignesh Sella, Sandeep Sainath, Kevin Vasquez, and Zeeshan Kunnummal <br />
[MIT](https://choosealicense.com/licenses/mit/)

repository: VigneshSella/ML-TradingBot

repo_name: VigneshSella/ML-TradingBot


text:
[Variable declarations](#variable-declarations)

[Zero value](#zero-value)

[Short variable declarations](#short-variable-declarations)

[String literal](#string-literal)

[Constants](#constants)

[Iota](#iota)

[Custom types](#custom-types)

[Type conversion](#type-conversion)

[Type assertion](#type-assertion)

[String formatting](#string-formatting)

## Variable declarations

A variable declaration creates one or more variables, binds corresponding identifiers to them, and gives each a type and an initial value.

You should use `var` keyword to declare variables.

```go
package main

import "fmt"

// variables are declared at package scope
var x int
var y string
var z bool

func main() {
  fmt.Println(x, y, z)
}
```

If a type is present, each variable is given that type. Otherwise, each variable is given the type of the corresponding initialization value in the assignment.

## Zero value

When storage is allocated for a variable, either through a declaration or a call of new, or when a new value is created, either through a composite literal or a call of make, and no explicit initialization is provided, the variable or value is given a default value.

```go
var x int // default 0
var y string // default ""
var z bool // default false
```

## Short variable declarations

Shorthand for a regular variable declaration with initializer expressions but no types.

```go
package main

import "fmt"

func main() {
  x := 42
  y := "James Bond"
  z := true

  fmt.Println(x, y, z)
}
```

Here, `x := 42` is a shorthand for variable declaration `var x = 42`.

In some contexts such as the initializers for "if", "for", or "switch" statements, they can be used to declare local temporary variables.

## String literal

There are two types of string literals: raw string literals and interpreted string literals.

Raw string literals are character sequences between back quotes, in particular, backslashes have no special meaning and the string may contain newlines.

Interpreted string literals are character sequences between double quotes, as in "bar". Within the quotes, any character may appear except newline and unescaped double quote.

```go
package main

import "fmt"

func main() {
  x := "James bond"
  fmt.Println(x) // James bond

  y := `"James bond"`
  fmt.Println(y) // "James bond"

  z := `{
    "fruit": "Apple",
    "size": "Large",
    "color": "Red"
  }`
  fmt.Println(z)
  /*
  {
    "fruit": "Apple",
    "size": "Large",
    "color": "Red"
  }
  */
}

```

## Constants

```go
package main

import "fmt"

// x, y, z are untyped constants
// a is a typed constant
const (
  x     = 42
  y     = "James bond"
  z     = 256.5
  a int = 25
)

func main() {
  fmt.Printf("%T\n", x) // int
  fmt.Printf("%T\n", y) // string
  fmt.Printf("%T\n", z) // float64
  fmt.Printf("%T\n", a) // int
}
```

## Iota

Within a constant declaration, the predeclared identifier iota represents successive untyped integer constants. This permits light-weight declaration of sequential values.

```go
package main

import "fmt"

const (
  x = iota
  y
  z
)

const (
  a = iota
  b
  c
)

func main() {
  fmt.Println(x) // 0
  fmt.Println(y) // 1
  fmt.Println(z) // 2

  fmt.Println(a) // 0
  fmt.Println(b) // 1
  fmt.Println(c) // 2
}
```

## Custom types

```go
package main

import "fmt"

type golang int // custom type golang with underlying type as int

var x golang

func main() {
  fmt.Println(x) // 0
  fmt.Printf("%T\n", x) // main.golang
  x = 42
  fmt.Println(x) // 42
}
```

## Type conversion

```go
package main

import "fmt"

type golang int

var x golang
var y int

func main() {
  fmt.Println(x) // 0
  fmt.Printf("%T\n", x) // main.golang
  x = 42
  fmt.Println(x) // 42
  y = int(x)
  fmt.Printf("%T\n", y) // int
  fmt.Println(y) // 42
}
```

## Type assertion

For an expression x of interface type and a type T, `x.(T)` asserts that x is not nil and that the value stored in x is of type T.

```go
package main

import "fmt"

var x interface{} = 10

func main() {
  v1, ok1 := x.(int) // assert if 'x' is of type 'int'. 'ok' is true if the assertion holds
  fmt.Println(v1, ok1)

  v2, ok2 := x.(float32)
  fmt.Println(v2, ok2)
}
```

Output:

```text
10 true
0 false
```

## String formatting

Package `fmt` implements formatted I/O with functions analogous to C's printf and scanf.

`Sprintf` default behavior is for each formatting verb to format successive arguments passed in the call.

```go
package main

import "fmt"

var x int = 42
var y string = "James Bond"
var z bool = true

func main() {
  s := fmt.Sprintf("%v\t%v\t%v", x, y, z)
  fmt.Println(s) // 42      James Bond      true
}
```

repository: HarshadRanganathan/golang-learning

path: /Variables, Values & Types/README.md

repo_name: HarshadRanganathan/golang-learning


text:
+++
title = "How to use supercomputers from Texas Advanced Computing Center (TACC)"
subtitle = "Boost your training speed"

date = 2019-10-01T00:00:00
lastmod = 2019-10-01T00:00:00
draft = false

# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
authors = ["admin"]

tags = ["TACC"]
summary = "use TACC to run code / train model"

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["deep-learning"]` references
#   `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
# projects = ["internal-project"]

# Featured image
# To use, add an image named `featured.jpg/png` to your project's folder.
[image]
  # Caption (optional)
  # caption = "Image credit: [**Unsplash**](https://unsplash.com/photos/CpkOjOcXdUY)"

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = ""

  # Show image only in page previews?
  preview_only = false

# Set captions for image gallery.

+++
## Before you begin
1. Create a TACC account (https://portal.tacc.utexas.edu/)
2. Solve Multi-factor authentication at TACC user portal
  * different from utexas multi-factor authentication
  * https://portal.tacc.utexas.edu/tutorials/multifactor-authentication

## Login
1. ```shell
    ssh<EMAIL_ADDRESS>   ```
  * Replace xy0000 with your own eid
  * Replace hikari with your own system (eg. maverick2, lonestar5)
2. Login using your TACC password and multi-factor authentication token code

## Transfer file
```shell
  # For file
  localhost$ scp path/to/file xy0000@maverick2.tacc.utexas.edu:\$WORK/path
  # For folder
  localhost$ tar cvf ./mydata.tar mydata                                   # create archive
  localhost$ scp     ./mydata.tar xy0000@maverick2.tacc.utexas.edu:\$WORK  # transfer archive
```
  * **WORK** directory is usually larger than **HOME** directory

## Run
### Method 1 (sbatch)
1. Do not run the code directly at login.
2. Create a .slurm file
  * Example slurm file below:
```shell
#!/bin/bash
#----------------------------------------------------
# Example SLURM job script to run code
#----------------------------------------------------
#SBATCH -J lab_job	 		                # Job name
#SBATCH -o console_output.txt  		      # Name of stdout output file
#SBATCH -e console_error_output.txt   	# Name of stdout output error file
#SBATCH -p normal        			          # Queue name
#SBATCH -N 1            			          # Total number of nodes requested, multi-node means parallel
#SBATCH -n 1             			          # Total number of task requested
#SBATCH -t 01:30:00	 		                # Run time (hh:mm:ss) your allocation ends in 1.5 h (program can be unfinished)
# The next line is required if the user has more than one project
#SBATCH -A XXXX 		                    # Project/allocation number, the one you apply to TACC with
# This example will run 1 task on 1 nodes
# Launch the job, the file you want to run
python ./file.py
```
3. Run slurm
```shell
  login2.hikari(26)$ sbatch your_filename.slurm
```
4. Watch the job
  *
  ```shell
  login2.hikari(41)$ watch squeue
  login2.hikari(29)$ squeue
       JOBID   PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
       47767      normal  lab_job   xy0000  R       0:06      1 c262-102
  ```
5. Check console output
  ```shell
  cat console_output.txt
  ```
  * the file you define in slurm
6. Cancel job
  ```shell
  login2.hikari(41)$ scancel 47767
  ```
  * scancel JOBID

## Run
### Method 2 (idev)
1.
  ```shell
  login2.hikari(36)$ idev -t 01:30:00
  ```
  * idev: interactive development something
  * -t the total time you requested
  * This one doesn’t need slurm file
2.
  ```shell
  c262-104.hikari(2)$ python file.py
  ```
  * Run the code as normal like in a terminal, same speed as the one with slurm
3.
  ```shell
  c262-104.hikari(3)$ squeue
             JOBID   PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
           47769      normal idv08693   xy0000  R       3:20      1 c262-104
  ```
4. Logout
  ```shell
  c262-104.hikari(4)$ exit
  Connection to c262-104 closed.
  Cleaning up: submitted job (yes) removing job 47769.
  ```

## Deep Learning Using Python
1. Use Python 3 if you need h5py
2. Input following before running your code
```shell
  module load intel/17.0.4 python3/3.6.3
  module load cuda/10.0 cudnn/7.6.2 nccl/2.4.7
  pip3 install --user tensorflow-gpu==1.13.2
  pip3 install --user keras
  pip3 install --user h5py
  export HDF5_USE_FILE_LOCKING='FALSE'
```


text:
# ember-cli-enums

Creates enumerators for Ember projects.

## Installation

Install this addon via ember-cli:

```
ember install ember-cli-enums
```

## Usage

Use the following command to create a new enumerator:

```
ember g enum <name>
```

It creates it in the folder `enum/` with the following structure:

```
export default Object.freeze([
  {
    // example of an element of the enumerator
    label: 'Label',
    value: 'value',
  },
]);
```

## Development

### Installation

* `git clone <repository-url>` this repository
* `cd ember-cli-enums`
* `npm install`

### Running

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).

### Running Tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

### Building

* `ember build`

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

repository: Neuromobile/ember-cli-enums

repo_name: Neuromobile/ember-cli-enums


text:
# SHARKS
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3843312.svg)](https://doi.org/10.5281/zenodo.3843312)

This repository holds files necessary to run the Stream Hydrology And Rainfall Knowledge System (SHARKS) web app. The SHARKS platform was developed to retrieve and visualize hydrologic and meteorologic data from various sources while addressing syntactic and semantic differences in data formats. SHARKS also provides a suite of exploratory data analysis features including the ability to calculate the total precipitation depth recorded for any period, interpolate the annual recurrence interval for precipitation events, perform hydrograph separations, and calculate the volume of runoff for any period.

SHARKS is also available at: https://bigbadcrad.shinyapps.io/SHARKS/

## Getting Started
These instructions will help you get a copy of SHARKS up and running on your local machine for testing and development.

### Required Software
To run SHARKS, you must have both R and RStudio installed on your local machine.
R:  https://www.r-project.org/

RStudio Software: https://www.rstudio.com/products/rstudio/download/

You must also install the Shiny Package in R.
```
install.packages('shiny')
```

### Download & Run SHARKS
#### Method 1:
The easiest way to run SHARKS is by retrieving the app directly in R from this GitHub repository:
```
library(shiny)
runGitHub('SHARKS','bigbadcrad')
```
#### Method 2:
Alternatively, you can clone the git repository by downloading the SHARKS files from GitHub as a ZIP folder and unzipping it to your desired directory. Then, you can run SHARKS by opening the app.R file in the unzipped folder using RStudio and clicking the "Run App" button.

## User Manual
Please read the [SHARKS Methods & User Manual](https://github.com/bigbadcrad/SHARKS/blob/master/www/SHARKS%20Methods%20%26%20User%20Manual.pdf) for details on methodology and usage of the SHARKS app.

## Author
* **Conrad Brendel** -<EMAIL_ADDRESS>
## License
This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.

repository: DrRoad/SHARKS

repo_name: DrRoad/SHARKS


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

### Description

An issue was discovered in Flexo CMS v0.1.6. There is a CSRF vulnerability that can add an administrator via /admin/user/add.

### POC

#### Reference
- https://github.com/flexocms/flexo1.source/issues/25

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve


text:
# MiniTarball

This is a **minimal** implementation of the [GNU Tar format](https://www.gnu.org/software/tar/manual/html_chapter/tar_15.html) in Ruby.

#### 👍 Supported features
* Writing tar files
* Adding files with
  * unlimited file size
  * unlimited file name length
* Unicode file names
* Works with streams, so you don't need to waste disk space by creating temporary files

#### 👎 Currently not supported features
* Reading tar files
* Adding hardlinks, symlinks or directories
* Other features of GNU tar like sparse files
* Creating POSIX.1-2001 (pax) archives or any other tar format

## Installation

Add this line to your application's Gemfile:

``` ruby
gem 'mini_tarball'
```

And then execute:

    $ bundle install

Or install it yourself as:

    $ gem install mini_tarball

## Usage

### Create a `MiniTarball::Writer`
There are multiple ways for creating a `MiniTarball::Writer`:

1. Use an existing IO-like stream.
   ``` ruby
   io =  File.open(archive_path, "wb")
   MiniTarball::Writer.use(io) do |writer|
     # add files by calling writer.add_file or writer.add_file_from_stream
   end
   ```

2. Create a new file by supplying a file name.
   ``` ruby
   MiniTarball::Writer.create(filename) do |writer|
     # add files by calling writer.add_file or writer.add_file_from_stream
   end
   ```

3. Create it manually. You need to close the writer when you are done in order finalize the tar file.
   ``` ruby
   writer = MiniTarball::Writer.new(io)
   # add files by calling writer.add_file or writer.add_file_from_stream
   writer.close
   ```

### Adding files

You can add existing files as well as write a stream into the tar file.

#### Adding existing files
You can add existing files by calling `MiniTarball::Writer#add_file`. The required `name` argument can be a file name or a complete path.

``` ruby
writer.add_file(name: "file1.txt", source_file_path: "/home/foo/file1.txt")
```

By default the file's attributes are stored in the tar file, but you can override them by supplying values for the optional arguments (`mode`, `uname`, `gname`, `uid`, `gid`, `mtime`) to `MiniTarball::Writer#add_file`.

#### Adding files from a stream
You can add files of unknown size by calling `MiniTarball::Writer#add_file_from_stream`. The required `name` argument can be a file name or a complete path.

> 💡 This method doesn't work with non-seekable streams like `Zlib::GzipWriter`.

Here are some examples:

* Use IO.copy_stream to efficiently copy a stream into the tar
   ``` ruby
   File.open("/home/foo/file1.txt", "rb") do |input_stream|
     writer.add_file_from_stream(name: "file1.txt") do |output_stream|
       IO.copy_stream(input_stream, output_stream)
     end
   end
   ```

* Directly write into the output stream
   ``` ruby
   writer.add_file_from_stream(name: "foo/bar/file2.txt") do |output_stream|
     output_stream.write("Hello world!")
   end
   ```

`MiniTarball::Writer#add_file_from_stream` has multiple optional arguments:

|Argument|Default|Description|
|:---|:---|:---|
|mode|`0644`|Permission and mode bits|
|uname|`"nobody"`|User name of file owner|
|gname|`"nogroup"`|Group name of file owner|
|uid|`nil`|User ID of file owner|
|gid|`nil`|Group ID of file owner|
|mtime|`Time.now.utc`|Modification time|

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`.

To release a new version, update the version number in `version.rb`, and then push it to GitHub. This will automatically create a tag and publish the gem on [rubygems.org](https://rubygems.org).

## Contributing

Pull requests are welcome on GitHub at https://github.com/discourse/mini_tarball.

## License

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


text:
# Leptothyrina rubi (Duby) Höhn., 1915 SPECIES

#### Status
SYNONYM

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

#### Published in
Sber. Akad. Wiss. Wien, Math. -naturw. Kl. , Abt. 1 124: 123 (1915)

#### Original name
Sphaeria rubi Curr.

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Leotiomycetes/Rhytismatales/Rhytismataceae/Hypoderma/Hypoderma rubi/ Syn. Leptothyrina rubi/README.md

repo_name: mdoering/backbone


text:
# Example using TcHMI with Server Extensions (creating server functions)

## Disclaimer

This is a personal guide not a peer reviewed journal or a sponsored publication. We make
no representations as to accuracy, completeness, correctness, suitability, or validity of any
information and will not be liable for any errors, omissions, or delays in this information or any
losses injuries, or damages arising from its display or use. All information is provided on an as
is basis. It is the reader’s responsibility to verify their own facts.

The views and opinions expressed in this guide are those of the authors and do not
necessarily reflect the official policy or position of any other agency, organization, employer or
company. Assumptions made in the analysis are not reflective of the position of any entity
other than the author(s) and, since we are critically thinking human beings, these views are
always subject to change, revision, and rethinking at any time. Please do not hold us to them
in perpetuity.

## Overview

Simple demo to show the setup and configuration of a server extension which allows functions to be called upon it.

In this instance, calls are made to added symbol changes to the internal event logger.

## Versions
This project uses the following

* Visual studio 17 Community or Professional
* TwinCAT 3.1.4024.7
* TwinCAT HMI 1.10.1336.372

## Getting started

* Open the TcHmi project and open live view.
* Trigger events at the bottom to see them reported to the server log

This is not a full guide for TcXaeShell, please visit http://beckhoff.com/ for further guides

repository: benhar-dev/tchmi-serverext-basiclogging

repo_name: benhar-dev/tchmi-serverext-basiclogging