text:
# Knative Eventing Conformance Test Plan

This document describes a plan for testing Knative Eventing Conformance based on the specs that can be found here: https://github.com/knative/specs/blob/main/specs/eventing

The specs are split into Control Plane and Data Plane tests, this document follows the same approach and further divides the tests into further subsections.

# Control Plane

https://github.com/knative/specs/blob/main/specs/eventing/control-plane.md

## Requirements:

If you want to test conformance (**MUST, MUST NOT, REQUIRED**) you need:
- **Prerequisites**:
    - Knative Eventing Installed.
    - `kubectl` access to the cluster as defined in the spec: https://github.com/knative/specs/blob/main/specs/eventing/control-plane.md#rbac-profile
- A Kubernetes Service that can be addressable to receive and count CloudEvents that arrive
- `curl` to send CloudEvents

## Test Plan for Control Plane

The following sections describe the test plans for the different behaviours described in the spec and each section describes tests, commands (manual steps) and outputs that will be used to evaluate conformance.

- [Broker Lifecycle Conformance](broker-lifecycle-conformance.md)
- [Trigger Lifecycle Conformance TBD]()
- [Channel Lifecycle Conformance TBD]()
- [Subscription Lifecycle Conformance TBD]()

# Data Plane

https://github.com/knative/specs/blob/main/specs/eventing/data-plane.md

## Test Plan for Data Plane

- [Event Ack and Delivery Retry TBD]()

repository: salaboy/specs

repo_name: salaboy/specs


text:
Adding a library that is linked against:

- Check what buildsystem is used.
  - If CMake, it's going to be relatively easy.
  - If something else, it's going to be complicated.
- If CMake
  - If the CMakeLists.txt is in the root folder, everything should be work
  - However, at least prefer to include make_targets property in the yaml to avoid any automagick confusion (it would test library name in all kinds of variants and when all fails do make all)
    - If there are multiple ways of generating libraries (shared/static), make a choice here

1. Add to bin/yaml/libraries.yaml
 - There's a difference between nightly trunks' and versions, search for "nightly:" to find the nightlies
 - Note: the name of the library in the yaml file needs to be the same as the name in the c++.amazon.properties file
 - Add basic entry
 ```
      unifex:
        type: github
        method: nightlyclone
        repo: facebookexperimental/libunifex
        build_type: cmake
        make_targets:
          - unifex
        targets:
          - trunk
```
2. Test installing
 - `bin/ce_install --enable nightly install 'unifex'`
3. Test building
 - Make sure you have a compiler installed, for example via `bin/ce_install install 'gcc 10.1.0'`
 - `bin/ce_install --enable nightly --buildfor g101 --dry build 'unifex'`
 - check one of the buildfolders that are created and see if there are .so's or .a's and otherwise check the cecmakelog.txt and cemakelog_X.txt
 - Iterate over this to make it work
4. If a static link file has been produced:
 - Add to the `c++.amazon.properties` in compiler-explorer in the libs properties for the new library a `libs.libraryname.staticliblink=libraryname`
   - libraryname here is without the 'lib' prefix of the .a file
 - Example unifex
```
libs.unifex.name=libunifex
libs.unifex.versions=trunk
libs.unifex.staticliblink=unifex
libs.unifex.versions.trunk.version=trunk
libs.unifex.versions.trunk.path=/opt/compiler-explorer/libs/unifex/trunk/include
```
5. If a config header file has been generated based on the compiler configuration, we can only maybe support this if the header does NOT include any defines about the architecture.
6. Send PR's
7. Merge the amazon.properties to main
8. Start library builder for the new library until no later than 00:00 UTC
9. Await and check libraries @ https://conan.compiler-explorer.com/libraries.html and logs @ https://conan.compiler-explorer.com/failedbuilds.html
  - These new libraries won't show up on these pages until you do https://conan.compiler-explorer.com/reinitialize and then go to https://conan.compiler-explorer.com/libraries and hit refresh

repository: trevd/gcc-explorer

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

license_type: permissive

repo_name: trevd/gcc-explorer


text:
# Omn Sprites [![Build Status](https://api.travis-ci.org/onelson/omn-sprites-rs.svg?branch=master)](https://travis-ci.org/onelson/omn-sprites-rs)

This crate is an exercise in learning!
Please don't depend on this for your job.

The overall goal is to make management of sprite
sheet data convenient by using a video playback
metaphor. Sprite sheets can be tagged with "clips"
which can support multiple play modes.

The code was originally part of [omn-labs-rs], which is
an incubator project for random game dev ideas.

