text:
# DEMOS2

Prototype Django-based e-voting application, to demonstrate DEMOS2's client-side
encryption e-voting.

The previous repository for DEMOS2 by Carey Williams can be found at:
https://github.com/CareyJWilliams/DEMOS2

## Setup

### Main Application Dependencies

* Python
   * Version 2.7; anything higher than this will not currently work
   * All Python packages specified in `requirements.txt`; PyCharm will detect these dependencies and offer installation
* MySQL Server: Community Edition
   * Initialise with 'legacy password authentication'
   * Create a new MySQL DB user with the default username and password specified in `aullauthdemo/settings.py`
   * Create a new MySQL DB called `demos2` (also specified in `aullauthdemo/settings.py`), making sure to set the charset to 'UTF8'

### Database setup

After installing the above dependencies, issue the following command to initialise the DB:

```
python manage.py migrate
```

The first run will produce a `django.db.utils.IntegrityError: (1215, 'Cannot add foreign key constraint')` error. Issue the command a second time and it will complete successfully.

### Settings

`allauthdemo/settings.py` specifies the Google reCAPTCHA site key and private key, which will need changing when deployed onto a new domain.
There is also a `DOMAIN` setting within the file that needs updating during deployment as things like email functionality depend on this setting for correct URL generation during event preparation etc.

Emails from the application are currently sent from the following email account which can be updated within the settings:

```
<EMAIL_ADDRESS>```

### NodeJS Dependencies

The Node.js crypto server depends on the `milagro-crypto-js` and `express` modules. A `package.json` file can be found in the `Node/` directory with these dependency requirements and therefore from this folder you can run:

```
npm install
```

Once the dependencies have been installed, you can then run the node server as per the below instructions.

## Instructions

### Step 1: Running the Python app and creating a new user account

You can run the server with the following command:

```
python manage.py runserver
```

The application will then be available at `<IP_ADDRESS>:8000`.

You can then click on 'Join' to create a new user account.

### Step 2: Running the Node.js Server

The Node.js server exposes a lot of cryptographic operations that the application depends on throughout. To run the server, issue the following command line request from the `Node/` folder:

```
node index.js
```

### Step 3: Running Celery

Celery is used to run tasks asynchronously and the DEMOS2 application can't run without this application. A bash script called `start_celery_worker.sh` is provided to make starting a worker as easy as possible:

```
./start_celery_worker.sh
```


text:
# Unity-ETRS-TM35FIN
Simple C# class for Unity 3D to convert coordinates between WGS84 (EUREF-FIN) and ETRS-TM35FIN systems.

The official ETRS-TM35FIN definition & conversion functions: http://www.jhs-suositukset.fi/web/guest/jhs/projects/jhs154

An example Geolocation class is also provided for convenience and conversions to Unity Vector2.

# Acknowledgements
Most of the code is based on the work of Olli Lammi's [coordinates](http://olammi.iki.fi/sw/coordinates/) Python library.
Other implementations referred and utilized in writing the code:
* http://search.cpan.org/~mplattu/Geo-Coordinates-ETRSTM35FIN-0.01/lib/Geo/Coordinates/ETRSTM35FIN.pm
* https://github.com/kakoni/etrstm35fin
* https://github.com/hkurhinen/etrs-tm35fin-to-wgs84-converter

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: C#

gha_license_id: NOASSERTION

license_type: permissive


text:
# NativeScript Angular Shadow Directive Plugin  ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png)

[![Build Status][build-status]][build-url]
[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-url]
[![Twitter Follow][twitter-image]][twitter-url]

[build-status]:https://travis-ci.org/Especializa/nativescript-ng-shadow.svg?branch=master
[build-url]:https://travis-ci.org/Especializa/nativescript-ng-shadow
[npm-image]:http://img.shields.io/npm/v/nativescript-ng-shadow.svg
[npm-url]:https://npmjs.org/package/nativescript-ng-shadow
[downloads-image]:http://img.shields.io/npm/dt/nativescript-ng-shadow.svg
[twitter-image]:https://img.shields.io/twitter/follow/especializa.svg?style=social&label=Follow%20us
[twitter-url]:https://twitter.com/especializa

## Installation
From the command prompt go to your app's root folder and execute:
```
tns plugin add nativescript-ng-shadow
```

