text:
# TODO

## General

-   Figure out TravisCI builds...
-   Consider porting JSON to https://github.com/Jeffail/gabs
-   Check if we need buffered writers or OS will do the job
-   Split lines option in Str readers? (mainly to support multiple messages in a
    single UDP packet...)
-   Find out a more "automatic" way to define codec and its parameter from config
    such that extending with new codecs does not require new component structs.
    Maybe via a codec Registry?
-   Complete tests aiming for 85%+
-   Stress and memleak test
-   Create a prometheus metrics end-point
-   External component loading on runtime (given a folder path) if possible so
    custom modules can be easily created and used
-   Allow multiple input components
-   Allow for YAML config

## Component Ideas

-   Add OS command input component (periodically running something). Note that
    this can be implemented atm with a `task` that pipes to `netcat` if you are
    using TCP/UDP input.
-   SQL output component, maybe via https://github.com/volatiletech/sqlboiler
-   ElasticSearch output component
-   InfluxDB maybe?
-   Kafka output component


text:
---
layout: post
title: Faster than scp
location: San Luis Obispo, CA
summary: On occasion everyone needs to move large files between servers,
         this is the fastest way.
---

On occasion everyone needs to move large files between servers, like say a 50GB
log dump from your DB that you want to analyze, or a 10GB SQL backup.

The internet is fast now-adays and most cloud services have great bandwidth,
but a lot of data is a lot of data and transferring it can take some time.

`scp` is the easiest way to transfer files using an ssh connection, but it can
be a bit slow on occasion, and it's compression is usually worthless.

So, the solution is to pipe the results from tar-gzip over an ssh connection.
NetCat(nc) is a tad faster but requires one more step to setup.

The Syntax
----------

    ssh<EMAIL_ADDRESS>tar -zc /path/to/dir | tar -zx -C output/dir

The Results
-----------
For a 250MB txt file

*scp* : 19.7 seconds
*tar-gzip over ssh* : 7.6 seconds

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title: Loader
type: styleguide
layout: layout-coeur-knowbase
name: loader
section: scriptcoeur
<!-- status: --draft -->
source: ../../
---

<main markdown="1">

## Loader Animation

Sometimes sites will flash an unstyled ugly mess while the css and js loading (for example with the `sizer`). You can add a "loaded" state that doubles as an intro animation.

- add class `--loaded` to body once the page is loaded, or attach to a `settimeout` timer, as is shown below
- give the `body` tag a neutral, unloaded state (e.g. `opacity:0`)

~~~html
<script>
  function onLoadPage() {
    $('._loader').addClass('--loaded');
  }

  $(document).ready(function() {
    // hide loader; reveal page
    window.setTimeout(onLoadPage, 400)
  });
</script>
~~~

The CSS is straight-forward. It looks decent with easing attached.

~~~css
._loader {
  // hide ugly loader
  @extend %ease-slow;
  opacity: 0;
  top: 10px;

  &.--loaded {
    @extend %ease-slow;
    opacity: 1;
    top: 0;
  }
}
~~~

</main>

license: Unlicense

repository: janzheng/stylecoeur

repo_name: janzheng/stylecoeur


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

This profile defines a provider role administration details structure that includes core localisation concepts.

#### Identifiers

These definitions represent common data held in the PractitionerRole.identifier element.

* __Provider Number__

