text:
---
app_id: com.github.parnold-x.nasc
title: "NaSC"
summary: "Do maths like a normal person"
developer: "Peter Arnold"
homepage: https://github.com/parnold-x/nasc
help_page: false
bugtracker: false
dist: hera
screenshots:
  - https://appstream.elementary.io/appcenter/media/bionic/com/github/parnold-x.nasc/698B3A30CBA03573C78D634860D207AC/screenshots/image-1_orig.png
  - https://appstream.elementary.io/appcenter/media/bionic/com/github/parnold-x.nasc/698B3A30CBA03573C78D634860D207AC/screenshots/image-2_orig.png
  - https://appstream.elementary.io/appcenter/media/bionic/com/github/parnold-x.nasc/698B3A30CBA03573C78D634860D207AC/screenshots/image-3_orig.png
icons:
  "64": https://appstream.elementary.io/appcenter/media/bionic/com/github/parnold-x.nasc/698B3A30CBA03573C78D634860D207AC/icons/64x64/com.github.parnold-x.nasc_com.github.parnold-x.nasc.png
  "128": https://appstream.elementary.io/appcenter/media/bionic/com/github/parnold-x.nasc/698B3A30CBA03573C78D634860D207AC/icons/128x128/com.github.parnold-x.nasc_com.github.parnold-x.nasc.png
  "64@2": <EMAIL_ADDRESS>color:
  primary: "#3278cd"
  primary-text: "rgb(157, 200, 236)"
price: 8
releases:
- version: 0.7.6
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Fixed a bug regarding unnecessary added spaces

- version: 0.7.5
  unix-timestamp:<PHONE_NUMBER>
  description: |-

To define a user function type e.g.: function kineticEnergy 0.5*\x*\y^2

Then you can use it anywhere e.g. car = kineticEnergy(1000 kg, 3 m/s)

- version: 0.7.4
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Fixed a bug that caused problems when using comments inline

Better handling of whitespaces with variable declaration and newlines

Improved the updating of the results while doing line movements

- version: 0.7.3
  unix-timestamp:<PHONE_NUMBER>
  description: |-

Fixed a bug that caused a crash during startup

Fixed a case where the ans and line tokens failed to parse

Support for dark themes

Share panes to MathB.in

- version: 0.7.1
  unix-timestamp:<PHONE_NUMBER>
  description: |-

You can now manage multiple calculation sheets - load, add, remove and rename sheets

Fixed a bug that should make NaSC much more stable

Save sheets dynamically

Removed auto complete functions with parenthesis

Preperation to make NaSC translatable

redirect_from: /com.github.parnold-x.nasc.desktop/
---

It’s an app where you do maths like a normal person. It lets you type whatever you want and smartly figures out what is math and spits out an answer on the right pane. Then you can plug those answers in to future equations and if that answer changes, so does the equations it’s used in.

license: Unlicense

repository: elementary/appcenter-web

branch_name: refs/heads/main

gha_language: Ruby

gha_license_id: Unlicense

repo_name: elementary/appcenter-web


text:
##### Objectives and Measures

This is boilerplate text to put in your HTML report.  Describe the objectives and measures that you use, why you selected them, etc.  You may want to include a subsection on stakeholders as well.

The following table provides the Objectives and Measures used in this analysis.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Dweet

Ruby gem for querying your dweet.io things !

## Installation

Add this line to your application's Gemfile:

    gem 'dweet'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install dweet

## Usage

Create your Thing

    thing = Thing.new "CoffeeMachine"

Create a dweet and affect a Hash as content

    status = Dweet.new
    status.content = { :coffee_ready => true, :amount => "2 cups" }

Publish it!

    result_status = thing.publish status
    puts result_status.created

