text:
# UniverEx

UniverEx is a library for loading university study plan.
It contains convenient structs to work with (Faculty, Group, Term, Schedule).

Under the hood UniverEx uses HTTPoison and Poison to download and parse JSON data respectively.

Actual purpose of this library is personal use only, but you may also find it useful and helpful ;)

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `univerex` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:univerex, "~> 0.0.1"}
  ]
end
```

## Configuration

To configure UniverEx you only need to set 5 params in your `congig.exs`:

```
config :univerex,
    base_url: "https://put.your.base.url.here/",
    faculties: "faculties",
    groups: "groups/faculty_id/",
    term: "term/group_id/",
    schedule: "schedule/group_id/"
```

The main thing here is `base_url`.
It concatenates with other `(faculties, groups, term, schedule)` parts then.

## Usage

### Get faculties

```
faculties = Univerex.load_faculties()
```

### Get groups for particular faculty

```
[faculty | _] = faculties
groups = faculty.id |> Univerex.load_groups()
```

### Get current term info for particular group

```
{_faculty_id , [group | _]} = group.id |> Univerex.load_term()
```

### Get current schedule for particular group

```
schedule = group.id |> Univerex.load_schedule()
```

## License

MIT License

Copyright (c) 2017 Nikita Kononenko

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

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

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

repository: vmeansdev/univerex

repo_name: vmeansdev/univerex


text:
---
layout: post
date: 2017-02-06
title: Images
description: Adding images
category: design
order: 6
---

Images need to be saved at a larger size than they will be displayed in order to be clear on high pixel density screens like iPhones and Macs.

Once you select a content block for your image, refer to the **[Content Block Types](/blocks/)** page for the appropriate width for your image.

Your image file size should be as small as possible. If you have Photoshop, use **File > Export > Save for Web (legacy)** and the following settings:

![Save for web settings]({{site.image_path}}/{{page.category}}/photoshop.jpg)

If you don't have Photoshop, you can use **[ImageOptim online](https://imageoptim.com/online)** to compress your image(s). Please try to keep your images below 200kb.

To add your image select the gray placeholder image and select **Replace**.

If you are uploading a new image, select a folder and then select **Upload**.

Select **Alt** and add text to describe the image. *This is important for screen readers.*

If you would like the image to be a link, select **Link** and paste in the URL.

Select the **Settings** tab, uncheck **Keep Proportions** and add the corresponding "Render Size" from the **[Content Block Types](/blocks/)** page.

**❗*PLEASE AVOID DESIGNING IMAGES*** Images with text and collage images can often become illegible on small screens. Please limit the images you use to photographs. If you would like an image designed, like a banner or type treatment, please contact your project manager in Marketing.

license: MIT

repository: joanronstadt/email-docs

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: joanronstadt/email-docs


text:
# Steam Descriptions

[![Build status][build-image]][build]
[![Code coverage][codecov-image]][codecov]
[![Code Quality][codacy-image]][codacy]

This repository contains Python code to retrieve semantically similar Steam games.

![Sekiro: similar store descriptions with GloVe](https://github.com/woctezuma/steam-descriptions/wiki/img/fuUtQ5Z.jpg)

## Requirements

-   Install the latest version of [Python 3.X](https://www.python.org/downloads/).
-   Install the required packages:

```bash
pip install -r requirements.txt
```

## Method

Each game is described by the concatenation of:

-   a short text below its banner on the Steam store:

![short game description](https://i.imgur.com/qSiN3Hh.png)

-   a long text in the section called "About the game":

![long game description](https://i.imgur.com/zpLKiqh.png)

The text is tokenized with [spaCy](https://spacy.io/) by running [`utils.py`](utils.py).
The tokens are then fed as input to different methods to retrieve semantically similar game descriptions.

For instance, a word embedding can be learnt with [Word2Vec](https://en.wikipedia.org/wiki/Word2vec) and then used for a
sentence embedding based on a weighted average of word embeddings (cf. [`sif_embedding_perso.py`](sif_embedding_perso.py)).
A [pre-trained GloVe](https://spacy.io/models/en#section-en_vectors_web_lg) embedding can also be used instead of the self-trained Word2Vec embedding.

Or a document embedding can be learnt with [Doc2Vec](https://radimrehurek.com/gensim/models/doc2vec.html) (cf. [`doc2vec_model.py`](doc2vec_model.py)), although, in
our experience, this is more useful to learn document tags, e.g. game genres, rather than to retrieve similar documents.

Different baseline algorithms are suggested in [`sentence_baseline.py`](sentence_baseline.py).
For Tf-Idf, the code is duplicated in [`export_tfidf_for_javascript_visualization.py`](export_tfidf_for_javascript_visualization.py), with the addition of an export for visualization of the matches as a graph [in the web browser](https://woctezuma.github.io/).

Embeddings can also be computed with [Universal Sentence Encoder](https://tfhub.dev/google/universal-sentence-encoder/2) on [Google Colab](https://colab.research.google.com/) with [this notebook][universal_sentence_encoder].
[![Open In Colab][colab-badge]][universal_sentence_encoder]
Results are shown with [`universal_sentence_encoder.py`](universal_sentence_encoder.py).

## Results

### Similar games

An in-depth commentary is provided on the [Wiki](https://github.com/woctezuma/steam-descriptions/wiki/Commentary).
Matches obtained with Tf-Idf are shown as a graph [in the web browser](https://woctezuma.github.io/).
Overall, I would suggest to match store descriptions with:
-   either [Term Frequency * Inverse Document Frequency (Tf-Idf)](https://github.com/woctezuma/steam-descriptions/wiki/baseline_0),

![Witcher: similar store descriptions with Tf-Idf](https://github.com/woctezuma/steam-descriptions/wiki/img/fH7gjaS.png)

-   or a weighted average of GloVe word embeddings, with Tf-Idf reweighting, after removing some components:
    - either [only sentence components](https://github.com/woctezuma/steam-descriptions/wiki/sif_embedding_glove_cosine_sent_comp_10),
    - or [both sentence and word components](https://github.com/woctezuma/steam-descriptions/wiki/sif_embedding_glove_toggle_preprocess_word_vectors_num_comp_10_sent_comp_10) (for slighly better results, by a tiny margin).

![Neverwinter: similar store descriptions with GloVe](https://github.com/woctezuma/steam-descriptions/wiki/img/PYzT6ol.png)

A retrieval score can be computed, thanks to a ground truth of games set in the same fictional universe.
Alternative scores can be computed as the proportions of genres or tags shared between the query and the retrieved games.

When using average of word embeddings as sentence embeddings:
-   removing only [sentence components](https://openreview.net/forum?id=SyK00v5xx) provided a very large increase of the score (+105%),
-   removing only [word components](https://openreview.net/forum?id=HkuGJ3kCb) provided a large increase of the score (+51%),
-   removing both components provided a very large increase of the score (+108%),
-   relying on a weighted average instead of a simple average lead to better results,
-   Tf-Idf reweighting lead to better results than [Smooth Inverse Frequency](https://openreview.net/forum?id=SyK00v5xx) reweighting,
-   GloVe word embeddings lead to better results than Word2Vec.

![Influence of the removal of sentence components](https://github.com/woctezuma/steam-descriptions/wiki/img/plot.png)

A table with scores for each major experiment is [available](https://github.com/woctezuma/steam-descriptions/wiki/steam_descriptions).
For each game series, the score is the number of games from this series which are found among the top 10 most similar games (excluding the query). The higher the score, the better the retrieval.

Results can be accessed from the [Wiki homepage](https://github.com/woctezuma/steam-descriptions/wiki/).

### Unique games

It is possible to highlight games with *unique* store descriptions, by applying a threshold to similarity values output by the algorithm.
This is done in [`find_unique_games.py`](find_unique_games.py):
-   the Tf-Idf model is used to compute similarity scores between store descriptions,
-   a game is *unique* if the similarity score between a query game and its most similar game (other than itself) is lower than or equal to an arbitrary threshold.

Results are shown [here](https://github.com/woctezuma/steam-descriptions/wiki/Unique_Games).

## References

-   [Microsoft's tutorial](https://github.com/microsoft/nlp/tree/master/examples/sentence_similarity) about sentence similarity,
-   [My answer on StackOverlow](https://stackoverflow.com/a/54330582/), about sentence embeddings
-   [Tutorial on the official website of 'gensim' module](https://radimrehurek.com/gensim/models/word2vec.html)
-   [Tutorial on a blog](http://kavita-ganesan.com/gensim-word2vec-tutorial-starter-code/)
-   [Tool: spaCy](https://spacy.io/)
-   [Tool: Gensim](https://radimrehurek.com/gensim/)
-   [Word2Vec](https://en.wikipedia.org/wiki/Word2vec)
-   [GloVe](https://github.com/stanfordnlp/GloVe)
-   [Universal Sentence Encoder](https://tfhub.dev/google/universal-sentence-encoder/2)
-   Sanjeev Arora, Yingyu Liang, Tengyu Ma, [A Simple but Tough-to-Beat Baseline for Sentence Embeddings](https://openreview.net/forum?id=SyK00v5xx), in: ICLR 2017 conference.
-   Jiaqi Mu, Pramod Viswanath, [All-but-the-Top: Simple and Effective Postprocessing for Word Representations](https://openreview.net/forum?id=HkuGJ3kCb), in: ICLR 2018 conference.

<!-- Definitions -->

[build]: <https://github.com/woctezuma/steam-descriptions/actions>
[build-image]: <https://github.com/woctezuma/steam-descriptions/workflows/Python package/badge.svg?branch=master>

[pyup]: <https://pyup.io/repos/github/woctezuma/steam-descriptions/>
[dependency-image]: <https://pyup.io/repos/github/woctezuma/steam-descriptions/shield.svg>
[python3-image]: <https://pyup.io/repos/github/woctezuma/steam-descriptions/python-3-shield.svg>

[codecov]: <https://codecov.io/gh/woctezuma/steam-descriptions>
[codecov-image]: <https://codecov.io/gh/woctezuma/steam-descriptions/branch/master/graph/badge.svg>

[codacy]: <https://www.codacy.com/app/woctezuma/steam-descriptions>
[codacy-image]: <https://api.codacy.com/project/badge/Grade/710292a19eff45e08a53e8b0028e02d4>

[universal_sentence_encoder]: <https://colab.research.google.com/github/woctezuma/steam-descriptions/blob/master/universal_sentence_encoder.ipynb>

[colab-badge]: <https://colab.research.google.com/assets/colab-badge.svg>

repository: woctezuma/steam-descriptions

gha_language: Python

gha_license_id: MIT

repo_name: woctezuma/steam-descriptions


text:
# ASIO chat server example

Simple asio chat server using WiFi STA

## Example workflow

- WiFi STA is started and trying to connect to the access point defined through `make menuconfig`
- Once connected and acquired IP address, ASIO chat server is started on port number defined through `make menuconfig`
- Chat server echoes a message (received from any client) to all connected clients

## Running the example

- Run `make menuconfig` to configure the access point's SSID and Password and port number
- Run `make flash monitor` to build and upload the example to your board and connect to it's serial terminal
- Wait for WiFi to connect to your access point (note the IP address)
- Connect to the server using multiple clients, for example using any option below
    - build and run asi chat client on your host machine
    - run chat_client asio example on ESP platform
    - since chat message consist of ascii size and message, it is possible to
        netcat `nc IP PORT` and type for example `   4ABC<CR>` to transmit 'ABC\n'

See the README.md file in the upper level 'examples' directory for more information about examples.

repository: openvehicles/esp-idf

gha_language: C

repo_name: openvehicles/esp-idf


text:
+++
categories = ["Consulting", "HowTo", "Salesforce"]
date = "2015-11-01T11:59:44+00:00"
tags = ["Certification", "exam", "Platform App Builder", "Preperation", "Salesforce", "Salesforce Certified Platform App Builder Exam", "Study Guide"]
title = "Certified Salesforce Platform App Builder – Part 1: Exam Overview"
url = "/2015/11/certified-salesforce-platform-app-builder-part-1-exam-overview/"

+++
In order to prepare and pass the Salesforce App Builder Exam I follow the learning path as described in the official “Certified Salesforce Platform App Builder Study Guide“.

But how many questions on each topic have to be answered in the exam? The total number of questions is 60 and the expected number of questions on each topic can easily be calculated:

## Overview of exam questions per topic

      Topic

      Weight

      Questions

      Business Logic and Process Automation

      27%

      16,2

      Data Modeling and Management

      20%

      12

      User Interface

      14%

      8,4

      Security

      10%

      6

      Salesforce Fundamentals

      8%

      4,8

      App Deployment

      8%

      4,8

      Reporting

      5%

      3

      Mobile

      5%

      3

      Social

      3%

      1,8

      Total

      100%

      60

My strategy is to begin with the most important topic with the most questions and work my way down to the end of the list.

This post is the beginning of a series of posts on how I prepared for the exam. This part gave an overview of the topics and their weights. In the next part of I will focus on “**Business Logic and Process Automation**” in Salesforce and go into more depth.


text:
# goflv

a lib for flv parse written in golang

Status
======

It is *not* usable yet and still under early development.

Build and Install
=====
    First you should config your golang environment

	go get github.com/oikomi/goflv
    make

Usage
=====
	goflv flvfilename

Output
======
A json-format output

![](flv_json_output.png)

Copyright & License
===================

Copyright 2014 Hong Miao. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

repository: talkfun/goflv

repo_name: talkfun/goflv


text:
forj/gardener
=====================

Manage cloud things for forj blueprints with puppet.

## Usage ##
   For examples on usage see manifests/tests

## Install ##

   include gardener

   The maestor class will use this module to cordinate the creation
   and management of nodes defined by the blueprint in hieradata.
   See maestro::orchestrator class for more details.

## Features ##

  - class for creating / destroying list of static nodes (server_up, server_destroy)
  - type for managing those nodes: pinas
  - various parsers for compute public and private ip lookup
  - helper functions for converting metadata from json to hash and strings
  - domain record lookup and management
  - configured to work with hiera
  - support for openstack 13.5, deprecation for 12.12 will come next.
  - usage of unix_cli objects

## WIP ##
  - object storage

## Planned ##
  - attached storage
  - more providers (AWS, rackspace)

## Intended Audience ##
  users of forj blueprints

## Testing & Development ##
  setup your environment for testing:
- basic requirements for ubuntu
```shell
 apt-get -y update && apt-get -y upgrade
 apt-get -y install curl