[Namespace Description]( http://ns.electronichealth.net.au/id/medicare-provider-number/index.html){:target="_blank"}

[METeOR Description](http://meteor.aihw.gov.au/content/index.phtml/itemId/601956){:target="_blank"}

A unique numeric identifier for the Medicare service provider to facilitate the payment of patient/provider
claims and a unique alphanumeric identifier for a Medicare service provider's location, which may be the place
of a provider’s practice or the place of equipment.

**Examples**

[Practitioner Role with Provider Number and ANZSCO coded role](PractitionerRole-example0.html)

repository: satyapy/au-fhir-base

repo_name: satyapy/au-fhir-base


text:
# ESDNet
A framework for writing Elgato Stream Deck plugins with the .NET framework.

## Usage:
- Create a new c# WinForms project.
- Add a reference to ESDNet.dll.
- Delete the form and clear out Program.Main() to be:
``` csharp
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            // Tell the library our command line arguments, and pass an instance of our plugin.
            ESDNet.ESDManager.Initialize(args, new TestPlugin());
        }
    }
```
- Replace `TestPlugin` with the name of the class that you created to implement the IESDPlugin interface.
- Follow the standard Elgato plugin tutorial for building resources and directories.
  - You must ensure that you copy `ESDNet.dll`, `Newtonsoft.Json.dll`, and `websocket-sharp.dll` to the plugin folder as well.
- See `ESDTestPlugin` for an example in `C#` that emulates the Elgato CPU test plugin.

repository: dtzxporter/ESDNet

repo_name: dtzxporter/ESDNet


text:
# Arnium leporinum (Cain) N. Lundq. & J.C. Krug, 1972 SPECIES

#### Status
SYNONYM

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

#### Published in
in Lundqvist, Symb. bot. upsal. 20(no. 1): 234 (1972)

#### Original name
Sphaeria leporina Cain

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Sordariales/Lasiosphaeriaceae/Podospora/Podospora leporina/ Syn. Arnium leporinum/README.md

repo_name: mdoering/backbone


text:
# Troubleshooting

From the [deploying doc](how-admin-deploy-the-broker.md), you will learn that the `meta-azure-service-broker` is pushed as an application to Cloud Foundry. So, you can use the [steps](http://docs.cloudfoundry.org/devguide/deploy-apps/troubleshoot-app-health.html) to troubleshoot application deployment and health.

The following sections describe common issues you might encounter when attempting to deploy and run your service broker, and possible resolutions.

1. The environment and service principal are not configured.

      You may receive the following error message if you run `cf logs meta-azure-service-broker --recent`:

      ```
      Error: please make sure the configurations are correct: ["config.serviceBroker.credentials.authUser","config.serviceBroker.credentials.authPassword","config.database.provider","config.database.server","config.database.user","config.database.password","config.database.database"]
      ```

      If this happens, please follow [the steps](how-admin-deploy-the-broker.md#deploy-meta-azure-service-broker-as-an-app) to configure and deploy the service broker.

1. The roles of the service principal are not configured correctly. [#18](https://github.com/Azure/meta-azure-service-broker/issues/18)

      You may receive the following error message:

      ```
      # cf create-service azure-storageblob standard myblobservice -c ./examples/storageblob-example-config.json
      Creating service instance myblobservice in org default_organization / space azure as admin...
      FAILED
      Server error, status code: 502, error code: 10001, message: Service broker error: The client '4c7a94e7-1462-4808-9077-94df41862a82' with object id '4c7a94e7-1462-4808-9077-94df41862a82' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/c241176f-318e-4552-8e2b-2d26fecf8095/resourcegroups/craigw-CF'.
      ```

      If this happens, do each of the following:

      * If you want to create all the services, you may need the role `Contributor`.

      * If you do not need to provision all the services, you can follow [RBAC: Built-in roles](https://azure.microsoft.com/en-us/documentation/articles/role-based-access-built-in-roles/) to get the appropriate roles. For example, you can use `Storage Account Contributor` if you only use the service broker to create a storage account.

1. The backend database is not configured correctly.

      Please make sure the following configuration is correct.

      ```
      "database": {
        "provider": "sqlserver",
        "server": "<REPLACE-WITH-AZURE_SERVICE_BROKER_DATABASE_SERVER>",
        "user": "<REPLACE-WITH-AZURE_SERVICE_BROKER_DATABASE_USER>",
        "password": "<REPLACE-WITH-AZURE_SERVICE_BROKER_DATABASE_PASSWORD>",
        "database": "<REPLACE-WITH-AZURE_SERVICE_BROKER_DATABASE_NAME>"
      }
      ```

      For example, if your configurations are:

      ```
      "database": {
        "provider": "sqlserver",
        "server": "myservername.database.windows.net",
        "user": "myusername",
        "password": "mypassword",
        "database": "mydatabasename"
      }
      ```

      You can use the following command to verify. For example, if your configurations are:

      ```
      mssql --server "myservername.database.windows.net" --database "mydatabasename" --user myusername@myservername --pass "mypassword" --encrypt
      ```

      If you can login the database, that means the configuration is correct.

1. The backend database can not be accessed.

      Please follow the [steps](https://azure.microsoft.com/en-us/documentation/articles/sql-database-configure-firewall-settings/) to make sure the SQL database can be accessed by the service broker.

1. If the service instance become an orphan instance, you may hit the following error message.

      ```
      azureuser@binxi022202:~$ cf delete-service mydocdb -f
      Deleting service mydocdb in org default_organization / space azure as admin...
      FAILED
      Server error, status code: 502, error code: 10001, message: Service instance mydocdb: The service broker returned an invalid response for the request to http://meta-azure-service-broker.<IP_ADDRESS>.xip.io/v2/service_instances/959c9623-b7bf-4d23-afe8-e2438c5ef0fe. Status Code: 500 Internal Server Error, Body: {"message":"getaddrinfo ENOTFOUND binxi052001docdb.documents.azure.com binxi052001docdb.documents.azure.com:443"}
      ```

      Because of some reason, the DocumentDB database is removed from Azure. The service instance become orphan. In this case, you need to purge the service instance.

      ```
      azureuser@binxi022202:~$ cf purge-service-instance mydocdb -f
      ```

1. When you create the meta service broker, if you get the following error, the cause may be that a same service broker is created before.

      ```
      Server error, status code: 502, error code: 270012, message: Service broker catalog is invalid: Service ids must be unique, Service name must be unique
      ```

      There are two options to fix this issue.

      * Option 1 (Recommended): Update the service broker.

        ```
        cf update-service-broker demo-service-broker $authUser $authPassword <URL of the app meta-azure-service-broker>
        ```

      * Option 2

        1. Remove the previous service broker and the services it created.

          ```
          cf delete-service SERVICE_INSTANCE
          cf delete-service-broker SERVICE_BROKER
          ```

        2. Re-create the service broker.

          ```
          cf create-service-broker demo-service-broker $authUser $authPassword <URL of the app meta-azure-service-broker>
          ```

1. If you hit a DNS resolving issue, you need to retry the CF CLI command.

      For example:

      ```
      $ ~/azure-storage-consumer$ cf bind-service azure-storage-consumer myblobservice
      Binding service myblobservice to app azure-storage-consumer in org default_organization / space azure as admin...
      FAILED
      Server error, status code: 502, error code: 10001, message: The service broker could not be reached: http://meta-azure-service-broker.<IP_ADDRESS>.xip.io/v2/service_instances/ef91a753-233d-444d-8210-c440ed8a6470/service_bindings/672972b0-3f04-44da-8635-eca4626902ea
      ```

      Retry the CF CLI command.

      ```
      $ ~/azure-storage-consumer$ cf bind-service azure-storage-consumer myblobservice
      Binding service myblobservice to app azure-storage-consumer in org default_organization / space azure as admin...
      OK
      ```

1. If you hit status code 409, which is a Resource Conflict issue...

      1. Type A:

          ```
          FAILED
          Server error, status code: 409, error code: 10001, message: Service broker error: The storage account named teststorage is already taken.
          ```

          The resource with the name is already existed on Azure. Please try another resource name according to the message.

      2. Type B:

          ```
          FAILED
          Server error, status code: 409, error code: 10001, message: Service broker error: Failed in inserting the record for (instanceId: 7fad8e93-f124-48b7-8736-47750d2d7c7c) into the broker database. It is caused by that a record with the same azureInstanceId exists. DB Error: {"name":"RequestError","message":"Violation of UNIQUE KEY constraint 'UQ__instance__78EDBBCE6074808B'. Cannot insert duplicate key in object 'dbo.instances'. The duplicate key value is (azure-storage-teststorage).","code":"EREQUEST","number":2627,"lineNumber":1,"state":1,"class":14,"serverName":"testsql","procName":"","precedingErrors":[]}
          ```

          Error occurs in the broker database. The same resource name of the service is found in the database. It is because another service instance has taken the resource name.
          You should try another one.

          Or a service instance with the resource name was purged by `cf purge-service-instance <service-instance-name>`.
          If you are sure it is this case, you could use following SQL to delete the invalid record:

          ```
          SELECT * FROM instances WHERE parameters LIKE '%"<resource-name-parameter>":"<resource-name>"%'
          ```

          for example:

          ```
          SELECT * FROM instances WHERE parameters LIKE '%"storageAccountName":"storageil3l080br05no4n1"%'
          ```

          If deleting failed because of foreign key, please use following SQL to delete the corresponding record in the table **bindings** first:

          ```
          SELECT * FROM bindings WHERE parameters LIKE '%"<resource-name-parameter>":"<resource-name>"%'
          ```

## Appendix

* [Troubleshooting Application Deployment and Health](http://docs.cloudfoundry.org/devguide/deploy-apps/troubleshoot-app-health.html)

* [Troubleshooting Applications](http://docs.cloudfoundry.org/running/troubleshooting/troubleshooting-apps.html)

* [The troubleshooting doc of Cloud Foundry on Azure](https://github.com/cloudfoundry-incubator/bosh-azure-cpi-release/blob/master/docs/additional-information/troubleshooting.md)

* [Service Broker API](http://docs.cloudfoundry.org/services/api.html)

repository: Azure/meta-azure-service-broker

gha_language: JavaScript

repo_name: Azure/meta-azure-service-broker


text:
---
currentMenu: home
layout: default
---

`woffle` aims to be an opinionated (but sensible) project template for the
majority of your language processing tasks.

What this means is that by default it *prefers* some tools over others. However,
we have tried to make it as easy as possible for you to quickly add your own
code in to perform additional functionality whilst still fitting
in and communicating well with all of the other pieces.

Working on projects such as
[pyGrams](https://github.com/datasciencecampus/pygrams),
[pelican cove](https://github.com/datasciencecampus/pelican_cove) and
[optimus](https://github.com/datasciencecampus/optimus) it became clear that our
NLP projects generally consist of up to 4 tasks.

1. **Parsing**
   Data tends to need cleaning before we can really do a lot of NLP stuff with
   it.
2. **Embedding**
    Because computers are really bad at understanding language we come
    pre-packed with various ways of converting all of that text into numbers so
    that your computer can do stuff. This can sometimes seem like a contrivance
    where we consider sentiment scores for text as an 'embedding' but all we
    mean is "generating a numeric representation for text" and this hopefully
    follows.
3. **Clustering**
   Whether grouping sentences with like sentiment, generating hierarchical
   classifications of text or looking at some density based clustering
   mechanisms it often helps to collect things that are similar to understand
   what is going on.
4. **Selection**
   Oftentimes, such as when generating a hierarchical classification of things,
   we want to replace a cluster of text with a single entity in some way.

Now I'll be able to do these faster and with less code using `woffle`. If you
wish to implement your task using woffle then please see [Getting
Started](./getstarted.md).


text:
# Prometheus Pagerduty Exporter Helm Chart

A Prometheus exporter for [PagerDuty](https://www.pagerduty.com/) metrics.

This chart bootstraps a [PagerDuty Exporter](https://github.com/webdevops/pagerduty-exporter) deployment on a Kubernetes cluster using the Helm package manager.

## Get Repo Info

```console
helm repo add wasfree https://wasfree.github.io/prometheus-pagerduty-exporter
helm repo update
```

_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._

## Install Chart

```console
helm install [RELEASE_NAME] wasfree/prometheus-pagerduty-exporter [flags]
```

_See [configuration](#configuration) below._

_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._

## Uninstall Chart

```console
helm uninstall [RELEASE_NAME]
```

This removes all the Kubernetes components associated with the chart and deletes the release.

_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._

## Upgrading Chart

```console
helm upgrade [RELEASE_NAME] wasfree/prometheus-pagerduty-exporter [flags]
```

_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._

## Configuration

See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:

```console
helm show values wasfree/prometheus-pagerduty-exporter
```

You may also run `helm show values` on this chart's [dependencies](#dependencies) for additional options.

repository: wasfree/prometheus-pagerduty-exporter

branch_name: refs/heads/main

gha_language: Smarty

repo_name: wasfree/prometheus-pagerduty-exporter


text:
# OpenSSL file lock
This project serve a noobs way to lock a file using open SSL.

## Getting Started
Download or clone this repository to your local system.
### Prerequisites
You need to have OpenSSL installed
### How to Run...

Download this project to your machine.

#### Unlock Files
Move the files you want to unlock to this directory

```
bash unlock.sh
```
Provide the key used while encryption. Your files will be decrypted.

## Authors
* **Amanpreet Walia**
## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details


text:
**Lesson Objective**:

* Learn why well structured code is vitally important to a web app's structure, especially as the app gets larger.
* Usage of *MV** organizational framework to create cleaner projects.

repository: nuhman/design-patterns

path: /P1 - Changing Expectations/README.md

repo_name: nuhman/design-patterns


text:
# Getting Started with AirPPT

Welcome to AirPPT. Easier to say AirPowerPoint :)

Powerpoint's simple drag and drop interface makes it easy to prototype and demonstrate UIs. However, we have to startover in "real" code when we begin implementing our UI.

AirPPT lets you go from slideshow canvas to functional UI using Powerpoint as a WYSISYG editor. It's also designed to be extensible!

This guide shows you how to take a slideshow and convert a slide to html. You'll use the [AirPPT CLI tool](https://www.npmjs.com/package/airppt).

## Prerequisites

Before you begin, make sure your development environment includes `Node.js®` and an npm package manager.

### Node.js

Airppt requires `Node.js`

- To check your version, run `node -v` in a terminal/console window.

- To get `Node.js`, go to [nodejs.org](https://nodejs.org "Nodejs.org").

### npm package manager

Airppt CLI depends on features and functionality provided by libraries that are available as [npm packages](https://docs.npmjs.com/getting-started/what-is-npm). To download and install npm packages, you must have an npm package manager.

This Quick Start uses the [npm client](https://docs.npmjs.com/cli/install) command line interface, which is installed with `Node.js` by default.

To check that you have the npm client installed, run `npm -v` in a terminal/console window.

## Step 1: Install the AirPPT CLI

You use the AirPPT CLI
to point to a slideshow and generate a UI or debug the output of a renderer.

Install the AirPPT CLI globally.

To install the CLI using `npm`, open a terminal/console window and enter the following command:

```
  npm install -g airppt
```

## Step 2: Create a sample Powerpoint

You can download a sample powerpoint with some basic slides [here](https://github.com/airpptx/samples/blob/master/apps.pptx).

Not all powerpoint shapes are supported yet. A list of supported elements can be found [here](#limitations). However, you can also extend the functionality and add support for your own [shape renderers](#shape-renderer-1)

## Step 3: Generate the application

You can generate the HTML and CSS using the CLI tool

1. Navigate to the same directory as the powerpount (`apps.pptx`).

2. Run the command

```
airppt -i ./sample.pptx --slide 1 -o ./mypage
```

3. Navigate to the `mypage` directory and open `index.html`

#### Bonus

5. You can also reuse the output to build a working application.

Read the getting started with `Electron` to get started.

## Limitations

AirPPT is a work in progress. Not all shapes nor cases are accounted for. I've tried my best to call out a few of the limitations here and the shapes that are supported.

### Extending AirPPT

The framework is designed to be extensible so that you can add back [your own shapes and custom elements](#shape-renderer-1).


text:
# Custom Constraints #
This Grails plugin allows you to create custom domain Constraints for validating Domain objects.

Without this plugin, if you have a custom validation that you want to perform on
a Domain object, you have to use a generic *validator* constraint and define it inline.
With this plugin, you can create reusable, shareable constraints that you can use on
multiple Domain objects. You can then package Constraints in plugins of their own and reuse them across
projects as well.

### Please Note: ###
Plugins are not loaded during Unit Tests, so you cannot test constraints in your unit tests. They should work during
integration tests though, so you can test them there.

## Get Started ##

1. Create a groovy file in */grails-app/utils/* called *Constraint.groovy
2. Implement a validate closure
3. Add appropriate messages to */grails-app/i18n/messages.properties*
4. Apply the validation to a Domain class

## Create a Constraint with a validate closure ##
Under */grails-app/utils/*:

	class UsPhoneConstraint {
		def validate = { val ->
			return val ==~ /^[01]?[- .]?(\([2-9]\d{2}\)|[2-9]\d{2})[- .]?\d{3}[- .]?\d{4}$/
		}
	}

## Add messages to messages.properties ##
Unless you set the *defaultMessage* static property, then it is a good idea to add an entry to messages.properties
with a default format string to show the user if validation fails.

The default format is: default.invalid.constraintName.message

## Apply the Constraint to a domain class ##
	class Person {
	    String phone

		static constraints = {
		    phone(usPhone: true)
		}
	}

## Details

### Constraint parameters ###
Any parameters passed to the constraint will be available in your Constraint object via the *params*
property.

e.g.
	class FooDomain {
		String prop
		static constraints = {
			prop(someConstraint: ['a':1, 'b':2])
		}
	}

	def validate = { val ->
		def a = params.a
		def b = params.b
		return val == a + b
    }

### validate closure (required) ###
The validate closure is the main part of the algorithm where validation is performed. It should return a value to indicate
if the validation was successful.

Successful validation is indicated by the return of:

1. true
2. null

An unsuccessful validation is indicated by the return of:

1. false
2. A String which is used as the error message to show the user
3. A Collection with first element being message code, and following elements being message parameters
4. An Array with first element being message code, and following elements being message parameters

The validate closure takes up to 3 parameters:

1. The value to be validated
2. The target object being validated
3. The validation errors collection

e.g.
	def validate = { thePropertyValue, theTargetObject, errorsListYouProbablyWontEverNeed ->
		return null != thePropertyValue && theTargetObject.rocks()
    }

### supports closure (optional) ###
Your Constraint can optionally implement a *supports* closure that will allow you to restrict the types
of the properties that the Constraint can be applied to. This closure will be passed a single argument, a Class that
represents the type of the property that the constraint was applied to.

e.g.:

    class Foo {
        Integer bar
        static constraints = {
            bar(custom: true)
        }
    }

The CustomConstraint will get an Integer class passed to its *supports* closure to check.

### name property (optional) ###
The default name of the Constraint to use in your Domain object is the name of the class, camelCased,
without the tailing Constraint.

e.g.:

1. MyConstraint -> my
2. UsPhoneConstraint -> usPhone

You can override this by providing a static name variable in your constraint definition:

   static name = "customName"

### defaultMessageCode property (optional) ###
The defaultMessageCode property defines the default key that will be used to look up the error message
in the *grails-app/i18n/messages.properties* files.

The default value is *default.$name.invalid.message*
You can override this by providing a static variable:

	static defaultMessageCode = "default.something.unset.message"

### failureCode property (optional) ###
The failureCode property defines a key that can be used to lookup error messages in the *grails-app/i18n/messages.properties* files.
The value of this property is appended to the end of the Class.property name that the Constraint is applied to.

The default value is *invalid.$name*
e.g.:
With a CustomConstraint defined the default entry in messages.properties will be something like:
Person.firstName.custom.invalid

You can override this by providing a static variable:

	static failureCode = "unset.constraint"

### defaultMessage property (optional) ###
If no value is found in *messages.properties* for the defaultMessageCode or the failureCode then this message will be
used if it is supplied.

### expectsParams property (optional) ###
The expectsParams static property allows you to define the required parameters for the Constraint.
The expectsParams can be one of:

1. Boolean true, saying a parameter is expected
2. A List of the named parameters that are expected in a map
3. A Closure allowing you to validate the parameters yourself

e.g.:

	static expectsParams = ['start', 'end']
	static expectsParams = true
	static expectsParams = { parameters -> // ... do something }

### persistent property (optional) ###
If you need access to the database to perform your validation, you can make your Constraint a persistent constraint by
setting the static property *persist = true* in your Constraint class.

This will make a *hibernateTemplate* property available to your Constraint that you can use to access the database.
Generally these will be more complicated to write because they require knowledge of the details of the Domain

Set this property in your Constraint class with:

	static persistent = true

> ### Note ###
> Persistent constraints are only supported when using the Hibernate plugin.

## Simple Example ##

	class SsnConstraint {

	    static name = "social"
	    static defaultMessageCode = "default.not.social.message"

	    def supports = { type ->
	        return type!= null && String.class.isAssignableFrom(type);
	    }

	    def validate = { propertyValue ->
	        return propertyValue ==~ /\d{3}(-)?\d{2}(-)?\d{4}/
	    }
	}

	class Person {
		String ssn
		static constraints = {
			ssn(social: true)
		}
	}

## Example With Params ##

	class StartsAndEndsWithConstraint {
	   	static expectsParams = ['start', 'end']

		def validate = { propertyValue, target ->
		   return propertyValue[0] == params.start && propertyValue[-1] == params.end
		}
	}

	class MyDomain {
		String foo
		static constraints = {
			foo(startsAndEndsWith: [start: 'G', end: 'f'])
		}
	}

## Example Persistent Constraint ##

	import org.codehaus.groovy.grails.commons.DomainClassArtefactHandler;
	import org.hibernate.Criteria;
	import org.hibernate.FlushMode;
	import org.hibernate.HibernateException;
	import org.hibernate.Session;
	import org.hibernate.criterion.Restrictions;
	import org.springframework.orm.hibernate3.HibernateCallback;

	import java.util.ArrayList;
	import java.util.Collections;
	import java.util.Iterator;
	import java.util.List;

	class UniqueEgConstraint {

	    static persistent = true

	    def dbCall = { propertyValue, Session session ->
	        session.setFlushMode(FlushMode.MANUAL);

	        try {
	            boolean shouldValidate = true;
	            if(propertyValue != null && DomainClassArtefactHandler.isDomainClass(propertyValue.getClass())) {
	                shouldValidate = session.contains(propertyValue)
	            }
	            if(shouldValidate) {
	                Criteria criteria = session.createCriteria( constraintOwningClass )
	                        .add(Restrictions.eq( constraintPropertyName, propertyValue ))
	                return criteria.list()
	            } else {
	                return null
	            }
	        } finally {
	            session.setFlushMode(FlushMode.AUTO)
	        }
	    }

	    def validate = { propertyValue ->
	        dbCall.delegate = delegate
	        def _v = dbCall.curry(propertyValue) as HibernateCallback
	        def result = hibernateTemplate.executeFind(_v)

	        return result ? false : true    // If we find a result, then non-unique
	    }
	}

## Notes ###

### Dependency Injection ###
Constraints are standard Grails Artefacts which means that standard things like dependency injection are supported.
You can inject a service or other Spring managed beans into your Constraint class if you need to use it.

e.g.

    class MyCustomConstraint {
		def someService

		def validate = { val ->
			return someService.someMethod(val)
		}
	}

### Logging ###
Like dependency injection, your constraints classes will have access to the *log* property if you want to do logging
in them.

e.g.

    class MyCustomConstraint {
		def validate = { val ->
			log.debug "Calling MyCustomConstraint with value [${val}]"
			// ...
		}
	}

### Testing ###
@TestMixin support has been added to make Constraints easy to test using Unit tests.

e.g.

    @TestMixin(ConstraintUnitTestMixin)
    class UsPhoneConstraintTest {
        @Test
        void testUsPhoneValidation() {
            def constraint = testFor(UsPhoneConstraint)

            // Params are automatically mixed in to the test class and exposed
            // to the constraint with the call above.
            params = true

            assertTrue constraint.validate("5135551212")
            assertFalse constraint.validate("bad")
        }
    }

repository: sumitgogia/grails-constraints

extension: markdown

repo_name: sumitgogia/grails-constraints


text:
# Faster R-CNN Modification for Pedestrain Detector

# Introduction

This is a Pytorch implementaion on pedestrain detector modified from this [Repository](https://github.com/jwyang/faster-rcnn.pytorch.git).

Implementation ideas come from [CityPersons: A Diverse Dataset for Pedestrian Detection
](https://arxiv.org/abs/1702.05693). We get the same missing rate 15.4% with the paper.

# Usage

1. *git clone https://github.com/Justinhzy/pedestrian-detector.git*

2. Download weights to the folder *data/save_dir*
[vgg16_weights](https://www.dropbox.com/s/abi13snqotokj0p/faster_rcnn_1_8_3759.pth?dl=0)

3. run *test_net.py*

repository: happyConan/pedestrian-detector

repo_name: happyConan/pedestrian-detector


text:
# Equilibria Android App

> Equilibria Android App enables users to securely store, send, receive XEQ and monitor their balances.

> Equilibria Wallet is a fully open-source, decentralized and free app, first designed by WooKey, that provides the best possible     experience for users.

## Less Privacy Collection

Doesn’t collect and retain personal information unless it's integral to our product or service.

## Fully Open Source

Secure, reliable, auditable. Available to be developed by the community.

## Better User Experience

Simple, efficient, ease of use. The easiest way to get started with cryptocurrencies.

- Multi-Language UI
- Custom Node Addition
- Perfect For Mobile
- QR code Payment
- Cross-platform Support

## How To Build

https://github.com/WooKeyWallet/monero-android-lib

## License

MIT


text:
My Playcraft Boilerplate
------------------------

You want to compile your Playcraft game? Choose your poison :
-CocoonJS
-AppJS
-Web Browser
-Ejecta
-Ouya?

WIP

Compatible with playcraft 0.5.4

PLAYCRAFT IS NOT INCLUDED
-------------------------

Place the playcraftjs folder inside of the components directory

Workflow
--------

Transpile - grunt trans

Watch - grunt watch

Build - grunt build

Currently Supports
------------------

-CocoonJS ( except box2dweb )

-Modern Browsers

repository: jcrapsey/Playcraft-Boilerplate

repo_name: jcrapsey/Playcraft-Boilerplate


text:
Arch Linux reinstall
====================

This provides a "simple" way to (re)install my Arch Linux Laptop(s).

## Warning

The disk you say to setup to will be completely formatted.

## Steps

### Prepare

- download [the iso](https://www.archlinux.org/download/) somewhere
- put the iso on a usb or cd
- boot your system with the iso

### Basic live env setup

#### keyboard setup

If you need to change your keyboard layout like me, first thing to run is

```
$ loadkeys be-latin1
```

Or `loadkeys` with your keymap.

#### wifi

Configure wifi if needed

```
$ wifi-menu
```
#### prepare usb 'key' device

If you have an empty device you also have to format it.

```
$ mkfs.ext2 -L keydrive /dev/sdb1
```

Make the `/media/usb` directory.

```
$ mkdir -p /media/usb
```

And then mount the usb 'key' device to `/media/usb`

```
$ mount /dev/sdb1 /media/usb
```

#### get the archlinux-reinstall repo

We need git to get the archlinux-reinstall repo

```
$ pacman -Sy git
```

clone the repo

```
$ git clone https://github.com/BlackIkeEagle/archlinux-reinstall.git
```

Go into the new folder and run 'a' installer (see [installer types](#installer-types))

```
$ cd archlinux-reinstall
$ ./install.sh
```

If you run as described above you will get a minimal install of archlinux with my preferred kernel and configuration.

#### reboot and post install

Reboot and remove the installation medium.

when logged in as root, first run `./post-install-first-run.sh`. And then continue configuring whatever you want.

### installer types

- install.sh: minimal install
- install-plasma.sh: installation with common packages for plasma desktop
- install-deepin.sh: installation with common packages for deepin desktop
- install-i3.sh: installation with common packages for i3 wm
- install-fluxbox.sh: installation with common packages for fluxbox wm

By default there is a user 'ike', this you have to change manually in the `post-install-first-run.sh` script.

repository: Miljar/archlinux-reinstall

gha_license_id: MIT

repo_name: Miljar/archlinux-reinstall


text:
# Binary Search Tree Theory

## Basic concepts

![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/Binary_search_tree.svg/288px-Binary_search_tree.svg.png "BST")

Binary Search Tree, is a node-based binary tree data structure which has the following properties:

- The left subtree of a node contains only nodes with keys less than the node’s key.
- The right subtree of a node contains only nodes with keys greater than the node’s key.
- The left and right subtree each must also be a binary search tree.
- There must be no duplicate nodes.

## Time Complexity
**Average**

| Access | Search | Insert | Delete |
|:-------:|:-------:|:-------:|:-------:|
| O(logn) |O(logn)  | O(logn) | O(logn)  |

**Worst**

| Access | Search | Insert | Delete |
|:-------:|:-------:|:-------:|:-------:|
| O(n) | O(n) | O(n) | O(n) |

The worst O times are only with the tree has one branch (aka linked-list)

## Space Complexity
`O(n)`

## Operations
- `Value search(Key)`
- `void insert(Key, Valye)`
- `void delete(Key)`
- `void preOrderTraversal()`
- `void inOrderTraversal()`
- `void postOrderTraversal()`

Delete operation: (https://www.youtube.com/watch?v=x6At0nzX92o)

- When the node is leaf just delete it.

- When the node has one child delete the node and "move up" the child
of the deleted node.

- When the node has 2 children, go to the right sub-tree, and find the most
left leaf. Replace the node you want to delete with the leaf and delete the node
easily now that it is a leaf node.

- When the node has 2 children but the right sub-tree has no left nodes replace
the first right child of the node you want to delete with the soon to be delete node.
Delete that node. This is easy as the node has only one children.

## Real Life Use

- Implementation of sorting algorithms.
- User in many search application.

repository: nick-kanakis/Data-Structures

repo_name: nick-kanakis/Data-Structures


text:
---
layout: page
title: Arihant Jain's Project Portfolio Page
---

## Project: NuFash

NuFash is a desktop clothing application used for organising wardrobes, and taking better clothing decisions.
The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about
12 kLoC.

Given below are my contributions to the project.

* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s2.github.io/tp-dashboard/?search=Arihant%20Jain&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2021-02-19)

* **Project management**:
    * Managed releases `v1.1` - `v1.4` (3 releases) on GitHub

* **Enhancement to Existing Feature**: Added the ability to select garment based on user input
    * What it does: Select a garment to check out of the wardrobe, indicating that it shall be worn today.
    * Justification: This feature improves the product significantly because a user would require to easily select his
      garment, allowing nufash to know that the particular garment has been checked out for the day.
    * Highlights: This enhancement affects some of our new features, such as the view feature, and potentially new features as well. It required an in-depth analysis of design alternatives.
      The implementation too was challenging as it required changes to the existing add and delete commands.

* **Enhancements to existing features**:
    * Updated the attributes, such as DressCode, of the Person to fit the attributes of a Garment.
    * Added the LastUse attribute, to allow the garment to be viewed by date of last use.
    * Updated the observable list sorting order, to ensure that the garments are compartmentalised.
    * Wrote additional tests for existing features to increase test coverage.

* **Documentation**:
    * User Guide:
        * Finalised the documentation of entire UG
          [\#95](https://github.com/AY2021S2-CS2103T-T12-1/tp/pull/95/files)
        * Added the `list` and `help` commands into the UG :
          [\#32](https://github.com/AY2021S2-CS2103T-T12-1/tp/pull/32/files)
    * Developer Guide:
        * Added User Stories into DG
          [\#19](https://github.com/AY2021S2-CS2103T-T12-1/tp/pull/19/files)

* **Community**:
    * PRs reviewed (with non-trivial review comments):
      [\#45](https://github.com/AY2021S2-CS2103T-T12-1/tp/pull/155),
      [\#56](https://github.com/AY2021S2-CS2103T-T12-1/tp/pull/151)
    * Reported bugs and suggestions for other teams in the class (examples:
      [1](https://github.com/arihantjain97/ped/issues/6), [2](https://github.com/arihantjain97/ped/issues/5),
      [3](https://github.com/arihantjain97/ped/issues/3))

gha_language: Java

gha_license_id: NOASSERTION


text:
PlatformStack Operator
-----------------------

Use Golang version 1.13 (1.14 is also okay)

Turn off GOMODULES:
export GO111MODULE=off

See setgopath.sh

source setgopath.sh

Making changes to Operator API (types.go)
-------------------------------------------
mkdir vendor/k8s.io/code-generator/hack
cp hack/boilerplate.go.txt vendor/k8s.io/code-generator/hack/.
./hack/update-codegen.sh

./build-artifact.sh <latest | versioned>

Update versions.txt before creating new versioned artifact.

Follow semver for tagging Docker images

Update artifacts/deployment/deployment.yaml

**DO NOT** create vendor directory running: go mod vendor

Vendoring seems to over-ride module versions defined in go.mod and
brings in newer versions. This breaks the build.
For building the code we need precisely those versions of the modules
defined in go.mod.

The modules will be downloaded in following location:
$GOPATH/mod/

repository: ming-ddtechcg/kubeplus

repo_name: ming-ddtechcg/kubeplus


text:
TwitterFavorite
=======================

A boilerplate for **Node.js** Twitter Automation applications.

Hat tip to Sahat Yalkabov for his [Hackathon Starter](https://github.com/sahat/hackathon-starter) project which is an inspiration.

Table of Contents
-----------------

- [Features](#features)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Obtaining API Keys](#obtaining-api-keys)
- [Project Structure](#project-structure)
- [List of Packages](#list-of-packages)
- [Useful Tools and Resources](#useful-tools-and-resources)
- [Recommended Design Resources](#recommended-design-resources)
- [Recommended Node.js Libraries](#recommended-nodejs-libraries)
- [Recommended Client-side Libraries](#recommended-client-side-libraries)
- [Pro Tips](#pro-tips)
- [FAQ](#faq)
- [Cheatsheets](#cheatsheets)
    - [ES6](#-es6-cheatsheet)
    - [JavaScript Date](#-javascript-date-cheatsheet)
- [Deployment](#deployment)
- [Docker](#docker)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [License](#license)

Features
--------
- **API Examples**: Twitter

Prerequisites
-------------

- [Node.js 6.0+](http://nodejs.org)
- Command Line Tools
 -  **Mac OS X:** [Xcode](https://itunes.apple.com/us/app/xcode/id497799835?mt=12) (or **OS X 10.9+**: `xcode-select --install`)
 -  **Windows:** [Visual Studio](https://www.visualstudio.com/products/visual-studio-community-vs)
 -  **Ubuntu** /  **Linux Mint:** `sudo apt-get install build-essential`
 -  **Fedora**: `sudo dnf groupinstall "Development Tools"`
 -  **OpenSUSE:** `sudo zypper install --type pattern devel_basis`

**Note:** If you are new to Node or Express, I recommend to watch
[Node.js and Express 101](https://www.youtube.com/watch?v=BN0JlMZCtNU)
screencast by Alex Ford that teaches Node and Express from scratch. Alternatively,
here is another great tutorial for complete beginners - [Getting Started With Node.js, Express, MongoDB](http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/).

Getting Started
---------------

The easiest way to get started is to clone the repository:

```bash
# Get the latest snapshot
git clone --depth=1 https://github.com/roberjo/TwitterFavorite.git myproject

# Change directory
cd myproject

# Install NPM dependencies
npm install

# Then simply start your app
node index.js
```

**Note:** I highly recommend installing [Nodemon](https://github.com/remy/nodemon).
It watches for any changes in your  node.js app and automatically restarts the
server. Once installed, instead of `node app.js` use `nodemon app.js`. It will
save you a lot of time in the long run, because you won't need to manually
restart the server each time you make a small change in code. To install, run
`sudo npm install -g nodemon`.

Obtaining API Keys
------------------

To use any of the included APIs, you will need
to obtain appropriate credentials: Client ID, Client Secret, API Key, or
Username & Password. You will need to go through each provider to generate new
credentials.

- Sign in at https://apps.twitter.com
- Click **Create a new application**
- Enter your application name, website and description
- For **Callback URL**: http://<IP_ADDRESS>:8080/auth/twitter/callback
- Go to **Settings** tab
- Under *Application Type* select **Read and Write** access
- Check the box **Allow this application to be used to Sign in with Twitter**
- Click **Update this Twitter's applications settings**
- Copy and paste *Consumer Key* and *Consumer Secret* keys into `.env` file

Project Structure
-----------------

| Name                               | Description                                                  |
| ---------------------------------- | ------------------------------------------------------------ |
| **src**/                           | Application source directory.                                |
| **src**/bot.js                     | Main applicaton.                                             |
| **src**/config.js                  | Dotenv and configuration settings.                           |
| **src**/**helpers**/isReply.js     | Detects if a tweet is a reply.                               |
| .gitignore                         | Git ignore rules.                                            |
| eslintrc.json                      | Linter rules                                                 |
| .env.example                       | Your API keys, tokens, etc.                                  |
| index.js                           | The main application file.                                   |
| package.json                       | NPM dependencies.                                            |
| package-lock.json                  | Contains exact versions of NPM dependencies in package.json. |

**Note:** There is no preference how you name or structure your views.
You could place all your templates in a top-level `views` directory without
having a nested folder structure, if that makes things easier for you.
Just don't forget to update `extends ../layout`  and corresponding
`res.render()` paths in controllers.

List of Packages
----------------

| Package                         | Description                                                           |
| ------------------------------- | --------------------------------------------------------------------- |
| dotenv                          | Loads environment variables from .env file.                           |
| twit                            | Twitter API library.                                                  |
| languagedetect                  | Text language classifier.                                             |
| log-timestamp                   | Adds timestampes to console log                                       |
| moment                          | Javascript datetime handler                                           |
| underscore                      | Functional programming helpers                                        |

Useful Tools and Resources
--------------------------
- [JavaScripting](http://www.javascripting.com/) - The Database of JavaScript Libraries
- [JS Recipes](http://sahatyalkabov.com/jsrecipes/) - JavaScript tutorials for backend and frontend development.
- [Jade Syntax Documentation by Example](http://naltatis.github.io/jade-syntax-docs/#attributes) - Even better than official Jade docs.
- [HTML to Jade converter](http://html2jade.aaron-powell.com) - Extremely valuable when you need to quickly copy and paste HTML snippets from the web.
- [JavascriptOO](http://www.javascriptoo.com/) - A directory of JavaScript libraries with examples, CDN links, statistics, and videos.
- [Favicon Generator](http://realfavicongenerator.net/) - Generate favicons for PC, Android, iOS, Windows 8.

Recommended Design Resources
----------------------------
- [Code Guide](http://codeguide.co/) - Standards for developing flexible, durable, and sustainable HTML and CSS.
- [Bootsnipp](http://bootsnipp.com/) - Code snippets for Bootstrap.
- [UIBox](http://www.uibox.in) - Curated HTML, CSS, JS, UI components.
- [Bootstrap Zero](https://www.bootstrapzero.com) - Free Bootstrap templates themes.
- [Google Bootstrap](http://todc.github.io/todc-bootstrap/) - Google-styled theme for Bootstrap.
- [Font Awesome Icons](http://fortawesome.github.io/Font-Awesome/icons/) - Reference page.
- [Colors](http://clrs.cc) - A nicer color palette for the web.
- [Creative Button Styles](http://tympanus.net/Development/CreativeButtons/) - awesome button styles.
- [Creative Link Effects](http://tympanus.net/Development/CreativeLinkEffects/) - Beautiful link effects in CSS.
- [Medium Scroll Effect](http://codepen.io/andreasstorm/pen/pyjEh) - Fade in/out header background image as you scroll.
- [GeoPattern](https://github.com/btmills/geopattern) - SVG background pattern generator.
- [Trianglify](https://github.com/qrohlf/trianglify) - SVG low-poly background pattern generator.

Recommended Node.js Libraries
-----------------------------

- [Nodemon](https://github.com/remy/nodemon) - Automatically restart Node.js server on code changes.
- [geoip-lite](https://github.com/bluesmoon/node-geoip) - Geolocation coordinates from IP address.
- [Filesize.js](http://filesizejs.com/) - Pretty file sizes, e.g. `filesize(265318); // "265.32 kB"`.
- [Numeral.js](http://numeraljs.com) - Library for formatting and manipulating numbers.
- [Node Inspector](https://github.com/node-inspector/node-inspector) - Node.js debugger based on Chrome Developer Tools.
- [node-taglib](https://github.com/nikhilm/node-taglib) - Library for reading the meta-data of several popular audio formats.
- [sharp](https://github.com/lovell/sharp) - Node.js module for resizing JPEG, PNG, WebP and TIFF images.

Recommended Client-side Libraries
---------------------------------

- [Framework7](http://www.idangero.us/framework7/) - Full Featured HTML Framework For Building iOS7 Apps.
- [InstantClick](http://instantclick.io) - Makes your pages load instantly by pre-loading them on mouse hover.
- [NProgress.js](https://github.com/rstacruz/nprogress) - Slim progress bars like on YouTube and Medium.
- [Hover](https://github.com/IanLunn/Hover) - Awesome CSS3 animations on mouse hover.
- [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/) - Responsive jQuery Lightbox Plugin.
- [jQuery Raty](http://wbotelhos.com/raty/) - Star Rating Plugin.
- [Headroom.js](http://wicky.nillia.ms/headroom.js/) - Hide your header until you need it.
- [X-editable](http://vitalets.github.io/x-editable/) - Edit form elements inline.
- [Offline.js](http://github.hubspot.com/offline/docs/welcome/) - Detect when user's internet connection goes offline.
- [Alertify.js](http://fabien-d.github.io/alertify.js/) - Sweet looking alerts and browser dialogs.
- [selectize.js](http://brianreavis.github.io/selectize.js/) - Styleable select elements and input tags.
- [drop.js](http://github.hubspot.com/drop/docs/welcome/) -  Powerful Javascript and CSS library for creating dropdowns and other floating displays.
- [scrollReveal.js](https://github.com/jlmakes/scrollReveal.js) - Declarative on-scroll reveal animations.

Pro Tips
--------

- When installing an NPM package, add a *--save* flag, and it will be automatically
added to `package.json` as well. For example, `npm install --save moment`.
- Use [async.parallel()](https://github.com/caolan/async#parallel) when you need to run multiple
asynchronous tasks, and then take action, but only when all tasks are completed. For example, you might
want to scrape 3 different websites for some data and render the results in a template
after all 3 websites have been scraped.
- Need to find a specific object inside an Array? Use [_.find](http://lodash.com/docs#find)
function from Lodash. For example, this is how you would retrieve a
Twitter token from database: `var token = _.find(req.user.tokens, { kind: 'twitter' });`,
where 1st parameter is an array, and a 2nd parameter is an object to search for.

FAQ
---

###TODO - Setup FAQ

Cheatsheets
-----------

###  ES6 Cheatsheet

#### Declarations

Declares a read-only named constant.

```js
const name = 'yourName';
```

Declares a block scope local variable.
```js
let index = 0;
```

#### Template Strings

Using the **\`${}\`** syntax, strings can embed expressions.

```js
const name = 'Oggy';
const age = 3;

console.log(`My cat is named ${name} and is ${age} years old.`);
```

#### Modules

To import functions, objects or primitives exported from an external module. These are the most common types of importing.

```js
import name from 'module-name';
```
```js
import * as name from 'module-name';
```
```js
import { foo, bar } from 'module-name';
```

To export functions, objects or primitives from a given file or module.

```js
export { myFunction };
```
```js
export const name = 'yourName';
```
```js
export default myFunctionOrClass
```

#### Spread Operator

The spread operator allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected.

```js
myFunction(...iterableObject);
```
```jsx
<ChildComponent {...this.props} />
```

#### Promises

A Promise is used in asynchronous computations to represent an operation that hasn't completed yet, but is expected in the future.

```js
var p = new Promise(function(resolve, reject) { });
```

The `catch()` method returns a Promise and deals with rejected cases only.

```js
p.catch(function(reason) { /* handle rejection */ });
```

The `then()` method returns a Promise. It takes 2 arguments: callback for the success & failure cases.

```js
p.then(function(value) { /* handle fulfillment */ }, function(reason) { /* handle rejection */ });
```

The `Promise.all(iterable)` method returns a promise that resolves when all of the promises in the iterable argument have resolved, or rejects with the reason of the first passed promise that rejects.

```js
Promise.all([p1, p2, p3]).then(function(values) { console.log(values) });
```

#### Arrow Functions

Arrow function expression. Shorter syntax & lexically binds the `this` value. Arrow functions are anonymous.

```js
singleParam => { statements }
```
```js
() => { statements }
```
```js
(param1, param2) => expression
```
```js
const arr = [1, 2, 3, 4, 5];
const squares = arr.map(x => x * x);
```

#### Classes

The class declaration creates a new class using prototype-based inheritance.

```js
class Person {
  constructor(name, age, gender) {
    this.name   = name;
    this.age    = age;
    this.gender = gender;
  }

  incrementAge() {
    this.age++;
  }
}
```

:gift: **Credits**: [DuckDuckGo](https://duckduckgo.com/?q=es6+cheatsheet&ia=cheatsheet&iax=1) and [@DrkSephy](https://github.com/DrkSephy/es6-cheatsheet).

:top: [**back to top**](#table-of-contents)

###  JavaScript Date Cheatsheet

#### Unix Timestamp (seconds)

```js
Math.floor(Date.now() / 1000);
```

#### Add 30 minutes to a Date object

```js
var now = new Date();
now.setMinutes(now.getMinutes() + 30);
```

#### Date Formatting

```js
// DD-MM-YYYY
var now = new Date();

var DD = now.getDate();
var MM = now.getMonth() + 1;
var YYYY = now.getFullYear();

if (DD < 10) {
  DD = '0' + DD;
}

if (MM < 10) {
  MM = '0' + MM;
}

console.log(MM + '-' + DD + '-' + YYYY); // 03-30-2016
```
```js
// hh:mm (12 hour time with am/pm)
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var amPm = hours >= 12 ? 'pm' : 'am';

hours = hours % 12;
hours = hours ? hours : 12;
minutes = minutes < 10 ? '0' + minutes : minutes;

console.log(hours + ':' + minutes + ' ' + amPm); // 1:43 am
```

#### Next week Date object

```js
var today = new Date();
var nextWeek = new Date(today.getTime() + 7 * 24 * 60 * 60 * 1000);
```

#### Yesterday Date object

```js
var today = new Date();
var yesterday = date.setDate(date.getDate() - 1);
```

:top: [**back to top**](#table-of-contents)

Docker
----------

You will need docker and docker-compose installed to build the application.

- [Docker installation](https://docs.docker.com/engine/installation/)

- [Common problems setting up docker](https://docs.docker.com/toolbox/faqs/troubleshoot/)

After installing docker, start the application with the following commands :

```
# To build the project for the first time or when you add dependencies
docker-compose build web

# To start the application (or to restart after making changes to the source code)
docker-compose up web

```

To view the app, find your docker ip address + port 8080 ( this will typically be http://localhost:8080/ ).  To use a port other than 8080, you would need to modify the port in app.js, Dockerfile and docker-compose.yml.

Deployment
----------

Once you are ready to deploy your app, you will need to create an account with
a cloud platform to host it. This is not the only choice, but they are my top
pick. From my experience, **Heroku** is the easiest to get started with, it will
automatically restart your Node.js process when it crashes, zero-downtime
deployments and custom domain support on free accounts.

### 1-Step Deployment with Heroku

- Download and install [Heroku Toolbelt](https://toolbelt.heroku.com/)
- In terminal, run `heroku login` and enter your Heroku credentials
- From *your app* directory run `heroku create`
- Run `heroku addons:create mongolab`.  This will set up the mLab add-on and configure the `MONGODB_URI` environment variable in your Heroku app for you.
- Lastly, do `git push heroku master`.  Done!

**Note:** To install Heroku add-ons your account must be verified.

Changelog
---------

### 1.0 (March 23, 2018)
- Initial Setup

Contributing
------------

If something is unclear, confusing, or needs to be refactored, please let me know.
Pull requests are always welcome, but due to the opinionated nature of this
project, I cannot accept every pull request. Please open an issue before
submitting a pull request. This project uses
[Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html) with a
few minor exceptions. If you are submitting a pull request that involves
Pug templates, please make sure you are using *spaces*, not tabs.

License
-------

The MIT License (MIT)

Copyright (c) 2018 John B. Roberts

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

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

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

repository: roberjo/TwitterFavorite

repo_name: roberjo/TwitterFavorite


text:
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[RotationMatrix](index.md)/[rotate](rotate.md)

# rotate

fun [rotate](rotate.md)(vec: [Vector](../-vector/index.md)): [Vector](../-vector/index.md)

Applies a rotation to a vector, yielding a rotated vector.

This function transforms a vector in one orientation to a vector in another orientation.

## Parameters

| | |
|---|---|
| vec | The vector whose orientation is to be changed. |

fun [rotate](rotate.md)(state: [StateVector](../-state-vector/index.md)): [StateVector](../-state-vector/index.md)

Applies a rotation to a state vector, yielding a rotated state vector.

This function transforms a state vector in one orientation to a state vector in another orientation. The resulting state vector has both position and velocity reoriented.

## Parameters

| | |
|---|---|
| state | The state vector whose orientation is to be changed. The value of state is not changed; the return value is a new state vector object. |

repository: cosinekitty/astronomy

gha_language: C

repo_name: cosinekitty/astronomy


text:
---
title: "Review: Hackers: Heroes of the Computer Revolution, 25th Anniversary Edition"
date: "2016-03-20"
layout: post
draft: false
category: "Tech"
tags:
  - "apple"
  - "steve jobs"
  - "microsoft"
  - "bill gates"
  - "2016"
  - "goodreads"
description: "A rag tag group of young kids from the west coast create the technology that shapes our world today."
---

[![Hackers: Heroes of the Computer Revolution - 25th Anniversary Edition](https://d.gr-assets.com/books/1328343027m/8646752.jpg)](https://www.goodreads.com/book/show/8646752) [Hackers: Heroes of the Computer Revolution - 25th Anniversary Edition](https://www.goodreads.com/book/show/8646752) by [Steven Levy](https://www.goodreads.com/author/show/32131) My rating: [5 of 5 stars](https://www.goodreads.com/review/show/1576869358)

This book was great in the sense it gave me insights into some of my favorite hackers (well, just two-- Woz and Jobs). I am not sure why Steven included Jobs-- he was more of a businessman and showman than an engineer and it showed in his work. He asked Woz to finish a project for him at Atari. Not the hacker type but if you're going to dedicate a couple hours of the book on Apple Computer, it makes sense to include him. It also inspired me, as a new, self-taught engineer, to rethink math.  I have since looked at Bézier functions and have downloaded a few KU calc books.

If you'd like insights on geeky geniuses who have literally shaped the world today, give it a listen/read. Not all of them are likeable (Richard Stallman) but their quirks are endearing, if you're the geeky, introverted type. 5 stars because I am into that sort of thing and Levy does a good job of cleaning up his earlier mistakes. I wish he would have maybe cut some of the main part of the book to include more about today's hackers but still, a great read. [View all my reviews](https://www.goodreads.com/review/show/1576869358)


text:
# ![(icon)](docs/img/favicon.ico)   LemmInflect

**A python module for English lemmatization and inflection.**

## About
LemmInflect uses a dictionary approach to lemmatize English words and inflect them into forms
specified by a user supplied [Universal Dependencies](https://universaldependencies.org/u/pos/)
or [Penn Treebank](https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html)
tag.  The library works with out-of-vocabulary (OOV) words by applying neural network techniques
to classify word forms and choose the appropriate morphing rules.

The system acts as a standalone module or as an extension to the [spaCy](https://spacy.io/) NLP system.

The dictionary and morphology rules are derived from the
[NIH's SPECIALIST Lexicon](https://lsg3.nlm.nih.gov/LexSysGroup/Projects/lexicon/current/web/index.html)
which contains an extensive set information on English word forms.

A more simplistic inflection only system is available as [pyInflect](https://github.com/bjascob/pyInflect).
LemmInflect was created to address some of the shortcoming of that project and add features, such as...

* Independence from the spaCy lemmatizer
* Neural nets to disambiguate out of vocab morphology
* Unigrams to dismabiguate spellings and multiple word forms

## Documentation
For the latest documentation, see **[ReadTheDocs](https://lemminflect.readthedocs.io/en/latest/)**.

## Accuracy of the Lemmatizer
The accuracy of LemmInflect and several other popular NLP utilities was tested using the
[Automatically Generated Inflection Database (AGID)](http://wordlist.aspell.net/other) as a
baseline. This is not a "gold" standard dataset but it has an extensive list of
lemmas and their corresponding inflections and appears to be generaly a "good" set for testing.
Each inflection was lemmatized by the test software and then compared to the original value in the
corpus. The test included 119,194 different inflected words.

```
| Package                      | Verb  |  Noun | ADJ/ADV | Overall |  Speed   |
|-----------------------------------------------------------------------------|
| LemmInflect 0.2.3            | 96.1% | 95.4% |  93.9%  |  95.6%  |  42.0 uS |
| Stanza 1.5.0 + CoreNLP 4.5.4 | 94.0% | 96.4% |  93.1%  |  95.5%  |  30.0 us |
| spaCy 3.5.0                  | 79.5% | 88.9% |  60.5%  |  84.7%  | 393.0 uS |
| NLTK 3.8.1                   | 53.3% | 52.2% |  53.3%  |  52.6%  |  12.0 uS |
|-----------------------------------------------------------------------------|
```
Speed is in micro-seconds per lemma and was conducted on a i9-7940x CPU. Note, since Stanza is making
calls to the java CoreNLP software, all 120K test cases were grouped into a single call. For Spacy,
all pipeline components were disabled except the lemmatizer. The high per lemma time is probably
a reflection of the general overhead of the pipeline architecture.

## Requirements and Installation
The only external requirement to run LemmInflect is `numpy` which is used for the matrix math that drives the neural nets.  These nets are relatively small and don't require significant CPU power to run.

To install do..

`pip3 install lemminflect`

The project was built and tested under Python 3 and Ubuntu but should run on any Linux, Windows, Mac, etc.. system.  It is untested under Python 2 but may function in that environment with minimal or no changes.

The code base also includes library functions and scripts to create the various data files and neural nets.  This includes such things as...
* Unigram Extraction from the Gutenberg and Billion Word Corpra
* Python scripts for loading and parsing the SPECIALIST Lexicon
* Nerual network training based on Keras and Tensorflow

None of these are required for run-time operation.  However, if you want of modify the system, see the [documentation](https://lemminflect.readthedocs.io/en/latest/test_dev/) for more info.

## Library Usage
To lemmatize a word use the method `getLemma()`.  This takes a word and a Universal Dependencies tag and returns the lemmas as a list of possible spellings.  The dictionary system is used first, and if no lemma is found, the rules system is employed.
```
> from lemminflect import getLemma
getLemma('watches', upos='VERB')
('watch',)
```
To inflect words, use the method `getInflection`.   This takes a lemma and a Penn Treebank tag and returns a tuple of the specific inflection(s) associated with that tag.  Similary to above, the dictionary is used first and then inflection rules are applied if needed..
```
> from lemminflect import getInflection
> getInflection('watch', tag='VBD')
('watched',)

> getInflection('xxwatch', tag='VBD')
('xxwatched',)
```
The library provides lower-level functions to access the dictionary and the OOV rules directly.  For a detailed description see [Lemmatizer](https://lemminflect.readthedocs.io/en/latest/lemmatizer/) or [Inflections](https://lemminflect.readthedocs.io/en/latest/inflections/).

## Usage as a Spacy Extension
To use as an extension, you need spaCy version 2.0 or later.  Versions 1.9 and earlier do not support the extension methods used here.

To setup the extension, first import `lemminflect`.  This will create new `lemma` and `inflect` methods for each spaCy `Token`. The methods operate similarly to the methods described above, with the exception that a string is returned, containing the most common spelling, rather than a tuple.
```
> import spacy
> import lemminflect
> nlp = spacy.load('en_core_web_sm')
> doc = nlp('I am testing this example.')
> doc[2]._.lemma()
test

> doc[4]._.inflect('NNS')
examples
```

## Issues
If you find a bug, please report it on the [GitHub issues list](https://github.com/bjascob/LemmInflect/issues).  However be aware that when in comes to returning the correct inflection there are a number of different types of issues that can arise.  Some of these are not  readily fixable.  Issues with inflected forms include...
* Multiple spellings for an inflection (ie.. arthroplasties, arthroplastyes or arthroplastys)
* Mass form and plural types (ie.. people vs peoples)
* Forms that depend on context (ie.. further vs farther)
* Infections that are not fully specified by the tag (ie.. be/VBD can be "was" or "were")

One common issue is that some forms of the verb "be" are not completely specified by the treekbank tag.  For instance be/VBD inflects to either "was" or "were" and be/VBP inflects to either "am", or "are".  In order to disambiguate these forms, other words in the sentence need to be inspected.  At this time, LemmInflect doesn't include this functionality.

repository: bjascob/LemmInflect

gha_language: Python

repo_name: bjascob/LemmInflect


text:
# HW 5 #

## 4.54 & 4.56 ##

- 4.54: see pipe-nt.hcl
- 4.56: see pipe-lf.hcl

## 5.13 ##

### A ###

![](5.13.svg)

As is shown in the svg, the critical path is the add sequence of %xmm0.

### B ###

3.00

### C ###

1.00

### D ###

Because the mul instruction in the function is data independent from each other, so they can be pipelined and break the lower bound of latency of mul.

## 5.14 ##

### A ###

Because there are still N mul instructions in the function whether there is a loop unrolling. The issue clocks of mul instruction is 1 and cannot be paralleled. So the lower bound of CPE is 1.00.

### B ###

Because the loop unrolling do not change the critical path of the data dependent flow, and 3.00 is the lower bound of the critical path.

Try multiple accumulators(eg. 6 x 6 loop unrolling) and reassociation transformation.


text:
![text alt](https://www.codetriage.com/shubham10divakar/covid-19-tracker/badges/users.svg)
# Covid-19 India Tracker

Track Covid-19 cases in India from Chrome extensions

## Example

![text alt](./example.png)

## Data source

The project is using the [CloudFare API](https://github.com/amodm/api-covid19-in).

## Installing

This extension is currently approved by firefox and also by  Chrome Web Store. Meanwhile, you can install it following the steps below:

For firefox:
https://addons.mozilla.org/addon/covidtracker/
For chrome:
https://chrome.google.com/webstore/detail/covid-19-india-tracker/gpgdlcmclgncbefhgfolgpdngopnppfo/related

For chrome:
- [Download] our source code
- Unzip the downloaded folder
- In Chrome, access the [Extensions](chrome://extensions) page and toggle **Developer Mode** on
- Click on the button **Load unpacked** and select the unzipped folder


text:
# Nico Configuration

----------

Nico supports two formats of configuration, Javascript and JSON. JSON is standard, but Javascript is more flexible.

## Basic

The required fields of nico:

```
{
    "source": "content",
    "output": "_site",
    "permalink": "{{filename}}.html",
    "theme": "_themes/one",
    "writers": [
        "nico.PostWriter",
        "nico.StaticWriter",
        "nico.FileWriter"
    ]
}
```

In Javascript format:

```javascript
exports.source = "content"
exports.output = "_site"
exports.permalink = "{{filename}}.html"

// you can use node library
var path = require('path')
exports.theme = path.join(__dirname, 'one')

exports.writers = [
    'nico.PostWriter',
    'nico.StaticWriter',
    'nico.FileWriter'
]
```

You can set source, output, permalink, theme in the terminal interface, get more help:

```
$ nico build -h
```

## Permalink

Set the permalink style you want. Here are some tips:

```
{{filename}}
{{filename}}.html

{{directory}}/{{filename}}
{{directory}}/{{filename}}.html

{{pubdate.year}}/{{filename}}
{{pubdate.year}}/{{filename}}.html
```

## Writer

Writer is the tool for writing html into your output directory. For example:

- PostWriter will write the post html
- FileWriter will copy files from source to output

Built-in writers:

- nico.PostWriter      - generate a post
- nico.PageWriter      - generate a page
- nico.FileWriter      - copy non-post files
- nico.StaticWriter    - copy static files in theme
- nico.ArchiveWriter   - generate archive
- nico.YearWriter      - generate archive by years
- nico.TagWriter       - generate archive by tags
- nico.TagCloudWriter  - generate tag clound page
- nico.DirectoryWriter - generate archive by direcotories
- nico.FeedWriter      - generate feed

## Cache

For large projects, you would like a cache for fast building. Set a `cachedir` in your config file:

```
cachedir: '.cache'
```

## perpage

Reset number of post on perpage, default is 20.

## post_template

Reset the post template name, default is `post`.

## page_template

Reset the page template name, default is `page`.

## archive_template

Reset the archive template name, default is `archive`.

## archive_output

Reset the archive output, default is `index.html`.

## directory_template

Reset the directory template name, default is `archive`.

## year_template

Reset the year template name, default is `archive`.

## tag_template

Reset the tag template name, default is `archive`.

## feed_template

Reset the feed template name, default is `feed`.

## feed_output

Reset the feed output, default is `feed.xml`.

## process_write

This is a function for processing file write action. Define in your config
file: nico.js

```js
exports.process_write = function(content, filename) {
    if (/\.html$/.test(filename)) {
        return compressHTML(content);
    }
    return content;
}
```

## process_copy

This is a function for procssing file copy action. Define in your config
file: nico.js

```js
exports.process_copy = function(buf, filename) {
    if (/\.css$/.test(filename)) {
        return compressCSS(buf.toString());
    }
    return buf;
}
```


text:
---
layout: post
title: First week of classes!
categories: [general]
tags: [disco-tray-studios, school]
fullview: true
comments: true
---

The first week of classes has came and gone and My Life In Months is coming along nicely. On Friday, there was planned network maintenance that was supposed to last from 5 PM to 8 PM but has lasted from 7 PM and is still affecting login to the Hendrix Student network.

I didn't expect Teams to be **this** computationally intensive, and I am expecting to get a new laptop soon. Currently, I am unable to pull up the webpages that I am working on when I am in a meeting, and I expect that it will be a great help.

Now that I've looked into limitations of Github Pages, I'm not as worried about getting an angry email from Github about traffic/bandwidth usage, since I know that is an issue with a lot of smaller sites on [r/InternetIsBeautiful](https://www.reddit.com/r/InternetIsBeautiful/).

For housekeeping purposes, I think it would be a good idea to remove some of the code that we don't use, such as the Table2CSV, and use CDNs when they are available.

gha_language: HTML


text:
# MongoDb Module

**For additional reference, please review the [source](https://github.com/Codeception/Codeception/tree/2.0/src/Codeception/Module/MongoDb.php)**

Works with MongoDb database.

The most important function of this module is cleaning database before each test.
To have your database properly cleaned you should configure it to access the database.

In order to have your database populated with data you need a valid js file with data (of the same style which can be fed up to mongo binary)
File can be generated by RockMongo export command
Just put it in ``` tests/_data ``` dir (by default) and specify path to it in config.
Next time after database is cleared all your data will be restored from dump.
The DB preparation should as following:
- clean database
- system collection system.users should contain the user which will be authenticated while script performs DB operations

Connection is done by MongoDb driver, which is stored in Codeception\Lib\Driver namespace.
Check out the driver if you get problems loading dumps and cleaning databases.

## Status

* Maintainer: **judgedim**, **davert**
* Stability: **beta**
* Contact<EMAIL_ADDRESS>
*Please review the code of non-stable modules and provide patches if you have issues.*

## Config

* dsn *required* - MongoDb DSN with the db name specified at the end of the host after slash
* user *required* - user to access database
* password *required* - password
* dump - path to database dump
* populate: true - should the dump be loaded before test suite is started.
* cleanup: true - should the dump be reloaded after each test

### dontSeeInCollection

Checks if collection doesn't contain an item.

``` php
<?php
$I->dontSeeInCollection('users', array('name' => 'miles'));
```

 * `param` $collection
 * `param array` $criteria

### grabCollectionCount

Grabs the documents count from a collection

``` php
<?php
$count = $I->grabCollectionCount('users');
// or
$count = $I->grabCollectionCount('users', array('isAdmin' => true));
```

 * `param` $collection
 * `param array` $criteria
@return integer

### grabFromCollection

Grabs a data from collection

``` php
<?php
$cursor = $I->grabFromCollection('users', array('name' => 'miles'));
```

 * `param` $collection
 * `param array` $criteria
@return \MongoCursor

### haveInCollection

Inserts data into collection

``` php
$I->haveInCollection('users', array('name' => 'John', 'email' => 'john@coltrane.com'));
$user_id = $I->haveInCollection('users', array('email' => 'john@coltrane.com'));
```

 * `param` $collection
 * `param array` $data

### seeElementIsArray

Asserts that an element in a collection exists and is an Array

``` php
<?php
$I->seeElementIsArray('users', array('name' => 'John Doe') , 'data.skills');
```

 * `param String` $collection
 * `param Array` $criteria
 * `param String` $elementToCheck

### seeElementIsObject

Asserts that an element in a collection exists and is an Object

``` php
<?php
$I->seeElementIsObject('users', array('name' => 'John Doe') , 'data');
```

 * `param String` $collection
 * `param Array` $criteria
 * `param String` $elementToCheck

### seeInCollection

Checks if collection contains an item.

``` php
<?php
$I->seeInCollection('users', array('name' => 'miles'));
```

 * `param` $collection
 * `param array` $criteria

### seeNumElementsInCollection

Count number of records in a collection

``` php
<?php
$I->seeNumElementsInCollection('users', 2);
$I->seeNumElementsInCollection('users', 1, array('name' => 'miles'));
```

 * `param` $collection
 * `param integer` $expected
 * `param array` $criteria

Module reference is taken from the source code. Help us to improve documentation. Edit module reference


text:
CHANGELOG for 1.2.x
===================

This changelog references the relevant changes (bug and security fixes) done
in 1.2 minor versions.

* **1.2.27** *(20xx-xx-xx)*

* **1.2.26** *(2021-06-11)*
    * Bugfix crops on galleries

* **1.2.25** *(2021-06-10)*
    * Add euro date sort on datatable

* **1.2.24** *(2021-06-07)*
    * Bugfix aropixel_imagine_filter

* **1.2.23** *(2021-05-28)*
    * Check if image exists on DoFileCropListener

* **1.2.22** *(2021-05-20)*
    * Bugfix aropixel_imagine_filter

* **1.2.21** *(2021-05-20)*
    * Bugfix aropixel_imagine_filter
    * Update gdpr plugin

* **1.2.20** *(2021-04-29)*
    * Bugfix css dropdown disabled

* **1.2.19** *(2021-03-25)*
    * Upgrade stof/doctrine-extensions-bundle

* **1.2.18** *(2021-03-23)*
    * Add path resolver service
    * Add toastr module

* **1.2.17** *(2021-03-08)*
    * Bugfix file upload

* **1.2.16** *(2021-01-26)*
    * Handle errors when delete images from library

* **1.2.15** *(2021-01-20)*
    * Bugfix: jqueryui sortable removes ckeditor content after sorting

* **1.2.14** *(2021-01-08)*
    * Bugfix edit admin without changing password

* **1.2.13** *(2021-01-08)*
    * Bugfix user creation when entity is overrided
    * Authorize multiple admin creation from command line

* **1.2.12** *(2020-12-08)*
  * Fix "remember me" input name in template

* **1.2.11** *(2020-11-17)*
    * Add footer twig blocks in template

* **1.2.10** *(2020-11-16)*
    * Bugfix revelated by Gedmo SortableListener when remove entity with image

* **1.2.9** *(2020-10-26)*
    * Fix ManagerRegistry namespace for SF 5.0 compatibility
    * Fix Js problems for multiple timepickers

* **1.2.8** *(2020-09-15)*
    * Bugfix ImageType form if null

* **1.2.7** *(2020-09-15)*
    * Bugfix ImageType form

* **1.2.6** *(2020-09-11)*
    * Authorize ImageType as simple mapped filename field

* **1.2.5** *(2020-09-11)*
    * Add topbar_left block in base layout
    * Add Css for searchbar

* **1.2.4** *(2020-09-03)*
    * Bugfix crop if several image instances declared on the same form

* **1.2.3** *(2020-09-03)*
    * Authorize twig/intl-extra ^2.12

* **1.2.2** *(2020-09-03)*
    * Bugfix detach image which is not names "image"

* **1.2.1** *(2020-08-12)*
    * Create PathResolver & Cropper image services
    * Make form collections sortable
    * Bugfix: effectively apply crop to images

* **1.2.0** *(2020-08-10)*
    * Complete review of image & gallery for file_name storage
    * Add a collection management in form layout
    * Add twig extra-bundle package
    * Add twig ImageExtension

repository: aropixel/admin-bundle

repo_name: aropixel/admin-bundle


text:
# chatbot
Chatbot using sequence to sequence learning, implemented in Python and Tensorflow.

### Progress:
- [x] simple implementation of chatbot that identifies intents of the input
- [x] response processing
- [x] context incorporation
- [ ] add intents specific to yoda
- [ ] add data and responses in `YodaSpeak`
- [ ] REST API using Flask
- [ ] simple deployment technique, probably by a docker images
- [ ] deployment on heroku

repository: yoda-pa/chatbot

repo_name: yoda-pa/chatbot


text:
# Course Buddy

Carleton University Course Scheduling Tool

## Installation

1. Install [XAMPP](https://www.apachefriends.org/index.html).
2. Drop all the files into your `htdocs` folder.
3. Update your database credentials in `config.php` file.

## Usage

Start XAMPP, and direct your browser to localhost.

## License

MIT

repository: ryanseys/course-buddy

repo_name: ryanseys/course-buddy


text:
# FHIRbase.Net

![fhirbase](https://avatars3.githubusercontent.com/u/6482975?v=3&s=400)

FHIRbase.Net is simple .NET wrappers for FHIRbase (https://github.com/fhirbase).

FHIRbase is an open source relational storage for
[FHIR](http://hl7.org/implement/standards/fhir/) targeting real production.

To install Simple .NET wrappers for FHIRbase, run the following command in the Package Manager Console:

	PM> Install-Package Fhirbase.Net -Pre

Example:

	var patient = new Patient();
        patient.Name.Add(HumanName.ForFamily("Hello").WithGiven("World"));
        patient.Telecom.Add(new ContactPoint
        {
                System = ContactPoint.ContactPointSystem.Phone,
                Use = ContactPoint.ContactPointUse.Mobile,
                Value = "123456789"
        });

        var createdPatient = (Patient)FHIRbase.Create(patient);

	...

	FHIRbase.Delete(createdPatient);


text:
Game    : hangman

Version : 1.0

Runs on : Windows/ Linux

Source  : https://github.com/pr2h/

Coded with Python 3

Classic Hangman game with user defined list of guess results


text:
---
title: ControlsFX
type: docs
---

![ControlsFX](/images/ControlsFX.png)

[ControlsFX](https://www.github.com/controlsfx/controlsfx) is a library of UI controls and useful API for JavaFX 8.0 and beyond.

What follows is a list of **some** of the features included in ControlsFX (although there are far more features than just what is shown below!).

As always, the best place to learn about all the features of ControlsFX is in the [JavaDocs]({{< javadoc >}}) – these have been the subject of way too much attention, and they contain a wealth of information in them.


text:
---
title: "Watering Nozzle"
slug: "watering-nozzle"
description: "Documentation and assembly instructions for the FarmBot Genesis Watering Nozzle"
---

* toc
{:toc}

The watering nozzle is a single 3D printed component with a few extra parts for magnetic coupling and electronic verification with the UTM. It works as a simple diffuser nozzle by accepting a concentrated stream of water coming from the UTM and turning it into a gentle shower.

<iframe width="100%" height="480" src="https://sketchfab.com/models/d343f37909c1491b9fba49fe39b71065/embed?ui_controls=0&ui_infos=0&ui_related=0" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>

# Assembly Instructions

{%
include callout.html
type="info"
title="15 minutes"
content="This is the estimated time it will take to assemble the Watering Nozzle"
%}

## Step 1: Gather the parts and tools
Gather all the watering nozzle parts from the table below and lay them out in a logical manner. To complete the assembly, you will also need the following tools:
* 2mm hex (allen) driver
* 3mm hex (allen) driver
* 6mm wrench
* 8mm wrench
* Wire strippers

|Qty.                          |Component                     |
|------------------------------|------------------------------|
|1                             |Watering Nozzle Base
|3                             |Ring Magnets (15 x 15 x 5mm)
|3                             |M5 x 25mm Screws
|3                             |M5 Locknuts
|2                             |M3 x 16mm Screws
|2                             |M3 Locknuts
|1                             |Jumper Wire (18 guage, 5cm length)
|2                             |Zipties

## Step 2: Install the Magnets

{%
include callout.html
type="info"
title="Opposites attract"
content="For the watering nozzle to correctly mount to the UTM, all magnets on the watering nozzle must be attracted to the magnets in the UTM.

To find the correct orientation for a watering nozzle magnet, hold it near the mounting side of the UTM. Flip it around in your hand until you feel it attracting to the UTM's magnets. This is the correct orientation for mounting to the watering nozzle base."
%}

Secure the three **ring magnets** to the top of the **watering nozzle base** using three **M5 x 25mm** screws and **M5 locknuts**. The screw head should be on the magnet side of the watering nozzle base. Use the **3mm hex driver** and **8mm wrench** to tighten the components.

## Step 3: Install the Electrical Screws
Use the **2mm hex driver** and **6mm wrench** to attach two **M3 x 16mm screws** and **M3 locknuts** into the holes labelled 2 and 3 on the **watering nozzle base**. The screw heads should be on the same side of the base as the magnets.

## Step 4: Add the Jumper Wire
Use **wire strippers** to remove 1cm of insulation from both ends of the **jumper wire**.

Attach the **jumper wire** to the **M3 screws** using two **zipties**.

# Troubleshooting and Maintenance

{%
include callout.html
type="info"
title="Don't forget about general maintenance"
content="The tips below apply specifically to the UTM and no other components of your FarmBot. Make sure to view the [General Maintenance](maintenance-guide.md) page as well for system-wide tips."
%}

## Remove Magnetic Debris Buildup
It is possible for dust, soil, and other debris to magnetically attract to the watering nozzle's magnets and build up over time. This debris can prevent the watering nozzle from correctly mounting to the UTM.

{%
include callout.html
type="success"
title="Every three months"
content="Inspect the watering nozzle's magnets for debris. If any is found, use your fingers or a brush to remove it."
%}

# Change Log

* The water intake was repositioned

# Room for Improvement

* Standard municipal water pressure is so high that it causes the watering nozzle's shower to be closer to a jet stream and can introduce leaking at the seal between the nozzle and the UTM as well as at the UTM barb and the watering tube conncetion. A standard 25 psi inline pressure regulator used in drip irrigation systems should be placed between the house water faucet and the hose connecting to FarmBot.

repository: onumag/farmbot-genesis

repo_name: onumag/farmbot-genesis


text:
# Microsoft.ML.Core

Status: **Needs more work** |
[API Ref](Microsoft.ML.Core.md) |
[Dependencies](Microsoft.ML_Dependencies.png) |
[Write-up](https://github.com/TomFinley/machinelearning/blob/a4511133d3c0b5bc993af22f09607945e7fdf063/docs/code/Catalog-Core.md)

We've started to review the `Microsoft.ML.Core` assembly. In this review we've
focused on the `Schema` type that provides column and metadata information for
the `IDataView` type, which is at the heart of all the data processing in
ML.NET.

## Highlevel notes

* We don't expect `Microsoft.ML.Core` to contain many customer facing types
    - `IDataView` is an exception to that
* There are currently 13 assemblies in the NuGet package (excluding the legacy
  assembly). Do we need that many assemblies?
    - Would there be gains by merging the assembly so that we can make fewer
      types public?
    - We need to think about mobile scenarios where we want to deploy only a
      subset (usually inference).
* For the upcoming reviews, we should focus our efforts on the core-ish
  assemblies (marked in green): ![](Microsoft.ML_Dependencies.png)
* We should have few namespaces in the `Microsoft.ML.Core` assembly:
    - `Microsoft.ML`
        + Core scenario APIs
    - `Microsoft.ML.Data`
        + `IDataView`
    - Else, only if needed

## `Microsoft.ML.Runtime.Data.Schema`

```C#
 namespace Microsoft.ML.Runtime.Data {
     public sealed class Schema : ISchema {
         public Schema(IEnumerable<Schema.Column> columns);
         public int ColumnCount { get; }
         public Schema.Column this[int col] { get; }
         public Schema.Column this[string name] { get; }
         public static Schema Create(ISchema inputSchema);
         public string GetColumnName(int col);
         public Schema.Column GetColumnOrNull(string name);
         public IEnumerable<ValueTuple<int, Schema.Column>> GetColumns();
         public ColumnType GetColumnType(int col);
         public void GetMetadata<TValue>(string kind, int col, ref TValue value);
         public ColumnType GetMetadataTypeOrNull(string kind, int col);
         public IEnumerable<KeyValuePair<string, ColumnType>> GetMetadataTypes(int col);
         public bool TryGetColumnIndex(string name, out int col);
         public sealed class Column {
             public Column(string name, ColumnType type, Schema.Metadata metadata);
             public Schema.Metadata Metadata { get; }
             public string Name { get; }
             public ColumnType Type { get; }
         }
         public sealed class Metadata {
             public Metadata(IEnumerable<ValueTuple<Schema.Column, Delegate>> values);
             public Schema Schema { get; }
             public ValueGetter<TValue> GetGetter<TValue>(int col);
             public void GetValue<TValue>(string kind, ref TValue value);
             public sealed class Builder {
                 public Builder();
                 public void Add(Schema.Column column, Delegate getter);
                 public void Add(Schema.Metadata metadata, Func<string, bool> selector);
                 public void Add<TValue>(Schema.Column column, ValueGetter<TValue> getter);
                 public void AddKeyValues<TValue>(int size, PrimitiveType valueType, ValueGetter<VBuffer<TValue>> getter);
                 public void AddSlotNames(int size, ValueGetter<VBuffer<ReadOnlyMemory<char>>> getter);
                 public Schema.Metadata GetMetadata();
             }
         }
     }
 }
```

* Do we need `ISchematized`?
    - Looks nobody is consuming it
* `ISchema` will be retired
* We need a longer name for `Schema` as it's too generic
* We may want to make some of the nested types `Schema.Column` non-nested as
  they are an oddity in .NET. However, it seems there is some pattern ML where
  many types have a nested `Column` type, so maybe that's acceptable here.
* Should the columns be structs?
    - Since they aren't a function of the number of rows, they don't seem to pose
      scaling issues.
    - If sharing is more important, it should be a class.
    - If data density (array) is more important, it should be a struct.
* For V1, should the constructor be internal?
    - There seems to be desire to scope component authorship out of V1
* Schema allows for duplicated names. If you call `Schema["name"]` and multiple
  columns have the provided, it will return the last one. The rationale is that
  these columns are *hidden*. This allows for concise data transforms where
  users have the illusion that they can mutate the data when in fact they just
  add new column with the same name.
    - This might confuse people as `GetColums()` returns fewer columns than
      `ColumnCount`
    - Should `Schema.Column` have an `Index` and `IsHidden`? This poses
      construction challenges.

## Next Steps

* We need more review slots:
    - Weekly review (Thursdays)
    - 2 x four hours with lunch in between
* Review other core assemblies:
    - `Microsoft.ML.Core`
    - `Microsoft.ML.Data`
    - `Microsoft.ML.Transforms`
    - `Microsoft.ML.CpuMath`

repository: dotnet/apireviews

repo_name: dotnet/apireviews


text:
# Getting started

## Running locally

You can serve this service locally by running:

`yarn nx serve judicial-system-api --ssl`

To skip authentication at innskraning.island.is run:

`AUTH_USER=<national id> yarn nx serve judicial-system-api`

where `<national id>` is the national id of a known user.

## Graphql playground

Visit

`localhost:3333/api/graphql`