## Demo
If you want a quickstart, [check out the demo app](https://github.com/Especializa/nativescript-ng-shadow/tree/master/demo).

[![N|Solid](demo/app/tools/assets/screenshot.png)](https://www.udemy.com/angular-native)

### How to use it
This is an Angular directive to make your life easier when it comes to native shadows.

Shadows are a very important part of [Material design specification](https://material.io/).
It brings up the [concept of elevation](https://material.io/guidelines/material-design/elevation-shadows.html), which implies in the natural human way of perceiving objects raising up from the surface.

With this directive, you won't have to worry about all the aspects regarding shadowing on Android and on iOS.
On the other hand, if you care about any details, just provide extra attributes and they will superseed the default ones.

However, running this on Android you will require the SDK to be greater or equal than 21 (Android 5.0 Lollipop or later), otherwise shadows will simply not be shown. There should be no problem running this on any version of iOS.

#### Import the NgShadowModule
```typescript
// ...
import { NgShadowModule } from 'nativescript-ng-shadow';

@NgModule({
    imports: [
        NgShadowModule,
        // ...
    ],
    // ...
})
export class MyModule { }
```

#### Just use in your templates
Simple attribute `shadow`:
```xml
<Label shadow="2"></Label>
```
Of course you can property bind it:
```xml
<Label [shadow]="myCustomShadow"></Label>
```
To provide other details, combine the `shadow` directive with other attributes:
```xml
<Label shadow [elevation]="myElevation" cornerRadius="5"></Label>
```
There are a couple of platform specific attributes you might want to use to customize your view. Bear in mind some of them clash with CSS styles applied to the same views. When it happens, the default behaviour on Android is the original HTML/CSS styles are lost in favor of the ones provided by this directive. On iOS, on the other hand, HTML/CSS pre-existent styles are regarded, consequently the shadow might not be applied.

The tip is avoid applying things like **background color** and **border radius** to the same view you intend to apply this directive. You are always able to nest views and get what you want. If not, please [leave a message](https://github.com/Especializa/nativescript-ng-shadow/issues) so we can try to help.

### List of attributes
The table below list and describes all possible attributes as well as show which platform supports each one of them:

| Attribute | Type | Platform | Description |
| --- | -- | --- | --- |
| shadow | string \| number \| [AndroidData](https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/android-data.model.ts) \| [IOSData](https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/ios-data.model.ts) | both | Directive attribute. Providing `null` or empty string with no `elevation` attribute, will switch off the shadow |
| elevation | number \| string | both | Determines the elevation of the view from the surface. It does all shadow related calculations. You might want to have a look at [this enum](https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/elevation.enum.ts) of standard material design elevations.
PS: Since version 2.0, it's calculated in DIPs (or DPs, _density independent pixels_) on Android, or PTs (_points_) on iOS.
| shape | string => `'RECTANGLE'` \| `'OVAL'` \| `'RING'` \| `'LINE'` | Android | Determines the shape of the view and overrides its format styles.
| bgcolor | string => color #RGB | Android | Determines view's background color and overrides its previous background. |
| cornerRadius | number | Android | Determines view's corner radius *(CSS border-radius)* and overrides its previous style.
PS: Since version 2.0, it's calculated in DIPs (or DPs, _density independent pixels_). |
| translationZ | number | Android | Determines an extra distance (in DIP) to the surface. |
| maskToBounds | boolean => default: false | iOS | Determines whether the shadow will be limited to the view margins. |
| shadowColor | string => color #RGB | iOS | Determines shadow color. Shadow won't be applied if the view already has background. |
| shadowOffset | number | iOS | Determines the distance in points (only on Y axis) of the shadow. Negative value shows the shadow above the view. |
| shadowOpacity | number | iOS | From 0 to 1. Determines the opacity level of the shadow. |
| shadowRadius | number | iOS | Determines the blurring effect in points of the shadow. The higher the more blurred. |

### `AndroidData` and `IOSData`
As you might have noticed the main `shadow` attribute accepts object as argument. You'll be able to assign it in a property bind and it will override any possible separate attribute you might have defined:

#### Component
```typescript
import { AndroidData, ShapeEnum } from 'nativescript-ng-shadow';
// ...
export class MyComponent {
  fabShadow: AndroidData = {
    elevation: 6,
    bgcolor: '#ff1744',
    shape: ShapeEnum.OVAL,
  };
  // ...
}
```
In the template you can do:
```xml
<Label [shadow]="fabShadow" width="56" height="56"></Label>
```

## Pre-defined elevations
If you want to be consistent with the Material Design specification but you're sick trying to memorize which elevation your view should have. We put together a list of pre-defined elevations:
- SWITCH: 1
- CARD_RESTING: 2
- RAISED_BUTTON_RESTING: 2
- SEARCH_BAR_RESTING: 2
- REFRESH_INDICADOR: 3
- SEARCH_BAR_SCROLLED: 3
- APPBAR: 4
- FAB_RESTING: 6
- SNACKBAR: 6
- BOTTOM_NAVIGATION_BAR: 8
- MENU: 8
- CARD_PICKED_UP: 8,
- RAISED_BUTTON_PRESSED: 8
- SUBMENU_LEVEL1: 9
- SUBMENU_LEVEL2: 10
- SUBMENU_LEVEL3: 11
- SUBMENU_LEVEL4: 12
- SUBMENU_LEVEL5: 13
- FAB_PRESSED: 12
- NAV_DRAWER: 16
- RIGHT_DRAWER: 16
- MODAL_BOTTOM_SHEET: 16
- DIALOG: 24
- PICKER: 24

If you don't even want to check it out every time you have to shadow a view, just import the `Elevation` enum and enjoy :)

#### Component
```typescript
import { Elevation } from 'nativescript-ng-shadow';
class MyComponent {
  // ...
  ngOnInit(): init {
    this.mySnackBar.elevation = Elevation.SNACKBAR;
  }
  // ...
}
```

## Notes about version 2+
Here are the list of improvements on version 2.0:

1. BugFix: Integer directive not rendering on iOS.
1. Density independent pixels: Now you no longer have to worry about providing
   the correct values for pixel related attributes based on the device's
   screen density.
   Since iPhone 6S, each point correspond to 9 device pixels
   (3 horizontally x 3 vertically - that's the reason behind the @3x images -
   [view more here](https://medium.com/@pnowelldesign/pixel-density-demystified-a4db63ba2922)).
   The same happens to Android where the benchmark (mdpi) is considered ~160 pixels
   (or dots) per inch (dpi) and the majority of the modern devices having way
   denser screens, reaching ~640dpi or more.
   [Find out more here](https://developer.android.com/guide/practices/screens_support.html).
1. New Android specific attribute called translationZ. The elevation attribute
   is the baseline of the virtual Z axis (3D axis), but according to the [official
   documentation](https://developer.android.com/training/material/shadows-clipping.html)
   it's not the only part. Then, `translationZ` will add extra distance to the surface
   and it's mainly used for animations.
1. **2.1.X** Override Android default StateListAnimator as explained below:

### Override Android default StateListAnimator

Android buttons are split into three categories:
floating, raised and flat. Different from labels and other ui elements,
each button category has its own state animator.
So, when buttons are tapped, Android does affect their elevation
(and z translation) in a way that Angular is not notified. At the end of tap animation, buttons get back to
resting defaults (i.e. raised button's `elevation` at 2dp and `translationZ` at 0) overriding
the shadow stablished by this plugin.

Since version 2.1.0, this plugin replaces the default `StateListAnimator` with one
that gets back to the values you provide for `elevation` and `translationZ`.

Feel free to fill an issue if you want the flexibility of defining your own
`StateListAnimator`. The motivation so far was simply put this plugin to work with
buttons without changing the original state once they are clicked.

## Changelog
- 2.1.0  Decouple shadow logic / Override default StateListAnimator
- 2.0.1  Fix error on old Android devices (< Lollipop)
- 2.0.0  Density Independent Pixels / TranslationZ
- 1.1.3  Minor issues
- 1.1.2  Fix CI build
- 1.1.0  Support for iOS custom attributes
- 1.0.0  Initial implementation

## License
Apache License Version 2.0, January 2004

repository: cmeijerink/nativescript-ng-shadow

repo_name: cmeijerink/nativescript-ng-shadow


text:
🎲 Random User-Scripts 🎲

## Description

These are random user-scripts that I use. They can add features to a website, or remove annoying ones. 🙃

## HOWTO

First, you need a user-script manager, which is an extension for your web browser that allows user-scripts to work.

So, choose **one** of the user-script managers below and install it:

* Violentmonkey **(recommended)**: https://violentmonkey.github.io/get-it/
* Tampermonkey: https://www.tampermonkey.net/

Then, just click to install any of these user-scripts:

### [🎮 ProtonDB Integration for Steam](https://raw.githubusercontent.com/guihkx/user-scripts/master/scripts/protondb-integration-for-steam.user.js)

**Description:** Adds game ratings from [ProtonDB](https://www.protondb.com/) to the [Steam Store](https://store.steampowered.com/).

### [🖋 Proton Mail Signature Remover](https://raw.githubusercontent.com/guihkx/user-scripts/master/scripts/protonmail-signature-remover.user.js)

**Description:** Automatically removes email signature for free users of Proton Mail. ("`Sent with Proton Mail secure email`")

### [🎮 Steam Trading Cards Link Replacer](https://raw.githubusercontent.com/guihkx/user-scripts/master/scripts/steam-trading-cards-link-replacer.user.js)

**Description:** Replaces the "Steam Trading Cards" link in the [Steam Store](https://store.steampowered.com/) with a link to the actual list of trading cards in the [Steam Market](https://steamcommunity.com/market/).

### [🕵 YouTube URL Tracker Remover](https://raw.githubusercontent.com/guihkx/user-scripts/master/scripts/youtube-url-tracker-remover.user.js)

**Description:** Fixes user-tracking links in the description of YouTube videos (`youtube.com/redirect?q=<real link>`).

repository: guihkx/user-scripts

gha_language: JavaScript

gha_license_id: MIT

repo_name: guihkx/user-scripts


text:
AppSite
===========================

Material Design Website Template for an app's landing page, built with Project Polymer
Demo: http://faizmalkani.github.io/appsite

Easy to setup and deploy.
Download the project as a zip, extract it, edit the HTML to match your own app's details, and you're good to go.

Properties to be edited before publishing:-
- Page Title, Description, Keywods, Copyright and Author
- Cover Image *(optional)*
- Floating Button's colour, desktop and mobile *(optional)*
- Floating Button email address, desktop and mobile *(optional)*
- App Name, Developer Name and App Price
- App's Description
- Other Apps thumbnails and titles
- App Details

## Vulcanization
Assuming you're familiar with bower, run the following commands from the root of your project directory to *significantly* reduce page load times.

    npm install -g vulcanize
    vulcanize index.html --inline

Vulcanize combines your files to reduce the number of network requests and has a number of flags that you can tweak based on your own preferences. Once vulcanized, it's safe to delete all the folders except the images folder, since the code is all contained in index.html

repository: shivesh-x/appsite

repo_name: shivesh-x/appsite


text:
# Spatial Data Generators
This repository provides the implementation for Spatial Data Generators paper, which was presented in 1st ACM SIGSPATIAL International Workshop on Spatial Gems (SpatialGems 2019, https://www.spatialgems.net/). \
This is a Python implementation. You can find a Ruby implementation [here](https://github.com/aseldawy/spatialdatagenerators).

## How to use it?
Show the help for detail information
```
python3 generator.py -h
```

## Demo
Six kinds of supported distribution. Please feel free to contact us if you want to have other spatial distributions.

![alt text](demo/sample.png)

repository: tinvukhac/spatialdatagenerators

repo_name: tinvukhac/spatialdatagenerators


text:
---
layout: inner
title: Restaurant Ratings Visualizer
permalink: /restaurant-ratings-visualizer/
---
# Restaurant Ratings Visualizer
##### Written in Python
---
Visualization of predicted restaurant ratings using machine learning and the Yelp academic dataset.
I created this project in Spring 2019, while I was studying at Mt. San Antonio College, using UC Berkeley's Spring 2019 CS 61A skeleton code.
<button class="btn btn-default btn-lg">View on GitHub</button>

---

## Features
Some functionality included in this restaurant ratings visualizer include:
- Restaurant visualization of a **Voronoi diagram** showing Berkeley segmented into regions:
    - Each region is shaded by the predicted rating of the closest restaurant.
    - Each dot represents a restaurant, where the color of the dot is determined by its location.
- Unsupervised learning using **k-means algorithm** to group data points into clusters
- Supervised learning using **simple least-squares linear regression** to predict what rating a user would give for a restaurant.

---

## Preview
In this preview, I will be generating a visualization for my own ratings which is in a file called `jesnine.dat`:
```
make_user(
    'Jesnine Erillo',      # name
    [                   # reviews
        make_review('Crossroads', 1.0),
        make_review("D'Yar", 4.5),
        make_review("Gypsy's Trattoria Italiano", 3.0),
        make_review('La Burrita', 4.0),
        make_review('Mandarin House', 3.0),
        make_review('Quickly', 2.0),
        make_review('Subway', 1.0),
        make_review('Top Dog', 4.0),
    ]
)
```
Below is a preview of the visualization generated by running:
```
python3 recommend.py -u jesnine -k 2 -p -q 'Coffee & Tea`
```
This will predict the ratings of `Coffee & Tea` places for the user `jesnine` with kluster size `2`.
![Restaurant Ratings Visualizer Preview](../img/preview/maps/maps-preview.gif)

gha_language: SCSS


text:
# Frequently asked questions

## Does Parascopy work with exome data?

Parascopy only works with WGS data. Parascopy cannot analyze exome or targeted sequencing data as it is not possible to
easily estimate background read depth in non-duplicated regions.

## Is it possible to analyze non-human genomes?

Yes, it is possible; however, one would need to construct a set of non-duplicated windows that can be
used in `parascopy depth` to calculate background read depth. Please contact the authors for more details.

## Is it possible to analyze only one sample (small number of samples)?

Yes, it is possible. In most cases, the best course of action is to use
precomputed model parameters [(11 Mb)](https://dl.dropboxusercontent.com/s/5fsohggje778dlb/models_v1.2.5.tar.gz).
Alternatively, you can simply run `parascopy cn` on a new sample, but note, that only aggregate copy number will be
estimated as it is impossible to find reliable PSVs from a single sample.

## What samples should I analyze together?

It is preferable to analyze samples from the same population, close populations or at least the same continental population.
Additionally, if sequencing data have different library preparation techniques, it may exhibit different
sequencing biases, which would lower copy number estimation accuracy.
If that is the case, you can try using `--no-multipliers` flag.

## Output file is empty.

It may be the case that the target region is too short, or reference copy number jumps too much.
By default, Parascopy estimates copy number for regions longer than 1100 bp with constant reference copy number
(usually, even longer regions are required). Try using larger regions; lowering `--min-windows` or raising
`--window-filtering` parameters.

## Aggregate copy number jumps too much, often goes to zero.

it is possible that the alignment file is missing reads for some duplicated loci.
You can try to map unaligned reads, or map all reads using a different mapping tool.
Use `samtools view input.bam "*"` to extract unaligned reads (does not extract unmapped reads with a mapped mate).

## Is it possible to get paralog-specific copy number for regions with many copies?

It is possible to raise `--max-ref-cn` abd `--pscn-bound` parameters, but this would lead to long runtime,
as the number of possible paralog-specific copy number tuples grows exponentially with the aggregate copy number.

repository: tprodanov/parascopy

branch_name: refs/heads/main

repo_name: tprodanov/parascopy


text:
# PolizApp
# Application for show contents about Policy.

The present project consists of the consumption a content from a REST API about Policy

The technology for endpoint manipulation of data is GraphQL.

Likewise, the Server responsible for raising the application from the backend is Apollo Server

The technologies used to develop it were:.

  - Express
  - GraphQL
  - Apollo Server
  - NodeJS
  - ReactJS
  - Apollo Client

# Get started

Clone the repository
```sh
git clone https://github.com/ivanojgarcia/PolizApp.git
```
Install developer dependencies (installation of dependencies from the package-json)

-First we start the server, for this we will do the following:

```sh
$ cd server
$ npm install
$ npm start
```
If is necesary can you delete the package-lock.json

### Installation of client

To start the client we just have to install the dependencies

```sh
$ cd client
$ npm install
$ npm start
```
The GraphQL server run on http://localhost:4000/ , the applications is ready.

License
----

MIT

**Thanks!**

repository: ivanojgarcia/PolizApp

repo_name: ivanojgarcia/PolizApp


text:
# tts-proxy

A simple server for forwarding/proxying Tabletop Simulator web requests into standard HTTP.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

# Why?

At present, Tabletop Simulator's `WebRequest` API is _extremely_ limited and doesn't let you read or write headers, and in the case of `POST`s doesn't even let you set the request _body_.

Basically, this means that by default TTS is completely unable to consume the vast majority of third-party web APIs - in particular RESTful APIs are impossible to use _directly_ with TTS' `WebRequest`.

This is where __tts-proxy__ comes in. Instead of communicating with an API directly, __tts-proxy__ acts as an "translator" which takes a TTS web request, and creates a standard HTTP request on your behalf. When the response comes back, __tts-proxy__ does the opposite, converting a standard HTTP response into something you can read inside Tabletop Simulator.

# How do I use this?

As much as it'd be nice to have one pre-setup all TTS mods could share, if we all start using it the traffic could become too significant and it'd either get very slow, or become very expensive to maintain (throwing more resources at it).

So, to alleviate this issue, the idea is that each mod (or each mod developer) would have their own tts-proxy instance running on Heroku. Heroku have a free tier that should be more than enough for any one TTS mod; so there's no cost involved.

The only hiccup is that you need some way of deploying your own copy of tts-proxy. Lucky for you, that big purple "Deploy" button at the top of this page will completely automate the process for you. Yay!

*__NOTE__: You will need a Heroku account, but these are free and __do not__ require credit card details.*

# Security

Anyone hosting your mod will need to be able to communicate with tts-proxy. However, you probably don't want _other mods_ (or random applications) using your proxy!

To _mitigate_ this, we allow you restrict which URLs your tts-proxy deployment is capable of communicating with. If you restrict tts-proxy to communicate with services/URLs that are specific to your mod, then your deployment can't be abused by third-parties trying to use your proxy for other purposes.

We keep it simple and provide just one option (environment variable) you need to set, called `URL_REGEX`. You can update `URL_REGEX` from https://dashboard.heroku.com/apps/<YOUR_HEROKU_DEPLOYMENT_NAME>/settings.

__IMPORTANT__: By default `URL_REGEX` has the value `.+` which means _any_ URL i.e. By default tts-proxy is _not_ restricted.

As an example, if you wanted to use [Firebase Cloud Firestore](https://firebase.google.com/products/firestore/) as a datastore for your mod, you could restrict `tts-proxy` to communicating with just _your_ Firestore database with:

```
URL_REGEX=https://firestore\.googleapis\.com/v1beta1/projects/<YOUR_PROJECT_ID>/.+
```

This is called a regular expression, specifically it's using [Python regular expression syntax](https://docs.python.org/2/library/re.html).

*__Note:__ You may be wondering why we just don't offer password protection, or encryption. For that to work you'd need to distribute the secret as part of your TTS workshop mod.

# Manual Deployment

If for some reason you don't want to deploy automatically (using the "Deploy" button at the top of the page) you can also deploy manually by following the following procedure.

1. Clone tts-proxy:

    ```bash
    git clone https://github.com/Benjamin-Dobell/tts-proxy.git
    ```

2. Create a Heroku app:

    ```bash
    heroku create
    ```

3. Deploy tts-proxy to your Heroku app:

    ```bash
    git push heroku master
    ```

4. Ensure one "Dyno" (app instance) is running:

    ```bash
    heroku ps:scale web=1
    ```

# Tabletop Simulator HTTP Client

The corresponding Tabletop Simulator Lua HTTP client for this proxy is available as part of [ge_tts](https://github.com/Benjamin-Dobell/ge_tts).

repository: tts-community/tts-proxy

gha_language: Python

repo_name: tts-community/tts-proxy


text:
# AIDE Backend
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/290611e4797c4bc887e59b617e5fbe65)](https://app.codacy.com/app/m3lles/aide-backend?utm_source=github.com&utm_medium=referral&utm_content=rsx-labs/aide-backend&utm_campaign=Badge_Grade_Settings)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues)

| Branch | CI Status |
|---|:---|
|Release Branch |[![Build Status](https://dev.azure.com/rsx-labs/aide/_apis/build/status/rsx-labs.aide-backend-release-build?branchName=release)](https://dev.azure.com/rsx-labs/aide/_build/latest?definitionId=8&branchName=release) ![release version](https://img.shields.io/badge/release%20version-<IP_ADDRESS>-blue)  |
| Main Dev Branch | [![Build Status](https://dev.azure.com/rsx-labs/aide/_apis/build/status/rsx-labs.aide-backend-ci-build?branchName=master)](https://dev.azure.com/rsx-labs/aide/_build/latest?definitionId=9&branchName=master) |

This is the backend component of AIDE

## Overview

NOTE : DB related codes are now being moved to the AIDE-DBComp repo.

## Technology Stack

### Frontend
- .Net Framework
- WPF
- WCF.

### Backend
- .Net Framework
- MS SQL Server
- WCF

repository: rsx-labs/aide-backend

gha_language: Visual Basic .NET

repo_name: rsx-labs/aide-backend


text:
[![Build Status](https://github.com/natario1/MavenPublisher/workflows/Build/badge.svg?event=push)](https://github.com/natario1/MavenPublisher/actions)
[![Release](https://img.shields.io/github/release/natario1/MavenPublisher.svg)](https://github.com/natario1/MavenPublisher/releases)
[![Issues](https://img.shields.io/github/issues-raw/natario1/MavenPublisher.svg)](https://github.com/natario1/MavenPublisher/issues)

*Need support, consulting, or have any other business-related question? Feel free to <a<EMAIL_ADDRESS>in touch</a>.*

*Like the project, make profit from it, or simply want to thank back? Please consider [sponsoring me](https://github.com/sponsors/natario1)!*

# MavenPublisher

A lightweight, handy tool for publishing your maven packages (for example, Android AARs or Java JARs)
to different kinds of repositories. Currently, only [Bintray](https://bintray.com) is supported.

To use any of the publisher plugins, you must configure the plugin repository in your build script:

```kotlin
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath("com.otaliastudios.tools:publisher:0.1.5")
    }
}
```

The publisher plugin uses an older version of itself to publish itself into Bintray's JCenter.
This means that you can check the plugin source code to see an example of how to use it.

For more examples, please take a look at [natario1/Firestore](https://github.com/natario1/Firestore) or [natario1/Elements](https://github.com/natario1/Elements).

## Usage

### Base Configuration

All publisher plugins are configured with the same common fields, although specific publisher
implementations can have extra fields (for example, for authentication).

```kotlin
publisher {
    // Project name. Defaults to rootProject.name
    project.name = "MavenPublisher"

    // Project description. Can be null
    project.description = "Handy tool to publish maven packages in different repositories."

    // Package artifact. Defaults to project's archivesBaseName
    project.artifact = "publisher"

    // Package group id. Defaults to project's group
    project.group = "com.otaliastudios.tools"

    // Project url
    project.url = "https://github.com/natario1/MavenPublisher"

    // Project VCS url. Defaults to project.url
    project.vcsUrl = "https://github.com/natario1/MavenPublisher.git"

    // Project packaging. Automatically set to AAR for Android libraries
    project.packaging = "aar"

    // Project licenses
    project.addLicense(License.APACHE_2_0)
    project.addLicense("My license", "https://mylicense.org")

    // Release version. Defaults to project's version
    release.version = "0.1.4"

    // Release VCS tag. Defaults to "v${release.version}"
    release.vcsTag = "v0.1.4"

    // Release description. Defaults to "${project.name} {release.vcsTag}"
    release.description = "New release"

    // Release sources
    release.setSources(Release.SOURCES_AUTO) // creates a sources Jar
    release.setSources(sourcesJar.get())

    // Release docs
    release.setDocs(Release.DOCS_AUTO) // create a docs Jar
    release.setDocs(dokkaJar.get())

    // Publication name. Default value depends on the publisher implementation.
    publication = "bintray"
}
```

### Secret values

Some sensitive values, especially in the auth configuration, are declared as secret.
In this case, instead of passing the real value, you are supposed to pass a **key** to the real
value.

The publisher will use this key and look for the value as follows:

- Look in environment variables
- Search with `project.findProperty(key)`
- Search in `local.properties` file, if present

### Publication

The publisher plugin will add a task named `:publishTo` followed by the publication name.
The publication name can be set in the configuration, but is typically chosen by the
publisher implementation.

For example, the bintray publisher will add a task named `:publishToBintray`.

## Bintray publisher

To apply the plugin, declare it in your build script with the `maven-publisher-bintray` id:

```groovy
apply plugin: 'maven-publisher-bintray'
```

In addition to the common configuration fields, to authenticate to Bintray, you will need to pass
a user name, a user key and the Bintray repo name as follows:

```kotlin
publisher {
    // Bintray authentication
    auth.user = "BINTRAY_USER" // defaults to "auth.user"
    auth.key = "BINTRAY_KEY" // defaults to "auth.key"
    auth.repo = "BINTRAY_REPO" // defaults to "auth.repo"
    // Other configuration values
    // ...
}
```

Note that the `auth` values are [Secret values](#secret-values), so instead of passing the real
value in plain text, a key (to an environment variable or local property) should be passed.

Since there is a default key, there is no need to declare your own keys in the plugin configuration -
you can simply provide values for the default keys (for example, as env properties).

repository: saytoonz/MavenPublisher

repo_name: saytoonz/MavenPublisher


text:
# OSVR-win-installer
Windows installer for OSVR server application
Installer script built with NSIS.

## NSIS script: setup_service.nsi##

- Uses the following plugins
	- LogEx.dll
	- nsProcess.dll
	- newadvsplash.dll
	- SimpleSC.dll
	- AccessControl.dll

## Requirements for running the script:##
-	Name of the script is: setup_service.nsi
-	Desired distribution directory can be specified at compile time by defining *distroDirectory*
-	If *distroDirectory* is not passed in at compile time, the value is defaulted to ../Distro
-   You want a Profiler directory located inside ../Distro/ along with the bin directory, the profile directory should contain the OSVR configuration utility.
-	Uses registry value to determine if installed version is newer or older than version contained in the installer
-   The installer will warn but still install if it finds a newer version installed
- The following items must be in the script directory
	- splash.bmp
	- osvr_server.ico
	- OSVR_Service.exe (You need to either rename OSVR_Service_32.exe or OSVR_Service_64.exe to OSVR_Service.exe)
	- license.txt (Apache 2.0 license)
- A batchfile is provided for Continuous Integration convenience. It takes as its only argument the path that you would like to pass on to define as the distroDirectory
	- the batch file must be modified on the CI target such that the path to makensis.exe is properly set

## Installer capabilities: ##
- checks for free drive space before installing
- checks that installed version is less than the version about to be installed
- logs messages with timestamps to diagnose installer/uninstaller issues
- uses osvr.ico for start menu and uninstaller entry in the control panel
- uninstall shows up in the control panel
- deletes all OSVR files upon uninstall
- cleans up registry upon uninstall
- stops the OSVR Service before uninstalling or updating without user intervention
- install and uninstall do not require restart
- creates a service called "OSVR Service"
- starts the OSVR Service after installer completes
- starts the configuration utility once the intaller completes.
- read version number from osvr_server.exe in the distribution
- read distro install size from distribution to use to check for available disk space
- installs a registry key to facilitate plugin installations: HKLM/Software/OSVR/installationDirectory
- installs an environment variable to facilitate plugin installations: OSVR\_INSTALL_DIR

## Improvements: ##
- Utilise modern UI
- osvr_server.exe needs to be converted into a proper service

repository: robsonswiss/OSVR-win-installer

path: /README - Windows Service.md

filename: README - Windows Service.md

gha_language: NSIS

repo_name: robsonswiss/OSVR-win-installer


text:
# TREAT-AS-CIRCLE 0.0.0 - Tiny library for treating sequence as circle.

* Current lisp world
List is very flexible.
It can refer themselves.
The list which refers themselves is called 'circle list'.

* Issues
When you use circle list, you need to bear some losses.
0. You may need to make circle list with SETF, unless it is made as literal with #n= and #n#.
1. You need to assign `*print-circle*` T.
2. After making circle list, you may not be able to use some useful sequence function e.g. length, find, remove, position etc...
3. Even if implementation allows you to use sequence function for circle list, you can get into infinite loop easily.
4. You never modify its length.

* Proposal
Treat-as-circle solves any issues above.
Like its name indicates, treat-as-circle treats sequence as circle.
Yes, you can use any sequences includes bit vector as circle.
(note - list must be proper.)

## Usage
```lisp
(defvar list '(a b c))
=> LIST
(nth-as-circle 0 list)
=> A
(nth-as-circle 3 list)
=> A
(nth-as-circle -1 list)
=> C
```
Treat-as-circle provides the symbols named XXX-as-circle.
XXX is nth, elt, char, schar, aref, svref, bit, or sbit.
API is inherit from CL's.
(i.e. nth-as-circle accepts index as first argument, but others.)

## For hackers
XXX-as-circle call CL:LENGTH each time.
It may be over head, especially called in loop.
In such cases, you can use internal %XXX-as-circle with `*LENGTH*` combination.
```lisp
(let*((list '(a b c))
      (*LENGTH* (length list)))
  (loop :for n :below 10
        :collect (%NTH-AS-CIRCLE n list)))
=> (A B C A B C A B C A)
```
NOTE - aref-as-circle, and bit-as-circle does not have internal one.
## From developer

* Product's goal - Already?
* License - MIT
* Developped with - CLISP
* Tested with -


text:
# Footer

![Footer component example](images/footer_example.png)

_Footer component example_

Footers are a secondary element in a web page because they usually appear at the bottom and it is the last thing that the user interacts with. But the presence of the footer must be designed in every application and be part of it (consumer or back-office) as it is a key layout element to the overall experience. Is a choice of the designer to either leave the footer visible by default or push it down, depending on the use case.

## Appereance

This area can contain a variety of things depending on the application and two approaches are followed to use a footer element.

- The first reason is that users scan or read the page and they don't find what they are looking for or need more detail regarding some information.
- The second reason is that the user already has a conception of the footer, and the default action in the flow is to scroll down to the footer to find useful information.

## Design specifications

![Footer component design specs](images/footer_specs.png)

_Footer component design specs_

### Color

| Tokens                      |   Value           |
|-----------------------------|-------------------|
| `backgroundColor`           |   #000000         |
| `fontColor`                 |   #ffffff         |
| `lineColor`                 |   #0095ff         |

### Height

|  Property         |   Value   |
| ----------------- | --------- |
|  `min-height`     |   124px   |

### Margin-top

| Margin      |   Value   |
| ----------- | --------- |
| `xxsmall`   |   6px     |
| `xsmall`    |   16px    |
| `small`     |   24px    |
| `medium`    |   36px    |
| `large`     |   48px    |
| `xlarge`    |   64px    |
| `xxlarge`   |   100px   |

### Padding

| Property          |   Value   |
| ----------------- | --------- |
| `padding-top`	    |   24px    |
| `padding-right`	  |   36px    |
| `padding-bottom`  |   24px    |
| `padding-left`	  |   36px    |

### Typography

| Property      |   Element                 |  Value          |
| ------------- | ------------------------- | --------------- |
| `font-size`	  |   Titles      	          |  1rem/16px      |
| `font-size`   |   Links   	              |  0.875rem/14px  |
| `font-size`   |   Copy-write              |  0.75rem/12px   |
| `font-size`   |   Terms & company links   |  0.75rem/12px   |
| `font-weight`	|   Titles      	          |  600            |
| `font-weight`	|   Links	                  |  400            |

### Iconography

| Property          |   Element             |  Value      |
| ----------------- | --------------------- | ----------- |
| `height`/ `width`	|   Social media icons  |   24/24px   |

### DXC Logo

| Property      |   Element     |  Value    |
| ------------- | ------------- | --------- |
| `max-height`  |   DXC logo    |   32px    |

### Custom container - (Terms & Company Links)

| Property        |   Element     	    |   Value   		        |
| --------------- | ------------------- | --------------------- |
| `min-height`   	|   Custom container	|   16px    		        |
| `min-height`	  |   Links container	  |   20px    		        |
| `padding-top`   |   Links container	  |   8px     		        |
| `border`	      |   Links separator	  |   1px solid #1489fb	  |

The content of the footer should be adapt to the space available depending on the screen device.

## Content

![Footer custom content examples](images/footer_custom_content.png)

_Footer custom content examples_

The footer component has a custom area where many kinds of content can be placed, some of them are contemplated in the following list:

* Plain text or content
   * Informational purpose text

* Menu links
   * Global navigation
   * Sitemap
   * Useful links or resources

* Forms
  * Select language
  * Login / Sing up
  * Provide email adress / Subscribe

* Actions
  * Ask for help / Support
  * Business related actions / Call to action
  * Search

## Responsive version for mobile and tablet

The same content in the footer will be displayed for the responsive versions and the only modification will be the width of it. With less space available to display the content, some of the items will be relocated to fit well in the screen.

Regarding his behavior, the footer must be pushed down always so it is not visible by default after page load, even when the content is smaller than the device screen size. This includes the splash screen, which must push the footer down. Of course, if the content is larger than the device screen size, the footer will be pushed down anyway

On the mobile version, first we have the logo. Below it the links to privacy and terms to let a space for custom component and at the bottom the copyright terms, centered.
At this stage, the custom content and the disposition is responsability of the user, the same way as it is in the desktop and tablet version.

### User Interface Design Considerations

- The footer frame should be docked at the bottom of the page and should not scroll with any of the data within working section of the screen.
- The footer frame should span the entire screen width.
- The footer frame should display the copyright information at the right margin.
- We recommend uploading either an alternate version or a smaller brand image than the used in the header. If the company has an alternate version of the logo, isotype, imagotype or isologo available, we encourage to use it. In the opposite case a smaller version of the main brand image can be used.

## Links and references

- https://xd.adobe.com/view/23e2cca4-5021-490a-a548-e99a9b4a2006-76b1/screen/3c920e77-d15a-4856-81c4-d9389af085b0/variables/

____________________________________________________________

[Edit this page on Github](https://github.com/dxc-technology/halstack-style-guide/blob/master/guidelines/components/footer/README.md)

repository: Jialecl/halstack-style-guide

repo_name: Jialecl/halstack-style-guide


text:
---
layout: post
section-type: post
title: We've Updated Our Privacy Statement
category: announcements
tags: [ 'news' ]
---

We use Disqus to moderate our blog. The only information that Disqus provides to us is the number of comments or votes we have. We don't intend to collect any personal information from you, and the sole purpose of our blog is to share development experiences and tutorials. It's come to our attention, however, that Disqus does gather standard analytics data and thought it important to pass this information along to you. Here is our updated Privacy Statement and here is the Disqus Privacy Policy. Thanks for understanding!


text:
# Helotium terrestre Berk. & Broome, 1883 SPECIES

#### Status
SYNONYM

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

#### Published in
Trans. Linn. Soc. London, Bot. , Ser. 2 2: 69 (1883)

#### Original name
Helotium terrestre Berk. & Broome, 1883

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Leotiomycetes/Helotiales/Helotiaceae/Discinella/Discinella terrestris/ Syn. Helotium terrestre/README.md

repo_name: mdoering/backbone


text:
### [CVE-2022-26981](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-26981)
![](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

Liblouis through 3.21.0 has a buffer overflow in compilePassOpcode in compileTranslationTable.c (called, indirectly, by tools/lou_checktable.c).

### POC

#### Reference
- https://github.com/liblouis/liblouis/issues/1171

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

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Software Quality Landscape

## Learning Objectives (5 min)

1. Identify and describe the characteristics that embody the qualities of great software.
2. Define the internal and external attributes that users and programmers use to determine the quality of software.

## Initial Exercise (15 min)

Write down as many examples of good quality software that you can think of!

## TT / Overview

Go over the [mind map](https://github.com/Make-School-Courses/SPD-1.4-Testing-And-Architecture/blob/master/Resources/4-SoftwareQualityLandscape.pdf) for today.

### External Characteristics / Activity I (25 min)

1. **TT: External Characteristics** (15 min)
1. **Activity** (10 min)
      1. From the list you generated earlier, what external characteristics contributed to the quality of the software?
      1. Discuss with a partner.

### Internal Characteristics / Activity II (25 min)

1. **TT: Internal Characteristics** (15 min)
2. **BREAK** (10 min)
3. **Activity** (10 min)
      1. From the list you generated earlier, what internal characteristics contributed to the quality of the software?
      2. Discuss with a partner.

### BREAK (10 min)

### Improving Software Quality / Activity III (25 min)

1. **TT: Improving Software Quality** (15 min)
1. **Activity** (10 min)
      1. How could the software in your list be improved? What measures would you take?
      2. Discuss with a partner.

## Wrap Up (5 min)

### Announcements

**Homework Assignments Coming Soon**:

  - Reflected Best Self Exercise
  - Software Craftsmanship Blog Post

## Additional Resources

1. Code Complete, Chapter 20

repository: KitsuneNoctus/makeschool

repo_name: KitsuneNoctus/makeschool


text:
# PN5_60681

<PageHeader />

## Description

jQL: **MCC** conversion code issues

### Previous Release Behavior

Two issues:

1. The **MCC** code would consume all memory when there were @SVMs in the data.
2. The **Umlaute** character would cause unpredictible behavior, e.g.

```
001 A
002 0
003
004
005
006
007
008 A;(N(attn)(MCC;û;u))
009 L
010 14

Because "Umlaute" can have the same ASCII values as jBASE delimiters, using MCC on something like...

        (char)0xfb 'û'

would cause unpredictable behavior.
```

### Current Release Behavior

Both issues are fixed.

Back to [jBASE 5.7.0 Release Notes](./../README.md)

<PageFooter />

repository: josepheshaw/docs

repo_name: josepheshaw/docs


text:
The Toolbar Cell component builds cells within a Toolbar. Adjacent cells are divided with a thin line.

# Props

-   `[flex]` - a flex definition, specifying the grow/shrink/basis property for element sizing.

# Permitted Children

-   any

```html
<porcelain-toolbar-cell [flex]="'0 0 auto'">
	...
</porcelain-toolbar-cell>
```

repository: my-ul/ng-porcelain

gha_language: TypeScript

repo_name: my-ul/ng-porcelain


text:
## Explain the changes you’ve made

Good example:
I've added support for authentication to implement Key Result 2 of OKR1. It includes
model, table, controller and test. For more background, see #CLICKUP-ID.

## Explain why these changes are made

A good example:
These changes complete the user login and account creation experience.

## How to test

Concrete example:

1. Checkout this branch
2. run `sls deploy` within service folder for `service x`
3. ...etc

repository: helsingborg-stad/helsingborg-io-sls-api

branch_name: refs/heads/dev

repo_name: helsingborg-stad/helsingborg-io-sls-api


text:
# ast_helper

## Installation

```
$ git checkout https://github.com/bcardiff/crystal-ast-helper.git
$ cd crystal-ast-helper
$ shards
$ crystal src/ast_helper.cr

$ open http://localhost:9090
```

If you want to use with crystal head use:

```
$ path/to/crystal-clone/bin/crystal src/ast_helper.cr
```

## Usage

When opening [http://localhost:9090](http://localhost:9090) you will be able to:

* input source
* view the output according to the formatter
* view the tokens returned by the lexer used for parsing and for formatting
  * view the tokens consumed so far even if the formatter fails
* view the stack trace of each token
* view the AST of the whole program

![](https://user-images.githubusercontent.com/459923/46692683-4d02af80-cbde-11e8-8af4-443432567a99.gif)

## Contributing

1. Fork it (<https://github.com/bcardiff/crystal-ast-helper/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Contributors

- [bcardiff](https://github.com/bcardiff) Brian J. Cardiff - creator, maintainer

repository: skurhse/crystal-ast-helper

repo_name: skurhse/crystal-ast-helper


text:
# City Explorer Backend

**Author**: Noah Rhodes and Tammy Ip

**Version**: 0.1

## Overview
The goal of this project is to build out the backend to a frontend application called City Explorer.

## Getting Started
To build this app user must install npm on their machine. Also need to install Express and Superagent to get this app running.

## Architecture
This backend has been develeoped using Javascript with the following dependencies, on the node.js framework:
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1"

## Change Log
11-12-2019 9:30 pm - Application works with Geo, Weather, Trail hike, Movie DB, Yelp APIs.

## Time Estimate

Number and name of feature: *Repository Set Up*
Estimate of time needed to complete: 20 min
Start time: 6:50PM
Finish time: 7:00 PM
Actual time needed to complete: 10 min

Number and name of feature: * Set up Movies DB: API: As a user of City Explorer, I want to enter the name of a location so that I can see data about movie suggestions to me*
Estimate of time needed to complete: 1 hour
Start time: 7:00 PM
Finish time: 8:30 PM
Actual time needed to complete: 1 hour 30 mins

Number and name of feature: *Set up Yelp API: As a user of City Explorer, I want to enter the name of a location so that I can see restaurants info to me*
Estimate of time needed to complete:1 hour
Start time: 8:30 PM
Finish time: 9:30 PM
Actual time needed to complete: 1 hour

## Credits and Collaborations
[Thanks to MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) for their support with Date() javascript documentation!


text:
---
title: How can I create a static website using the API link of my event
---

Hello,

this article is not yet available. Our team is working hard to answer all questions. We will be adding this article soon.

Please check back again in a few days.

If you are interested in helping to create the documentation for the project, please join us on Github [here](https://github.com/fossasia/support.eventyay.com).

Thank you!
# How can I create a static website using the API link of my event ?
In order to create a static website using the API link of my event, please follow these steps:

## Step 1: Log in
`Log in` by using your `username` and `password`
![login page](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-1.png)

## Step 2 : Manage events
Now, click on `manage events`
![manage events](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-2.png)

## Step 3 : Select event
Now, `select the event` which you wanna **create a static website** and then click on `event dashboard`
![select event](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-3.png)

## Step 4 : Event dashboard
Now, scroll down.
![Event dashboard](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-4.png)

## Step 5 : Website Generator
**NOW CLICK ON `Website Generator`**
 website generator  transfers the data of the event via an API to our website tool and creates a static website for you. You can download the entire site as a zip fill and upload it to your own web hosting service.
 ![Website Generator](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-5.png)

 ## Step 6 : Fill details
 Now, fill/ set all details according to requirement and then click on `generate webapp`
 ![Website Generator](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-6.png)
 ![Website Generator](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-7.png)

 ## Step 7 : Generated webapp
 Now, the generated webapp looks like this!
  ![Generated webapp](/images/How-can-I-create-a-static-website-using-the-API-link-of-my-event-8.png)

Finally,done.

Thanks for your visit **http://support.eventyay.com**.


text:
SpreeSimpleSales
================

Create This Extension
---------------------

This extension is created followed by the Spree Extension Toturial. Some steps are modified as follows since they create errors during the creation process.

-  Adding a Sale Price to Variants

```
bundle install

$ bundle exec rails g migration add_sale_price_to_spree_variants sale_price:decimal
```
'bundle exec' must be added before the migration command.

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

Add spree_simple_sales to your Gemfile:

```ruby
gem 'spree_simple_sales'
```

Bundle your dependencies and run the installation generator:

```shell
bundle
bundle exec rails g spree_simple_sales:install
```

Testing
-------

First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `rake test_app`.

```shell
bundle
bundle exec rake
```

When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper:

```ruby
require 'spree_simple_sales/factories'
```

Copyright (c) 2014 [name of extension creator], released under the New BSD License


text:
# Big-Data-and-Music-History
---

<small>A [University of South Florida](http://www.usf.edu/) HIS4936 Hacking History: Programming Digital Scholarship Project</small>

---

![Music in the code](http://media.guitarcenter.com/is/image/MMGS7/My-Violin-Starter-Pack-1-4-Size/H73551000001000-00-500x500.jpg)

---

Thank you for visiting our project on how quantitative analysis in music history is extremely untapped and how big data can bring big resolutions.

repository: Stampapa/Big-Data-and-Music-History

repo_name: Stampapa/Big-Data-and-Music-History


text:
# UPI-QR-code-from-bank-details
Generate shareable QR code, link from bank details to use with UPI payment apps

## [Try it now](https://harish2704.github.io/UPI-qr-gen/)

This tool first generates a [UPI](https://www.npci.org.in/what-we-do/upi/product-overview) id from bank details provided and then generates following items for end users to reuse.

1. QR code image
2. Sharable URL
    - Shareable URLs **This tool does not save/send any banking data to any third party servers**. The data is stored in "hashbang" which is only accessible to web browsers and not sent to servers
3. Mobile friendly link which will invoke the UPI application of your choice on any device

### Powered by

1. https://github.com/soldair/node-qrcode
2. https://milligram.io/
3. https://unpkg.com/
4. Github pages


text:
# Overview

This is a Python library for interfacing with the [Sugestio](http://www.sugestio.com)
recommendation service. Data is submitted as JSON data. The library uses
[python-oauth2](http://github.com/simplegeo/python-oauth2) to create the OAuth-signed requests.

## About Sugestio

Sugestio is a scalable and fault tolerant service that now brings the power of
web personalisation to all developers. The RESTful web service provides an easy to use
interface and a set of developer libraries that enable you to enrich
your content portals, e-commerce sites and other content based websites.

### Access credentials and the Sandbox

To access the Sugestio service, you need an account name and a secret key.
To run the examples from the tutorial, you can use the following credentials:

* account name: sandbox
* secret key: demo

The Sandbox is a *read-only* account. You can use these credentials to experiment
with the service. The Sandbox can give personal recommendations for users 1 through 5,
and similar items for items 1 through 5.

When you are ready to work with real data, you may apply for a developer account through
the [Sugestio website](http://www.sugestio.com).

## About this library

### Features

The following [API](http://www.sugestio.com/documentation) features are implemented:

* get personalized recommendations for a given user
* get items that are similar to a given item
* submit user activity (consumptions): clicks, purchases, ratings, ...
* submit item metadata: description, location, tags, categories, ...
* submit user metadata: gender, location, birthday, ...

### Requirements

[Python-oauth2](http://github.com/simplegeo/python-oauth2) uses httplib2 for
request signing and json or simplejson (Python 2.5) for data conversion.

# Tutorial and sample code

Get personal recommendations for user with id 1:

	import sugestio

	ACCOUNT = 'sandbox'
	SECRET = 'demo'

	client = sugestio.Client(ACCOUNT, SECRET)

	status, content = client.get_recommendations(1)

	if status == 200:
		print content[0].itemid
		print content[0].score
		print content[0].algorithm
	else:
		print "server response code:", status
		print content

example.py contains more sample code that illustrates how you can use the library.

repository: Spencerx/sugestio-python

repo_name: Spencerx/sugestio-python


text:
# Client-side files (.NET Core)

Typically, ASP.NET Core app serves files from `/wwwroot/` folder, create it if not there yet. Under that folder, let's organize like this:

- `wwwroot/`: `.html`
- `wwwroot/js`: `.js`
- `wwwroot/css`: `.css`

The image below illustrates our file and folder structure after creating them in the next section:

gha_language: Shell


text:
---
title: Coronavirus (COVID-19)
summary: Safer working practices
date: "2020-08-01T00:00:00Z"

reading_time: false  # Show estimated reading time?
share: true  # Show social sharing links?
profile: false  # Show author profile?
comments: false  # Show comments?

# Optional header image (relative to `static/img/` folder).
header:
  caption: ""
  image: "covid_1200.jpg"
---
In response to the COVID-19 situation, the following additional practices are currently in place at the Therapy Nottingham.  For the latest [status and availability for in-person appointmnets see here]({{< relref "../#" >}}).

{{% alert warning %}}
Do NOT come to Therapy Nottingham if you have any symptoms of Coronavirus (COVID-19) infection, or have been instructed to self-isolate

- Online / video appointments are available as an alternative

{{% /alert %}}

- If you develop symptoms, or are informed ( e.g. through the Test and Trace systems) that you have been in contact with someone who has, you must inform me immediately.

- If I develop symptoms or am informed that I have been in contact with someone who has, it may be necessary for me to disclose our contact in the interest of public safety.

- In-person appointments may be subject to further change and temporary reversion to online working in line with guidance from professional bodies, local lockdown or national responses.

{{% alert note %}}
  The most up to date information from NHS is available at [https://www.nhs.uk/conditions/coronavirus-covid-19/](https://www.nhs.uk/conditions/coronavirus-covid-19/)
{{% /alert %}}

# Arriving and leaving

- Do not arrive early for appointments, and move directly to the office (or exit)
- Make use of hand sanitiser on entering the building
- Do not spend unnecessary time in shared areas
- Everyone is expected to wear a mask when entering he building and at all times in shared spaces [unless excepted](https://www.gov.uk/government/publications/face-coverings-when-to-wear-one-and-how-to-make-your-own/face-coverings-when-to-wear-one-and-how-to-make-your-own).

# Corridors and stairways
- Wear a face mask whenever in shared spaces, including when arriving and leaving the building

# In the office
- Hand sanitiser is available in the office
- No more than three person in the office at any time, to ensure that social distancing is possible
- Door handles will be cleaned between all appointments
- Hard surfaces (table tops, desks etc.) will be cleaned at least daily before use

# Shared kitchens
- Use of shared kitchens will be restricted to washing up and getting water Wipe surfaces before and after using with the supplied products
- If someone else is using the kitchen, please use another kitchen within the building or wait until it is no longer being used

# Toilets
- Some toilets have multiple cubicles. If someone else is in there, please use another toilet in the building, or wait until the room is free
- Wash hands thoroughly
- Please wipe down surfaces before and after using with the supplied wipes

These practices will be reviewed regularly and may be further amended to reflect changes in good practice, legislation, guidance, and recommendations.

Last review: 10/08/2020

repository: TherapyNottingham/academic-kickstart

repo_name: TherapyNottingham/academic-kickstart


text:
# Defender - Detection - Removal and Quarantine actions

Use the below queries to find Windows Defender file removal and quarantine actions
---

## Query

## Malicious file detected and removed during file download scan

```Kusto
DeviceEvents
| where ActionType == @"OtherAlertRelatedActivity"
| project Timestamp, DeviceName, AdditionalFields, FileName, FolderPath, SHA1
| extend event = parse_json(AdditionalFields).Description
| where event contains "removed" and event contains "download scan"
| extend Threat = split(split(event,"removed")[1]," ")[1]
| extend URL = split(event,"from")[1]
| invoke FileProfile(SHA1)
| project Timestamp, DeviceName, Threat, URL,GlobalPrevalence, FileName, FolderPath, SHA1, event
```

## Malicious file detected and quarantined

```
DeviceEvents
| where ActionType == @"OtherAlertRelatedActivity"
| project Timestamp, DeviceName, AdditionalFields, FileName, FolderPath, SHA1
| extend event = parse_json(AdditionalFields).Description
| where event contains "detected" and event contains "quarantined"
| extend Threat = split(split(event,"quarantined")[1]," ")[1]
/// | extend URL = split(event,"from")[1]
| invoke FileProfile(SHA1)
| project Timestamp, DeviceName, Threat, GlobalPrevalence, FileName, FolderPath, SHA1, event
```

## Defender detections
```
DeviceEvents
| where ActionType == "AntivirusDetection"
| extend event = parse_json(AdditionalFields)
| extend Threat = event.ThreatName
| extend WasRemediated = event.WasRemediated
| extend Action = event.Action
| extend ReportSource = event.ReportSource
| project Timestamp, DeviceName, event, Threat, WasRemediated, Action, ReportSource, FileName
```

## Category

This query can be used to detect the following attack techniques and tactics ([see MITRE ATT&CK framework](https://attack.mitre.org/)) or security configuration states.

| Technique, tactic, or state | Covered? (v=yes) | Notes |
|-|-|-|
| Initial access |  |  |
| Execution |  |  |
| Persistence |  |  |
| Privilege escalation | |  |
| Defense evasion |  |  |
| Credential Access |  |  |
| Discovery |  |  |
| Lateral movement |  |  |
| Collection |  |  |
| Command and control |  |  |
| Exfiltration |  |  |
| Impact |  |  |
| Vulnerability |  |  |
| Misconfiguration |  |  |
| Malware, component |  |  |

## See also

## Contributor info

**Contributor:** Alex Verboon

url: https://raw.githubusercontent.com/alexverboon/MDATP/d77bc37f5efc0f7c762cc9b480261d20ec900f21/AdvancedHunting/Defender - Detection - Removal and Quarantine actions.md

repository: alexverboon/MDATP

gha_language: PowerShell

repo_name: alexverboon/MDATP


text:
+++
title = "Commands"
layout = "docs.jingoo"
+++

# Commands

Camyll has the following subcommands:

- `camyll build`: Builds the site.
- `camyll serve [--port=PORT (default 8080)]`: Serves the site at the given
  port.

Each subcommand accepts the flag `--help` to print documentation.

repository: dune-universe/dune-universe

repo_name: dune-universe/dune-universe


text:
Building a React Native App with AWS Amplify
===========

Overview
--------

The AWS Amplify and the CLI provides a developer experience that allows frontend JavaScript developers to quickly create React Native apps and integrate backend resources into their apps. In this tutorial, you will learn how to build a cloud-enabled mobile app with React Native and AWS Amplify.

**By completing this tutorial, you will be able to;**
- Use AWS Mobile CLI to create your backend
- Configure and integrate your backend into your React Native app
- Deploy your mobile app for delivery

## Set Up and Installation

### Prerequisites

1.  [Sign up for the AWS Free Tier](https://aws.amazon.com/free/) to
    learn and prototype at little or no cost.
2.  Install [Node.js](https://nodejs.org/en/download/) with NPM.
3.  Install the AWS Mobile CLI

    ```bash
    npm install --global awsmobile-cli
    ```

4.  Configure the CLI with your AWS credentials

    To set up permissions for the toolchain used by the CLI, run:

    ```bash
    awsmobile configure
    ```

    If prompted for credentials, follow the steps provided by the CLI.
    For more information, see
    Provide IAM credentials to AWS Mobile CLI <aws-mobile-cli-credentials>.

### Set Up Your Backend

**To configure backend features for your app**

1.  In the root folder of your app, run:

    ```bash
    awsmobile init
    ```

    The `init` command creates a backend project for your
    app. By default, analytics and web hosting are enabled in your
    backend and this configuration is automatically pulled into your app
    when you initialize.

2.  When prompted, provide the source directory for your project. The
    CLI will generate aws-exports.js in this location. This file
    contains the configuration and endpoint metadata used to link your
    frontend to your backend services.

    ```bash
    ? Where is your project's source directory:  /
    ```

    Then respond to further prompts with the following values.

    ```bash
    Please tell us about your project:
    ? Where is your project's source directory:  /
    ? Where is your project's distribution directory that stores build artifacts:  build
    ? What is your project's build command:  npm run-script build
    ? What is your project's start command for local test run:  npm run-script start
    ```

### Connect to Your Backend

AWS Mobile uses the open source [AWS Amplify
library](https://github.com/aws/aws-amplify) to link your code to the
AWS features configured for your app.

**To connect the app to your configured AWS services**

1.  Install AWS Amplify for React Native library.

    ```bash
    npm install --save aws-amplify
    ```

2.  In App.js (or in other code that runs at launch-time), add the
    following imports.

    ```js
    import Amplify from 'aws-amplify';

    import aws_exports from './YOUR-PATH-TO/aws-exports';
    ```

3.  Then add the following code.

    ```js
    Amplify.configure(aws_exports);
    ```

### Run Your App Locally

Your app is now ready to launch and use the default services configured
by AWS Mobile.

**To launch your app locally**

Use the command native to the React Native tooling you are using. For
example, if you made your app using
`create-react-native-app` then run:

```bash
npm run android

# OR

npm run ios
```

Anytime you launch your app,
app usage analytics are gathered and can be visualized
in an AWS console.

To learn more about the commands and usage of the AWS Mobile CLI, see
the [AWS Mobile CLI reference](https://docs.aws.amazon.com/aws-mobile/latest/developerguide/aws-mobile-cli-reference.html).
{: .callout .callout--info}

## Add Auth / User Sign-in

The AWS Mobile CLI components for user authentication include a rich,
configurable UI for sign-up and sign-in.

**To enable the Auth features**

In the root folder of your app, run:

```js
$ awsmobile user-signin enable
$ awsmobile push
```

#### Connect to Your Backend

The AWS Mobile CLI enables you to integrate ready-made
sign-up/sign-in/sign-out UI from the command line.

**To add user auth UI to your app**

1.  Install AWS Amplify for React Native library.

    ```bash
    npm install --save aws-amplify
    npm install --save aws-amplify-react-native
    ```

<!-- -->

1.  Add the following import in App.js (or another file that runs upon app
    startup):

    ```js
    import { withAuthenticator } from 'aws-amplify-react-native';
    ```

2.  Then change `export default App;` to the following.

    ```js
    export default withAuthenticator(App);
    ```

To test, run `npm start` or `awsmobile run`.

Learn more about the AWS Mobile User Sign-in feature, which uses [Amazon Cognito](http://docs.aws.amazon.com/cognito/latest/developerguide/welcome.html).
{: .callout .callout--info}

## Add Cloud APIs

The AWS Mobile Cloud Logic feature lets you call APIs in the cloud. Your serverless Lambda functions handle API calls.

**To enable cloud APIs in your app**

```bash
awsmobile cloud-api enable
awsmobile push
```

Enabling Cloud Logic in your app adds a sample API,
`sampleCloudApi` to your project that can be used for
testing.

You can find the sample handler function for the API by running
`awsmobile console` in your app root folder, and then
choosing the Cloud Logic feature in your project.

![View your sample cloud API and its lambda function handler.]({%if jekyll.environment == 'production'%}{{site.amplify.baseurl}}{%endif%}/media/images/web-view-cloud-api.png)

### Quickly Test Your API From the CLI

The `sampleCloudApi` and its handler function allow you to
make end-to-end API calls.

**To test invocation of your unsigned APIs in the development
environment**

```bash
awsmobile cloud-api invoke <apiname> <method> <path> [init]
```

For the `sampleCloudApi` you may use the following examples
to test the `post` method

```bash
awsmobile cloud-api invoke sampleCloudApi post /items '{"body": {"testKey":"testValue"}}'
```

This call will return a response similar to the following.

```js
{   success: 'post call succeed!',
    url: '/items',
    body: {
        testKey: 'testValue'
    }
}
```

**To test the :get method**

```bash
$ awsmobile cloud-api invoke sampleCloudApi get /items
```

This will return a response as follows.

```js
{ success: 'get call succeed!', url: '/items' }
```

### Connect to Your Backend

Once you have created your own Cloud Logic APIs and
Lambda functions, you can call them from your app.

**To call APIs from your app**

In App.js (or other code that runs at launch-time), add the following
import.

```js
import Amplify, { API } from 'aws-amplify';
import aws_exports from './aws-exports';
Amplify.configure(aws_exports);
```

Then add this to the component that calls your API.

```js
state = { apiResponse: null };

async getSample() {
 const path = "/items"; // you can specify the path
  const apiResponse = await API.get("sampleCloudApi" , path); //replace the API name
  console.log('response:' + apiResponse);
  this.setState({ apiResponse });
}
```

To invoke your API from a UI element, add an API call from within your
component's `render()` method.

```html
<View>
   <Button title="Send Request" onPress={this.getSample.bind(this)} />
   <Text>Response: {this.state.apiResponse && JSON.stringify(this.state.apiResponse)}</Text>
</View>
```

To test, save the changes, run `npm run android` or
`npm run ios` to launch your app. Then try the UI element
that calls your API.

Learn more about the AWS Mobile Cloud Logic feature which uses [Amazon API Gateway](http://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) and [AWS Lambda](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html).
{: .callout .callout--info}

To be guided through creation of an API and it's handler, run
`awsmobile console` to open your app in the console, and
choose Cloud Logic.

## Add Cloud Database

AWS Mobile `database` feature enables you to create tables
customized to your needs. The CLI then guides you to create a custom API
to access your database.

### Create a table

**To create a table:**

1.  In your app root folder, run:

    ```
    awsmobile database enable --prompt
    ```

2.  Design your table when prompted by the CLI.

    The CLI will prompt you for the table and other table configurations
    such as columns.

    ```
    Welcome to NoSQL database wizard
    You will be asked a series of questions to help determine how to best construct your NoSQL database table.

    ? Should the data of this table be open or restricted by user? Open
    ? Table name Notes

    You can now add columns to the table.

    ? What would you like to name this column NoteId
    ? Choose the data type string
    ? Would you like to add another column Yes
    ? What would you like to name this column NoteTitle
    ? Choose the data type string
    ? Would you like to add another column Yes
    ? What would you like to name this column NoteContent
    ? Choose the data type string
    ? Would you like to add another column No
    ```

    **Primary Key and Sort Key**

    Choose a [Primary Key](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey)
    that will uniquely identify each item. Optionally, choose a column
    to be a Sort Key when you will commonly use those values in
    combination with the Primary Key for sorting or searching your data.
    You can additional sort keys by adding a [Secondary
    Index](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.SecondaryIndexes)
    for each column you will want to sort by.

    ```
    Before you create the database, you must specify how items in your table are uniquely organized. This is done by specifying a Primary key. The primary key uniquely identifies each item in the table, so that no two items can have the same key.
    This could be an individual column or a combination that has "primary key" and a "sort key."
    To learn more about primary key:
    http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey

    ? Select primary key NoteId
    ? Select sort key (No Sort Key)

    You can optionally add global secondary indexes for this table. These are useful when running queries defined by a different column than the primary key.

    To learn more about indexes:
    http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.SecondaryIndexes

    ? Add index No
    Table Notes added
    ```

### Create a CRUD API

AWS Mobile CLI will create a custom API for your app to perform create,
read, update, and delete (CRUD) actions on your database.

**To create a CRUD API for your table**

1.  In the root folder of your app, run:

    ```bash
    awsmobile cloud-api enable --prompt
    ```

2.  When prompted, choose
    `Create CRUD API for existing Dynamo table`, select the
    table name from the previous steps, choose the access permissions
    for the table. Using the example table from the previous section:

    ```bash
    ? Select from one of the choices below.
      Create a new API
    ❯ Create CRUD API for an existing Amazon DynamoDB table
    ```

    The prompt response will be:

    ```bash
    Path to be used on API for get and remove an object should be like:
    /Notes/object/:NoteId

    Path to be used on API for list objects on get method should be like:
    /Notes/:NoteId

    JSON to be used as data on put request should be like:
    {
      "NoteTitle": "INSERT VALUE HERE",
      "NoteContent": "INSERT VALUE HERE",
      "NoteId": "INSERT VALUE HERE"
    }
    To test the api from the command line (after awsmobile push) use this commands
    awsmobile cloud-api invoke NotesCRUD <method> <path> [init]
    Api NotesCRUD saved
    ```

    Copy and keep the path of your API and the JSON for use in your app
    code.

    This feature will create an API using Amazon API Gateway and AWS
    Lambda. You can optionally have the lambda function perform CRUD
    operations against your Amazon DynamoDB table.

3.  Update your backend.

    To create the API you have configured, run:

    ```js
    awsmobile push
    ```

    Until deployment of API to the cloud the has completed, the CLI
    displays the message:
    `cloud-api update status: CREATE_IN_PROGRESS`. Once
    deployed a successful creation message
    `cloud-api update status: CREATE_COMPLETE` is
    displayed.

    You can view the API that the CLI created by running
    `awmobile console` and then choosing Cloud Logic in the
    console.

### Connect to Your Backend

**To access database tables from your app**

1.  In App.js import the following.

    ```js
    import Amplify, { API } from 'aws-amplify';
    import aws_exports from 'path_to_your_aws-exports';
    Amplify.configure(aws_exports);
    ```

2.  Add the following `state` to your component.

    ```js
    state = {
      apiResponse: null,
      noteId: ''
    };

    handleChangeNoteId = (event) => {
        this.setState({noteId: event});
    }
    ```

### Save an item (create or update)

**To save an item**

In the part of your app where you access the database, such as an event
handler in your React component, call the `put` method. Use
the JSON and the root path (`/Notes`) of your API that you
copied from the CLI prompt response earlier.

```js
// Create a new Note according to the columns we defined earlier
  async saveNote() {
    let newNote = {
      body: {
        "NoteTitle": "My first note!",
        "NoteContent": "This is so cool!",
        "NoteId": this.state.noteId
      }
    }
    const path = "/Notes";

    // Use the API module to save the note to the database
    try {
      const apiResponse = await API.put("NotesCRUD", path, newNote)
      console.log("response from saving note: " + apiResponse);
      this.setState({apiResponse});
    } catch (e) {
      console.log(e);
    }
  }
```

To use the command line to see your saved items in the database run:

```
awsmobile cloud-api invoke NotesCRUD GET /Notes/object/${noteId}
```

### Get a specific item

**To query for a specific item**

Call the `get` method using the API path (copied earlier)
to the item you are querying for.

```js
// noteId is the primary key of the particular record you want to fetch
    async getNote() {
      const path = "/Notes/object/" + this.state.noteId;
      try {
        const apiResponse = await API.get("NotesCRUD", path);
        console.log("response from getting note: " + apiResponse);
        this.setState({apiResponse});
      } catch (e) {
        console.log(e);
      }
    }
```

### Delete an item

**To delete an item**

Add this method to your component. Use your API path (copied earlier).

```js
// noteId is the NoteId of the particular record you want to delete
    async deleteNote() {
      const path = "/Notes/object/" + this.state.noteId;
      try {
        const apiResponse = await API.del("NotesCRUD", path);
        console.log("response from deleteing note: " + apiResponse);
        this.setState({apiResponse});
      } catch (e) {
        console.log(e);
      }
    }
```

### UI to exercise CRUD calls

The following is an example of how you might construct UI to exercise
these operations.

```js
<View style={styles.container}>
        <Text>Response: {this.state.apiResponse && JSON.stringify(this.state.apiResponse)}</Text>
        <Button title="Save Note" onPress={this.saveNote.bind(this)} />
        <Button title="Get Note" onPress={this.getNote.bind(this)} />
        <Button title="Delete Note" onPress={this.deleteNote.bind(this)} />
        <TextInput style={styles.textInput} autoCapitalize='none' onChangeText={this.handleChangeNoteId}/>
</View>

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  textInput: {
      margin: 15,
      height: 30,
      width: 200,
      borderWidth: 1,
      color: 'green',
      fontSize: 20,
      backgroundColor: 'black'
   }
});
```

Learn more about the AWS Mobile NoSQL Database feature, which uses [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html).
{: .callout .callout--info}

## Add Cloud Storage

The AWS Mobile CLI User Data Storage feature
enables apps to store user files in the cloud.

### Set Up Your Backend

**To configure your app's cloud storage location**

In your app root folder, run:

```bash
awsmobile user-files enable
awsmobile push
```

### Connect to Your Backend

**To add User Data Storage to your app**

In your component where you want to transfer files:

Import the `Storage` module from aws-amplify and configure
it to communicate with your backend.

```js
import { Storage } from 'aws-amplify';
```

Now that the Storage module is imported and ready to communicate with
your backend, implement common file transfer actions using the code
below.

### Upload a file

**To upload a file to storage**

Add the following methods to the component where you handle file
uploads.

```js
async uploadFile() {
  let file = 'My upload text';
  let name = 'myFile.txt';
  const access = { level: "public" }; // note the access path
  Storage.put(name, file, access);
}
```

### Get a specific file

**To download a file from cloud storage**

Add the following code to a component where you display files.

```js
async getFile() {
  let name = 'myFile.txt';
  const access = { level: "public" };
  let fileUrl = await Storage.get(name, access);
  // use fileUrl to get the file
}
```

### List all files

**To list the files stored in the cloud for your app**

Add the following code to a component where you list a collection of
files.

```js
async componentDidMount() {
  const path = this.props.path;
  const access = { level: "public" };
  let files = await Storage.list(path, access);
   // use file list to get single files
}
```

Use the following code to fetch file attributes such as the size or time
of last file change.

```js
file.Size; // file size
file.LastModified.toLocaleDateString(); // last modified date
file.LastModified.toLocaleTimeString(); // last modified time
```

### Delete a file

Add the following statement to the element where you handle file transfers.

```js
async deleteFile(key) {
  const access = { level: "public" };
  Storage.remove(key, access);
}
```

## Add Analytics

When you complete the AWS Mobile CLI setup and launch your app,
anonymized session and device demographics data flows to the AWS
analytics backend.

**To send basic app usage analytics to AWS**

Launch your app locally, for instance, if you created your app using
`create-react-native-app`, by running:

```bash
npm run android

# Or

npm run ios
```

When you use your app the [Amazon
Pinpoint](http://docs.aws.amazon.com/pinpoint/latest/developerguide/)
service gathers and visualizes analytics data.

**To view the analytics using the Amazon Pinpoint console**

1.  Launch your app at least once.
2.  Open your project in the [AWS Mobile Hub
    console](https://console.aws.amazon.com/mobilehub/).

    ```bash
    awsmobile console
    ```

3.  Choose the Analytics icon on the left, to navigate to your project
    in the [Amazon Pinpoint
    console](https://console.aws.amazon.com/pinpoint/).
4.  Choose Analytics on the left.

You should see an uptick in several graphs.

### Add Custom Analytics to Your App

You can configure your app so that [Amazon
Pinpoint](http://docs.aws.amazon.com/pinpoint/latest/developerguide/)
gathers data for custom events that you register within the flow of your
code.

**To instrument custom analytics in your app**

In the file containing the event you want to track, add the following
import:

```js
import { Analytics } from 'aws-amplify';
```

Add a call like the following to the spot in your JavaScript where
the tracked event should be fired:

```js
componentDidMount() {
   Analytics.record('FIRST-EVENT-NAME');
}
```

Or to relevant page elements:

```js
handleClick = () => {
     Analytics.record('SECOND-EVENT-NAME');
}

<Button title="Record event" onPress={this.handleClick}/>
```

To test:

1.  Save the changes and launch your app. Use your app, so that tracked
    events are triggered.
2.  In the [Amazon Pinpoint
    console](https://console.aws.amazon.com/pinpoint/), choose Events
    near the top.
3.  Select an event in the Event drop-down menu on the left.

Custom event data may take a few minutes to become visible in the
console.

Learn more about the analytics in AWS Mobile which is part of the Messaging and Analytics feature. This
feature uses [Amazon Pinpoint](http://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html).
{: .callout .callout--info}

repository: tallpants/aws-amplify

repo_name: tallpants/aws-amplify


text:
# ImmutableJs
Testing [ImmutableJS](https://github.com/facebook/immutable-js) with [Typescript](http://www.typescriptlang.org/) and [Jest](https://facebook.github.io/jest/)

Trying to find good patterns for writing maintainable code with ImmutableJS and Typescript.

Setup
* Install [Node.js](https://nodejs.org/en/)
* Install [Yarn](https://github.com/yarnpkg/yarn) from [Yarn install](https://yarnpkg.com/en/docs/install)
* Open cmd or powershell in typescript directory
* Run "yarn"

Run unit tests
* Run "npm run test"

Debugging with Visual Studio Code
* http://garethevans.com/2016/06/14/react-jest-typescript-and-visual-studio-code-on-windows/
* https://blogs.msdn.microsoft.com/jtarquino/2016/01/24/debugging-typescript-in-visual-studio-code-and-chrome/

repository: projecteon/ImmutableJs

repo_name: projecteon/ImmutableJs


text:
# Configure HTTP flood protection {#concept_72210_zh .concept}

Anti-DDoS Pro provides four protection modes to help you defend against HTTP flood attacks.

-   **Normal**: The default HTTP flood protection mode. We recommend that you use this mode when the traffic pattern on your website is normal.

    This mode defends against typical HTTP flood attacks and does not block normal requests.

-   **Emergency**: You can enable this mode when you notice HTTP response errors, traffic anomalies, or CPU and memory usage spikes.

    The emergency mode provides relatively rigorous protection. This mode can defend against more complicated flood attacks, but may mistakenly block a small number of normal requests.

-   **Strict**: This mode provides rigorous protection against HTTP flood attacks. The mode uses captcha verification to verify the identity of all visitors. Only verified visitors are allowed to access the site.

    **Note:** The strict mode is built on a verification mechanism that verifies whether the request is sent from a browser by a real user. If this mode is enabled for API services and native applications, false positives may occur, disrupting the availability of your service.

-   **Super Strict**: This mode provides the most rigorous protection against HTTP flood attacks. The mode uses captcha verification to verify the identity of all visitors. Only verified visitors are allowed to access the site.

    Compared with the strict mode, this mode combines captcha verification with anti-debugging techniques to enhance the protection of your site.

    **Note:** The super strict mode is built on a verification mechanism that verifies whether the request is sent from a browser by a real user. In very rare situations, a browser error may occur and cause service interruptions. Users only need to restart the browser to resolve this issue. However, if this mode is enabled for API services and native applications, false positives may occur, disrupting the availability of your service.

## Procedure {#section_cyy_rj3_kgb .section}

By default, normal HTTP flood protection is used. You can change protection modes based on your needs.

1.  Log on to the [Anti-DDoS Pro console](https://yundun.console.aliyun.com/?p=ddoscoo&__consolePageCode=ddoscoo#/).
2.  In the left-side navigation pane, choose **Management** \> **Websites**, select a domain, and click **Protection Settings**.

    ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/79692/155411459536921_en-US.png)

3.  In the **HTTP Flood Protection** area, select a protection mode.

    **Note:** You can click Status to disable HTTP flood protection.

    ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/79692/155411459536922_en-US.png)

## Custom rules { .section}

The HTTP flood protection feature also allows you to create custom rules to defend against HTTP flood attacks. You can add custom rules to protect specific URLs.

On the Protection Settings page, find the **HTTP Flood Protection** area and enable custom rules. You can then click **Change Settings** to create custom rules.

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/79692/155411459536923_en-US.png)

## Best practices for HTTP flood protection { .section}

The protection effects provided by different protection modes are as follows: Super Strict \> Strict \> Emergency \> Normal. The chances of false positives when using these protection modes are as follows: Super Strict \> Strict \> Emergency \> Normal.

In normal situations, we recommend that you use the normal HTTP flood protection mode to protect your site. This mode only blocks IP addresses that frequently send requests to your website. We recommend that you enable the emergency or strict mode when your website is overwhelmed by flood attacks and the normal protection mode fails to protect your site.

**Note:** For API services and native applications, you cannot use the strict or super strict mode because false positives are likely to occur. You can instead create custom rules to protect specific URLs from flood attacks.

url: https://raw.githubusercontent.com/juicechu/ddosbasic/27f2e2dfd9980e9c2b76d8fdae36b2960fb4ec80/intl.en-US/New Anti-DDoS Pro Service/User Guide/Configure layer 7 protection/Configure HTTP flood protection.md

repository: juicechu/ddosbasic

filename: Configure HTTP flood protection.md

repo_name: juicechu/ddosbasic