Retrieve all dweets for your Thing

    things.all do |dweet|
        puts dweet.content["coffee_ready"]
    end

    #or in another way with a more global interface

    DweetIO.all_for("CoffeeMachine)

Retrieve last known dweet for your Thing

    thing.last do |dweet|
        puts dweet.content["coffee_ready"]
    end

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push -u origin my-new-feature`)
6. Merge to master (`git checkout master`) (`git merge my-new-feature`) (`git push`)
    although it is possible to create a pull request from different branches it is better keep 'master' in sync
7. Create new Pull Request

repository: alexwebgr/ruby-dweetio

repo_name: alexwebgr/ruby-dweetio


text:
---
title: 20/04/17
layout: post
author: nivethan.thavaraj
permalink: /20/04/17/
source-id: 1cVCpMcQzdfHJN1XLpMHBuTQrl1eRAQNJetz8ogx2ARQ
published: true
---

    Title
    IT lesson 1
    Date
    20/04/17

    Starting point:
    Code academy project one

    Target for this lesson?
    My target for this lesson is to be able to get up to at least 5% on the project

    Did I reach my target?
(add details to "Lesson Review")
    Yes, in fact I reached nine percent which is a lot more than

    Lesson Review

    How did I learn? What strategies were effective?

    Today the class started a program to teach us to code. I learned a lot from the lesson because I read the whole of the explanation as well as the instructions. Reading the explanation as well as the instructions was very effective as otherwise you wouldn't really learn or understand anything.

    What limited my learning? Which habits do I need to work on?

    I did get more work than I expected done but I think I could have done more work if I typed a bit faster as my typing was very slow. I also should have read a bit faster as well as I took longer than I needed to to read the text.

    What will I change for next time? How will I improve my learning?

    Next time we do this I will try to read and type faster which should help me be quicker but I should also try to read the whole text fully and thoroughly so I can understand everything and be able to complete the work quickly.


text:
# RocketLeagueChallenge

Programming challenge for pulling Rocket League stats

# Challenge

Write a program which takes in a platform ID and produces the following Rocket League statitics for the player:

- Platform & Username
- Lifetime Wins & Lifetime Win Rank
- Lifetime Goal-shot ratio

- Current Season Name
- Matches played this season
- Tier
- Rating

## REST Endpoints

### Player Data

#### Steam

`https://api.tracker.gg/api/v2/rocket-league/standard/profile/steam/<steamID>`

#### Xbox

`https://api.tracker.gg/api/v2/rocket-league/standard/profile/xbl/<xblID>`

#### PSN

`https://api.tracker.gg/api/v2/rocket-league/standard/profile/psn/<psnID>`

### Tips:

- Program can be written in any language
- The above rest endpoint returns JSON data and will contain much of what you need, you'll need to loop through a lot of the structure to pull out the data you need
- Use a HTTP Client pull data from this URL (make sure to replace `<platformId>`)
- The current season is 16, but don't hardcode this

### How to complete

- Pull this repo
- Create a branch
- Complete the challenge
- Push your code to your branch
- Submit a pull request for me to review

repository: MikeShiner/RocketLeagueChallenge

repo_name: MikeShiner/RocketLeagueChallenge


text:
# Category Theory in Agda

[![Build Status](https://travis-ci.org/JLimperg/cats.svg?branch=master)](https://travis-ci.org/JLimperg/cats)

This is a formalisation of some standard notions of category theory in Agda.
Some of the definitions are stolen from John Wiegley's
[similar effort](https://github.com/jwiegley/category-theory) in Coq. Don't
expect anything to be 'production-ready' in any sense.

## Dependencies

- Agda 2.6.1
- agda-stdlib 1.3

repository: JLimperg/cats

repo_name: JLimperg/cats


text:
### Temo Chat : Theme for Ionic 2
A free theme for your application mobile build with ionic for **Chat Application**
### Pages
* Login (Sign in + sign up)
* Chat room
* List of friends
* My Profile
* Profile friend

NB : it's possible to add other custom pages

### Demo
To see a screenshot of theme you can show them on ionic market : [Here](https://market.ionicframework.com/themes/temo-chat)

### Features

* i18n
* Language available (English) (you can add yours easily)
* Api RESTful
* Color theme (Blue)
* Customizable

### How to use ?
You need npm and ionic installed on your machine
* 1- Download or clone this repo
if you have git installed you can use
 ```shell
 git clone https://github.com/yajuve/temo-chat-ionic.git
  ```
NB : if you don't have git installed on your machine you can download .zip file manually
* 2- Go to your project and run (to install all the necessary dependencies)
 ```shell
 npm install
  ```
* 3 Run ionic (To lunch the application)
 ```shell
 ionic serve
  ```
  You are done, the new tab in your favorite navigator will open

 * 4 Enjoy

### Environment used in development

 ```shell
cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

local packages:

    @ionic/app-scripts : 3.1.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.4.0
    npm  : 5.3.0
    OS   : Linux 3.16
 ```

repository: yajuve/temo-chat-ionic

repo_name: yajuve/temo-chat-ionic


text:
---
author: rahulpnath
comments: true
date: 2014-07-07 23:35:39+00:00
layout: post
slug: knockoutjs-for-xaml-developers
title: KnockoutJS For XAML Developers
wordpress_id: 1761
categories:
- JavaScript
- Web
tags:
- JavaScript
- KnockoutJS
- MVVM
- XAML
---

After a very long time since I have actually wanted to move out to web development, recently I have started developing a website as part of my personal project, along with a friend of mine. I have been into desktop/mobile development on Microsoft technologies, using XAML for a very long time. [Model-View-View Model (MVVM)](http://www.rahulpnath.com/blog/tag/mvvm/) is a pattern that got popular because of the powerful binding engine in XAML. It is always comforting to see familiar patterns while moving into unexplored technology areas. Same is the reason I chose to explore [KnockoutJS](http://knockoutjs.com/index.html)(KO), which simplifies dynamic JavaScript UIs with the MVVM pattern.

![MVVM Knockout]({{ site.images_root}}/MVVM_Knockoutjs.jpg)

KnockoutJS acts as the binding engine in XAML and binds your ViewModel(VM) with your View as shown in the figure. As you expect, like in XAML it provides a way to specify declarative-bindings on html using the [data-bind](http://knockoutjs.com/documentation/binding-syntax.html) attribute and is also widely [supported across different browsers](http://knockoutjs.com/documentation/browser-support.html). The Model is the data that is populated from the server after your business logics applied,  mostly populated out of Ajax JSON calls from a web service/api. This Model data might mostly need some transformation to map to your View needs which is what exactly the ViewModel does. It transforms the Model data and wraps over it to provide features like 2-way-binding, client side validation, transformation of properties, UI specific state and a lot more

We will see below how some of the major constructs in XAML map over to KnockoutJS.

> *I assume that you are a XAML developer and am not including detailed code samples for the XAML part and would be just mentioning them.*

**1. INotifyPropertyChanged**

Notifying data bounded clients on updates to the underlying bound data is a typical scenario in XAML, where we use [INotifyPropertyChanged](http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110\).aspx) interface. This is also required on web pages and is handled by KO using _[observables](http://knockoutjs.com/documentation/observables.html)_

``` javascript
var personVM = {
    Name: ko.observable('Rahul'),
    Age: ko.observable(50)
};
```

Declaring the property as an observable, makes any changes to the property immediately reflect on the bound UI elements, just like it happens on a property of a class that implements INotifyPropertyChanged.

{% codepen CuIfK rahulpnath js %}

**2. DataContext**

In XAML we set the DataContext as the ViewModel to start binding the data from the ViewModel on the UI. Similarly in KO we have to call on to _applyBindings _method, passing on the ViewModel object to bind. You can see this in the above sample. You can also pass in an additional parameter indicating the part of the document that you want to explicitly bind to.

**3. DataBinding**

Binding the data to the UI in XAML is done declaratively using the [Binding](http://msdn.microsoft.com/en-us/library/system.windows.data.binding(v=vs.110\).aspx) syntax. Similarly in KO we use the [data-bind](http://knockoutjs.com/documentation/binding-syntax.html) attribute to bind to a registered, built-in or custom, binding handler. As opposed to XAML where we bind to different properties, in KO all bindings are mentioned in the same data-bind attribute, separated by comma. A binding in KO consists of a name value pair separated by a colon, where the name corresponds to the binding handler/the property that we are binding to and the value from the VM that we need it to be bound to. A simple example of binding to the text property of a label would be _data-bind="text: Name" . _You can also use the [with binding](http://knockoutjs.com/documentation/with-binding.html) to create binding contexts for descendant elements as in XAML

**4. INotifyCollectionChanged**

In XAML updates to a collection is usually handled using an [ObservableCollection](http://msdn.microsoft.com/en-us/library/ms668604(v=vs.110\).aspx), which notifies the UI whenever an item is added/removed to the collection. Similarly in KO you can use _observableArray_, which behaves the same as ObservableCollection. It notifies the bound UI elements whenever an element is added/removed from the array. Updates or changes to individual properties on the actual objects in the array is notified to the UI only if the property is an _observable, _as in XAML. In the below sample, you can try adding an observable item or a non-observable item to the list. As soon as you add an item it reflects in the list. But selecting and editing an item will reflect in the list only if you are editing an observable item.

{% codepen FreIv rahulpnath js %}

**5. Dependent Properties**

In XAML when there are properties dependent on others , to notify changes we have to explicitly call RaisePropertyChanged on all the dependent properties. A very common example is below

``` csharp
private string firstName;
public string FirstName
{
   get { return firstName; }
   set
   {
        if (firstName!= value)
        {
            firstName= value;
            OnPropertyChanged("FirstName");
            OnPropertyChanged("FullName");
        }
   }
}
public string FullName
{
    get { return FirstName +" " + LastName; }
}
```

Here whenever FirstName is updated to notify UI elements bound to FullName would be updated only if we explicitly call PropertyChanged on FullName property too. In KO this is handled using [computed observables](http://knockoutjs.com/documentation/computedObservables.html) and is much more elegant.

``` javascript
this.fullName = ko.computed(function() {
    return this.firstName() + " " + this.lastName();
}, this);
```

**6. Commanding**

Commanding is how user interactions are bound to actions/functions on ViewModel, which will in turn perform something useful for the user. Like e.g. clicking a button. In KO this is handled using the same [data-bind](http://knockoutjs.com/documentation/click-binding.html) attribute using key’s corresponding to event handlers. ``

``` html
<button data-bind="click: performSomeAction">Click me</button>
```

**7. Value Converters **

The [IValueConverter](http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter(v=vs.110\).aspx) interface is to create a converter that can be applied on a Binding to provide custom logic on the data that gets bounded to the UI element. For a similar functionality in KO, there is [writable computed observable](http://knockoutjs.com/documentation/computedObservables.html) to convert to and from a specific format of data. The read and write function on the computed observable, corresponds to the Convert and ConvertBack functions on IValueConverter on XAML.

{% codepen dJhLm rahulpnath js %}

There are a lot of useful resources on the web that are freely available to get started with KnockoutJS. Some of them are listed below

  * [Official Documentation](http://knockoutjs.com/documentation/introduction.html)

  * [Learn By Doing](http://learn.knockoutjs.com/)

  * [Videos](https://www.youtube.com/results?search_query=knockout+javascript)

  * [More Videos](http://channel9.msdn.com/Search?term=knockout#ch9Search)

Hope you find this useful to easily understand KnockoutJS, re-applying your XAML knowledge . Do drop in a comment in case you find any other similarities with XAML that I have missed mentioning here and I would be happy to add it in. I am sure I have not covered it completely!
CodeProject

extension: markdown


text:
# DC/OS Apache Cassandra Service Documentation

User documentation may be found at the [DC/OS Docs site](https://docs.mesosphere.com/services/cassandra/).


text:
# SumBSM-R

The set of R codes used for the numerical examples of the __"Sum of all Black-Scholes-Merton models"__ paper by Jaehyuk Choi ([@jaehyukchoi](https://github.com/jaehyukchoi)).

## Paper Information
### Title
Sum of all Black-Scholes-Merton models: An efficient pricing method for spread, basket, and Asian options

### Abstract
Contrary to the common view that exact pricing is prohibitive owing to the curse of dimensionality, this study proposes an efficient and unified method for pricing options under multivariate Black-Scholes-Merton (BSM) models, such as the basket, spread, and Asian options. The option price is expressed as a quadrature integration of analytic multi-asset BSM prices under a single Brownian motion. Then the state space is rotated in such a way that the quadrature requires much coarser nodes than it would otherwise or low varying dimensions are reduced. The accuracy and efficiency of the method is illustrated through various numerical experiments.

### Links
[DOI](https://doi.org/10.1002/fut.21909) | [arXiv](http://arxiv.org/abs/1805.03172) | [SSRN](http://ssrn.com/abstract=2913048).
([arXiv](http://arxiv.org/abs/1805.03172) is recommended for free download of the latest version.)

## Files
* [SumBSM/blksmd.R](SumBSM/blksmd.R): Functions for pricing. Two main interface functions are
  * `blksmd_basket`: basket or spread options
  * `blksmd_asian`: Asian options
* [SumBSM/Table_04.R](SumBSM/Table_04.R): Table 4. Parmeter set __S1__ (spread option)
* [SumBSM/Table_05.R](SumBSM/Table_05.R): Table 5. Parmeter set __S2__ (spread option)
* [SumBSM/Table_06_07_08.R](SumBSM/Table_06_07_08.R): Table 6~8. Parmeter set __B1__ (basket option)
* [SumBSM/Table_09.R](SumBSM/Table_09.R): Table 9. Parmeter set __B2__ (basket option)
* [SumBSM/Table_10.R](SumBSM/Table_10.R): Table 10. Parmeter set __A1__ (discretely monitored Asian option)
* [SumBSM/Table_11.R](SumBSM/Table_11.R): Table 11. Parmeter set __A2__ (discretely monitored Asian option)
* [SumBSM/Table_12.R](SumBSM/Table_12.R): Table 12. Parmeter set __A3__ (continuously monitored Asian option)

## Citation
__Choi, J.__ (2018). Sum of all Black-Scholes-Merton models: An efficient pricing method for spread, basket, and Asian options. *Journal of Futures Markets*, __38__(6), 627–644. https://doi.org/10.1002/fut.21909

repository: xqguo/SumBSM-R

gha_language: R

gha_license_id: MIT

repo_name: xqguo/SumBSM-R


text:
### Origin Settings

#### Retrieve origin settings

```shell
curl -X GET \
   -H "MC-Api-Key: your_api_key" \
   "https://cloudmc_endpoint/api/v2/services/stackpath/test-area/originsettings/eb3ecdbe-d73b-40e6-a263-166accba75ed"
```

> The above command returns a JSON structured like this:

```json
{
  "data": {
    "id": "eb3ecdbe-d73b-40e6-a263-166accba75ed",
    "stackId": "144c3d16-2879-4286-82b6-75e58a6ec1cb",
    "scopeConfigurationId": "45ab2429-ca8d-4145-acc3-f6aea6e8dbef",
    "domain": "bluegreen.com",
    "webSocketsEnabled": false,
    "sslValidationEnabled": false,
    "pullProtocol": "MATCH",
    "hostHeader": "Host: marvel.com",
    "origin": {
      "id": "d92531f4-28f5-456d-9b5f-d1cbb17ccfee",
      "address": "www.test.com:80",
      "commonCertificateName": "commonName",
      "authMethod": "BASIC",
      "username": "username"
    },
    "backupOriginEnabled": true,
    "backupOriginExcludeCodes": ["415"],
    "backupOrigin": {
      "id": "f6766ee9-680d-4c92-b77c-36c60a251061",
      "address": "<IP_ADDRESS>:443/path",
      "authMethod": "NONE"
    }
  }
}
```

GET /services/:service_code/:environment_name/originsettings/:id

Retrieve origin settings for a site in a given [environment](#administration-environments).

Attributes |
------- | -----------
`id`
*UUID*  | A site's unique identifier.
`stackId`
*UUID*  | The ID of the stack that a site belongs to.
`scopeConfigurationId`
*UUID*  | The ID of the scope of the site that the origins are connected to.
`domain`
*string* | The domain of the site.
`webSocketsEnabled`
*boolean* | Specifies if web socket connections to the origin server are enabled.
`sslValidationEnabled`
 *boolean* | Specifies if SSL validation for the origins is enabled.
`pullProtocol`
*string* | The type of protocol used to pull content from the origin. Must be one of ["HTTP", "HTTPS", "MATCH"]. "MATCH" is equivalent to "HTTP or HTTPS".
`hostHeader`
*string* | The host header to be used to pull content from the origin. "Dynamic" refers to using the requested domain name `(Host: %client.request.host%)` as the host header.
`origin`
 *Object* | The primary origin that the CDN uses to pull content from.
`origin.id`
 *UUID* | An origin's unique identifier.
`origin.address`
 *string* | The address of the primary origin that the CDN uses to pull content from. Can be a valid IPv4 address or a valid domain name. It may include a specific port and a precise path as well (e.g. <IP_ADDRESS>:80/test). Port must be one of [80, 8080, 443, 1935, 9091].
`origin.authMethod`
 *string* | Specifies the authentication method that the origin uses. Must be one of ["NONE", "BASIC"].
`origin.username`
 *string* | Username to use when authenticating with the origin.
`origin.password`
 *string* | Password to use when authenticating with the origin.
`origin.commonCertificateName`
 *string* | Common name to validate SSL origin requests against.
`backupOriginEnabled`
*boolean* | Specifies if a backup origin for the site is configured.
`backupOriginExcludeCodes`
*Array[string]* | Requests are made to the backup origin on any 4xx or 5xx response codes returned from the primary origin. This property specifies the response status codes for which calls to the backup origin must not be made. Multiple response codes can be excluded. e.g: ["410", "411", "412"].  Asterisks can be used to cover a range of codes. e.g. All the 4xx codes can be covered using "4*".
`backupOrigin`
 *Object* | The secondary origin that the CDN uses to pull content from when the primary origin is not available.
`backupOrigin.id`
 *UUID* | A backup origin's unique identifier.
`backupOrigin.address`
 *string* | The address of the secondary origin that the CDN uses to pull content from. Can be a valid IPv4 address or a valid domain name. It may include a specific port and a precise path as well (e.g. <IP_ADDRESS>:80/test). Port must be one of [80, 8080, 443, 1935, 9091].
`backupOrigin.authMethod`
 *string* | Specifies the authentication method that the backup origin uses. Must be one of ["NONE", "BASIC"].
`backupOrigin.username`
 *string* | Username to use when authenticating with the backup origin.
`backupOrigin.password`
 *string* | Password to use when authenticating with the backup origin.
`backupOrigin.commonCertificateName`
 *string* | Common name to validate SSL origin requests against.

#### Edit origin settings

```shell
curl -X PATCH \
   -H "MC-Api-Key: your_api_key" \
   "https://cloudmc_endpoint/api/v2/services/stackpath/test-area/originsettings/eb3ecdbe-d73b-40e6-a263-166accba75ed"
```

> Request body example:

```json
{
  "pullProtocol": "MATCH",
  "hostHeader": "marvel.com",
  "sslValidationEnabled": true,
  "origin": {
    "commonCertificateName": "commonName"
  },
  "backupOriginEnabled": true,
  "backupOrigin": {
    "address": "<IP_ADDRESS>:80"
  }
}
```

> The above command returns a JSON structured like this:

```json
{
  "taskId": "e94d2bb6-059a-4eb6-a14f-7c596a5fdea6",
  "taskStatus": "SUCCESS"
}
```

PATCH /services/:service_code/:environment_name/originsettings/:id

Edit origin settings for a site in a given [environment](#administration-environments).

Optional |
------- | -----------
`webSocketsEnabled`
*boolean* | Specifies if web socket connections to the origin server are enabled.
`sslValidationEnabled`
 *boolean* | Specifies if SSL validation for the origins is enabled.
`pullProtocol`
*string* | The type of protocol used to pull content from the origin. Must be one of ["HTTP", "HTTPS", "MATCH"]. "MATCH" is equivalent to "HTTP or HTTPS".
`hostHeader`
*string* | The host header to be used to pull content from the origin. "Dynamic" refers to using the requested domain name `(Host: %client.request.host%)` as the host header.
`origin`
 *Object* | The primary origin that the CDN uses to pull content from.
`origin.address`
 *string* | The address of the primary origin that the CDN uses to pull content from. Can be a valid IPv4 address or a valid domain name. It may include a specific port and a precise path as well (e.g. <IP_ADDRESS>:80/test). Port must be one of [80, 8080, 443, 1935, 9091].
`origin.authMethod`
 *string* | Specifies the authentication method that the origin uses. Must be one of ["NONE", "BASIC"].
`origin.username`
 *string* | Username to use when authenticating with the origin.
`origin.password`
 *string* | Password to use when authenticating with the origin.
`origin.commonCertificateName`
 *string* | Common name to validate SSL origin requests against.
`backupOriginEnabled`
*boolean* | Specifies if a backup origin for the site is configured. To configure backupOrigin's settings, this property must be passed as true.
`backupOriginExcludeCodes`
*Array[string]* | Requests are made to the backup origin on any 4xx or 5xx response codes returned from the primary origin. This property specifies the response status codes for which calls to the backup origin must not be made. Multiple response codes can be excluded. e.g: ["410", "411", "412"].  Asterisks can be used to cover a range of codes. e.g. All the 4xx codes can be covered using "4*".
`backupOrigin`
 *Object* | The secondary origin that the CDN uses to pull content from when the primary origin is not available.
`backupOrigin.address`
 *string* | The address of the secondary origin that the CDN uses to pull content from. Can be a valid IPv4 address or a valid domain name. It may include a specific port and a precise path as well (e.g. <IP_ADDRESS>:80/test). Port must be one of [80, 8080, 443, 1935, 9091].
`backupOrigin.authMethod`
 *string* | Specifies the authentication method that the backup origin uses. Must be one of ["NONE", "BASIC"].
`backupOrigin.username`
 *string* | Username to use when authenticating with the backup origin.
`backupOrigin.password`
 *string* | Password to use when authenticating with the backup origin.
`backupOrigin.commonCertificateName`
 *string* | Common name to validate SSL origin requests against.

repository: cloudops/cloudmc-api-docs

branch_name: refs/heads/cmc-dev

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: cloudops/cloudmc-api-docs


text:
ppm
===

Prediction by Partial Matching data compression algorithm minimal implementation (no GUI provided).

Implemented by René Puchinger in 2007, revised in 2013.

**The algorithm itself may be patented, therefore only academic usage is recommended.**

Bibliography
------------
* J.G. Cleary, and I.H. Witten, Data compression using adaptive coding and partial string matching, IEEE Transactions on Communications, Vol. 32 (4), pp. 396–402, April 1984.
* A. Moffat, Implementing the PPM data compression scheme, IEEE Transactions on Communications, Vol. 38 (11), pp. 1917–1921, November 1990.

Installation and Usage
----------------------

1. After cloning the Git repo, navigate to src/ folder.
2. To compile, run

    g++ -o ppm *.cpp

3. Usage:

    ppm [c|d] input_file output_file

Example:

    ppm c book.txt book.ppm
    ppm d book.ppm book-orig.txt

Benchmark
---------

A sample book in text format is available in the test-data/ folder. The algorithm may process arbitrary data, though.

Compression results of several compression applications (default settings) for the file book.txt:

Original size: 1 344 739 bytes

Compressed by ZIP: 490 883 bytes

Compressed by 7-Zip: 386 768 bytes

Compressed by BZ2: 349 584 bytes

Compressed by **PPM**: 323 934 bytes


text:
# Show picture made by css.

You can convert image to css at [here](https://javier.xyz/img2css/).

[HTML PREVIEW](https://htmlpreview.github.io/?https://github.com/MasujimaRyohei/Icon.css/blob/master/src/html/index.html)


text:
Lambda Deep Learning Demos
===

Welcome to Lambda Lab's deep learning demo suite -- the place to find ready-to-use machine learnig models. We offer the following cool features:

* A curate of open-source, state-of-the-art models that cover major machine learning applications, including image classification, image segmentation, object detection, image style transfer, text classification and generation etc.

* Pure Tensorflow implementation. Efforts are made to keep the boilplate consistent across all demos.

* Examples of transfer learning and how to adapt the model to new data.

* Model serving

Check this [documents](https://lambda-deep-learning-demo.readthedocs.io/en/latest/) for details.

### Applications

---

#### Images Classification

| Model        | Dataset           | Top 1 Accuracy | Pre-trained Model  |
| ------------- |:-------------:| -----:|:-----:|
| ResNet32      | CIFAR10 |  92% |  [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/cifar10-resnet32-20180824.tar.gz) |
| ResNet50 Fine-Tune     | StanfordDogs    | 75.36%  | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/resnet50_StanfordDogs120-20190303.tar.gz)  |
| InceptionV4 Fine-Tune  | StanfordDogs      | 92.4% | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/inceptionv4_StanfordDogs120-20190306.tar.gz)  |
| NasNet-A-Large Fine-Tune | StanfordDogs   |  94.99% | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/nasnet_A_large_StanfordDogs120-20190306.tar.gz)  |

---

#### Images Segmentation

| Model        | Dataset           | Accuracy | Pre-trained Model  |
| ------------- |:-------------:| -----:|:-----:|
| FCN      | CamVid |  86.6%  | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/fcn_camvid_20190125.tar.gz) |
| U-Net      | CamVid    | 86.9% |  [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/unet_camvid_20190125.tar.gz) |

---

#### Object Detection

| Model        | Dataset           | (AP) IoU=0.50:0.95 | Pre-trained Model  |
| ------------- |:-------------:| -----:|:-----:|
| SSD300      | MSCOCO | 21.9 |  [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/ssd300_mscoco_20190105.tar.gz) |
| SSD500     | MSCOCO    | 25.7 | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/ssd512_mscoco_20190105.tar.gz) |

---

#### Style Transfer

| Model        | Dataset           | Pre-trained Model  |
| ------------- |:-------------:|:-----:|
| Fast Neural Style      | MSCOCO | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/fns_gothic_20190126.tar.gz) |

---

#### Text Generation

| Model        | Dataset           | Pre-trained Model  |
| ------------- |:-------------:|:-----:|
| Char RNN      | Shakespeare | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/char_rnn_shakespeare-20190303.tar.gz)  |
| Word RNN      | Shakespeare | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/word_rnn_shakespeare-20190303.tar.gz)  |
| Word RNN  + Glove | Shakespeare | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/word_rnn_glove_shakespeare-20190303.tar.gz)  |

---

#### Text Classification

| Model        | Dataset           | Classification Accuracy  | Pre-trained Model  |
| ------------- |:-------------:| -----:|:-----:|
| LSTM      | IMDB |  85.2%  | [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/seq2label_basic_Imdb-20190303.tar.gz)  |
| LSTM + Glove      | IMDB | 86.1%  |  [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/seq2label_glove_Imdb-20190303.tar.gz) |
| Transfer Learning + BERT | IMDB |  92.2% |  [Download](https://s3-us-west-2.amazonaws.com/lambdalabs-files/seq2label_bert_Imdb-20190303.tar.gz) |

---

### Citation
If you use our code in your research or wish to refer to the examples, please cite with:

```
@misc{lambdalabs2018demo,
  title={Lambda Labs Deep Learning Demos},
  author={Lambda Labs, inc.},
  howpublished={\url{https://github.com/lambdal/lambda-deep-learning-demo}},
  year={2018}
}
```

repository: adewin/lambda-deep-learning-demo

repo_name: adewin/lambda-deep-learning-demo


text:
# cortex-operator

The cortex-operator is a project to manage the lifecycle of [Cortex](https://cortexmetrics.io/) in Kubernetes.

**Project status: alpha** Not all planned features are completed. The API, spec, status and other user facing objects will, most likely, change. *Don't use it in production.*

## Requirements

### Build

- Docker
- Kubectl

### Run

- [EKS](https://aws.amazon.com/eks/) cluster version 1.18+
- Two S3 buckets
- AWS IAM policy for nodes in EKS cluster to access S3 buckets
- Kubectl configured to access the EKS cluster
- [cert-manager](https://github.com/jetstack/cert-manager) version 1.3.1+

Check this [guide](./docs/guides/terraform/README.md) on how to set up the infrastructure with Terraform.

## Installation

Build and push your Docker image to the location specified by `IMG`:

```
make docker-build docker-push IMG=<registry/cortex-operator:canary>
```

Install the CRDs in the cluster:

```
make install
```

Deploy the controller to the cluster with the Docker image specified by `IMG`:

```
make deploy IMG=<registry/cortex-operator:canary>
```

## Uninstall

Remove the controller from the cluster:

```
make undeploy
```

Remove the CRDs from the cluster:

```
make uninstall
```

## Quickstart

You can use this [guide](./docs/guides/terraform/README.md) to deploy the required infrastructure with Terraform.

Edit the [sample resource](./config/samples/cortex_v1alpha1_cortex.yaml) and set the bucket name for the blocks storage. If you used our guide, it'd be in the form of `cortex-operator-example-XXXX-data`. Set the bucket name for the alert manager and ruler configuration. If you used our guide, it'd be in the form of `cortex-operator-example-XXXX-config`

Create a Cortex resource to trigger the cortex-operator to start a deployment:

```
kubectl apply -f config/samples/cortex_v1alpha1_cortex.yaml
```

You should see a flurry of activity in the logs of the `cortex-operator`:

```
kubectl logs -n cortex-operator-system deploy/cortex-operator-controller-manager manager
```

You can confirm all the pods are up and running:

```
kubectl get pods
```

The output should be something like this:

```
NAME                             READY   STATUS    RESTARTS   AGE
compactor-0                      1/1     Running   0          2m59s
compactor-1                      1/1     Running   0          2m46s
distributor-db7f645c7-2bzlj      1/1     Running   0          2m59s
distributor-db7f645c7-2n22k      1/1     Running   0          2m59s
ingester-0                       1/1     Running   0          2m59s
ingester-1                       1/1     Running   0          1m26s
memcached-0                      1/1     Running   0          3m
memcached-index-queries-0        1/1     Running   0          3m
memcached-index-writes-0         1/1     Running   0          3m
memcached-metadata-0             1/1     Running   0          3m
memcached-results-0              1/1     Running   0          3m
querier-7dbd4cb465-66q95         1/1     Running   0          2m59s
querier-7dbd4cb465-frfnj         1/1     Running   1          2m59s
query-frontend-b9f7f97b7-g7lsf   1/1     Running   0          2m59s
query-frontend-b9f7f97b7-tsppd   1/1     Running   0          2m59s
store-gateway-0                  1/1     Running   0          2m59s
store-gateway-1                  1/1     Running   0          2m34s
```

You can now send metrics to Cortex. As an example, let's set up Grafana Agent to collect metrics from the Kubernetes nodes and send them to Cortex.

Create all the resources with:

```
kubectl apply -f docs/samples/grafana-example-manifest.yaml
```

In the future, we'll set up a Grafana dashboard to check these metrics, but for now, we'll use [cortex-tools](https://github.com/grafana/cortex-tools) to confirm Cortex is receiving metrics from the Grafana Agent.

 It allows the operator to change aspects of Cortex configuration without restarting it.

The `cortex-operator` supports this feature by configuring setting the `runtime_config.overrides` field in the CRD resource. The operator creates a ConfigMap named `cortex-runtime-config` in the namespace where Cortex is running. The ConfigMap is mounted in the Cortex components as a Kubernetes Volume.

Example for setting the limits:

```
apiVersion: cortex.opstrace.io/v1alpha1
kind: Cortex
metadata:
  name: cortex-sample
spec:

  runtime_config:
    overrides:
      tenant1:
        ingestion_rate: 10000
        max_series_per_metric: 100000
        max_series_per_query: 100000
      tenant2:
        max_samples_per_query: 1000000
        max_series_per_metric: 100000
        max_series_per_query: 100000
```

## Specifying Kubernetes imagePullSecrets

To set the [imagePullSecrets](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) with the `cortex-operator` you can set the `.spec.service_account_spec.image_pull_secrets` field.

Example:

```
apiVersion: cortex.opstrace.io/v1alpha1
kind: Cortex
metadata:
  name: cortex-sample
spec:
  service_account_spec:
    image_pull_secrets:
    - name: secret-name
```

## Roadmap

- Deploy Cortex in different topologies
- Automate moving workloads to other instance
- Auto-scaling of services

## Contributing

Pull requests are welcome. For significant changes, please open an issue first to discuss what you would like to change.

## License
[Apache License, Version 2](http://www.apache.org/licenses/LICENSE-2.0)

repository: TrendingTechnology/cortex-operator

repo_name: TrendingTechnology/cortex-operator


text:
---
title: Builder
topic: Modes
order: 30
---

The build mode simply builds all files to the output directory. The builder will not build any pages that have their `ignore` metadata key set to true.

*Module:* `acetate/lib/modes/builder`;

```js
var Acetate = require('acetate');
var builder = require('acetate/lib/modes/builder');

var aceate = new Acetate({
  // options
});

builder(acetate).then(function () {
  console.log("Success");
});
```

license: ISC

repository: jgravois/acetate-site

gha_license_id: ISC

repo_name: jgravois/acetate-site


text:
RooUnfold             $Id$
=========

RooUnfold is a framework for unfolding (AKA "deconvolution" or "unsmearing").
It currently implements several methods: iterative (Bayes),
singular value decomposition (SVD), unregularised matrix inversion,
bin-by-bin (simple correction factors), and an interface to ROOT's TUnfold.
It can be used from the ROOT prompt, or linked against the ROOT libraries.
RooUnfold requires ROOT 4 or later.

For the latest version and documentation, see here

  http://hepunx.rl.ac.uk/~adye/software/unfold/RooUnfold.html

RooUnfold was written by Tim Adye, Kerstin Tackmann, and Fergus Wilson.

Building
========

Use GNU make. Just type

  make

to build the RooUnfold shared library.

AlCap
=====

RooUnfoldAlCap.cxx runs Monte Carlo validation and Bayesian data unfolding for AlCap

$ root -l runPreProcessor.C

$ root -l runUnfold.C

repository: alcap-org/AlcapDAQ

gha_language: C

repo_name: alcap-org/AlcapDAQ


text:
---
title: Pretzels
date: 2020-02-09
description: made with real drain cleaner
---

## Key facts
* lye is dangerous.  Wear gloves.
* 425℉ oven
* 1 hour rise
* 30 minute proof
* 30-ish minute bake time

## Ingredients

### Pretzel dough
| | |
|---|---:|
bread flour | 632 g
salt | 12 g
yeast | 1.5 Tbsp
95℉ water | 365 g
soft butter | 20 g

### Lye mixture

> Pour lye into water

| | |
|---|---:|
water | 1000 g
lye | 30 g

> Be careful with the lye.

## Directions

1. bloom yeast in water
2. Mix everything but the butter
3. mix in the butter
4. let rise until doubled in size
5. roll out pretzels and fold into pretzel shape
6. Let pretzels proof 30-ish minutes
7. pour lye into water
8. dunk each pretzel into the lye carefully ruining the beautiful shape of each one
9. let rest 10 minutes
10. put pretzels into 425℉ oven for about 20-25 minutes (until dark brown)
11. halfway through cooking, brush pretzels with butter and cover with flaky salt


text:
# Setup CodeBuild with Jenkins
### Prerequisites
* You have an AWSAccount

#### Spin up a Jenkins Server in that account
1. Navigate to IAM Console
2. Click **Role**
3. Click **Create Role**
4. Choose **EC2** as the service that will use your role
5. Click **Next:Permissions**
6. Give the role **AWSCodeBuildAdminAccess**, **AmazonS3FullAccess**, and **CloudWatchLogsFullAccess**
7. Click **Next:Tags**
8. Click **Next:Review**
9. Name role **CodeBuildDemo**
10. Click **Create Role**

Create a KeyPair

1. Navigate to EC2 console
2. Click **Key Pair** on the left
3. Click **Create Key Pair**
4. Save Keypair on desktop

Create Jenkins Server

1. Navigate to CloudFormation Console
2. Click **Create Stack**
3. Click **Specify an Amazon S3 template URL** and use `https://s3.amazonaws.com/proberts-public/jenkins_build.yaml`
4. Set **Stack Name**
5. Set **SSHKey** to keypair from above
6. Set **Subnet** to a public subnet
7. Set **VPC** to a vpc that is part of that subnet
9. Navigate to EC2 and find the instance name Jenkins public DNS
10. Connect to the dns at port 8080
11. SSH onto jenkins box to get the password

## Setup Github repo
**Create a new repository in your github account**

`git clone https://github.com/johnhanks1/jekyll_example`

`cd jekyll_example`

`git checkout -b master`

`git remote set-url origin https://github.com/#{github-repo-name}`

or if using ssh for auth

`git remote set-url origin git@github.com:#{github-repo-name}`

`git push --set-upstream origin master`

Now we will add a couple of files that will be used with CodeBuild and Jenkins

buildspec.yml
```
version: 0.2

phases:
  install:
    commands:
      - gem install jekyll jekyll-paginate jekyll-sitemap jekyll-gist
      - bundle install
  build:
    commands:
      - echo "******** Building Jekyll site ********"
      - jekyll build
artifacts:
 files: "**/*"
 base-directory: _site
```
## Setup CodeBuild Resources
Create a bucket for our CodeBuild Artifacts to be publish to:

1. Navigate to https://s3.console.aws.amazon.com/s3/home?region=#{region}
2. Click **Create Bucket**
3. Enter Bucket name
4. Click **Next**
5. Select Versioning
6. Click **Next**
7. uncheck the checkbox next to **Block new public bucket policies (Recommended)**
8. uncheck the checkbox next to **Block public and cross-account access if bucket has public policies (Recommended)**
9. Click **Next**
10. Click **Create Bucket**
11. Select **Bucket From list**
12. Select **Properties Tab**
13. Select Static website Hosting
14. Select **Use this Bucket to host a website**
15. Add **index.html** to **Index Document**
16. Add **404.html** to **Error Document**
17. Note the endpoint
18. Click **Save**

Add Public Read to bucket
1. Click **Permissions**
2. Click **Bucket Policy**
3. Paste policy below make sure to replace bucket name

```
{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::#{bucket-name}/*"
        }
    ]
}
```

Login to AWSConsole and navigate to:
https://#{region}.console.aws.amazon.com/codesuite/codebuild/project/new?region=#{region}
1. Set **Project Name** to #{project-name}
2. Navigate to Source section
  1. Select **GitHub**
  2. Follow OAuth flow to connect your GitHub account to CodeBuild
3. Select the repository created above.
4. Navigate to environment select **Ubuntu -> Ruby -> aws/codebuild/ruby:2.5.1**
5. Navigate to **Artifacts**
  1. Select **Amazon S3** as an artifact type
  2. Choose the bucket we created above: jekyll-example-artifacts-#{account-id}-#{region}
  3. In the **Name** text box enter a **.**
  4. Click Checkbox **Remove Artifact Encryption**
6. Click **Create build Project**

### Setup Jenkins pipeline resources
Create an IAM user that can call CodeBuild
1. Navigate to https://console.aws.amazon.com/iam/home?region=#{region}#/home
2. Select **Users**
3. Click **Add user**
4. Add *name* and select **Programmatic access** check box
5. Click **Next: Permissions**
6. Click **Attach Existing Policies directly**
  1. Search for **AWSCodeBuildAdminAccess**
  2. Click check box
7. Click **Next: Review**
8. Click **Create User**
9. Note Access Key Id and Secret Access Key

### Add user to Jenkins

1. Navigate To Jenkins main menu
2. Click **Credentials**
3. Click **System**
4. Click **Global credentials**
5. Click **Add Credentials**
6. Click **Kind** and select **CodeBuild Credentials**
7. Enter **ID** and note the id
8. Add AccessKey and Secret Access Key from above leaving all other areas blank.
9. Click **OK**

We now need to add a Jenkinsfile to our repository. This will have the information that
jenkins will need to call CodeBuild.

Jenkinsfile

Make sure to replace values with noted values from above

```
pipeline {
  agent any
    stages {
      stage('Build') {
        steps {
          awsCodeBuild projectName: '#{project-name}',
                       credentialsId: '#{credential-id}',
                       credentialsType: 'jenkins',
                       region: '#{region}',
                       sourceControlType: 'project'

        }
      }
    }
}
```

### Push Changes into repo
`git add buildspec.yml`

`git add Jenkinsfile`

`git commit -am "Adding Jenkinsfile and buildspec`

`git push`

### Create Jenkins Pipeline
1. Click New Item
2. Set **Name**
3. Select **Pipeline**
4. Click **OK**
5. Navigate to **Build Triggers**
  * Click **Poll SCM**
  * Enter "* * * * *" this will pull github every minute for changes
6. Navigate to **Pipeline**
  * Click Definition and select **Pipeline Script from SCM**
  * Click **SCM** select **Git**
  * Enter **Repository URL**
  * Click **Save**
7.
8. Make sure build succeeded
9. Check S3 Bucket website and see the newly created blog

### Update Blog
We will now create a new post that will get automatically built.
1. Open **_posts/2018-11-14-welcome-to-jekyll.markdown**
2. Edit the posts Title and contents
3. Commit and push changes to repository
4. Watch for build to automatically be triggered by Jenkins
5. Once build is complete look at the S3 website to see the update

### Clean Up
We want to make sure to clear up these resources so that our aws account doesn't rack up charges.

* Terminate Ec2 Host
* Delete S3 Bucket
* Delete User and Role
* Delete CodeBuild Project

repository: tonylixu/aws-reinvent

repo_name: tonylixu/aws-reinvent


text:
# FunctionTransformations Package
An open-source package for [_Mathematica_](https://www.wolfram.com/mathematica/) providing utilities for transformation and simplification of some special functions.

## Functions
The following functions are defined in `FunctionTransformations` context:
* `PolyLogExpand[expr]` expands out [`PolyLog`](https://reference.wolfram.com/language/ref/PolyLog.html) terms in `expr`.
* `GammaExpand[expr]` expands out [`Gamma`](https://reference.wolfram.com/language/ref/Gamma.html) terms in `expr`.

## Examples
```
Import["https://raw.github.com/VladimirReshetnikov/FunctionTransformations/master/FunctionTransformations.m"]

GammaExpand[Gamma[1/18]]

(* 2^(8/9) 3^(1/6) Csc[π/18] Gamma[2/9] Gamma[1/3] Sin[π/9] Sin[2π/9]/Sqrt[π] *)
```


text:
---

copyright:
  years: 2015, 2017
lastupdated: "2017-04-13"

---

<!-- Attribute definitions -->
{:new_window: target="_blank"}
{:shortdesc: .shortdesc}
{:codeblock: .codeblock}
{:screen: .screen}
{:pre: .pre}

# About
{: #about}

You can perform real-time analysis on data in motion as part of your {{site.data.keyword.Bluemix_short}} applications by using {{site.data.keyword.streaminganalyticsfull}}.
{:shortdesc}

New to {{site.data.keyword.streaminganalyticsshort}}? Get a [quick introduction to the service](https://developer.ibm.com/streamsdev/docs/streaming-analytics-now-available-bluemix-2/){:new_window}.

The {{site.data.keyword.streaminganalyticsshort}} service provides the following capabilities that enable you to deploy, analyze, and monitor your data in the cloud:

**Interactive and programmatic use of the service:**

You can use the service interactively through the [{{site.data.keyword.streaminganalyticsshort}} console](/docs/services/StreamingAnalytics/c_streams_console.html), or programatically through the [{{site.data.keyword.streaminganalyticsshort}} REST API](https://console.ng.bluemix.net/apidocs/220){:new_window}.

**Deployment and monitoring of SPL, Java, Scala, and Python applications:**

You can write {{site.data.keyword.streamsshort}} applications in SPL, Java, Scala, and Python. [Deploy and monitor these applications](/docs/services/StreamingAnalytics/t_deploytocloud.html) using the {{site.data.keyword.streaminganalyticsshort}} console.

If you want to write your applications in SPL, you should know that {{site.data.keyword.streamsfull}} Processing Language (SPL) is a programming language that is used to create streams processing applications. If you want to go further with your own SPL applications, you can get an {{site.data.keyword.streamsshort}} development environment and you must get your SPL apps cloud-ready.

To create and deploy Python applications without a {{site.data.keyword.streamsshort}} development environment, use our notebooks in IBM Data Science Experience (DSX) or the {{site.data.keyword.streamsshort}} Python API. For more information, see [Developing Python applications for {{site.data.keyword.streaminganalyticsshort}}](/docs/services/StreamingAnalytics/t_develop_apps_python.html).

**Compatibility with {{site.data.keyword.streamsshort}} operators:**

The {{site.data.keyword.streamsshort}} operators in the [{{site.data.keyword.streamsshort}} Processing Language (SPL) standard toolkit should all be compatible](/docs/services/StreamingAnalytics/c_beta_adapters.html) with {{site.data.keyword.streaminganalyticsshort}}.

## {{site.data.keyword.streaminganalyticsfull}} responsibilities
{: #responsibilities notoc}

### Client responsibilities
{: #clientresponsibilities notoc}

Client is responsible for:

* Following IBM’s initial configuring of the {{site.data.keyword.streamsshort}}, monitoring, configuring and managing the {{site.data.keyword.streamsshort}} jobs running in their instance. Client has flexibility to start and stop the instance and start and stop jobs running on the instance.
* Developing, as necessary or required, programs and applications on the service to analyze data and obtain insights from it. Client is also responsible for the quality and performance of such programs or applications developed. Programs may be developed in SPL, Java, or other supported languages by using the {{site.data.keyword.streamsshort}} Topology feature. They must be compiled using either {{site.data.keyword.streamsshort}} Developer Edition or {{site.data.keyword.streamsshort}} Quick Start Edition with the same operating system as used for {{site.data.keyword.streaminganalyticsshort}}.
* Checking the following link periodically to be informed about a scheduled non-disruptive or disruptive downtime - [https://developer.ibm.com/bluemix/support/#status](https://developer.ibm.com/bluemix/support/#status){:new_window}
* Backing up all data, metadata, configuration files and environment parameters as per business requirements so as to ensure continuity.
* Restoring data, metadata, configuration files and environment parameters from any backup to ensure continuity, in an eventuality of failure of any type including but not limited to data center or pod failure, server failure or hard disk failure or software failures.

### IBM Responsibilities
{: #ibmresponsibilities notoc}

As part of {{site.data.keyword.streaminganalyticsfull}}, IBM will:

* Provide and manage servers, storage and networking infrastructure for the Customer instance.
* Provide an initial configuration of the {{site.data.keyword.streamsshort}} on the number of nodes selected.
* Provide and manage infrastructure for Internet facing and internal firewall for protection and isolation.
* Monitor and manage the following components on {{site.data.keyword.streaminganalyticsfull}}:
	* Network components
	* Servers and their local storage
	* Infrastructure Operating Systems
	* {{site.data.keyword.streamsshort}} management services
	* {{site.data.keyword.streamsshort}} instances
* Provide maintenance patches, including appropriate security patches for the infrastructure operating systems and {{site.data.keyword.streamsshort}}.
* Perform regular maintenance that should not require any system downtime (“non-disruptive” maintenance) and maintenance that may require some system downtime and restarting (“disruptive” maintenance”), will be performed at the scheduled times published at [https://developer.ibm.com/bluemix/support/#status](https://developer.ibm.com/bluemix/support/#status){:new_window}
* Any changes to the scheduled maintenance times will be posted with appropriate notice.

repository: csantanapr/docs

repo_name: csantanapr/docs


text:
# Hello World example

![screenshot](screenshot2.jpg)

Renders an interactive globe, and lens flares.

Note how the cloud layer parallax effect works: the cloud texture uv coordinates are calculated in the fragment shader via ray-sphere intersection so that the coulds appear floating above the globe.

## Camera controls:

* key Z: reset camera
* key X: toggle camera orbit axis - when rotating, the camera either orbits around a point or rotates in-place
* mouse left button drag: rotate camera (when the camera is grabbed outside the center, tilt camera)
* shift+left button drag: - or - mouse right button drag: dolly camera (move forwards/backwards)
* ctrl + left button drag: - or - mouse middle button drag: pan camera up/down,left/right

## Techniques used:

* mipmapping
* bump mapping
* image loading
* geometry shaders
* implements [Sean O'Neill's method](https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering) to calculate atmospheric scattering

![screenshot](screenshot.jpg)

## Build instructions

Download image assets via the bash script in the project root folder. (To keep the Island code repository slim, these image assets are hosted outside of the main repo.)

    ./download_assets.sh

Configure build environment using CMake:

    mkdir build
    cd build
    cmake -G Ninja ..

Note that if you are using Qt Creator you may skip manually setting up the build environment, and simply open the project CMakeLists.txt using Qt Creator.

Build using Ninja:

    ninja

Run application:

    ./Island-HelloWorld

repository: tgfrerer/island

branch_name: refs/heads/wip

repo_name: tgfrerer/island


text:
(troubleshooting)=

# Troubleshooting

This page includes some tips for troubleshooting issues that you might run into
when using `tinygp`, and Gaussian process models more generally. This is a
work-in-progress, so if you don't see your issue listed here, feel free to open
an issue on the [GitHub repository issue
tracker](https://github.com/dfm/tinygp/issues).

## NaNs and infinities

It's not uncommon to find that the marginalized likelihood of your `tinygp`
model evaluates to `jnp.nan` or `-jnp.inf`. This is often caused by numerical
precision issues in the linear algebra calculations. This can be exacerbated by
the fact that, by default, `jax` disables double precision calculations. You can
enable double precision [a few different ways as described in the `jax`
docs](https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#double-64bit-precision),
and the way we do it in these docs is to add the following, when necessary:

```python
import jax

jax.config.update("jax_enable_x64", True)
```

If enabling double precision doesn't do the trick, this often means that there's
an issue with the parameter or modeling choices that you're making. For example,
some kernel parameters must be constrained to be positive, although that is not
strictly enforced by the API. Double check that you're not allowing these
parameters to go negative or to zero.

Similarly, you can end up with numerical issues if you set the length scales of
your problem much larger than the dynamic range of your data. When you have
persistent issues with NaNs and infinities, it is worth double-checking the
allowed ranges on parameters, and making sure that they are sensibly bounded.

Especially when using Markov chain Monte Carlo for Gaussian process inference,
naive choices of prior bounds on kernel parameters can lead to pretty heinous
results (see [this case study from Michael
Betancourt](https://betanalpha.github.io/assets/case_studies/gaussian_processes.html#32_Exploring_the_Marginal_Likelihood_Function)
for some striking examples), so care should be taken when setting bounds on
these parameters.

repository: dfm/tinygp

gha_language: Python

repo_name: dfm/tinygp


text:
# riot

![Riot CI](https://github.com/p-ob/deno-riot/workflows/Riot%20CI/badge.svg?branch=main)

Small library to consume the [Riot APIs](https://developer.riotgames.com/) with [deno](https://deno.land/)

## Supported APIs
- [Match v4](https://developer.riotgames.com/apis#match-v4):
  - [Get match](https://developer.riotgames.com/apis#match-v4/GET_getMatch)
  - [Get matchlist by account id](https://developer.riotgames.com/apis#match-v4/GET_getMatchlist)
- [Summoner v4](https://developer.riotgames.com/apis#summoner-v4)
  - [Get summoner by name](https://developer.riotgames.com/apis#summoner-v4/GET_getBySummonerName)

## Supported static APIs
### [Game Constants](https://developer.riotgames.com/docs/lol#general_game-constants)
- Seasons
- Queues
- Maps
- Game Modes
- Game Types

### Data Dragon
Coming soonTM
- [Champions](https://developer.riotgames.com/docs/lol#data-dragon_champions)

## Environment variables

**Note**: For running this project locally, this project supports a .env file at the root as well. It it not checked in as it contains secrets.

- API_KEY
- API_BASE_URL (e.g. https://na1.api.riotgames.com/)
- STATIC_BASE_URL (e.g. http://static.developer.riotgames.com/docs/lol/)
- CACHE_DIR (e.g. ./.cache)

## Required permissions

- --allow-read
  - Needed for caching static assets
- -- allow-write
  - Needed for caching static assets
- --allow-net
  - Needed for communicating with Riot's APIs
- -- unstable
  - Needed for using latest and greatest Deno
- -- allow-env
  - Needed for loading configuration variables, like API_KEY

## Lab

At the root, there's a small lab for consuming this package.

```shell
> deno run --allow-read --allow-net --unstable --allow-write --lock=labs/lock.json --lock-write --allow-env labs/index.ts
```

Debugging: --inspect

repository: p-ob/deno-riot

gha_language: TypeScript

repo_name: p-ob/deno-riot


text:
# VOEC Indicator Firefox extension

Indicate if the currently open website is registered in the VOEC registry.

The script can be updated/generated with `./generate_script.py voec-list.csv` where voec-list.csv is the CSV file downloaded from [the Norwegian Tax Authority](https://www.skatteetaten.no/person/avgifter/kjop-fra-utlandet/nettbutikker-og-e-markedsplasser-som-er-registrert-i-voec-registeret/).

repository: mikeri/voec-indicator

repo_name: mikeri/voec-indicator


text:
# Sparkify : Your Provider for The World Best Music Library

This repository contains scripts for **E**xtracting music data from json files, **T**ransform these data to match the **sparkifydb** database schema, and **L**oad these transformed data into the database.

Following is a diagram representing the database schema, with 1 fact table `songplays` and 4 dimension tables `users`, `time`, `songs` and `artists` :

![db schema](assests/sparkifydb_schema.png)

The database design follows a `star schema` to help our analyst team, **The Sparkalysts**, in their mission to answering the questions running through the head of our CEO **The Big Spark** such as :

1. List of songs listened by user `Lily` `Koch` ?
2. In which year did our users listened the most to music ?
3. ...

## Project Structure

The project is structured as follow:

* A folder named `data` contains two subdirectories as provided by the project template : `log_data` (containing users' activities data) and `song_data` (containing songs and artists data)
* A script `sql_queries.py` which contains all the SQL queries for creating the `sparkifydb`, the different tables, and some other queries.
* A script `create_tables.py` which creates the database and the defined tables
* A script `etl.py` which extracts and transforms the log and song data before loading the processed data into the tables created by the script `create_tables.py`

## Project Setup

To set everything up, there is an extra requirement in addition to those specified in the previous section : a json configuration file `config.json` located at the same level of other scripts. This file contains the credentials for connecting to the database. Following is a sample configuration file content :

```json
{
	"host": "<IP_ADDRESS>",
	"dbname": "studentdb",
	"user": "student",
	"password": "student"
}
```

The field `dbname` represent the default database name.

To set up the project the following steps can be followed in the given order :

* execute the `create_tables.py` script that will connect to the default database specified in the `config.json` file, drop the `udacitydb` database and the tables if it exists and recreate it, connect to the newly created database and drop the tables and recreates them

```bash
python create_tables.py
```

* execute the script `etl.py` that will process the json files and populate the database

```bash
python etl.py
```

## Example queries

Here are the results for the example of requests listed in the introduction:

1. List of songs listened by user `Lily` `Koch` ?
![query1](assests/q1.png)

2. In which year did our users listened the most to music ?

![query2](assests/q2.png)

## TO-DO List

* [ ] Add Analytic Dashboard for easier interaction with non-experts
* [ ] Add more data quality check


text:
---
layout: post
title: Love under the beats, growing with love
subtitle: — Sing Street review
date: 2017-09-10
author: Joy
header-img: "img/post-bg/sing-street.jpg"
catalog: false
category:
    - blog
tags:
    - movie review
---
Recommended by my friends, I watched the movie ‘Sing Street’ this Saturday. If you asked me how did I find that movie, I would give 9 out of 10.  It was a unforgettable movie that was setting under eight’s beat and telling about teenage love, dream chasing and family.

The story was happened when Connor was trying to approach to  a Girl, Raphina, on street by inviting her to starring in his band video. By that time, he didn’t even have a band. To his surprise, Raphina accepted his invitation.  Then Conner and his friends decided to form a band in order to deliver his commitment to that Raphina.  The following plots developed by the relationship changes between Connor and Raphina and the all the songs created by the band.

I love the opening ending of this movie: Connor and Raphina was on their boat to London and chasing after their dream.  It did not tell you what is going on then and what will happen to them. Audience can use their imaginary to create their own version of this story.  Just like our life, everything is unpredictable, we would know what will happen until the timing come.

Also, the love between Connor and Raphine reminds me of my teenage love. It was so pure that it seems like it won’t happen in adults world. Not like adults love which to some extent weighs by some material factors, teenage love was only related to the feelings and connections to each other.

If you like musics and want to find a good movie to spend your weekend, I would highly recommend **Sing Street** to you. This movie would inspire you a lot more than me regarding chasing after dream, teenage love or even rock music in Eighties.

![](/img/in-post/post-sing-street/sing-street-banner.jpg)
Because it is a music movie, all the songs are amazing. At last, I would link my favourite song in this movie — [**To find you**](https://open.spotify.com/track/75WOBjhzpCPLxo8MqXyJf1). And all song tracks can be also find in [*Spotify*](https://open.spotify.com/artist/7AKznuvHmbW7uZbUkLY4Je).


text:
# Senko_bot
This is an open source bot, which can do a variety of things, like:

1. Provide with media from nekos.life
2. Search and send media from a given site in chat
3. Search and provide media from subreddit from reddit.com

## Installation
To install and run Senko_bot, you must firstly create a bot from Botfather in Telegram and aquire the token, then:

```bash
sudo apt install node && npm
cd Senko_bot
npm i
```

In the index.js file, you must replace the (INSERT YOUR BOT TOKEN HERE) with your token

```javascript
const bot = new telebot(INSERT YOUR BOT TOKEN HERE);
```

Next, in every command file, you havbe to replace the originals Senko_bot tag with yours.

Lets take the /help command for this instance:

```javascript
bot.on(/^\/help(@Senko_kitsune_bot)?/, async (msg) => {
//replace @Senko_kitsune_bot with your bots username
```

## Run

Command for running the bot:

```bash
cd Senko_bot
node .
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
MIT


text:
# Load / Integration Tests

These tests simulate actual end user usage of the application. They are used to
validate the overall functionality and can also be used to put simulated load on
the system. The tests are written using [locust.io](http://locust.io)

## Parameters

* `[host]` - The hostname (and port if applicable) where the application is exposed. (Required)
* `[number of clients]` - The nuber of concurrent end users to simulate. (Optional: Default is 2)
* `[total run time]` - The total time to run before terminating the tests. (Optional: Default is 10)

## Deploy to K8S

1. Start the locust pods

```text
kubectl apply -f load-dep.yaml
```

2. Watch pods/hpa

```text
kubectl get hpa --watch
```

3. Teardown

```text
kubectl delete -f load-dep.yaml
```

## Running locally

### Requirements

* locust `pip install locustio`

`./runLocust.sh -h [host] -c [number of clients] -r [total run time]`

## Running in Docker Container

* Build `docker build -t mushop/load .`
* Run `docker run mushop/load -h [host] -c [number of clients] -r [total run time]`

repository: oracle-quickstart/oci-cloudnative

repo_name: oracle-quickstart/oci-cloudnative


text:
#Generic Markov Bot

[Parker Moore](https://github.com/parkr)'s [ebooks](https://github.com/parkr/ebooks) gem is [great](https://twitter.com/pikesley_ebooks), but I wanted something more generic, not tied to a Twitter archive. So I cooked this up.

##Twitter config

See [Dalton Hubble's great blogpost](http://dghubble.com/blog/posts/twitter-app-write-access-and-bots/) for instructions on setting up a Twitter bot. Once you've done this, you should have the credentials in _~/.twurlrc_. Use the `twurl_extractor.rb` script to fill in your _.env_:

    bundle
    ./twurl_extractor.rb <name_of_your_bot>

##Source text(s)

    mkdir sources/

Then put your source text(s) into that _sources/_ dir, as plain text files

##Tweet

    ./bot.rb

Er, and that's it

##Automate it

To run it out of Upstart, use a _/etc/init/markov-bot.conf_ like this:

    pre-start script
    bash << "EOF"
      mkdir -p /home/bot/log/
      chown -R bot /home/bot/log/
    EOF
    end script

    start on runlevel [2345]
    stop on runlevel [016]

    exec su - bot -c 'while [ 1 ] ; do cd generic_markov_bot ; ./bot.rb  >> /home/bot/log/markov.log ; sleep ${RANDOM:0:4} ; done'

Sweetened to taste, of course

##Bugs

Probably. As you can see, there are no tests here


text:
## Bubble Sets

A Java implementation of Christopher Collins' [bubble sets] [1]
without the use of external libraries.
A JavaScript implementation can be found [here](https://github.com/JosuaKrause/bubblesets-js).

This project can be build in eclipse as well as with Maven.
Use `mvn install` to generate jars in the *target/* directory.
The *Bubble-Sets-X.X.X.jar* contains the API for the bubble sets
and *Bubble-Sets-X.X.X-example.jar* contains a little example program
showing the bubble sets. Alternatively the project can be used as dependency
in other Maven projects (see [below] (#maven-integration)).

To get started, you can use the following code:

    // a list of groups of rectangles --
    // bubble set will try to create an outline with
    // as little overlap between the groups as possible
    List<Rectangle2D[]> items = ...;

    // using bubble set outlines
    SetOutline setOutline = new BubbleSet();

    // make the outlines smooth
    AbstractShapeGenerator shapeGenerator = new BezierShapeGenerator(setOutline);

    // generate shapes for each group
    // the shapes can be drawn by a Graphics object
    // as passed by a component's paint method
    Shape[] shapes = shapeGenerator.createShapesFor(items);

A more advanced example uses groups which can also
define lines that guide the iso-contour. It also shows
a possible use within a paint method:

    @Override
    public void paint(final Graphics gfx) {
        // using graphics 2d
        Graphics2D g = (Graphics2D) gfx;

        // the list of groups
        List<Group> items = null;

        // use bubble sets and make the outlines smooth and less complex
        // to draw by simplifying the raw points
        AbstractShapeGenerator shapeGenerator = new ShapeSimplifier(
                new BSplineShapeGenerator(new ShapeSimplifier(
                        new PolygonShapeGenerator(new BubbleSet()))), 2.0);

        // generate shapes for each group
        Shape[] shapes = shapeGenerator.createShapesForGroups(items);

        for (Shape shape : shapes) {
            // drawing the content
            g.setColor(Color.ORANGE);
            g.fill(shape);

            // and then the outlines
            g.setColor(Color.BLACK);
            g.draw(shape);
        }
    }

The following set outlines are available:

- `setvis.ch.ConvexHull`
- `setvis.bubbleset.BubbleSet`

And the following shape generators:

- `setvis.shape.PolygonShapeGenerator`
- `setvis.shape.BezierShapeGenerator`
- `setvis.shape.BSplineShapeGenerator`
- `setvis.shape.ShapeSimplifier` (reduces the shape complexity)

### Maven Integration

In order to use bubble sets within a Maven project you can use the following dependency
(in the `<dependencies>` section)::

    <dependency>
      <groupId>joschi-mvn</groupId>
      <artifactId>Bubble-Sets</artifactId>
      <version>0.0.1</version>
    </dependency>

However, this requires an additional repository in the repositories section (`<repositories>`) of the pom.xml file:

    <repository>
        <id>joschi</id>
        <url>http://josuakrause.github.io/info/mvn-repo/releases</url>
    </repository>

[1]: http://vialab.science.uoit.ca/portfolio/bubblesets "Collins, Christopher; Penn, Gerald; Carpendale, Sheelagh. Bubble Sets: Revealing Set Relations over Existing Visualizations. In IEEE Transactions on Visualization and Computer Graphics (Proceedings of the IEEE Conference on Information Visualization (InfoVis '09)), 15(6): November-December, 2009."

repository: magsilva/Bubble-Sets

repo_name: magsilva/Bubble-Sets


text:
---
layout: project
project-name: Memory Pinball
github: https://github.com/nkorobkov/memory-pinball
permalink: /projects/pinball
title: Memory Pinball

website: https://nkorobkov.github.io/memory-pinball/
date: FEB 2017 - MAR 2017
---

### Rules

Memory Pinball is a small and relatively simple game.

You are presented with a square grid with walls in some squares.

Your task is to memorize walls as well as you can within a few seconds. Because after a few seconds, the walls will fade, and the ball would show up.

And now your task is to predict where the ball will leave the field if you push it on the field. The ball will move linearly and bounce off the walls.

You goal is to predict correctly. And that's it!

### Tech

Game is implemented in pure **JQuery**


text:
STM32 platform driver
=====================

The directory `driver` contains the STM32 platform driver for Libuavcan.

A dedicated example application may be added later here.
For now, please consider the following open source projects as a reference:

- https://github.com/PX4/sapog
- https://github.com/Zubax/zubax_gnss
- https://github.com/PX4/Firmware


text:
## Automated Testing

Automated Testing is the process of allowing software to detect and make changes to code without having to rely on the lengthy task of manual human revision. This is often used to quickly catch bugs introduced into the code when implementing new features, and can greatly reduce the amount of errors that often occur when working on a development project.

Automated Testing is often a key component of continuous integration, wherein developers make small, frequent updates to their shared repositories to minimize large changes to code infrastructure. Each integration made can then be verified by an automated build and automated tests.

Github automatically has several automated features embedded into its platform: for example, the detection of merge conflicts during pull requests for new commits.

![Chart image](/images/git_testing.png)
> **Source:** [Docker](http://www.effectivedevelopment.org/automation/testing.html)

**References:**

[Effective Development](http://www.effectivedevelopment.org/automation/testing.html)

[CodeShip](https://codeship.com/continuous-integration-essentials)

[Ben Balter](https://ben.balter.com/2015/09/10/blog-style-tests/)

path: /old files/feature_testing.md


text:
---
title: "2018年IAHS(国际水文学会)选出的23个未解决的水文问题"
subtitle: The 23 unsolved problems in hydrology identified by the community process in 2018.
summary:
authors:
- admin
tags: []
categories: []
date: "2019-09-16T00:00:00Z"
lastMod: "2019-09-05T00:00:00Z"
featured: true
draft: false
# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
image:
  caption: ""
  focal_point: ""

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references
#   `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
---

# The 23 unsolved problems in hydrology identified by the community process in 2018.

Link of the paper:[link](https://www.tandfonline.com/doi/full/10.1080/02626667.2019.1620507)

**Time variability and change**

1. Is the hydrological cycle regionally accelerating/decelerating under climate and environmental change, and are there tipping points (irreversible changes)?

2. How will cold region runoff and groundwater change in a warmer climate (e.g. with glacier melt and permafrost thaw)?

3. What are the mechanisms by which climate change and water use alter ephemeral rivers and groundwater in (semi-) arid regions?

4. What are the impacts of land cover change and soil disturbances on water and energy fluxes at the land surface, and on the resulting groundwater recharge?

    **Space variability and scaling**
5. What causes spatial heterogeneity and homogeneity in runoff, evaporation, subsurface water and material fluxes (carbon and other nutrients, sediments), and in their sensitivity to their controls (e.g. snow fall regime, aridity, reaction coefficients)?
6. What are the hydrologic laws at the catchment scale and how do they change with scale?
7. Why is most flow preferential across multiple scales and how does such behaviour co-evolve with the critical zone?
8. Why do streams respond so quickly to precipitation inputs when storm flow is so old, and what is the transit time distribution of water in the terrestrial water cycle?

    **Variability of extremes**
9. How do flood-rich and drought-rich periods arise, are they changing, and if so why?
10. Why are runoff extremes in some catchments more sensitive to land-use/ cover and geomorphic change than in others?
11. Why, how and when do rain-on-snow events produce exceptional runoff? Interfaces in hydrology
12. What are the processes that control hillslope–riparian–stream– groundwater interactions and when do the compartments connect?
13. What are the processes controlling the fluxes of groundwater across boundaries (e.g. groundwater recharge, inter-catchment fluxes and  discharge to oceans)?
14. What factors contribute to the long-term persistence of sources responsible for the degradation of water quality?
15. What are the extent, fate and impact of contaminants of emerging concern and how are microbial pathogens removed or inactivated in the
subsurface?

    **Measurements and data**
16. How can we use innovative technologies to measure surface and subsurface properties, states and fluxes at a range of spatial and temporal scales?
17. What is the relative value of traditional hydrological observations vs soft data (qualitative observations from lay persons, data mining etc.), and under what conditions can we substitute space for time?
18. How can we extract information from available data on human and water systems in order to inform the building process of socio-hydrological models and conceptualisations?

    **Modelling methods**
19. How can hydrological models be adapted to be able to extrapolate to changing conditions, including changing vegetation dynamics?
20. How can we disentangle and reduce model structural/parameter/input uncertainty in hydrological prediction?

    **Interfaces with society**
21. How can the (un)certainty in hydrological predictions be communicated to decision makers and the general public?
22. What are the synergies and tradeoffs between societal goals related to water management (e.g. water–environment–energy–food–health)?
23. What is the role of water in migration, urbanisation and the dynamics of human civilisations, and what are the implications for contemporary water management?

# 2018年IAHS(国际水文学会)选出的23个未解决的水文问题。

**时间变异和未来变化**

1. 水文循环在气候和环境变化下是否在区域内加速/减速，是否存在引爆点（不可逆转的变化）？

2. 寒冷地区径流和地下水如何随气候变暖而变化（例如冰川融化和永久冻土融化）？

3. 气候变化和用水改变（半）干旱地区间歇河流和地下水的机制是什么？

4. 土地覆盖变化和土壤干扰对地表水和能量通量以及由此产生的地下水补给的影响是什么？

    **空间变异和尺度问题**

5. 是什么导致径流，蒸发，地下水和物质通量（碳和其他营养物质，沉积物）的空间异质性和均匀性，以及不同参考变量的敏感性（例如降雪状态，干旱，反应系数）？

6. 流域尺度的水文规律是什么？它们如何随尺度变化？

7. 为什么大多数土壤优势流(Preferential flow)能跨越于多个尺度，这种行为如何与关键带（Critical Zone）共同演化？

8. 为什么河流对降水输入的响应如此之快，但暴雨径流却是经年之水？陆地水循环中水的流动时间分布是多少？

    **极端事件的变异**

9. 洪水多发时期和干旱多发时期是如何产生的？它们是否发生变化；如果是，为什么呢？

10. 为什么某些流域的径流极值对土地利用/覆盖和地貌变化比其他流域更敏感？

11. 积雪降雨（Rain on Snow)事件中产生特殊的径流，何因、何法、何时？

    **水文界面**

12. 控制“山坡-河岸湿地-河流-地下水”之间交互的过程是什么？何时连接？

13. 控制地下水的边界流量的过程是什么（例如地下水补给，流域间交互和入海汇流）？

14. 影响水质下降的长期、持续存在的因素是什么？

15. 新关注的污染物的范围，过程和影响是什么？如何去除或者杀死地下系统里的微生物病原体

    **观测和数据**

16. 如何利用新技术测量地表、地下的时空上的特征，状态和通量？

17. 与软数据（非专业人员的定性观测，数据挖掘等）相比，传统水文观测相对价值是什么？在什么条件下可以用海量空间数据替代长期观测？

18. 我们如何从人类和水系统的现有数据中提取信息，以辅助“社会-水文模型”和概念的构建过程？

    **建模方法**

19. 如何调整水文模型以便模型根据不断变化的条件进行未来预测，包括改变植被的变化？

20. 我们如何在水文预测中解惑并减少模型结构/参数/输入的不确定性？

    **与社会接轨**

21. 如何将水文预测中的确定性和不确定性传达给决策者和公众？

22. 与水管理有关的社会目标（例如水 - 环境 - 能源 - 食品 - 健康）之间的协同作用和权衡是什么？

23. 水在移民，城市化和人类文明动态中的作用是什么，对当代水管理有何影响？

repository: shulele/Be-A-Hydrologist

repo_name: shulele/Be-A-Hydrologist


text:
# End-to-End, Real-time ML Reference Data Pipeline

[![Gitter Chat Room](https://badges.gitter.im/fluxcapacitor/pipeline.svg)](https://gitter.im/fluxcapacitor/pipeline?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Powered by the PANCAKE STACK!
![PANCAKE STACK](http://advancedspark.com/img/pancake-stack-sign-sm.png)

## Upcoming PANCAKE STACK Workshops!
### Title
**Building an End-to-End Streaming Analytics and Recommendations Pipeline with Spark, Kafka, and TensorFlow**

### Agenda (Full Day)
**Part 1 (Analytics and Visualizations)**
* Analytics and Visualizations Overview (Live Demo!)
* Verify Environment Setup (Docker, Cloud Instance)
* Notebooks (Zeppelin, Jupyter/iPython)
* Interactive Data Analytics (Spark SQL, Hive, Presto)
* Graph Analytics (Spark, Elastic, NetworkX, TitanDB)
* Time-series Analytics (Spark, Cassandra)
* Visualizations (Kibana, Matplotlib, D3)
* Approximate Queries (Spark SQL, Redis, Algebird)
* Workflow Management (Airflow)

**Part 2 (Streaming and Recommendations)**
* Streaming and Recommendations (Live Demo!)
* Streaming (NiFi, Kafka, Spark Streaming, Flink)
* Cluster-based Recommendation (Spark ML, Scikit-Learn)
* Graph-based Recommendation (Spark ML, Spark Graph)
* Collaborative-based Recommendation (Spark ML)
* NLP-based Recommendation (CoreNLP, NLTK)
* Geo-based Recommendation (ElasticSearch)
* Hybrid On-Premise+Cloud Auto-scale Deploy (Docker)
* Save Workshop Environment for Your Use Cases

### Locations and Dates
* [San Francisco](http://advanced-spark-tensorflow-june.eventbrite.com/?discount=ADVANCEDSPARK15): Saturday, June 4th
* [Washington DC](https://advanced-spark-kafka-tensorflow-washington-dc.eventbrite.com/?discount=ADVANCEDSPARK20):  Saturday, June 18th
* [Seattle](https://end-to-end-streaming-recommendations-spark-seattle.eventbrite.com/?discount=ADVANCEDSPARK15): Saturday, July 30th
* [SF Bay Area](https://end-to-end-streaming-recommendations-spark-aug-bay.eventbrite.com/?discount=ADVANCEDSPARK15): Saturday, August 6th
* [Chicago](https://end-to-end-streaming-recommendations-spark-chicago.eventbrite.com/?discount=ADVANCEDSPARK20): Saturday, September 17th
* [Toronto](https://end-to-end-streaming-recommendations-spark-toronto.eventbrite.com?discount=ADVANCEDSPARK20): Saturday, September 24th
* [New York](https://end-to-end-streaming-recommendations-spark-nyc.eventbrite.com?discount=ADVANCEDSPARK25): Saturday, October 1st
* [Munich](https://end-to-end-streaming-recommendations-spark-munich.eventbrite.com?discount=ADVANCEDSPARK25): Saturday, October 15th
* [London](https://end-to-end-streaming-recommendations-spark-london.eventbrite.com?discount=ADVANCEDSPARK25): Saturday, October 22nd
* [Brussels](https://end-to-end-streaming-recommendations-spark-brussel.eventbrite.com?discount=ADVANCEDSPARK25): Saturday, October 29th

[Suggest a City and Date](https://docs.google.com/forms/d/1fYqnjfXZjHYF0QgxWGQPXDcdCneBeOhGZasvejTw0WE/edit?usp=sharing)

### Description
The goal of this workshop is to build an end-to-end, streaming data analytics and recommendations pipeline on your local machine using Docker and the latest streaming analytics
* First, we create a data pipeline to interactively analyze, approximate, and visualize streaming data using modern tools such as Apache Spark, Kafka, Zeppelin, iPython, and ElasticSearch.
* Next, we extend our pipeline to use streaming data to generate personalized recommendation models using popular machine learning, graph, and natural language processing techniques such as collaborative filtering, clustering, and topic modeling.
* Last, we productionize our pipeline and serve live recommendations to our users!

## Architecture Overview
**Follow [Wiki](https://github.com/fluxcapacitor/pipeline/wiki) to Setup Docker-based Environment**
![Pipeline Architecture Overview](http://advancedspark.com/img/architecture-overview-with-nifi-sm.png)

##  Screenshots
### Apache Zeppelin Notebooks
![Apache Zeppelin Notebooks](http://advancedspark.com/img/zeppelin-notebooks-sm.png)

### Stanford CoreNLP Sentiment Analysis
![Stanford CoreNLP Sentiment](http://advancedspark.com/img/corenlp-sentiment.png)

### Jupyter/iPython Notebooks
![Jupyter/iPython Notebooks](http://advancedspark.com/img/jupyter.png)

### SparkR Notebooks
![SparkR Notebooks](http://advancedspark.com/img/sparkr.png)

### TensorFlow Notebooks
![TensorFlow Notebooks](http://advancedspark.com/img/tensorflow.png)

### Apache NiFi Data Flows
![Apache NiFi Data Flows](http://advancedspark.com/img/nifi-flow.png)

### AirFlow Workflows
![AirFlow Workflows](http://advancedspark.com/img/airflow.png)

### Presto Queries
![Presto Queries](http://advancedspark.com/img/presto.png)

### Tableau Integration
![Tableau Integration](http://advancedspark.com/img/flux-tableau.png)

### Beeline Command-line Hive Client
![Beeline Command-line Hive Client](http://advancedspark.com/img/flux-beeline.png)

### Log Visualization with Kibana & Logstash
![Log Visualization with Kibana & Logstash](http://advancedspark.com/img/flux-kibana.png)

### Spark, Spark Streaming, and Spark SQL Admin UIs
![Spark Admin UI](http://advancedspark.com/img/flux-spark-1.png)
![Spark Admin UI](http://advancedspark.com/img/flux-spark-2.png)
![Spark Admin UI](http://advancedspark.com/img/flux-spark-3.png)
![Spark Admin UI](http://advancedspark.com/img/flux-spark-4.png)
![Spark Admin UI](http://advancedspark.com/img/flux-spark-5.png)
![Spark Admin UI](http://advancedspark.com/img/flux-spark-6.png)

### Ganglia System and JVM Metrics Monitoring UIs
![Ganglia Metrics UI](http://advancedspark.com/img/flux-ganglia-1.png)
![Ganglia Metrics UI](http://advancedspark.com/img/flux-ganglia-2.png)
![Ganglia Metrics UI](http://advancedspark.com/img/flux-ganglia-3.png)

## Tools Overview
![Apache Spark](http://spark.apache.org/images/spark-logo.png) ![Redis](https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/200px-Redis_Logo.svg.png)
![Apache Cassandra](https://upload.wikimedia.org/wikipedia/commons/a/a0/Cassandra_logo.png)
![Apache Kafka](http://www.bogotobogo.com/Hadoop/images/Ecosystem/Kafka.png)
![NiFi](http://advancedspark.com/img/nifi-logo.png)
![ElasticSearch Logstash Kibana](https://www.enalean.com/sites/default/files/field/image/elk-logos.png) ![Apache Zeppelin](http://4.bp.blogspot.com/-rsc3t_dZmBg/VbPDwhb_IBI/AAAAAAAABeY/9zKUjK4VFbQ/s1600/zeppelin-bl.png) ![Ganglia](https://developer.nvidia.com/sites/default/files/akamai/cuda/images/Ganglia-logo-small-rs.jpg) ![Hadoop HDFS](http://datatechblog.com/wp-content/uploads/2014/04/HadoopHive.png) ![iPython Notebook](http://ipython.org/ipython-doc/dev/_images/ipynb_icon_128x128.png)
![Docker](http://blog.docker.com/wp-content/uploads/2013/08/KuDr42X_ITXghJhSInDZekNEF0jLt3NeVxtRye3tqco.png)

repository: TensorFlowHub/GoldenFlow

repo_name: TensorFlowHub/GoldenFlow


text:
---
tags: guide
layout: page
title: Caveats
date: 2021-02-08
---

No design is perfect. The architecture proposed in this document provides a good starting point for sustainable, long term development in Rails, but by no means it gives answers to all possible cases and complications that could arise along the way. It is crucial for developers to always keep in mind the principles of object oriented design while adopting this architecture, such as keeping objects small and simple, with thoughtful introduction of indirection when necessary.

This section exemplifies complications that might arise from the use of the patterns here prescribed, with suggestions on how to address these limitations when possible.

## Complex Actions

Actions are designed to be the centerpieces of business logic, coordinating all the steps required to process a user request. For that reason, they are the objects with the highest tendency to become big, complex, and coupled with many other structures. Actions are by definition aware of Inputs, Repositories, Models, Jobs, and many other objects from the system. It won’t take too long for Actions to lean towards accumulating nested code, conditionals, and many other code smells.

Actions are such magnets for complexity because of their very nature of being the core units of business logic. After all, the business logic layer of any app is modified far more often than any other layer; the churn of business logic code is incredibly high when compared to the rest of the system, and there is no escape for that. This complexity can be minimized through refactorings and indirection, but apps will always need to have business logic entry points where everything is tied together.

In order to avoid excessive complexity in Actions, it is crucial to model these objects atomically enough so they can be specialized to handle very particular requests in isolation. Designing simpler Actions might impact even the routes and controllers design. For example, instead of having one big Action that receives many optional arguments, it is preferable to split it in different Actions (and therefore different endpoints) for each specific case.

Actions can also collaborate with auxiliary objects that handle certain aspects of business logic beyond Repositories and Jobs. Each app might require additional objects and layers so the burden in Actions is reduced. For instance, the specifics of crafting outgoing HTTP requests to services might be deferred to service objects that play that role, and Actions can simply instantiate and send messages to them.

## Duplication in Actions

Actions might end up sharing similarities to other Actions, leading to an excess of duplicated code in these objects. Given that by design Actions are not allowed to interact with each other, and also given that there can only be one Action for each request, it might get tricky to remove the repeated logic.

First of all, it is important to emphasize that not all duplication needs to be removed in order to achieve a sustainable architecture. More often than not, attempts to remove duplication lead to a poor, complex design and an overall worse code than the previous duplicated code. Developers feel the urge to remove every and single duplication as a deceitful instinct of fixing a possible code smell. The truth, however, is that duplication is much easier to understand and change than abstractions that are poorly designed. Before addressing any duplication, the best course of action is to wait until the duplicated logic is referenced too many times, copied at least three times over.

Once the duplication becomes a real concern, the code can be refactored by extracting the repeated logic into specialized objects Actions can interact with. A particular case is when the duplication happens around composing the Result object. An app might introduce a new layer of Result composers for that purpose that Actions can rely on and delegate that process to.

## Testing Actions

The topic of testing is not covered in this document, but a word is needed regarding testing Actions. Actions don’t need to be tested through unit tests. Instead, these objects’ behaviours should be asserted indirectly through proper integration test coverage.

Given that Actions represent an entire feature or use case, developers might be tempted to end up writing unit tests that are actually integration tests in disguise. For example, a unit test for the Create Article Action might end up asserting that a Record is persisted. This test is not a unit test, since the code in the Action is completely decoupled from the database or from Active Record itself. Such assertions are important, but should be written as integration or system tests.

In theory, unit testing for Actions needs to ensure that the Action is sending the expected messages to its collaborator objects and that the Result returned by the Action has the right values, and nothing more. This would likely require mocking/stubbing libraries, so tests are performed fast by not actually making network calls or database operations. Once again, this does not replace the need for integration tests whatsoever, since only these end-to-end assertions can ensure that the system as a whole is functional and the network of objects behave properly in the real world.

Given that the only way to test Actions is through excessive stubbing and mocking, and that these unit tests do not replace integration tests, writing unit tests for Actions is an unnecessary burden. Instead, the Actions behaviours should be asserted indirectly through proper integration test coverage.

## Validation Antipatterns

This architecture proposes the use of validation in Input objects by including Active Model validations. By inheriting from Active Model, Inputs can have the same well-known validation API and seamlessly integrate with view forms.

```ruby
   if input.valid?
     article = ArticleRepository.new.create(input)
     result.success(article: article)
   else
     result.failure(input.errors)
   end
```

This approach comes with costs, however. Firstly, this choice lets Inputs inherit the Rails antipattern of mutating objects in order to fetch validation results. A valid object has no errors, but only until someone else asks it for its valid state, in which it might end up populating its own errors, mutating its own state. This is a brittle design that violates the idea of an Input representing the user’s entries and nothing more. Worst even, this mutation happens by calling a predicate method. Predicates, as any query method, should simply return information about the object but not alter the state of a subsystem.

Secondly, validation errors are represented as instances of Active Model Errors, which is quite limited in its API. There are no standardized formats for individual errors, which might negatively impact the design of meaningful representation of validation messages, as seen in the GraphQL section.

Apps that face these costs might opt for not using Active Model for input validation, but instead introduce their own Validators as collaborator objects that Actions can invoke in order to check for the validity of Inputs. Similarly, errors can be represented using well-defined structs with proper fields such as messages, codes, and attribute names.

## Transactions

Database transactions guarantee that a series of steps are performed atomically, making possible to roll them all back in case of errors. In Rails, transactions are defined as blocks where all their database operations are committed to the database together in case of a successful yield, or rolled back if an error is raised.

Grouping logical steps in atomic groups with transactions is part of the business logic layer. When the app requires transactions, there is a risk for Actions to end up coupled with Active Record once again. In order to achieve a sustainable architecture, however, it is important to respect the design decision to encapsulate Active Record behind Repositories in this case as well. Additionally, transactions are excellent candidates to be extracted into more specialized objects.

Back to the Blog example, let’s say we don’t want to persist a comment if the Job that delivers the notification email fails to be enqueued. This requires grouping the Comment creation and the email notification delivery in a transaction.

The first thing we can do is to create a method in the Repository to encapsulate Active Record:

```ruby
class CommentRepository
 class << self
   def transaction
     ActiveRecord::Base.transaction { yield(new) }
   end
 end
end
```

We can now model our transaction as an object that executes the piece of protected business logic that is rolled back all at once in case of errors:

```ruby
class CreateCommentTransaction
 def perform(input)
   CommentRepository.transaction do |repository|
     comment = repository.create(input)
     NewCommentEmailJob.perform_later(comment.id)
     comment
   end
 end
end
```

The Action can now simply validate the input and perform the Transaction, remaining decoupled from Active Record, or the transaction block itself:

```ruby
class CreateCommentAction < Action
 result :comment

 def perform(input)
   if input.valid?
     comment = CreateCommentTransaction.new.perform(input)
     result.success(comment: comment)
   else
     result.failure(input.errors)
   end
 end
end
```

repository: ujihisa/upgrow

repo_name: ujihisa/upgrow


text:
# Voon: Extension client

## What is Voon?([YouTube](https://www.youtube.com/watch?v=r_--woBCA8s))

https://user-images.githubusercontent.com/37946988/129762821-6c89d60c-bae0-46b2-a61a-fe107b1da129.mov

## Objective
Providing a framework to facilitate the incorporation of features into youtube. So far the potential for features ranges from image recognition on the video to live timestamped comment feed.

## Inspiration
Voon was inspired by the lack of features provided by video streaming sites (where youtube easily claims the majority of the market). The solution, I concluded, was that instead of competing against the goliath of youtube I would build a wrapper framework built on top of youtube (if you cant beat them join them).

## Getting Started with Extension client

1. run `npm install && npm run dev-build`

2. Install the extension in Google Chrome (or any Chromium browser)

3. Navigate to the following URL in Chrome:
```text
<YOUR_BROWSER_NAME>://extensions/
```

4. Make sure `Developer Mode` is turned on, and click the `Load unpacked` button. Select the `build` folder of the project.

5. Once you have the [voon-video_processing]() repository set up, update `videoProcessingURL` in [helperFunctions.ts](https://github.com/CakeCrusher/voon-client_extension/blob/master/src/helperFunctions.ts) with your tunneled URL. To tunnel urls I suggest you use [Ngrok](https://ngrok.com/)

## Full project
Voon is comprised of multiple code repositories: client, backend, video-processing server, iframe provider website, and the database.

### Tech stack
- Client: typescript, react, chrome dev tools
- Backend: node, google API,
- Video-processing server: Flask, tesseractORC, OpenCV, scikit, Docker
- Iframe provider website: Node
- Databse: PostgresSQL, Hasura, GraphQL

## Set up the other Voon repositories
<!-- - [voon-client_extension](https://github.com/CakeCrusher/voon-client_extension/edit/master/README.md) -->
- [video_processing](https://github.com/CakeCrusher/voon-video_processing)
- [backend](https://github.com/CakeCrusher/voon-backend)
- [iframe_service](https://github.com/CakeCrusher/voon-iframe_service)