text:
### What is this repository for? ###

* This repository contains the C++ equivalent of the MATLAB segmentation algorithm and rice grain analysis logic.

### How do I get set up? ###

*The project in this repository was created using Qt Creator. To open, just navigate to the rice-analysis.pro file.

*This project uses OpenCV3 RC1. This version is necessary as this project uses a function, cv::connectedComponents(), not found in earlier versions. Reconfiguration of the rice-analysis.pro file might be necessary, depending on the location of the OpenCV include files and libraries in the system.

repository: renzbagaporo/riceanalyser

repo_name: renzbagaporo/riceanalyser


text:
Simple Analytics Rails

[Simple Analytics](https://simpleanalytics.com/) is a privacy friendly analytics. No consent required from your visitors!

This gem adds the [JavaScript Tracking Script](https://docs.simpleanalytics.com/script) to the `<head>` & `<body>` tag of your Ruby on Rails applications.

## 🚀 Installation

Add this line to your application's Gemfile:

```ruby
gem 'simple_analytics_rails'
```

And then execute:

```bash
$ bundle install
```

Or install it yourself as:

```bash
$ gem install simple_analytics_rails
````

## ✨ Usage

After the gem is installed, it will automatically append the Simple Analytics JavaScript snippet before the `</head>` tag on your HTML pages.

However you can also configure it via an initializer:

```ruby
# config/initializers/simple_analytics.rb
SimpleAnalyticsRails.configure do |configuration|
  # ==> Overwrite domain name
  # https://docs.simpleanalytics.com/overwrite-domain-name
  #
  # Default is ""
  configuration.hostname = "example.com"

  # ==> Hash mode
  # https://docs.simpleanalytics.com/hash-mode
  #
  # Default is ""
  configuration.mode = "hash"

  # ==> Do not track
  # https://docs.simpleanalytics.com/dnt
  #
  # Default is false
  configuration.collect_dnt = false

  # ==> Ignore pages
  # https://docs.simpleanalytics.com/ignore-pages
  #
  # Default is ""
  configuration.ignore_pages = "/search/*,/account/*,/vouchers"

  # ==> Override variable used for JavaScript Events
  # https://docs.simpleanalytics.com/events#the-variable-sa_event-is-already-used
  #
  # Default is "sa_event"
  configuration.sa_global = "sa_event"

  # ==> Trigger custom page views
  # https://docs.simpleanalytics.com/trigger-custom-page-views#use-custom-collection-anyway
  #
  # Default is true
  configuration.auto_collect = true

  # ==> Onload Callback
  # https://docs.simpleanalytics.com/trigger-custom-page-views#use-custom-collection-anyway
  #
  # Default is ""
  configuration.onload_callback = "onloadCallback()"

  # ==> Custom Domain
  # https://docs.simpleanalytics.com/bypass-ad-blockers
  #
  # Default is ""
  configuration.custom_domain = "custom.domain.com"

  # ==> Inject JavaScript To Head
  # You can disable the automatic JavaScript injection if you'd like.
  #
  # Default is true
  configuration.enabled = Rails.env.production?
end
```

## 🙏 Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/simpleanalytics/rubyonrails-plugin .

### Code of Conduct

Everyone interacting in the SimpleAnalyticsRails project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/simpleanalytics/rubyonrails-plugin/blob/main/CODE_OF_CONDUCT.md).

### Coding Standards

This project uses [Standard](https://github.com/testdouble/standard) for Ruby code to minimize bike shedding related to source formatting.

Please run `bundle exec standardrb --fix` prior to submitting pull requests.

## 📦 Releasing

1. Bump version number at `lib/simple_analytics_rails/version.rb`
1. Commit and push changes
1. Publish a new release on GitHub https://github.com/simpleanalytics/rubyonrails-plugin/releases/new
1. A [GitHub Action](https://github.com/simpleanalytics/rubyonrails-plugin/blob/main/.github/workflows/publish.yml) will then publish the latest version to https://rubygems.org/

## 📝 License

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

license: MIT

repository: simpleanalytics/rubyonrails-plugin

branch_name: refs/heads/main

extension: md

gha_language: Ruby

gha_license_id: MIT

license_type: permissive

repo_name: simpleanalytics/rubyonrails-plugin


text:
##Word Counter

Author: Garrett Olson

Program name: Word Counter

Find it on Heroku: [click here!](https://sheltered-springs-4738.herokuapp.com/)

Description: Word Counter shows how many times a word appears in a phrase of text. Capitalization and standard punctuation do not affect output.

For example:

* Target phrase: "Cats! I love cats!"
* Target word: "cats"
* Result: 2

##Setup:

1. Navigate to the ['Word Counter' home page](https://sheltered-springs-4738.herokuapp.com/)
2. In the top most input field, enter a target phrase
3. In the bottom field, enter a target word
4. Click the 'Find count!' button

##Copyright and license

Code and documentation copyright 2015 Garrett Olson. Word Counter is released under the [MIT license](http://opensource.org/licenses/MIT)

branch_name: refs/heads/master


text:
# Linked Lists

## Interview questions based on Linked Lists

**1. Remove duplicates from a linked list with and without temporary buffer.**

**2. Get kth from last element from a given Single Linked List.**

**3. Delete any node in middle of a singly linked list (except head or tail).**

**4. You have two numbers represented by singly linked list, where each node contains a single digit. The digits are stored in reverse order, such that one's digit is at the head of the singly linked list. Write a function to add numbers from such two linked list and return them in the same type of linked list as above.**

**5. Check if the given SLL is a palindrome.**

**6. Given two SLL, determine if the lists are intersecting (you can assume they have unqiue elements).**

**7. Find in the two given SLL if there is a loop or not.**

repository: CodeNerve/CodeInterview-Practice

path: /Linked Lists/ReadMe.md

gha_language: Java

repo_name: CodeNerve/CodeInterview-Practice


text:
# WarpJS Samples

This repository contains a collection of samples using [WarpJS](https://warpjs.com).

## What is WarpJS?

WarpJS is a function-as-a-service platform providing a unique backend/frontend integration feature: no backend project, you declare your backend functions in the frontend project.

## Prerequisites

To learn how to get started with WarpJS, follow our [Getting Started](https://warpjs.dev/docs/getting-started) guide, try the [Hello World](./hello-world) sample and read the [documentation](https://warpjs.dev).

## Samples

- [Dark Sky API](./darksky) - Get the weather from the Dark Sky REST API
- [Hello World](./hello-world) - A quickstart sample from the [Getting Started](https://warpjs.dev/docs/getting-started)
- [HTTP Proxy](./http-proxy) - A simple HTTP Proxy with Axios. Project from the [Getting Started (step 2)](https://warpjs.dev/docs/nodejs-modules)
- [MongoDB Movies](./mongodb-movies) - Fetch a movie database with WarpJS and MongoDB driver for Node.js
- [OpenCage Geocoder API](./opencage-geocoder) - Get the physical address from a GPS location with OpenCage Geocoder API
- [TensorFlow.js Toxicity](./tensorflowjs-toxicity) - Execute the toxicity model for TensorFlow.js on WarpJS

## License

Copyright 2020 ScaleDynamics SAS. All rights reserved.
Licensed under the MIT license.

repository: hoshiylia/samples

repo_name: hoshiylia/samples


text:
# Log Retention Rules plugin for Nebula Logger

> :information_source: This plugin requires `v4.7.1` or newer of Nebula Logger's unlocked package

[![Install Unlocked Package Plugin in a Sandbox](../.images/btn-install-unlocked-package-plugin-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lgGQAQ)
[![Install Unlocked Package Plugin in Production](../.images/btn-install-unlocked-package-plugin-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lgGQAQ)

Adds the ability to create & deploy advanced, configurable rules for setting the retention date of `Log__c` records, using custom metadata types `LogRetentionRule__mdt` and `LogRetentionRuleCondition__mdt`.

---

## What's Included

This plugin includes some add-on metadata for Nebula Logger to support the Slack integration

1. Plugin configuration details stored in Logger's CMDT objects `LoggerPlugin__mdt.LogRetentionRules`
2. New custom metadata types
    - `LogRetentionRule__mdt` - Used to configure rules that set the value of `Log__c`.`LogRetentionDate__c`. Each rules consists of 1 or more conditions, stored in `LogRetentionRuleCondition__mdt`.
    - `LogRetentionRuleCondition__mdt` - Used to configure field-level conditions for retention rules - each condition checks a `LogEntry__c` or `Log__c` field for a specific value, regular expression (regex), or field comparisons.
3. Apex class `LogRetentionRulesPlugin` (and corresponding tests in `LogRetentionRulesPlugin_Tests`). The plugin class reads the configured rules & conditions and automatically sets the field `Log__c.LogRetentionDate__c` when new `Log__c` records are inserted.

---

## Installation Steps

After installing the Nebula Logger's unlocked package, you can then install the Log Retention Rules plugin unlocked package in a sandbox.

This plugin is currently in beta and cannot be installed in production - however, if you want to use it in your production org, you can deploy the metadata to your org using your preferred deployment tool (changes sets, sfdx, the metadata API, etc.).

### Quick Start: Adding Log Retention Rules and Conditions

After installing the plugin, you can add rules using the custom metadata types `LogRetentionRule__mdt` and `LogRetentionRuleCondition__mdt`. Multiple rules can be configured in your orgs, as shown below:

![Log Retention Rules plugin: Example Rule](./.images/example-log-retention-rules-list-view.png)

In this example rule, for every inserted `LogEntry__c` record, 2 conditions are checked:

1. Does the entry's parent `Log__c` record have 1 or more error? (based on the roll-up summary field `Log__c.TotalERRORLogEntries__c`)
2. Does the entry's parent `Log__c` record have the scenario 'feature B'? (based on the text field `Log__c.Scenario__c`)

If any `LogEntry__c` record is inserted that meets these 2 conditions, then the parent `Log__c` record will have the field `LogRetentionDate__c` set to `System.today() + 30`.

![Log Retention Rules plugin: Example Rule](./.images/example-log-retention-rule-with-conditions.png)

repository: jongpie/NebulaLogger

gha_language: Apex

repo_name: jongpie/NebulaLogger


text:
---
bg: "tools.jpg"
layout: post
title:  "Licanius Trilogy - James Islington"
crawlertitle: "Licanius Trilogy"
summary: "Licanius Trilogy"
date:   2020-01-08 17:17:58 +0700
categories: posts
genre: Fantasy Series
tags: ["Read"]
type: Series
author: palindromed
---

# Licanius Trilogy

Author: James Islington

Complete Trilogy

Type: Audio (Michael Kramer)

## The Shadow of What Was Lost (Book 1 - 2015)

Confession. I didn't enjoy this book the first time around. The series has a good amount of characters, world building and time travel. I had been looking for a mindless read and this didn't hit the mark. Tried again in 2020 and tore through it.

## An Echo of Things to Come(Book 2 - 2017)

Solid second book. By the time I read it, the third book was out. Don't know if my feeling about the series would be different if I'd had to wait.

## The Light of All that Falls (Book 3 - 2019)

I am cursed with being able to figure out the ending before the reveal. In this case, I was almost 100% right in how I thought the series would end early in the second book. Enjoyable read. On my second try, finished the trilogy in under a week.


text:
---
rank: 4
related_endpoints: []
related_guides: []
required_guides:
  - applications/custom-apps/app-token-setup
  - applications/custom-apps/jwt-setup
related_resources: []
alias_paths: []
---

# App Approval

Custom App that are configured with [JWT][jwt] or [App Token][app-token]
authentication will need to be authorized within the Box enterprise by the
enterprise Admin User before it can be used.

## Approval Notifications

A semi-automated process for app approval is available in the developer console.

Go to your application in the [developer console][devconsole], select the
"General" link from the left sidebar in your application
and scroll down to the "App Authorization" section.

<ImageFrame border width="400" center>
  ![Add and Manage keys](../images/app-authorization.png)
</ImageFrame>

By submitting the application for approval it will send an email to your
enterprise admin to have them enable the application. More information on this
process is available in our [community article on app authorization][app-auth].

## Manual Approval

If the above process is not an option, the following are instructions on how to
manually approve the application.

### As developer

As the developer, head over to the application in the [developer
console][devconsole], click on "Configuration" in the left sidebar, copy the
app's client ID within the "OAuth 2.0 Credentials" section and provide this to
your admin.

<Message>
  # Finding a Box Admin

  If you don't know your enterprise admin, go to the Box [account
  settings][settings] page  and scroll to the bottom. If an admin contact is set
  you should see contact  information under "Admin Contact".
</Message>

### As admin

As the admin, head over to the [admin console][adminconsole], select the "Apps"
navigation item in the left sidebar (1) and then click the "Custom Apps" tab at
the top (2).

<ImageFrame border center>
  ![Apps tab](../images/apps.png)
</ImageFrame>

On the "Custom Apps" page click on the "+" button at the top right to authorize
a new app.

<ImageFrame border center>
  ![Custom Apps section](../images/custom-apps.png)
</ImageFrame>

In the popup that appears, enter the client ID for the application that the
developer provided from the app.

## Re-authorization on changes

When the application's scopes or access level change the application needs to be
re-authorized. Repeat the process above and request a new Access Token for the
new changes to take effect.

In the same section where the application was initially authorized, the admin
can re-authorize the same application by clicking on the ellipses to the right
of the application name and selecting "Reauthorize App".

<ImageFrame border center>
  ![Re-authorize app](../images/app-reauthorize.png)
</ImageFrame>

[devconsole]: https://app.box.com/developers/console
[settings]: https://app.box.com/account
[adminconsole]: https://app.box.com/master/settings/custom
[jwt]: g://authentication/jwt
[app-token]: g://authentication/app-token
[app-auth]: https://community.box.com/t5/Managing-Developer-Sandboxes/Authorizing-Apps-in-the-Box-App-Approval-Process/ta-p/77293


text:
# About
This is a thermometer using an IN-9 tube and an ATtiny85, coupled with a run-of-the-mill temperature sensor.
It uses a single 18650 Li-Ion battery as a power source.

## Components
- IN-9 tube
- ATTiny85 (SMD)
- TMP36
- MJE340

Additionally, some breakout boards are incorporated into the PCB design:
- [TP4056 (Battery charger)](https://www.banggood.com/10pcs-USB-3_7V-3_6V-4_2V-1A-18650-TP4056-Lithium-Battery-Charger-Module-Charging-Board-Li-ion-Power-Supply-Board-p-1684387.html)
- [5V to 170V DC boost converter](https://web.archive.org/web/20210719162717/https://www.aliexpress.com/item/33048410202.html)
- [<5V to 5V DC boost converter](https://web.archive.org/web/20210719162730/https://www.aliexpress.com/item/4000050410918.html)


text:
# Twitch AFK Coins

> **Project forked and based on [this repository](https://github.com/D3vl0per/Valorant-watcher)**

AutoCollet coins without being on the stream ! \
**Work without any window open.**

##

## Features

- 🤖 Automatic coins collect
- 🎥 True HTTP Live Streaming support (Forget the #4000 error code)
- 🔐 Cookie-based login
- 📜 Auto accept cookie policy
- 🤐 Unmuted stream
- 🛡 Proxy option
- 📽 Automatic lowest possible resolution settings
- 🧰 Highly customizable codebase

## Requirements

 - Windows or Linux OS
 - Network connection (Should be obvious...)
 - [Nodejs](https://nodejs.org/en/download/) and [NPM](https://www.npmjs.com/get-npm)

## Installation
🎥 [Tutorial video by Ziyad](https://youtu.be/bwzv7wT44Ds) 🎥
### Windows
1. Login to your twitch account
2. Open inspector(F12 or Ctrl+Shift+I) on main site
3. Find the stored cookie section
4. Copy **auth-token**
5. Clone this repo
6. Install Chromium
7. Usually the path to the Chromium executable is: C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe
8. Install the dependencies with `npm install`
9. Start the program with `npm start`
### Linux
1. Login to your twitch account
2. Open inspector(F12 or Ctrl+Shift+I) on main site
3. Find the stored cookie section
4. Copy **auth-token**
5. Clone this repo
6. Install Chromium: [TUTORIAL 🤗](https://www.addictivetips.com/ubuntu-linux-tips/install-chromium-on-linux/)
7. Locate Chromium executable: `whereis chromium`
8. Install the dependencies with `npm install`
9. Start the program with `npm start`

## Troubleshooting

### How does the token look like?
auth-token: `rxk38rh5qtyw95fkvm7kgfceh4mh6u`
___

### Streamers.json is empty?

Try again with higher delay.
Default delay:
```javascript
const scrollDelay = 2000;
```
[Go to code](https://github.com/D3vl0per/Valorant-watcher/blob/12dce8065423861971b7088563ad936b2dcc2559/app.js#L15)
___
### Something went wrong?
Try non-headless mode. Set headless value to `true`, like this:
```javascript
const showBrowser = true;
```
[Go to code](https://github.com/D3vl0per/Valorant-watcher/blob/12dce8065423861971b7088563ad936b2dcc2559/app.js#L24)
___
### Proxy?

Yes, of course:
```javascript
const proxy = ""; // "ip:port" By https://github.com/Jan710
```
[Go to code](https://github.com/D3vl0per/Valorant-watcher/blob/12dce8065423861971b7088563ad936b2dcc2559/app.js#L25)

OR

With Docker env:
```
proxy=PROXY_IP_ADDRESS:PROXY_PORT
```
___
### Screenshot without non-headless mode
```javascript
const browserScreenshot = false;
```
[Go to code](https://github.com/D3vl0per/Valorant-watcher/blob/12dce8065423861971b7088563ad936b2dcc2559/app.js#L27)

## Donation

Go to [this repository](https://github.com/D3vl0per/Valorant-watcher)

## Disclaimer
This code is for educational and research purposes only.
Do not attempt to violate the law with anything contained here.
I will not be responsible for any illegal actions.
Reproduction and copy is authorised, provided the source is acknowledged.

repository: ClementRoyer/TwitchAFKCoins

repo_name: ClementRoyer/TwitchAFKCoins


text:
# Section

<!--
The concept is heavily influenced by the section mechanism in [`Catch2`](https://github.com/catchorg/Catch2),
a C++ unit testing framework library.
-->

`rye` supports the scope-based code sharing mechanism inspired by Catch2.
Test cases could distinguish specific code blocks during test execution by
enclosing a particular code block in the test body with `section!()`.
Here, `section!()` is an expression-style procedural macro expanded by `#[test]`
and has the following syntax:

```rust,ignore
$( #[ $META:meta ] )*
section!( $NAME:expr , $BODY:block );
```

If there are multiple sections in the same scope, enable them in order and
execute the test case until all sections are completed. Consider the following
test case:

```rust
# fn main() {}
#[rye::test]
fn has_multi_section(cx: &mut rye::Context<'_>) {
    println!("startup");

    section!(cx, "section 1", {
        println!("section 1");
    });

    section!(cx, "section 2", {
        println!("section 2");
    });

    println!("teardown");
    println!();
}
```

The above test case will produce the following result:

```txt
startup
section 1
teardown

startup
section 2
teardown
```

repository: ubnt-intrepid/rye

gha_language: Rust

gha_license_id: NOASSERTION

repo_name: ubnt-intrepid/rye


text:
# PrinterQueue
Travis-ci:
[![Build Status](https://travis-ci.org/cpe305/fall2016-project-johnnicholson.svg?branch=master)](https://travis-ci.org/cpe305/fall2016-project-johnnicholson)

## Purpose
This Project was inspired by a friend who volunteers for the Innovation Sandbox
and fellow officers for the cyber security club at Cal Poly when both needed
a better way of organizing requests to use their 3D Printer. Previously the
Sandbox used a google doc and local document storage.

## Design
This project is backed by a tomcat server managed by spring boot. The front
end is written in angular. It communicates with the server via a REST API that
is documented in the linked document.

## Use
Once setup on a server, it can keep track of various locations and individual
queues for each. Theses queues can be managed and the status of each print can
be adjusted.

### Admin
Admins are allowed to create locations, modify the queue for any location and
delete requests. They may also change the status of any request.

### Standard User
Users are allowed to create print requests at any location, they are also
allowed to delete their own requests. they cannot see the requests of other
standard users, only their position in the queue.

## Rest API Documents
[Rest API](docs/3DPrinterQueue.md)

## Design Patterns
* Factory Pattern - DAO objects
* Template Method Pattern - Transactions
* Singleton Pattern - Database Session
* Object Pooling - Database Connection Management

## High Level Class Diagram
![class](Screenshots/basicClass.png)
## Screenshots
Admin View of the Queue
![one](Screenshots/Selection_004.png)
Create a New Request
![two](Screenshots/Selection_005.png)
Register for the website
![three](Screenshots/Selection_006.png)


text:
# AphasiaBank English ASR recipe

## Data preparation

1. Download AphasiaBank from https://aphasia.talkbank.org
2. See [data.sh](local/data.sh) for instructions

Data splits are stored in [a separate repository](https://github.com/tjysdsg/AphasiaBank_config).

## Experiments

- Use `run.sh` for baselines and tag-based experiments.
- Use `run_interctc.sh` for InterCTC-based experiments (also supports combination of
  tag- and InterCTC-based).

Parameters:

- `--include_control`: true to include control group data
- `--tag_insertion`: `prepend`, `append`, `both`, or `none`.

## Evaluation

- Use `run.sh --nlsyms_txt none --stage 13` to score your model.
    - It's important to set `--nlsyms_txt none` to avoid removing the Aphasia tags,
      which will be used by the scripts below.
- [local/score_cleaned.sh](local/score_cleaned.sh) is used to calculate CER/WER per
  Aphasia subset.
  It doesn't require the input hypothesis file to contain language or Aph tags.
  But if the input does contain, it will automatically remove them.
- [local/score_per_severity.sh](local/score_per_severity.sh) is similar, but it
  calculates CER/WER per Aphasia severity.
- [local/score_interctc_aux.sh](local/score_interctc_aux.sh) is used to calculate
  InterCTC-based Aphasia detection accuracy.
- [local/score_aphasia_detection.py](local/score_aphasia_detection.py) is used to
  calculate Aphasia
  detection accuracy from input in Kaldi text format.
- Calculate MACS and FLOPS of the encoder
  using [this script](https://github.com/pyf98/espnet_utils/blob/master/profile.sh)

## RESULTS (WER)

**Environments**

- date: `Fri Apr 28 00:16:04 EDT 2023`
- python version: `3.9.12 (main, Apr  5 2022, 06:56:58)  [GCC 7.5.0]`
- espnet version: `espnet 202301`
- chainer version: `chainer 6.0.0`
- pytorch version: `pytorch 1.8.1`
- Git hash: `5b2f8f351712aac98aa9f8370f1d2aea1ecff685`
    - Commit date: `Fri Apr 28 00:10:24 2023 -0400`

| Model                                                                                | Patient | Control | Overall | Sentence-Level Detection Accuracy | Speaker-Level Detection Accuracy |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|---------|---------|-----------------------------------|----------------------------------|
| [Conformer](conf/tuning/train_asr_conformer.yaml)                                                                                | 40.3    | 35.3    | 38.1    |                                   |                                  |
| [E-Branchformer(EBF)](conf/tuning/train_asr_ebranchformer_small.yaml)                                                                                | 36.2    | 31.2    | 34.0    |                                   |                                  |
| [EBF+WavLM](conf/tuning/train_asr_ebranchformer_small_wavlm_large1.yaml) ([HuggingFace](espnet/jiyang_tang_aphsiabank_english_asr_ebranchformer_small_wavlm_large1))                                         | 26.3    | 16.9    | 22.2    |                                   |                                  |
| [EBF+WavLM+Tag-prepend](conf/tuning/train_asr_ebranchformer_small_wavlm_large1.yaml)                                                                                | 26.3    | 16.9    | 22.2    | 89.3                              | 95.1                             |
| [EBF+WavLM+Tag-append](conf/tuning/train_asr_ebranchformer_small_wavlm_large1.yaml)                                                                                | 26.2    | 16.9    | 22.1    | 89.2                              | 95.1                             |
| [EBF+WavLM+Tag-both](conf/tuning/train_asr_ebranchformer_small_wavlm_large1.yaml) ([HuggingFace](https://huggingface.co/espnet/jiyang_tang_aphsiabank_english_asr_ebranchformer_wavlm_aph_en_both))          | 26.3    | 16.8    | 22.1    | Front: 90.8, Back: 90.6           | Front: 95.7, Back: 95.7          |
| [EBF+WavLM+InterCTC6](conf/tuning/train_asr_ebranchformer_small_wavlm_large1_interctc6.yaml) ([HuggingFace](https://huggingface.co/espnet/jiyang_tang_aphsiabank_english_asr_ebranchformer_wavlm_interctc6)) | 26.3    | 16.9    | 22.1    | 85.2                              | 97.3                             |
| [EBF+WavLM+InterCTC3+6](conf/tuning/train_asr_ebranchformer_small_wavlm_large1_interctc3+6.yaml)                                                                                | 26.5    | 17.1    | 22.3    | 83.5                              | 96.7                             |
| EBF+WavLM+InterCTC9 (set `interctc_layer_idx` and `aux_ctc` to 9 in the InterCTC6 config)                                                                                | 26.3    | 16.9    | 22.2    | 84.5                              | 97.3                             |
| [EBF+WavLM+InterCTC6+Tag-prepend](conf/tuning/train_asr_ebranchformer_small_wavlm_large1_interctc6.yaml)                                                                                | 26.3    | 16.9    | 22.1    | Tag: 89.7, InterCTC: 89.6         | Tag: 96.7, InterCTC: 96.7        |

repository: espnet/espnet

gha_language: Python

repo_name: espnet/espnet


text:
---
layout: default
published: true
title: Evaluate Checkov policies on Terraform plan
order: 8
---
# Evaluate Checkov policies on Terraform plan

Checkov supports the evaluation of policies on resources declared in `.tf` files. It can also be used to evaluate `terraform plan` expressed in a json file.
Plan evaluation provides Checkov additional dependencies and context that can result in a more complete scan result.
Since Terraform plan files may contain arguments (like secrets) that are injected dynamically, it is advised to run a plan evaluation using Checkov in a secure CI/CD pipeline setting.

## Example

```bash
terraform init
terraform plan --out tfplan.binary
terraform show -json tfplan.binary > tfplan.json

checkov -f tfplan.json

```
### Example output:

![Checkov terraform plan scan](checkov_terraform_plan.png)

filename: Evaluate Terraform Plan.md


text:
_duration: 2 days _

# Picture Gallery with Tagging

The purpose of this app is to provide a range of images and have the user tag keywords to what they feel when viewing the image.

## See the application working here!

[Heroku Deployment](www.google.com)

## Local Installation Directions

- Fork this repository,
- Clone contents within your terminal:
   - `git clone <repoUrl.git>`
- Navigate into the project directory:
   - `cd projectFolderName`
- Install dependencies:
   - `npm install`
- Run the server:
   - `npm run server`
- Build and run the client:
   - `npm run client`

(Note that the above is an example. Give specific directions.)

## Reflection of Learning

When did this project occur?
   - Example: This project occurred during our 6th week of the classroom.

What did you learn from the project? Technology? Pattern?
   - Example: This assignment covered handling click events within React. In doing so, we got the opportunity to explore how currying works to pass information about what was clicked, to the logic that handles the click. This became helpful because to date, we had been creating individual click handler methods for each interactive element, rather than being efficient and creating one method that could handle all of them.

## License
[MIT](https://choosealicense.com/licenses/mit/)

## Questions? I would love to connect!
Email - [konouvang<EMAIL_ADDRESS>

repository: konouvang/Picture-Gallery-with-Tagging

gha_language: JavaScript

repo_name: konouvang/Picture-Gallery-with-Tagging


text:
index: 1700

# Opening Times

![Dome of the Kibble Palace](image:kibble-roof.jpg)

The Gardens are open from 7.00am till dusk daily however the specific
facilities within the park are subject to opening times.

[Glasshouses:](map:map1#target=5) 10.00am – 6.00pm (4.15pm in winter)

[Visitor Centre:](map:map1#target=1) 11.00am – 4.00pm

[Toilets:](map:map1#target=50) 10.00am – dusk (this varies through the year)

repository: cilogi/cilogi-guides

repo_name: cilogi/cilogi-guides


text:
# [Sudoku board validator](https://www.codewars.com/kata/sudoku-board-validator "https://www.codewars.com/kata/63d1bac72de941033dbf87ae")

### Sudoku Background

Sudoku is a game played on a 9x9 grid. The goal of the game is to fill all cells of the grid with
digits from 1 to 9, so that each column, each row, and each of the nine 3x3 sub-grids (also known as
blocks) contain all the digits from 1 to 9.
More info at: http://en.wikipedia.org/wiki/Sudoku

### Sudoku Solution Validator

Write a function that accepts a Sudoku board, and returns true if it is a valid Sudoku solution, or
false otherwise. The cells of the input Sudoku board may also contain 0's, which will represent
empty cells. Boards containing one or more zeroes are considered to be invalid solutions.

### Examples

```
Valid board:

  5 3 4|6 7 8|9 1 2
  6 7 2|1 9 5|3 4 8
  1 9 8|3 4 2|5 6 7
  -----+-----+-----
  8 5 9|7 6 1|4 2 3
  4 2 6|8 5 3|7 9 1
  7 1 3|9 2 4|8 5 6
  -----+-----+-----
  9 6 1|5 3 7|2 8 4
  2 8 7|4 1 9|6 3 5
  3 4 5|2 8 6|1 7 9
```

```
Invalid board:

              This column has two 3's
                        v
This cell has a 0 > 0 3 4|6 7 8|9 1 2
                    6 7 2|1 9 5|3 4 8
                    1 9 8|3 4 2|5 6 7
                    -----+-----+-----
                    8 5 9|7 6 1|4 2 3
                    4 2 6|8 5 3|7 9 1
                    7 1 3|9 2 4|8 5 6
                    -----+-----+-----
    This box has   /9 6 1|5 3 7|2 8 4
         two 3's >| 2 8 3|4 1 9|6 3 5 < This row has two 3's
                   \3 4 5|2 8 6|1 7 9
```

### Details

- All inputs are guaranteed to be 2D boards of size 9x9 with possible values in range 0-9.
- Rows, columns and blocks (3x3 small squares) must contain each number from range 1-9 exactly once.
- User solution must not modify input boards.

repository: ParanoidUser/codewars-handbook

repo_name: ParanoidUser/codewars-handbook


text:
---
uid: crmscript_ref_NSEMailEntity_GetEMailSOInfo
title: NSEMailSOInfo GetEMailSOInfo()
intellisense: NSEMailEntity.GetEMailSOInfo
keywords: NSEMailEntity, GetEMailSOInfo
so.topic: reference
---

# NSEMailSOInfo GetEMailSOInfo()

Glue between SuperOffice data and an e-mail.

**Returns:** NSEMailSOInfo

```crmscript
NSEMailEntity thing;
NSEMailSOInfo eMailSOInfo  = thing.GetEMailSOInfo();
```

repository: stianol/crmscript

repo_name: stianol/crmscript


text:
# State Modeling for Becca

Becca will have some application state on the client. The Application will manage the user state and

``` graphql
url/location: String
    myClasses > Outreach | Attendance | MyGroups | Birthdays | Anniversaries
accounts:{
    active:{
            _enabled: true,
            AcctName: LABEL,
            AreanaUser: String,
            AreanaPass: String
    },
    available:[
        {
            _enabled: true,
            AcctName: LABEL,
            AreanaUser: String,
            AreanaPass: String
        },
        {
            _enabled: true,
            AcctName: LABEL,
            AreanaUser: String,
            AreanaPass: String
        }
    ]
},
email: String,
AttendanceFilter: String,
myClasses: {Classes(id)[Contacts]}
myGroups: {Group(name)][Contacts]}
showBeccaReminders: false
EmailVerified: true
isMenuShown: false
```

## Pages

### Classes

Select a class to manage

### Outreach

Filter:
Multiselect:
    Contacts:
        EmailLink:
        TextLink:
        PhoneLink:

MutliSelect:
  people > Message > send from your phone
  <!-- @Future Idea : Message > people > send from your phone -->

### Groups

If you message the same people often, then set it up as a group.

### Birthdays

### Anniversarries

## Client URL Structure

+ `/` (no cookie) login screen
+ `/` (yay cookie) (classes list)
+ `/:classID/` Class Menu
+ `/:classID/outreach` Outreach list
  1. multi-select members
  1. compose message
  1. Set it up for sending from your phone
  1. Mode: `Eva` or `Sarah` (records the note in ChurchDB)
+ `/:classID/attendance` Take attendance
+ `/:classID/mygroups` Take attendance
+ `/:classID/birthdays` Take attendance
+ `/:classID/anniversaries` Take attendance

repository: ericdmoore/becca

gha_language: CSS

repo_name: ericdmoore/becca


text:
## 1.1.7

* Includes bug fix from issue #37. Intercepting clicks on links with routes urls now works correctly in IE 8.

## 1.1.6

* Includes bug fix from issue #34. `navigate` now cross browser compatible for older versions of IE.

## 1.1.5

* New build using webpack instead of browserify. No new functionality or bug fixes.

## 1.1.4

* Includes bug fix from issue #29.

## 1.1.3

* Includes bug fix from issue #26.

## 1.1.2

* Includes bug fix from issue #24.

## 1.1.1

* Includes bug fix from issue #22.

## 1.1.0

* `path` state variable is always initialized when mixin is created.
* Nested router support.
* Example app updated to demonstrate nester routers.
* Locked path-to-regexp to 1.0.1 and urllite to 0.5.0 to prevent dependency breakage.
* Bug fixes relating to event propagation.

## 1.0.0

* First stable API release. Supports basic routing functionality.

repository: jakoblind/react-mini-router

repo_name: jakoblind/react-mini-router


text:
## public Vote::getRanking

> [Read it at the source](https://github.com/julien-boudry/Condorcet/blob/master/src/Vote.php#L209)

### Description

```php
public Vote->getRanking ( [bool $sortCandidatesInRank = true] ): array
```

Get the actual Ranking of this Vote.

#### **sortCandidatesInRank:** *`bool`*
Sort Candidate in a Rank by name. Useful for performant internal calls from methods.

### Return value:

*(`array`)* Multidimenssionnal array populated by Candidate object.

---------------------------------------

### Related method(s)

* [Vote::setRanking](/Docs/ApiReferences/Vote%20Class/public%20Vote--setRanking.md)

repository: julien-boudry/Condorcet

filename: public Vote--getRanking.md

gha_language: PHP

repo_name: julien-boudry/Condorcet


text:
# Homoiconic language

## Code = Data

### EDS: Executable Data Structures

* code is data
* language and its runtime must be designed for self-modification
* programming by automated code generation

repository: ponyatov/metaLbook

repo_name: ponyatov/metaLbook


text:
---
layout: default
title: Magnific Popup Documentation
description: The complete guide on how to use Magnific Popup.
---

#

Magnific Popup Documentation

Project on Github · Build tool · Twitter of developer · Newsletter of developer

Warning! Plugin is in early beta and this documentation is not finished yet. Please send your suggestions about it via Twitter to <a<EMAIL_ADDRESS>
Here you can find guide about how to use Magnific Popup. If you've found any mistake in this site or you know how to improve something, simply submit commit on GitHub.

* This will become a table of contents (this text will be scraped).
{:toc}

## Including files

{% highlight html %}

<link rel="stylesheet" href="magnific-popup/magnific-popup.css">

{% endhighlight %}

It's not required, but recommended to put CSS files in `<head>`. JavaScript files and initialization code - in footer of your site (before closing `</body>` tag).
 If you already have `jquery.js` on your site - don't include it second time, or use `jQuery.noConflict();` mode.

## Initializing popup

Popup initialization code should be executed after document ready, for example:
{% highlight javascript %}
$(document).ready(function() {
  // initialization code
  $('.image-link').magnificPopup();
});
{% endhighlight %}

Basically all this function does is binds click event to the element.

There are three ways to initialize popup:

### 1. From HTML element

This code will bind click event to target element (in our case `.your-popup-link`). Extra options are added if you use this method, like conditional lightbox and opening content on middle mouse click.

{% highlight html %}
Open popup
{% endhighlight %}

{% highlight javascript %}
$('.your-popup-link').magnificPopup({
	// options
});
{% endhighlight %}

### 2. From a group of elements with one parent
Same as first one, but use this method if you are creating popup from list of elements in one container. Note that this method does not enable gallery, it just reduces number of event handlers, and each item will be opened as a single popup. If you wish to enable gallery add `gallery:{enabled:true}` option.

{% highlight html %}

  Open popup 1
  Open popup 2
  Open popup 3

{% endhighlight %}

{% highlight javascript %}
$('.parent-container').magnificPopup({
  delegate: 'a' // child items selector, by clicking on it popup will open
  // other options
});
{% endhighlight %}

### Using just JavaScript
Calling `$.magnificPopup.open` will open lightbox right away. Learn more about this in API section.
{% highlight javascript %}
$('#some-button').click(function() {
  $.magnificPopup.open({
    type: 'image',
    href: 'path-to-image.jpg'
  });
});
{% endhighlight %}

## Image Type

To

## Video Type

## Inline Type

Example of popup:

  Popup content

$('.your-popup').magnificPopup({type:'inline'});

.your-popup {
  background: #FFF;
  padding: 20px;
  width:100%;
  max-width: 500px;
}

Class `mfp-hide` must be present on inline element to make it hidden, it's toggled when popup is displayed.
Class `mfp-hide` is toggled on target inline element.

## Ajax Type

## Gallery

Basically all galery module does is allows you to switch content of popup and adds navigation arrows. It can switch and mix any types of content, not just images.

### Lazy-loading

Lazy-loading option preloads nearby items. It accepts array with two integers as a parameter, first one - is a number of items to preload before the current, second one - the number of images to preload after current. For example `preload: [1,3]` will load 3 next items and 1 that is before current. These values are automatically switched based on direction of movement.

Option can be changed dynamically.

By default all what it does is just searches for an image tag and preloads it with JavaScript. But you can extend it and do your custom preloading logic with help of `lazyLoad` event, like so:

{% highlight javascript %}
callbacks: {
  lazyLoad: function(item) {
    console.log(item); // Magnific Popup data object that should be loaded
  }
}
{% endhighlight %}

## Options

### disableOn *0*
If window width is less then number in this option - lightbox will not be opened and default behavior of element will be triggered. Set to `0` to disable behavior. Option works only when you initialize Magnific Popup from DOM element.

Can also accept Function as a parameter, which should return `true` if lightbox can be opened and `false` otherwise. For example:

{% highlight javascript %}
disableOn: function() {
  if( $(window).width() < 600 ) {
    return false;
  }
  return true;
}
{% endhighlight %}

### key *null*

Key defines unique identifier of the group of popups. The parameter is optional and is used to cache templates, if you won't define it - it'll be generated automaticaly when `$.magnificPopup.open` or `$.fn.magnificPopup` is called. **If you have many popups with similar structure, this option is a must.**

{% highlight javascript %}
// These three magnificPopups will share same instance, because they have same key.
// If you don't provide key for each one, 3 instances will be created.

$('.button1').magnificPopup(function() {
  key: 'my-app-popup'
});

$('.button2').magnificPopup(function() {
  key: 'my-app-popup'
});

$.magnificPopup.open({
  key: 'my-app-popup'
});
{% endhighlight %}

### midClick *false*
If set to `true` opens lightbox if user clicked middle mouse button. Option works only when you initialize Magnific Popup from DOM element.

### mainClass *''*
String that contains classes that will be added to the root element of popup wrapper and to dark overlay. For example `"myClass"`, can also contain multiple classes - `'myClassOne myClasTwo'`.

### preloader *true*

Preloader in Magnific Popup is used as an indicator of current status. If option enabled, it's always present in DOM only text inside of it changes. Below you can see explanation of CSS names that are applied to container that holds preloader and content area depending on the state of current item:

{% highlight css %}

/* Content loading is in progress */
.mfp-s-loading { }

/* Content successfully loaded */
.mfp-s-ready { }

/* Error during loading  */
.mfp-s-error { }
{% endhighlight %}

For example, if you want your error message to be in red add such CSS:

{% highlight css %}
.mfp-s-error .mfp-preloader {
  color: red;
}
{% endhighlight %}

You can trigger change of status manually by calling `instance.updateStatus('error', 'error message')`.

### focus *''*
String with CSS selector of element inside popup to focus. For example `'input'` or `'#login-input'`. Leave empty to focus popup itself.

### closeOnContentClick *false*
Close popup when user clicks on content of it. It's recommended to enable this option when you have only one image in popup.

### closeBtnInside *false*
If enabled, Magnific Popup will put close button inside content of popup, and wrapper will get class `mfp-close-btn-in` (which in default CSS file makes color of it change).

### removalDelay *0*
Delay before popup is removed from DOM. Read more in [animation](#animation) section.

### closeMarkup
Default value: `<button title="%title%" class="mfp-close"><i class="mfp-close-icn">×</i></button>`.
Markup of close button. %title% will be replaced with option `tClose`.

## Animation

Animation can be added to any example. For Ajax based popup content animation is fired only after content is loaded.

After popup is opened popup wrapper and background overlay get class `mfp-ready`. Before popup is removed they get class `mfp-removing`.

For example:

{% highlight javascript %}
// Initialize popup as usual
$('.popup-link').magnificPopup({
	// Delay in milliseconds before popup is removed
	removalDelay: 300,

	// Class that is added to body when popup is open.
	// make it unique to apply your CSS animations just to this exact popup
  mainClass: 'mfp-fade'
});
{% endhighlight %}

Then just play with CSS3 transitions:

{% highlight css %}
/* overlay at start */
.mfp-fade.mfp-bg {
  opacity: 0;

  -webkit-transition: all 0.15s ease-out;
  -moz-transition: all 0.15s ease-out;
  transition: all 0.15s ease-out;
}
/* overlay animate in */
.mfp-fade.mfp-bg.mfp-ready {
  opacity: 0.8;
}
/* overlay animate out */
.mfp-fade.mfp-bg.mfp-removing {
  opacity: 0;
}

/* content at start */
.mfp-fade.mfp-wrap .mfp-content {
  opacity: 0;

  -webkit-transition: all 0.15s ease-out;
  -moz-transition: all 0.15s ease-out;
  transition: all 0.15s ease-out;
}
/* content animate it */
.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
}
/* content animate out */
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
  opacity: 0;
}
{% endhighlight %}

Please use animation wisely and when it's really required. Do not enable it when your popup may contain large image or a lot of HTML text.

## Types of scroll

- Keep default scroll and no fixed positiin
  Recommended for modals and dialogs. + For all other types on mobile devices that can't handle fixed position.

- Remove default scroll and add own based on popup content
  Recommended for images, galleries and large HTML blocks.

## Styling

## API

### Events

Callbacks that are defined inside `callbacks` option will automatically be called if they exist. All Magnific Popup events are also dispatched using `triggerHandler` on target element (or to document if it doesn't exist).

{% highlight javascript %}
$('.image-link').magnificPopup({
  // you may add other options here, e.g.:
  preloader: true,

  callbacks: {
    open: function() {
      // Will fire when this exact popup is opened
      // this - is Magnific Popup object
    },
    close: function() {
      // Will fire when popup is closed
    }
    // e.t.c.
  }
});

// Will fire when any popup is opened.
// Name of event should start from  `mfp` and first letter should be uppercase.
// e.g. 'open' -> 'mfpOpen', 'beforeOpen' -> 'mfpBeforeOpen.
$(window).on('mfpOpen', function() {
  console.log('Popup is open);
});
{% endhighlight %}

{% highlight javascript %}
callbacks: {
  beforeOpen: function() {
    console.log('Start of popup initialization');
  },
  contentParse: function(item, preload) {
    console.log('Parsing content. Item object that is being parsed:', item, ' Triggered by preloader:', preload);
    // feel free to modify here item object
  },
  change: function() {
    console.log('Content changed');
    console.log('Triggers');
  },
  resize: function() {
    console.log('Popup resized');
    // resize event triggers only when height is changed or layout forced
  },
  open: function() {
    console.log('Popup is opened');
  },
  close: function() {
    console.log('Popup is closed');
  },

  // Ajax-only module events
  parseAjax: function(jqXHR) {
    console.log('Loading of ajax content finished. Object:', jqXHR);
    // You can modify value of jqXHR.responseText here. It's used as content for popup.
  }
}
{% endhighlight %}

### Public methods

Magnific Popup object is not attached to DOM element.

## Extending

## FAQ

## Translating

Internationalization of Magnific Popup is very simple, all you need is to extend default settings object with new values, or just pass options to your initialization code. If you're making something public, it's strongly recommended to use oly second method to avoid conflicts.

Some properties contain %keys% that should not be translated.

{% highlight javascript %}
// Add it after jquery.magnific-popup.js and before first initialization code
$.extend(true, $.magnificPopup.defaults, {
  tClose: 'Close (Esc)',
  tLoading: 'Loading...',
  gallery: {
    tPrev: 'Previous (Left arrow key)',
    tNext: 'Next (Right arrow key)',
    tCounter: '%curr% of %total%'
  },
  image: {
    tError: 'The image could not be loaded.'
  },
  ajax: {
    tError: 'The request failed.'
  }
});
{% endhighlight %}


text:
OAuth2.0 scala
=========
This library provides the necessary tools to implement an OAuth 2.0 server.
It is based on [RFC 6749](https://tools.ietf.org/html/rfc6749).
### Getting Started
This project is using scala 2.11.8. To get started with SBT, add the following to your `build.sbt`
file:
```scala
resolvers += "bintray algd" at "http://dl.bintray.com/content/algd/maven"
```
In case you want to use the akka-http module add the following. It is using akka 2.4.4.
```scala
libraryDependencies += "io.github.algd" %% "oauth2-scala-akka-http" % "0.4.0"
```
Otherwise only add:
```scala
libraryDependencies += "io.github.algd" %% "oauth2-scala-core" % "0.4.0"
```

### Authorize endpoint

After creating a class that extends `DataManager`, you can instantiate an OAuth authorizer enabling the flows you are interested in:
```scala
val myDataManager: DataManager[MyUser] = new MyDataManager

val authorizer = new BaseAuthorizer(myDataManager) +
                 new ImplicitAuthorizer +
                 new CodeAuthorizer

val params = Map("some_oauth_param" -> "value")

val response = authorizer(user, params)
```
This even allows you to create your custom authorizers.
The response of an authorizer will be a `Future[UriResponse]` containing a validation error or a successful response ready to be converted to a redirection uri.

### Token endpoint
After creating a class that extends `DataManager`, you can instantiate an OAuth token granter enabling the flows you are interested in:
```scala
val myDataManager: DataManager[MyUser] = new MyDataManager

val granter = new BaseGranter(myDataManager) +
              new AuthorizationCodeGranter +
              new PasswordGranter +
              new ClientCredentialsGranter +
              new RefreshTokenGranter

val params = Map("some_oauth_param" -> "value")

val response = granter(params)
```
This even allows you to create your custom granters.
The response of a granter will be a `Future[TokenResponse]` containing a validation error or a new issued token info.

### Akka Http integration
If you are using the akka http module you can extend or import `OAuth2Support` to enable implicit conversions for authorizers and granters. For example:
```scala
import OAuth2Support._
...
(path("authorize") & post & parameterMap) { params =>
    val user = ...
    authorizer.route(user, params) // ToEntityMarshaller[OAuthError] required
}
...
(path("token") & post & entity(as[FormData])) { form =>
    granter.route(form.fields.toMap)
}
```
### DataManager implementation
TODO


text:
In its effort to push the limits of file compression, Dropbox recently developed a lossless compression algorithm for H.264 and JPEG files. Since you are thinking about applying for a job at Dropbox, you decided to experiment with simple lossless compression as part of your interview prep.

One of the most widely known approaches in the field of compression algorithms is  _sliding window compression_. It works as follows:

-   Consider characters one by one. Let the current character index be  `i`.
-   Take the last  `width`  characters before the current one (i.e.  `s[i - width, i - 1]`, where  `s[i, j]`  means the  substring  of  `s`  from index  `i`  to index  `j`, both inclusive), and call it  _the window_. If there are less than  `width`  characters before the current one, then you should use  `s[0, i - 1]`  as  _the window_.
-   Find such  `startIndex`  and  `length`  that  `s[i, i + length - 1] = s[startIndex, startIndex + length - 1]`  and  `s[startIndex, startIndex + length - 1]`  is contained within  _the window_. If there are several such pairs, choose the one with the largest  `length`. If there still remains more than one option, choose the one with the smallest  `startIndex`.
-   If the search was successful, append  `"(startIndex,length)"`  to the result and move to the index  `i + length`.
-   Otherwise, append the current character to the result and move on to the next one.

Given a string, apply  _sliding window compression_  to it.

Example

-   For  `inputString = "abacabadabacaba"`  and  `width = 7`, the output should be
    `losslessDataCompression(inputString, width) = "ab(0,1)c(0,3)d(4,3)c(8,3)"`.

    -   Step 1:  `i = 0, inputString[i] = 'a', window = ""`.  `'a'`  is not contained within  _the window_, so it is appended to the result.
    -   Step 2:  `i = 1, inputString[i] = 'b', window = "a"`.  `'b'`  is not contained within  _the window_, so it is appended to the result.
    -   Step 3:  `i = 2, inputString[i] = 'a', window = "ab"`.  `'a'`  can be found in  _the window_.  `'a'`  in  _the window_  corresponds to the  `inputString[0]`, so  `(0,1)`  representing the  _substring_  `"a"`  is appended to the result.
    -   Step 4:  `i = 3, inputString[i] = 'c', window = "aba"`. The same situation as in the first two steps.
    -   Step 5:  `i = 4, inputString[i] = 'a', window = "abac"`. Consider  `startIndex = 0, length = 3`.  `inputString[startIndex, startIndex + length - 1] = "aba"`  and it is contained within  _the window_,  `inputString[i, i + length - 1] = "aba"`. Therefore,  `"(0,3)"`  should be added to the result.  `i += length`.
        ![](https://codesignal.s3.amazonaws.com/tasks/losslessDataCompression/img/example1.png?_tm=1582038083259)
    -   Step 6:  `i = 7, inputString[i] = 'd', window = inputString[0, 6] = "abacaba"`. The same situation as in the first two steps.
    -   Step 7:  `i = 8, inputString[i] = 'a', window = inputString[1, 7] = "bacabad"`. Consider  `length = 3`  again.  `inputString[i, i + b - 1] = "aba"`,  `window[3, 5] = "aba"`, and it corresponds to  `inputString[4, 6]`  since  `inputString[0, 2]`  is no longer within  _the window_. So,  `"(4,3)"`  should be appended.  `i += length`.
    -   Step 8:  `i = 11, inputString[i] = 'c', window = "abadaba"`. The same situation as at the first two steps.
    -   Step 9:  `i = 12, inputString[i] = 'a', window = "badabac"`.  `length = 3, inputString[i, i + length - 1] = "aba"`,  `window[3, 5] = "aba"`, and it corresponds to  `inputString[8, 10]`. So,  `"(8,3)"`  should be appended.  `i += length`.

    ![](https://codesignal.s3.amazonaws.com/tasks/losslessDataCompression/img/example2.png?_tm=1582038083472)

-   For  `inputString = "abacabadabacaba"`  and  `width = 8`, the output should be
    `losslessDataCompression(inputString, width) = "ab(0,1)c(0,3)d(0,7)"`.

    In both of the above examples the resulting "compressed" string becomes even longer than the initial one. In fact,  _sliding window compression_  proves to be efficient for longer inputs.

-   For  `inputString = "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"`  and  `width = 12`, the output should be
    `losslessDataCompression(inputString, width) = "a(0,1)(0,2)(0,4)(0,8)(4,12)"`.

    In the last example the resulting string is one character shorter than the input one. It is the shortest possible example of the efficient work of  _sliding window compression_. If the input contained even more letters  `'a'`, then the effect of this approach would be even more considerable.

Input/Output

-   **[execution time limit] 4 seconds (js)**

-   **[input] string inputString**

    A non-empty string of lowercase letters.

    _Guaranteed constraints:_
    `1 ≤ inputString.length ≤ 40`.

-   **[input] integer width**

    A positive integer.

    _Guaranteed constraints:_
    `1 ≤ width ≤ 20`.

-   **[output] string**

    Compressed  `inputString`.

repository: M-Ekrim/codeSignal

repo_name: M-Ekrim/codeSignal


text:
Welcome to prizebot 👋

    An open source telegram bot to purely raffle prizes with random.org.

    The official bot hosted at @y9prizebot, all discussions are welcome in issues, news feed available at telegram

## 👀 Demo
Simple demo how the bot works. It is very intuitive and cool, also have ability of full localization (only en, ru now).

    This is how the message with giveaway looks like:

    And this is how the giveaways managing looks like:

## 🚀 Running
To run this bot by yourself, read [this](docs/RUNNING.md) tutorial

## ✈ Onboarding
I made a nice [note](docs/ONBOARDING.md) about onboarding on this project. This will also be useful if you just want to surf around the code.

## 🚩 TODO
There is a huge plans to do the most convenient prize raffling in the universe via this bot. Some of this accumulated [there](https://github.com/y9san9/prizebot/milestone/1)

## 📖 Licence
This software is absolutely free and using [MIT](https://github.com/y9san9/prizebot/blob/master/LICENCE) licence


text:
---
layout: post
title: Useful Notepad++ Plugins
categories:
- Tools
tags:
- notepad++
- plugin
- tools
status: publish
type: post
published: true
meta:
  publicize_results: a:2:{s:7:"twitter";a:1:{i:489535806;a:2:{s:7:"user_id";s:15:"tommytsunami831";s:7:"post_id";s:18:"182296214925090819";}}s:2:"fb";a:1:{i:1249530475;a:2:{s:7:"user_id";s:10:"1249530475";s:7:"post_id";s:13:"3490473781113";}}}
  _wpas_done_twitter: '1'
  _wpas_done_fb: '1'
author:
---

Notepad++ is easily one of the best text editors for Windows. I've compiled below a few useful plugins that extends its functionality even further.

CLR Tabs to Spaces

If your code contains a mix of spaces and tabs, they will often be inconsistently displayed with different editors. One thing that I've tried to do is making sure my code contains no tabs to avoid inconsistency. This plugin makes it easy to convert tabs to spaces for existing code.

Compare

Everyone needs a diff tool. File comparison is always a useful feature when you need to find the differences between two files.

MultiClipboard

This plugin conveniently allows you to have more than one item in your clipboard, easing copy and paste operations.

NppAStyle

A plugin of Artistic Style, which is a C, C++, C#, and Java source code automatic formatter. The one complain that I have with NppAStyle is that it doesn't handle comments very well. Comments will stay at their original position, which is generally not the wanted action.

RunMe

RunMe is excellent for allowing the execution of the currently open file based on its shell association. Since I've been working with Perl, this allows me to run and test the script easily at the file location.

TextFX

TextFX contains a slew of functions that are too many to list. It no longer comes with the latest unicode version of Notepad++ (v<IP_ADDRESS>), but you can manual install it to get the added features.

repository: cs-tsui/site

repo_name: cs-tsui/site


text:
# Rake::Foodcritic

Rake task for chef cookbooks

## Installation

Add this line to your application's Gemfile:

    gem 'rake-foodcritic'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rake-foodcritic

## Usage

load rake-foodcritic in your Rakefile:

    require 'rake-foodcritic'

And then, run rake-task *chef:foodcritic*

    $ rake chef:foodcritic

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
# Embedding Manifolds with Population-level Jacobians (EMPJ)

Everything needed to replicate the figures from the paper "Engineering recurrent neural networks from task-relevant manifolds and dynamics" (Pollock and Jazayeri, 2019)

The Jupyter notebook contains an implementation of the method and reproduces the figures from the paper.

repository: sbidari/EMPJ

repo_name: sbidari/EMPJ


text:
---
title: "Nested Forms in Rails"
categories: [rails]
---

Nested Forms in Rails allow you to handle multiple models, including creating and saving attributes of different models, from a single form. A functional nested form requires modification to the form view, relevant form models, as well as the controller for the primary form object.  This walkthrough will provide code snippets for each element of our example MVC (Model, View, Controller) that is necessary to create a working nested form.

In order to take advantage of *magical* Rails Form Builder Helpers, the intended associations between your application models must be set up by defining the associations in your models and in respective database table migrations.

For our example, we will create a dream journal with a form to record the content of a dream and tag relevant dream themes. The nested form will focus on the `dream` and `theme` models.

## Models

Our model relationships are specified as each `dream` `has_many` `themes` and a `theme` `belongs_to` a `dream`.

~~~ruby
# app/models/dream.rb

class Dream
  has_many :themes
  accepts_nested_attributes_for :themes

end

# app/models/theme.rb

class Theme
  belongs_to :dream

end
~~~

**`accepts_nested_attributes_for :themes`**

This class method is essential to our nested form and required for mass assignment.  The `accepts_nested_attributes_for` method will allow us to save theme attributes through the dream model within our `form_for(@dream)`. As a result, an attribute writer for `themes` is created. The attribute writer in our example will be: `themes_attributes=(attributes)`

## Controller

Within the `new` action we are instantiating a new instance of a `dream`; this will allow us to use the `form_for` macro, essentially telling the form what model we are building the form for.  Next we will use the `collection.build` method to build a new collection of themes linked to the dream instance. We gain the `collection.build` method when we use the `has_many` macro in the `dream` model.

If we were working with the `belongs_to` macro, the `association_build` method would replace the `collection.build` method.

Lastly, we must update the strong params to include the `themes_attributes` hash. This addition will permit the `themes_attributes` hash to be used in mass assignment within the `create` action.

~~~ruby
# app/controllers/dreams_controller.rb

class DreamsController < ApplicationController
  def new
   @dream = Dream.new
   # This creates an empty theme collection
   @dream.themes.build
  end

 def create
  @dream = Dream.create(dream_params)
   if @dream.save
    redirect_to dream_path(@dream)
   else
    render ‘new’
   end
 end

 private

  def dream_params
    params.require(:dream).permit(:title, :content, theme_id, themes_attributes: [:name])
  end

end
~~~

### Params

The form we intend to build should store the user submitted data in the following params structure:

~~~ruby
params = {
  dream => {
    :title => 'Space Journey',
    :content => 'Fusce fermentum. Curabitur suscipit suscipit tellus. Suspendisse potenti. Vestibulum ullamcorper mauris
		at ligula.',
    :themes_attributes => [
      {:name => 'space'},
      {:name => 'aliens'}
    ]
  }
}
~~~

## View

Instantiating a new `dream` instance in the `DreamController` `new` action allows us to take advantage of the `form_form` helper.  The dream instance (`@dream`) passed to the form builder informs the form builder object of the model we are creating the form for.

~~~
# app/views/dreams/new.html.erb

# this form is for a dream object
<%= form_form(@dream) do |f| %>

  <%= f.label :title %>
  <%= f.text_field :title %>

  <%= f.label :content %>
  <%= f.text_field :content %>

  Select related themes:
  <%= f.collection_check_boxes :theme_id, Theme.all, :id, :name %>

  Or, add a new theme:
  <%= f.fields_for :themes do |theme|
    <%= theme.label :name %>
    <%= theme.text_field :name %>
  <% end %>
  <%= f.submit %>
<%= end %>
~~~

The `fields_for` will nest the value of the newly added `theme` to the `dream_params`. The HTML form input tag will resemble our desired params structure and render as: `<input type=“text” name=“dream[themes_attributes][0][name]” id=“dream_themes_attributes_0_name”>`.

Lastly, we must update the `dream` model to prevent the creation of blank `themes` in the nested attribute.

~~~ruby
# /models/dream.rb

class Dream
  has_many :themes
  accepts_nested_attributes_for :themes, reject_if: :all_blank

end
~~~

extension: markdown


text:
---
name: 🗎 Documentation and Styling
about: Adding or modifying **documentation** or **code style**.

---

**Description**
A brief description of the changes.

**Changelog**
Please summarize the change in one line to generate the changelog:
E.g.
- Added doc for X
- Code style for Y

repository: KratosMultiphysics/Kratos

repo_name: KratosMultiphysics/Kratos


text:
- As a marketing developer,
I want to provide a simple understandable layout to make the participants co-operation smoother.

- As a marketing developer,
I want to include good color, font, and layout to appeal to the user experience.

- As a developer,
I want to make sure consecutive loads don't include any of the same three images to add more variety to user experience.

- As a developer,
I want to ensure a manageable consistent width so images aren't jumping about the page causing confusion.

- As a developer,
I want to store number of times clicked and number of times shown to get the percentage in the results.

- As a group participant,
I want detailed information to understand what the goal of this web page is.

repository: Snobeard/bus-mall

repo_name: Snobeard/bus-mall


text:
# EzPSL

The easy parallel algorithm specification language.

This is a small, imperative, untyped, pseudocode-like language for describing
simple parallel algorithms.  The language "compiles" to
[TLA+](https://lamport.azurewebsites.net/tla/tla.html) so that it can be
exhaustively checked.

## Getting Started

There are no binary distributions.  You will need to install the
[Stack](https://haskellstack.org) build system and compile this tool from
source:

    git clone https://github.com/Calvin-L/ezpsl.git
    cd ezpsl
    stack build
    cp `stack exec -- which ezpsl` .

Usage:

    ./ezpsl FILE

If the file is a `.tla` file, then the tool looks for a line of the form
`\* #include FILE.ezs` and replaces that line with the compiled TLA+ code.
If a compilation was previously done, then the old compilation is replaced with
the new one.

If the file is a `.ezs` file, then the tool prints the compiled TLA+ code on
standard out.

You can use the `-o OUT` option to control where the output gets written,
regardless of the input file extension.

For instance, to compile the Test example, run:

    ./ezpsl examples/Test.ezs

Or, to update the Test TLA+ module, run:

    ./ezpsl examples/Test.tla

## The Language

Example file:

    \* ----------------
    \* Global variables

    var v1 = 2;
    var v2 = 3;

    \* ----------------
    \* Procedures

    proc helper(x) {
        var tmp = x + 1;
        return tmp;
    }

    @entry
    proc main() {
        v1 = helper(v2);
    }

Comments begin with `\*` and are completely ignored by the tool.

All global variables must be listed before any procedures, and local variables
within a procedure must be declared first, before any statements in the
procedure.  Procedures may be listed in any order.

The `@entry` flag indicates that a procedure is an "entry point", where threads
may start execution.  There must be one or more `@entry` procedures.

Expressions: a subset of TLA+ including integers and records.  Additionally,
the special constant `self` refers to the current thread ID.

Statements:

 - `x := e;` - assignment
 - `if (e) { s } else { s }` - if-then-else
 - `while (e) { s }` - looping
 - `either { s } or { s }` - nondeterministic branching
 - `skip;` - no-op
 - `yield;` - pause the current thread and allow others to run
 - `await e;` - wait for a condition to become true.  There is an implied
   `yield` before each `await`.
 - `call p(arg, arg, ...)` - call a procedure and ignore its return value
 - `x := call p(arg, arg, ...)` - call a procedure and save its return value.
   Note that expressions are side-effect free; you can only call other
   procedures using a `call` statement.
 - `return e;` - return a value.  If the expression is omitted (`return;`),
   then a special undefined constant gets returned.

## Specifying Correctness Properties, and Details About the TLA+ Output

(More on this soon!)

## Comparison to PlusCal

EzPSL is similar to
[PlusCal](https://lamport.azurewebsites.net/tla/high-level-view.html#pluscal?unhideBut=hide-pluscal&unhideDiv=pluscal&back-link=tools.html#pluscal?unhideBut@EQhide-pluscal@AMPunhideDiv@EQpluscal),
another simple imperative language that can be compiled to TLA+ for model
checking.

There are a few ways in which EzPSL is better than PlusCal:

 - **EzPSL allows larger atomic blocks.**  PlusCal programs use labels to
   delimit atomic blocks, while EzPSL programs use `yield` statements.
   However, PlusCal _requires_ labels in many places, while EzPSL allows any
   number of statements---including nonterminating loops---between `yield`
   statements.  This can lead to shorter model checking times.
 - **EzPSL allows return values from procedures.**  While PlusCal can model
   return values, it is awkward to do so.  EzPSL includes them as a first-class
   primitive.  This can make some programs shorter and easier to read.

There are also ways in which PlusCal is better than EzPSL:

 - **EzPSL produces longer error traces.**  To support larger atomic blocks,
   EzPSL produces longer error traces than PlusCal when model checking finds a
   violation.  Sometimes this is an advantage; the longer error traces include
   more information about what the program did.  However, usually this is a
   disadvantage; the longer error traces take more time to understand.
 - **EzPSL is not built into the TLA+ toolbox.**  To use EzPSL you will need to
   use this command-line tool, which can be awkward and is likely to slow down
   your workflow.

repository: dricketts/ezpsl

repo_name: dricketts/ezpsl


text:
---
title: Factorial in Python
layout: default
last-modified: 2020-05-02
featured-image:
tags: [python, factorial]
authors:
  - underscoreanuj
---

In this article, we will writing a program to calculate the factorial of a number in Python.

## How to Implement the Solution

Let's look at the code in detail:

code for [factorial.py](https://github.com/TheRenegadeCoder/sample-programs/blob/master/archive/p/python/factorial.py):-

```python
#!/usr/bin/env python
import sys

def factorial(n):
    if n <= 0:
        return 1
    return n * factorial (n - 1)

def exit_with_error(msg=None):
    msg = msg or 'Usage: please input a non-negative integer'
    print(msg)
    sys.exit(1)

def main(args):
    try:
        n = int(args[0])
        if n < 0:
            exit_with_error()
        elif n >= 996:
            exit_with_error('{}! is out of the reasonable bounds for calculation'.format(n))
        print(factorial(n))
    except (IndexError, ValueError):
        exit_with_error()

if __name__ == "__main__":
    main(sys.argv[1:])
```

### The Main Function

Let us breakdown the code in smaller parts,

```python
if __name__ == "__main__":
    main(sys.argv[1:])
```
This bit of code checks to see if this is the main module run. If true then it calls the main function and passes user input to it. In this case the user input would be a number like `0 or 1 or 50 or n(0<=n<996)`.

```python
def main(args):
    try:
        n = int(args[0])
        if n < 0:
            exit_with_error()
        elif n >= 996:
            exit_with_error('{}! is out of the reasonable bounds for calculation'.format(n))
        print(factorial(n))
    except (IndexError, ValueError):
        exit_with_error()
```

This is the main function of this file. It parses the input into an integer, then calls our factorial function (and prints the results). It also deals with any errors which arise when the input `n is such that it violates the property: (0<=n<996), i.e. n is greater than equal to 0 and less than 996`.

### Throw Errors

```python
def exit_with_error(msg=None):
    msg = msg or 'Usage: please input a non-negative integer'
    print(msg)
    sys.exit(1)
```

This function prints a message if given (else default) and then exits the script with an error, `sys.exit(1)`. If any non-zero value is returned then the program didn't complete properly. This function is called if the user input is either less than zero or greater than equal to 996.

### Factorial

```python
def factorial(n):
    if n <= 0:
        return 1
    return n * factorial (n - 1)
```

Finally, the real deal. This function takes a positive integer (less than 996) and returns the factorial of that number. This function `factorial` is a recursive function that calls itself repeatedly while decreasing the input parameter by one on each subsequent call, until the base case is reached
(n <= 0).

Once the base case is reached the call-stack unfolds itself propagating the results to the subsequent calling function, which in this case will be the same function itself.

For example, if `3` is the input:

* First we compare, if 3 <= 0
* False
* return 3 * factorial(3-1)
* Call `factorial(2)`

Now, for `2` as the input:

* First we compare, if 2 <= 0
* False
* return 2 * factorial(2-1)
> meanwhile the original call would look like:
> return 3 * 2 * factorial(2-1)
* Call `factorial(1)`

Now, for `1` as the input:
* First we compare, if 1 <= 0
* False
* return 1 * factorial(1-1)
> meanwhile the original call would look like:
> return 3 * 2 * 1 * factorial(1-1)
* Call `factorial(0)`

Now, for `0` as the input:
* First we compare, if 0 <= 0
* True
* return 1

Since we reached the base case, now we calculate the the values while moving up towards the original function call.

    factorial(0) = 1  (base-case)

    factorial(1) = 1 * factorial(1-1) = 1 * factorial(0) = 1 * 1 = 1

    factorial(2) = 2 * factorial(2-1) = 2 * factorial(1) = 2 * 1 = 2

    factorial(3) = 3 * factorial(3-1) = 3 * factorial(2) = 3 * 2 = 6

## How to Run Solution

If you want to run this program, you can download a copy of [Factorial in Python](https://github.com/TheRenegadeCoder/sample-programs/blob/master/archive/p/python/factorial.py).

Next, make sure you have the latest Python interpreter (latest stable version of Python 3 will do).

Finally, open a terminal in the directory of the downloaded file and run the following command:

`python factorial.py 3`

Alternatively, copy the solution into an online [Python interpreter](https://colab.research.google.com) and hit run.

## Further Reading

- Fill out as needed

repository: hemabhravee/sample-programs-website

gha_language: HTML

repo_name: hemabhravee/sample-programs-website


text:
---
id: introduction
title: Introduction
---
## What is PPL Bench?

PPL Bench is a new benchmark framework for evaluating the performance of probabilistic programming languages (PPLs).

### Model Instantiation and Data Generation

$$P_\theta(X,Z) =  P_\theta(Z)P_\theta(X|Z)\\$$
$$Z_1 \sim P_\theta(Z)\\$$
$$X_{full} \sim P_\theta(X|Z=Z_1)\\$$
$$X_{train} = {X_{full}}_{1\ldots\frac{n}{2}}\\$$
$$X_{test} = {X_{full}}_{\frac{n}{2}\ldots n}\\$$

A model with all it's parameters set to certain values is referred to as a model instance.
We establish a model $P_\theta(X,Z)$.
We sample model-specific parameter values from their distributions.
We then use the generative model to generate two sets of data - train data and test data.
Here, $n$ refers to the total number of observations. By default, we do a 50-50 train-test split.
This process of data generation is performed independent of any PPL.

### PPL Implementation and Posterior Sampling

$$Z^*_{1...s} \sim P_\theta(Z | X = X_{train})$$

The training data is passed to various PPL implementations to perform inference.
We get $s$ posterior samples from inference.

### Evaluation of Posterior Samples

$$\text{Predictive Log Likelihood}(s) = \log \left( \frac{1}{s}\sum_{i=1}^{s}(P(X_{test}|Z=Z^*_{i})) \right)$$

We compute Predictive Log Likelihood on the test data using posterior samples obtained from each PPL. We also compute other common evalutation metrics such as effective sample size, $r_{hat}$ and inference time.

## Using PPL Bench

* Comparing model performance across PPLs
* Comparing the effectiveness of inference algorithms across models
* Evaluating new inference algorithms

## Purpose of PPL Bench

The purpose of PPL Bench as a probabilistic programming benchmark is two-fold.

1. To provide researchers with a framework to evaluate improvements in PPLs in a standardized setting.
2. To enable users to pick the PPL that is most suited for their modelling application.

Typically, comparing different ML systems requires duplicating huge segments of work: generating data, running analysis, determining predictive performance, and comparing across implementations. PPL Bench automates nearly all of this workflow.


text:
[![Discord](https://img.shields.io/discord/676948200904589322)](https://discord.gg/hYsWbmk)
![Beta](https://img.shields.io/badge/stability-beta-yellow)
![Apache-2.0](https://img.shields.io/badge/license-Apache-blue)

Places Android KTX
==================

## Description
This repository contains Kotlin extensions (KTX) for:
1. The [Places SDK for Android][places-sdk]

It enables you to write more concise, idiomatic Kotlin.

## Requirements
* API level 16+

## Installation

If you are using the Places SDK through Google Play Services:

```groovy
dependencies {
    implementation 'com.google.maps.android:places-ktx:2.0.0'
}
```

(Deprecated) ~~Alternatively, if you are using the Places standalone library (for use only with Maps v 3.1.0 beta):~~

```groovy
dependencies {
    implementation 'com.google.maps.android:places-v3-ktx:2.0.0'
}
```

## Example Usage

Accessing API responses made by `PlacesClient` can be retrieved using coroutines vs. using
[Task](https://developers.google.com/android/reference/com/google/android/gms/tasks/Task.html) objects.
The example here demonstrates how you can use this feature alongside with Android’s [ViewModel KTX](viewmodel-ktx)’s `viewModelScope`.
Additionally, you can use a DSL provided by this library to construct requests vs. using builders.

_Before_
```kotlin
val bias = RectangularBounds.newInstance(
    LatLng(22.458744, 88.208162), // SW lat, lng
    LatLng(22.730671, 88.524896) // NE lat, lng
)

// Create a new programmatic Place Autocomplete request in Places SDK for Android using builders
val newRequest = FindAutocompletePredictionsRequest
    .builder()
    .setLocationBias(bias)
    .setTypeFilter(TypeFilter.ESTABLISHMENT)
    .setQuery("123 Main Street")
    .setCountries("IN")
    .build()

// Perform autocomplete predictions request
placesClient.findAutocompletePredictions(newRequest).addOnSuccessListener { response ->
    // Handle response
}.addOnFailureListener { exception ->
    // Handle exception
}
```

_After_
```kotlin
val handler = CoroutineExceptionHandler { _, exception ->
    // Handle exception
}

viewModelScope.launch(handler) {
    val bias: LocationBias = RectangularBounds.newInstance(
        LatLng(37.7576948, -122.4727051), // SW lat, lng
        LatLng(37.808300, -122.391338) // NE lat, lng
    )

    // Create a new programmatic Place Autocomplete request in Places SDK for Android using DSL
    val request = findAutocompletePredictionsRequest {
        locationBias = bias
        typeFilter = TypeFilter.ESTABLISHMENT
        query = "123 Main Street"
        countries = listOf("US")
    }

    // Perform autocomplete predictions request
    val response = placesClient.awaitFindAutocompletePredictions(request)
    // Handle response
}
```

### Demo App

A [demo](app) application is contained within this repository that illustrates the use of this KTX library.

To run the demo app, you'll have to:

1. [Get a Places API key][api-key]
2. Update the `local.properties` file in your root directory called (Note: this file should *NOT* be
under version control to protect your API key) and add a single line to `local.properties` that
looks like `PLACES_API_KEY="YOUR_API_KEY"`, where `YOUR_API_KEY` is the API key you obtained in
the first step. You can also take a look at the [local.defaults.properties](local.defaults.properties)
as an example.
3. Build and run

## Documentation

You can learn more about all the extensions provided by this library by reading the [reference documents].

## Support

Encounter an issue while using this library?

If you find a bug or have a feature request, please [file an issue].
Or, if you'd like to contribute, send us a [pull request] and refer to our [code of conduct].

You can also reach us on our [Discord channel].

For more information, check out the detailed guide on the
[Google Developers site][places-sdk].

[api-key]: https://developers.google.com/places/android-sdk/get-api-key
[Discord channel]: https://discord.gg/hYsWbmk
[code of conduct]: CODE_OF_CONDUCT.md
[file an issue]: https://github.com/googlemaps/android-places-ktx/issues/new/choose
[maps-v3-sdk]: https://developers.google.com/maps/documentation/android-sdk/v3-client-migration
[places-sdk]: https://developers.google.com/maps/documentation/places/android-sdk/overview
[pull request]: https://github.com/googlemaps/android-places-ktx/compare
[reference documents]: https://googlemaps.github.io/android-places-ktx
[viewmodel-ktx]: https://developer.android.com/kotlin/ktx#viewmodel

repository: googlemaps/android-places-ktx

gha_language: Kotlin

repo_name: googlemaps/android-places-ktx


text:
# Stigmidium rouxianum Calat. & Triebel, 2003 SPECIES

#### Status
ACCEPTED

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

#### Published in
Lichenologist 35(2): 109 (2003)

#### Original name
Stigmidium rouxianum Calat. & Triebel, 2003

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# telegram_bot_python

Telegram bot source code in Python. You can read more tutorials at [CodeMyBot.com](http://codemybot.com)

## CHANGELOG

## 0.1.6 - 2018-08-07
### Changed
- Update `chat.py` to support bitcoin price check commands.

## 0.1.5 - 2018-07-22
### Changed
- Update `config.py` to fall back to environment vars when there is no database record. This feature supports our unit test.
- Update `chat.py` to support Telegram command message.
- Update `handler_bot_test.py` with new test case.

## 0.1.4 - 2018-07-15
### Added
- Add `settings.py` to manage all settings handlers.
- Add `settings.config.html`, `settings.webhook.html` templates.

### Changed
- Refactor app settings into sub pages. Right now we have config and webhook pages.
- Update templates for better layout.

## 0.1.3 - 2018-07-08
### Changed
- Update `settings.html`, `base.py` to view secret values on settings page.
- Refactor `config.py`, `chat.py`.

## 0.1.2 - 2018-07-01
### Added
- Add `models/config.py`

## Changed
- Update `base.py`,`bot.py`,`chat.py` to get Telegram token from config model.

## 0.1.1 - 2018-06-24
### Changed
- Support get/update Telegram webhook from settings page.
- Clean up get/update webhook routes.

## 0.1.0 - 2018-06-17
### Changed
- Update `base.py`, `base.html` with login/logout menu item.

## 0.0.9 - 2018-06-10
### Added
- Add `templates/settings.html`
- Add `templates/403.html`
- Support `login`/`logout` with Google Sign-In

### Changed
- Update `main.py` and `base.py`

## 0.0.8 - 2018-06-01
### Added
- Add `templates/about.html`
- Add `templates/home.html`

### Changed
- Update `base.html` and `base.py` to support 2 new pages

## 0.0.7 - 2018-05-27
### Added
- Add `static/css/style.css`

### Changed
- Update `base.html` to use Bootstrap 4

## 0.0.6 - 2018-05-20
### Added
- Add `templates/base.html`

### Changed
- Refactor `base.py` to use jinja2 for rendering

## 0.0.5 - 2018-05-13
### Added
- Add `runner.py`, `handler_bot_test.py` for basic unittest

### Changed
- Update `chat.py` to support decorator methods
- Clean repo history

## 0.0.4 - 2018-04-27
### Added
- Add `chat.py` under `models` package to handle message replying
- Update `bot.py` to use `chat.py`

### Changed
- Refactor `main.py` into sub modules
- Use str.format()

## 0.0.2 - 2018-04-15
### Added
- defaultReply method to support all kind of messages
- Add 'reply_to_message_id' to reply payload. Easier for us to know what message the bot is replying to.

### Removed
- Remove 'disable_web_page_preview' from reply payload

## 0.0.1 - 2018-04-14
### Added
- Initial source code
- This README file


text:
# yuk

Yuk is an open source tool to create reverse proxy servers and also to configure load balancing.

Docker hub

## Why yuk ?

To configure proxy with less effort.

### Advantage of reverse proxy

- Controlling traffic (load balancing).
- SSL termination.
- Security and anonymity.

## Table of contents

- [Features](#features)
- [Production Setup](#production-setup)
- [Development Setup ](#development-setup)
- [Upcoming Features](#upcoming-features)
- [Screenshots](#screenshots)
- [Links](#links)
- [Author](#author)

### Features
 ONLY ON : [HTTP]
1. Proxy
2. Load balancing

### Production Setup
#### Prerequisite

- Docker pre installed in the system
#### script

```
   docker run -d \
      -p 8080:8080 \
      -p 3001:3000 \
      -e DEFAULT_USER=admin \
      -e DEFAULT_PASSWORD=password \
      abhijithababhijith/yuk
   ```
Run the above command, to run the docker container. Port 3001 is for the dashboard and the request to proxy server is mapped
to the port 8080.

### Development Setup
#### Prerequisite

- node, docker,docker-compose

#### script
1. Run ```npm i ``` on root folder
2. Run ```npm run dev``` , localhost:3000 serves the dashboard.
3. Run on docker ```docker-compose up -d```

### Upcoming Features

- HTTPS module
- UPD and TCP
- Access logs and error log
- Health checks
- Backup server
- Load balancing method
- server slow start
- max connections

### Screenshots

### Links

Docker image (Docker hub)

### Author

Abhijith V

repository: abhisawesome/yuk

gha_language: TypeScript

repo_name: abhisawesome/yuk


text:
[![Build Status](https://api.travis-ci.org/dscheerens/angular-conditional-validation.svg?branch=master)](https://travis-ci.org/dscheerens/angular-conditional-validation) [![NPM](https://img.shields.io/npm/v/angular-conditional-validation.svg)](https://www.npmjs.com/package/angular-conditional-validation)

Angular conditional validation module
=====================================

The conditional validation module provides an `enableValidation` attribute directive that can be used to conditionally enable/disable validation for elements with an `ngModel` directive.

Motivation
----------

Most (if not all) of the standard Angular validators can be disabled individually using *falsy* values.
For example when the expression for a `ngMin` attribute evaluates to `undefined`, then validation will be disabled for the `min` validator.
However, this requires that the logic that determines when validation should be enabled is combined with the logic that defines the values for parameterized validators.
At best you can write something like this:

```html
<input
  type="date"
  ng-model="myCtrl.startDate"
  ng-min="myCtrl.enableStartDateValidation && myCtrl.minStartDate">
```

The `enableValidation` directive provides a cleaner method to separate the logic.
When applied to the example above, the result looks like this:

```html
<input type="date"
  ng-model="myCtrl.startDate"
  ng-min="myCtrl.minStartDate"
  enable-validation="myCtrl.enableStartDateValidation">
```

Using the `enableValidation` directive it also easier to disable multiple validators at once.
If the example above is extended with a `max` validator, you can simply add the `ng-max` attribute without having to repeat `myCtrl.enableStartDateValidation &&` in the validator expression.
The result:

```html
<input type="date"
  ng-model="myCtrl.startDate"
  ng-min="myCtrl.minStartDate"
  ng-max="myCtrl.maxStartDate"
  enable-validation="myCtrl.enableStartDateValidation">
```

Another reason for using the `enableValidation` directive is when you use (custom) validators that do not provide a method to (conditionally) disable them.

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

**NPM**

```
npm install angular-conditional-validation
```

**Bower**

```
bower install angular-conditional-validation
```

Usage
-----

To use the Angular conditional validation module in your application either include the script (`angular-conditional-validation(.min).js`) using a `<script>` tag or require/load it via a script loader.
Furthermore add `angularConditionalValidation` to the Angular dependencies of your application.

Now you should be able to use the `enableValidation` directive in your templates.

The directive supports three types of values:

* **Objects:** When object values are used to enable/disable validation for individual validators. The property keys of the object should match with the name of the validators. The value of a property (which may be a function) determines whether validation is enabled/disabled.
* **Functions:** Functions values will be invoked every time validation is triggered and the return value (which may be an object) is then used to determine whether validation is enabled or disabled.
* **Other:** Any other value type will be evaluated as an inherent boolean value, so any *truthy* value enables validation while *falsy* values disable validation.

Both synchronous and asynchronous validators are supported by the `enableValidation` directive.

Limitations
-----------

* Promises are not supported.

Examples
--------

A set of demos can be found at the following JS Bin: [jsbin.com/necile](https://jsbin.com/necile/)

### Simple boolean validation condition
```javascript
var ctrl = this;
ctrl.someValue = 'hello';
ctrl.anotherValue = true;
```
```html
<input type="text" ng-model="ctrl.someValue" ng-minlength="5" enable-validation="ctrl.anotherValue">
```

### Function based validation condition
```javascript
var ctrl = this;
ctrl.someValue = 'hello';
ctrl.shouldValidate = function() {
  return new Date().getDay() == 1; // Only validate on mondays :)
};
```
```html
<input type="text" ng-model="ctrl.someValue" ng-minlength="5" enable-validation="ctrl.shouldValidate">
```

### Object based validation condition
```javascript
var ctrl = this;
ctrl.someValue = 'hello';
ctrl.enabledValidators = {
  required: false,
  minlength: true,
  '*': false // Disable other validators.
};
```
```html
<input
  type="text"
  ng-model="ctrl.someValue"
  required
  ng-minlength="4"
  ng-maxlength="6"
  pattern="abcde"
  enable-validation="ctrl.enabledValidators">
```

### Mixing functions and objects
```javascript
var ctrl = this;
ctrl.someValue = 'hello';
ctrl.enabledValidators = function() {
  return {
    required: false,
    minlength: true,
    '*': function() {
      return new Date().getDay() == 2; // Other validators are only enabled on tuesday.
    }
  };
};
```
```html
<input
  type="text"
  ng-model="ctrl.someValue"
  required
  ng-minlength="4"
  ng-maxlength="6"
  pattern="abcde"
  enable-validation="ctrl.enabledValidators">
```


text:
---
layout: splash
permalink: /doc-5536/
title: "Policy based ensembles for multi domain operations"
---

# Policy based ensembles for multi domain operations

        Abstract
        In multi-domain operations, different domains get different modalities of input signals, and as a result end up training different models for the same decision-making task. The input modalities could be overlapping with each other, which leads to the situation that models created in one domain may be reusable partially for tasks being conducted in other domains. In order to share the knowledge embedded in different models trained independently in each individual domain, we propose the concept of hybrid policy-based ensembles, in which the heterogeneous models from different domains are combined into an ensemble whose operations are controlled by policies specifying which subset of the models ought to be used for an operation. We show how these policies can expressed based on properties of training datasets, and discuss the performance of these hybrid policy-based ensembles on a dataset used for training network intrusion detection models.

        Authors

Dinesh Verma (IBM US)

Elisa Bertino (Purdue)

Alessandra Russo (Imperial)

Seraphin Calo (IBM US)

Ankush Singla (Purdue)

        Date
        May-2020

        Venue
        SPIE DCS 2020 [link]

                <form method="get" action="https://www.spiedigitallibrary.org/conference-proceedings-of-spie/11413/2558727/Policy-based-ensembles-for-multi-domain-operations/10.1117/12.2558727.short?SSO=1">
                    <button type="submit">download paper</button>
                </form>


text:
# [Bollywood Trivia](http://alexa.amazon.com/#skills/amzn1.ask.skill.4ade1f27-48ec-43dd-afe2-57f1d751a52b)
![2 stars](../../images/ic_star_black_18dp_1x.png)![2 stars](../../images/ic_star_black_18dp_1x.png)![2 stars](../../images/ic_star_border_black_18dp_1x.png)![2 stars](../../images/ic_star_border_black_18dp_1x.png)![2 stars](../../images/ic_star_border_black_18dp_1x.png) 1

To use the Bollywood Trivia skill, try saying...

* *Alexa Open Bollywood Trivia*

* *Alexa Ask Bollywood Trivia a fact*

* *Give me a Bollywood Trivia*

Bollywood Trivia provides interesting and fun facts about Bollywood, the world's largest movie production industry.

***

### Skill Details

* **Invocation Name:** bollywood trivia
* **Category:** null
* **ID:** amzn1.ask.skill.4ade1f27-48ec-43dd-afe2-57f1d751a52b
* **ASIN:** B01N79QMN3
* **Author:** Anupam Chakravorty
* **Release Date:** November 25, 2016 @ 04:09:04
* **In-App Purchasing:** No