Currently the crate is built around export data from
[Aseprite](https://www.aseprite.org/) but I hope to
support more content creation apps later.

[omn-labs-rs]: https://github.com/onelson/omn-labs-rs

license: MIT

repository: onelson/omn-sprites-rs

repo_name: onelson/omn-sprites-rs


text:
---
title: 'About Us'
weight: 151
---

The district membership committee gathers information on prospective chartered organizations, helps organize new units, reorganizes dropped units and units not meeting, and recruits new members in a systematic way. It establishes and maintains mutually beneficial relationships with major community organizations and strategic alliances, both those with and without Scouting units. These include religious, educational, civic, fraternal, and veteran organizations and associations; labor unions; business and industry; professional societies; and other organizations with objectives compatible with the Boy Scouts of America.

__{{< district-role "vice_chair_membership" >}}__ is the chair and has a team made up of these positions:

| Position              | Lead Volunteer                              |
|-----------------------|---------------------------------------------|
| Membership            | {{< district-role "membership" >}}          |
| SNFS                  | {{< district-role "snfs" >}}                |
| Spring Recruitment    | {{< district-role "spring_recruitment" >}}  |
| New Units             | {{< district-role "new_units" >}}           |
| Venturing & Exploring | {{< district-role "venturing_exploring" >}} |
| Retention             | {{< district-role "retention" >}}           |

repository: genebean/indiansprings-hugo

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: genebean/indiansprings-hugo


text:
---
title: Fluorescence Images without Fluorescent Markers
summary: Using brightfield microscopy images to generate fluorescence marked images.
---
# Fluorescence Images without Fluorescent Markers

## Background and motivation

Fluorescence microscopy is one of the fundamental imaging tools we can use to see what is happening inside cells. The ability to attach fluorescent labels to specific proteins and structures of interest within cells has been nothing short of revolutionary in the field of cell biology, as with the ability to see what cell components are doing, also allows us to learn, piece by piece, how cells function.

### The challenges of fluorescent imaging

However, no technique is without its drawbacks and limitations.
- Fluorescent markers can change the behaviors of the protein they are attached to, preventing normal interactions and regulatory processes.
- The intense illumination needed to excite fluorescent markers causes photo-damage to the imaged cells. This damage ranges from potentially unnoticeable to a degree sufficient to cause cell death. This effect is worse when more illumination is used (as when there are relatively low levels of expressed protein) and worse when the fluorescent tag is primarily located on or adjacent to DNA (as with dyes that visualize the nucleus).
- There are literal bandwidth limitations with fluorescent markers: you only have so many wavelengths you can use excite different tags and only so many wavelengths you can use to look at output.

We are looking for ways we can side-step these limitations of fluorescent markers.

### Maybe labeled structures can be seen without fluorescent labels?

Fluorescent markers specifically highlight the structures of interest to make them easier to see, but these exist in the absence of markers. Large scale structures, such as the nucleus, are visible in traditional bright-field illumination; one can even manually segment or highlight them, given the time.

![Bright-field with nuclear dye vs hand labeling](https://i.imgur.com/0IDg0yx.png)

However, it takes way too much time to do this for all the images we want to see, and the hand-labeled image isn't as clear as the dye-labeled one. Can we train a model to do this highlighting step for us, by feeding it the bright-field image as an input and the dye-labeled image as a target?

A category of convolutional neural-net models, those based on the [U-net architecture](https://arxiv.org/abs/1505.04597), have shown themselves to be capable of biological image segmentation and style transfer. These model architectures reduce an image's dimensions, while detecting more and more features that can be used to classify whether a pixel would be fluorescent if it were labeled with a marker. After this categorization, the image is upsampled to its original resolution, with contextual information passed from the downsampling layers to provide context, increasing the realism of the upsampling (and placing the categorization in its original context).

![Placeholder unet architecture](https://raw.githubusercontent.com/zhixuhao/unet/master/img/u-net-architecture.png)

### Our contributions

We've trained such models on paired sets of our fluorescent images and the corresponding brightfield images. The details of our architecture and approach are described [in more detail in this pre-print](https://www.biorxiv.org/content/early/2018/03/27/289504), but let's take a look at how well structure prediction works, how close we are to being able to acquire fluorescence-like images without fluorescent markers.

## Predicting Fluorescence Images from Bright-field Images

### Getting Support Packages, the Model, and Input Images

This notebook runs well on [Google's Colaboratory Environment](https://drive.google.com/file/d/1aXtGzmqXxKTrraVZu0eg7JBf9Zt4iFFE/view?usp=sharing), which gives you access to nice GPUs from your laptop. We've also created a version to run this model across larger sets of images that allows you to [upload your own datasets](https://drive.google.com/file/d/1gIBqWhMCRxfX_NZgy_rAywEMh8QrpHQZ/view?usp=sharing). Before we begin in this environment however, we will need to install some packages and get local copies of the trained model and some input images to test it on.

```python
## Package installation, restart runtime after packages install

# Image read and write
!pip install -q imageio

# Data and model downloading
!pip install -q quilt --user

# Model architecture and image pre-processing
# !pip install -q git+https://github.com/AllenCellModeling/pytorch_fnet.git
!pip install -q git+https://github.com/JacksonMaxfield/pytorch_fnet.git

# PyTorch to run the model
!pip install -q http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl
```

After installing our packages we can now restart the runtime by viewing 'Runtime' options and then selecting 'Restart Runtime'.

```python
# First the standard packages
import numpy as np
import json
import matplotlib.pyplot as plt
plt.set_cmap('gray')

# For image data
import scipy.ndimage
import tifffile
```

With our environment set up, we can download sample images of our cell lines.

```python
# Download sample images from each of our cell lines
import quilt
quilt.install('aics/cell_line_samples')

# Load the cell line samples dataset
from quilt.data.aics import cell_line_samples
```

Let's take a look at the image we downloaded. Like all of the images in the `cell_line_samples` dataset, it is three dimensional. These images are captured at a series of heights, optically slicing the cell into a z-stack of images. When we display them, we'll take the maximum along the z-axis, the max project, since 3D rendering is hard.

It has several channels:

```python
# Make plotting max projections easier
def max_project(ax, img):
  max_img = img.max(0)
  max_scale = np.percentile(max_img, 99)
  ax.imshow(max_img, vmax=max_scale)
  ax.axis('off')

# Load the downloaded image into an array
img_fn = cell_line_samples.AICS_13_1165_ome()
img = tifffile.imread(img_fn)

# Show each of the channels we're interested in
channels = {'cell membrane':0, 'lamin':1, 'dna':2, 'bright-field':3}

fig, axes = plt.subplots(1, 4, figsize=(14, 6))
for channel, ax in zip(channels.items(), axes.flat):
  channel_name, channel_index = channel
  ax.set_title(channel_name, fontsize=20)
  max_project(ax, img[:,channel_index])
plt.tight_layout()
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_10_0.png)

What information does each of these channels contain?

* The cell membrane channel captures information from a fluorescent dye (CellMask) used to image this structure
* The lamin channel includes the information from imaging an endogenous fluorescent tag localized to the nuclear envelope (Lamin B1)
* The DNA channel shows the information from a fluorescent dye (Hoechst) used to image this structure
* Bright-field is a non-fluorescence image of the scene (note the inherent constrast but much lower specificity for the structures represented in the three previous channels)

We've claimed that our model has learned how to predict the fluorescence channels from the bright-field image. Can we show that in action? Let's download and read in our model weights:

```python
import torch
import fnet # our implementation of u-net for fluorescent prediction
import fnet.transforms

# Download trained model weights, find the file that predicts the DNA channel
quilt.install('aics/label_free')
from quilt.data.aics import label_free
dna_model_fn = label_free.dna.model()

# Load the weights into our model
dna_model = fnet.fnet_model.Model()
dna_model.load_state(dna_model_fn, gpu_ids=0)
```

### Predicting Fluorescent Images from Brightfield Images

Now that our model is loaded, let's prepare the previously loaded image for use with our model.

In this first example, we are going to predict the DNA fluorescent dye image.

```python
# Prep the image for input into the model
full_brightfield = img[:, channels['bright-field'],:,:]
dna_opts = json.load(open(label_free.dna.train_options()))
small_brightfield = fnet.transforms.prep_ndarray(full_brightfield, dna_opts['transform_signal'])
model_input = fnet.transforms.ndarray_to_tensor(small_brightfield)
```

Great! Our image is prepped; time to predict the DNA fluorescent dye image.

```python
# Predict the dna structure and convert back to ndarray
model_output = dna_model.predict(model_input)
predicted_dna = fnet.transforms.tensor_to_ndarray(model_output)
```

The output image has a lower resolution (makes the model easier to fit into memory).

To compare the observed DNA fluorescent dye image with our predicted DNA fluorescent dye image, we prepare the observed image for output as well.

```python
# To compare the two images, prep the original
full_dna = img[:, channels['dna'],:,:]
small_dna = fnet.transforms.prep_ndarray(full_dna, dna_opts['transform_signal'])
```

Let's also prepare the images for display by normalizing and clipping outliers.

```python
# Find the observed and predicted outlier cutoff points
target_flat = small_dna.copy().flatten()
min_px = np.percentile(target_flat, 0.02)
max_px = np.percentile(target_flat, 99.8)

# normalize and clip
def prep_image_for_display(img, min_px, max_px, clip_lower=0, clip_upper=1):
  img = img.copy() - min_px
  img /= (max_px - min_px)
  img[img < clip_lower] = clip_lower
  img[img > clip_upper] = clip_upper
  return img

display_obs = prep_image_for_display(small_dna, min_px, max_px)
display_pred = prep_image_for_display(predicted_dna, min_px, max_px)
```

```python
imgs = {'Observed': display_obs,
       'Predicted': display_pred}

# Display the observed and the predicted
fig, axes = plt.subplots(1, len(imgs), figsize=(14,6))
for label, ax in zip(imgs.keys(), axes.flat):
  ax.imshow(imgs[label].max(0))
  ax.set_title(label)
  ax.axis('off')
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_21_0.png)

### Visualizing the Difference

We'd like a better sense of how our prediction differs from the observed image than we can get from the above two images at a glance. Let's compare them in a couple of other ways. The simplest comparison is simply to toggle back and forth between the two images. This lets your eye pick out differences that aren't apparent when you have to move from one image to the next.

This may be helpful in finding areas where our prediction is noticeably off.

```python
# Create a gif of observed to predicted
from IPython.display import Image
import imageio

ordered_imgs = [display_obs.max(0), display_pred.max(0)]
imageio.mimsave('compare.gif', ordered_imgs, duration=2)
```

```python
with open('compare.gif', 'rb') as f:
  display(Image(data=f.read(), format='png'))
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_24_0.png)

To my eye this shows that our predictions are largely accurate in location, with some underprediction of the extent of the DNA dye uptake by the mitotic cell. Also of interest is that our predicted image is a bit smoother or less grainy than the observed image. We can put this down to stochastic uptake of dye or dye clumping that the model is unable to predict.

But how else can we visualize the location differences? Let's take a look:

```python
imgs = {'Observed - Predicted': small_dna - predicted_dna,
       'Predicted - Observed': predicted_dna - small_dna,
       'Absolute Difference': abs(small_dna - predicted_dna)}

# Find the difference images outlier cut off points
unified_flat = np.append(np.empty(0,), [imgs[l] for l in imgs]).flatten()
min_px = np.percentile(unified_flat, 0.02)
max_px = np.percentile(unified_flat, 99.8)

fig, axes = plt.subplots(1, len(imgs), figsize=(14,10))
for label, ax in zip(imgs.keys(), axes.flat):
  display_img = prep_image_for_display(imgs[label], min_px, max_px)
  ax.imshow(display_img.mean(0))
  ax.set_title(label)
  ax.axis('off')

plt.tight_layout()
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_26_0.png)

**Observed - Predicted** provides us information on where we underpredict, and you can instantly see that we underpredict the mitotic the most out of all other cells present in the image.

**Predicted - Observed** gives context as to where we overpredict. Noticable here is that it looks as though we generally add noise to the image, even though in the displayed predicted image it looked as though we didn't. This is due to how the model was trained. Because the model cannot predict the random noise generated by fluorescence microscopy, it instead averages the spots where it thinks noise would be present.

**Absolute Difference** shows us all the spots in a unified image of where our prediction was incorrect when compared to the observed. With largest difference being at the mitotic of course and all other points looking like they are mainly differences in greyscale intensity between the prediction and observed and not too many cell location differences.

## Uses of Our Predictions

In the small examples above we showed the relative location accuracy of our predictions and if you would like to learn more about the overall accuracy of our predictions we encourage you to read our paper. But what value can we gain from these predictions. We will first look at segmentation followed by predicting structures not tagged.

### Segmentation and Thresholding

Segmentation is a large part of our pipeline so let's see how the observed fluorescence image compare to the predicted under a threshold.

```python
from skimage.filters import threshold_otsu

thresh_obs = threshold_otsu(small_dna)
binary_obs = small_dna > thresh_obs
thresh_pred = threshold_otsu(predicted_dna)
binary_pred = predicted_dna > thresh_pred

imgs = {'Observed': display_obs,
      'Predicted': display_pred,
      'Binary Observed': binary_obs,
      'Binary Predicted': binary_pred}

fig, axes = plt.subplots(2, int(len(imgs) / 2), figsize=(14,10))
for label, ax in zip(imgs.keys(), axes.flat):
  ax.imshow(imgs[label].max(0))
  ax.set_title(label)
  ax.axis('off')

plt.tight_layout()
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_30_0.png)

It was pretty intuitive that our predictions were generally 'smoother' and had less noise in the observed fluorescence but the thresholding shows how much noise was present in the original that is filtered out on the thresholded prediction.

While we can continue on using the predicted image as a segmentation input itself we could also use the binary predicted image as a mask for the original to view a cleaned up, or de-noised original image. In short, let's use the binary predicted as a clipping mask for the original observed fluorescence image.

```python
# Use binary predicted as a clipping mask
clipped_obs = small_dna.copy()
clipped_flat = small_dna.flatten()
clipped_obs[binary_pred==False] = min(clipped_flat)
clipped_flat = clipped_obs.flatten()
min_px = np.percentile(clipped_flat, 0.02)
max_px = np.percentile(clipped_flat, 99.8)
clipped_obs = prep_image_for_display(clipped_obs, min_px, max_px)

imgs = {'Original Observed': display_obs,
       'Clipped Observed': clipped_obs}

fig, axes = plt.subplots(1, len(imgs), figsize=(14,10))
for label, ax in zip(imgs.keys(), axes.flat):
  ax.imshow(imgs[label].max(0))
  ax.set_title(label)
  ax.axis('off')

plt.tight_layout()
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_32_0.png)

That looks much better! Being able to filter out some of the noise while still using the original observed fluorescence will be valuable in generating better segmentations and performing feature analysis.

### Predicting Structures not Tagged

These error plots give us some confidence in our ability to predict where DNA fluorescence will appear. We can plot simmilarly estimate error for our other tag models, but this is left as an exercise for the reader. Hard values for how well each of these models work are found in [the accompanying paper](https://www.biorxiv.org/content/early/2018/03/28/289504).

Instead let's end with an estimate of where the nuclear envelope is for several images.

```python
# Get the model file
lamin_model_fn = label_free.lamin_b1.model()
lamin_opts = json.load(open(label_free.lamin_b1.train_options()))

# Load the weights into our model
lamin_model = fnet.fnet_model.Model()
lamin_model.load_state(lamin_model_fn, gpu_ids=0)

# Function to predict an output image using the model provided
def predict_img(img, model, transforms):
  # Prep the image for input into the model
  full_brightfield = img[:, 3,:,:]
  img_in = fnet.transforms.prep_ndarray(full_brightfield, transforms)
  model_input = fnet.transforms.ndarray_to_tensor(img_in)

  # Predict the lamin structure and convert back to ndarray
  model_output = model.predict(model_input)
  predicted_out = fnet.transforms.tensor_to_ndarray(model_output)

  return predicted_out
```

```python
# Generate predictions for each input brightfield image
predictions = dict()

for img_name in cell_line_samples._data_keys():
  if 'ome' in img_name:
    img_fn = getattr(cell_line_samples, img_name)()
    img = tifffile.imread(img_fn)
    prediction = predict_img(img, lamin_model, lamin_opts['transform_signal'])
    predictions[img_name] = prediction
```

```python
# Display each nuclear envelope prediction
fig, axes = plt.subplots(2, int(len(predictions) / 2), figsize=(14,6))
for img_name, ax in zip(predictions.keys(), axes.flat):
  ax.imshow(predictions[img_name].max(0))
  ax.set_title(img_name)
  ax.axis('off')
```

![png](../assets/nbfiles/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers/2018-05-03-Fluorescence_Images_without_Fluorescent_Markers_37_0.png)

What a nice way to get information from a brightfield image using patterns of structures we've seen in other images! We can see fluorescent structures in cells where we haven't even labeled them. In cases where we can do a little initial dying or labeling to train models of this type, this can drastically improve the interpretability of large sets of brightfield images.


text:
This project is the source for https://godoc.org/

[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/golang/gddo)
[![Build
Status](https://travis-ci.org/golang/gddo.svg?branch=master)](https://travis-ci.org/golang/gddo)

**NOTE:** As of 2021, requests to godoc.org will redirect to pkg.go.dev. The
gddo repository is archived and no longer accepting contributions. For more
details, see https://blog.golang.org/godoc.org-redirect.

## Getting the Source

To clone the repository from its canonical location:

```
git clone https://go.googlesource.com/gddo $GOPATH/src/github.com/golang/gddo
```

Information on how to set up a local environment is available at
https://github.com/golang/gddo/wiki/Development-Environment-Setup.

## More Documentation

More documentation about this project is available on the
[wiki](https://github.com/golang/gddo/wiki).

extension: markdown


text:
---
layout: post
categories:
- rails
- phoenix
- elixir
- ruby
title: Include Phoenix Channels in a Rails App
description: How to set up a small Phoenix app to bring channels into your Rails app
date: 2017-03-01 11:30PM
---

My side project [Worfcam][worfcam] has a home page that lists the most recent photo taken from a device. It used to poll every 3 seconds for updates to the photos. I now use Phoenix channels to push new photos to the home page. This is how I did that. I got part of the idea from [this blog post at akitonrails.com](http://www.akitaonrails.com/2015/12/09/ex-pusher-lite-part-1-phoenix-channels-and-rails-apps)

Security note: it should be pointed out that this has very lax security as it trusts the rails process and elixir process are on the same machine and firewalled away from the world outside of connecting through nginx.

## Rails Configuration

First include `phoenix.js` in your javascript. I managed to get it included by vendoring a hand compiled version straight from the [phoenix github][phoenix-github]. After this is in place, you write your javascript the same way as you would a normal Phoenix app.

To connect the proper socket I load it from the environment. I add a new method to my `AppContainer` and use it in the javascript when connecting to the Phoenix socket. For local development this is `ws://localhost:5300/socket`. On production it is `wss://example.com/socket`.

```ruby
class AppContainer
  # ...
  let(:channels_url) do
    ENV["CHANNELS_URL"]
  end
end
```

## Pushing Events

The phoenix app will have the following route:

```elixir
  scope "/", Channels do
    resources "/events", EventController, only: [:create]
  end
```

The controller will simply broadcast whatever gets sent in. This is why it trusts the network is locked down. A simple way to add authentication to this could be basic auth or digest auth. Or even OAuth 2.0 server to server workflow.

```elixir
defmodule Channels.EventController do
  use Channels.Web, :controller

  def create(conn, %{"topic" => topic, "event" => event, "body" => body}) do
    Channels.Endpoint.broadcast(topic, event, body)
    conn |> send_resp(204, "")
  end
end
```

I have the Ecto Repo pointing to the same database and the models have a schema that matches what rails uses. My channels enforce that only the correct users can connect to channels. Channels will be straight forward normal channels.

To push events over from Rails I have a sidekiq job that sends the data required by the create action. Once in place events flow from Rails to Phoenix to the web browser.

```ruby
class EventPushWorker
  include Sidekiq::Worker

  def perform(topic, event, body)
    return if Rails.env.test?
    response = Faraday.post(AppContainer.channels_event_url) do |req|
      req.headers["Content-Type"] = "application/json"
      req.body = {
        topic: topic,
        event: event,
        body: body,
      }.to_json
    end
  end
end
```

## nginx Configuration

The only tricky part from here is getting Rails to talk to Phoenix in production. Local development works because you can talk directly to the server. For production I have nginx set up a location before the default location that passes to Rails.

```nginx
upstram worfcam {
  server localhost:5000;
}

upstream channels {
	server localhost:5300;
}

location /socket {
	proxy_http_version 1.1;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection $connection_upgrade;
	proxy_set_header Origin $http_origin;
	proxy_pass http://channels;
}

location / {
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto https;
	proxy_set_header Host $http_host;
	proxy_redirect off;
	proxy_pass http://worfcam;
}
```

Once this is in place, your Rails app doesn't even need to know that it's talking to Phoenix from the front end.

[worfcam]: https://worfcam.com
[phoenix-github]: https://github.com/phoenixframework/phoenix

gha_language: CSS


text:
# Changelog for Elixir v1.11

## v1.11.0-dev

### 1. Enhancements

#### EEx

  * [EEx] Track column information in EEx templates when enabled in the compiler
  * [EEx] Show column information in EEx error messages
  * [EEx] Support `:indentation` option when compiling EEx templates for proper column tracking

#### Elixir

  * [Calendar] Add `Calendar.strftime/3` for datetime formatting
  * [Code] Add `:column` to `Code.string_to_quoted*/2`
  * [Code] Add `Code.can_await_module_compilation?/0` to check if the parallel compiler is enabled and it can await for other modules to be compiled
  * [Kernel] Add `is_struct/2` guard
  * [Kernel] Support `map.field` syntax in guards
  * [Kernel] Add `+++` and `---` with right associativity to the list of custom operators
  * [Task] Add `Task.await_many/2`

#### ExUnit

  * [ExUnit.Assertion] Allow receive timeouts to be computed at runtime
  * [ExUnit.Doctest] Allow users to add tags to doctests

#### IEx

  * [IEx.Helpers] Show docs from Erlang modules that have been compiled with the docs chunk

#### Logger

  * [Logger] Add `notice`, `critical`, `alert`, and `emergency` log levels
  * [Logger] Support structured logging by logging maps or keyword lists
  * [Logger] Allow level to be set per module with `Logger.put_module_level/2`

#### Mix

  * [mix compile] Support the `__mix_recompile__?/0` callback for custom behaviour on when Mix should recompile a given module
  * [mix compile.elixir] Track application boundaries in the Elixir compiler. If you invoke code from Erlang or Elixir standard libraries and you don't depend on the proper applications, a warning will be emitted. A warning will also be emitted if you invoke code from an umbrella sibling that you don't depend on - effectively forbidding cyclic dependencies between apps
  * [mix test.coverage] Add `mix test.coverage` that aggregates coverage results from umbrellas and OS partitioning

### 2. Bug fixes

#### EEx

  * [EEx] Make trimming behaviour via the `:trim` option more consistent

#### Elixir

  * [Kernel] Validate values given to `:line` in quote to avoid emitting invalid ASTs
  * [Kernel.SpecialForms] Add `|/2` to the list of special forms to avoid inconsistent behaviour on overrides
  * [Version] Add defaults and enforce keys in `Version` struct

#### IEx

  * [IEx] Fix tokenizer emitting repeated warnings in the REPL

### 3. Soft-deprecations (no warnings emitted)

  * [Logger] `warn` log level is deprecated in favor of `warning`

### 4. Hard-deprecations

#### Elixir

  * [Application] Deprecate non-atom keys on `put_env`, `get_env`, `fetch_env`, and `delete_env`
  * [Supervisor] Deprecate `Supervisor.start_child/2` and `Supervisor.terminate_child/2` in favor of `DynamicSupervisor`
  * [Supervisor.Spec] Deprecate `Supervisor.Spec.worker/3` and `Supervisor.Spec.supervisor/3` in favor of the new typespecs

## v1.10

The CHANGELOG for v1.10 releases can be found [in the v1.10 branch](https://github.com/elixir-lang/elixir/blob/v1.10/CHANGELOG.md).

repository: vnegrisolo/elixir

repo_name: vnegrisolo/elixir


text:
CHALLENGE
=========

**Challenge A:**

Continuing from your previous code:

Remove the width from the box class

Give the box class a flex of 1;

Run the code

Assign the fourth box an id =“box4”

Give box4 a flex of 2

Run the code

Give box4 a flex of 4

Reorder the boxes:

-   Give each box an id

-   reorder the boxes like so:
    4,1,2,3

**Challenge B – Using Flexbox with Navigation and Media Query:**

-   Files for this challenge are found in the lesson folder (Challenge5).

-   In this challenge, you are give a mobile navigation:

![](img/img1.png)

-   Unlike the previous example, this does not use lists elements.

-   The challenge is to complete the code in the media query to create the below
    layout for screens greater than 700px. The layout uses flexboxes, so the use
    of flexboxes should be in the solution.

![](img/img2.png)

-   Download the files for this Challenge in this lessons folder
    (**flexbox-nav-challenge.html**). Before beginning, take some time to
    explore the code.


text:
# Quiz-App
[![forthebadge](https://forthebadge.com/images/badges/built-for-android.svg)](https://forthebadge.com)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b3ff4806fb3443b687ec694fb13608e5)](https://www.codacy.com/app/alistairholmes95/devjournal?utm_source=alistair_holmes@bitbucket.org&utm_medium=referral&utm_content=alistair_holmes/devjournal&utm_campaign=Badge_Grade)

An Android Basics Nano degree course project from Udacity
### Project Description:
**Create an educational app that quizzes a user about a certain topic of your choice.**

**Bitest** is a food quiz project which tests one's knowledge of popular African diets.

**Hint:** If you encounter an installation error, Click Build tab ---> Clean Project ---> Run it again :)

**Android Tags:** *#cardview* *#scrollview* *#linearlayout* *#relativelayout* *#intent* *#radiobutton* *#checkbox* *#edittext*

**Layout type:** Single Activity

**Number of questions:** 5

**Score for each question:** 20 marks

**Bonus question:** 20

**Penalty for each wrong answer:** 10 marks

# Personal Comment
The entire development journey was fun yet challenging having want to make a really cool but simple design. Initially, the layout was super nested with about 600 lines in the xml. Memory loss stucked in and the scroll was super slow and shaky, so I eventually made everything simple. I realized the images also played a role.

# License

	MIT License

	Copyright (c) 2018 Samuel Gracious Etsiakoh

	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.

# Extras
**Intro Slider:** https://www.androidhive.info/2016/05/android-build-intro-slider-app/

**Splash Screen:** https://www.youtube.com/watch?v=ZZkanr8tS6w

**Link to apk:** https://drive.google.com/file/d/11jYt-ZNOo8wrp9R9OhpIPbI-51jh-cuW/view?usp=sharing

repository: baiden/Quiz-App

repo_name: baiden/Quiz-App


text:
# ebi-selecta
![alt text](fig/docker_logo_horizontal.png)

#### Please follow these links for documentation specifically for developers
  - [Detail pdf documentation](https://github.com/EBI-COMMUNITY/ebi-selecta/blob/master/SELECTA_Developer_Documentation.pdf)
  - [Browse the source code documentation](https://ebi-community.github.io/ebi-selecta/)

#### Contents:
1. [What is SELECTA?](#What-is-selecta?)
2. [SELECTA framework Docker-Compose version](#SELECTA-framework-Docker-Compose-version)
3. [Installation](#installation)
    - [On Ubuntu](#On-Ubuntu)
    - [On Windows and Mac](#On-Windows-and-Mac)
4. [Retrieving the SELECTA docker-compose version](#Retrieving-the-SELECTA-docker-compose-version)
5. [Usage on a single computer](#Usage-on-a-single-machine)
    - [Launch SELECTA](#Launch-SELECTA)
6. [SELECTA API](#SELECTA-API)
7. [Minimum requirement for a SELECTA processing](#Minimum-requirement-for-a-SELECTA-processing)
    - [Create a SELECTA user account](#Create-a-SELECTA-user-account)
    - [Create a SELECTA rule](#Create-a-SELECTA-rule)
8. [Retrieve SELECTA database data](#Retrieve-SELECTA-database-data)
    - [Via SELECTA API](#Via-API)
    - [Via Postgres PgAdmin client](#Via-Postgres-PgAdmin-client)
9. [Run SELECTA Workflow manually](#Run-SELECTA-Workflow-manually)
    - [Selection_to_attribute Stage](#Selection_to_attribute-Stage)
    - [Data_provider Stage](#Data_provider-Stage)
    - [Core_executor Stage](#Core_executor-Stage)
    - [Analysis_reporter Stage](#Analysis_reporter-Stage)
    - [Process_archival Stage](#Process_archival-Stage)
10. [Run SELECTA Workflow automatically](#Run-SELECTA-Workflow-automatically)
11. [Usage on a SWARM cluster](#Usage-on-a-SWARM-cluster)
    - [Initialize SELECTA swarm cluster](#Initialize-SELECTA-swarm-cluster)
    - [launch SELECTA in the swarm cluster](#launch-SELECTA-in-the-swarm-cluster)
    - [remove the swarm cluster](#remove-the-swarm-cluster)
12. [Background](#background)
    - [Workflow](#workflow)
    - [Database](#database)

### What is SELECTA?

SELECTA is a rule-based workflow engine that runs analytical pipelines, first developed to manage pipelines specifically for the COMPARE community. However, SELECTA can also be setup to manage other user provided analytical pipelines.
SELECTA automatically submits the analysis results output by the analytical pipelines back to the European Nucleotide Archive (ENA) mitigating the burden for a submitter when handling bulk submissions and ensures a consistent and accurate record of the analysis results.

### SELECTA framework Docker-Compose version.

This repository provides SELECTA toolkits as a set of Dockerfiles, configuration docker-compose files to launch the SELECTA
framework without the requirement of installing every SELECTA component individually. This repository also provides a script (init_swarm.sh) to initialize a docker swarm environment and a stack file to launch the framework in a docker swarm cluster.
 There is also a script to remove entirely (rm_swarm.sh) the created swarm cluster environment.

### Installation

The open-source software Docker and Docker-compose must be pre-installed for the proper functioning of the SELECTA docker-compose version:

#### On Ubuntu:

Add the GPG key for the official Docker repository to the operating system.

```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```

Add the Docker repository to the APT (Advanced Package Tool) sources.

```
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```

Next, update the Ubuntu package database with the newly added docker packages repository.

```
sudo apt-get update
```

Install the Docker community edition:

```
sudo apt-get install -y docker-ce
```

Verify that Docker daemon is running with the following command:

```
sudo systemctl status docker
```

Next, install the docker-compose and make it executable.

```
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
```

Finally, verify that docker-compose installation is successful by checking its version.
```
docker-compose --version
```

#### On Windows and Mac:
Install the executable from the docker-compose page:

```
https://docs.docker.com/compose/install/
```

### Retrieving the SELECTA docker-compose version
Retrieve the docker-compose version from the Github to launch the docker-compose version of the SELECTA framework.

Clone this repository:
```
git clone <repo>
```

If utilising for COMPARE you will also want to obtain the following codebases for the integrated COMPARE pipelines:
 - [DTU_CGE](https://bitbucket.org/genomicepidemiology/cge-tools-docker/src/master/)
 - [EMC_SLIM](https://github.com/EBI-COMMUNITY/slim_emc)
 - [UAntwerp_Bacpipe](https://github.com/wholeGenomeSequencingAnalysisPipeline/BacPipe)
 - [RIVM_Jovian](https://github.com/DennisSchmitz/Jovian) (private, request by email)

Alternatively, obtain the codebases of the analysis pipelines that you wish to implement in SELECTA.

### Usage on a single computer

To launch the SELECTA framework on a single machine.
Access the SELECTA docker repository:

```
cd </path/to/ebi-selecta>
```

##### Launch SELECTA

```
Docker-compose up --build -d
```
The last command in detach mode will pull the SELECTA required images dependencies from Docker hub and build where necessary
SELECTA-tools docker images and finally launch all the SELECTA containers. The docker-compose also creates a docker network
that allows communication between the SELECTA docker containers.

## SELECTA API
We provide in this repository SELECTA API [documentation](service_api/README.md) detailing SELECTA endpoints. SELECTA API implements both the GET and POST methods.

## Minimum requirement for a SELECTA processing:

The SELECTA framework is database-centric. Two main tables, the Account and the Process_Selection tables, contain mandatory requirements to enact SELECTA processing. SELECTA API facilitates populating these tables with the required attributes.
The API listens to port 5002 on the localhost, and the accompanying docker-compose.yml file defines this port.

- #### Create a SELECTA user account

The following command will create an account for dcc_xxxx

```json
curl -d '{"account_id":"dcc_test","account_type":"datahub","email": "selecta@ebi.ac.uk","password": "letmein"}' -H "Content-Type: application/json" -X POST http://localhost:5002/account
```
- #### Create SELECTA rule

The PROCESS_SELECTION table sports the processing rules for each datahub. Here we define the analytical workflow name that
is responsible for analyzing the data from a specific datahub or study or run.
The following command creates a rule in the PROCESS_SELECTION table for processing data from datahub dcc_dvorak with analysis workflow UAntwerp_Bacpipe; the rule ensures that the analysis of the run is an ongoing process by setting the CONTINUITY flag to YES.
This specific rule continually analyzes a specific run data in the dcc_dvorak datahub.

```json
curl -d '{"datahub": "dcc_dvorak","run_accession": "ERR1102130","pipeline_name": "UAntwerp_Bacpipe","public": "NO","webin": "Webin-45433","continuity": "YES","process_type": "run"}' -H "Content-Type: application/json" -X POST http://localhost:5002/input2selection
```

### Retrieve SELECTA database data

#### Via API

##### Fetch all SELECTA account

```
curl  -H "Content-Type: application/json" -X GET http://localhost:5002/accounts

```
##### Fetch all SELECTA rules

```
curl  -H "Content-Type: application/json" -X GET http://localhost:5002/selections

```

#### Via Postgres PgAdmin client
```
Http:localhost:5050 with the following: username<EMAIL_ADDRESS>
```

### Run SELECTA Workflow manually
When manually running each SELECTA stage, run each of the following scripts sequentially:
selection_to_attribute.py, data_provider.py, core_executor.py, analysis_reporter.py, and process_archival.py. Each script require SELECTA configuration file (properties.txt) as an argument:

#### Selection_to_attribute Stage
```
docker run -ti --rm --network=ebi-selecta_postgres embl-ebi/selecta_selection_to_attribute:1.0 /usr/scr/app/scripts/selection_to_attribute.py -p /usr/scr/app/resources/properties.txt
```

#### Data_provider Stage
```
docker run -ti --rm --network=ebi-selecta_postgres embl-ebi/selecta_data_provider:1.0 /usr/scr/app/scripts/data_provider.py -p /usr/scr/app/resources/properties.txt
```

#### Core_executor Stage
```
docker run -ti --rm --network=ebi-selecta_postgres embl-ebi/selecta_core_executor:1.0 /usr/scr/app/scripts/core_executor.py -p /usr/scr/app/resources/properties.txt
```

#### Analysis_reporter Stage
```
docker run -ti --rm --network=ebi-selecta_postgres  embl-ebi/selecta_analysis_reporter:1.0 /usr/scr/app/submission/analysis_reporter.py -p /usr/scr/app/resources/properties.txt
```

#### Process_archival Stage
```
docker run -ti --rm --network=ebi-selecta_postgres embl-ebi/selecta_process_archival:1.0 /usr/scr/app/scripts/process_archival.py -p /usr/scr/app/resources/properties.txt
```

### Run SELECTA Workflow automatically
To automate the steps described above, create individual cronjobs for each stage to run periodically.

### Usage on a SWARM cluster

Access the SELECTA docker repository:
```
Cd </path/to/ebi-selecta>
```
### Initialize SELECTA swarm cluster
```
./init_swarm.sh
```

Confirm cluster creation
```
docker node ls
docker node inspect node-id
```
### launch SELECTA in the swarm cluster
To launch SELECTA in the swarm cluster, issue the following command:
```
Docker stack deploy -c docker-stack-compose.yml selecta
```

The last command will pull the SELECTA required images from the docker hub and launch all the SELECTA services as
configured in the docker-stack-compose YAML file.

The SELECTA framework integrates a swarm visualizer that is accessible at
```
http://localhost:8080
```

To scale up core_executor service, issue the following command:
```
docker service scale selecta_core_executor=10
```
Confirm that the service has scaled up via swarm visualizer at http://localhost:8080

To scale down core_executor service, issue the following command:
```
docker service scale selecta_core_executor=1
```
Confirm that the service has scaled up via swarm visualizer at http://localhost:8080

### remove the swarm cluster
To remove the swarm cluster, issue the following command:
```
rm_swarm.sh
```
---
### Useful docker commands

The following are some useful docker commands to interacts with the containers in the SELECTA framework.

Show active containers:

```
Docker-compose ps
```
Request an interactive shell in a running container.
```
Docker exec -it container_name csh
```

List virtual volumes:
```
docker volume ls
```

List Images.
```
Docker images
```

Remove images

```
Docker rmi image_name
```

### Background

#### Workflow

![alt text](fig/selecta_flow.png)

The SELECTA workflow includes the stages shown in the image above. Each step runs an associated python script(s).
The workflow can be scheduled through cronjobs which run these scripts, note the direction of the flow in the SELECTA
framework section of the diagram.

#### Database
SELECTA utilises a backend PostGres database for storing, accessing and updating key information required for tracking the various
processes. The database consists of 5 tables:
 - account
 - process_selection
 - process_stages
 - process_attributes
 - process_report

The image below presents the fields for each table:

![alt text](fig/SELECTA_Database_Schema.jpg)

repository: alakob/ebi-selecta

repo_name: alakob/ebi-selecta


text:
## Reporting a Vulnerability

If you discover a potential security issue in this project, please report to GrupoZAP CyberSecurity Team directly via email to<EMAIL_ADDRESS>

Please do **not** create a public github issue. Prefer to open a [draft advisory](https://github.com/grupozap/N0s3p4ss/security/advisories).

## Learning about Security

If you want to learn more about security at web applications, [this site](https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project) is a nice place to begin.


text:
---
layout:     post
title:      云计算时代的终结
description:     什么还没有开始就已经结束了
tags: [Nutanix, cloud]
image:
    feature: MacawFlight_ROW10435257143_1920x1080.jpg
---
天下事分久必合，合久必分，移动互联网代表了现在的云计算时代，很多企业还正在朝这个方向发展呢！革命还没有成功，怎么这个时代就要结束了。来听听XenSource前CEO怎么给你解读边缘计算时代的到来。

“I’m going to take you out to the edge to show you what the future looks like.” So begins a16z partner Peter Levine as he takes us on a “crazy” tour of the history and future of cloud computing — from the constant turns between centralized to distributed computing, and even to his “Forrest Gump rule” of investing in these shifts.

But… how can we say cloud computing is coming to an “end” when it hasn’t even really started yet?? Because the edge — where self-driving cars and drones are really data centers with wheels or wings — is where it’s at. So where does machine learning in the enterprise come in? How does this change IT? As software programs the world, these are some of the shifts to look at…

## 视频在这里
在线观看。


text:
# iHela Client

This repository provides a Python client for iHela platform.

## Get started

### Installation

Install the package with `pip install ihela-python-client`

### Get a client instance

import the package for using the provided functions to communicate with the iHela API
```python
from ihela_client import MerchantClient

CLIENT_ID = "<Your Client ID>"
CLIENT_SECRET = "<Your Client Secret>"
PROD_ENV = False

cl = MerchantClient(CLIENT_ID, CLIENT_SECRET, prod=PROD_ENV)
redirect_uri = "https://yourapp.com/uri/to/redirect/to/"

```
The `redirect_uri` must be registered with the client created by iHela both for test and production. This is not mandatory.

### Initialize Bill

Call bills functions as shown below
```python
# cl.init_bill(AMOUNT, USER_EMAIL, TRANSACTION_DESCRIPTION, MERCHANT_REFERENCE, redirect_uri=URL)
bill = cl.init_bill(2000<EMAIL_ADDRESS>"My description", "unique_reference", redirect_uri=redirect_uri)
```
Here is a response sample. You must have a copy of the "code" and the "confirmation_uri" and other data you judge important. The confirmation_uri provides a direct url to the bill in iHela. You can directly redirect the user to.
```json
{
	"bill": {
	    "merchant": {
	        "title": "Global Test Merchant",
	        "merchant": {
	            "id": 6,
	            "title": "Global Test Merchant",
	            "merchant_type": {"label": "Biller", "value": "B", "css": null},
	            "merchant_slug": "global-test-merchant",
	            "merchant_logo": null,
	            "merchant_code": 16
	        },
	        "user": {
	            "username": "merchant-username",
	            "email"<EMAIL_ADDRESS>	            "ihela_code": "1",
	            "bio": "Merchant bio",
	            "image": "https://testgate.ihela.online/vwmedia/users/profiles/d7c-4c38-ae24-284f1b554b92.png",
	            "following": false
	        },
	    },
	    "initiated_by": {
	        "username": "client-username",
	        "email"<EMAIL_ADDRESS>	        "ihela_code": "2",
	        "bio": "Client bio",
	        "image": "https://testgate.ihela.online/vwmedia/users/profiles/d7c257a1b554b92.png",
	        "following": false
	    },
	    "paid_by": null,
	    "amount": "2000.00",
	    "currency": 108,
	    "currency_info": {
	        "iso_code": 108,
	        "iso_alpha_code": "BIF",
	        "title": "BURUNDIAN FRANC",
	        "abbreviation": "BIF",
	        "operation_min_amount": "1.00"
	    },
	    "description": "Global Test Merchant (1) My description 58646cc904c471d6413e",
	    "merchant_reference": "58646cc904c471d6413e",
	    "status": {"label": "Initiated", "value": "I", "css": "tag is-info"},
	    "expired": false,
	    "code": "BILL-20200813-B8GUIUDIN0",
	    "redirect_uri": null,
	    "confirmation_uri": "https://mytest.ihela.online/u/operations/bill/confirm/BILL-20200813-B8GUIUDIN0",
	    "payment_reference": null,
	    "created_at": "2020-08-13T10:24:58.014322Z"
	},
	"response_status": 200
}
```

### Verify a bill

You can then verify after if the user has paid the bill in iHela. (NB: He must go to iHela and pay). You can provide a background task or a reload button in your interface for checking.
``` python
cl.verify_bill(bill["bill"]["merchant_reference"], bill["bill"]["code"])
```
Here is a response sample. Bill can be **Pending**, **Paid** or **Expired**. If bill is paid, "bank_reference" will return the transaction reference in the bank.
```json
{
    "bill": {
        "bank_reference": null,
        "reference": "BILL-20200813-B8GUIUDIN0",
        "code": "58646cc904c471d6413e",
        "status": "Pending"
    },
    "response_status": 200
}
```

### Cashin client account

If your client has to be refunded or gratified directly in this account in our system, use the **cashin** operation.
```python
# Get banks using the function below and provide a select widget to the user to get a bank slug

```
The bank list response gives the bank information that can help you provide a complete widget on your side (name, type, different codes, logo and icon, account_masked_text for using a formatted widget ...)
```json

{
    "banks": [
        {
            "slug": "MF1-0001",
            "name": "iHela Credit Union",
            "swift_code": null,
            "bank_code": 1,
            "bank_type": "MF1",
            "can_create_account_online": true,
            "is_active": true,
            "company": {
                "name": "iHela",
                "nickname": null,
                "slug": "ihela",
                "about": "",
                "logo": "https://testgate.ihela.online/vwmedia/addressbook/companies/ihelalogo.jpg",
                "logo_icon": "https://testgate.ihela.online/vwmedia/addressbook/companies/icon/ihela_favicon_red.png",
            },
            "account_masked_text": "000000-00",
        },
        {
            "slug": "BNQ-0002",
            "name": "Mutec",
            "swift_code": null,
            "bank_code": 2,
            "bank_type": "BNQ",
            "can_create_account_online": false,
            "is_active": true,
            "company": {
                "name": "Mutec",
                "nickname": null,
                "slug": "mutec",
                "about": "",
                "logo": "https://testgate.ihela.online/vwmedia/addressbook/companies/logo-mutec-best.png",
                "logo_icon": "https://testgate.ihela.online/vwmedia/addressbook/companies/icon/logo-mutec-best.png",
            },
            "account_masked_text": null,
        },
    ],
    "banksCount": 2,
    "response_status": 200,
}

```
Having the bank will help getting the slug for cashin.

```python
# cashin = cl.cashin_client(BANK_SLUG, ACCOUNT_NUMBER, AMOUNT, MERCHANT_REFERENCE, TRANSACTION_DESCRIPTION)
cashin = cl.cashin_client("MF1-0001", "000016-01", 20000, "REF3223", "Cashin description")
```
Here is an sample example

```json
{
    "bank_slug": "MF1-0001",
    "account": "000016-01",
    "amount": "20000.00",
    "description": "Cashin description",
    "merchant_reference": "REF3223",
    "error": false,
    "error_message": "Success",
    "reference": "CPT-5/01-199",
    "response_status": 200,
}
```

repository: srugano/ihela-pyhton-client

repo_name: srugano/ihela-pyhton-client


text:
# nf-core/imcyto: Documentation

The nf-core/imcyto documentation is split into the following files:

1. [Installation](https://nf-co.re/usage/installation)
2. Pipeline configuration
    * [Local installation](https://nf-co.re/usage/local_installation)
    * [Adding your own system config](https://nf-co.re/usage/adding_own_config)
3. [Running the pipeline](usage.md)
4. [Output and how to interpret the results](output.md)
5. [Troubleshooting](https://nf-co.re/usage/troubleshooting)

repository: nf-core/imcyto

gha_language: Python

repo_name: nf-core/imcyto


text:
# JPEG Website Model Viewer

## STILL IN PROGRESS

This project was made with the purpose of taking in a buffer of
motion JPEG and displaying it into a website.

### Built with:
* Django
* dash.js (https://github.com/Dash-Industry-Forum/dash.js/)
* opencv (Version 4.2.0, unofficial PYTHON distribution coupled with downloaded GIT files
(package should be located at root))

### Licence
    * Apache-2.0

### Authors
    - Burwin Liu (Main Developer)
    - Bin Liu (Inspiration and Guide)

repository: burwinliu-zz/jpgViewer

repo_name: burwinliu-zz/jpgViewer


text:
Authosynth allows you to automatically convert a NSDictionary onto properties of a class.

* Make the class a subclass of Loadable.
* Create an instance using one of

  [MyClass withDictionary:@{@"key", @"value"]]

  [MyClass withJsonString:@"{"key": "value"}]

  [MyClass withJsonData:jsonDataVaraible]

It handles complex and primitive types automatically, for example you can load the class below:

	@interface PrimativesModel : Loadable

	@property (assign) BOOL a;
	@property (assign) char b;
	@property (assign) int c;
	@property (assign) short d;
	@property (assign) long e;
	@property (assign) long long f;
	@property (assign) unsigned char g;
	@property (assign) unsigned int h;
	@property (assign) unsigned short i;
	@property (assign) unsigned long j;
	@property (assign) unsigned long long k;
	@property (assign) float l;
	@property (assign) double m;
	@property (assign) NSString *n;
	@property (assign) NSNumber *o;

	@end

It handles NSDate properties like DateModel below. In this case the value is expected to be in the json as a number of seconds since 1970.

	@interface DateModel : Loadable

	@property (strong) NSDate *date;

	@end

Loadable objects can have other Loadable objects as properties. Arrays of other loadable objects are also supported using the LoadbleArray macro. This macro creates an extra dummy property that allows Loadable to know the type of the array elements.

	@interface InceptionModel : Loadable

	@property (strong) InceptionModel *inception;
	@property (strong) DateModel *model;
	@property (strong) LoadableArray(PrimativesModel, primatives);
	@property (strong) NSArray *numbers;
	@property (strong) NSDictionary *dictionary;

	@end

If a name overlaps a reserved keyword in Objective-C, add an underscore before the name.

	@interface KeywordsModel : Loadable

	@property (assign) int _void;
	@property (assign) int _char;
	@property (assign) int _short;
	@property (assign) int _int;
	@property (assign) int _long;
	@property (assign) int _float;
	@property (assign) int _double;
	@property (assign) int _signed;
	@property (assign) int _unsigned;
	@property (assign) int _id;
	@property (assign) int _const;
	@property (assign) int _volatile;
	@property (assign) int _in;
	@property (assign) int _out;
	@property (assign) int _inout;
	@property (assign) int _bycopy;
	@property (assign) int _byref;
	@property (assign) int _oneway;
	@property (assign) int _self;
	@property (assign) int _super;
	@property (assign) int _default;

	@end

To install in your project, drag Loadable.h and Loadable.m into the left project panel and be sure "copy files into project" is checkmarked.

repository: stevelinz/Autosynth

repo_name: stevelinz/Autosynth


text:
# @nonoll/code-snippet

- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.5.

## Status

![Dependabot](https://api.dependabot.com/badges/status?host=github&repo=nonoll/code-snippet&style=for-the-badge)

[![TRAVIS](https://img.shields.io/travis/com/nonoll/code-snippet/master.svg?style=for-the-badge)](https://travis-ci.org/nonoll/code-snippet/builds)
[![Codecov branch](https://img.shields.io/codecov/c/github/nonoll/code-snippet/master?style=for-the-badge)](https://codecov.io/gh/nonoll/code-snippet)

[![NPM version](https://img.shields.io/npm/v/@nonoll/code-snippet.svg?style=for-the-badge)](https://www.npmjs.com/package/@nonoll/code-snippet)
[![NPM download](https://img.shields.io/npm/dt/@nonoll/code-snippet?style=for-the-badge)](https://www.npmjs.com/package/@nonoll/code-snippet)

[![NPM license](https://img.shields.io/npm/l/@nonoll/code-snippet?style=for-the-badge)](https://github.com/nonoll/code-snippet/blob/master/LICENSE)
[![NPM bundle size](https://img.shields.io/bundlephobia/min/@nonoll/code-snippet?style=for-the-badge)](https://www.npmjs.com/package/@nonoll/code-snippet)

## Links

- [github](https://github.com/nonoll/code-snippet)
- [npm](https://www.npmjs.com/package/@nonoll/code-snippet)
- [docs](https://nonoll.github.io/code-snippet/)
- [codesandbox](https://codesandbox.io/embed/nonollcode-snippet-9gko8?fontsize=14&hidenavigation=1&theme=dark)

repository: nonoll/code-snippet

gha_language: TypeScript

repo_name: nonoll/code-snippet


text:
SpeedTools Guice
-----------

# Guice

Please refer to the top-level index document of SpeedTools to view all the packages
and their content.

repository: tomtom-international/speedtools

gha_language: Java

repo_name: tomtom-international/speedtools


text:
## 0.3.4+2
* Support V2 embedding Flutter API.
* Fixing accept permission bug when using V2 Embedding Flutter API.

## ~~0.3.4+1~~
* **BROKEN VERSION**
* **~~QUICK FIX~~** ~~Using V2 embedding Flutter API.~~

## 0.3.3
* **Bug fix**: Fixing the wrong 'numberOfSongs' property value when
    load albums using getAlbumsFromArtist method.

## 0.3.2
* **Breaking change**: The methods "getAlbumsFromGenre", "getAlbumsFromArtist", "getSongsFromArtist",
    "getSongsFromAlbum", "getSongsFromArtistAlbum", "getSongsFromGenre" and "getArtistsFromGenre"
    now is using a string name parameter instead respective DataModel classes GenreInfo,
    ArtistInfo and AlbumInfo.

* Now is possible fetch multiple ArtistInfo objects using the method "getArtistsById".

* **BUG FIX**: Fixing isMusic and methods like cast issue.

## 0.2.1

* **Breaking change**: Now getSongsFromAlbum don't take an ArtistInfo in parameter. If you want to get
    all songs from an specific album you can use getSongsFromAlbum method. But if you want to get
    all songs from an specific album from an specific artist do this with getSongsFromArtistAlbum
    method.

* Now is possible fetch songs by ID's with getSongsById method.

* Now is possible fetch albums by ID's with getAlbumsById method.

## 0.1.1

* **Bug fix**: Before this fix, getGenre method was returning genres that has no one data
    related, no one artist, album or a song. Now getGenre calls return only genres which
    at least one artist, album or song appears.

## 0.1.0

* Documentation completed

## 0.0.1

* Initial Release


text:
Elasticsearch Cluster Runner
============================

This project runs Elasticsearch cluster on one JVM instance for your development/testing easily.
You can use Elasticsearch Cluster Runner as Embedded Elasticsearch in your application.

## Version

[Versions in Maven Repository](https://repo1.maven.org/maven2/org/codelibs/elasticsearch-cluster-runner/)

## Run on Your Application

Put elasticsearch-cluster-runner if using Maven:

    <dependency>
        <groupId>org.codelibs</groupId>
        <artifactId>elasticsearch-cluster-runner</artifactId>
        <version>x.x.x.0</version>
    </dependency>

### Start Cluster Runner

    import static org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner.newConfigs;
    ...
    // create runner instance
    ElasticsearchClusterRunner runner = new ElasticsearchClusterRunner();
    // create ES nodes
    runner.onBuild(new ElasticsearchClusterRunner.Builder() {
        @Override
        public void build(final int number, final Builder settingsBuilder) {
            // put elasticsearch settings
            // settingsBuilder.put("index.number_of_replicas", 0);
        }
    }).build(newConfigs());

build(Configs) method configures/starts Clsuter Runner.

### Stop Cluster Runner

    // close runner
    runner.close();

### Clean up

    // delete all files(config and index)
    runner.clean();

## Run on JUnit

Put elasticsearch-cluster-runner as test scope:

    <dependency>
        <groupId>org.codelibs</groupId>
        <artifactId>elasticsearch-cluster-runner</artifactId>
        <version>x.x.x.0</version>
        <scope>test</scope>
    </dependency>

and see [ElasticsearchClusterRunnerTest](https://github.com/codelibs/elasticsearch-cluster-runner/blob/master/src/test/java/org/codelibs/elasticsearch/runner/ElasticsearchClusterRunnerTest.java "ElasticsearchClusterRunnerTest").

## Run as Standalone

### Install Maven

Download and install Maven 3 from http://maven.apache.org/.

### Clone This Project

    git clone https://github.com/codelibs/elasticsearch-cluster-runner.git

### Build This Project

    mvn compile

## Run/Stop Elasticsearch Cluster

### Run Cluster

Run:

    mvn exec:java

The default cluster has 3 nodes and the root directory for Elasticsearch is es\_home.
Nodes use 9201-9203 port for HTTP and 9301-9303 port for Transport.
If you want to change the number of node, Run:

    mvn exec:java -Dexec.args="-basePath es_home -numOfNode 4"

### Stop Cluster

Type Ctrl-c or kill the process.

repository: wfzhu/elasticsearch-cluster-runner

repo_name: wfzhu/elasticsearch-cluster-runner


text:
You may write your AI with whatever technology you wish and whatever algorithm
you wish so long as it obeys the following restrictions:

1. It must be easily runnable or compilable on Windows 7 x64.  I am currently
   prepared to compile C/C++ code using GCC 4.8.1 via MinGW-W64, Java 7, and
   Python 2.7.6.  If you choose to use a different language or technology, you
   must be prepared to at least point me in the right direction to get it
   working if I ask.

2. It must receive as command line arguments a string identifier and a server
   port number.

3. It must be use a TCP/IP connection to communicate with the server [using this
   application protocol][1].

4. Your AI must be designed to win games.  While your AI does not have to be
   perfect, and it is acceptable for it to take calculated risks, but it must
   not ever intentionally lose a game.  Enforced
   violations include:

   - Making an accusation that has a card it is holding.

   - Failing to make an accusation when it has (or should have) learned the
     solution, though this will only be enforced in situations when no player
     could disprove its suggestion.

5. It may never make any suggestion more than one time in a game.  While this is
   not forbidden in actual Speed Clue rules, allowing AIs to make the same
   suggestion more than once could result in games that never end.

6. It must take no more than 10 seconds for your AI to respond to any message
   from the server.  I intend to run thousands of games to determine the winner,
   so your code must be reasonably fast.

7. It may not use any technique that either interferes with other AIs or steals
   information that cannot be inferred from what the server sends directly to
   it.  Examples include, but are not limited to, claiming large blocks of
   memory for extended periods of time, continuously running a large number of
   threads, sniffing for packets communicated by opponents, or tampering with
   packets.  If you use a technique that does consume a lot of memory or needs
   many threads, limit the time such resources are used so other AIs get their
   access to the resources as well.

8. Any ideas or code you borrow from others must be noticeably cited.

I reserve the right to disqualify any entry that does not follow, or flaunts the
spirit of, these rules.

[1]: https://github.com/sadakatsu/SpeedClueContest/tree/master/protocol.md

repository: sadakatsu/SpeedClueContest

repo_name: sadakatsu/SpeedClueContest


text:
---
hrs_structure:
  division: '4'
  volume: '13'
  title: '36'
  chapter: '661'
  section: ''
type: chapter
tags:
  - Court
  - Judicial Proceeding
menu:
  hrs:
    identifier: HRS0661
    parent: title36
    name: Chapter 661 Actions By and Against the State
weight: 68000
title: Actions By and Against the State
full_title: Chapter 661 Actions By and Against the State
---
**CHAPTER 661**

**ACTIONS BY AND AGAINST THE STATE**

Part I. General Provisions

Section

661-1 Jurisdiction

661-2 Judgment against claimant when

661-3 No jurisdiction, when

661-4 Action by alien, when

661-5 Limitations on action

661-6 Complaint; assignments

661-7 Claim forfeited by fraud

661-8 Interest

661-9 Repealed

661-10 Actions by State

661-11 Tort claims against State where covered by insurance

661-12 Awards of attorney's fees against agencies

Part II. Qui Tam Actions or Recovery of

False Claims to the State

661-21 Actions for false claims to the State; qui tam actions

661-22 Civil actions for false claims

661-23 Evidentiary determination; burden of proof

661-24 Statute of limitations

661-25 Action by private persons

661-26 Rights of parties to qui tam actions

661-27 Awards to qui tam plaintiffs

661-28 Repealed

661-29 Fees and costs of litigation

661-30 Relief from retaliatory actions

661-31 Certain actions barred

Law Journals and Reviews

Plausibility of Notice Pleading: Hawaii's Pleading Standards in the Wake of Ashcroft v. Iqbal. 32 UH L. Rev. 485 (2010).

Ala Loop and the Private Right of Action Under Hawaii Constitution Article XI, Section 9: Charting a Path Toward a Cohesive Enforcement Scheme. 33 UH L. Rev. 367 (2010).

Case Notes

Plaintiff's lawsuit against employees' retirement system was obviously cognizable under this chapter as a claim against the State. 75 H. 42, 856 P.2d 1227 (1993).

Trial court erred in granting plaintiffs the right to sue for breach of contract under this chapter where, with respect to the individual beneficiary claims under chapter 674, the language of Act 14, L Sp 1995 merely indicated the legislature's expressed desire for "title-related" claims to be settled in a timely manner. 111 H. 84, 137 P.3d 990 (2006).

Where employees' retirement system trustees were alleging in lawsuit that Act 100, L 1999 was unconstitutional as being violative of article XVI, §2 of the Hawaii constitution, their claims were not "founded upon any statute of the State; or upon any regulation of an executive department; or upon any contract" and were not referred to the court by the legislature; thus, trustees' claims were not cognizable under this chapter, and, therefore, were not subject to the statute of limitations set forth in §661-5\. 114 H. 302, 162 P.3d 696 (2007).

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
A PHP Finite State Machine (With Laravel 5.4 integration)
==========================
[![Build Status](https://travis-ci.org/Daveawb/UnderStated.svg?branch=master)](https://travis-ci.org/Daveawb/UnderStated)

## Why use an FSM?
FSM's allow developers tight control over the state of different resources within an application. There are many
articles detailing FSM's and what they are and what they're capable of so I won't go into much detail here. Safe to say, by managing state within an FSM you centralise and manage state simply and cleanly without needing to build it into your business logic. There are plenty of examples within this repository that should give you an idea of the practical uses of an FSM. Some good examples are present in libraries such as Redux, Angular UI Router and Apollo. Whilst this is an implementation for PHP where state isn't as much of a problem as other languages or technologies (Browser based JS and more importantly NodeJS) a well constructed FSM can ease the burden of building and rationalising large scale applications.

## Requirements
- \>= PHP 7.0
- (optional) \>= Laravel 5.4

## Installation
### Composer
Add the following to your composer.json file

````json
{
    "require": {
        "daveawb/understated": "0.0.4"
    }
}
````

### Laravel Integration
Open `config/app.php` and register the required service provider.

```php
'providers' => [
    // ...
    UnderStated\Providers\UnderStatedServiceProvider::class,
]
```

## A Simple FSM
````php
use UnderStated\States\State;

$builder = new UnderStated\Builders\GraphBuilder();

$fsm = $builder->create()

    // Create an 'on' state
    ->state('on', function() { /* state is on */ })

    // Create an 'off' state
    ->state('off', function() { /* state is off */ }, State::INITIAL)

    // Create a transition (undirected) between the two states
    ->transition('on', 'off', true)

    // Get the FSM instance
    ->get();
````

Now that we have that out of the way, how do you use it?

We declared an undirected transition between states 'on' and 'off'. This means that both those states are capable of
transitioning from one to the other indefinitely. Also notice the `State::INITIAL` passed as the third argument to
the 'off' state. This will mean that when the FSM is initialised this will be the state it is in.

Before we go any further we need to initialise the FSM.

````php
// Initialise using the state marked with State::INITIAL or the first state added.
$fsm->initialise();

// If you want to override the initial state, pass it in to the `initialise` method
$fsm->initialise('on');
````

Now the FSM is initialised we can start transitioning from one state to another.

````php
$fsm->transition('on');

echo ($fsm->getState()->getId()); // outputs 'on'

$fsm->transition('off');

echo ($fsm->getState()->getId()); // outputs 'off'
````

## Class based FSM
Closures are useful for quick implementations but when complex behaviour is required within states and in the transition logic, it is much better to create state representations as classes. We'll look again at the on off example.

For full examples using states and implementing complex interactions please review the example implementations included in this project.

Each state has three predefined handles that are called automatically by the FSM. These are `onEnter()`, `onExit()` and `onReset()`.

### onEnter()
```php
/**
 * Automatically called when this state is transitioned to. Returning false from
 * this method will block the transition attempt and the previous state will
 * remain as the active state.
 *
 * @param  State $previousState
 * @return boolean
 */
public function onEnter(State $previousState)
```
Calling `transition()` or `handle()` on the previous state however will throw an exception and will not fulfil either method.

### onExit()
```php
/**
 * Automatically called when this state is transitioned from. Returning false from
 * this method will block the transition attempt and the current state will
 * remain as the active state.
 *
 * @param  State $nextState
 * @return boolean
 */
public function onExit(State $nextState)
```
This method, much like onEnter, is fired when transitioning from the current state to another. The same rules apply as per onEnter, calling `transition()` or `handle()` on the next state will throw an exception.

### onReset()
This method is used for cleaning up the state once it has been transitioned from and is no longer active. This method is used internally for removing event bindings from the state and as such if you override this method be sure to call the parents implementation.

````php
public function onReset()
{
    // <-- Clean up logic here

    parent::onReset();
}
````
### Example state
````php
use UnderStated\State;

class StateOne extends State
{
    /**
     * @param State
     * @return bool
     */
    public function onEnter(State $previous)
    {
        $this->handle('myHandle');

        return true;
    }

    /**
     * A state handler
     */
    public function myHandle()
    {
        // I'm handled when the state changes
    }

    /**
     * @param State
     * @return boolean
     */
    public function onExit(State $next)
    {
        // Will return true if unimplemented
        return true;
    }
}
````

Using this state is a case of giving the fully qualified class name as the second parameter to the builders state method.

````php
$builder->create()
    ->state('on', StateOne::class)
````

# Examples
Take a look at the [examples](https://github.com/Daveawb/UnderStated/tree/master/examples) for a comprehensive select
 of different ways the FSM can be used.

# Changelog
0.0.4 -> 1.0.0
- General code tidy up, PSR-2 compliance and removed some unused code.
- Deprecated and removed `get` method from the `MachineBuilder` interface in favour of `getMachine`.
- `getMachine` method accepts no arguments and can not initialise an FSM unlike its precursor `get`.
- `transition` method on `Machine` now returns a boolean to indicate success.

repository: alvlapo/UnderStated

repo_name: alvlapo/UnderStated


text:
# Scenario Exercise
Use whichever use whatever programming language and platform that you feel most
comfortable in.
Our team who’s working on a SaaS client receives a batch of CSV files every night; which we
need to load into a database. Our team uses this data to develop dashboards for the client,
and to try to make predictions on whether or not a lead will convert.
For the purposes of this exercise, we have given you one CSV file with ~10k rows; please
assume that you receive 1k rows each night.
Given the attached Lead List, please:

1. Define and architect a database using the available columns
a. Examine the columns – what columns do you think are relevant to creating a
prediction model?
2. Write a load and store function
3. Write a function to return “Hot” leads from the “Qualification Level” in JSON format.
Please return:
1. Your answers to the above
2. The JSON file output from above

## System requirements
- Java > 8.x
- Scala 2.11
- Spark 2.4.0
- sbt 1.2.7


text:
# API Starter - Alexa Skill Template

This is an Alexa skill template that provides a simple example of a skill that calls an external API. The API used is the [api.open-notify.org API](http://api.open-notify.org/astros.json) which returns a list of the astronauts currently in space.

### Live example
To try a live example of this skill template, you can enable the [Ground Control Alexa skill](https://www.amazon.com/Dabble-Lab-Ground-Control/dp/B075CWGY1P/ref=sr_1_sc_1?ie=UTF8&qid=1514557483&sr=8-1-spell&keywords=grond+control+alexa+skill). Just say: `Alexa, enable Ground Control` and then `Alexa, open Ground Control`.

### Using this template

This template uses the [Alexa Skills Kit SDK 2.0 for Node.js](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs) and was designed to be used with the [Alexa Skills Kit Command-Line Interface](https://developer.amazon.com/docs/smapi/ask-cli-intro.html) (aka: ASK-CLI). After installing the ASK-CLI you can run the following command to setup a new skill project based on this template.

`$ ask new --template --url http://skilltemplates.com/templates.json`

After running the previous command you'll see of list of templates to choose from. Pick the template named `API Starter`. This will create a new folder named `./api-starter/` all of the code for the template will be located in that folder.

### Video Tutorial

[coming soon]

repository: dacf/Reddit-Reads

repo_name: dacf/Reddit-Reads


text:
# Dejavu

This is a audio fingerprint & recognition library implemented in Python, based on https://github.com/worldveil/dejavu with many improvements.

## Fingerprinting

Start by creating a Dejavu object with your configurations settings (Dejavu takes an ordinary Python dictionary for the settings).

```python
>>> from dejavu import Dejavu
>>> config = {
...     "database": {
...         "host": "<IP_ADDRESS>",
...         "user": "root",
...         "passwd": <password above>,
...         "db": <name of the database you created above>,
...     }
... }
>>> djv = Dejavu(config)
```

Next, give the `fingerprint_directory` method three arguments:
* input directory to look for audio files
* audio extensions to look for in the input directory
* number of processes (optional)

```python
>>> djv.fingerprint_directory("data/audios", [".mp3"], 3)
```

For a large amount of files, this will take a while. However, Dejavu is robust enough you can kill and restart without affecting progress: Dejavu remembers which songs it fingerprinted and converted and which it didn't, and so won't repeat itself.

You'll have a lot of fingerprints once it completes a large folder of mp3s:
```python
>>> print djv.db.get_num_fingerprints()
5442376
```

Also, any subsequent calls to `fingerprint_file` or `fingerprint_directory` will fingerprint and add those songs to the database as well. It's meant to simulate a system where as new songs are released, they are fingerprinted and added to the database seemlessly without stopping the system.

## Licence

[MIT Licence](LICENSE)

repository: yunpengn/dejavu

repo_name: yunpengn/dejavu


text:
# Quip Automation API Auth example

A simple demo for getting a Quip API token you can use in a proxy
application to make requests using the Automation API
See [https://quip.com/dev/automation/documentation][]

## Setup

### 1.  Copy the App ID and replace the `"id"` field in `app/manifest.json`.

### 2. Build .ele bundle

```bash
npm run build
```

### 3. An Enterprise-enabled Site Admin must create an API Key for your App

1. Go to [https://admin.quip.com/][]
2. Find the section named "API Keys"

-   If not present, be sure that the Site has "applications enabled".

3. Click on "Create API Key" and add an entry for this App

-   This is where you'll get the Client ID and Client Secret for the Auth config
-   Note that the service name here is not programmatically important

### 4. Configure Auth

1. Go to [https://quip.com/dev/console][]
2. Click on the app you just updated
3. Go to the "Auth" section at the bottom, select OAUTH2 as the auth type and click on "Add"
4. Fill out the Auth configuration (leave everything else blank):
    - **Name**: `YourAppName`
    - You'll need to use the name you choose here in place of `quip-automation-api` when getting an instance of the Live Apps Auth instace (e.g. `quip.apps.auth("quip-automation-api")`)

-   **Authorization URL**: `https://platform.quip.com/1/oauth/login`
-   **Client ID**: Client ID from admin.quip.com
-   **Client Secret**: Client Secret from admin.quip.com
-   **Token URL**: `https://platform.quip.com/1/oauth/access_token`
-   **Proxy API Domains**: `https://platform.quip.com/`

5. Click on Update.
6. Click on `Test Login`. It should work.

repository: quip/quip-apps

branch_name: refs/heads/next

repo_name: quip/quip-apps


text:
# Introduction

Welcome to the documentation of Wizard module!

In this part, the following questions will be answered:

* Why should I use wizards?
* Why should I use this module?

## Why should I use wizards?

There are many situations when creating forms, that either you cannot accept all data on one page, either because certain responses result in a different set of subsequent questions, or because you form is so long that you need to split it up into multiple pages. Sometimes, you also need to show confirmation of the form data prior to processing the data.

## Why should I use this module?

The module allows you to separate your code into different stages which the sequence will be handled automatically.

### Navigation

* Continue to [the **Quick Start**](/docs/02. Quick Start.md)
* Back to [the Index](/docs/README.md)

repository: thomasvargiu/Wizard

path: /docs/01. Introduction.md

filename: 01. Introduction.md

repo_name: thomasvargiu/Wizard


text:
---
title: 'How Gamification can help to take your Incentive Plan to a whole new level?'
og_title: 'How Gamification can help to take your Incentive Plan to a whole new level?'
description: Want to make the most out of your sales incentive plan? Learn how integrating it with gamification enhances your incentive plan and takes it to a whole new level.
og_description: Want to make the most out of your sales incentive plan? Learn how integrating it with gamification enhances your incentive plan and takes it to a whole new level.
categories: ["ACM"]
id: 113
author:
  name: SmartWinnr
  email<EMAIL_ADDRESS>weight: -113
slug: "/how-gamification-can-help-to-take-your-incentive-plan-to-a-whole-new-level"
featured_image: "/images/113.how-gamification-can-help-to-take-your-incentive-plan-to-a-whole-new-level.jpg"
isFeatured: false
date: '2020-09-27T10:00:32+08:00'
tags: ["Sales", "Gamification", "Sales Contests"]
relatedBlogs : ["Best Practices to Design your Sales Incentive Plan", "Best practices to Implement a Sales Incentive Plan", "23 Sales incentive ideas to keep your sales team motivated", "Sales Contest Communication Template", "Top 20 Sales Contest Names", "The Psychology of Sales Gamification"]
---

A well designed sales Incentive programis a way to reward your top performers. When the incentive plan is implemented wisely, it can be highly effective in:

* Improving employee engagement

* Building employee loyalty, and hence decreasing attrition

* Driving better business outcomes

You must have already finalised your incentive plan. If you haven’t, here are some best practices to design and implement a sales incentive plan:

 Best Practices to Design your Sales Incentive Plan

 Best practices to Implement a Sales Incentive Plan

Gamification has the capacity to take your Sales Incentive Plan to the next level.

### **Gamification and its Significance**

Gamification is the application of game mechanics (including features like points, levels, badges, and other incentives) to non-game contexts to affect behavior in a positive way.

Gamification is no longer just a buzz word that is used in the tech community. It is now being widely used across industries and departments to improve employee productivity, performance, and engagement.

Here are some facts about gamification that prove its importance:

> Research says, while people are motivated by tangible rewards, what really drives their motivation is a sense of recognition. Gamification addresses this by actively recognizing the achievements of employees while adding an element of fun, to increase participation and engagement rates.

Even top brands like Nike, Coca-Cola, Nissan, and Ford are leveraging gamification in their incentive plan to effectively engage their employees.

#### **How can you Gamify your Sales Incentive Plan?**

There are different ways of adding gamification into your incentive plan.

Breakdown your annual sales targets into weekly, monthly, or quarterly targets (short-term goals). Then, create contests or games around each of these targets. Introduce game elements like:

* Levels

* Points

* Competitions

* Challenges

* Leaderboards

* Virtual badges etc

Conduct these contests for different markets. Also, set different winning criteria in the contests. This way you will be able to ensure that everyone gets a chance to gain recognition for their work.

Finally, reward exciting incentives/ awards/ prizes to everyone who gives their best performance in the contests.

  Are you looking for a ready-made Sales Contest Template? Click here to design your own template for free, in just 3 clicks.

#### **How Gamification takes your Incentive Plan to the next level?**

**1. Creates fun and excitement around achieving targets**

Games are fun and exciting for everyone. Especially for salespeople because of their inherent competitive spirit.

Salespeople aren’t solely motivated by the incentives. Research from the Tas group found that most people are motivated by

Competitive work environment

Making progress

And winning

Gamification encapsulates all these aspects of motivation and makes your sales reps excited, focused, and energized-- all the traits that are important to have in a sales team.

**2. Allows you to reward behaviors along with the Final Outcome**

Your incentive plan focuses on the bigger picture and rewards the final outcome. But it’s crucial to remember that-- smaller habits result in bigger outcomes. So, your focus should not just be to motivate your reps to achieve a final outcome. You should also to motivate them to adopt smaller, everyday positive behaviors like:

* Updating the CRM every day

* Calling a certain number of clients each day

* Getting positive feedback from the customers

Gamifying and rewarding these activities will help in getting your reps to adopt these positive behaviors and follow them religiously.

**3. Shows ways to improve**

With gamification, you can incentivize different levels of performance. It helps to map out a clear path of progression that maps to the steps of the sell. For example, you will be able to see how a sales rep successfully goes from booking meetings to more important tasks and finally making a sale.

This helps you and your reps to clearly understand

* Where they are lagging

* What they must do to improve

* What can take them to the next level

This makes it easy for the reps to improve their performance and progress in their career. This also means that everyone gets a fair chance instead of just the top performers every time.

Do you want to know more?  Contact us for a 30 minutes free consultation.

#### **Key best practices to integrate gamification into your Incentive plan**

To ensure successful integration of gamification into your incentive program, you need to follow these best practices below:

* **Assess/know your audience:** Every team has a unique demographic and dynamic. What might resonate with one employee group might not work for another. So, the key is to know your audience and create games for them accordingly.

* **Keep it simple:** Games should be kept simple to ensure a good balance between learning, work progress, and fun

* **Digitize the games:** Modern gamification shouldn't just involve a whiteboard with a few rankings written on it. Instead, use digitized leaderboards so that your sales team can access the stats when and where they want.

* **Encourage healthy competition:** Regularly update your employees with their progress in the competition. Encourage them to beat the employee who is above them on the leaderboard. This helps your employees to improve one step at a time and creates a healthy competition

* **Measure participation:** Measure your employees’ participation in the contests regularly to identify engagement gaps and address them immediately.

* **Track Progress:** Track the progress regularly at the individual and team levels. Respond to any gaps immediately

* **Encourage Multiple Interactions:** Managers should make time to have one-on-one conversations with the reps regularly during the course of games to ensure that everyone is comfortable with the game and are motivated to achieve their targets.

* **Keep it fresh:** Remember to keep games fresh by introducing new elements that will keep users interested and encourage long-term engagement.

* **Incorporate a meaningful prize/reward strategy:** Finally, ensure that rewards, whether physical prizes, virtual rewards, or simple recognition, are meaningful and motivating to your users. Ensure that the rewards match the amount of effort employees have put in to achieve it.

For example, a grand prize such as “holiday in an exotic location” could be reserved for those who exceed their targets substantially. This helps to keep your top performers motivated to achieve even higher going forward.

 SmartWinnr’s Gamified sales contests provide an effective and efficient way for you to introduce gamification into your incentive plan. We help you run hassle-free, fully automated sales contests. No tedious excel calculations, live leaderboards, insight into team level and individual level performance, and more.

If you’re from the Insurance industry, explore how your sales incentive plan can be embedded into increasing productivity, decreasing agent attrition and reducing supervisory cost.

If you’re from Banking, explore how your sales incentive plan can be embedded into increasing productivity, decreasing agent attrition and reducing supervisory cost.

If you’re from the Pharmaceutical, industry, integrate your sales incentive plan into a gamified sales contest, focusing on collections, POB, doctor visits, chemist visits and more.

If you’re from the Medical Devices, industry, create one incentive plan that covers product knowledge, to handle customer conversations, to programming devices, to sales.

Curious to learn more about it? Book a demo today!

repository: smartwinnr/site-smartwinnr

repo_name: smartwinnr/site-smartwinnr


text:
# Formal At Scale Technology

This repo currently contains circular pointer FIFO and data integrity scoreboard implementations in Verilog, Magma, and CoreIR.
The modules are all parameterized and the current target is to improve bounded model checking of data integrity with WIDTH=8 and
DEPTH=8, with the hope that improving BMC on these parameter values would also help with larger values. The Verilog implementation
also contains a Deficit Weighted Round Robin Arbiter. This can be used in combination with the FIFO to create difficult verification
challenges of composed arbiters and FIFOs.

The data integrity scoreboard keeps track of the number of elements, non-deterministically selects a "magic packet", and checks that
this packet exits when it should.

## Known Bugs
* The arbiter fails liveness checks if the quantum values are not fixed at the packet size. This needs further investigation.
* On some systems, Yosys fails to produce a .vcd file for SMT solvers other than z3.

## Required Software
* [Yosys](https://github.com/YosysHQ/yosys)
* [CVC4](https://github.com/CVC4/CVC4)

## Magma Flow
Magma is a hardware generator language embedded in Python. The implementations in this library also make use of Mantle,
a library of useful Magma circuits.

Magma has backends for Lattice FPGAs and CoreIR (the Verilog backend exists but has not been maintained). For our purposes, we
will write a generator in Magma, which produces a (concrete) circuit in CoreIR. Then using the CoreIR command line, we can
produce Verilog which is readable by Yosys to produce SMT-LIBv2. **To use with CoreIR, set the `MANTLE_TARGET` environment
variable to `coreir`.**

### (Extra) Required Software for Magma track
* Python3.6
* [Magma](https://github.com/phanrahan/magma)
* [Mantle](https://github.com/phanrahan/mantle)
* [CoreIR](https://github.com/rdaly525/coreir)

## Verilog Flow
In the Verilog directory are SystemVerilog implementations with embedded data integrity assertions and the necessary
assumptions. The script `check.sh` uses Yosys to read in these files, process the circuit and produce SMT-LIB
("Scoreboard.smt2"). Then it calls the `yosys-smtbmc` script (comes bundled with Yosys) with the desired solver and bound
for a bounded model checking run. Adding `-i` to the `yosys-smtbmc` invocation would start a k-induction run. If a
counter example is found, it is written to "disb.vcd".

No extra software required, except a Waveform viewer for viewing counter examples.

repository: makaimann/Stanford-FAST

repo_name: makaimann/Stanford-FAST


text:
---
name: Public Instance Monitor Increase Request
about: Request more monitor slots for use with the public instance of the bot
title: Public Instance Monitor Increase Request
labels: public-instance-request
assignees: zuedev

---

<!--
Game server monitoring causes significantly more network strain on our servers than our other bots. To help mitigate this, we have limited the public bot to only 3 active monitors per Discord user.

However, we are able to manually increase this limit following a review of legitimacy performed by a human being. This process will be mainly automated soon, but for now it is done manually.

In order to receive an increase, please submit this issue with the following information:
  - Your Discord tag (username#1234)
  - A valid invite link to your Discord server
  - The amount of extra server monitors you need

Enter this information after the arrow below on the next line! :>
-->

license: Unlicense


text:
---
morea_id: experience-H03
morea_type: experience
title: "H03: Simulate a pair of six sided dice."
published: True
morea_start_date: "2016-09-16T23:55:00"
morea_summary: "Write a program that answers the question how many times must you roll the dice?"
morea_labels:
  - "Homework Assignment"
---

# ICS 111 Homework Assignment H03: Simulate a pair of six sided dice

1) How many times do you have to roll a pair of six sided dice before they come up seven? You could do the experiment by rolling the dice by hand. Write a computer program that simulates the experiment. The program should report the number of rolls that it makes before the dice come up seven.

The text's Exercise 2.2 explained how to simulate rolling a pair of dice.

2) Modify the program to ask the user for a number between 2 and 12, then run the simulation counting the rolls before the dice come up with the user's choice.

## Turning in the Assignment

The assignment is due on Friday, September 16th at 11:55pm. You may turn it in early.

1. Conduct a personal review of your code before turning it in. Does your code follow the [Java Coding Standard](../references/reading-java-coding-standard.html)?

   Is it clear and well commented?

2. Test your code.

    * Does it produce the correct output? How do you know?

3. Sign into Laulima, then navigate to the ICS111 site. In the left hand side of the site, there is an Assignments tab/link.  Click on it and view all of the posted assignments. Select the assignment that you want to turn in and attach your files and accept the honor pledge to submit the assignment.

repository: cammoore/MoreaNextSemester

repo_name: cammoore/MoreaNextSemester


text:
---
layout: post
title: "OsPLL4"
description: ""
category: genes
tags: [development, pollen, panicle, sterility, male sterility, pollen development]
---

* **Information**
    + Symbol: OsPLL4
    + MSU: [LOC_Os04g05050](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os04g05050)
    + RAPdb: [Os04g0137001](https://rapdb.dna.affrc.go.jp/locus/?name=Os04g0137001),[Os04g0137100](https://rapdb.dna.affrc.go.jp/locus/?name=Os04g0137100),[Os04g0137201](https://rapdb.dna.affrc.go.jp/locus/?name=Os04g0137201)

* **Publication**
    + [Genome-wide identification of the pectate lyase-like PLL gene family and functional analysis of two PLL genes in rice.](http://www.ncbi.nlm.nih.gov/pubmed?term=Genome-wide identification of the pectate lyase-like PLL gene family and functional analysis of two PLL genes in rice.%5BTitle%5D), 2018, Mol Genet Genomics.

* **Genbank accession number**

* **Key message**
    + Notably, OsPLL1, OsPLL3, OsPLL4 and OsPLL12 exhibit strong and preferential expression in panicles suggesting that the potential roles of these genes are crucial during rice panicle development
    + Moreover, knockdown of OsPLL3 and OsPLL4 by artificial microRNA (amiRNA) disrupted normal pollen development and resulted in partial male sterility

* **Connection**

[//]: # * **Key figures**