```
- we now use docker with beaker for test case acceptance.
- It's possible to setup an environment for testing with
  the following prepare script.
- Run the script as a user with sudo access for root.
- copy of all git repos are placed in ~/prepare/git, set GIT_HOME for alternate location.
```shell
 curl https://raw.githubusercontent.com/forj-oss/redstone/master/puppet/modules/runtime_project/files/nodepool/scripts/prepare_node_docker.sh | bash -xe
```
- alternatively you can also setup dev environment manually
```shell
  git clone https://review.forj.io/forj-oss/maestro
  bash ./maestro/puppet/install_puppet.sh
  bash ./maestro/puppet/install_module.sh
  bash ./maestro/hiera/hiera.sh
  puppet module install garethr/docker --version '1.2.2'
  puppet -e "include gardener
  include compiler_tools::install::rubydev
  include compiler_tools::install::puppetlint
  include docker"
# you will also need to create nodeset images for each system under test in
# spec/acceptance/nodeset folder.
```
- Install required gems for development environment.
```shell
    gem1.9.1 install bundler --no-rdoc --no-ri
    ruby1.9.1 -S bundle install --gemfile Gemfile
```

### Run Test ###
- Setup fog file configuration as described below, use FOG_RC environment value
  to point to a valid fog file.
```shell
  ruby1.9.1 -S rake acceptance
```
- Additional beaker run options
```shell
   # don't destroy image after test
   env BEAKER_destroy=no ruby1.9.1 -S rake acceptance
```
- When you don't destroy the container, you can connect to it locally after test runs.
```shell
  #list the running containers
  docker ps
  # connect from host machine
  ssh -p $(docker ps |grep '22/tcp'|head -1|awk -F: '{print $2}'|sed 's/->.*//g') root@localhost
  # password to use is root
- Specify alternate nodeset SUT file

```shell
  bundle install
  export BEAKER_setfile=default; ruby1.9.1 -S rake acceptance
```

## Fog file configuration ##
  - The cloud.fog file by default is located in /opt/config/fog/cloud.fog.
  - This file should be secured by root, read / writable by root.  It will
    contain credentials for managing compute/network/dns resources in your
    cloud accounts for the tenants specified.  This means the instance will
    be able to create and destroy resources as needed.
  - The configuration file follows specification as required by fog. Documentation
    on this can be found here: http://fog.io/about/getting_started.html
    Read on the credentials section.
  - In addition to each section we require a section for default provider we
    will use for api connectivity.  This will help us distinguish between
    using openstack api's or other provider apis.  This section is called :
```yaml
        forj:
          provider: <name>   where name is hp|ec2|rackspace|openstack
```
  - Here is an example configuration file we use for testing.  Note that the
    access key and secret key are omitted here for security reasons.

```yaml
  default:
    hp_access_key: <your access key>
    hp_secret_key: <your security key>
    hp_auth_uri: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
    hp_tenant_id:<PHONE_NUMBER>8402
    hp_avl_zone: az-3.region-a.geo-1
    hp_account_id:
  dns:
    hp_access_key: <your access key>
    hp_secret_key: <your security key>
    hp_auth_uri: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
    hp_tenant_id:<PHONE_NUMBER>9898
    hp_avl_zone: region-a.geo-1
    hp_account_id:
  forj:
    provider: hp
```

or alternative provider for openstack also works without api keys (prefered)

If no DNS is available, comment or omit the section dns:

```yaml
  default:
    openstack_username: '<user name>'
    openstack_api_key: '<user password, not api key>'
    openstack_auth_url: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens
    openstack_region: region-a.geo-1
    openstack_tenant: '<project name>'
  dns:
    hp_access_key: '<api key>'
    hp_secret_key: '<api secret key>'
    hp_auth_uri: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
    hp_tenant_id: <project id number>
    hp_avl_zone: region-a.geo-1
  forj:
    provider: openstack
```

   In this example, we use hp cloud for providing both compute and dns management.
   The tenant / project we use are two separate projects and availability zones.

   After running gardener, you will also have access to hpcloud cli, that you
   can use to run other commands to do things such as verify account access or
   manage other resources manually.
   Notice that gardener will always use "dns:" for dns operations, and "default:"
   for compute / network operations.   You can specify different fog configuration
   files by setting the FOG_RC environment variable to different files when
   executing gardener commands.

## Debugging tips ##

- export RAKE_DEBUG=true, will enable debugger library and statement.
```shell
  env BEAKER_destroy=no RAKE_DEBUG=true ruby1.9.1 -r debug -S rake acceptance
```
- Use export FOG_DEBUG=true , this will show excon debug output ... note, passwords will show up to.
- Use export SPEC_PP_OFF=false, this will turn off the :apply flag and prevent puppet apply steps.
- When using ruby-debug on ruby1.8 + debugger statement in source,
  this enables interactive debugging on source.
  - rake debugging can be done with rdebug rake spec.
  - rspec debugging can be done with rspec -d <spec file>
  - rspec debugging when called from rake can be done by setting SPEC_OPTS='-d' export

## LICENSE ##

 (c) Copyright 2014 Hewlett-Packard Development Company, L.P.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

repository: forj-oss/puppet-gardener

repo_name: forj-oss/puppet-gardener


text:
---
layout: post
title: Prototype 42 - Race Stars
tags: portfolio
author:
- Silver-Hornet
meta: ""
---

![James Doyle’s Race Stars]({{site.url}}/race-stars.gif)

