text:
# Why UI5-TypeScript?

This document lists the main potential benefits for the UI5-TypeScript project
and how it could benefit the UI5 eco-system in general.

## Short Version

- Better Integrating SAP UI5 and the **modern** JavaScript eco-system.

  - **Editor Tooling** & Functionality.

    - Working with many Editors / IDEs.
    - Content Assist.
    - Type Checks.
    - Go To Definition.
    - ...

  - UI5 applications written in **TypeScript**

  - CLI Tooling integration (tsc).

- Improving UI5 Docs.

## In Depth

### Better Integrating SAP UI5 and the **modern** JavaScript eco-system:

By providing TypeScript type signatures for UI5 libraries it becomes possible to
integrate UI5 application into the modern JavaScript ecosystem.

#### Editor Tooling

UI5 uses proprietary syntax for modules (import / exports) and class inheritance.
This makes it difficult for popular IDEs to provide editor related capabilities (e.g content assist)
as those tools simply do not understand the UI5 syntax.

By creating TypeScript signatures for UI5 libraries we are effectively **_bridging the gap_**
thus enabling the IDEs and Editors to provide their advanced capabilities even when implementing
UI5 applications in JavaScript.

- Note: these advance editor services are available in [many IDEs][editors-lsp] and Editors via the [LSP](LSP) protocol.

It is even possible to extend the functionality of some of these editor services via Language Server Plugins.

- https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin

For example see the Angular Language Service:

- https://angular.io/guide/language-service

#### CLI Tooling

The integration into the JS ecosystem is not limited to editor functionality.
The type checking capabilities of the TypeScript compiler can be used directly from the CLI
(e.g in a Continuous Integration flow) to increase the quality of a UI5 application.

Note that this capability of the TypeScript Compiler (tsc) is even available for
JavaScript sources:

- https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html

#### UI5 applications written in **TypeScript**

TypeScript is a popular superset of JavaScript which (among other things) adds support for an optional type system.
This type system capability which is sorely lacking in JavaScript is very suitable for the development
of large and complex applications.

By providing type signatures for UI5 libraries we enable easier integration of UI5 apps
and the TypeScript "flavor" of JavaScript. Without such signatures no type checking can be performed
on API usage of UI5 libraries.

References on TypeScript popularity:

- https://www.wired.com/story/typescript-microsoft-javascript-alternative-most-popular/
- https://www.npmtrends.com/typescript (20M weekly downloads on npm as of summer 2021, up from 6M two years before).
- https://2020.stateofjs.com/en-US/technologies/javascript-flavors/

#### Improving UI5 Docs

There are two elements to this topic

1. If the UI5 docs are automatically transformed to TypeScript definitions
   Then the **UI5 type system slowly conforms more strongly to the TypeScript type system**.
   The latter being much more robust than the combination of UI5/JSDocs type systems.

2. **Promoting end users to raise issues with errors and inaccuracies in the API reference**:

   SAP UI5 has a large in depth API Reference:

   - https://sapui5.hana.ondemand.com/#/api

   However there exists no validation between an end user's source code and the content of the API Reference.
   In essence the API Reference is meant **only** for human consumption. Once the API Reference is available
   as a "compiler readable" format (`*.d.ts`), inaccuracies and mistakes in the API reference begin surfacing
   simply because once type checking is enabled these inaccuracies and mistakes cause
   distractions to **end users** (app developers).

   For example: If a method argument is marked as mandatory but is in fact optional
   It would not be possible to use it as optional without receiving a type error.
   The end user would have to add a `// @ts-ignore annotation` to silence the error
   and it is thus much more likely for an issue to be raised by the end user asking to improve the API Reference.

[lsp]: https://langserver.org/
[editors-lsp]: https://microsoft.github.io/language-server-protocol/implementors/tools/

gha_language: TypeScript


text:
# Gesture-Builder

In my experience, working with default Gesture Builder from Android is serious pain.
So, I wrote this application that helps you create, save, test and share hand-drawn gestures.
App link : https://play.google.com/store/apps/details?id=pack.GestureApp

PS: If you like the app, give it 5-star rating!

***NOTE***

Please create a feature request / a pull request / issue if interested.

branch_name: refs/heads/master

extension: md

gha_language: Java

license_type: permissive


text:
# Mongr load balancer and reverse proxy <img src="logo.svg" align="right" height="150" />

