text:
# GA4GH Cloud Interoperability Testing

[![Travis-CI Build Status](https://travis-ci.org/ga4gh/cloud-interop-testing.svg?branch=develop)](https://travis-ci.org/ga4gh/cloud-interop-testing.svg?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/ga4gh/cloud-interop-testing/badge.svg?branch=develop)](https://coveralls.io/ga4gh/cloud-interop-testing?branch=develop)

The GA4GH Testbed Orchestrator is a system that brings together plugins that test implementations of services from the GA4GH Cloud (and eventually other) Work Stream. The orchestrator is designed to be a framework for running multiple tests within, and across services. For example, (1) the interoperability and integration tests across Workflow Execution Service (WES), Tool Registry Service (TRS), and Data Repository Service (DRS) APIs and also (2) specific compliance tests for implementations of individual APIs. By building the test infrastructure with a common Testbed Orchestrator, we can evolve how we test in the future while still leveraging a unified framework. This approach will not only make it much easier to aggregate results to a common GA4GH testing dashboard, but it will also reduce redundant code between testing efforts by factoring out orchestration to this effort.

The initial use case for this app will be to act as a workflow orchestrator and bridge between **Tool Registry Service (TRS)** and **Workflow Execution Service (WES)** endpoints for the [**Testbed Interoperability Platform**](https://docs.google.com/document/d/12Mq4v7o5VKF-DkFTQwsUQ-aWZ5aBeIcl_5YrhbaSv7M/edit?usp=sharing), a core deliverable of the GA4GH Cloud Workstream for 2018.  We're basing the design on the [GA4GH Testbed Orchestrator Design](https://docs.google.com/document/d/1Cl3EZ5B1V-nxEeUCOJKyTHHJRDhknJyopdtjNcq_7jI/edit#) document.

*Note: this repo was originally forked from [Sage-Bionetworks/workflow-interop](https://github.com/Sage-Bionetworks/workflow-interop) and will be maintained here as the testbed scope expands.*

## Overview

This is an OpenAPI-enabled (and documented) Flask server. This app uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask.

The (intended) logic for the testbed is further described in the in-progress [**OpenAPI specification**](https://github.com/ga4gh/cloud-interop-testing/blob/develop/ga4ghtest/openapi/openapi.yaml).

## Requirements

Python 3.6+

## Usage

To install the server and dependencies, execute the following from the root directory:

```shell
pip install -r requirements.txt . && \
  pip install --no-deps -r dev-requirements.txt
```

To start the app, you can use this command:

```shell
testbed_server
```

and open your browser to here:

```
http://localhost:8080/ga4gh/testbed/v1/ui/
```

The OpenAPI definition lives here:

```
http://localhost:8080/ga4gh/testbed/openapi.json
```

You can also find the latest version of the OpenAPI specification in GitHub [**here**](https://github.com/ga4gh/cloud-interop-testing/blob/develop/ga4ghtest/openapi/openapi.yaml).

## Running with Docker

To run the server on a Docker container, please execute the following from the root directory:

```bash
# building the image
docker build -t ga4ghtest .

# starting up a container
docker run -p 8080:8080 ga4ghtest
```

## Development

After editing the OpenAPI YAML spec, controller and model code can be regenerated with the following command:

```shell
bash codegen.sh
```

See instructions for creating new test plugins [**here**](docs/plugin.md).

## Notes

When comparing the OpenAPI spec for the different services TRS, WES, TES and DRS the following inconsistencies were observed. They should be addressed to make the APIs specs uniform and ensure that implementers don't misinterpret the spec.

### Base Path

The _basePath_ is configured in the _openAPi spec_. This is the path used in the URL of the endpoint.

|| WES |TRS | TES | DRS |
| --- | ------------- | ------------- | ------ | --- |
|BasePath| `/ga4gh/wes/v1` | `/api/ga4gh/v1` | (None) | `/ga4gh/drs/v1` |
|Implied BasePath<br>(based on common prefix)| `/ga4gh/wes/v1` | `/api/ga4gh/v1` |   `/v1` | `/ga4gh/drs/v1` |

As you can see in the above table, they are different based on the service.

### URL Conflict

The following URLs have the same resource-name, but are served from different path based on the service name. TRS uses `/metadata`, which is meant to provide similar information as `/service-info`

|| WES | TRS | TES | DRS |
| -- | -- | -- | -- | -- |
|BasePath| `/ga4gh/wes/v1` | `/api/ga4gh/v1` | `/v1/tasks` | `/ga4gh/drs/v1` |
| path | `/service-info` | `/metadata` | `/service-info` | `/service-info` |

These URLs should be standardized across the services and potentially merged and made hostname specific instead of service specific.

### Content-Type header misuse

Some services for example _DRS_, _TRS_ and _WES_ require the _content-type_ header by default. Because of this any _GET_ request also requires the _content-type_ header even though there is no payload/body.

When using swagger-ui to send the _GET_ request, it omits the content-type header. And this can result in _HTTP 415 Unsupported Media Type_ errors. The swagger generated server must be modified manually to make the _content-type_ header optional. It’s not typical to require the _content-type_ in these cases and should be removed from the openApi spec.

### Tags

The tags specified in the openApi spec are inconsistent.

|| WES | TRS | TES | DRS |
| -- | -- | -- | -- | -- |
|tags|WorkflowExecutionService|GA4GH|TaskService|DataRepositoryService|

This is a minor and mostly cosmetic change. But will make the Swagger UI more usable out of the box.

branch_name: refs/heads/develop

gha_language: Python


text:
# veles.simd
Various mathematical routines with SIMD acceleration (SSE/AVX/NEON) in the form of a compact C library.
Designed without any OS portability in mind, tested only on Linux. Can work on BSD/Darwin after some potentially minor adaptation. Supports Android build / bionic.

### Implemented features

*  Conversion between int16_t, int32_t and float
*  Parts of BLAS levels 1, 2, 3 with a completely different API (e.g., matrices, vectors, scalars)
*  1D convolution and correlation with best approach detection (naive, overlap-save, FFT)
*  1D peak detection
*  sin, cos, log, exp (delegated to [AVX mathfun](http://software-lisc.fbk.eu/avx_mathfun/) and [NEON mathfun](http://gruntthepeon.free.fr/ssemath/neon_mathfun.html))
*  1D and 2D normalization
*  1D decimated and stationary (undecimated) wavelets

### Building
```
./autogen.sh
mkdir build && cd build
../configure
make -j$(getconf _NPROCESSORS_ONLN)
make test
make install DESTDIR=...
```

By default, this library makes use of [FFTF](https://github.com/Samsung/FFTF).
You can pass ``--disable-simd-fftf`` to ``configure`` to skip building dependent features.

### Copyright
Copyright © 2013 Samsung R&D Institute Russia

### License
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0).

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Erigeron foliosus var. stenophyllus (Nutt.) A.Gray VARIETY

#### Status
SYNONYM

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

#### Published in
W. H. Brewer et al. , Bot. California 1:330. 1876 "<I>stenophyllum</I>"

#### Original name
null

### Remarks
null

repository: mdoering/backbone

path: /life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Erigeron/Erigeron foliosus/ Syn. Erigeron foliosus stenophyllus/README.md

repo_name: mdoering/backbone


text:
---
title: Brainhack Marburg
event: Brainhack Marburg
event_url: https://brainhack-marburg.github.io/

location: Somewhere on the planet
address:
  street:
  city:
  region:
  postcode:
  country:

summary: "Educational activities in neurosciences with focus on open science procedures."
abstract: " "

# Talk start and end times.
#   End time can optionally be hidden by prefixing the line with `#`.
date: "2020-11-30T13:00:00Z"
date_end: "2020-12-11T15:00:00Z"
all_day: true

# Schedule page publish date (NOT event date).
publishDate: "2020-09-01T00:00:00Z"

authors: []
tags: []

# Is this a featured talk? (true/false)
featured: false

image:
  caption: 'Image credit: [**Brainhack Marburg**](https://brainhack-marburg.github.io/)'
  focal_point: center

links:
- icon: globe
  icon_pack: fas
  name: Website
  url: https://brainhack-marburg.github.io/
- icon: twitter
  icon_pack: fab
  name: Follow
  url: https://twitter.com/OpenScienceUM
# - icon: video
#   icon_pack: fas
#   name: Streaming
#   url: https://meet.jit.si/bhg2020-ny

- icon: mattermost
  icon_pack: custom
  name: Mattermost Channel
  url: https://mattermost.brainhack.org/brainhack/channels/brainhack-marburg

# 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 = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects:
# - project_84

# Enable math on this page?
math: true
---

Brainhack is a unique event format that convenes researchers from across the globe and a myriad of disciplines to work together on innovative projects related to neuroscience. Brainhack is a platform where researchers from all educational/professional levels (from undergrad students to professors) work together and participate in open collaboration. Regional Brainhack events keep the momentum going throughout the year.

In 2020, a local Brainhack event is being organized from researchers of the Philipps-University Marburg, collaborating interdisciplinary (mainly, departments of psychology, german language and literature and medicine). 2020 being 2020, this year’s Brainhack will be held 100% virtual, which makes it possible to participate and collaborate from anywhere on earth.

The Marburg Brainhack 2020 will focus on educational activities, basing the core values of the Brainhack global community: the application of open, accessible, and transparent science practices (“open science”). We will provide talks and workshops on methods and are looking forward to an exciting exchange of knowledge and ideas. Given the complexity of the field with rapidly emerging approaches and tools to learn and put in practice, we hope that our local Brainhack event contributes to create an organic environment to initiate and encourage quick adoption of these new approaches.

In addition to the educational activities, participants are welcome to initiate projects to work and collaborate together with other researchers. No requirements exist on what constitutes a valid project. Project proposals could constitute a vague idea on a given topic of interest or a fully developed plan. Intensive project involvement contributes to participants’ skills development, so igniting a project without polished outcomes is common and completely accepted.

We want to enable researchers with children to completely participate in the Brainhack Marburg. That is why we are particularly pleased to be able to pay for your private child care during the Brainhack, due to the fantastic funding of the UMR vernetzt programme of the Philipps-University Marburg.

license: MIT


text:
# Running your first Container

Now we have created our image, its time to spin up a container with our *my_tomcat:latest* image and see our containerized tomcat application in action.

To create a new container with our image execute the below command :

```
sudo docker run -d -p 8080:8080 --name tomcat_container my_tomcat:latest
```

This command will start a new container with your tomcat running. But before checking out other things, lets first understand the command.

```
sudo docker      : will call the docker process {you already knew it ;)}
run              : this command starts up the container.
-d               : to spinup the container in detached mode (or we can say container will keep on running in background as a service)
-p               : for port mapping <hostPort>:<containerPort>, because you can not directly access container, so mapping is required
--name           : option to give name to the container for future reference.
tomcat_container : name of the container
my_tomcat:latest : image name from which you want to spinup a container.
```

The output of the above command will be a number, which is the docker container id which can be used in future to perform actions on that container.

Now your docker container is up and running, you can verify that by executing the following command :

```
sudo docker ps
```

This will list all the active and running containers on the host.

Now lets check if your tomcat app is running fine or not.

```
curl http://localhost:8080
```

This command should give you the output of sample tomcat page.

Also, you can try to check with the IP of the host node in the browser of some other machine which is in the same network.

    > http://<IP of the host node>:8080

:+1: We have successfully created and deployed a dockerized tomcat server.

Next : [Conclusion](https://github.com/vipul-gupta13/docker/blob/master/docs/conclusion.md)


text:
---
title: Serenity 3.4.1 Is Out!
description: Serenity 3.4.1
slug: serenity-3.4.1-release
authors: [wakaleo]
tags: [reporting, locatorless-elements, selenium-4]
image: data-driven-results.png
hide_table_of_contents: false
---

Serenity BDD is one of the most popular Java test automation libraries, and for good reason!

If you are writing automated web tests in Java, using Serenity BDD correctly can reduce the amount of code you need to write by well over 50%, slashing the amount of code you need to maintain yourself. Serenity BDD produces powerful test reports that you can use both as as evidence of your testing activities and documentation of your application. And with over a million downloads a month, regular releases and a vibrant open source community, it's a solid bet for your test automation framework!

In this article, we look at some of the new features in Serenity BDD version 3.4.2.

<!--truncate-->
## Selenium 4.6.0 Integration
Serenity 3.4.2 integrates with [Selenium 4.6.0](https://www.selenium.dev/blog/2022/selenium-4-6-0-released/), which includes a number of new features. One of the more interesting is it's ability to automatically download the correct driver binaries for whatever browser you are using. Serenity currently does this using WebDriverManager, but as this feature is now build into Selenium, the Serenity WebDriverManager integration is now disabled by default and will be removed in a future version.

## Improved Reporting For Data-Driven Tests

Test results for data-driven tests (parameterized tests in JUnit and Scenario Outlines in Cucumber) are now reported individually, giving a more precise view of the test status:

![](data-driven-results.png)

## Standardised naming

To avoid confusion in the summary views, the reports now adopt a more conventional definition of scenarios and test cases for data-driven tests. _Scenario_ refers to the scenario outline or overall test, whereas _Test Case_ refers to a specific execution of a scenario with a specific set of test data.

![](scenarios-and-test-cases.png)

## Want to learn more?
There are several courses on Serenity BDD in the **[Serenity Dojo Training Library](https://expansion.serenity-dojo.com)**, including
* **[Write Better Automated Tests Faster With Serenity BDD, Cucumber and The Screenplay Pattern](https://expansion.serenity-dojo.com/courses/serenity-and-the-screenplay-pattern)** - a free deep-dive course into writing scalable, maintainable tests with Serenity BDD and the Screenplay pattern
* **[Effective UI Test Automation With Serenity BDD and Selenium](https://expansion.serenity-dojo.com/courses/testing-web-applications-with-serenity-bdd)** - learn the fundamentals of web testing with Serenity BDD in this very detailed course.
* **[Next-generation Automated Acceptance Tests With Serenity Screenplay](https://expansion.serenity-dojo.com/courses/writing-more-sustainable-tests-with-the-screenplay-pattern)** - Learn everything you need to know to master scalable test automation with the powerful Screenplay pattern.
* **[Testing REST APIs with Serenity BDD and RestAssured](https://expansion.serenity-dojo.com/courses/testing-rest-apis-with-serenity-bdd)** - Learn how to test REST web services in Serenity BDD.

gha_language: HTML


text:
---
breadcrumbs:
- - /developers
  - For Developers
- - /developers/design-documents
  - Design Documents
page_name: first-run-customizations
title: First Run Customizations
---

Chromium can be customized to perform certain behaviors during its first run.
The key to it is a special file named ***master_preferences*** that must exist
before chrome first run in the same folder as the chrome.exe binary.

The master_preferences file is a text file of JSON format, which needs to
contain some specific name/value pairs. A prototypical file is shown here (for a
more exhaustive list consult the [source
code](http://src.chromium.org/viewvc/chrome/trunk/src/chrome/installer/util/master_preferences.h?view=markup)
directly):

{

"homepage" : "http://www.chromium.org",

"homepage_is_newtabpage" : false,

"distribution": {

"create_all_shortcuts": true,

"import_history": false,

"import_bookmarks": false,

"import_home_page": false,

"import_search_engine": false,

"do_not_launch_chrome": false

},

"first_run_tabs": \[

"http://example.com",

"http://welcome_page",

"http://new_tab_page"

\]

}

There is one dictionary, called "distribution" and one list, called
"first_run_tabs". Setting the home page behavior is done outside of these.

The home page settings control the following behaviors:

*   homepage: when set, this is the URL opened as the home page (see
            setting below.)
*   homepage_is_newtabpage: if set to false, clicking the 'home' button
            or taking actions that send the user 'home' will open the home page
            instead of the new tab page.

The distribution dictionary controls the following behaviors:

*   create_all_shortcuts: if set to true, the desktop, quick-launch and
            start menu shortcuts are created without user intervention.
*   import_history: if set to true it automatically imports the browser
            history from the current default browser.
*   import_bookmarks: if set to true it automatically imports the user's
            bookmarks from the current default browser.
*   import_home_page: if set to true it automatically imports the user's
            home page from the current default browser.
*   import_search_engine: if set to true it automatically imports the
            user's search engine setting from the current default browser.
*   do_not_launch_chrome: if set to true, per-user Chromium will not
            automatically launch after it is installed (per-machine Chromium
            never auto-launches after install).

The first_run_tabs list controls the set of urls that are displayed in chromium
when first run. If you want the default behavior the entire section can be
removed. Each entry can be a standard url or you can use these special names to
display special tabs:

*   "http://welcome_page" : shows the default welcome page for the
            current locale.
*   "http://new_tab_page" : shows the new tab page. Which contains the
            thumbnails of the favorite pages.

repository: iridium-browser/iridium-browser

repo_name: iridium-browser/iridium-browser


text:
Dockerized Flarum with Russian localization
===========================================

This repository contains a Dockerfile for building [firegurafiku/flarum][1]
image. It's an attempt to containerize Flarum forum application (written in
modern PHP) and a bunch of its extensions with Nginx, PHP-FPM and everything
else which is required for the forum to run (except a database server).

[1]: https://hub.docker.com/r/firegurafiku/flarum/

Example deploy
--------------

You don't have to rebuild anything from source if you want to deploy
an unmodified image. Just pull one from DockerHub, as well as a MariaDB
instance. You may use the following script to get a running forum in
seconds, but don't forget to adjust your settings:

    #!/bin/sh
    set -o nounset
    set -o errexit

    # --- Adjust options here. ---
    # Please, avoid using backslashes and quotes in these variables,
    # or envsubst-based templating may fail. You should really adjust
    # only the "<here>" entries.
    networkName="flarum-network"
    mariadbContainerName="flarum-mariadb"
    mariadbDatabaseName="flarum"
    mariadbDatabaseUser="flarum"
    mariadbDatabasePass="<here>"
    flarumContainerName="flarum"
    flarumHostname="localhost"
    flarumPerformInstall="yes"
    flarumDatabasePrefix=""
    flarumAdminName="admin"
<EMAIL_ADDRESS>    flarumAdminPass="<here>"

    # --- Let's go. ---

    sudo docker network create "$networkName"

    sudo docker run \
        -e MYSQL_DATABASE="$mariadbDatabaseName" \
        -e MYSQL_USER="$mariadbDatabaseUser" \
        -e MYSQL_PASSWORD="$mariadbDatabasePass" \
        -e MYSQL_ROOT_PASSWORD="$mariadbDatabasePass" \
        --net="$networkName" \
        --net-alias="$mariadbContainerName" \
        --name "$mariadbContainerName" \
        --detach \
                mariadb

    echo "Waiting for MariaDB to initialize (30 sec)..."

repository: firegurafiku/flarum-dockerfile

repo_name: firegurafiku/flarum-dockerfile


text:
---
id: purchase-a-bot
title: How to Purchase a Premium Bot
sidebar_label: How to Purchase a Premium Bot
---

Hey there! Thanks for taking interest in ordering a bot from Stryx, we're so grateful that you wish to order from us!

Sadly, we have had to suspend Sellix payments. Please contact us on Discord if you would like to purchase a bot.

---

### Payment

1 month plan - This is our most common plan! It provides you 30 days with our custom bot. For the low price of $3!

6 Month Plan - This plan will grant you 6 months with our bot! It's only $10, meaning you're saving $7!

12 Month Plan - This is the best plan we offer as you save the most amount of money! For the price of $15, you're allowed 12 months with our customizable bot! Therefore, you're saving $10, incredible!

---

Thank you again for taking interest in our services! If you have any questions, feel free to contact us via live chat, or on Discord!

license: Unlicense

repository: kvyuaiss/StryxVortexCode

branch_name: refs/heads/main

repo_name: kvyuaiss/StryxVortexCode


text:
Setting up your Editor or IDE to work on Grapl
==============================================

Here, we document tips for setting up various editors and IDEs for
efficiently working on the Grapl codebase. The presence of a
particular tool here is not an endorsement. Similarly, the absence of
a tool doesn't mean it can't be used. This is just an informative
document to help new contributors quickly get up to speed.

These configurations are not necessarily complete (this document is a
work in progress), and they are not necessarily the _only_ way these
tools can be configured. They are, however, configurations that work.

If you have configuration instructions for an editor or IDE not
covered here, please feel free to submit a
[PR](https://github.com/grapl-security/grapl/pulls)!

# Visual Studio Code

[Link][vsc]

## Rust Configuration

For Rust, the [Rust Analyzer Plugin][ra_vsc] is recommended.

Of particular note are the `checkOnSave` and `rustfmt` override
commands. As with many Rust projects, we still use [rustfmt][rustfmt],
[clippy][clippy], and `cargo check` for formatting and linting, but
the specific configurations are encapsulated into custom scripts that
we also use in CI. By also using them in an editor, we can ensure a
consistent experience for all uses of these tools.

Add the following to your workspace settings:

``` json
    "settings": {
        "editor.formatOnSave": true,
        "editor.formatOnPaste": true,
        "[rust]": {
            "editor.defaultFormatter": "matklad.rust-analyzer",
        },
        "rust-analyzer.linkedProjects": [
            "src/rust/Cargo.toml"
        ],
        "rust-analyzer.checkOnSave.enable": true,
        "rust-analyzer.checkOnSave.overrideCommand": [
            "/path/to/your/grapl/repo/src/rust/bin/lint",
            "json"
        ],
        "rust-analyzer.rustfmt.overrideCommand": [
            "/path/to/your/grapl/repo/src/rust/bin/format",
            "--editor"
        ]
    }
```

## Protobuf Configuration

We use [buf][buf] to lint our Protobuf definitions. The tool can be
downloaded from [the Github Releases page][buf_release], or by using
the [etc/install_buf.sh](./etc/install_buf.sh) script in this
repository.

The tool itself is configured via [buf.yaml](./buf.yaml).

As long as the binary is present in your `$PATH`, the [buf Visual Studio
Code plugin][buf_vsc] will automatically lint your Protobuf files
according to our configuration.

[vsc]: https://code.visualstudio.com/
[ra_vsc]: https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer
[clippy]: https://github.com/rust-lang/rust-clippy
[rustfmt]: https://github.com/rust-lang/rustfmt
[buf]: https://buf.build
[buf_release]: https://github.com/bufbuild/buf/releases
[buf_vsc]: https://marketplace.visualstudio.com/items?itemName=bufbuild.vscode-buf

repository: CLEAR-seclab/grapl

repo_name: CLEAR-seclab/grapl


text:
---
title: 'Chapter 3: Deep Learning fundamentals'
description:
  'This chapter will introduce the deep learning fundamentals'
prev: /chapter2
next: /chapter4
type: chapter
id: 3
---

<exercise id="17" title="What is a neural network" type="slides">

<slides source="chapter3_01_neural_networks">
</slides>

</exercise>

<exercise id="18" title="Questions about neural networks">
<choice id=1>

<opt text="Were inspired by the human brain" correct="true">

Correct!

</opt>

<opt text="During the AI Winter most AI techniques were developed">

This is not the correct answer

</opt>

<opt text="Neural networks are highly linear functions">

This is not the correct answer

</opt>
</choice>

<choice id=2>
<opt text="Gradient descent is used to minimize the loss function" correct="true">

Correct!

</opt>

<opt text="Backpropagation is used for prediction">

This is not the correct answer

</opt>

<opt text="Feed-forward is used for updating the weights in the network">

This is not the correct answer

</opt>
</choice>

</exercise>

<exercise id="19" title="Hands on - coding a neural network">

 Use a neural network with two hidden layers with 10 and 20 neurons and 10 possible output classes. The task is a multi-class problem. The input size of the images is 32 by 32 pixels.

<codeblock id="03_01">

Multi-class problem require a special activation function.

</codeblock>

</exercise>

<exercise id="20" title="Dropout" type="slides">

<slides source="chapter3_02_dropout">
</slides>

</exercise>

<exercise id="21" title="Questions about dropout">
<choice id=1>

<opt text="Dropout increases the variance of the model" >

This is not correct!

</opt>

<opt text="Dropout can decrease the risk of overfitting" correct="true">

Correct!

</opt>

<opt text="Dropout increase the risk of overfitting">

This is not the correct answer

</opt>
</choice>

<choice id=2>
<opt text="With dropout different versions of the network are trained" correct="true">

Correct!

</opt>

<opt text="Dropout deletes completley neurons from the network">

This is not the correct answer

</opt>

<opt text="Dropout deletes layers from the network">

This is not the correct answer

</opt>
</choice>

</exercise>

<exercise id="22" title="Play with the code I">
	Use the Notebook provided in the Github to try out HOG as a feature extractor combined with a Machine Learning Algorithm. What is the performance in F1 and accuracy?
</exercise>

<exercise id = "23" title="Play with the code II">
	In the notebook use the implementation of the perceptron. Vary the learning rate and epochs and test the accuracy on the dataset. What do you notice?
</exercise>

<exercise id="24" title="Play with the code III">
	Use the Notebook provided in the Github and try out different settings for the Dense Neural network. Vary the number of hidden layers, the number of perceptrons per layer, activation functions, learning rates, batch sizes. What do you notice? Compare the performance to the ML Models with HOG/Edge Detection?
</exercise>

<exercise id="25" title="Play with the code IV">
	Create a new model and test different parameters for the dropout layer.
</exercise>


text:
Reporting Issues and Making Pull Requests
====

Issue Reports
----
Issue reports are welcome, but before you report an issue, please have a look though the existing [issues](https://github.com/mikebrady/shairport-sync/issues), both open and closed, and check for hints in the [TROUBLESHOOTING](TROUBLESHOOTING.md) page.

It would be great to give some details of the device and version of Linux or FreeBSD in use along with the version of Shairport Sync you are using. Use:
```
$ shairport-sync -V
```
Then, if possible, some diagnostic information from the log or logfile would be useful.

If your system uses `systemd`, as most recent Linuxes do, try using:
```
$ sudo systemctl status shairport-sync
```
You might get something like this:
```
● shairport-sync.service - Shairport Sync - AirPlay Audio Receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-11-29 08:52:47 GMT; 3s ago
 Main PID: 19812 (shairport-sync)
    Tasks: 10 (limit: 4915)
   Memory: 2.0M
   CGroup: /system.slice/shairport-sync.service
           └─19812 /usr/local/bin/shairport-sync

```

If so, please paste it in as code (see below) the output into your message.

In general, a log verbosity of 2 is adequate (`-vv`, or the relevant entry in the configuration file), and it's usually helpful if statistics have been enabled (`--statistics` on the command line, or the relevant entry in the configuration file).

If you are pasting in code or a log file, format it as code by preceding it and following it with a line containing exactly three backquotes and nothing else ([see here](https://guides.github.com/features/mastering-markdown/) for more on formatting):

\`\`\`
```
code or log file entries
```
\`\`\`

Pull Requests
----
If you would like to contribute to the development of Shairport Sync, please make you changes to the `development` branch and make a pull request.

Changes and additions in the development branch make their way eventually to the `master` branch.

repository: mikebrady/shairport-sync

path: /REPORTING ISSUES.md

filename: REPORTING ISSUES.md

gha_language: C

gha_license_id: NOASSERTION

repo_name: mikebrady/shairport-sync


text:
# Book Tracker

## About

Book Tracker is an interactive platform that will allow you to easily keep track of books you have read. By creating an account you are able to create/edit/delete posts that contain details about the books you're reading. Beyond creating a list of books read, you can also enter a reading goal and see how your books read compares to your goal.

## Install Instructions

In order to use this database, clone the repository in your terminal with the following:

`git@github.com:matthewxvoorhees/kids-book-tracker.git`

Then use the "shotgun" command in your terminal to start up a local server. Enter your web browers an enter http://localhost:9393/. Then interact as normal.

## License
This database is available as open source under the terms of the MIT License.

repository: matthewstclaire/kids-book-tracker

repo_name: matthewstclaire/kids-book-tracker


text:
# js-multihashing-async

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)
[![Coverage Status](https://coveralls.io/repos/github/multiformats/js-multihashing-async/badge.svg?branch=master)](https://coveralls.io/github/multiformats/js-multihashing-async?branch=master)
[![Travis CI](https://img.shields.io/travis/multiformats/js-multihashing-async.svg?style=flat-square&branch=master)](https://travis-ci.org/multiformats/js-multihashing-async)
[![Circle CI](https://circleci.com/gh/multiformats/js-multihashing-async.svg?style=svg)](https://circleci.com/gh/multiformats/js-multihashing-async)
[![Dependency Status](https://david-dm.org/multiformats/js-multihashing-async.svg?style=flat-square)](https://david-dm.org/multiformats/js-multihashing-async) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)
[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/ipfs-js-mh-async.svg)](https://saucelabs.com/u/ipfs-js-mh-async)

> Use all the functions in [multihash](https://github.com/multiformats/multihash).

#### Wait, why, how is this different from Node `crypto`?

This module just makes working with multihashes a bit nicer.
[js-multihash](//github.com/multiformats/js-multihash) is only for
encoding/decoding multihashes, and does not depend on other libs.
This module will depend on various implementations for each hash.
It currently uses `crypto` and [`sha3`](https://github.com/phusion/node-sha3) in Node.js.
In the browser [`webcrypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto)
and [`browserify-sha3`](https://github.com/wanderer/browserify-sha3) are used.

## Table of Contents

* [Table of Contents](#table-of-contents)
* [Install](#install)
  + [In Node.js through npm](#in-nodejs-through-npm)
  + [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)
  + [Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag)
    - [Gotchas](#gotchas)
* [Usage](#usage)
* [Examples](#examples)
  + [Multihash output](#multihash-output)
* [API](#api)
* [Maintainers](#maintainers)
* [Contribute](#contribute)
* [License](#license)

## Install

### In Node.js through npm

```bash
$ npm install --save multihashing-async
```

```js
const multihashing = require('multihashing-async')
```

### Use in a browser with browserify, webpack or any other bundler

The code published to npm that gets loaded on require is in fact a ES5 transpiled
version with the right shims added. This means that you can require it and use with
your favourite bundler without having to adjust asset management process.

```js
const multihashing = require('multihashing-async')
```

### Use in a browser Using a script tag

Loading this module through a script tag will make the `multihashing` obj
available in the global namespace.

```html
<script src="https://unpkg.com/multihashing-async/dist/index.min.js"></script>
<!-- OR -->
<script src="https://unpkg.com/multihashing-async/dist/index.js"></script>
```

#### Gotchas

You will need to use Node.js `Buffer` API compatible, if you are running inside the browser, you can access it by `multihashing.Buffer` or you can install Feross's [Buffer](https://github.com/feross/buffer).

## Usage

```js
const multihashing = require('multihashing-async')
const buf = new Buffer('beep boop')

multihashing(buf, 'sha1', (err, multihash) => {
  // by default calls back with a multihash.
})

// Use `.digest(...)` if you want only the hash digest (drops the prefix indicating the hash type).
multihashing.digest(buf, 'sha1', (err , digest) => {
  // digest is the raw digest
})

// Use `.createHash(...)` for the raw hash functions
const h = multihashing.createHash('sha1')
h(buf, (err, digest) => {
  // digest is a buffer of the sha1 of buf
})
```

## Examples

### Multihash output

```js
> const multihashing = require('multihashing-async')
> const buf = new Buffer('beep boop')

> multihashing(buf, 'sha1', (err, mh) => console.log(mh))
// => <Buffer 11 14 7c 83 57 57 7f 51 d4 f0 a8 d3 93 aa 1a aa fb 28 86 3d 94 21>

> multihashing(buf, 'sha2-256', (err, mh) => console.log(mh))
// => <Buffer 12 20 90 ea 68 8e 27 5d 58 05 67 32 50 32 49 2b 59 7b c7 72 21 c6 24 93 e7 63 30 b8 5d dd a1 91 ef 7c>

> multihashing(buf, 'sha2-512', (err, mh) => console.log(mh))
// => <Buffer 13 40 14 f3 01 f3 1b e2 43 f3 4c 56 68 93 78 83 77 1f a3 81 00 2f 1a aa 5f 31 b3 f7 8e 50 0b 66 ff 2f 4f 8e a5 e3 c9 f5 a6 1b d0 73 e2 45 2c 48 04 84 b0 ...>
```

## API

https://multiformats.github.io/js-multihashing-async/

## Maintainers

Captain: [@diasdavid](https://github.com/diasdavid).

## Contribute

Contributions welcome. Please check out [the issues](https://github.com/multiformats/js-multihashing-async/issues).

Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## License

[MIT](LICENSE) © 2016 Protocol Labs Inc.

repository: chrismatthieu/ipfs-iot

repo_name: chrismatthieu/ipfs-iot


text:
# Changelog

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

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

## [6.0.0] - 2022-10-01

### Changed

- Only support Node.js 14 or newer

## [5.0.0] - 2021-12-11

### Changed

- Only support Node.js 12 or newer

### Fixed

- `tree` example in README (#38)

## [4.0.2] - 2021-02-28

### Changed

- Updated README, LICENSE and dependencies

## [4.0.1] - 2020-05-10

### Fixed

- Empty file content throws error

## [4.0.0] - 2020-03-20

### Changed

- Updated dependencies
- Only support Node.js 10+
- Test with Node.js 10 and 12

## [3.0.0] - 2018-08-25

### Changed

- Improved JSDoc annotation
- Removed `prepublish` script from `package.json`
- Only support Node.js 8+

### Fixed

- Assert parameter order in tests

## [2.0.4] - 2017-08-08

### Added

- Added a changelog

### Changed

- Ignore `yarn.lock` and `package-lock.json` files

repository: electerious/fsify

gha_language: JavaScript

gha_license_id: MIT

repo_name: electerious/fsify


text:
# code with detailed descriptions:
url= input("Enter the url:\n")
# url is inputted from the user
response = urllib.request.urlopen(url)
# request to open the url and handles the response
data = json.loads(response.read().decode())
# reads and loads the data in the url and decodes it then  stores to a variable
investrs=set([])
# unorder data type collection which is iteratable and has no duplicates which is done to use union(mathematical function) for sorting.
try:
    for i in range(1,len(data)+1):
  # for loop runs from 1 to length of data+1 size
      for x in data['Episode '+str(i)]:
  # x= data[Episode 1]  and the iteration goes on for all episodes
            s=x['investors'].replace('and',',')
   # replaces and with  comma and l contains the investors name
            s=s.split(',')
   # splits the the name of the investors as individual. Ex: ['Lori Greiner ', ' Robert Herjavec']
            for i in range(len(s)):
   # loop runs upto length of l
                s[i]=s[i].strip('\n').lstrip().rstrip()
   # removes all ‘\n’ in leadind and end of the string
   # for loop ends
            investrs=investrs.union(s)
   # all investors name is union and created as a set
    investrs.remove('')
   # Removes double quotes
    ab = {e:[] for e in investrs}
   # loop runs through the set invest created by getting the name of each investors
    for i in range(1,len(data)+1):
   # inner loop runs from 1 to length of data+1
        for x in data['Episode '+str(i)]:
  # loops through each episode
            sample=x['investors']
   # investors in original data is fetched
            for i in ab:
                if i in sample:
  # compares the value of  original data (i) and created set invest(oo)
                    ab[i].append(x['product'].lstrip().rstrip().strip('\n'))
   # appends the products of the investors
    for k in sorted(oo, key=lambda k: len(oo[k]), reverse=true):
   # sorting function: sorts based on the length of investor’s product
        print (str(k)+"  : "+str(ab[k]))
   # prints the  investors name whos has invested in maximum number and their product of investments.
        print("\n")
except (ValueError, KeyError, TypeError):
    print("JSON format error")

repository: Saranyals/backendtask

repo_name: Saranyals/backendtask


text:
# Basic Cryptography

Cryptography is a way of obfuscating(hiding) plain text messages usually using some form of algorithm.

Some Basic Cryptography ciphers are:

- Caesar(shift)
- Vigenere
- Substitution

These are now obselete due to the ease of cracking them, however some are still used for Low Point CTF crypto challenges.

This would fall under cybersecurity, but also software due to needing software to crack some of these.

repository: jhssac-master/intro-to-cs

repo_name: jhssac-master/intro-to-cs


text:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="78" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="78" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h47v20H0z"/><path fill="#97ca00" d="M47 0h31v20H47z"/><path fill="url(#b)" d="M0 0h78v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="245" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">license</text><text x="245" y="140" transform="scale(.1)" textLength="370">license</text><text x="615" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">MIT</text><text x="615" y="140" transform="scale(.1)" textLength="210">MIT</text></g> </svg>

# temp_markdown

### shields.io

for npm:

https://img.shields.io/badge/license-MIT-green

Copyright [2019][chad conway]

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.


text:
---
layout: post
title: Indian Loksabha - Member Qualification
customjs: https://online.tableau.com/javascripts/api/tableau-2.0.0.min.js
excerpt: Indian polititians usually have a bad reputation when it comes to their education qualifications. So I was wondering if there is some way to summarize that info. This is what I found, and it, in my view, contradicts the usual opinion.
---
Indian polititians usually have a bad reputation when it comes to their education qualifications. So I was wondering if there is some way to summarize that info. This is what I found, and it, in my view, contradicts the usual opinion.

The data for this infograph comes from the [this site](http://<IP_ADDRESS>/LssNew/Members/breif_alphalist.aspx). I plotted it using [Tableau Public](https://public.tableau.com/s/).

How I extracted the info and how I made this infograph will come in another post.

Please do share your views!


text:
# PunyLinux

Build automation (powered by Ruby & Rake) for a very minimal Linux system.

* Package Management
  * Aquire package sources (packages defined with DSL in files within `pkg/`)
    * Optionally verify package checksum
      * Download/Write the checksum to file
      * Verify with `sha256sum`
    * Optionally verify package sources by signature
      * Download/Write the signature to file
      * Verify with `gpg`
  * Decompress package sources
  * Build package sources
  * Install packages
* Image Management
  * Generate LINUX image
  * Generate ISOLINUX image

## Install

* Clone this project
* Install dependencies
* Change into the project directory
* Run `rake`

### Dependencies

* Ruby (tested on ruby 2.6.3p62)
* cUrl
* tar

#### Build Automation

You must install any development dependencies required to build all packages, such as:

* make
* cmake
* ninja
* meson
* etc.

#### Compressors

Since we are simply using `tar -xf` to decompress archives, simply install any compressor you would
like to support:

* gzip
* xz
* etc.

#### Image Generation

* syslinux
* cdrkit

## Usage

### Tasks

View all tasks with:

```
rake -T
```

To view every single file to be generated, use:

```
rake -T -A
```

### Package Management

Define any packages you would like to include within `pkg/` and run `rake pkg`.
All package sources will be aquired, optionally checksummed and verified by signature.
Each package will then be built and installed into the `build/root/os/` directory.

Packages are defined similarly to Rake files; within it's own Ruby DSL:

```rb
name      :package_name                                   # Package name
version   '1.2.3'                                         # Package version
archive   "https://example.org/#{name}-#{version}.tar.gz" # Archive source
signature "#{archive}.sig"                                # GPG signature source
checksum  "#{archive}.sha256"                             # Checksum source
files     %W(/bin/#{name} /etc/#{name}/config)            # Package install files

# on_check { |package| ... }                              # Callback to check this package's checksum
# on_verify { |package| ... }                             # Callback to verify this package's signature

on_build do |package|                                     # Callback to build this package
  sh <<~EOS
    cd '#{package.build_path}'
    ./configure
    make
  EOS
end

on_install do |package|                                   # Callback to install this package
  sh <<~EOS
    cd '#{package.build_path}'
    make DESTDIR'#{paths.os_root}' install
  EOS
end
```

#### Sources

Sources given for `archive`, `signature`, and `checksum` can be URI's or the contents of the source.
Paths can be given with the `file://` URI scheme.

#### Callbacks

When callbacks are not defined on a package they will not be run, with the exception of `on_check`
and `on_verify`. These are only called if their respective sources are also defined in the
specification. If they are defined, they are called *instead* of the default functionality.

#### Required Properties

The only required properties are `name`, `version`, and `archive`.

If there is an `on_install` callback defined, it is highly advised to properly define the `files`
list, as this is what hooks the package into the Rake task dependency graph.

The list of `files` defined on the package are the paths that will be installed onto a system when
the package is installed, relative to the system (i.e. root - `/`).

#### Linux Package

Only one package is required and it must be named `linux` and it must generate the following kernel:

```
build/root/os/boot/vmlinuz
```

### Image Management

An ISO9660 image can be generated from the resulting Linux root directory.

This processes generates an initial ramdisk (initrd), archived with `cpio` and compressed. We then
use ISOLINUX as a bootloader to load our kernel (built from the `linux` package). The kernel then
loads the initial ramdisk into memory as the root device using `initramfs` and loads `/sbin/init`.

As an example, PunyLinux is shipped with a BusyBox package specification which includes Linux core
utilities, including a simple init system. This package specification can be replaced/removed
as it is not a required package.

### Customization

Build configuration and paths can be setup by editing `Rakefile`

#### Tasks

The `Rakefile` loads all `tasks/**/*.{rake,rb}` files and you can freely edit these files or add
your own.

#### File System

Paths under `fs/` will be synced into the `build/root/os/` directory when building, any of which can
be freely modified.

If sticking with BusyBox, the init system runs `etc/init.d/rcS` after taking control. This is
currently our initialization script.

#### Bootloader

ISOLINUX can be configured by editing `src/isolinux.cfg`. This includes the kernel command
line options.

Note that you probably don't want to mess with `initrd`, `rdinit`, or `root` as this is what causes
`initramfs` to take over using the generated initial ramdisk.

## Contributing

1. Fork it (<https://github.com/RyanScottLewis/punylinux/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

- [Ryan Scott Lewis](https://github.com/RyanScottLewis) - creator and maintainer

repository: RyanScottLewis/punylinux

repo_name: RyanScottLewis/punylinux


text:
vector-representation
=========

[**KeLP**][kelp-site] is the Kernel-based Learning Platform developed in the [Semantic Analytics Group][sag-site] of
the [University of Roma Tor Vergata][uniroma2-site].

This is the vector-representation module of KeLP. It contains the representation such as DenseVector or SparseVector. These representations can be exploited both in linear and kernel-based algorithms.

The _DenseVector_ representation should be adopted in modeling dense feature vectors in a small feature space, like an embedding. It relies on [EJML][ejml-site] for an efficient implementation.

The _SparseVector_ representation is the best option for modeling sparse feature vector from high dimensional feature spaces, like a Bag-of-Words feature space. It relies on a hashmap implementation based on [TROVE][trove-site], in order to guarantee and efficient solution both from memory usage and computational perspectives.

[sag-site]: http://sag.art.uniroma2.it "SAG site"
[uniroma2-site]: http://www.uniroma2.it "University of Roma Tor Vergata"
[ejml-site]: https://code.google.com/p/efficient-java-matrix-library/ "EJML site"
[trove-site]: http://trove.starlight-systems.com/news "TROVE site"
[kelp-site]: http://sag.art.uniroma2.it/demo-software/kelp/

repository: SAG-KeLP-Legacy/vector-representation

repo_name: SAG-KeLP-Legacy/vector-representation


text:
---
layout: post
title: "HackIndia"
subtitle: Branding for India's first large scale hackathon for and by students
tags: branding
thumbnail: https://gyanl.com/assets/thumbs/hackindia.png
---

![HackIndia banner](https://gyanl.com/assets/hackindia.png)

###### The original website is no longer up, but there is an archive of the submissions at <https://hackindia.devpost.com/>

## About HackIndia

HackIndia was India's first large scale hackathon for students, organised by students. It brought together India's makers, designers, hackers and creators for a weekend of building cool things.

### Branding

As India's first student organised hackathon, the focus for the branding was the saffron and green from the Indian flag. The HackIndia wordmark also featured a flag over the i, which formed the centerpiece of the branding.

![The logo, color scheme, mascot and app icon.](https://gyanl.com/assets/hackindia-style-guide.png)

###### Logo, colors and typography

### Social media campaigns

HackIndia took place at a time when hackathons were only just starting to catch on in India, and there were still a lot of negative connotations associated with "hacking". As a result, the branding was designed to look as friendly as possible, and a lot of effort was put into making people aware of the concept of hackathons.

![Login and Resume upload](https://gyanl.com/assets/hackindia-who-is.jpg)

###### A personal attempt to defeat the brogrammer stereotype.

![Login and Resume upload](https://gyanl.com/assets/hackindia-shs.jpg)

###### Kids were signing up, so we kept things PG-13.

![Login and Resume upload](https://gyanl.com/assets/hackindia-people.jpg)

###### All of the social media posts were designed around the same template so they looked like a cohesive part of the design.

![Login and Resume upload](https://gyanl.com/assets/hackindia-poster.jpg)

###### Print poster for the event.

![Login and Resume upload](https://gyanl.com/assets/hackasleep.png)

###### My personal favorite : a graphic for an announcement about the nap area at the hackathon.

### The Event

At HackIndia 2015, we brought together some of the nation’s best artists, designers, creators, inventors and leaders of tomorrow. It was a pretty successful event (some organisational mishaps aside) and everyone took away a lot from the event.

<iframe class="embed" width="720" height="405"  src="https://www.youtube.com/embed/hybsfnLjdck" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


text:
# Introduction

NaiveNASflux is an extension of [NaiveNASlib](https://github.com/DrChainsaw/NaiveNASlib.jl) which adds primitives for [Flux](https://github.com/FluxML/Flux.jl) layers so that they can be used in a computation graph which NaiveNASlib can modify. Apart from this, it adds very little new functionality.

## Reading Guideline

Due to how NaiveNASflux just glues Flux and NaiveNASlib, most of the things one can use NaiveNASflux for is described in the [documentation for NaiveNASlib](https://DrChainsaw.github.io/NaiveNASlib.jl/stable).

The [Quick Tutorial](@ref) gives an overview of some basic operations while the [Model Pruning Example](@ref) show simple usage without bringing in full fledged neural architecture search.

The API reference is split up into categories in an attempt to make it easy to answer "how do I achieve X?"-type questions.

gha_language: Julia


text:
# Installation
> `npm install --save @types/jasmine-jquery`

# Summary
This package contains type definitions for Jasmine-JQuery (https://github.com/velesin/jasmine-jquery).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jasmine-jquery

Additional Details
 * Last updated: Mon, 05 Nov 2018 22:48:01 GMT
 * Dependencies: jasmine, jquery
 * Global values: appendLoadFixtures, appendLoadStyleFixtures, appendSetFixtures, appendSetStyleFixtures, getJSONFixture, jasmine, loadFixtures, loadJSONFixtures, loadStyleFixtures, preloadFixtures, preloadStyleFixtures, readFixtures, sandbox, setFixtures, setStyleFixtures, spyOnEvent

# Credits
These definitions were written by Gregor Stamac <https://github.com/gstamac>.

repository: cronqvist/fullcalendar

repo_name: cronqvist/fullcalendar


text:
# Migrate gelu activation from TensorFlow Addons to TensorFlow Core

| Status      | Accepted                                                                                |
| :---------- | :------------------------------------------------------------------------------------------------- |
| **RFC #**   | [252](https://github.com/tensorflow/community/pull/252) |                                       |
| **Authors** | Tzu-Wei Sung (@WindQAQ) & Sean Morgan (@seanpmorgan) |
| **Sponsor** | @alextp   |
| **Updated** | 2020-07-15 |
| **Sponsorship Deadline** | 2020-07-17 (45 Days after submission)  |

## Rationale for Migration
* [Gaussian Error Linear Units (GELUs)](https://arxiv.org/pdf/1606.08415.pdf) cited 600+ times
* Used in BERT and other influential architectures
* Multiple approvals from TF side:
    * https://github.com/tensorflow/tensorflow/pull/33945#issuecomment-617832325
    * https://github.com/tensorflow/tensorflow/issues/32783#issuecomment-537284266

## Historical Information
* Have there been signifiant issues reported to Addons that need to be adressed?
    * Only ABI incompatibilities for the custom-op (not an issue if built along with core TF)
* When was it implemented in Addons?
    * C++ custom-op added **2019-08-2019 (TFA 0.5.0)**
    * Python composite op added **2020-02-26 (TFA 0.9.0)**
* We have [performed benchmarking of the GELU activation](https://colab.research.google.com/drive/1rLb4EuydbFg9PbhboXhCDqopcl6BmphG#scrollTo=0GL2x2S4zxW3)
which shows it may be beneficial to retain the custom-ops, but the maintence burden has grown
to much for us to continue to support it in Addons.
* This migration is long over-due but we've struggled with finalizing the migration process.

## Implementation Details
* Link to implementation in Addons:
    * Python: https://github.com/tensorflow/addons/blob/r0.10/tensorflow_addons/activations/gelu.py
    * C++ : https://github.com/tensorflow/addons/blob/r0.10/tensorflow_addons/custom_ops/activations/cc/kernels/gelu_op.h
* Does this include custom-op kernels?
    * Yes, but currently proposing to just migrate the python composite op. This may
    change with discussion in the RFC.
    * Are they CPU/GPU/TPU compatible?
        * CPU/GPU compatible. No support for TPU.
* What is the pytest coverage of the addon?
    * `tensorflow_addons/activations/gelu.py 89%`
## Changes to Implementation (If Needed)
```
def gelu(x: types.TensorLike, approximate: bool = True) -> tf.Tensor:
    x = tf.convert_to_tensor(x)
    if approximate:
        pi = tf.cast(math.pi, x.dtype)
        coeff = tf.cast(0.044715, x.dtype)
        return 0.5 * x * (1.0 + tf.tanh(tf.sqrt(2.0 / pi) * (x + coeff * tf.pow(x, 3))))
    else:
        return 0.5 * x * (1.0 + tf.math.erf(x / tf.cast(tf.sqrt(2.0), x.dtype)))
```
The above implementation would only bring over the python composite op. Since there is
[no way for us to build tfxla kernels](https://github.com/tensorflow/tensorflow/pull/33945#issuecomment-617842977)
we had no support for TPUs in Addons.  [There were comments](https://github.com/tensorflow/tensorflow/pull/33945#issuecomment-625380208)
about using a "selector", but we would need guidance on how to implement that.

We may also want to discuss the `approximate` bool and if it should be included in the
upstream version.

## Transition Plan
* The activation would land in [nn_ops.py](https://github.com/tensorflow/tensorflow/blob/r2.2/tensorflow//python/ops/nn_ops.py), [keras activations](https://github.com/tensorflow/tensorflow/blob/r2.2/tensorflow/python/keras/activations.py),
 and possibly in [keras advaced_activation layers](https://github.com/tensorflow/tensorflow/blob/r2.2/tensorflow/python/keras/layers/advanced_activations.py)
* No planned changes to the parameter signatures at this time
* Addons would deprecate our activation and make a call to the core functionality.
* After merging to TF Core:
    * Consolidate/remove https://github.com/tensorflow/models/blob/r2.2.0/official/modeling/activations/gelu.py
    * Consolidate/remove https://github.com/tensorflow/models/blob/r2.2.0/official/modeling/activations/gelu_test.py
    * Consolidate/remove https://github.com/tensorflow/models/blob/r2.2.0/official/nlp/xlnet/xlnet_modeling.py#L29

## Relevant GitHub Issues
* https://github.com/tensorflow/tensorflow/pull/33945
* https://github.com/tensorflow/addons/issues/550
* https://github.com/tensorflow/tensorflow/issues/32783

## Questions and Discussion Topics
* Whom from the TF core team would sponsor this migration and ownership of the API?
* Is it worth bringing over the custom-op kernels for CPU/GPU?

## Final Decision
TBD

repository: tensorflow/community

repo_name: tensorflow/community


text:
#Credits

## Flickr photos
- https://www.flickr.com/photos/rawartists/16982768530
- https://www.flickr.com/photos/rawartists/16550542183
- https://www.flickr.com/photos/rawartists/16550949303
- https://www.flickr.com/photos/foundanimalsfoundation/8055195702
- https://www.flickr.com/photos/rawartists/16982942488
- https://www.flickr.com/photos/rawartists/17169726361
- https://www.flickr.com/photos/rawartists/16963081747
- https://www.flickr.com/photos/hernanirastorza/17659375763
- https://www.flickr.com/photos/malafeyev/7766190262
- https://www.flickr.com/photos/ryanhallock/18565119729
- https://www.flickr.com/photos/maitreyoda/13823218733

## Other images
- http://graphicburger.com
- http://pexels.com

## Icons
- http://fortawesome.github.io/Font-Awesome/
- http://linea.io
- https://design.google.com/icons/

## Technologies
- https://github.com/scdoshi/jquery-ajaxchimp
- https://www.google.com/fonts/specimen/Roboto
- http://materializecss.com/
- http://www.owlcarousel.owlgraphic.com/
- https://github.com/PHPMailer/PHPMailer
- https://github.com/isuttell/sine-waves
- http://threejs.org/
- https://jquery.com/

## Dev dependecies
- http://gulpjs.com/
- https://github.com/postcss/postcss
- http://cssnano.co/
- http://jade-lang.com/
- http://sass-lang.com/
- https://www.npmjs.com/

repository: pimmey/react-docs

repo_name: pimmey/react-docs


text:
# Express Note Taker
A notes app used to store your todos. This project uses a JSON file & the node fs module to write & read data.
## Table of contents
* [Installation](#Installation)
* [Technologies](#Technologies)
* [Working Demo](#Technologies)
* [License](#License)
## Installation
Install NodeJS.
Run npm i from project directory to install dependancies, then node index to run locally.
## Technologies
* Node
* Express
* path
## Working Demo
[https://ymh-express-notes.herokuapp.com/](https://ymh-express-notes.herokuapp.com/)
## License
This project is licensed under [MIT License](https://choosealicense.com/licenses/).
***

_This file was generated using a [Readme Generator](https://github.com/yeasir01/readme-generator) developed by Yeasir H._


text:
### Authentication

Application authentication uses [PassportJS](http://passportjs.org/)

There are four authentication strategies:

* Local
* Facebook
* Google
* Github

A user can have more than one provider - the email address is the unique value that providers are associated with.

Here's an example of an account using the Passport `local` strategy:

    {
            "email"<EMAIL_ADDRESS>            "currentProvider" : "local",
            "providers" : {
                    "local" : {
                            "password" : "c2NyeXB0AAwAAAAIAAAAAduYWT+lA7NjIMTouADDN+O3xIxdAJ9lzQrBKdVMFvhIGfSS6EAnKfBE0rM9T0tC5ZgQL++3sN11VEl46RlSLdUuanV0YqzQg1EfnX2tMmxB",
                            "username" : "netcitizen",
                            "name" : "Net Citizen"
                    }
            },
            "_id" : ObjectId("52cb50966842230b79d7f7ca"),
            "__v" : 0
    }

Here's an example of an account with `local` and `google` strategies:

    {
            "email"<EMAIL_ADDRESS>            "currentProvider" : "local",
            "providers" : {
                    "local" : {
                            "password" : "c2NyeXB0AAwAAAAIAAAAAduYWT+lA7NjIMTouADDN+O3xIxdAJ9lzQrBKdVMFvhIGfSS6EAnKfBE0rM9T0tC5ZgQL++3sN11VEl46RlSLdUuanV0YqzQg1EfnX2tMmxB",
                            "username" : "netcitizen",
                            "name" : "Net Citizen"
                    },
                    "google" : {
                           "username" : "Net Citizen",
                           "name" : "Net Citizen"
                    }
            },
            "_id" : ObjectId("52cb50966842230b79d7f7ca"),
            "__v" : 0
    }

It's important to note the `local` strategy is basic without many essential features like password recovery or password reset (you can build these if you wish).

For this reason it's recommended to use the `local` strategy only in development mode.

Also note a user can have more than one login provider but:

1. A user can start with a local provider then add social login providers.

2. A user cannot add a local provider to already existing social providers.

Authentication providers that do not provide the user's email address do not currently integrate with this system (Ex: Twitter).

As there are can be more than one provider for an account the `currentProvider` field is used and updated with each user session.

This allows for accurate access to value's like the `name`. Here's a code example accessing the signed in user's `name`

    user.providers[user.currentProvider].name

repository: rudijs/meanr-full-stack

repo_name: rudijs/meanr-full-stack


text:
# SimpleWebProxy
A simple HTTP/1.0 proxy written in Java.
This is written for a homework of my network course for learning purpose.

### How to run
```sh
cd src/
javac *
# java WebProxy <port>
java WebProxy 8080
```

### What does it support
* HTTP/1.0 GET, HEAD, POST, PUT, etc
* Handling small objects, large objects and complex web pages with multiple objects
* Handling concurrent requests
* Caching with conditional requests

### License
SimpleWebProxy is released under [MIT License](http://www.opensource.org/licenses/MIT)

repository: xinan/SimpleWebProxy

repo_name: xinan/SimpleWebProxy


text:
# RPC-OnlineTest
Distributed system version of an online test using Remote Procedure Call (RPC) in Python.

## Preparation
1. Install required library
2. Import the DDL and DML file into your phpmyadmin database. (sister.sql)
3. Make sure you have the right format of csv (see soal.csv)

## Functionality

Admin :
1. Question upload
2. See uploaded questions
3. Delete questions on the database

User :
1. Start quiz
2. See results
3. Register a new account

repository: kamalhm/RPC-OnlineTest

repo_name: kamalhm/RPC-OnlineTest


text:
[Wishlist - Latest Version](https://raw.githubusercontent.com/rslifka/wishlist/master/wishlist.txt)

[Roll Commentary - Latest Version](https://github.com/rslifka/wishlist/blob/master/thought_process.md)

# Welcome!
Did I Strike Gold? Or Lead? This is what I'm hoping to do with my wishlist. It's not trying to tell you every possible perk that might happen to be good, it's trying to tell you when a set of related perks came together to make an interesting roll.

I tend to play a bit off-meta (well, a lot if you ask my fireteam!) so my goal with these lists is to help me decide what rolls of weapons (even if they aren't "the meta") would be interesting to use in both PvE and PvP. I'll strive to include as much color in the notes of each weapon as I can. These are visible when clicking on a suggested roll in DIM. As the wishlist is updated, so are the thoughts that go in to each set of rolls, which you can find a link to above.

**This is a console-centric wishlist.** If you're on PC, generally you have a Range preference over Stability. Keep that in mind when you see something with a suggested Stability-related perk or a Stability Masterwork.

# Who Made This?
I've been playing Destiny since the Alpha with just shy of 3,300 hours played as of February 2019. That's how everyone starts out one of these right? :) Well, I captured the rolls so ultimately I'm responsible for them but all of the creators listed below influenced every single one of these rolls in one or two ways:

1. **Directly**: They reviewed a weapon and shared specific insights as to why and how a particular roll could be effective.
2. **Indirectly**: They published content about how the sandbox itself functions (i.e. how perks work, what the core attributes are)

I quote and link to sources per-weapon in the [Roll Guide](https://github.com/rslifka/wishlist/blob/master/thought_process.md). Go check out these Destiny scientists and the content they produce. Really amazing stuff. Every roll of every weapon was influenced in some way by their work.

| Creator       | Twitter | YouTube | Twitch
|---------------|-|-|-|
| CammyCakes    | [Twitter](https://twitter.com/CammyCakesYT) | [YouTube](https://www.youtube.com/user/cammycakesgaming) | [Twitch](https://www.twitch.tv/cammycakes)
| CoolGuy       | [Twitter](https://twitter.com/IAmCoolGuyYT) | [YouTube](https://www.youtube.com/channel/UCAOitB3h99Ur9RzR5ftd2bA) | [Twitch](https://www.twitch.tv/I_Am_CoolGuy)
| Drewsky       | [Twitter](https://twitter.com/drewskyschannel) | [YouTube](https://www.youtube.com/user/DrewskysChannel) | [Twitch](https://www.twitch.tv/drewskys)
| Fallout Plays | [Twitter](https://twitter.com/falloutplays) | [YouTube](https://www.youtube.com/channel/UCMlqYSFcNTrxDQO_T9GCsjg) | [Twitch](www.twitch.tv/falloutplays)
| Kyt_Kutcha    | [Twitter](https://twitter.com/kyt_kutcha) | - | [Twitch](https://www.twitch.tv/kyt_kutcha/)
| Mercules904   | [Twitter](https://twitter.com/mercules904) | - | -

# Reference

We have a [bit of a wiki going](https://github.com/rslifka/wishlist/wiki) for the type of information we find helpful when coming up with rolls. Have a look!

# Contributing

If you want to add some of your own rolls, you'll want to first create a fork of this repo and clone it to your local machine.

The files in the `wishlist_dsl` directory are used to generate the `wishlist.txt` and `though_process.md` files.  If you create or edit edit `.yml` files you'll then need to run a `bundle exec rake` to generate new versions of those files.

You can set up "Github Actions" to automatically recompile these files on every push using the `.github/workflows/ruby.yml` file.

If you want to test your changes locally without pushing, you'll need to set up `rake` locally.

### Setting up `rake` and `ruby` locally

The wishlist uses `rake` tasks (via `ruby`) to do most of the heavy lifing.  You'll want to [install `rvm` (Ruby Version Manager)](https://rvm.io/).  Then, if you `cd` into your local repo it should prompt you to install the right version of `ruby`.

Then you can install all of the required dependencies (taken from the "Build and test with Rake" action in `ruby.yml`):

```
gem install bundler
bundle install --jobs 4 --retry 3
```

Now, every time you make a `.yml` change, you can test and recompile the changes locally with:

```
bundle exec rake
```

repository: tednaleid/wishlist

repo_name: tednaleid/wishlist


text:
# Highlight
## welcome

##A File Explorer Which is Content Searchable ( With Auto suggestion )

The idea is to write down a sophisticated file explorer with searchable content feature archive

achievable features.

* 1. Searchable Contents

Searchable Content e.g searching inside pdf files, word files, text files etc from explorer. The contents

will be indexed and made searchable via single point. Every update will dynamically added to available

search data. THE EFFICENCY OF SEARCH WILL BE THE PRIME PROBLEM.

* 2. Archive Feature

Contents should be archived from intervals. It is not very hard to see that files used today will be less

usable 2 months after unless we still working on that project actively or we come back to the project

after a while. The file explorer will decide on access times of searching and prioritize those who are

recently used.

* 3. Email Searching

Add your email settings and get your emails searchable in file explorer.

* 4. Shortcut Searching

It will keep track of exe so if someone writes corel he will get link to corel executable or as window

search does.

Simillar apps to this :

1. http://www.donationcoder.com/Software/Mouser/findrun/index.html

2. http://executor.dk/

3. http://alternativeto.net/software/launchy/

4. http://www.voidtools.com/

5. Mac Spotlight

6. Windows file explorer 10 has got searchable contents feature


text:
# pystatus

This is an i3bar compatible, modular status line generator. You can use
this for your i3 desktop to generate a status line according to your wish.

If there are modules missing for your need, you can simply create your own one.

## Configuration

A full example can be found in the distributed *pystatus.cfg* file. The file
has to be placed under *${HOME}/.config/pystatus/pystatus.cfg*.

Alternatively your may specify your own path by passing *-c PATH* to pystatus.

Simple example to only display current wifi status and wall clock:
```xml
<?xml version="1.0"?>
<pystatus>
    <blocks>
        <block plugin="wifi" name="wlan0"/>
        <block plugin="clock"/>
    </blocks>
</pystatus>
```

## Use in i3

pystatus is fully compatible to the i3bar protocol and thus can be used as
drop in replacement for i3status.

A simple configuration within your i3 config may look like

```
bar {
    i3bar_command i3bar
    status_command pystatus
    position bottom
}
```

## Logging

pystatus also supports simple logging. This helps you identify problems with
your setup or with pystatus itself.

By default pystatus will log to stderr. You can configure the logging by
creating *~/.config/pystatus/logging.cfg*. Alternatively you may pass
*--log-config PATH* to pystatus.

You may copy the distributed *logging.cfg* which will configure logging to
*/tmp/pystatus.log*.

More informations on how to configure logging can be read
[here](https://docs.python.org/3.6/library/logging.config.html#logging-config-fileformat).

## Custom modules

Documentation incoming.


text:
---
title: 'The global doc: sharing content across pages'
layout: tutorial
---

# The global doc: sharing content across pages

This is nice, but a static copyright notice isn't going to cut it. Your users will want to edit their own global footer.

Here's how to let them do that:

```markup
{% block main %}
  <div class="main-content">
    {{ apos.singleton(data.global, 'footer', 'apostrophe-rich-text', {
      toolbar: [ 'Bold', 'Italic', 'Styles', 'Link', 'Unlink' ]
    }) }}
  </div>
{% endblock %}
```

Just like `data.page`, `data.global` can contain Apostrophe areas and singletons. Unlike `data.page`, it _always refers to the same, shared document_. So it is ideal for a footer, banner or other sitewide content element.

> `data.global` is great, but don't put your entire site in there! Sometimes beginning Apostrophe developers will add hundreds of areas to `global`. This is not a good idea. A good rule of thumb is that you should store your content with the appropriate page, or the appropriate [piece](https://github.com/stuartromanek/docs/tree/d49f644bc67898ee76b4415b5c49cf7c7012171e/tutorials/getting-started/reusable-content-with-pieces.html), unless it is needed at least 50% of the time... because the global doc has to be loaded by the server 100% of the time.

repository: stuartromanek/docs

repo_name: stuartromanek/docs


text:
As an extension to CSS, LESS is not only backwards compatible with CSS, but the extra features it adds use existing CSS syntax. This makes learning LESS a breeze, and if in doubt, lets you fall back to CSS.

## # Variables

These are pretty self-explanatory:

```less
@nice-blue: #5B83AD;
@light-blue: (@nice-blue + #111);

#header {
  color: @light-blue;
}
```

Compiles to:

```css
#header {
  color: #6c94be;
}
```

It is also possible to define variables with a _variable name_:

```less
@fnord: "I am fnord.";
@var: 'fnord';

.label {
  content: @@var;
}
```

Which compiles to:

```css
.label {
  content: "I am fnord.";
}
```

When defining a variable twice, the last definition of the variable is used, searching from the current scope upwards. This is similar to css itself where the last property inside a definition is used to determine the value.

For instance:

```less
@var: 0;
.class1 {
  @var: 1;
  .class {
    @var: 2;
    three: @var;
    @var: 3;
  }
  one: @var;
}
```

Compiles to:

```css
.class1 .class {
  three: 3;
}
.class {
  one: 1;
}
```

Variables are lazy loaded and do not have to be declared before being used.

Valid less snippet:

```less
.lazy-eval {
  width: @var;
}

@var: @a;
@a: 9%;
```

this is valid less too:

```less
.lazy-eval-scope {
  width: @var;
  @a: 9%;
}

@var: @a;
@a: 100%;
```

both compile into:

```css
.lazy-eval-scope {
  width: 9%;
}
```

## Mixins

In LESS, it is possible to include a bunch of properties from one ruleset into another ruleset. So say we have the following class:

```css
.bordered {
  border-top: dotted 1px black;
  border-bottom: solid 2px black;
}
```

And we want to use these properties inside other rulesets. Well, we just have to drop in the name of
the class in any ruleset we want to include its properties, like so:

```css
#menu a {
  color: #111;
  .bordered;
}
.post a {
  color: red;
  .bordered;
}
```

The properties of the `.bordered` class will now appear in both `#menu a` and `.post a`:

```css
#menu a {
  color: #111;
  border-top: dotted 1px black;
  border-bottom: solid 2px black;
}
.post a {
  color: red;
  border-top: dotted 1px black;
  border-bottom: solid 2px black;
}
```

Any CSS *class* or *id* ruleset can be mixed-in that way.

Note: Variables are also mixed in, so variables from a mixin will be placed into the current scope. This is contentious and may change in the future.

## Parametric Mixins

LESS has a special type of ruleset which can be mixed in like classes, but accepts parameters. Here's the canonical example:

```less
.border-radius (@radius) {
  border-radius: @radius;
  -moz-border-radius: @radius;
  -webkit-border-radius: @radius;
}
```

And here's how we can mix it into various rulesets:

```less
#header {
  .border-radius(4px);
}
.button {
  .border-radius(6px);
}
```

Parametric mixins can also have default values for their parameters:

```less
.border-radius (@radius: 5px) {
  border-radius: @radius;
  -moz-border-radius: @radius;
  -webkit-border-radius: @radius;
}
```

We can invoke it like this now:

```less
#header {
  .border-radius;
}
```

And it will include a 5px border-radius.

You can also use parametric mixins which don't take parameters. This is useful if you want to hide the ruleset from the CSS output,
but want to include its properties in other rulesets:

```less
.wrap () {
  text-wrap: wrap;
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  word-wrap: break-word;
}

pre { .wrap }
```

Which would output:

```css
pre {
  text-wrap: wrap;
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  word-wrap: break-word;
}
```

### Mixins With Multiple Parameters
Parameters are either *semicolon* or *comma* separated. It is recommended to use *semicolon*. The symbol comma has double meaning: it can be interpreted either as a mixin parameters separator or css list separator.

Using comma as mixin separator makes it impossible to create comma separated lists as an argument. On the other hand, if the compiler sees at least one semicolon inside mixin call or declaration, it assumes that arguments are separated by semicolons and all commas belong to css lists:

* two arguments and each contains comma separated list: `.name(1, 2, 3; something, else)`,
* three arguments and each contains one number: `.name(1, 2, 3)`,
* use dummy semicolon to create mixin call with one argument containing comma separated css list: `.name(1, 2, 3;)`,
* comma separated default value: `.name(@param1: red, blue;)`.

It is legal to define multiple mixins with the same name and number of parameters. Less will use properties of all that can apply. If you used the mixin with one parameter e.g. `.mixin(green);`, then properties of all mixins with exactly one mandatory parameter will be used:

```less
.mixin(@color) {
  color-1: @color;
}
.mixin(@color; @padding:2) {
  color-2: @color;
  padding-2: @padding;
}
.mixin(@color; @padding; @margin: 2) {
  color-3: @color;
  padding-3: @padding;
  margin: @margin @margin @margin @margin;
}
.some .selector div {
  .mixin(#008000);
}
```

compiles into:

```css
.some .selector div {
  color-1: #008000;
  color-2: #008000;
  padding-2: 2;
}
```

### The `@arguments` variable

`@arguments` has a special meaning inside mixins, it contains all the arguments passed, when the mixin was called. This is useful
if you don't want to deal with individual parameters:

```less
.box-shadow (@x: 0; @y: 0; @blur: 1px; @color: #000) {
  -webkit-box-shadow: @arguments;
     -moz-box-shadow: @arguments;
          box-shadow: @arguments;
}
.big-block {
  .box-shadow(2px; 5px);
}
```

Which results in:

```css
.big-block {
  -webkit-box-shadow: 2px 5px 1px #000;
     -moz-box-shadow: 2px 5px 1px #000;
          box-shadow: 2px 5px 1px #000;
}
```

### Advanced arguments and the `@rest` variable

You can use `...` if you want your mixin to take a variable number of arguments. Using this after a variable name will assign those arguments to the variable.

```less
.mixin (...) {        // matches 0-N arguments
.mixin () {           // matches exactly 0 arguments
.mixin (@a: 1) {      // matches 0-1 arguments
.mixin (@a: 1; ...) { // matches 0-N arguments
.mixin (@a; ...) {    // matches 1-N arguments
```

Furthermore:

```less
.mixin (@a; @rest...) {
   // @rest is bound to arguments after @a
   // @arguments is bound to all arguments
}
```

## The Keyword !important
Use the !important keyword after mixin call to mark all properties brought by it as !important:

Sample input:

```less
.mixin (@a: 0) {
  border: @a;
  boxer: @a;
}
.unimportant {
  .mixin(1);
}
.important {
  .mixin(2) !important;
}
```

compiled into:

```css
.unimportant {
  border: 1;
  boxer: 1;
}
.important {
  border: 2 !important;
  boxer: 2 !important;
}
```

## Pattern-matching and Guard expressions

Sometimes, you may want to change the behaviour of a mixin,
based on the parameters you pass to it. Let's start with something
basic:

```less
.mixin (@s; @color) { ... }

.class {
  .mixin(@switch; #888);
}
```

Now let's say we want `.mixin` to behave differently, based on the value of `@switch`,
we could define `.mixin` as such:

```less
.mixin (dark; @color) {
  color: darken(@color, 10%);
}
.mixin (light; @color) {
  color: lighten(@color, 10%);
}
.mixin (@_; @color) {
  display: block;
}
```

Now, if we run:

```less
@switch: light;

.class {
  .mixin(@switch; #888);
}
```

We will get the following CSS:

```css
.class {
  color: #a2a2a2;
  display: block;
}
```

Where the color passed to `.mixin` was lightened. If the value of `@switch` was `dark`,
the result would be a darker color.

Here's what happened:

* The first mixin definition didn't match because it expected `dark` as the first argument.
* The second mixin definition matched, because it expected `light`.
* The third mixin definition matched because it expected any value.

Only mixin definitions which matched were used. Variables match and bind to any value.
Anything other than a variable matches only with a value equal to itself.

We can also match on arity, here's an example:

```less
.mixin (@a) {
  color: @a;
}
.mixin (@a; @b) {
  color: fade(@a; @b);
}
```

Now if we call `.mixin` with a single argument, we will get the output of the first definition,
but if we call it with *two* arguments, we will get the second definition, namely `@a` faded to `@b`.

### Guards

Guards are useful when you want to match on *expressions*, as opposed to simple values or arity. If you are
familiar with functional programming, you have probably encountered them already.

In trying to stay as close as possible to the declarative nature of CSS, LESS has opted to implement
conditional execution via **guarded mixins** instead of if/else statements, in the vein of `@media`
query feature specifications.

Let's start with an example:

```less
.mixin (@a) when (lightness(@a) >= 50%) {
  background-color: black;
}
.mixin (@a) when (lightness(@a) < 50%) {
  background-color: white;
}
.mixin (@a) {
  color: @a;
}
```

The key is the **`when`** keyword, which introduces a guard sequence (here with only one guard). Now if we run the following
code:

```less
.class1 { .mixin(#ddd) }
.class2 { .mixin(#555) }
```

Here's what we'll get:

```css
.class1 {
  background-color: black;
  color: #ddd;
}
.class2 {
  background-color: white;
  color: #555;
}
```

The full list of comparison operators usable in guards are: **`> >= = =< <`**. Additionally, the keyword `true`
is the only truthy value, making these two mixins equivalent:

```
.truth (@a) when (@a) { ... }
.truth (@a) when (@a = true) { ... }
```

Any value other than the keyword `true` is falsy:

```less
.class {
  .truth(40); // Will not match any of the above definitions.
}
```

Guards can be separated with a comma '`,`'--if any of the guards evaluates to true, it's
considered as a match:

```less
.mixin (@a) when (@a > 10), (@a < -10) { ... }
```

Note that you can also compare arguments with each other, or with non-arguments:

```
    @media: mobile;

    .mixin (@a) when (@media = mobile) { ... }
    .mixin (@a) when (@media = desktop) { ... }

    .max (@a; @b) when (@a > @b) { width: @a }
    .max (@a; @b) when (@a < @b) { width: @b }
```

Lastly, if you want to match mixins based on value type, you can use the *is\** functions:

```
    .mixin (@a; @b: 0) when (isnumber(@b)) { ... }
    .mixin (@a; @b: black) when (iscolor(@b)) { ... }
```

Here are the basic type checking functions:

* `iscolor`
* `isnumber`
* `isstring`
* `iskeyword`
* `isurl`

If you want to check if a value, in addition to being a number, is in a specific unit, you may use one of:

* `ispixel`
* `ispercentage`
* `isem`
* `isunit`

Last but not least, you may use the **`and`** keyword to provide additional conditions inside a guard:

```
    .mixin (@a) when (isnumber(@a)) and (@a > 0) { ... }
```

And the **`not`** keyword to negate conditions:

```
    .mixin (@b) when not (@b > 0) { ... }
```

## Nested rules

LESS gives you the ability to use *nesting* instead of, or in combination with cascading.
Lets say we have the following CSS:

```
    #header { color: black; }
    #header .navigation {
      font-size: 12px;
    }
    #header .logo {
      width: 300px;
    }
    #header .logo:hover {
      text-decoration: none;
    }
```

In LESS, we can also write it this way:

```
    #header {
      color: black;

      .navigation {
        font-size: 12px;
      }
      .logo {
        width: 300px;
        &:hover { text-decoration: none }
      }
    }
```

Or this way:

```
    #header        { color: black;
      .navigation  { font-size: 12px }
      .logo        { width: 300px;
        &:hover    { text-decoration: none }
      }
    }
```

The resulting code is more concise, and mimics the structure of your `DOM tree`.

Notice the `&` combinator - it's used when you want a nested selector to be concatenated to its parent selector, instead
of acting as a descendant. This is especially important for pseudo-classes like `:hover` and `:focus`.

For example:

```
    .bordered {
      &.float {
        float: left;
      }
      .top {
        margin: 5px;
      }
    }
```

Will output

```
    .bordered.float {
      float: left;
    }
    .bordered .top {
      margin: 5px;
    }
```

## Nested Media Queries

Media queries can be nested in the same way as selectors e.g.

```
    .one {
        @media (width: 400px) {
            font-size: 1.2em;
            @media print and color {
                color: blue;
            }
        }
    }
```

Will output

```
    @media (width: 400px) {
      .one {
        font-size: 1.2em;
      }
    }
    @media (width: 400px) and print and color {
      .one {
        color: blue;
      }
    }
```

## Advanced Usage of `&`

The & symbol can be used in selectors in order to reverse the ordering of the nesting and to multiply classes.

For example:

```
    .child, .sibling {
        .parent & {
            color: black;
        }
        & + & {
            color: red;
        }
    }
```

Will output

```
    .parent .child,
    .parent .sibling {
        color: black;
    }
    .child + .child,
    .child + .sibling,
    .sibling + .child,
    .sibling + .sibling {
        color: red;
    }
```

You can also use & in mixins in order to reference nesting that is outside of your mixin.

## Operations

Any number, color or variable can be operated on. Operations should be performed
within parentheses. Here are a couple of examples:

```
    @base: 5%;
    @filler: (@base * 2);
    @other: (@base + @filler);

    color: (#888 / 4);
    background-color: (@base-color + #111);
    height: (100% / 2 + @filler);
```

The output is pretty much what you expect—LESS understands the difference between colors and units. If a unit is used in an operation, like in:

```
    @var: (1px + 5);
```

LESS will use that unit for the final output—`6px` in this case.

Extra parentheses are also authorized in operations:

```
    width: ((@var + 5) * 2);
```

## Functions

LESS provides a variety of functions which transform colors, manipulate strings and do maths.
They are documented fully in the function reference.

Using them is pretty straightforward. The following example uses percentage to convert 0.5 to 50%,
increases the saturation of a base color by 5% and then sets the background color to one that is lightened by
25% and spun by 8 degrees:

```
    @base: #f04615;
    @width: 0.5;

    .class {
      width: percentage(0.5); // returns `50%`
      color: saturate(@base, 5%);
      background-color: spin(lighten(@base, 25%), 8);
    }
```

## Namespaces

Sometimes, you may want to group your variables or mixins, for organizational purposes, or just to offer some encapsulation.
You can do this pretty intuitively in LESS—say you want to bundle some mixins and variables under `#bundle`, for later re-use, or for distributing:

```
    #bundle {
      .button () {
        display: block;
        border: 1px solid black;
        background-color: grey;
        &:hover { background-color: white }
      }
      .tab { ... }
      .citation { ... }
    }
```

Now if we want to mixin the `.button` class in our `#header a`, we can do:

```
    #header a {
      color: orange;
      #bundle > .button;
    }
```

## Scope

Scope in LESS is very similar to that of programming languages. Variables and mixins are first looked up locally,
and if they aren't found, the compiler will look in the parent scope, and so on.

```
    @var: red;

    #page {
      @var: white;
      #header {
        color: @var; // white
      }
    }

    #footer {
      color: @var; // red
    }
```

## Comments

CSS-style comments are preserved by LESS:

```
    /* Hello, I'm a CSS-style comment */
    .class { color: black }
```

Single-line comments are also valid in LESS, but they are 'silent',
they don't show up in the compiled CSS output:

```
    // Hi, I'm a silent comment, I won't show up in your CSS
    .class { color: white }
```

## Importing

You can import both CSS and LESS files. Only LESS files import statements are processed, CSS file import statements are kept as they are. If you want to import a CSS file, and don't want LESS to process it, just use the `.css` extension:

```
    @import "lib.css";
```

Compilation makes only one change to CSS file imports: top level CSS file imports are moved on top of the sheet, right after @charset declarations.

Input file with import statement:

```
    h1 { color: green; }
    @import "import/official-branding.css?urlParameter=23";
```

import statement has been moved on top:

```
    @import "import/official-branding.css?urlParameter=23";
    h1 { color: green; }
```

Content of imported LESS file is copied into importing style sheet and compiled together with it. Importing and imported files share all mixins, namespaces, variables and other structures.

In addition, if the import statement has media queries specified in it, imported content is enclosed in the `@Media` declaration.

Imported "library.less":

```
    @imported-color: red;
    h1 { color: green; }
```

Main file imports the above library.less file:

```
    @import "library.less" screen and (max-width: 400px); // import with media queries
    @import "library.less"; // import without media queries

    .class {
      color: @importedColor; // use imported variable
    }
```

Compiled output:

```
    // Corresponds to import with media queries
    @media screen and (max-width: 400px) {
      h1 { color: green; }
    }

    // Corresponds to import without media queries
    h1 { color: green; }
    .class {
      // Use imported variable
      color: #ff0000;
    }
```

LESS file import statement does not have to be located on top of the style sheet. It can be placed also inside rulesets, mixins or other LESS structures.

Import into ruleset:

```
    pre {
      @import "library.less";
      color: @importedColor;
    }
```

both variable and ruleset defined in "library.less" have been copied into the `pre` ruleset:

```
    pre {
      color: #ff0000; // variable defined in library.less was available
    }
    pre h1 { // ruleset defined in library.less was nested into 'pre' ruleset
      color: green;
    }
```

In v1.3.0 - v1.3.3 `@import` imports a file multiple times and you can override this behaviour with `@import-once`.

In v1.4.0 `@import-once` has been removed and `@import` imports once by default. This means that with the following

```
   @import "file.less";
   @import "file.less";
```

The second file is ignored.

Any file that does not end with `.css` is considered less file and processed. In addition, if the file name has no extension or parameters, the ".less" suffix is added on the end. Both of these are equivalent:

```
    @import "lib.less";
    @import "lib";
```

In v1.4.0 you can force a file to be interpreted as a particular type by specifying an option, e.g.

```
    @import (css) "lib";
```

Will output..

```
    @import "lib";
```

and

```
    @import (less) "lib.css";
```

Will import the lib.css file and treat it as less. If you specify a file is less and do not include an extension, none will be added.

## String interpolation

Variables can be embedded inside strings in a similar way to Ruby or PHP, with the `@{name}` construct:

```
    @base-url: "http://assets.fnord.com";
    background-image: url("@{base-url}/images/bg.png");
```

## Escaping

Sometimes you might need to output a CSS value which is either not valid CSS syntax,
or uses proprietary syntax which LESS doesn't recognize.

To output such value, we place it inside a string prefixed with `~`, for example:

```
    .class {
      filter: ~"ms:alwaysHasItsOwnSyntax.For.Stuff()";
    }
```

This is called an "escaped value", which will result in:

```
    .class {
      filter: ms:alwaysHasItsOwnSyntax.For.Stuff();
    }
```

Escaped values can use the interpolation exactly the same way as strings:

```
    .class {
      @what: "Stuff";
      filter: ~"ms:alwaysHasItsOwnSyntax.For.@{what}()";
    }
```

## Selector Interpolation

If you want to use LESS variables inside selectors, you can do this by referencing the variable using `@{selector}` as
in string interpolation. For example:

```
    @name: blocked;
    .@{name} {
        color: black;
    }
```

will output

```
    .blocked {
        color: black;
    }
```

Note: prior to LESS 1.3.1 a `(~"@{name}")` type of selector was supported. Support for this will be removed in 1.4.0.

## Media Queries as Variables

If you want to use less variables inside media, you can do this using the usual variable variable referencing syntax `@variable`. For example:

```
    @singleQuery: ~"(max-width: 500px)";
    @media screen, @singleQuery {
      set {
        padding: 3 3 3 3;
      }
    }
```

compiles into:

```
    @media screen, (max-width: 500px) {
      set {
        padding: 3 3 3 3;
      }
    }
```

The variable must contain whole media query. This would cause an error: `@media screen and @partial {`.

In 1.4.0, without strict maths off, you can also include variables in media values, e.g. `@media screen, (max-width: @width) {`.

## JavaScript evaluation

JavaScript expressions can be evaluated as values inside .less files. We recommend using caution with this feature
as the LESS will not be compilable by ports and it makes the LESS harder to maintain. If possible, try to think of a
function that can be added to achieve the same purpose and ask for it on github. We have plans to allow expanding the
default functions available. However, if you still want to use JavaScript in .less, this is done by wrapping the expression
with back-ticks:

```
    @var: `"hello".toUpperCase() + '!'`;
```

Becomes:

```
    @var: "HELLO!";
```

Note that you may also use interpolation and escaping as with strings:

```
    @str: "hello";
    @var: ~`"@{str}".toUpperCase() + '!'`;
```

Becomes:

```
    @var: HELLO!;
```

It is also possible to access the JavaScript environment:

```
    @height: `document.body.clientHeight`;
```

If you want to parse a JavaScript string as a hex color, you may use the `color` function:

```
    @color: color(`window.colors.baseColor`);
    @darkcolor: darken(@color, 10%);
```

repository: tmccombs/less-docs

repo_name: tmccombs/less-docs