Race Stars is a game prototype (basically a mini-game this time) I built while following along with James Doyle’s [Learn To Create A Racing Game With Unity & C#](https://www.udemy.com/course/unity-racer/) course on Udemy. The core gameplay loop is:

- Drive your car around the race track
- Finish the race in 1st place to unlock the next track

Play the game in your browser [here](https://play.unity.com/mg/other/james-doyle-s-race-stars).

View my GitHub repo [here](https://github.com/silver-hornet/james-doyle-race-stars).


text:
# @mockyeah/test-server-mocha

[Mocha](https://mochajs.org) unit test setup for [mockyeah](https://github.com/mockyeah/mockyeah) server,
a powerful service mocking, recording, and playback utility.

<img src="https://raw.githubusercontent.com/mockyeah/mockyeah/master/packages/mockyeah-docs/src/images/logo/mockyeah-600.png" height="200" />

[![npm](https://img.shields.io/npm/v/@mockyeah/test-server-mocha.svg)](https://www.npmjs.com/package/@mockyeah/test-server-mocha)

More at https://mockyeah.js.org/Packages/mockyeah-test-mocha.

All you need to do is:

```js
import mockyeah from '@mockyeah/test-server-mocha';

describe('test', () => {
  it('should work', () =>
    mockyeah
      .get('/')
      .expect()
      .once()
      .run(fetch(mockyeah.server.url))
      .verify());
});
```

## License

@mockyeah/test-server-mocha is released under the [MIT License](https://opensource.org/licenses/MIT).

repository: mockyeah/mockyeah

gha_language: JavaScript

repo_name: mockyeah/mockyeah


text:
# TEST SUITE FOR JAVASCRIPT

Js-Test is a tool for Test Driven Development
[(TDD)](http://en.wikipedia.org/wiki/Test-driven_development)

In TDD, developer first creates an automated test case for the planned fix,
improvement or new feature.  Once the test case is ready, the developer runs
the test to make sure that the test case is indeed failing.  Only then will
the developer create a minimal change to the code that makes the test case
pass.  Finally, the developer refactors the code to facilitate further
changes, adds documentation and otherwise polishes the code.

TDD has several benefits over traditional software development model:

1. TDD requires developers to think in terms of small extensible units
   which in turn facilitates code re-use and can help development teams
   complete tasks faster

2. Frequent testing helps to catch bugs before they enter production systems
   which improves the overall quality of the product from users' perspective

3. Eliminating bugs early in the process helps to avoid debugging later which
   saves developers' time

## Building Test Cases In Js-Test

Test case excercises a feature from one angle and compares the result against
an expected value.  If the software is working as intended, then the computed
value will matched the expected value.  Conversely, if the test case does
not produce the same value as before, then you know that a change has caused
unintended consequences.

In Js-test, each test case consists of a unique name, test function and
expected result.  For example, a simple test case verifying that 1+1 is
still 2 might look like

    this.test ('sanity-101.0', function () {
        return 1 + 1;
    }, 2);

If a test case returns true or something convertible to true on success, then
you can leave out the expected value.  For example, the following test case
is interchangeable to test case 'sanity-101.0'.

    this.test ('sanity-102.0', function () {
        return 1 + 1 == 2;
    });

By default, test case will be considered a failure if it throws an exception.
If you wish to ensure that a feature WILL throw an exception, then catch the
exception as

    this.test ('user-22.0', function () {
        var ok = false;
        try {
            // Try to retrieve invalid user
            var user = server.getUser (-999);
        }
        catch (e) {
            if (e instanceof UserError) {
                // OK: got exception as expected
                ok = true;
            }
        }
        return ok;
    });

## Organizing Test Cases into Test Modules

Test module is a collection of test cases who excercise a feature from
multiple perspectives.  In Js-test, test modules are saved into distinct
JavaScript files.  A simple test module for class User might look like

    Test.module ('User', function () {

        // Make sure that new objects retain the user name
        this.test ('user-125.0', function () {
            var user = new User ('Teddy Tiger');
            return user.getName ();
        }, 'Teddy Tiger');

    });

For more complex tests, initialization and cleanup logic can be added as

    Test.module ('User', {

        // Called before any test cases are run
        initialize: function () {
            // Retrieve user id from server and save it to test object
            this.userid = server.createUser ('Teddy Tiger');
        },

        // Execute module test
        run: function () {
            // Load user by id and check name
            this.test ('user-125.0', function () {
                // Read user id from test object and query server
                var user = server.getUser (this.userid);
                return user.getName ();
            }, 'Teddy Tiger');
        },

        // Called after the last test case has been run
        cleanup: function () {
            // Release test user
            server.removeUser (this.userid)
        },

    });

Ideally, each test case would be independent of other test cases.  However,
in practice, the amount of initialization and cleanup logic can be greatly
reduced if you set up scenarios through series of test cases who gradually
build the environment.  For example, a test module with such interdependent
test cases might look like

    Test.module ('User', {
        initialize: function () {
            this.userid = null;
            this.user = null;
        },

        // Execute module test
        run: function () {

            // Create test user and check that we receive an id
            this.test ('user-100.0', function () {
                this.userid = server.createUser ('Teddy Tiger');
                return (this.userid > 0);
            });

            // Now that we have an id, try to load user from server
            this.test ('user-101.0', function () {
                this.user = server.getUser (this.userid);
                return this.user;
            });

            // Make sure that user name was saved properly to server
            this.test ('user-110.0', function () {
                return this.user.getName ();
            }, 'Teddy Tiger');

            // Now that user name is OK, try to change it
            this.test ('user-120.0', function () {
                return this.user.setName ('Bobby Tiger');
            });

            // Make sure that name changed in memory
            this.test ('user-130.0', function () {
                return this.user.getName ();
            }, 'Bobby Tiger');

            // Reload user and make sure that name changed on server too
            this.test ('user-140.0', function () {
                this.user = server.getUser (this.userid);
                return this.user.getName ();
            }, 'Bobby Tiger');

        },

        cleanup: function () {
            // Remove test user
            server.removeUser (this.userid)
        },
    });

Note that, due to the interdependent nature of the test cases, Js-test will
execute test cases within a module stricly in the order specified and up to
the first failure only.  That is, if the test case 'user-120.0' in the example
above fails, then test cases starting from 'user-130.0' will not be executed.

## Building Test Suites from Test Modules

Test suite is a collection of test modules who are run together.  For small
projects, a single test suite containing all the available test modules is
usually enough.

In Js-test, a test suite is saved to an HTML file.  The HTML file should load
the required JavaScript files first and then run the test modules using
Test.suite function.  For example, a simple test suite might contain:

    <body>
    <!-- Include necessary sub-modules here -->
    <script src="test.js"></script>

    <!-- Run test modules in files user.js and sanity.js -->
    <script type="text/javascript">
    Test.suite ([
        'user',
        'sanity'
    ]);
    </script>

Run a test suite by navigating to the HTML file by browser or double click the
HTML file in file explorer to open the file locally.  Once you have corrected
any errors, refresh the page to re-run the tests.  This can be done quickly by
pressing F5 or Control+R.  If you some tests fail, then check out the
JavaScript console for detailed error messages.

## Using Js-test in Your Own Projects

To use js-test in your own projects, create a directory for test modules and
copy the file `js/jest.js` to your own project.  For example, your project
might be laid out as follows:

  * `js` - You own Javascript classes and modules being tested
    - `js/user.js` - An example class
  * `tests` - Test modules
    - `tests/index.html` - Main test suite
    - `tests/user-load.js` - Test module for User.load function
    - `tests/user-save.js` - Test module for User.save function
    - `test/test.js` - Js-test source file copied from this repository

For an example, check out [Js-vector](https://github.com/tronkko/js-vector)

Js-test may be freely distributed under the MIT license.

## Using Js-Test with Rhino

Js-test can be used to test server-side JavaScript written for
[Rhino](https://developer.mozilla.org/en-US/docs/Rhino_documentation).
However, only synchronous code can be tested at the moment.

The same test modules are used for both browser and Rhino.  The test modules
in Rhino, however, are plain JavaScript.  For example, a simple test suite
`tests/all.js` might contain:

    /* Include necessary sub-modules here */
    load ('test.js');

    /* Run test modules */
    Test.suite ([
        'user',
        'sanity'
    ]);

Run the test suite from command line as:

    rhino -debug all.js

## Using Js-Test with Nodejs

Js-test can be used to test both client and server-side JavaScript written for
[Nodejs](https://nodejs.org/).  In order to use js-test, you will only need to
install promise library as

    npm install promise

The same test modules are used for both browser and Nodejs.  However, test
suites in Node.js are stored as plain JavaScript.  For example, a test
suite `tests/all.js` might contain:

    /* Include necessary sub-modules here */
    var Test = require ('test.js');

    /* Run test modules */
    Test.suite ([
        'user',
        'sanity'
    ]);

Run the test suite from command line as:

    node all.js

## Hints

When adding new modules to a test suite, consider adding new modules to the
beginning of the list.  This speeds up the edit-test-edit cycle as you can
start fixing errors on the very latest module without waiting for the older
modules to finish.  (You can move the test module to its proper position after
you are done editing.)

If a test suite takes several minutes to complete, then create additional test
suites with smaller number of test modules.  This allows you to choose which
tests to run.  For example, you might want to run a quick sub-system check
after each edit and run the complete test suite before committing changes to
version control.


text:
# Refinery - parser for complex data structures

[![Maven Central](https://img.shields.io/maven-central/v/com.koterpillar/refinery_3)](https://mvnrepository.com/artifact/com.koterpillar/refinery)

This library is a refinement of Cats' [Validated] for representing the result
of parsing some input, to add more context about where any failures
occurred.

## Problem

* Using `Either` in Scala is a way to parse complex data structures and report
  errors. However, the first failure stops the process, and users need to fix
  it to see what else is wrong. Thus, failures have to be fixed one by one.
* Cats' `Validated` can parse multiple parts of a structure in parallel,
  reporting all the errors at once. However, when building a complex structure
  (for example, using `mapN`), the errors do not point to the exact part that
  failed.
* This library offers a `ValidatedC` data type that keeps track of context -
  the logical place in the structure that is currently being parsed. This
  context is added to errors so it's easy to pinpoint the problem.

## Related libraries comparison

| Library                                 | Data parsed  | Errors reported | Error context   |
| :------                                 | :----------  | :-------------- | :------------   |
| `Either` with a `for` comprehension     | ✅ Arbitrary | ⚠  First        | ❌ None         |
| `Validated` with `mapN`                 | ✅ Arbitrary | ✅ All          | ❌ None         |
| [Circe]                                 | ⚠  JSON      | ⚠  First        | ✅ JSON path    |
| [kantan.csv]                            | ⚠  CSV       | ⚠  First        | ⚠  CSV row only |
| [scala-parser-combinators], [FastParse] | ⚠  Strings   | ⚠  First        | ✅ Position     |
| Refinery                                | ✅ Arbitrary | ✅ All          | ✅ User defined |

## Motivational example

Let's try to parse a configuration into a simple case class:

```scala
import cats.implicits._

case class Box(width: Int, height: Int, depth: Int)

val config: Map[String, String] = Map(
  "width" -> "10",
  "height" -> "oops",
)
```

The configuration is invalid (height is not an integer, and depth is missing).
How will the errors be reported?

### Either

```scala
def parseInt(value: String): Either[String, Int] =
  value.toIntOption.toRight(s"Invalid integer: $value")

def getConfig(key: String): Either[String, String] =
  config.get(key).toRight(s"No key: $key")

println(
  (
    getConfig("width").flatMap(parseInt),
    getConfig("height").flatMap(parseInt),
    getConfig("depth").flatMap(parseInt),
  ).mapN(Box.apply)
)
// => Left(Invalid integer: oops)
```

Only the first error is reported.

### Cats' Validated

```scala
def parseInt(value: String): ValidatedNec[String, Int] =
  value.toIntOption.toValidNec(s"Invalid integer: $value")

def getConfig(key: String): ValidatedNec[String, String] =
  config.get(key).toValidNec(s"No key: $key")

println(
  (
    getConfig("width").andThen(parseInt),
    getConfig("height").andThen(parseInt),
    getConfig("depth").andThen(parseInt),
  ).mapN(Box.apply)
)
// => Invalid(Chain(Invalid integer: oops, No key: depth))
```

Both invalid height and missing depth errors are reported, but the height
error lacks context.

### Refinery

```scala
import refinery._

def parseInt(value: String): ValidatedC[String, String, Int] =
  value.toIntOption.toValidatedC(s"Invalid integer: $value")

def getConfig(key: String): ValidatedC[String, String, String] =
  config.get(key).toValidatedC("Key missing").context(key)

println(
  (
    getConfig("width").andThen(parseInt),
    getConfig("height").andThen(parseInt),
    getConfig("depth").andThen(parseInt),
  ).mapN(Box.apply)
)
// => Invalid(Chain(height: Invalid integer: oops, depth: Key missing))
```

Because `getConfig` now adds context to the validated value, the "Invalid
integer" error now specifies that the bad value was `height`.

[Circe]: https://circe.github.io/circe/
[FastParse]: https://com-lihaoyi.github.io/fastparse/
[kantan.csv]: https://nrinaudo.github.io/kantan.csv/
[scala-parser-combinators]: https://github.com/scala/scala-parser-combinators
[Validated]: https://typelevel.org/cats/datatypes/validated.html

repository: koterpillar/refinery

branch_name: refs/heads/main

gha_language: Scala

repo_name: koterpillar/refinery


text:
# Rack::Api::Auth

Provide basic paths for API authentication as Rack middleware by adding POST/GET/DELETE session routes with very simple authentication mechanics

## Installation

Add this line to your application's Gemfile:

    gem 'rack-api-auth'

In a Rails application:

    config.middleware.use Rack::Session::Cookie, :key => 'rack.session', :expire_after => 2592000, :secret => 'somesecretsessionidentifier'
    config.middleware.use Rack::AuthMiddleware, :users => [{:username => "patrick", :password => "letmein", :id => 32}]

## Usage

The middleware adds a very quick, basic authentication check to your application by adding these routes:

* POST /auth/session --> create authenticated session (see Curl script in script/new_session.sh)
* GET /auth/session --> check authenticated session (see Curl script in script/check_session.sh)
* DELETE /auth/session --> logout

## Contributing

Thanks for sharing ideas and feedback!.
Feedback in form of comments/issues/pull requests is very welcome!

## Todos
* basic cleanup HTTP status codes, JSON parsing
* Use DB store for authentication lookup rather than Hash
* Add simple demo application for Rack/Sinatra/Rails
* Look into other session stores (Redis, DB, ...)
* More testing / better testing setup

## Some useful references
* http://rack.rubyforge.org/doc/Rack
* https://github.com/hassox/warden
* https://github.com/cyu/rack-cors

## License
(c) 2013, patrick mulder {mailto<EMAIL_ADDRESS>MIT license

repository: mulderp/rack-api-auth

repo_name: mulderp/rack-api-auth


text:
# Youtube search by duration

With this handy script you can filter many youtube searches and get videos of a specific length you choose (between a minimum and maximum duration) and then display the results in an HTML document.

## The Why

I wanted to do some indoor bike for a specific amount of time and watch a video of roughly that same length. I searched for a tool to do this and I couldn't find results even related to what I was looking for. Youtube's current filter of "short <4 minutes" and "long >20 minutes" was not specific enough, so it was time to go to the drawing board and create my own solution!

This will be useful if you have an activity that lasts a specific time and want to find videos of that length according to your interests.

## Requirements

- Ruby
- NPM

Run these commands:

```
gem install nokogiri
npm install
npm install -g gulp-cli
```

## Instructions

Edit `search-config.yml` to your liking, the parameters are:
- `min_time`: Minimum video duration
- `max_time`: Maximum video duration
- `keywords`: List of all the search queries for which to find videos

After you have set your preferences, run:

```
./get-links
```

And wait for the script to scrape youtube for the information. It will look like this:

[![asciicast](https://asciinema.org/a/8cs7cacqnvc1x874c5dk1c8jn.png)](https://asciinema.org/a/8cs7cacqnvc1x874c5dk1c8jn)

After it's ready, run:

```
gulp serve
```

To see the results in your browser! Which will roughly look like this:

![screenshot](http://i.imgur.com/CcYtRGh.png)

If you'd like to upload the results to your server, run `gulp build` and check the `./dist` folder

repository: DrummerHead/youtube-search-by-duration

repo_name: DrummerHead/youtube-search-by-duration


text:
---
layout: post
title: "On Correlation of Features Extracted by Deep Neural Networks"
date: 2019-01-30 15:31:35
categories: arXiv_CV
tags: arXiv_CV CNN Relation Recognition
author: Babajide O. Ayinde, Tamer Inanc, Jacek M. Zurada
mathjax: true
---

* content
{:toc}

##### Abstract
Redundancy in deep neural network (DNN) models has always been one of their most intriguing and important properties. DNNs have been shown to overparameterize, or extract a lot of redundant features. In this work, we explore the impact of size (both width and depth), activation function, and weight initialization on the susceptibility of deep neural network models to extract redundant features. To estimate the number of redundant features in each layer, all the features of a given layer are hierarchically clustered according to their relative cosine distances in feature space and a set threshold. It is shown that both network size and activation function are the two most important components that foster the tendency of DNNs to extract redundant features. The concept is illustrated using deep multilayer perceptron and convolutional neural networks on MNIST digits recognition and CIFAR-10 dataset, respectively.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1901.10900](http://arxiv.org/abs/1901.10900)

##### PDF
[http://arxiv.org/pdf/1901.10900](http://arxiv.org/pdf/1901.10900)


text:
# Linux Lab

Some scripts and notes when developing in Linux

## Environments

- System: Ubuntu 18.04.2 LTS
- Hardware
  - 32GB memory
  - Intel 8809G

- Software
  - Vim

repository: BridgeMia/Linux-Lab

repo_name: BridgeMia/Linux-Lab


text:
# Fractional Polynomial Noise

Experimental algorithm for gradient noise.

You can find the formula and a detailed explanation
[here](https://helderman.github.io/fractional-polynomial-noise/docs/index.html).

## WebGL1 implementation (April 2021)

See it in action [here](https://helderman.github.io/fractional-polynomial-noise/webgl/noise2D.html).

Please note the underlying PRNG is
[questionable](https://stackoverflow.com/q/12964279).

## WebGL2 implementation (March 2021)

A bit more eye candy here.
Go to [shadertoy.com](https://www.shadertoy.com/)
and copy/paste [this script](shadertoy/noise2D.txt) into a fresh shader.

I would love to share the shader myself on shadertoy.com,
but I'm having trouble verifying my email address there. Sorry.

## C implementation (April 2021)

Build and run [noise2D.c](c/noise2D.c),
redirecting its output to a file with extension .pgm.
Open the file with an application that accepts
[raw PGM format](https://en.wikipedia.org/wiki/Netpbm#File_formats),
for example [GIMP](https://en.wikipedia.org/wiki/GIMP).

repository: xzfc/fractional-polynomial-noise

repo_name: xzfc/fractional-polynomial-noise


text:
---
title: Duration conversion
description: Converting durations into different units, for example hours.
order: 70
---
You can display a duration broken down into days, hours, minutes, seconds or milliseconds. If the duration can't be completely
expressed in the chosen unit then the remaining milliseconds are also formatted. The valid units are

 - `d` days
 - `h` hours
 - `m` minutes
 - `s` seconds
 - `ms` milliseconds

````
# How many seconds in 14 hours?
14h as s

# How many minutes between two dates?
(2017-08-17T17:00:03+00:00 - 2017-08-15 17:28:34 +0000) as m

# As days?
(2017-08-17T17:00:03+00:00 - 2017-08-15 17:28:34 +0000) as d
````

repository: AlexMoffat/timecalc

gha_language: Swift

repo_name: AlexMoffat/timecalc


text:
---
title: Progress ⏳
date: 2020-06-05
description: Command line progress indicators for MATLAB
---

Progress is a small MATLAB package for displaying textual progress indicators in loops for MATLAB.

![](https://raw.githubusercontent.com/justinpinkney/progress/master/progress_bar.gif)

[Get the code on GitHub](https://github.com/justinpinkney/progress)


text:
# EntityFrameworkCore.DbContextBackedMock.Moq
__*The EntityFrameworkCore FromSql, ExecuteSqlCommand and DbQuery<> mocking library*__

# This repo has moved to [EntityFrameworkCore.Testing](https://github.com/rgvlee/EntityFrameworkCore.Testing)

EntityFrameworkCore.DbContextBackedMock.Moq allows you to create a mock DbContext and have it backed by an actual DbContext.

But why? There's a couple of reasons and it's from my own experience using the [Microsoft in-memory provider](https://docs.microsoft.com/en-us/ef/core/miscellaneous/testing/in-memory) in unit tests.

The in-memory provider is __great__ for most cases however it doesn't do everything. If you're invoking FromSql, ExecuteSqlCommand or using views you're out of luck. It just doesn't work and nor could it, while EntityFrameworkCore can work with them they are not an EntityFrameworkCore concern. They are a data source concern.

So the issue is simple. I want to use the in-memory provider for most things and then mock the couple of bits it can't do. Unfortunately the only way to do this (without modifying the test subject/s) is to mock the DbContext.

And that's just what this library does. The mocks will funnel the majority of the operations to the actual DbContext. For everything else, use a mock. Mocking views and the FromSql and ExecuteSqlCommand methods is easy using the provided builder. As a bonus you get all the benefits of using a mocking framework (e.g., the ability to verify method invocation). __You can have your cake and eat it too!__

## Resources
- [Source repository](https://github.com/rgvlee/EntityFrameworkCore.DbContextBackedMock.Moq)
- [NuGet](https://www.nuget.org/packages/EntityFrameworkCore.DbContextBackedMock.Moq/)

## The disclaimer
The library sets up a lot of the DbContext functionality but I am not going to claim it does everything. I have built this based on my current needs. If you find this library useful and something is missing, not working as you'd expect or you need additional behaviour mocked flick me a message and I'll see what I can do.

## Fluent interface
The builder provides a fluent interface for building the mocks so it should be intuitive and discoverable. The examples below touch on a bit of the available functionality.

## Example Usage
- Create the builder
- Get the db context mock
- Consume

In this example the builder automatically creates an in-memory context and sets up the mock set ups for all of the DbContext DbSets. Operations on the mock DbContext are funneled through to the in memory DbContext. You can add/update/remove on either and both will yield the same result.

__Note: automatic DbContext creation requires a DbContext constructor with a single DbContextOptions parameter__.

```
[Test]
public void Add_NewEntity_Persists() {
    var builder = new DbContextMockBuilder<TestContext>();
    var mockContext = builder.GetDbContextMock();
    var mockedContext = builder.GetMockedDbContext();
    var testEntity1 = new TestEntity1();

    mockedContext.Set<TestEntity1>().Add(testEntity1);
    mockedContext.SaveChanges();

    Assert.Multiple(() => {
        Assert.AreNotEqual(default(Guid), testEntity1.Id);
        Assert.DoesNotThrow(() => mockedContext.Set<TestEntity1>().Single());
        Assert.AreEqual(testEntity1, mockedContext.Find<TestEntity1>(testEntity1.Id));
        mockContext.Verify(m => m.SaveChanges(), Times.Once);
    });
}
```
Or if you want to provide your own DbContext and only set up a specified DbSet:
- Create the context to mock
- Create the builder providing the constructor parameters:
	- The context to mock you've just created
	- addSetUpForAllDbSets = false
- Set up the DbSet you want to mock
- Consume

The mock set up covers both the Set<TEntity> and DbContext DbSet<TEntity> property:

```
[Test]
public void AddWithSpecifiedDbContextAndDbSetSetUp_NewEntity_PersistsToBothDbSetAndDbContextDbSetProperty() {
    var contextToMock = new TestContext(new DbContextOptionsBuilder<TestContext>().UseInMemoryDatabase(Guid.NewGuid().ToString()).Options);
    var builder = new DbContextMockBuilder<TestContext>(contextToMock, false);
    builder.AddSetUpFor(x => x.TestEntities);
    var mockedContext = builder.GetMockedDbContext();

    mockedContext.Set<TestEntity1>().Add(new TestEntity1());
    mockedContext.SaveChanges();

    Assert.Multiple(() => {
        Assert.DoesNotThrow(() => mockedContext.Set<TestEntity1>().Single());
        CollectionAssert.AreEquivalent(mockedContext.Set<TestEntity1>().ToList(), mockedContext.TestEntities.ToList());
    });
}
```

### Testing FromSql
The main difference here is that we need the seed data to set up FromSql to return the expected result.
- Generate seed data
- Create the builder
- Set up the FromSql result
- Get the db context mock
- Consume

In this case we didn't need to persist the seed data, whether you do or not will depend what you're doing with the FromSql result.
```
[Test]
public void SetUpFromSql_AnyStoredProcedureWithNoParameters_ReturnsExpectedResult() {
    var expectedResult = new List<TestEntity1> { new TestEntity1() };

    var builder = new DbContextMockBuilder<TestContext>();
    builder.AddFromSqlResultFor(x => x.TestEntities, expectedResult);
    var mockedContext = builder.GetMockedDbContext();

    var actualResult = mockedContext.Set<TestEntity1>().FromSql("sp_NoParams").ToList();

    Assert.Multiple(() => {
        Assert.IsNotNull(actualResult);
        Assert.IsTrue(actualResult.Any());
        CollectionAssert.AreEquivalent(expectedResult, actualResult);
    });
}
```

### Testing FromSql with SqlParameters
Expanding on the previous example, for this test we specify:
- The FromSql sql that we want to match;
- A sequence of FromSql SqlParameters

The mock FromSql __sql__ set up matching is case insensitive and supports partial matches; in the example we're able to match on just the stored procedure name. The mock FromSql __SqlParameters__ matching is case insensitive and supports partial sequence matching however it does not support partial matches on the parameter name/value. You only need to specify the bare minimum for a mock set up match.
```
[Test]
public void SetUpFromSql_SpecifiedStoredProcedureAndParameters_ReturnsExpectedResult() {
    var sqlParameters = new List<SqlParameter>() {new SqlParameter("@SomeParameter2", "Value2")};
    var expectedResult = new List<TestEntity1> {new TestEntity1()};

    var builder = new DbContextMockBuilder<TestContext>();
    builder.AddFromSqlResultFor(x => x.TestEntities, "sp_Specified", sqlParameters, expectedResult);
    var mockedContext = builder.GetMockedDbContext();

    var actualResult = mockedContext.Set<TestEntity1>().FromSql("[dbo].[sp_Specified] @SomeParameter1 @SomeParameter2", new SqlParameter("@someparameter2", "Value2")).ToList();

    Assert.Multiple(() => {
        Assert.IsNotNull(actualResult);
        Assert.IsTrue(actualResult.Any());
        CollectionAssert.AreEquivalent(expectedResult, actualResult);
    });
}
```

### Roll your own query provider mock
You can always create your own mock query provider; below is functionally the same as the test from the previous section.
```
[Test]
public void SetUpFromSql_MockQueryProviderWithSpecifiedStoredProcedureAndParameters_ReturnsExpectedResult() {
    var expectedResult = new List<TestEntity1> { new TestEntity1() };

    var mockQueryProvider = new Mock<IQueryProvider>();
    var sqlParameter = new SqlParameter("@SomeParameter2", "Value2");
    mockQueryProvider.SetUpFromSql("sp_Specified", new List<SqlParameter> { sqlParameter }, expectedResult);

    var builder = new DbContextMockBuilder<TestContext>();
    builder.AddQueryProviderMockFor(x => x.TestEntities, mockQueryProvider);
    var mockedContext = builder.GetMockedDbContext();

    var actualResult = mockedContext.Set<TestEntity1>().FromSql("[dbo].[sp_Specified] @SomeParameter1 @SomeParameter2", new SqlParameter("@someparameter2", "Value2")).ToList();

    Assert.Multiple(() => {
        Assert.IsNotNull(actualResult);
        Assert.IsTrue(actualResult.Any());
        CollectionAssert.AreEquivalent(expectedResult, actualResult);
    });
}
```

### What about Queries?
Haven't forgotten about them. Queries can't really be set up automatically as to be useful you need to seed them. Not a big hassle though, set up is easy.
```
[Test]
public void SetUpQuery_ReturnsEnumeration() {
    var list1 = new List<TestEntity2>() { new TestEntity2(), new TestEntity2() };

    var builder = new DbContextMockBuilder<TestContext>();
    builder.AddSetUpFor(x => x.TestView, list1);
    var mockedContext = builder.GetMockedDbContext();

    Assert.Multiple(() => {
        CollectionAssert.AreEquivalent(list1, mockedContext.Query<TestEntity2>().ToList());
        CollectionAssert.AreEquivalent(mockedContext.Query<TestEntity2>().ToList(), mockedContext.TestView.ToList());
    });
}
```
The FromSql mocking works the same as with the sets.
```
[Test]
public void FromSql_SpecifiedStoredProcedureWithParameters_ReturnsExpectedResult() {
    var list1 = new List<TestEntity2> { new TestEntity2() };

    var builder = new DbContextMockBuilder<TestContext>();

    var mockQueryProvider = new Mock<IQueryProvider>();
    var sqlParameter = new SqlParameter("@SomeParameter2", "Value2");
    mockQueryProvider.SetUpFromSql("sp_Specified", new List<SqlParameter> { sqlParameter }, list1);
    builder.AddSetUpFor(x => x.TestView, list1).AddQueryProviderMockFor(x => x.TestView, mockQueryProvider);

    var context = builder.GetMockedDbContext();

    var result = context.Query<TestEntity2>().FromSql("[dbo].[sp_Specified] @SomeParameter1 @SomeParameter2", new SqlParameter("@someparameter2", "Value2")).ToList();

    Assert.Multiple(() => {
        Assert.IsNotNull(result);
        Assert.IsTrue(result.Any());
        CollectionAssert.AreEquivalent(list1, result);
    });
}
```

### Let's not forget ExecuteSqlCommand
Very similar to FromSql with the main difference being the return type.

Specified command text returning an expected result:
```
[Test]
public void Execute_SetUpSpecifiedQuery_ReturnsExpectedResult() {
    var builder = new DbContextMockBuilder<TestContext>();

    var commandText = "sp_NoParams";
    var expectedResult = 1;

    builder.AddExecuteSqlCommandResult(commandText, new List<SqlParameter>(), expectedResult);

    var mockedContext = builder.GetMockedDbContext();

    var result = mockedContext.Database.ExecuteSqlCommand("sp_NoParams");

    Assert.AreEqual(expectedResult, result);
}
```
Specified command text and sql parameters returning an expected result:
```
[Test]
public void Execute_SetUpSpecifiedQueryWithSqlParameters_ReturnsExpectedResult() {
    var builder = new DbContextMockBuilder<TestContext>();

    var commandText = "sp_WithParams";
    var sqlParameters = new List<SqlParameter>() {new SqlParameter("@SomeParameter2", "Value2")};
    var expectedResult = 1;

    builder.AddExecuteSqlCommandResult(commandText, sqlParameters, expectedResult);

    var mockedContext = builder.GetMockedDbContext();

    var result = mockedContext.Database.ExecuteSqlCommand("[dbo.[sp_WithParams] @SomeParameter2", sqlParameters);

    Assert.AreEqual(expectedResult, result);
}
```
Both ExecuteSqlCommand and ExecuteSqlCommandAsync are set up when AddExecuteSqlCommandResult is invoked.

## Advanced usage
If you want to get your hands dirty I've provided a few methods on the builder for you to use your own DbSet<>, DbQuery and IQueryProvider mocks. The extensions that I use to create these mocks are also available to get you going.


text:
# Neural Message Passing for Multi-Relational Ordered and Recursive Hypergraphs

```
@incollection{gmpnnr_neurips20,
author = {Yadati, Naganand},
title = {Neural Message Passing for Multi-Relational Ordered and Recursive Hypergraphs},
booktitle = {Advances in Neural Information Processing Systems (NeurIPS) 33},
pages = {3275--3289},
year = {2020},
publisher = {Curran Associates, Inc.}
}
```

links
- [neurips](https://papers.nips.cc//paper/2020/hash/217eedd1ba8c592db97d0dbe54c7adfc-Abstract.html)

gha_language: Jupyter Notebook


text:
# The Azure Kubernetes Workshop (micro version)

Selected tasks from [The Azure Kubernetes Workshop](https://aksworkshop.io/)

# TOC

* [Building the Future 2020 LAB proctors](#building-the-future-2020-lab-proctors)
* [Description](#description)
* [Tasks](#tasks)
* [Recommended next steps](#recommended-next-steps)

# Building the Future 2020 LAB proctors

* [Ricardo Fiel](https://github.com/shoegazerpt) (Senior Cloud Solution Architect, Microsoft)
* [Henrique Graca](https://github.com/hjgraca) (Azure FastTrack Engineer, Microsoft)
* [Virgilio Esteves](https://www.linkedin.com/in/virgilioesteves/) (Microsoft Azure MVP and Architect at Sevenworld Technologies)

# Tasks

## Access the lab environment

Your proctors should present you a link to the environment.

## Access your cloud shell

Follow instructions in [../cloudshell.md](../cloudshell.md) to activate a cloud-based bash shell.

## Provision requirements

**In your cloud shell**, copy the Application/Client Id and Application Secret Key provided in your lab guide to environment variables as below:

```
appId=(paste from lab guide)
appSecret=(paste from lab guide)
```

Verify values are correct by typing:

```
echo $appId $appSecret
```

To provision the AKS cluster, run the following:

```
curl -s  https://raw.githubusercontent.com/shoegazerpt/btf-2020-labs/master/kubernetes/deploy.sh | bash -s $appId $appSecret
```

**NOTE:** This deploys to the first resource group in your subscription. To specify another resource group and location, pass it as parameters to command above. Eg: `bash -s <resource_group> <location>`

It may take up to 15 minutes to get the resources deployed and publicly available.

Take this time to continue reading the lab materials and get familiar with it.

## Overview

You will be deploying a customer-facing order placement and fulfillment application that is containerized and is architected for a microservice implementation.

![](2020-01-11-20-12-35.png)

The application consists of 3 components:

* A public facing Order Capture swagger enabled API
* A public facing frontend
* A MongoDB database

## Lab Steps

Start at [AKS Workshop - 2.2 Deploy MongoDB](https://aksworkshop.io/#db) and complete as many tasks as possible from "Getting Started".

# Recommended next steps

[The Azure Kubernetes Workshop](https://aksworkshop.io/)


text:
# nodemailer-ejs

send mail with nodemailer with ejs templete

## Instructions

1. Clone the repo: `https://github.com/viru56/nodemailer-ejs.git`
2. Install packages: `npm install`
3. Add your email username and password in auth
4. Start the server: `node index.js`
5. check your recepient mail.


text:
---
title: Training Resources
author: Murray Cadzow
date: '2020-09-14'
slug: training-resources
categories: ["howto"]
tags: ["howto", "tutorials","workshops","reference"]
weight: 0
enableToc: yes
tocLevels:
  - h2
  - h3
  - h4
---

Current training resources for the lab

# Novice/Intro:

## The Carpentries

### [Software Capentry](http://software-carpentry.org/lessons/)
- [Shell](http://swcarpentry.github.io/shell-novice/)
- [R](http://swcarpentry.github.io/r-novice-inflammation/)
- [Git/Github](http://swcarpentry.github.io/git-novice/)
- [SQL](http://swcarpentry.github.io/sql-novice-survey/)

### [Data Carpentry](http://datacarpentry.org/lessons/)
- [Data analysis and visualisation in R](http://www.datacarpentry.org/R-ecology-lesson/)
- [Best practice spreadsheets for use later in R](http://www.datacarpentry.org/spreadsheet-ecology-lesson/)

## Custom made

[Merriman Lab R tutorial](https://github.com/murraycadzow/R_tutorials)
- [Intro lesson](https://github.com/murraycadzow/R_tutorials/blob/master/Intro_R.Rmd)
- [Stats lesson](https://github.com/murraycadzow/R_tutorials/blob/master/Rcourse_Session2.Rmd)
- [Programming lesson](https://github.com/murraycadzow/R_tutorials/blob/master/R_functions_and_loops.Rmd)
- [ggplot2 lesson](https://github.com/murraycadzow/R_tutorials/blob/master/ggplot2_tutorial.Rmd)

# Additional:

## R
- [dplyr](https://github.com/mikblacklab/resbaz_lessons/tree/master/R_Data_Manipulation)
- [ggplot2](https://github.com/mikblacklab/resbaz_lessons/tree/master/R_Plotting)
- [RMySQL](https://github.com/mikblacklab/syska/tree/master/RMySQL)
- [Rmarkdown](http://rmarkdown.rstudio.com/)


text:
---
hrs_structure:
  division: '3'
  volume: '12'
  title: '28'
  chapter: '516'
  section: 516-125
type: hrs_section
tags:
  - Property
  - Family
menu:
  hrs:
    identifier: HRS_0516-0125
    parent: HRS0516
    name: 516-125 Acquisition loan programs; evidence of eligible loan
weight: 37335
title: Acquisition loan programs; evidence of eligible loan
full_title: 516-125 Acquisition loan programs; evidence of eligible loan
---
**§516-125 Acquisition loan programs; evidence of eligible loan.** (a) Each mortgage lender who participates in any acquisition loan program shall submit evidence, as deemed satisfactory by the corporation, that eligible loans have been made from the proceeds of the revenue bonds.

(b) The corporation may inspect the books and records of the mortgage lenders as may be necessary for this section. [L 1983, c 270, pt of §1; am L 1987, c 337, §16; am L 1988, c 104, §2; am L 2005, c 196, §26(b); am L 2006, c 180, §16]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# easydb-custom-data-type-geonames
Custom Data Type "GEONAMES" for easydb

This is a plugin for [easyDB 5](http://5.easydb.de/) with Custom Data Type `CustomDataTypeGeonames` for references to entities of the [GeoNames geographical database)](<http://www.geonames.org/>).

The Plugins uses <http://ws.gbv.de/suggest/geonames/> for the autocomplete-suggestions and [GeoNames database](<http://www.geonames.org/export/JSON-webservices.html>) for additional informations about GeoNames entities.

## configuration

In `CustomDataTypeGeonames.config.yml` you can configure:

* `schema-options`: which [featureclasses] (<http://www.geonames.org/source-code/javadoc/org/geonames/FeatureClass.html>)  are offered for search. If a Mapquest-Developer-Key is added, the Plugin shows GeoNames-Entries in a static map.

* `mask-options`: whether additional informationen is loaded if the mouse hovers a suggestion in the search result. The results are ordered and categorized by featurecode

## sources

The source code of this plugin is managed in a git repository at <https://github.com/programmfabrik/easydb-custom-data-type-geonames>. Please use [the issue tracker](https://github.com/programmfabrik/easydb-custom-data-type-geonames/issues) for bug reports and feature requests!


text:
# Building

Dependencies:
* [SDL2](https://www.libsdl.org/) libraries. On macos, `brew install sdl2 sdl2_ttf sdl2_gfx`
* [Eclipse Paho C Library](https://www.eclipse.org/paho/). See below how to build it.
* CMake

## Example - Linux build
This directory contains `Dockerfile`s that build `deskmate-sdl2`:
- `Dockerfile` - Linux Alpine build
- `Dockerfile.ubuntu` - Ubuntu build

## Step 1. Build paho.mqtt.c
```
$ git submodule update --init --recursive
$ cd third-party/paho.mqtt.c
$ mkdir build
$ cd build
$ cmake -GNinja -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_SAMPLES=TRUE ..
$ ninja
```

For `macos`, you might need to point cmake to the correct OpenSSL instalation:
```
$ cmake -GNinja -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_SAMPLES=TRUE<EMAIL_ADDRESS>..
```

## Step 2. Configure it
Copy `src/credentials_example.h` into `src/credentials.h` and edit it. It contains MQTT credentials and sensors/switches specifications.

## Step 3. Build `deskmate-sdl2`

```
$ mkdir build
$ cd build
$ cmake ..
$ make
```

## Step 4. Run it!
```
$ ./deskmate-sdl2
```

# License
The `deskmate-sdl2` is distributed under the MIT license (see `LICENSE` in the root directory of this repo).

Files in the `cmake/` directory are distrubited under the BSD 3-Clause License and were obtained from [github.com/aminosbh/sdl2-cmake-modules](https://github.com/aminosbh/sdl2-cmake-modules).

repository: ezhangle/deskmate

repo_name: ezhangle/deskmate


text:
# Affiliate Marketing Template
 A marketing template made with HTML, CSS, and SASS.

## About
 Affiliate marketing is a type of performance-based marketing in which a business rewards one or more affiliates for each visitor or customer brought by the affiliate's own marketing efforts.  Gaining the trust of your audience has shown to make this practice a lot more profitable. This template is in the style of a review and reccomendation site. You will guide your audience to a product that you enjoy, rather then just sell useless items. Your reccomednations will power the audience to trust that those products are great! (which will make you money)

## Live Demo of Site
### Modern Version:
![](
        https://github.com/BradFabian/marketing-template/blob/master/public/images/websitetour.gif
      )
### Retro Version:
![](
    https://github.com/BradFabian/marketing-template/blob/master/public/images/Retrowebsitetour.gif
    )

## What can you use this for?
* Great for movie trailers and providing the links for dvd purchases or movie tickets!
* Fantastic for your youtube videos reviewing tech and providing links to purchase.
* Outstanding for college kids looking to review college text and make a lil money back!!
* Enjoy collecting Funkos?? Throw them pics up provide the links and make money!!!
## Landing Page

[Follow this to landing page ](https://bradfabian.github.io/marketing-template/)

## Edit Site for Your Needs

1. Download the files on the landing page.
2. Find either the ModernTemplate or RetroTemplate folder
3. Read the  comments in index html files to learn how to change all content to your specific need.
4. Go to Public Folder locate the Sass folder and read the comments in each scss file to see how to edit stylings for texts, images or videos, and affiliate links.
5. This template is very customizable, go nuts and enjoy!

repository: BradFabian/marketing-template

repo_name: BradFabian/marketing-template


text:
[![PyPI version](https://badge.fury.io/py/jupyter_dashboards_bundlers.svg)](https://badge.fury.io/py/jupyter_dashboards_bundlers) [![Google Group](https://img.shields.io/badge/-Google%20Group-lightgrey.svg)](https://groups.google.com/forum/#!forum/jupyter)

# Jupyter Dashboards Bundlers

Collection of reference implementation bundlers that convert, package, and deploy notebooks as standalone dashboards.

## What It Gives You

* *File → Deploy as → Local dashboard* menu item to deploy the current notebook as a dashboard within the same Jupyter Notebook server instance.
* *File → Download as → PHP Dashboard bundle (.zip)* menu item to download the current notebook as a PHP dashboard web frontend that you can deploy and configure to use your own kernel provider (e.g., tmpnb + kernel gateway).

## Prerequisites

* Jupyter Notebook 4.0.x running on Python 3.x or Python 2.7.x
* `jupyter_cms>=0.3.0`
* `jupyter_dashboards>=0.3.0`
* Edge, Chrome, Firefox, or Safari

## Install It

`pip install jupyter_dashboards_bundlers`

## Use It

Currently, there are two bundlers available in this package. The first converts your notebook to a dashboard web application and deploys it to your Jupyter Notebook server for local use. To use it:

1. Write a notebook.
2. Define a dashboard layout using the `jupyter_dashboards` extension.
3. Click *File → Deploy as → Local Dashboard*.
4. Enjoy your dashboard after the redirect.

The second converts your notebook to a dashboard web application and zips it up with a Dockerfile and Cloud Foundry manifest. To use it:

1. Write a notebook.
2. Define a dashboard layout using the `jupyter_dashboards` extension.
3. Click *File → Download as → PHP Dashboard bundle (.zip)*.
4. Unzip the download.
5. Refer to the `README.md` in the unzipped folder for deployment requirements.

## Caveats

See https://github.com/jupyter-incubator/dashboards#deploy for a full rundown on the current status of dashboard deployment.

It is important to realize that kernels launched by your deployed dashboard will not being running in the same directory or possibly even the same environment as your original notebook. You must refer to external, kernel-side resources in a portable manner (e.g., put it in an external data store, use absolute file paths if your only concern is *File → Deploy as → Local Dashboard*). You must also ensure your kernel environment has all the same libraries installed as your notebook authoring environment.

It is also your responsibility to associate any frontend, dashboard-side assets with your notebook before packaging it for deployment. To aid in this task, the bundlers here take advatnage of the notebook association feature provided by the `jupyter_cms` package. See the [associations demo](https://github.com/jupyter-incubator/contentmanagement/) for the markup you can use to refer to external files that should be included in your dashboard deployment.

If you are using [declarative widgets](https://github.com/jupyter-incubator/declarativewidgets) in your dashboard, you should be mindful of the following when you deploy your dashboard.

 This action ensures all external Polymer components are properly installed on the notebook server and can be bundled with your converted notebook.
* You cannot use `<urth-core-import>` elements in custom Polymer widgets that you develop outside your notebook. See [dashboards issue #78](https://github.com/jupyter-incubator/dashboards/issues/78) for the discussion and current workaround.


text:
# Welcome to The Diabetic way
For full Website content visit [The Diabetic Way](https://www.thediabeticway.co.uk/index.php/en/).

## Fork and Deploy cgm remote monitory Part 4

1. Hopfully you should now have 3 pages opened in your browser: **Heroku, Atlas, and Github,** Make sure you are logged-in on each one (i.e. important) before you continue.

2.  Click Here or goto https://github.com/nightscout/cgm-remote-monitor, to open a new GitHub page. Click the on **Fork** icon in the top right

3. Wait for a moment

3. Scroll down the page and click **Deploy to Heroku**

4. Enter in your Heroku account a site name: invent a name you would like to use or see your BG in on the internet. Confirm that the name is available.

5.  Don’t change the region.

6. **Scroll down** and setup the following variables: You can come back to these later later by going to settings and config Var!

Note!

The API_SECRET is the main password allowing full access to your Nightscout site. Make sure its secure (mix uppercase and lowercase letters, plus digits) and do no not share it publicly. If you think you exposed it by mistake, it is recommended that you change it.

 If you don’t have Automatic Deploys on yet, or aren’t sure, run through these steps below!

7. **API_SECRET** will be your Nightscout site password, it needs to be at least 12 characters long and **you should NOT use spaces if you use @ or ! symbolyou should NOT use spaces if you use @ or ! symbols** remember you will probably need to express them using Percent encoding in your uploader and downloader apps. If you're not sure on how to do this, it is recommended to use only letters (uppercase + lowercase) and digits.

8. If you **want to link your Dexcom Share account** as a data source, complete the following lines:

Warning!  Common Errors

MOST COMMON ERRORS

The BRIDGE_PASSWORD and BRIDGE_USER_NAME are NOT visible from within your Dexcom app or online account. These values are what you entered into your Dexcom mobile app when you logged into that app for the VERY FIRST time. The BRIDGE_USER_NAME is not an email address. The most common error on initial Nightscout setups is that people incorrectly use an old account or an old password. To test your username and password, go to Dexcom's Clarity page (check here See Here for USA accounts and  Here here for the others) and try logging in to your Dexcom account. If your account info isn't valid, or you don't see any data in your Clarity account... you need to figure out your actual credentials before moving ahead.

9. If you want to link your **Care Link account** as a data source (currently not functional with Heroku), complete the following lines:

10. Select the units you’re using in **DISPLAY_UNITS** the acceptable choices are **mg/dl or mmol/L** (or just **mmol** when entering it).

In **my case I used mmol**
11. In **ENABLE,** copy and paste the following Plugins below **(separated by a space)** so that won't have to think about which you want now

| **Plugins**       |    |
| :------------- | |
|  careportal basal dbsize rawbg iob maker cob bwp cage iage sage boluscalc pushover treatmentnotify loop pump profile food openaps bage alexa override speech cors |

| **Plugins**       |    |
| :------------- | |
|  careportal basal dbsize rawbg iob maker cob bwp cage iage sage boluscalc pushover treatmentnotify loop pump profile food openaps bage alexa override speech cors |

Enable Words

You find more information about the ENABLE on the: Nightscout Plugin Page <a href="http://<IP_ADDRESS>:8000/user-guide/Nightscout_Plugins/" target="_blank" title="Nightscout Plugin link">Here

11. Now you need the connection string you defined during the Atlas cluster creation (as the example below, but not the string below). Copy and paste it in the MONGODB_URI variable field.

12. I will give you an example about this below:

   1. The 1st is your Atlas Account you gave yourself a User Name

   2. Then you made a Database Password

   3.        # Other markdown pages, images and other files.

adding 	Yellow Hightligher!!!!!!!!
**Marked text**

Adding a image

Adding Video

Note
**Note:** a note is something that needs to be mentioned but is apart from the context.

List
This is a regular paragraph.

Paragraph:

1. **Now Open another tab**  to make a Mongodb Atlas** Account: See Here
  and **click** Start Free

   2. Sub item two
   3. Sub item three
2. Item two

font size

Table
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |

-->

license: Unlicense

repository: Atlas-Night-Out/Cyb-Netics-Docs

repo_name: Atlas-Night-Out/Cyb-Netics-Docs


text:
# Operators & Symbols

This section contains all of the syntactic operators that are available within Hash

## General operators 🚧

Here are the general operators for arithmetic, bitwise assignment operators. This table does not include
all of the possible operators specified within the grammar. There are more operators that are related to
a specific group of operations or are used to convey meaning within the language.

| Operator             | Example              | Description                   | Overloadable trait |
|----------------------|----------------------|-------------------------------|--------------------|
| `->`                 | N/A                  | `Reserved`                    | N/A                |
| `=>`                 | `(a) => a + 2`       | Function notation             | N/A                |
| `==`, `!=`           | `a == 2`, `b != 'a'` | Equality                      | `eq`               |
| `=`                  | `a = 2`              | Assignment                    | N/A                |
| `!`                  | `!a`                 | Logical not                   | `not`              |
| `&&`                 | `a && b`            | Logical and                   | `and`              |
| ||               | a  || b           | Logical or                    | `or`               |
| `+`                  | `2 + 2`, `3 + b`     | Addition                      | `add`              |
| `-`                  | `3 - a`        | Subtraction | `sub`       |
| `-`                  | `-2`        | Negation | `neg`       |
| `*`                  | `3 * 2`, `2 * c`     | Multiplication                | `mul`              |
| `^^`                 | `3 ^^ 2`, `3 ^^ 2.3` | Exponentiation                | `exp`              |
| `/`                  | `4 / 2`, `a / b`     | Division                      | `div`              |
| `%`                  | `a % 1`              | Modulo                        | `mod`              |
| `<<`                 | `4 << 1`             | Bitwise left shift            | `shl`              |
| `>>`                 | `8 >> 1`             | Bitwise right shift           | `shr`              |
| `&`                  | `5 & 4`, `a & 2`     | Bitwise and                   | `andb`             |
| |                 | a  | 2             | Bitwise or                    | `orb`              |
| `^`                  | `3 ^ 2`              | Bitwise exclusive or          | `xorb`             |
| `~`                  | `~2`                 | Bitwise not                   | `notb`             |
| `>=`, `<=`, `<`, `>` | `2 < b`, `c >= 3`    | Order comparison              | `ord`              |
| `+=`                 | `x += y`             | Add with assignment           | `add_eq`              |
| `-=`                 | `x -= 1`             | Subtract with assignment      | `sub_eq`              |
| `*=`                 | `b *= 10`            | Multiply with assignment      | `mul_eq`              |
| `/=`                 | `b /= 2`             | Divide with assignment        | `div_eq`              |
| `%=`                 | `a %= 3`             | Modulo with assignment        | `mod_eq`              |
| `&&=`                | `b &&= c`            | Logical and with assignment   | `and_eq`              |
| `>>=`                | `b >>= 3`            | Bitwise right shift equality  | `shr_eq`              |
| `<<=`                | `b <<= 1`            | Bitwise left shift equality   | `shl_eq`              |
| ||=              | b ||= c          | Logical or with assignment    | `or_eq`               |
| `&=`                 | `a &= b`             | Bitwise and with assignment   | `andb`             |
| |=                | b  |= SOME_CONST   | Bitwise or with assignment    | `orb`              |
| `^=`                 | `a ^= 1`             | Bitwise xor with assignment   | `xorb`             |
| `.`  	| `a.foo`, `item.id` 	| Struct/Tuple enum property accessor 	| N/A 	|
| `:`  	| `{2: 'a'}`         	| Map key-value separator             	| N/A 	|
| `::` 	| `io::open()`       	| Namespace symbol access             	| N/A 	|
| `as` 	| `t as str`         	| Type assertion                      	| N/A 	|
| `@` 	| N/A              	| Pattern value binding   	| N/A 	|
| `...` 	| N/A                	| Spread operator (Not-implemented)   	| `range`? 	|
| `;` 	| `expression;`              	| statement terminator   	| N/A 	|
| `?` 	| `let k<T> where s<T, ?> = ...`              	| Type argument wildcard   	| N/A 	|

## Comments 🚧

This table represents the syntax for different types of comments in Hash:

| Symbol    | Description                 |
|-----------|-----------------------------|
| `//...`   | Line comment                |
| `/*...*/` | Block comment               |
| `///`     | function doc comment    🚧  |
| `//!`     | module doc comment      🚧  |


text:
---
uid: crmscript_ref_NSAppointmentEntity_SetAssignedBy
title: SetAssignedBy(NSAssociate assignedBy)
intellisense: NSAppointmentEntity.SetAssignedBy
keywords: NSAppointmentEntity, GetAssignedBy
so.topic: reference
---

# SetAssignedBy(NSAssociate assignedBy)

Who assigned this appointment to this user? Whose diary did the appointment come from?

**Parameter:**
 - **assignedBy** NSAssociate

```crmscript
NSAppointmentEntity thing;
NSAssociate assignedBy;
thing.SetAssignedBy(assignedBy);
```

repository: stianol/crmscript

repo_name: stianol/crmscript


text:
# Zoom API

Python wrapper around the [Zoom.us](http://zoom.us) REST API v2. Source code available at https://github.com/Git-Good-Team/zoomapi.

This work is based on [Zoomus](https://github.com/actmd/zoomus) and [zoomapi](https://github.com/crista/zoomapi).

## Bot Commands

Execute botm1.py to get started. Available commands are:

### stop

Exits program

### create channel

Creates a channel. User needs to provide a channel name and what type of channel is to be created.

### lists channels

Lists all channels the user is part of.

### get channel

Retrives channel information. User must provide channel id.

### list channel members

List all members that belong to a specific channel. User must provide channel id.

### delete channel

Deletes a specific channel. User must provide channel id.

### update channel

Updates a specific channel. User must provide channel id.

### join channel

Joins a specific channel. User must provide channel id.

### invite channel members

Invites Zoom users to a specific channel. User must provide channel id and a list of user emails.

### remove channel member

Removes users to a specific channel. User must provide channel id and a member id.

### leave channel

Active user leaves a channel that he belongs to. User must provide channel id.

### list messages

User lists all messages from a specific user that were sent in private messages or in a channel. User must provide user id, channel id or contact email.

### send message

Sends a message to a contact or channel. User must provide the message to be sent and channel id or contact email.

### update message

Updates an existing message. User must provide message id and contact email or channel id.

### delete message

Deletes an existing message. User must provide message id and contact email or channel id.

### Other commands

Any other command will be treated as an invalid command.

repository: Git-Good-Team/zoomapi

gha_license_id: NOASSERTION

repo_name: Git-Good-Team/zoomapi


text:
---
date: '2006-03-11 11:49:48'
layout: post
comments: true
slug: blackberry-syncml-and-such
status: publish
title: Blackberry, SyncML, and such
wordpress_id: '73'
categories:
- Blackberry
- Data transport
- Macintosh
- Software, add-on
---

I've been having data loss issues trying to sync my blackberry with both the laptop and the work machine. Very problematic, and hard to resolve since the utility of the handheld drops greatly if its data is stale, missing or incorrect.

Anyway, I took a look around today, and found some interesting pieces.

Item one: [SyncBerry](http://www.mobilecreek.com/products.htm), a $30 program for OTA (over the air, very desirable) sync. It says it talks to any SyncML server, which leads us to...

Item two: [MultiSync](http://www.multisync.org/news.php?page=2&PHPSESSID=85c714bdb206c2205b1687e1e223d32f), open source for SyncML. Not sure how to use this, but **it** links to...

Item three: [The project formerly known as Sync4j](http://www.funambol.com/opensource/), now called Funambol. Full syncml, explictily supports blackberry.

There's also a half-item, a [syncml plugin for multisync](http://packages.debian.org/unstable/libs/libmultisync-plugin-syncml)

Not sure how all this fits together, or if it'd work with Deban + OSX, but I sense an extended hack adventure in the near future.

UPDATED 10/24/06: Last one isn't sync4j (text corrected), although they do use the same protocol. See comments!

repository: phubbard/fnord

extension: markdown

repo_name: phubbard/fnord


text:
![Nollie heel indy.](http://i.imgur.com/Q4KTloe.gif)

Kickflip API Docs
=============

Documentation for the web Kickflip API.

## Setting up

Before you use the Kickflip API, you must first get your access tokens from the [Kickflip dashboard](https://kickflip.io/dash/).

## Authentication

Kickflip uses OAuth2 as an authentication protocol.

Whatever OAuth2 library that you're using should be smart enough to understand what it needs to do simply by pointing it
to

    https://kickflip.io/o/

as the appropriate OAuth2 endpoint.

## Users

All Kickflip streams must be started by Kickflip users. Users are necessary to make sure that people cannot overwrite
each other . Users can be ephemeral, and clients can create new users as much as they like. However, in most situations
a single user per client will suffice.

### Creating a New User

To create a new user, call

    https://kickflip.io/api/1.2/user/new/

You can also POST an optional **username**, **email**, **password**, **display_name**, and **extra_info** to define a user's account information. If a username is not supplied, one will be randomly generated.

Note that all responses will be in JSON format.

Sample response:

```javascript
{
   "aws_secret_key":"5R/B7GiXXXXXXmR13Tk6HlTz95hQNnuHFd2dP/R",
   "aws_access_key":"AKIAJREVXXXEOMGZ3A",
   "app":"kickflip-ios-123",
   "name":"kickflip-ios-123-w3pi7o",
   "uuid":"26ac0eea-14c1-4d29-afd7-5d8576aXc1ea",
   "success":true
}
```

### Changing a User's Information

To change any information about a user, call this URL

    https://kickflip.io/api/1.2/user/change/

and supply a **password**. You can then also define **email**, **display_name**, **extra_info** and **new_password**.

### Getting a User's Info

Get the _publicly available_ information about any user, call this URL

    https://kickflip.io/api/1.2/user/info/

and supply a **'username'**.

### Getting a User's Keys

If you wish to persist a user's account accross devices, you'll need to supply a correct **username** and **password** to this endpoint,

    https://kickflip.io/api/1.2/user/uuid/

which will return all of the necessary credentials to use the API and the upload endpoints.

## Streams

### Starting a new Stream

Kickflip clients must call the start stream endpoint in order to get the most recent access tokens and the instructions
for the stream parameters.

To start a stream, first call:

    https://kickflip.io/api/1.2/stream/start/

supplying the user's **uuid**, as well as an optional **lat**, **lon**, **city**, **state** and **country** for geo-coded streams, and an optional **private** for private streams.

Sample response:

```javascript
{
   "aws_secret_key":"5R/B7GiAzXXXkGmR13Tk6HlTz95hQNnuHFd2dP/R",
   "aws_access_key":"AKIAJREVSXXXXQEOMGZ3A",
   "aws_session_token":"STXXXXXXXXXXXXASDFASDF",
   "aws_duration":"XXDURATIONVALUE",
   "aws_prefix": "appname/username/cd29739a-a9da-4deb-ba9c-e8f9f2a72c85/"
   "success":true,
   "chat_url":"Not implemented yet",
   "stream_type":"HLS",
   "kickflip_url":"http://kickflip.io/cd29739a-a9da-4deb-ba9c-e8f9f2a72c85",
   "bucket_name":"kickflip-us-east",
   "stream_id":"cd29739a-a9da-4deb-ba9c-e8f9f2a72c85",
   "stream_url":"https://dasdfasdfasdf1234.cloudfront.net/appname/username/cd29739a-a9da-4deb-ba9c-e8f9f2a72c85/stream.m3u8",
   "upload_url":"https://kickflip-us-east.s3.amazonaws.com/appname/username/cd29739a-a9da-4deb-ba9c-e8f9f2a72c85/"
}
```

### Pausing

Kickflip clients may 'pause' a live stream to indicate that they will resume this same stream later.

To pause a stream, call:

    https://kickflip.io/api/1.2/stream/pause/

Clients must include a user's **uuid** and **stream\_id**, and may include an optional **lat** and **lon** to update the location of the stream.

### Resuming

Similarly, clients can 'resume' a live stream.

To resume a stream, call:

    https://kickflip.io/api/1.2/stream/resume/

Clients must include a user's **uuid** and **stream\_id**, and may include an optional **lat** and **lon** to update the location of the stream.

### Stopping

Streams which are finished must call:

    https://kickflip.io/api/1.2/stream/stop/

Clients must include a user's **uuid** and **stream\_id**, and may include an optional **lat** and **lon** to define the end of a stream location.

### Updating a Stream

Information about a stream can be set via the stream change endpoint:

    https://kickflip.io/api/1.2/stream/change/

Which will set a stream's **start_lat**, **start_lon**, **end_lat**, **end_lon**, **city**, *state**, **country**, **private**, **title**, **description**, **extra_info**, **thumbnail_url** and **deleted** fields.

### Stream Information

Information about a public stream can be retreived via the stream info endpoint:

    https://kickflip.io/api/1.2/stream/info/

for any public stream which you send a **stream_id** for.

### Flagging

Streams which are finished must call:

    https://kickflip.io/api/1.2/stream/flag/

If users wish to report inappropriate streams, they may do so by calling the flag endpoint with any valid **stream_id** to increase the flag count of that object. Users may only flag a Stream once per stream.

## Search and Feeds

Kickflip also provides API end points for searching publicly available streams associated with an App.

### Basic Search

To search all streams, simply call:

     https://kickflip.io/api/1.2/search/

to receive a paginated list of all streams. Adding a **keyword** field to the POST request will filter all streams with that value. Adding a **results_per_page** field will set the pagination number, and **page** will get the page offset. The resulting streams will be returned as a list under the **streams** key.

### User Search

To get all streams associated with a user, simply call:

    https://kickflip.io/api/1.2/search/user/

with a valid **username**.

### Location Search

To get all streams associated with a location, call:

    https://kickflip.io/api/1.2/search/location/

with a valid **lat**, **lon** and a **radius** (in degrees).

repository: Michael-iOSer/kickflip-docs

repo_name: Michael-iOSer/kickflip-docs


text:
---
code: true
type: page
title: Constructor
description: Creates a new Kuzzle object connected to the backend
order: 100
---

# Constructor

Use this constructor to create a new instance of the SDK.
Each instance represents a different connection to a Kuzzle server with specific options.

## Arguments

```java
public Kuzzle(
  AbstractProtocol networkProtocol,
  KuzzleOptions options
) throws IllegalArgumentException
```

| Argument   | Type                | Description                       |
| ---------- | ------------------- | --------------------------------- |
| `networkProtocol` |
AbstractProtocol
 | Protocol used by the SDK instance |
| `options` |
KuzzleOptions
 | Class which contains options |

## networkProtocol

The protocol used to connect to the Kuzzle instance.
It can be one of the following available protocols:

- [WebSocket](/sdk/java/3/protocols/websocket)

## options

The options used to connect to the Kuzzle instance.
[KuzzleOptions](/sdk/java/3/core-classes/kuzzle-options)

## Return

The `Kuzzle` SDK instance.

## Throws

Can throw an [IllegalArgumentException](/sdk/java/3/exceptions/illegal-argument-exception)

## Usage

<<< ./snippets/constructor.java

repository: kuzzleio/sdk-java

gha_language: Java

repo_name: kuzzleio/sdk-java


text:
# Massive wildfires hit southern Brazil's Pantanal

Published at: **2019-11-01T03:33:00+00:00**

Author: ****

Original: [CNA](https://www.channelnewsasia.com/news/world/massive-wildfires-hit-southern-brazil-s-pantanal-12053068)

SAO PAULO: Wildfires are raging across the Pantanal tropical wetlands in southern Brazil, one of the most biodiverse areas in the world and a major tourist destination, regional authorities said on Thursday (Oct 31).
The governor's office in the state of Mato Grosso do Sul said the fires were "bigger than anything seen before" in the region.
So far, more than 50,000 hectares have been affected.
The blazes follow other wildfires that environmental groups say ravaged millions of hectares in the Amazon rainforest in August.
The statement from the governor's office said the situation was "critical," with blazes ravaging three towns in the Pantanal, a popular eco-tourism spot.
"Intense flames and reddish smoke have disrupted traffic" on the highways, the statement said.
The coordinator of the National Risk Management Center, Paulo Barbosa de Souza, said the blaze - fed by wind and dry vegetation - was causing "logistical difficulties."
Satellite images from the INPE space institute showed there were nearly 8,500 fires in the Pantanal area between January and October this year.
That was the worst record since 2007.

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
---
hrs_structure:
  division: '1'
  volume: '4'
  title: '13'
  chapter: '201'
  section: 201-7
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0201-0007
    parent: HRS0201
    name: 201-7 Advisory committees
weight: 5040
title: Advisory committees
full_title: 201-7 Advisory committees
---
**§201-7 Advisory committees.** The department of business, economic development, and tourism may appoint advisory committees as it deems advisable for the purpose of obtaining expert and specialized counsel and advice on specific matters under consideration by the department and may include as members of the committees officers and employees of any government department or agency. The department may assign its own staff to aid and assist the advisory committees and may reimburse any member of any committee for necessary expenses incurred in the performance of the member's work for the department. [L 1955, c 264, pt of §1; RL 1955, §28A-7; am L 1957, c 23, §6; am L Sp 1959 2d, c 1, §§10, 25; am L 1963, c 2, §3; [HRS §201-7](/title-13/chapter-201/section-201-7/); gen ch 1985; am L 1987, c 336, §7; am L 1990, c 293, §8]


text:
# Image-denoising

Image Denoising: Implementation

Test image:

![Artificially-created-image](https://github.com/gandalf1819/Image-denoising/blob/master/images/lena.png)

## Box Filter

Using box filter, the image gets blurred. It removes noise by reducing the intensity variance since the new distribution is closer to the mean.

## Gaussian Filter

A Gaussian filter is a linear filter. It's usually used to blur the image or to reduce noise. We reduce noise by reducing variance in pixel intensities, but now nearby pixels have a greater influence on blurring depending on the sigma.

## Median Filter

We can see the difference between the original ground-truth image and the images after applying box, gaussian and median filters. Image gets blurred because the values are shifted towards the median. Thus, reducing variance of intensities.

## Comparison:

### Low Noise:
Sigma = 12

![low-noise-comparison](https://github.com/gandalf1819/Image-denoising/blob/master/images/low-noise.png)

### Medium Noise:
Sigma = 22

![medium-noise-comparison](https://github.com/gandalf1819/Image-denoising/blob/master/images/medium-noise.png)

### High Noise:
Sigma = 32

![high-noise-comparison](https://github.com/gandalf1819/Image-denoising/blob/master/images/high-noise.png)

## Inference:

From the above comparison, we can conclude that there is no particular formula or a mathematical derivation to decide the **optimal sigma**. It will depend on image factors like - the resolution of the image, the size of your objects in the image.  Higher the sigma values, wider the radius to blur away the images. Higher values of sigma would force you to use a larger kernel matrix to capture enough of the function's energy.

For your specific case, you want your kernel to be big enough to cover most of the object but not so large that it starts overlapping multiple neighboring objects at a time. Therefore, object separation is an important factor along with size.

Based on the results for each of the filters, we can say that we can use **Median filter** for ‘Salt and Pepper noise’. If you have a smooth surface with no texture which corresponds to a low frequency image, **Gaussian filter** would be the best to use. **Box or Mean filter** would be ideal to approx. gaussian and used widely in the rest of the use cases.

## Runtime comparison:

**Box > Gaussian > Median**

Box filter is the fastest, then comes gaussian and median at the bottom and slowest among them.

## Template Matching:

Test image:

![Test-image](https://github.com/gandalf1819/Image-denoising/blob/master/images/multiplekeys.png)

### Thresholding:

![Thresholding-keys](https://github.com/gandalf1819/Image-denoising/blob/master/images/thresholding-keys.png)

Sample key:

![Sample-key](https://github.com/gandalf1819/Image-denoising/blob/master/images/sample-key.png)

### Thresholding results:

![Thresholding-results](https://github.com/gandalf1819/Image-denoising/blob/master/images/thresholding-results.png)

We could observe the peak at (515, 28) and for rest of the keys we couldn’t observe a peak. The position of peak is the same position as of the key which validates that our function works correctly.