Adjusted with our own flavour, but mostly by re-using existing and excellent [code](https://github.com/wmnnd/nginx-certbot) and [step-by-step guide](https://medium.com/@pentacent/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71)

## Introduction
The name _lb-rp_ is a condenced form of _load blancer - reverse proxy_ and is part of the infrastructure hosting web application developed and mentained by _SKDE_. _lb-rp_ is based on [NGINX Open Source](https://www.nginx.com/) and applied as a [docker container](https://www.yr.no/place/Norway/Troms_og_Finnmark/Troms%C3%B8/Troms%C3%B8/hour_by_hour.html) alongside our config and other cogs that make up [mongr.no](https://mongr.no):

![mongr.no architecture](mongr_arch.png)

Our application of NGINX as proxy and load balancer is descibed below. Description of the other parts can be found elsewhere, for instance [our shinyproxy](https://github.com/SKDE-Felles/shinyproxy) and the [qmongr shiny application](https://github.com/SKDE-Felles/qmongr).

## Config
Configuration of NGINX is defined in the _data/nginx/mongr.conf_-file. Please refere to the [NGINX documentation](https://nginx.org/en/docs/) and relevant settings of the hosting environment. All changes must be committed to this repository using git.

## Install
All steps are performed from the command line at the server instance that will be running the nginx service. Make sure that the content of this repo is available at the server by using git:
```
git clone https://github.com/mong/lb-rp.git
```
the first time. For consecutive updates navigate into the lb-rp directory and issue:
```
git pull origin master
```

### First time
If the server to be hosting nginx is just created (vanilla state) make sure _docker-ce_ and _docker-compose_ are installed along with other relevant settings by running the following script:
```
sudo ./install.sh
```

Then, make sure that the values set at the top 15-ish lines of _init-letsencrypt.sh_ are sensible and run the script:
```
./init-letsencrypt.sh
```

This ensures that users can connect securely to our site by the kind help of [Let's Encrypt](https://letsencrypt.org/about/).

As a result of running the above script the nginx docker container is now running but should at this stage be taken down by:
```
docker kill $(docker ps -q)
```

### Update
Both the _nginx_ and its accompanying _certbot_ container are configured to regularly refresh config and certificates. Any changes or updates should therefore a matter of just updating from the github repository. Move into the _lb-rp_ directory and issue:
```
git pull origin master
```
and the rest should take care of itself. If waiting it out is not an option the services can also be manually restarted as described below.

## Start and stop service
To enable _lb-rp_ use _docker-compose_ to start the relevant services in detached mode:
```
docker-compose up -d
```

To stop the same services do:
```
docker-compose down
```

To bring the services down an up again in one go do:
```
docker-compose restart
```

For other options please consult [the docker compose docs](https://docs.docker.com/compose/).

license: MIT

repository: mong/lb-rp

gha_language: Shell

gha_license_id: MIT

repo_name: mong/lb-rp


text:
## Moar!

I've created a more detailed walkthrough, [**Build A Blog With Jekyll And GitHub Pages**](http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/) over at the Smashing Magazine website. Check it out if you'd like a more detailed walkthrough and some background on Jekyll. :metal:

It covers:

- A more detailed walkthrough of setting up your Jekyll blog
- Common issues that you might encounter while using Jekyll
- Importing from Wordpress, using your own domain name, and blogging in your favorite editor
- Theming in Jekyll, with Liquid templating examples
- A quick look at Jekyll 2.0’s new features, including Sass/Coffeescript support and Collections

## Jekyll Now Features

✓ Command-line free _fork-first workflow_, using GitHub.com to create, customize and post to your blog
✓ Fully responsive and mobile optimized base theme (**[Theme Demo](http://jekyllnow.com)**)
✓ Sass/Coffeescript support using Jekyll 2.0
✓ Free hosting on your GitHub Pages user site
✓ Markdown blogging
✓ Syntax highlighting
✓ Disqus commenting
✓ Google Analytics integration
✓ SVG social icons for your footer
✓ 3 http requests, including your avatar

✘ No installing dependencies
✘ No need to set up local development
✘ No configuring plugins
✘ No need to spend time on theming
✘ More time to code other things ... wait ✓!

## Questions?

[Open an Issue](https://github.com/barryclark/jekyll-now/issues/new) and let's chat!

## Other forkable themes

You can use the [Quick Start](https://github.com/barryclark/jekyll-now#quick-start) workflow with other themes that are set up to be forked too! Here are some of my favorites:

- [Hyde](https://github.com/poole/hyde) by MDO
- [Lanyon](https://github.com/poole/lanyon) by MDO
- [mojombo.github.io](https://github.com/mojombo/mojombo.github.io) by Tom Preston-Werner
- [Left](https://github.com/holman/left) by Zach Holman
- [Minimal Mistakes](https://github.com/mmistakes/minimal-mistakes) by Michael Rose
- [Skinny Bones](https://github.com/mmistakes/skinny-bones-jekyll) by Michael Rose


text:
Kirei

Enhance your Wallpaper Engine experience even more!

[![forthebadge](https://forthebadge.com/images/badges/made-with-c-sharp.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/you-didnt-ask-for-this.svg)](https://forthebadge.com)

[![GitHub license](https://img.shields.io/github/license/LegendaryB/Kirei.svg?longCache=true&style=flat-square)](https://github.com/LegendaryB/Kirei/blob/master/LICENSE)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/alphadaniel)

Kirei is a japanese word and means clean or neat.

Built with ❤ by Daniel Belz

## Configuration
The `appsettings.json` file resides in the same folder as the application.
```json
{
  "Application": {
    "ShouldRunOnStartup": true,
    "InactiveAfter": 0,
    "InputPollingRate": 0
  },
  "Actions": {
    "PreventSleep": true,
    "HideDesktopIcons": true,
    "HideTaskBar": true,
    "HideApplicationWindows": true
  }
}
```

|Property   |Description   |Default value   |
|---|---|---|
|InactiveAfter   |Time period after which the actions are executed in seconds.   |180 Seconds|
|InputPollingRate   |Polling rate for the input handler in milliseconds.   |200 Milliseconds|

## Use the application
1. Extract the folder and go into it.
2. Configure your settings in `appsettings.json`.
2. Execute the application.

## Contributing

__Contributions are always welcome!__
When you send me a pull request with changes, improvements or bugfixes please make sure to use the pull request template.
I want to have all information regarding the pull request at a glance.

## License

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

repository: LegendaryB/Kirei

branch_name: refs/heads/develop

gha_language: C#

repo_name: LegendaryB/Kirei


text:
Creating RPM's for CENTOS or RHEL
=================================

This repository contains 2 different images and an examples making use of both

1. A simple docker image which creates the tools necessary to create an RPM.
The expectation is that this will be extended to be part of a pipeline,
potentionally a jenkins slave, but it works fine simply as a docker image running
locally.

2. An image that inherits from the base docker image in step 1, and supports the
use of a makefile.

## Create the first docker image

Note it installs a lot of additional dependency packages, so can take awhile

```
$ cd rpm-builder
$ docker build -t rpm-builder .
```

## Now the first example we can manually use image 1 to create an rpm, in this case nodejs.

I have a few files prepared on my local directory
```
$ ls -l  .
-rw-rw-r-- 1 owenn owenn      797 Oct 11 11:49 nodejs.spec
-rw-rw-r-- 1 owenn owenn      894 Oct 11 12:56 README.md
-rw-r--r-- 1 root  root  14781396 Oct 10 01:16 node-v12.19.0-linux-x64.tar.xz
```

So when I mount my docker image I specify the local directory, it also allows
me to write the output back to my local filesystem.

### Run the docker image which will also log into the image

```
$ docker run -ti -v`pwd`:/mnt rpm-builder:latest /bin/bash
```

### cd to the directory to build the package
```
#  cd ~/rpmbuild
```
_copy the source xz file into the SOURCES directory in root home directory, not
ideal but it works_
```
# cp /mnt/node-v12.19.0-linux-x64.tar.xz SOURCES/
```
_We can leave the spec file which decribes the rpm to create in the /mnt directory,
so lets have a quick look at it then run it_
```
# cat /mnt.nodejs.spec

Name:           nodejs
Version:        v12.19.0
Release:        1%{?dist}
Summary:        node-v12.19.0-linux-x64

License:        BSD
URL:		https://nodejs.org
Source0:       	node-v12.19.0-linux-x64.tar.xz
Packager:	Nigel Owen

%description
nodejs as Rhel 7.8 does not support nodejs as a package I have created this package

%prep
%setup -n node-v12.19.0-linux-x64

%install
mkdir -p %{buildroot}/usr/local
mv bin lib include share %{buildroot}/usr/local
chmod -R 0755 %{buildroot}/usr/local/lib/ %{buildroot}/usr/local/bin %{buildroot}/usr/local/include
chmod -R 444 %{buildroot}/usr/local/share
rm -rf %{buildroot}/usr/local/share/doc %{buildroot}/usr/local/share/systemtap
%files
%doc
/usr/local/lib/*
/usr/local/bin/*
/usr/local/include/*
/usr/local/share/man/man1/*
%build

%changelog
```
```
# rpmbuild -bb /mnt/nodejs.spec
```
_After a lot of output, near the bottom you should have the line_

```Wrote: /root/rpmbuild/RPMS/x86_64/nodejs-v12.19.0-1.el7.x86_64.rpm```

_Copy it out to the the /mnt directory which will put it onto your local
filesystem, make sure you fix the permissions_

```
# cp /root/rpmbuild/RPMS/x86_64/nodejs-v12.19.0-1.el7.x86_64.rpm /mnt
# chmod 777 /mnt/nodejs-v12.19.0-1.el7.x86_64.rpm
# exit
```

## Creating the second image
We want this image to be runable on Openshift and if it detects a Makefile in
the current directory of the image it will run the Makefile

```
$ cd make
$ docker build -t rpm-build-make .
```

### Notes

Evaluate an RPM macro expression:

```
rpm -E '%_topdir'
```

Show all macro definitions:
```
rpm --showrc
spectool -C ~/rpmbuild/SOURCES -g package.spec
```

repository: owenn/docker-rpm-build

repo_name: owenn/docker-rpm-build


text:
# Fuse Online Wine Demo

This example demonstrates how to load products from Database to Salesforce.

This is part of the my Fuse Online demo. Where it receives the order from an Wine Javascript Application. And updated and add orders to Salesforce.

![Load Product](pic/loadproduct.png)

### Configure Salesforce Credentials

In your application.properties, add the following config:

	camel.component.salesforce.clientId=
	camel.component.salesforce.clientSecret=
	camel.component.salesforce.userName=
	camel.component.salesforce.password=

### Running locallty

You can run the application with following command:

    mvn spring-boot:run -Dspring.profiles.active=local

To load the products into Salesforce

	curl -k http://localhost:8080/wineproduct/addwine

To remove the products from Salesforce

	curl -k http://localhost:8080/wineproduct/deletewine

### Deploying and Running in OpenShift

It is assumed that:
- OpenShift platform is already running, if not you can find details how to [Install OpenShift at your site](https://docs.openshift.com/container-platform/3.3/install_config/index.html).

- Your system is configured for Fabric8 Maven Workflow, if not you can find a [Get Started Guide](https://access.redhat.com/documentation/en/red-hat-jboss-middleware-for-openshift/3/single/red-hat-jboss-fuse-integration-services-20-for-openshift/)

- Installed OpenShift Client locally, and logged into OpenShift

First, create a new namespace:

	oc new-project wine

Import the Fuse image streams:

    oc create -f https://raw.githubusercontent.com/jboss-fuse/application-templates/GA/fis-image-streams.json

Install postgresql Database:

	oc new-app --template=postgresql-ephemeral --param=POSTGRESQL_USER=dbuser --param=POSTGRESQL_PASSWORD=password --param=POSTGRESQL_DATABASE=sampledb

Deploying the demo to OpenShift, go to the project directory:

    mvn fabric8:deploy

To list all the running pods:

    oc get pods

Now you can start load and delete products into your salesforce account.
To load the products into Salesforce

	curl -k https://salesforce-wine-wine.OPENSHIFT_APP_DOMAIN/wineproduct/addwine

To remove the products from Salesforce

	curl -k https://salesforce-wine-wine.OPENSHIFT_APP_DOMAIN/wineproduct/deletewine


text:
![Codeship Status for semlogr/semlogr-faraday](https://codeship.com/projects/48b7dd70-8499-0136-e016-5e4de864be62/status?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/41377026a92435f4ffa1/maintainability)](https://codeclimate.com/github/semlogr/semlogr-faraday/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/41377026a92435f4ffa1/test_coverage)](https://codeclimate.com/github/semlogr/semlogr-faraday/test_coverage)

# Semlogr integration for Faraday

This integration provides the ability to propogate a correlation id from the current log Semlogr context to
your outgoing Faraday requests.

## Installation

To install:

    gem install semlogr-faraday

Or if using bundler, add semlogr to your Gemfile:

    gem 'semlogr-faraday'

then:

    bundle install

## Getting Started

Simply configure the RequestCorrelator middleware on your Faraday instance, it will propogate the `correlation_id` property from your current Semlogr ambient log context as an outgoing X-Correlation-Id header on the request.

This can be used in combination with the [semlogr-rack](https://github.com/semlogr/semlogr-rack) extension to
provide a full end to end proprogation of correlation ids between your services.

```ruby
require 'semlogr/faraday'

faraday = Faraday.new('http://test.com') do |c|
  c.request :semlogr_request_correlator

  c.adapter Faraday.default_adapter
end

faraday.get('/test')
```

## Development

After cloning the repository run `bundle install` to get up and running, to run the specs just run `rake spec`.

## Contributing

See anything broken or something you would like to improve? feel free to submit an issue or better yet a pull request!

repository: semlogr/semlogr-faraday

repo_name: semlogr/semlogr-faraday


text:
# http-thruput

Server and client to generate bandwidth usage over HTTP.
The goal is to have a small standalone binary that can serve several GBs of dummy data to multiple concurrent clients.
No disk I/O and memory usage is kept low. Higher CPU use had to be sacrificed to manage that.

## Options
```
  -host string
    	Hostname of server running http-thruput (default "localhost")
  -mode string
    	Run in 'client' or 'server' mode. (default "server")
  -parallel
    	Run client in parallel or series (default true)
  -port int
    	Remote server port (default 8080)
  -run.get
    	Run GET test. (default true)
  -run.post
    	Run POST test. (default true)
  -segment.size int
    	Segment size for in-memory file chunks (default 10485760)
  -size string
    	Size of data. 1g, 2M, 4k, etc. Overrides -size.post and -size.get.
  -size.get string
    	Size of get data. 1g, 2M, 4k, etc. (default "1g")
  -size.post string
    	Size of post data. 1g, 2M, 4k, etc. (default "1g")
  -web.listen-address string
    	Listen address for HTTP requests (default "<IP_ADDRESS>:8080")
```

## Server Mode

This is the default mode.
There are 2 valid URLs: `/up` and `/down`.

Example:
```
http-thruput -web.listen-address <IP_ADDRESS>:8888
```
This runs `http-thruput` as a server binding to IP <IP_ADDRESS> on port 8888

### Download Tests

__URL:__ `http://<hostname>:<port>/down?s=<bytes>`

hostname: The hostname of the remote server running `http-thruput` in server mode.
port: The TCP port number.
bytes: The number of bytes to present to the client.

#### The 's' Parameter

The `s` parameter represents a number of bytes.
It is an integer with an optional suffix.
Allowed suffixes are: b, B, k, K, m, M, g, G.
`B` and `b` are identical and are for bytes.
For `[kKmMgG]`, the upper-case variant represents the ISO units (thousands) and lower-case for the IEC units (2 to the power of 10s)

__Examples:__
- `12345`: literally 12,345 bytes
- `128m`: 128 MiB, 128 x 220
- `100K`: 100,000 bytes
- `8g`: 8 GiB, 8 x 230

### Upload Tests

__URL:__ `http://<hostname>:<port>/up`

Accepts only only POSTs.
The client can post the dummy data as the body of the request.

## Client Mode

Example:
```
http-thruput -mode client -host remotehost -port 80 -size 10g
```
This will run tests against `http://remotehost:80/` using 10 GiB of dummy data in parallel.
The download and upload tests (GET and PUT, respectively) can be run in series or parallel.

Run in series:
```
http-thruput -mode client -parallel=0
```

Run get/download test only:
```
http-thruput -mode client -run.post=0
```

Run post/upload test only:
```
http-thruput -mode client -run.get=0
```

repository: randohm/http-thruput

branch_name: refs/heads/main

gha_language: Go

repo_name: randohm/http-thruput


text:
# nodeStore
A store built in node.js

When you start us node user.js

Then inquire will prompt a screen asking if you are a customer, manager or CEO.

As a customer you can buy any kinda of jersey that is within the selection,

Then you can choose how many to purchases in stock.

After your purchase you will be given a receipt on how much it cost.

Here is a gif on how it is working


text:
# @microf/vue-child

## A Vue.js plugin to declare your application as a micro-frontend for another application
*For the host application use the package `@microf/vue-host`*

### installation
```shell
npm i --save-dev @microf/vue-child
```

### usage
```javascript
import { createMicroFrontendChild } from '@microf/vue-child';
import { router } from './my-router-instance';

const microFrontendPlugin = await createMicroFrontendChild({
  router
});

// don't forget:
app.use(microFrontendPlugin);
```

That's (sort of) it.

repository: ikorecky/microf

repo_name: ikorecky/microf


text:
# Laravel SparkPost Driver

[![Latest Version on Packagist](https://img.shields.io/packagist/v/vemcogroup/laravel-sparkpost-driver.svg?style=flat-square)](https://packagist.org/packages/vemcogroup/laravel-sparkpost-driver)
[![Total Downloads](https://img.shields.io/packagist/dt/vemcogroup/laravel-sparkpost-driver.svg?style=flat-square)](https://packagist.org/packages/vemcogroup/laravel-sparkpost-driver)

## Description

This package allows you to still use SparkPost as MailDriver in Laravel.

This package is inspired by: https://github.com/clarification/sparkpost-laravel-driver and updated with driver from Laravel 5.8.x

## Version

Find the correct version to use in the table below:

| Laravel version | Version |
|:---------------:|:-------:|
|       6.x       |   2.x   |
|       7.x       |   3.x   |
|       8.x       |   4.x   |
|    9.x, 10.x    |   5.x   |

## Installation

You can install the package via composer:

```bash
composer require vemcogroup/laravel-sparkpost-driver
```

If you're running an older version of Laravel, make sure you include the version number in your install. For example, for Laravel 8.x:

```bash
composer require vemcogroup/laravel-sparkpost-driver:4.x
```

The package will automatically register its service provider.

## Usage

You will need to configure your Laravel installation before you can use Sparkpost.

**1. Update config/services.php**

You will need to add Sparkpost service to your `config/services.php`:

```php
'sparkpost' => [
    'secret' => env('SPARKPOST_SECRET')
],
```

You can configure additional options there, too:

**Sparkpost API options**

You can define specific [SparkPost options]
(https://developers.sparkpost.com/api/transmissions/#header-request-body) like `open_tracking`, `click_tracking`, `transactional`

**EU GDPR compliance**

You are able to use the EU endpoint for Europe GDPR compliance by setting the `endpoint` option or the default will be used.

SparkPost (default): `https://api.sparkpost.com/api/v1`
SparkPost EU: `https://api.eu.sparkpost.com/api/v1`

**Guzzle options**

You are able to specify [Guzzle options](http://docs.guzzlephp.org/en/stable/request-options.html) in the SparkPost config section `guzzle`.

Just include the additional configuration in your `config/services.php`.

```php
'sparkpost' => [
    'secret' => env('SPARKPOST_SECRET'),

    // optional guzzle specific configuration
    'guzzle' => [
        'verify' => true,
        'decode_content' => true,
        ...
    ],
    'options' => [
        // configure endpoint, if not default
        'endpoint' => env('SPARKPOST_ENDPOINT'),

        // optional Sparkpost API options go here
        'return_path' =><EMAIL_ADDRESS>        'options' => [
            'open_tracking' => false,
            'click_tracking' => false,
            'transactional' => true,
        ],
    ],
],
```

**2. Set API Key**

You will also need to add the SparkPost API Key to your environment (`.env`) file:

```php
SPARKPOST_SECRET=__Your_key_here__
```

**3. Set Mail Driver**

You need to set your mail driver to SparkPost.

You can do this by setting the environment variable `MAIL_MAILER` in your `.env` file

```php
MAIL_MAILER=sparkpost
```

Or, alternatively by changing the driver in `config/mail.php`:

```php
'driver' => env('MAIL_MAILER', 'sparkpost'),
```

> Note: If you are still using Laravel 5, `MAIL_MAILER` will be referenced as `MAIL_DRIVER`.

**4. Update config/mail.php**

Finally, you will also need to add the `sparkpost` driver to the `config/mail.php` mailer section.

```php
'mailers' => [
    ...
    'sparkpost' => [
        'transport' => 'sparkpost'
    ],
    ...
],
```

> Note: Laravel 5 already includes this configuration, so you don't need to do it if you're using Laravel 5

## Helper functions

### Delete supressions
```php
sparkpost_delete_supression('test@example.com');
```

### Validate single email address
```php
sparkpost_check_email('test@example.com');
```

## Mail Subaccounts

To send an email using a [SparkPost mail subaccount](https://support.sparkpost.com/docs/user-guide/subaccounts), add the desired subaccount id to the message header before sending:
```php
$subaccount_id = 1234;
$this->withSymfonyMessage(function ($message) use ($subaccount_id) { // 'this' is a mailable
    $headers = $message->getHeaders();
    $headers->addTextHeader('subaccount_id', $subaccount_id);
});
```

repository: vemcogroup/laravel-sparkpost-driver

gha_language: PHP

repo_name: vemcogroup/laravel-sparkpost-driver


text:
---
layout: default
---

# 1996-05-03 - Re: Burns Bill

## Header Data

From: "Perry E. Metzger"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Bill Frantz)

Message Hash: 68ea2c6096fa0971d5c62718ff57097fb9d74dcecd5f3e5acf1066a829ac9509

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-05-03 06:47:03 UTC

Raw Date: Fri, 3 May 1996 14:47:03 +0800

## Raw message

```
{% raw  %}From: "Perry E. Metzger"<EMAIL_ADDRESS>Date: Fri, 3 May 1996 14:47:03 +0800
To<EMAIL_ADDRESS>(Bill Frantz)
Subject: Re: Burns Bill
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Bill Frantz writes:
> A quick read thru the text of the bill (via http://www.cdt.org/crypto/)
> shows none of the principle objectionable features of the Lehey bill.
> (Standards for key escrow agents, and additional criminal penalties for
> using encryption to hinder an investigation.)
>
> This bill has some obscure, to me, exceptions.  The most troubling of which
> I think means (IANAL) that export can be restricted if there is a
> reasonable expectation that the hard/software will be reexported to one of
> the countries on the extreme bad boys list.

I will point out that as things stand under U.S. law you aren't even
allowed to export toilet paper if the expectation is that the ultimate
customer is on the extreme bad boys list. Although as a libertarian I
find any such provision distasteful I cannot see that we are badly off
if the rules for exporting crypto and exporting toilet paper are
roughtly similar.

> in any case, it is not clear how passage of the bill could possibly
> make things worse.

I think that is key.

Perry

{% endraw %}
```

## Thread

+ Return to [May 1996](/archive/1996/05)

+ Return to<EMAIL_ADDRESS>(Bill Frantz)](/authors/frantz_at_netcom_com_bill_frantz_)"
+ Return to "["Perry E. Metzger" <perry@piermont.com>](/authors/perry_e_metzger_perry_at_piermont_com_)"

+ 1996-05-03 (Fri, 3 May 1996 15:14:43 +0800) - [Burns Bill](/archive/1996/05/ba6bc719deec54c1b7f7c44af0f2c206168e97bdbe99c23f3bfb46b705dc98b8) -<EMAIL_ADDRESS>(Bill Frantz)_
  + 1996-05-03 (Fri, 3 May 1996 14:47:03 +0800) - Re: Burns Bill - _"Perry E. Metzger"<EMAIL_ADDRESS>


text:
---
title: "Member Directory - User Registration"
metaTitle: "Member Directory - User Registration"
metaDescription: "Member Directory - User Registration"
date: 2020-05-29 06:10:00
author: "Paras Bokhari"
image: null
gated: true
documentation: true
documentationTopic: "Member Directory"
tags:
  title: SWFL
  client: true
---

> This document explains some details regarding user registrations

![enter image description here](https://i.imgur.com/w1h2syk.png)Users may register on this page to subscribe to a membership. They'll be redirected to the dashboard after a successful subscription.

### Additional Contacts

Additional Contacts added here will receive an email to reset their password - similar to how they may receive when an account owner adds them from the dashboard.

> Please Note: We can add three sub-accounts in our registration form. However, as our users and sub-users are integrated with HubSpot - what this may mean is that there will be three additional roundtrips executed when a user subscribes to a membership. This may add additional loading time while registering thus is not recommended. However, please reach out to us if you'd like to add them anyway.

### President's Club

President's club can be purchased by existing members. They can access its registration page from their Dashboard.

![President's Club](https://i.imgur.com/zj1kgK0.png)

repository: bokhariLovesYou/devndesignatoneims

gha_language: JavaScript

repo_name: bokhariLovesYou/devndesignatoneims


text:
# SIG IO Releases

At the moment SIG IO Releases consist of three parts:
- Release of source code with versioning in GitHub
- Release of python package in PyPI
- Release of R package to CRAN

## GitHub Source Code Release

To perform a release in GitHub, the following steps are needed:
- Create a PR to update the RELEASE.md in
  [github.com/tensorflow/io](https://github.com/tensorflow/io)
  * Add updates for new features, enhancements, bug fixes
  * Add contributors using `git shortlog <last-version>..HEAD -s`
- Merge the PR for RELEASE.md update
- Release PyPI Python Package (see below)
- Release CRAN R Package (see below)
- Create a new version through GitHub

## PyPI Python Package Release

At the moment Python package (whl files) is created automatically,
upon each successful GitHub Actions workflow on master branch. At the end of
each GitHub Actions Workflow build on master branch, all whl files
(3.5, 3.6, 3.7 on Linux, macOS, and Windows) are pushed to part of the
artifact that is available to download. To download the artifact,
go into the tab of [Actions](https://github.com/tensorflow/io/actions),
click and get into the build of the commit ready for release, and download
the artifact named `tensorflow-io-release` only. Once the artifact is
uncompressed locally, all whl files on Linux, macOS, and Windows will be
available.

To perform a release in PyPI, first make sure the binary whl files
are the correct one from corresponding GitHub Actions build commit.
This could be verified by checking the GitHub Actions log history where at
the end of the log, the sha256 of all whl files are calculated and displayed.
The sha256 of each file displayed on GitHub Actions log should match the sha256
of the files extracted from artifact.

Once sha256 are verified against every whl files in artifact, perform
a sanity check locally to make sure at least the getting started example
on [README.md](https://github.com/tensorflow/io/blob/master/README.md)
is able to run correctly. After that upload all of the whl files
(3.5, 3.6, 3.7 on Linux, macOS, and Windows) to PyPI.org:

```
twine upload *.whl
```

## CRAN R Package Release

Before submitting the R package to CRAN, manually perform and check the following items:
* Make sure the documentation in `README.md`, `docs/`, and `vignettes/` is up-to-date
* Update `Version` field in `DESCRIPTION` file
* Update `NEWS.md` to include items for this new release
* Run `devtools::check()` and fix all the notable issues, especially warnings and errors that appear
either locally or in [CRAN package check result](https://cran.r-project.org/web/checks/check_results_tfio.html)
* Update `cran-comments.md` to include any unsolvable issues from `devtools::check()` and
other comments/responses to CRAN maintainers
* Run checks on R-hub via `devtools::check_rhub()` and on win-builder via `devtools::check_win_devel()`. This is
optional since Python is not be installed on CRAN test machines and we skip the tests on
CRAN.

To submit the package to CRAN for review, do the following:
* Run `devtools::release()` to submit for review. Here's how it looks like if submission is successful:
```
Submitting file: /var/folders/zp/k98_wphd0h9c5b3zyk5xhnhm0000gn/T//RtmpHh9Wdo/tfio_0.1.0.tar.gz
File size: 483.4 Kb
Uploading package & comments
Confirming submission
Package submission successful.
Check your email for confirmation link.
```
* Check email for confirmation link and confirm the submission
* CRAN maintainers will review the submission and email you for the result of this submission.
If there are any additional issues and comments that need to be addressed, address them and re-submit

## SIG IO Release Team

Everybody with an interest in helping SIG IO releases, is welcome
to join the Release Team. To participate, create a PR to update
the doc or send an email to SIG IO mailing list
[io@tensorflow.org](https://groups.google.com/a/tensorflow.org/forum/#!forum/io).
Please provide both GitHub and PyPI handle to join the release team.

Current Release Team:
- Yong Tang - GitHub: [@yongtang](https://github.com/yongtang) - PyPI: [yongtang](https://pypi.org/user/yongtang)
- Anthony Dmitriev - GitHub: [@dmitrievanthony](https://github.com/dmitrievanthony) - PyPI: [dmitrievanthony](https://pypi.org/user/dmitrievanthony)
- Yuan (Terry) Tang - GitHub: [@terrytangyuan](https://github.com/terrytangyuan) - PyPI: [terrytangyuan](https://pypi.org/user/terrytangyuan)
- Bryan Cutler - GitHub: [@BryanCutler](https://github.com/BryanCutler) - PyPI: [cutlerb](https://pypi.org/user/cutlerb)
- Aleksey Vlasenko - GitHub: [@vlasenkoalexey](https://github.com/vlasenkoalexey) - PyPI: [vlasenkoalexey](https://pypi.org/user/vlasenkoalexey)
- Vignesh Kothapalli - GitHub: [@kvignesh1420](https://github.com/kvignesh1420) - PyPI: [kvignesh1420](https://pypi.org/user/kvignesh1420/)

repository: tensorflow/community

repo_name: tensorflow/community


text:
### docker\_setup

The get-docker.sh script will download and install docker. After installation, add the user 'ubuntu' to the group 'docker' with the usermod command so that docker commands can be run without the use of sudo.

```bash
sh get-docker.sh
```

sudo usermod -aG docker ubuntu

### Changing dockers default storage location

Docker containers can take up a large amount of drive space. On the nectar cloud instances, often the primary disk space is modest and docker images will quickly fill this space. The move-docker-root.sh script will perform the necessary operations to move the image store folder to an attached volume store. The script should be modified to represent your instance configuration.

chmod

sudo chown docker /data
sudo chown ubuntu /data

```bash
sudo move-docker-root.sh
```

I manually ran the commands in move-docker-root.sh because it didn't seem to run properly

Instructions here

https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169/29

docker run -it --rm -p 8888:8888 oesteban/biss2016-notebook


text:
---
layout: post
title:  "Discussion on Research Topics 24/05/2020"
date:   2020-05-24
author: Rui Xu
categories: activities
---

### Attendees

Rui, Junjie, Yong, Jiayin, Chang, Xueli, Lijing, Zihe, Huimei

---

### Agenda

- Rui: Blandford-Znajek process

### Reference

[Electromagnetic extraction of energy from Kerr black holes](https://ui.adsabs.harvard.edu/abs/1977MNRAS.179..433B/abstract)

### Time

9:00 am -- 11:00 am

gha_language: SCSS


text:
# Looper by [Nick Snyder](fasterhorses.co)
## A looping plugin for Statamic CMS

Looper is a super-simple plugin for Statamic that let's you loop through and echo data.

### Support, Feature Requests, and Donations

For support, the best way is to get at me on Twitter: [@_FasterHorses](http://twitter.com/_FasterHorses).

If you have any feature requests, please submit them via [Looper's issues page on GitHub](https://github.com/fasterhorses/Looper-Statamic/issues)

Did you find this plugin useful? [Please consider donating](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UNPDS7DYBV53G).

### Example Code Block

    {{ looper count="5" }}

I'm going to loop 5 times!

    {{ /looper }}

### Documentation

**Parameters**

* count - Amount of times you'd like the enclosed data to loop

### MIT License

Copyright (c) 2013 Nick Snyder

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: jeffreyDcreative/gkp

repo_name: jeffreyDcreative/gkp


text:
---
title: Debouncing
date: "2020-03-10"
description: "Debouncing inputs"
---

Debouncing input is a way to wait before acting on input from the user. This prevents unnecessary calls
to your api or processing of inputs until the user is finished interacting with the interface. This is useful
when you only care what the final state of the input is. Any user interactions that trigger expensive api calls
can be wrapped in a debounce function.

Example code taken for Underscore.js
`
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
	var timeout;
	return function() {
		var context = this, args = arguments;
		var later = function() {
			timeout = null;
			if (!immediate) func.apply(context, args);
		};
		var callNow = immediate && !timeout;
		clearTimeout(timeout);
		timeout = setTimeout(later, wait);
		if (callNow) func.apply(context, args);
	};
};
`


text:
## What is it?

**log_proxy** is a tiny C utility for log rotation for apps that write their logs to stdout.

This is very useful, specially for [12-factor apps that write their logs to stdout](https://12factor.net/logs).

It can be used to avoid loosing some logs if you use `logrotate` with `copytruncate` feature or to prevent a log file from filling your hard disk.

## Features

- [x] usable as a pipe (`myapp myapp_arg1 myapp_arg2 |log_proxy /log/myapp.log`)
- [x] configurable log rotation suffix with `stftime` placeholders (for example: `.%Y%m%d%H%M%S`)
- [x] can limit the number of rotated files (and delete oldest)
- [x] can rotate files depending on their size (in bytes)
- [x] can rotate files depending on their age (in seconds)
- [x] does not need a specific log directory for a given app (you can have one directory with plenty of different log files from different apps)
- [x] several instances of the same app can log to the same file without issue (example: `myapp arg1 |log_proxy --use-locks /log/myapp.log` and `myapp arg2 |log_proxy --use-locks /log/myapp.log` can run at the same time)
- [ ] configurable action (a command to execute) to run after each log rotation
- [ ] rock solid (it's perfectly stable in our use case but we are waiting for other success stories to check this feature)
- [ ] option to add a timestamp before each log line
- [x] really fast
- [x] do not eat a lot of memory
- [x] configurable with CLI options as well with env variables
- [x] usable as a wrapper to capture stdout and stderr (`log_proxy_wrapper --stdout=/log/myapp.stdout --stderr=/log/myapp.stderr -- myapp myapp_arg1 myapp_arg2`)
- [x] usable as a wrapper to capture stdout and stderr in the same file (`log_proxy_wrapper --stdout=/log/myapp.log --stderr=STDOUT -- myapp myapp_arg1 myapp_arg2`)
- [x] very few dependencies (only `glib2` is required)
- [x] very easy to build (event on old distributions like `CentOS 6`)

## How to install?

We provide Linux 64 bits binaries in [releases section](https://github.com/metwork-framework/log_proxy/releases). There is virtually no requirement (you just need a Linux 64 bits distribution more recent than CentOS 6 (2011!)).

Of course, you can also build the tool by yourself (see at the end of this document).

To install the binary distribution:

```
# As root user (or with sudo)
# (example with 0.1.0 release, please fix the number to the release you want to install)
export RELEASE=v0.1.0
cd /opt
wget -O log_proxy-linux64-${RELEASE}.tar.gz "https://github.com/metwork-framework/log_proxy/releases/download/${RELEASE}/log_proxy-linux64-${RELEASE}.tar.gz"
zcat log_proxy-linux64-${RELEASE}.tar.gz |tar xvf -
ln -s log_proxy-linux64-${RELEASE} log_proxy
rm -f log_proxy-linux64-${RELEASE}.tar.gz
```

You can now use it with absolute path `/opt/log_proxy/bin/log_proxy` and `opt/log_proxy/bin/log_proxy_wrapper`.

For a more convenient way, configure your `PATH` to prepend the `/opt/log_proxy/bin` path. For example (maybe you would have to adapt this to your specific Linux distribution):

```
cat >/etc/profile.d/log_proxy.sh <<EOF
# Add log_proxy directory to PATH
export PATH="/opt/log_proxy/bin:${PATH}"
EOF
```

After a restart of your terminal, you should use `log_proxy` directly by its name.

## Why this tool?

### Why not using `logrotate` with `copytruncate` feature?

If you use `myapp myapp_arg1 myapp_arg2 >/log/myapp.log 2>&1`for example and if you can't stop easily your app (because it's a critical thing), you can configure `logrotate` with `copytruncate` feature to do the log rotation of `/log/myapp.log` but:

- you may loose a few lines during log rotation (1)
- the rotation is mainly time-based, so you can fill your storage if your app suddently start to be very very verbose

(1), see https://unix.stackexchange.com/questions/475524/how-copytruncate-actually-works

> Please note also that copyrotate has an inherent race condition, in that it's possible that the writer will append a line to the logfile just after logrotate finished the copy and before it has issued the truncate operation. That race condition would cause it to lose those lines of log forever. That's why rotating logs using copytruncate is usually not recommended, unless it's the only possible way to do it.

### Why developing another tool?

After reading: https://superuser.com/questions/291368/log-rotation-of-stdout and http://zpz.github.io/blog/log-rotation-of-stdout/, we reviewed plenty of existing tools (`multilog`, `rotatelogs`, `piper`...).

But none of them was ok with our needed features:

- configurable log rotation on size **AND** age
- no dedicated log directory for an app
- (and) several instances of the same app can log to the same log file without issue

The [piper tool](https://github.com/gongled/piper) was the more close but does not support the last feature (several instances to the same log file).

## Usage

### As a filter

```console
your_app your_app_arg1 your_app_arg2 2>&1 |log_proxy --rotation-size=1000000 my_log_file_max_1MB.log
```

Full help:

```console
$ ./log_proxy --help
Usage:
  log_proxy [OPTION?] LOGNAME  - log proxy

Help Options:
  -h, --help                Show help options

Application Options:
  -s, --rotation-size       maximum size (in bytes) for a log file before rotation (0 => no maximum, default: content of environment variable LOGPROXY_ROTATION_SIZE or 104857600 (100MB))
  -t, --rotation-time       maximum lifetime (in seconds) for a log file before rotation (0 => no maximum, default: content of environment variable LOGPROXY_ROTATION_TIME or 86400 (24H))
  -S, --rotation-suffix     strftime based suffix to append to rotated log files (default: content of environment variable LOGPROXY_ROTATION_SUFFIX or .%Y%m%d%H%M%S)
  -n, --rotated-files       maximum number of rotated files to keep including main one (0 => no cleaning, default: content of environment variable LOGPROXY_ROTATED_FILES or 5)
  -m, --use-locks           use locks to append to main log file (useful if several process writes to the same file)
  -f, --fifo                if set, read lines on this fifo instead of stdin
  -r, --rm-fifo-at-exit     if set, drop fifo at then end of the program (you have to use --fifo option of course)

Optional environment variables to override defaults :
    LOGPROXY_ROTATION_SIZE
    LOGPROXY_ROTATION_TIME
    LOGPROXY_ROTATION_SUFFIX
    LOGPROXY_ROTATED_FILES

Example for rotation-size option :
- If log_proxy is run with the option --rotation-size on command line, rotation-size will take the provided value
- If the option --rotation-size is not provided on command line :
  - If the environment variable LOGPROXY_ROTATION_SIZE is set, rotation-size will take this value
  - If the environment variable LOGPROXY_ROTATION_SIZE is not set, rotation-size will take the default value 104857600
```

## As a wrapper

```console
log_proxy_wrapper --rotation-size=1000000 --stdout=my_log_file_max_1MB.log --stderr=STDOUT -- your_app your_app_arg1 your_app_arg2
```

Full help:

```console
$ ./log_proxy_wrapper --help
Usage:
  log_proxy_wrapper [OPTION?] -- COMMAND [COMMAND_ARG1] [COMMAND_ARG2] [...] - log proxy

Help Options:
  -h, --help                Show help options

Application Options:
  -s, --rotation-size       maximum size (in bytes) for a log file before rotation (0 => no maximum, default: content of environment variable LOGPROXY_ROTATION_SIZE or 104857600 (100MB))
  -t, --rotation-time       maximum lifetime (in seconds) for a log file before rotation (0 => no maximum, default: content of environment variable LOGPROXY_ROTATION_TIME or 86400 (24H))
  -S, --rotation-suffix     strftime based suffix to append to rotated log files (default: content of environment variable LOGPROXY_ROTATION_SUFFIX or .%Y%m%d%H%M%S
  -n, --rotated-files       maximum number of rotated files to keep including main one (0 => no cleaning, default: content of environment variable LOGPROXY_ROTATED_FILES or 5)
  -m, --use-locks           use locks to append to main log file (useful if several process writes to the same file)
  -O, --stdout              stdout file path (NULL string (default) can be used to redirect to /dev/null)
  -E, --stderr              stderr file path (STDOUT string (default) can be used to redirect to the same file than stdout)
```

## How to build?

### Requirements

A Linux/Unix distribution with standard development tools (`git`, `gcc`, `make`, `pkg-config`) and `glib2` library with `devel` support (provided for example in CentOS 6 in the `glib2-devel` standard package).

### Build and install

```console
git clone https://github.com/metwork-framework/log_proxy # or download/unpack a zip with the github interface
cd log_proxy
make
```

Then as `root` user or prefixed with `sudo`:

```console
make PREFIX=/usr/local install
```


text:
---
id: e543ad13-1108-448c-b3a6-9976fd7a65ce
title: Release Notes(version 0.21)
desc: ''
updated:<PHONE_NUMBER>304
created:<PHONE_NUMBER>965
---
Dendron 0.21 is here 🌱

With 0.21, multi-vault should now be at feature parity with single vault workspaces. Multi-vault specific behavior is documented [[here|dendron.topic.vaults.multi-vault]].

0.21 also brings about Dendron's 2nd Generation publishing feature. This is a faster, leaner, and more powerful way to publish your notes using Dendron.

There's still some work left to integrate publishing into the Dendron plugin - meanwhile, you can take the new publishing workflow for a spin by following the instructions [[here|dendron.topic.publishing.quickstart]]

### Highlights

- publishing v2
  - v2 is over 30x faster (compiling the dendron site takes 6s for 200 pages vs 220s in v1) 🚀🚀🚀
  - v2 supports publishing with multi-vault
  - v2 is all javascript (no more download ruby just to publish)
- support note references for multi-vault
- bug fixes and performance improvements

### Community

- new bug catchers: @rasmuse#4440 @Contessa#0861 @TokyoMike#2771
- new environmentalist: @Stephen#8544

You can find a description of all roles [[here|community.roles]]

### In the Works

- bring publishing v2 to feature parity
- better note references

### Thanks

Last and most of all, a big **thanks** to the following gardeners that brought up issues, contributions, and fixes to this release 👨🌾 👩🌾

- [Rasmus Einarsson](https://github.com/rasmuse)
  - [Self referential refactoring issue](https://github.com/dendronhq/dendron/issues/406)
- [Whitney](https://github.com/whitbur)
  - [Note creation from selected text mangles non-vault files](https://github.com/dendronhq/dendron/issues/410)
- [Mike](https://github.com/ms3056)
  - [Matching requires unique files for lower nodes](https://github.com/dendronhq/dendron/issues/407)

repository: bdefore/dendron-site

repo_name: bdefore/dendron-site


text:
---
title: "I'm a steam engine: a tale of executive dysfunction"
layout: post
tags: [ADHD, neurodiversity, executive dysfunction]
image: /assets/images/gary-doughty-bxoBooJleSM-unsplash.jpg
categories: blog
---
I've been working almost fully remote for several years now. At my current client, we have 1 office day per 2 weeks which in itself is great. There is one thing that's playing havoc with my ability to focus though.

{% include image.html url="/assets/images/gary-doughty-bxoBooJleSM-unsplash.jpg" description="Photo by Gary Doughty on Unsplash" %}

I recently described myself as a diesel train to a friend and she corrected me saying that I'm actually more like an old-fashioned steam engine. Once I get moving I'm unstoppable, but getting to that point requires a lot of mental work. Basically, I need to stoke the fire, heat the kettle and slowly get myself moving to counter-act my executive dysfunction.

This generally involves noise-cancelling headphone, music and writing down exactly what I need to do, which problems I expect to face, how I'll try to tackle them, etc.

I've gotten in the habit of keeping a log file for each ticket I work on, which has the dual benefit that I kind of become my own rubber ducky, and I have a written record of what I did. If I come back to a ticket later on I don't need to rely on my memory, I can look it up instead.

This particular client has one unique aspect to their process: they have 2 standups per days. So, at 9:30 in the morning we have the usual morning standup, but at 4pm we have another standup, where we discuss how the day went.

Now in itself I see the usefulness here. It's a good way to keep in touch, and it's a way to find problems quickly. For me it's a huge flow killer though.

Because I'm like a steam engine, I work best when I have long blocks of uninterrupted time, allowing me to build up hyperfocus. Once I get there I can move mountains, but getting there just takes time. I realise this is true for most people, but for my ADHD brain it's way worse.

Always having at least 2 meetings per day means my longest uninterrupted block of time is 3 hours, and this really is a best-case. Generally there are other interruptions as well. It just makes me feel unproductive and like I'm failing the team.

Since I try to practise "Be Brave" these days, I brought it up in a retrospective and made a case for skipping the second standup. Unfortunately the rest of the team values the added social element of seeing each other more and most of them don't have the same flow issues I do, so the proposal was voted down.

I'm still debating how to handle this situation. On one hand I feel that I should just tell my inner critic that I'm being as productive as I can be given the circumstances. I haven't gotten any negative feedback to my performance, so most likely this is just me not living up to my own expectations of myself.

I've also considered asking if I could be excused from the second standup, but I'm A) not very comfortable asking for special accommodations and B) I'd be missing out on conversations that I do need to be part of.

I'll give it some more thought, and if I come up with more insights I'll write more later.

gha_language: HTML


text:
---
title: Pipe First
---

`->` is a convenient operator that allows you to "flip" your code inside-out. `a(b)` becomes `b->a`. It's a piece of syntax that doesn't have any runtime cost.

Imagine you have the following:

```reason
validateAge(getAge(parseData(person)))
```

This is slightly hard to read, since you need to read the code from the innermost part, to the outer parts. Use Pipe First to streamline it

```reason
person
  ->parseData
  ->getAge
  ->validateAge
```

Basically, `parseData(person)` is transformed into `person->parseData`, and `getAge(person->parseData)` is transformed into `person->parseData->getAge`, etc.

**This works when the function takes more than one argument too**.

```reason
a(one, two, three)
```

is the same as

```reason
one->a(two, three)
```

This works with labeled arguments too.

### Tips & Tricks

Try not to abuse pipes; they're a means to an end. Newcomers sometimes shape a library's API to take advantage of the pipe. This is rather backward.

Conventionally, we don't turn the innermost layer of function call into a pipe. So the above example would usually be written as:

```reason
parseData(person)
  ->getAge
  ->validateAge
```

## JS Method Chaining

_This section requires understanding of [Bucklescript's binding API](https://bucklescript.github.io/docs/en/function#object-method)_.

JavaScript's APIs are often attached to objects, and often chainable, like so:

```js
const result = [1, 2, 3].map(a => a + 1).filter(a => a % 2 === 0);

asyncRequest()
  .setWaitDuration(4000)
  .send();
```

Assuming we don't need the chaining behavior above, we'd bind to each case this using `bs.send` from the previous section:

```reason
<EMAIL_ADDRESS>external map : (array('a), 'a => 'b) => array('b) = "map";
<EMAIL_ADDRESS>external filter : (array('a), 'a => 'b) => array('b) = "filter";

type request;
external asyncRequest: unit => request = "asyncRequest";
<EMAIL_ADDRESS>external setWaitDuration: (request, int) => request = "setWaitDuration";
<EMAIL_ADDRESS>external send: request => unit = "send";
```

You'd use them like this:

```reason
let result = filter(map([|1, 2, 3|], a => a + 1), a => a mod 2 == 0);

send(setWaitDuration(asyncRequest(), 4000));
```

This looks much worse than the JS counterpart! Now we need to read the actual logic inside-out. We also cannot use the `|>` operator here, since the object comes _first_ in the binding. But `->` works!

```reason
let result = [|1, 2, 3|]
  ->map(a => a + 1)
  ->filter(a => a mod 2 === 0);

asyncRequest()->setWaitDuration(4000)->send;
```

## Pipe Into Variants

A variant's constructors, like `Some` or `Student`, look like functions, but unfortunately aren't, due to historical reasons. Sometime, it'd still be nice to be able to use them as functions. Pipe First takes the occasion to enable that for you!

```reason
let result = name->preprocess->Some
```

We turn this into:

```reason
let result = Some(preprocess(name))
```

**Note** that using a variant constructor as a function wouldn't work anywhere else.

## Pipe Placeholders

A placeholder is written as an underscore and it tells Reason that you want to fill in an argument of a function later. These two have equivalent meaning:

```reason
let addTo7 = (x) => add3(3, x, 4);
let addTo7 = add3(3, _, 4);
```

Sometimes you don't want to pipe the value you have into the first position. In these cases you can mark a placeholder value to show which argument you would like to pipe into.

Let's say you have a function `namePerson`, which takes a `person` then a `name` argument. If you are transforming a person then pipe will work as-is:

```reason
makePerson(~age=47, ())
  ->namePerson("Jane");
```

If you have a name that you want to apply to a person object, you can use a placeholder:

```reason
getName(input)
  ->namePerson(personDetails, _);
```

This allows you to pipe into any positional argument. It also works for named arguments:

```reason
getName(input)
  ->namePerson(~person=personDetails, ~name=_);
```

branch_name: refs/heads/source


text:
New Site!
=========

This is my new website made in [Jekyll][] which is a static site generator.

[Jekyll]: http://jekyllrb.com/

Sitemap
-------

    /
    /about
    /projects
    /books
    /blog
    /blog/:year
    /blog/:year/:month
    /blog/:year/:month/:day
    /blog/:year/:month/:day/:title
    /blog/categories
    /blog/categories/:category
    /blog/tags
    /blog/tags/:tags
    /archive
    /404
    /wiki
    /wiki/*page
    /games
    /games/:title
    /sitemap

    game ex:
    /games/sat-e/
    /games/sat-e/download/Linux_64bit-Sat-E_v1.0.tar
    /games/sat-e/download/Windows-Sat-E_v1.0.zip
    /games/sat-e/screenshot/Alone.png
    /games/sat-e/screenshot/Docking_Station.png
    /games/sat-e/screenshot/Lots_Of_Stuff.png

TODO
----

* Projects ordered after latest change/update
* Github link, not only as git clone

* Write
    * Introductary home page header
    * Check about page
    * Website in readme (here!)
    * 404 header

* Remove 'General' from tags and categories

* Design!
    * Unreadable on mobile phone
    * Fix html5 markup for unsupportive browsers

    * Tagged as in posts
    * Delimiter (horisontal line?) between posts in listings
    * Code highlighting
        * Remove code borders, need background
    * Link styling
        * Change color when hovering
    * Size + color for headers in pages
    * Games
        * Better download styling
        * Style code links etc
    * Projects
        * Style repository link
        * Prettier download link
        * Bunch up projects, see - http://recursive-design.com/projects/
        * Icons for languages etc
    * Style unordered/ordered lists better
    * Wiki page
    * More color to header
    * Add a small banner-like image?
    * Pictures in footer
    * Funky looking 404 page
    * Main page split bottom links prettier
        * Display more posts to align with projects and games
    * Not as visible "Read more..."
    * Color scheme for site!
    * Highlight first post on home page
    * Github Code link for humans

* Implement urls:

        /sitemap.xml
        /quotes

* Better 404 page
    * List tags + categories?

* Check correctness of feed links

* Make `site --link test` check correct links inside `_site` instead of using a server.

* `site --game` to edit games

* Log script. Retrieve and store logs from s3 storage.

* Reroute domain names
    Not possible to direct to bucket directly...
    Possible with amazon cloud front (cost 0.1$/month...)

* 301 redirects... How to handle?
    Don't care?! :(

References
----------

Some plugin stuff modified from [here][black] and [here][jp].

[black]: http://github.com/BlackBulletIV/blackbulletiv.github.com
[jp]: http://recursive-design.com/projects/jekyll-plugins/

Dependencies
------------

Jekyll
rdiscount
git
zip
pygments

repository: treeman/madeoftree

extension: markdown

repo_name: treeman/madeoftree


text:
# Udacity Front-end Nano-degree
## My Neighborhood Map

### Intro:
This project # 5 is part of my Udacity Front-end Nano-degree. In this project, I have introduced best restaurant in Nashville, TN.

### How to use:
  Each restaurant is pin point using marker on Google Map. Each marker turn into green whenever user click on it. By clicking, User can open Info Window which show restaurant Name and Address.
  Click on right-double arrow open lists panel. This sidebar include lists of restaurant. This lists can be filter using typing text into filter box on top of the lsit. Also, Cliking on the list open Info Window on associated marker.
  CLick on left-double arrow to close sidebar for list.

 You can clone my repository.
2. git clone https://github.com/kiranapatel/Neighborhood-Map.git
   * Run index.html in your favorite browser.

### API:
* Google Map API

### Library:
* Knockout js
* jQuery
* bootstrap

repository: kiranapatel/Neighborhood-Map

repo_name: kiranapatel/Neighborhood-Map


text:
# slideshow-with-css-scroll-snap

A touch and keyboard friendly slideshow made with [CSS scroll snap](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Scroll_Snap) **without dependencies**.

[LIVE DEMO](https://iagobruno.github.io/slideshow-with-css-scroll-snap/)

## Features

- ✅ Touch support.
- ✅ Keyboard support.
- ✅ Paging indicator.
- ✅ Navigation with next and previous buttons.
- ✅ Mousewheel support.
- ✅ Auto play.

## Browser support

- https://caniuse.com/#feat=css-snappoints
- https://caniuse.com/#feat=css-scroll-behavior
- https://caniuse.com/#feat=mdn-api_scrolltooptions

## License

[MIT](https://github.com/iagobruno/slideshow-with-css-scroll-snap/blob/master/LICENSE)


text:
# DiscoGAN implementation in pytorch on celebA

## Usage
```bash
$ python3 main.py --style_A
```
> **_NOTE:_** on Colab Notebook use following command:
```python
!git clone link-to-repo
%run main.py --style_A
```

```bash
usage: main.py [-h] [--cuda CUDA] [--epoch_size EPOCH_SIZE]
                             [--batch_size BATCH_SIZE]
                             [--learning_rate LEARNING_RATE]
                             [--result_path RESULT_PATH]
                             [--model_path MODEL_PATH]
                             [--image_size IMAGE_SIZE]
                             [--gan_curriculum GAN_CURRICULUM]
                             [--starting_rate STARTING_RATE]
                             [--default_rate DEFAULT_RATE] [--style_A STYLE_A]
                             [--style_B STYLE_B] [--constraint CONSTRAINT]
                             [--constraint_type CONSTRAINT_TYPE]
                             [--n_test N_TEST]
                             [--update_interval UPDATE_INTERVAL]
                             [--log_interval LOG_INTERVAL]
                             [--image_save_interval IMAGE_SAVE_INTERVAL]
                             [--model_save_interval MODEL_SAVE_INTERVAL]
                             [--attrs ATTRS [ATTRS ...]]

Use -h,--help to show help message for arguments
```

## Contributed by:
[Nakul Jindal](https://github.com/nakul-jindal)

## References

* **Title**: UNSUPERVISED REPRESENTATION LEARNING WITH DEEP CONVOLUTIONAL GENERATIVE ADVERSARIAL NETWORKS
* **Authors**: Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, Jiwon Kim
* **Link**: https://arxiv.org/abs/1703.05192.pdf
* **Tags**: Computer Vision and Pattern Recognition (cs.CV) , GANs
* **Year**: 2017

# summary

## Introduction

- A DiscoGAN is a generative adversarial network that generates images of products in domain B given an image in domain A and vice-versa.
- Previous AI could also transfer data from one domain to another, preserving key attributes but require paired data, that is costly and hard to collect
- DiscoGAN requires training of 2 different data sets without any paired data, and its results shows better performance with robustness to the mode collapse problem
- Illustrated in the following diagram is an architectural diagram of a DisoGAN network:

![flowchart](assets/flowchart.png)

* BIJECTIVE : Basically this paper introduced a framework for finding one-to-one mapping between two domains in an unsupervised way by joint training of two GAN model G1 and G2 in parallel (one for A->B and the other one for B->A).  Specifically, we restrict that G2(G1(A)) = A and G1(G2(B)) = B

* key intuition is to constraint all images in one domain to be representable by images in the other domain. Hence , it learns the bidirectional mapping between two image domains, such as faces, cars, chairs, edges and photos, and successfully apply them in
image translation. Translated images consistently change specified attributes such as hair color, gender and orientation while maintaining all other components.

* BCE loss function for GAN loss :

![gan_loss](assets/gan_loss.jpg)

* MSE loss function for recontruction loss :

![recon_loss](assets/recon_loss.jpg)

## Model Architecture

### Generator

![Generator](assets/Generator.png)

- DiscoGAN's generator is a gan with a GAN adversarial loss and reconstruction loss to ensure the consistency.
- Each generator takes an image and feeds it through an encoder-decoder pair .
- GAN loss + reconstruction loss is to be minimized on training processes.
 - Number of layers ranges from 4 to 5 depending on the domain Encoder (convolution layer) Decoder (deconvolution layer) Domain A (resp. B) Domain B (resp. A)

> **_INFO:_**  Reconstruction loss measures how well the original input is reconstructed after a sequence of two generations . GAN loss measures how realistic the generated image is in domain B .

### Discriminator

![Discriminator](assets/Discriminator.png)

- Each discriminator feeds an image through convolution layers.
- Discriminator outputs a scalar output based on sigmoid, telling how real fed image is.

### Hyper-Parameters

- Image Size = 64x64
- Batch Size = 64
- Learning Rate = 0.0002
- Weight Decay = 0.00001
- Adam_beta1 = 0.5
- Loss Weights: See the code
- Scheduling: See the code

## Training loss

![Loss](assets/loss.png)

## Results of hair color conversion after 2500 epochs

x_A -> G_AB(x_A) -> G_BA(G_AB(x_A))

![result](assets/celeba.png)

Blond -> Black -> Blond

The official implementation uses female celebs for this purpose and got good results . However, for male celebs , hair color conversion becomes a difficult task due to lesser portion of image occupied by the hair.

#### some observations :
* In order to get better results, the generator needs to be smarter than discriminator.
* greater latent size of generator is required in order to get better generated images.

repository: library-of-code/deep-learning

gha_language: Python

repo_name: library-of-code/deep-learning


text:
Karma runs on [Node.js] and is available via [NPM].

## Requirements

First, you need to install [Node.js](http://nodejs.org/download/). There are installers for both
Mac and Windows. On Linux, we recommend using [NVM].

## Global Installation
This is the recommended way. It will install Karma into your global `node_modules` directory and
create a symlink in your system path, so that you can run `karma` command from any directory.

```bash
$ npm install -g karma
```

Note, that `karma` command always looks for locally installed Karma first and if present,
it uses the local version. This allows you to use different version of Karma per project.

## Local Installation
A local installation will install Karma into your current directory's `node_modules`.

```bash
$ npm install karma --save-dev
```

[Node.js]: http://nodejs.org/
[NPM]: npmjs.org/package/karma
[NVM]: https://github.com/creationix/nvm

repository: garcimouche/karma

repo_name: garcimouche/karma


text:
# VulnerabilityCheck

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | The identifier of the vulnerability check. | [optional]
**links** | [**list[Link]**](Link.md) | Hypermedia links to corresponding or related resources. | [optional]
**plugin** | **str** | The name of the plugin (module) the check belongs to. | [optional]
**potential** | **bool** | Whether the check results in potential vulnerabilities. | [optional]
**requires_credentials** | **bool** | Whether the check requires credentials in order to run. | [optional]
**safe** | **bool** | Whether the checked is deemed to be \"safe\" to run. A safe check is one that can be run without negatively impacting the host it is run against. | [optional]
**service** | **bool** | Whether the check operates against a service, or false it it is a local check. | [optional]
**unique** | **bool** | Whether the check may only register a result once during a scan of host. Otherwise, the tests in the check can run multiple times, possibly registering multiple results. | [optional]
**vulnerability** | **str** | The identifier of the vulnerability the check results in. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

repository: confluentinc/vm-console-client-python

repo_name: confluentinc/vm-console-client-python


text:
## Perceptual Similarity Metric and Dataset [[Project Page]](http://richzhang.github.io/PerceptualSimilarity/)

**The Unreasonable Effectiveness of Deep Features as a Perceptual Metric**
[Richard Zhang](https://richzhang.github.io/), [Phillip Isola](http://web.mit.edu/phillipi/), [Alexei A. Efros](http://www.eecs.berkeley.edu/~efros/), [Eli Shechtman](https://research.adobe.com/person/eli-shechtman/), [Oliver Wang](http://www.oliverwang.info/).

In [CVPR](https://arxiv.org/abs/1801.03924), 2018.

This repository contains our **perceptual metric (LPIPS)** and **dataset (BAPPS)**. It can also be used as a "perceptual loss". This uses PyTorch; a Tensorflow alternative is [here](https://github.com/alexlee-gk/lpips-tensorflow).

**Table of Contents**

1. [Learned Perceptual Image Patch Similarity (LPIPS) metric](#1-learned-perceptual-image-patch-similarity-lpips-metric)

   a. [Basic Usage](#a-basic-usage) If you just want to run the metric through command line, this is all you need.

   b. ["Perceptual Loss" usage](#b-backpropping-through-the-metric)

   c. [About the metric](#c-about-the-metric)

2. [Berkeley-Adobe Perceptual Patch Similarity (BAPPS) dataset](#2-berkeley-adobe-perceptual-patch-similarity-bapps-dataset)

   a. [Download](#a-downloading-the-dataset)

   b. [Evaluation](#b-evaluating-a-perceptual-similarity-metric-on-a-dataset)

   c. [About the dataset](#c-about-the-dataset)

   d. [Train the metric using the dataset](#d-using-the-dataset-to-train-the-metric)

## (0) Dependencies/Setup

### Installation
- Install PyTorch 1.0+ and torchvision fom http://pytorch.org

```bash
pip install -r requirements.txt
```
- Clone this repo:
```bash
git clone https://github.com/richzhang/PerceptualSimilarity
cd PerceptualSimilarity
```

## (1) Learned Perceptual Image Patch Similarity (LPIPS) metric

Evaluate the distance between image patches. **Higher means further/more different. Lower means more similar.**

### (A) Basic Usage

#### (A.I) Line commands

Example scripts to take the distance between 2 specific images, all corresponding pairs of images in 2 directories, or all pairs of images within a directory:

```
python compute_dists.py -p0 imgs/ex_ref.png -p1 imgs/ex_p0.png --use_gpu
python compute_dists_dirs.py -d0 imgs/ex_dir0 -d1 imgs/ex_dir1 -o imgs/example_dists.txt --use_gpu
python compute_dists_pair.py -d imgs/ex_dir_pair -o imgs/example_dists_pair.txt --use_gpu
```

#### (A.II) Python code

File [test_network.py](test_network.py) shows example usage. This snippet is all you really need.

```python
import models
model = models.PerceptualLoss(model='net-lin', net='alex', use_gpu=use_gpu, gpu_ids=[0])
d = model.forward(im0,im1)
```

Variables ```im0, im1``` is a PyTorch Tensor/Variable with shape ```Nx3xHxW``` (```N``` patches of size ```HxW```, RGB images scaled in `[-1,+1]`). This returns `d`, a length `N` Tensor/Variable.

Run `python test_network.py` to take the distance between example reference image [`ex_ref.png`](imgs/ex_ref.png) to distorted images [`ex_p0.png`](imgs/ex_p0.png) and [`ex_p1.png`](imgs/ex_p1.png). Before running it - which do you think *should* be closer?

**Some Options** By default in `model.initialize`:
- `net='alex'`: Network `alex` is fastest, performs the best, and is the default. You can instead use `squeeze` or `vgg`.
- `model='net-lin'`: This adds a linear calibration on top of intermediate features in the net. Set this to `model=net` to equally weight all the features.

### (B) Backpropping through the metric

File [`perceptual_loss.py`](perceptual_loss.py) shows how to iteratively optimize using the metric. Run `python perceptual_loss.py` for a demo. The code can also be used to implement vanilla VGG loss, without our learned weights.

### (C) About the metric

**Higher means further/more different. Lower means more similar.**

We found that deep network activations work surprisingly well as a perceptual similarity metric. This was true across network architectures (SqueezeNet [2.8 MB], AlexNet [9.1 MB], and VGG [58.9 MB] provided similar scores) and supervisory signals (unsupervised, self-supervised, and supervised all perform strongly). We slightly improved scores by linearly "calibrating" networks - adding a linear layer on top of off-the-shelf classification networks. We provide 3 variants, using linear layers on top of the SqueezeNet, AlexNet (default), and VGG networks.

If you use LPIPS in your publication, please specify which version you are using. The current version is 0.1. You can set `version='0.0'` for the initial release.

## (2) Berkeley Adobe Perceptual Patch Similarity (BAPPS) dataset

### (A) Downloading the dataset

Run `bash ./scripts/download_dataset.sh` to download and unzip the dataset into directory `./dataset`. It takes [6.6 GB] total. Alternatively, run `bash ./scripts/get_dataset_valonly.sh` to only download the validation set [1.3 GB].
- 2AFC train [5.3 GB]
- 2AFC val [1.1 GB]
- JND val [0.2 GB]

### (B) Evaluating a perceptual similarity metric on a dataset

Script `test_dataset_model.py` evaluates a perceptual model on a subset of the dataset.

**Dataset flags**
- `--dataset_mode`: `2afc` or `jnd`, which type of perceptual judgment to evaluate
- `--datasets`: list the datasets to evaluate
    - if `--dataset_mode 2afc`: choices are [`train/traditional`, `train/cnn`, `val/traditional`, `val/cnn`, `val/superres`, `val/deblur`, `val/color`, `val/frameinterp`]
    - if `--dataset_mode jnd`: choices are [`val/traditional`, `val/cnn`]

**Perceptual similarity model flags**
- `--model`: perceptual similarity model to use
    - `net-lin` for our LPIPS learned similarity model (linear network on top of internal activations of pretrained network)
    - `net` for a classification network (uncalibrated with all layers averaged)
    - `l2` for Euclidean distance
    - `ssim` for Structured Similarity Image Metric
- `--net`: [`squeeze`,`alex`,`vgg`] for the `net-lin` and `net` models; ignored for `l2` and `ssim` models
- `--colorspace`: choices are [`Lab`,`RGB`], used for the `l2` and `ssim` models; ignored for `net-lin` and `net` models

**Misc flags**
- `--batch_size`: evaluation batch size (will default to 1)
- `--use_gpu`: turn on this flag for GPU usage

An example usage is as follows: `python ./test_dataset_model.py --dataset_mode 2afc --datasets val/traditional val/cnn --model net-lin --net alex --use_gpu --batch_size 50`. This would evaluate our model on the "traditional" and "cnn" validation datasets.

### (C) About the dataset

The dataset contains two types of perceptual judgements: **Two Alternative Forced Choice (2AFC)** and **Just Noticeable Differences (JND)**.

**(1) 2AFC** Evaluators were given a patch triplet (1 reference + 2 distorted). They were asked to select which of the distorted was "closer" to the reference.

Training sets contain 2 judgments/triplet.
- `train/traditional` [56.6k triplets]
- `train/cnn` [38.1k triplets]
- `train/mix` [56.6k triplets]

Validation sets contain 5 judgments/triplet.
- `val/traditional` [4.7k triplets]
- `val/cnn` [4.7k triplets]
- `val/superres` [10.9k triplets]
- `val/deblur` [9.4k triplets]
- `val/color` [4.7k triplets]
- `val/frameinterp` [1.9k triplets]

Each 2AFC subdirectory contains the following folders:
- `ref`: original reference patches
- `p0,p1`: two distorted patches
- `judge`: human judgments - 0 if all preferred p0, 1 if all humans preferred p1

**(2) JND** Evaluators were presented with two patches - a reference and a distorted - for a limited time. They were asked if the patches were the same (identically) or different.

Each set contains 3 human evaluations/example.
- `val/traditional` [4.8k pairs]
- `val/cnn` [4.8k pairs]

Each JND subdirectory contains the following folders:
- `p0,p1`: two patches
- `same`: human judgments: 0 if all humans thought patches were different, 1 if all humans thought patches were same

### (D) Using the dataset to train the metric

See script `train_test_metric.sh` for an example of training and testing the metric. The script will train a model on the full training set for 10 epochs, and then test the learned metric on all of the validation sets. The numbers should roughly match the **Alex - lin** row in Table 5 in the [paper](https://arxiv.org/abs/1801.03924). The code supports training a linear layer on top of an existing representation. Training will add a subdirectory in the `checkpoints` directory.

You can also train "scratch" and "tune" versions by running `train_test_metric_scratch.sh` and `train_test_metric_tune.sh`, respectively.

### Docker Environment

[Docker](https://hub.docker.com/r/shinyeyes/perceptualsimilarity/) set up by [SuperShinyEyes](https://github.com/SuperShinyEyes).

## Citation

If you find this repository useful for your research, please use the following.

```
@inproceedings{zhang2018perceptual,
  title={The Unreasonable Effectiveness of Deep Features as a Perceptual Metric},
  author={Zhang, Richard and Isola, Phillip and Efros, Alexei A and Shechtman, Eli and Wang, Oliver},
  booktitle={CVPR},
  year={2018}
}
```

## Acknowledgements

This repository borrows partially from the [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix) repository. The average precision (AP) code is borrowed from the [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/datasets/voc_eval.py) repository. Backpropping through the metric was implemented by [Angjoo Kanazawa](https://github.com/akanazawa).

repository: ch-andrei/L-IQA

repo_name: ch-andrei/L-IQA


text:
![PHP-Grab-Favicon](https://socialify.git.ci/gaffling/PHP-Grab-Favicon/image?description=1&font=KoHo&language=1&owner=1&stargazers=1&theme=Dark)

> This `PHP Favicon Grabber v1.1` use a given url, save a copy (if wished) and return the image path.

How it Works
------------

1. Check if the favicon already exists local or no save is wished, if so return path & filename
2. Else load URL and try to match the favicon location with regex
3. If we have a match the favicon link will be made absolute
4. If we have no favicon we try to get one in domain root
5. If there is still no favicon we randomly try google, faviconkit & favicongrabber API
6. If favicon should be saved try to load the favicon URL
7. If wished save the Favicon for the next time and return the path & filename

How to Use
----------

```PHP
$url = 'example.com';

$grap_favicon = array(
'URL' => $url,   // URL of the Page we like to get the Favicon from
'SAVE'=> true,   // Save Favicon copy local (true) or return only favicon url (false)
'DIR' => './',   // Local Dir the copy of the Favicon should be saved
'TRY' => true,   // Try to get the Favicon frome the page (true) or only use the APIs (false)
'DEV' => null,   // Give all Debug-Messages ('debug') or only make the work (null)
);

echo '<img src="'.grap_favicon($grap_favicon).'">';
```

Todo
----
Optional split the download dir into several sub-dirs (MD5 segment of filename e.g. /af/cd/example.com.png) if there are a lot of favicons.

Infos about Favicon
-------------------
https://github.com/audreyr/favicon-cheat-sheet

###### Copyright 2019-2020 Igor Gaffling

repository: gaffling/PHP-Grab-Favicon

repo_name: gaffling/PHP-Grab-Favicon


text:
# React4j Flux Challenge implementation

[![Build Status](https://api.travis-ci.com/react4j/react4j-flux-challenge.png?branch=master)](http://travis-ci.com/react4j/react4j-flux-challenge)

An solution for the problem presented in the [flux challenge](https://github.com/staltz/flux-challenge). The
implementation uses Arez and React4j. The source code has been vendored into this repository and the original
challenge can be read at [vendor/flux-challenge/README.md](vendor/flux-challenge/README.md).

The project must run against the server supplied by the flux-challenge. To set it up run the following commands:

    $  cd vendor/flux-challenge/server
    $  npm install
    $  npm start

This will start the server and the original submission at at [http://localhost:3000/s/](http://localhost:3000/s/).

The solution can be run through the GWT DevServer and is available at
[http://<IP_ADDRESS>:8888/sithtracker_dev/](http://<IP_ADDRESS>:8888/sithtracker_dev/) but it is assumed that you know
enough about Buildr/GWT/etc to get yourself to a running DevServer.


text:
# Setup

## 1. Server Access / SSH Keys
Create SSH Keys if you haven't already and setup a .my.conf for each environment's
home directory (including local) so you can access mysql from the command line
without a password.

## 2. MySql Commandline Access
Copy to ServerPath: `/home/forge/.my.conf`

```
[mysql]
user = forge
password = XXX

[mysqldump]
user = forge
password = XXX
```

## 3. RClone Cloud Storage Utility
Copy to LocalPath: `~/.config/rclone/rclone.conf`

Install RClone, and use the config generator, `rclone config` here's
an example of what it outputs:

https://rclone.org

```
[mysetting-spaces]
type = s3
provider = DigitalOcean
env_auth = false
secret_access_key = XXX
endpoint = sfo2.digitaloceanspaces.com
location_constraint =
acl = public-read
access_key_id = XXX

[mysetting-droplet]
type = sftp
host = <IP_ADDRESS>
user = forge
key_file = ~/.ssh/id_rsa
```

repository: sjpi/offsite-cloud-backups

repo_name: sjpi/offsite-cloud-backups


text:
# fsize
Simple CSS library to change font size using classes.

## Usage
Include the following in your HTML:

    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/hugonun/fsize/fsize.css">

Now simply include the class `size` with the desired size in the HTML tag. The size can be from 0px to 256px.

**Example:**

Hello world

repository: hugonun/fsize

repo_name: hugonun/fsize


text:
[OST KYC RUBY SDK v2.0.2](https://github.com/ostdotcom/ost-kyc-sdk-ruby/tree/v2.0.2) February 28 2019
---

* Repository moved from OpenStFoundation to ostdotcom and related readme update.

[OST KYC RUBY SDK v2.0.1](https://github.com/ostdotcom/ost-kyc-sdk-ruby/tree/v2.0.1) December 17 2018
---

* Implemented API's for kyc email send

[OST KYC Ruby SDK v2.0.0](https://github.com/ostdotcom/ost-kyc-sdk-ruby/tree/v2.0.0) December 4 2018
---

* Initial release of the official OST KYC Ruby SDK<br />
* This release has the OST KYC API V2 interaction layer implementation.

repository: ostdotcom/ost-kyc-sdk-ruby

gha_language: Ruby

repo_name: ostdotcom/ost-kyc-sdk-ruby


text:
# Explanation

Autocomplete with tries.

First, a Trie or a Prefix Tree is implemented. In particular we have:
- A `Trie` class that contains the root node (empty string)
- A `TrieNode` class that exposes the general functionality of the Trie, like inserting a word or finding the node which represents a prefix.

Secondly, a recursive function `suffixes()` is implemented in the `TrieNode` class. Given a particular `TrieNode` at any level, it recurrently traverses all the nodes in children nodes, and its all sub-children. If a given node represents a node, adds the aggregated suffix to the return list.

--

# Complexity analysis

## Time complexity

1. `insert` method: `O(n)`, `n` - length of the word (number of characters)

    Since we're iterating over the characters of the input word, the time complexity is linear.

2. `find` method: `O(n)`, `n` - length of the prefix

    In the worst case scenario we have to iterate over all characters in the provided `prefix` variable. Hence linear time `O(n)`.

3. `suffixes` - `O(n)`, `n` - number of nodes in a trie

    In the worst case senario, i.e. being at the root node of a Trie, we'd have to traverse through every node of the trie once. Hence a linear time in the number of nodes.

    Number of nodes is non-trivially proportional to the number of words and their length.

## Space complexity

1. `insert` - `O(n)` - where `n` is the total number of words in a tree

    The size of the Trie would grow in a non-trivial way with the words added. In other words - it depends on the statistical properties of words added, like: are the words completely unique, or do they share many suffixes?

2. `find` - `O(1)`

   Regardless of the trie size, we do not create any new data structures, and return already existing fragment of a trie.
   In the worst case scenario `find(prefix='')`, we return the root of the trie node.

3. `suffixes` - `O(n)`, `n` - number of nodes in a trie

   The function builds and stores all the suffixes of valid words in the children nodes of a `TrieNode`.
   In the worst case scenario all of the suffixes are words, hence `O(n)`, where `n` is the number of children nodes in a given `TrieNode`

repository: vaxherra/algorithmic-problems

repo_name: vaxherra/algorithmic-problems


text:
# Comments for Laravel.

## Features

- Comments and reply Comments
- Blacklist
- Moderation Mode
    - Mode => 1 (Public): All comments will be public.
    - Mode => 2 (Review comments on the blacklist): Comments that do not contain blacklisted words will be public. Otherwise, they  will remain hidden
    - Mode => 3 (Close): Comments will be created that do not contain blacklisted words. Otherwise, they  will not be created
- Limit comment characters
- Limit number of links in a comment
- UrlLinker (convert text links to html)

## Installation

From the command line:

```bash
composer require wimil/comments
```

### Publish Config & configure

Publish the config file:

```bash
php artisan vendor:publish --provider="Wimil\Comments\Provider" --tag=config
```

### Publish Migrations

You can publish migration to allow you to have more control over your table

```bash
php artisan vendor:publish --provider="Wimil\Comments\Provider" --tag=migrations
```

### Run migrations

We need to create the table for comments.

```bash
php artisan migrate
```

### Add Commenter trait to your Model

Add the `Commenter` trait to your User model so that you can retrieve the comments for a user:

```php
use Wimil\Comments\Commenter;

class User extends Authenticatable
{
    use Notifiable, Commenter;
}
```

### Add Commentable trait to models

Add the `Commentable` trait to the model for which you want to enable comments for:

```php
use Wimil\Comments\Commentable;

class Product extends Model
{
    use Commentable;
}
```

If you want to have your own Comment Model create a new one and extend my Comment model.

``` php
use Wimil\Comments\Model\Comment as BaseComment;

class Comment extends BaseComment
{
    // ...
}
```

and dont forget to update the model name in the `config/comment.php` file.

Comment package comes with several modes.

## Usage

``` php
$user = App\User::first();
$product = App\Product::first();

// $user->comment(Commentable $model, $comment = '');
$user->comment($product, 'Lorem ipsum ..');

```

repository: wimil/comments

repo_name: wimil/comments


text:
# Schedule

The object describing a `Schedule` event source type, which sets your serverless function as the target of an EventBridge rule that triggers on a schedule\. For more information, see [What Is Amazon EventBridge?](https://docs.aws.amazon.com/eventbridge/latest/userguide/what-is-amazon-eventbridge.html) in the *Amazon EventBridge User Guide*\.

AWS Serverless Application Model \(AWS SAM\) generates an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html) resource when this event type is set\.

## Syntax

To declare this entity in your AWS Serverless Application Model \(AWS SAM\) template, use the following syntax\.

### YAML

```
  [DeadLetterConfig](#sam-function-schedule-deadletterconfig): DeadLetterConfig
  [Description](#sam-function-schedule-description): String
  [Enabled](#sam-function-schedule-enabled): Boolean
  [Input](#sam-function-schedule-input): String
  [Name](#sam-function-schedule-name): String
  [RetryPolicy](#sam-function-schedule-retrypolicy): [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)
  [Schedule](#sam-function-schedule-schedule): String
```

## Properties

 `DeadLetterConfig`
Configure the Amazon Simple Queue Service \(Amazon SQS\) queue where EventBridge sends events after a failed target invocation\. Invocation can fail, for example, when sending an event to a Lambda function that doesn't exist, or when EventBridge has insufficient permissions to invoke the Lambda function\. For more information, see [Event retry policy and using dead\-letter queues](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html) in the *Amazon EventBridge User Guide*\.
**Note:** The [AWS::Serverless::Function](sam-resource-function.md) resource type has a similar data type, `DeadLetterQueue`, which handles failures that occur after successful invocation of the target Lambda function\. Examples of these types of failures include Lambda throttling, or errors returned by the Lambda target function\. For more information about the function `DeadLetterQueue` property, see [AWS Lambda function dead\-letter queues](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq) in the *AWS Lambda Developer Guide*\.
*Type*: [DeadLetterConfig](sam-property-function-scheduledeadletterconfig.md)
*Required*: No
*AWS CloudFormation compatibility*: This property is similar to the `[DeadLetterConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-deadletterconfig)` property of the `AWS::Events::Rule` `Target` data type\. The AWS SAM version of this property includes additional subproperties, in case you want AWS SAM to create the dead\-letter queue for you\.

 `Description`
A description of the rule\.
*Type*: String
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[Description](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-description)` property of an `AWS::Events::Rule` resource\.

 `Enabled`
Indicates whether the rule is enabled\.
To disable the rule, set this property to `false`\.
*Type*: Boolean
*Required*: No
*AWS CloudFormation compatibility*: This property is similar to the `[State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state)` property of an `AWS::Events::Rule` resource\. If this property is set to `true` then AWS SAM passes `ENABLED`, otherwise it passes `DISABLED`\.

 `Input`
Valid JSON text passed to the target\. If you use this property, nothing from the event text itself is passed to the target\.
*Type*: String
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[Target](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-input)` property of an `AWS::Events::Rule Target` resource\.

 `Name`
The name of the rule\. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the rule name\.
*Type*: String
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name)` property of an `AWS::Events::Rule` resource\.

 `RetryPolicy`
A `RetryPolicy` object that includes information about the retry policy settings\. For more information, see [Event retry policy and using dead\-letter queues](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html) in the *Amazon EventBridge User Guide*\.
*Type*: [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)` property of the `AWS::Events::Rule` `Target` data type\.

 `Schedule`
The scheduling expression that determines when and how often the rule runs\. For more information, see [Schedule Expressions for Rules](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html)\.
*Type*: String
*Required*: Yes
*AWS CloudFormation compatibility*: This property is passed directly to the `[ScheduleExpression](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression)` property of an `AWS::Events::Rule` resource\.

## Examples

### CloudWatch Schedule Event

CloudWatch Schedule Event Example

#### YAML

```
CWSchedule:
  Type: Schedule
  Properties:
    Schedule: 'rate(1 minute)'
    Name: TestSchedule
    Description: test schedule
    Enabled: false
```

repository: timmobsuccess/aws-sam-developer-guide

repo_name: timmobsuccess/aws-sam-developer-guide


text:
---
layout: default
---

 Brief Biography

Spencer Lee Tiberi was born on March 29th, 1991 in Sparks Las Vegas, Nevada. He grew up in the southwestern Las Vegas suburb of Enterprise, frequently alternating between exploring his desert habitat and venturing into virtual worlds on his Nintendo 64. As a fun juxtaposition to Las Vegas summers, he started snowboarding at the age of 8.

After a high school experience spent dabbling in creating music and playing bass guitar, he graduated from (Redacted) in 2013 with a B.S. in Secondary Education - Mathematics and a minor in Psychology (Why though? - A advanced degree in Psychology may be required to figure this one out). He quickly jumped into teaching Mathematics at Mojave High School in North Las Vegas and later at Durango High School closer to home in Enterprise.

After four years of teaching in his hometown, he graduated from (Redacted) with a Masters in Liberal Arts in Extension Studies (It's like (Redacted) Community College... But for grad school!) and moved out to the Boston area. He now teaches Computer Science at the Belmont Hill School utilizing Harvard's CS50 curriculum.

To this day, he still plays bass guitar, snowboards, plays video games, and explores his habitat (desert or otherwise).

repository: AdamAlto/spencertiberi

repo_name: AdamAlto/spencertiberi


text:
# x-ray-fun

A web interface to Monte Carlo event file for a super simple X- and gamma-ray detector.

The mass model is a box of CdZnTe, or Silicon, or CsI. The source is a monoenergetic photon beam.  The results are plotted using [Plotly.js](https://plot.ly/javascript/).

>Click [here](http://giove.iasfbo.inaf.it) to see a demo on the web.

### Contributors ###

* G. De Cesare - decesare.giovanni  at gmail.com
* Valentina Fioretti

### Setting up

Make sure you have [node.js](https://nodejs.org/en/) installed in your pc

    download the Monte Carlo event files (see below) into the "data" directory
    npm install
    node nodeServer.js

Go to [localhost:1337](http://localhost:1337).

You should see:

![Input page](https://github.com/giovixo/x-ray-fun/blob/master/doc/x-ray-fun-web.png)

### Event files

The Monte Carlo event files in data directory are generated by the Geant4-based BoGEMMS simulation framework (Bulgarelli et al. 2012, Fioretti et al. 2014). You can download these files from [here](https://owncloud.iasfbo.inaf.it/public.php?service=files&t=eac10983b7bad86b98e466bafa73d324).

### License

This software is licensed under the MIT License.

>The MIT License (MIT)
>
>Copyright (c) 2017 Giovanni De Cesare IASF Bologna - INAF

>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.

>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 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: giovixo/x-ray-fun

repo_name: giovixo/x-ray-fun