text:
+++
title = "Numerical simulation of acoustic waves scattering by isolated vortex structures"

# Date first published.
date = "2013-03-01"

# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
authors = ["olga_doronina", "N. S. Zdanova"]

# Publication type.
# Legend:
# 0 = Uncategorized
# 1 = Conference proceedings
# 2 = Journal
# 3 = Work in progress
# 4 = Technical report
# 5 = Book
# 6 = Book chapter
publication_types = ["2"]

# Publication name and optional abbreviated version.
publication = "Matematicheskoe Modelirovanie"
publication_short = "Matem. Mod."

# Abstract and optional shortened version.
abstract = "We consider a linear sound scattering by an isolated vortex as one of the fundamental problems in order to investigate an interaction of the vortex flow and acoustic waves. We present numerical simulation results for a planar wave scattered by a Gaussian-core vortex and a cylindrical point source acoustic wave scattered by a Rankine vortex. For numerical simulation we use the EBR scheme on meshes of different types. We compare results to the benchmark solution and we also compare different approaches to numerical simulation of the problem."
abstract_short = ""

# Featured image thumbnail (optional)
image_preview = ""

# Links (optional).
url_pdf = "http://www.mathnet.ru/links/6c0221c724e477d42d3a23867c190774/mm3403.pdf"
url_preprint = ""
url_code = ""
url_dataset = ""
url_project = ""
url_slides = ""
url_video = ""
url_poster = ""
url_source = ""

# Custom links (optional).
#   Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
links = [ {name = "Webpage", url= "http://mi.mathnet.ru/eng/mm3403"}]

# Featured image
# Place your image in the `static/img/` folder and reference its filename below, e.g. `image = "example.jpg"`.
[header]
image = ""
caption = ""

+++
The problem of sound scattering by an isolated vortex  is of interest in itself and the basis for understanding the interaction between acoustic waves and a vortex flow, including the process of sound generation by turbulence.

In order to solve this problem we use the linearized Euler equations in the nonuniform average field, taking into account isoentropic medium. For numerical simulation, we also use a scheme based on the quasi-one-dimensional reconstruction of the 5th order of accuracy. Calculations are performed using the parallel research code NOISEtte (KIAM RAS).

We give the calculational results of the plane acoustic wave scattering by isoentropic Gaussian-core vortex of a constant velocity circulation and demonstrate the convergence of solutions to the benchmark solution. Unlike the other authors  results, not only Cartesian meshes, but quasi-uniform unstructured triangular meshes are also used. It is found that in both cases the results are almost the identical for the same number of nodes.

Further, we consider the problem of the cylindrical point source acoustic wave scattering by the Rankine vortex. We carry out the calculations on unstructured meshes and compare the results of different approaches to the problem: a finite-volume approach (NOISEtte), a finite element approach (Actran DGM) and a finite-difference Cabaret scheme.

In particular, the results confirm that the software system NOISEtte and the used method can be successfully applied to the numerical simulation of interaction between acoustic waves and vortex structures.

repository: whitmanscu/website

repo_name: whitmanscu/website


text:
+++
date = "2016-10-25T00:00:00Z"
title = "Slack Single Sign On"
featureslug = "single-sign-on"
type = "breakdown"
feature = "single sign on"
company = "slack"
metadescription = "A detailed analysis of the way that Slack implements Single Sign-On (SSO) with SAML in order to meet the needs of enterprise customers."
pagetitle = "Slack SSO - Enterprise Ready Feature Breakdown"
+++

Slack supports a variety of different login options: standard user-based login, OAuth login with Google Accounts, or SAML login. Slack also has managed to provide a good process to converting an account from one login system to another.

On the administration page of a Slack team, there is an option to select Google Apps or SAML. It should be noted that Slack has different pricing tiers and the middle tier allows you to access the Google Apps login option, and you must be on the highest tier to access the SAML option.

![Slack Enable Alternate Authentication](/slack/images/slack-authentication.png)

## Google Apps Authentication
When visiting this page from an account that is using standard (username/password) authentication, and attempting to enable Google Apps auth, there are a few options. Everything has good defaults, but before enabling Google Apps authentication, the administrator has a chance to review and change these settings:

![Slack Google Apps Authentication Options](/slack/images/google-apps-auth.png)

Some of these items are very powerful:

**Allow users to change their username:** Some products, like Slack, the username is a very integral part of the product. Other applications may not really care too much about the internal username. Slack has decided to recognize this and allow individual users to customize their username without having to ask an admin to change anything in the Google Account.

**Google auth for your team must be used by:** Slack has decided to not make this an all-or-nothing option. Again, recognizing the typical use of their own product, they've decided that you can enforce Google Apps login for everyone, just for your own team, or make it completely optional.  This is a product decision you should consider for your own product. But it is important that a single login source can be enforced in large, enterprise deployments.

The bottom of that screen also has a comment that says *Binding emails will be sent to your team members in order to have them configure SSO with their Slack accounts*. This is a great feature that should be implemented in any product. The path to enable SAML isn't always at the beginning, when a product is first adopted. Often, there will be history and users and content created. Allowing users of your application to transfer their history to the new login credentials is probably a requirement.

## SAML Authentication
In addition to Google Apps, Slack supports pure SAML authentication. When starting to configure SAML login, there are a few options. While SAML is a standard, having easy-to-use buttons to enable some of the most popular SAML providers is a nice feature. If a Slack team wants to use Azure for login, they can select the Azure button, or selecting the Custom SAML 2.0 option will still work.

![Slack SAML Options](/slack/images/saml-options.png)

In this walkthorugh, I'm going to set up a Slack account to authenticate against a OneLogin service. Enabling it for Slack presents the following screen:

![Slack OneLogin](/slack/images/one-login-options.png)

There are a few fields, but Slack does a good job helping the administrator know what to put into each. Compare that screenshot from the Slack site to the screenshot on the OneLogin Administrator page:

![OneLogin](/slack/images/one-login-config.png)

Slack does a good job by naming these fields as similar to the OneLogin names as possible. And they provide hints/placeholder text in the fields that closely resemble the actual contents that you would expect to enter.

After saving this and configuring users on the OneLogin service to have access, the signin process in the Slack client now goes through OneLogin:

![Signin](/slack/images/one-login-login.png)

*This was published on Nov. 22, 2016.*

{{< contributor >}}

----
{{< contributors username="grantmiller" >}}
{{< contributors username="marccampbell" >}}

{{< breakdown-request >}}

license: MIT

repository: enterpriseready/enterpriseready

branch_name: refs/heads/master

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: enterpriseready/enterpriseready


text:
---
layout: default
---

# 1995-11-12 - Re: Who needs time vaults anyway?

## Header Data

From<EMAIL_ADDRESS>(Michael Shields)

To<EMAIL_ADDRESS>Message Hash: 791e35b51cab69d1be50780bad5bede949537969668c07a4b8fc44c1789efac7

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-11-12 02:15:21 UTC

Raw Date: Sat, 11 Nov 95 18:15:21 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Michael Shields)
Date: Sat, 11 Nov 95 18:15:21 PST
To<EMAIL_ADDRESS>Subject: Re: Who needs time vaults anyway?
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

In article<EMAIL_ADDRESS>Bryce<EMAIL_ADDRESS>wrote:
> A single station could serve up multiple pieces.  It would only
> reveal the k piece if the querying agent can prove that he has the
> k-1 piece.  Of course if the total number of stations is small then
> the "physically move the pieces" trick might work.

But you're back to trusting an agent or device not to reveal a secret.
What have you gained?

The point about moving the elements of the message physically apart has
merit, though.  So the one-time pad of timerel, the ideally secure but
unworkable model, is to encrypt your message with an OTP, then securely
transport the pad and location to points that are $ct$ metres apart,
where $t$ is the length of time you want to keep your message secret.
You could do this with a reflector $ct/2$ metres away, assuming your
opponent and you are in the same location.

I suppose this could be useful for very short-term applications (for
reference, the diameter of the solar system is about 5.4 light-hours),
but like the OTP, its application is limited.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMKVYPeyjYMb1RsVfAQFvnAP9H7KfW6pDxvHJF2lIucJyuHX8W2Adrxbd
X5rawyQctlAWwRcef6JIPxHcUuL6uznW7bMXrDQMIzDjQMQ/Rb9SdxKdncU0sNQ3
kEuoCKI0r7FJtRS5fSByB6TyQ9dCJJGVRed7P9KVzjP6bCk7Ri889SfNLBd583Kp
INOMxDJ0sDY=
=LtqD
-----END PGP SIGNATURE-----
--
Shields.

{% endraw %}
```

## Thread

+ Return to [November 1995](/archive/1995/11)

+ Return to "[A.Back@exeter.ac.uk](/authors/a_back_at_exeter_ac_uk)"
+ Return to "[Bryce <wilcoxb@nagina.cs.colorado.edu>](/authors/bryce_wilcoxb_at_nagina_cs_colorado_edu_)"
+ Return to "[Kevin L Prigge <klp@gold.tc.umn.edu>](/authors/kevin_l_prigge_klp_at_gold_tc_umn_edu_)"
+ Return to "[sameer <sameer@c2.org>](/authors/sameer_sameer_at_c2_org_)"
+ Return to<EMAIL_ADDRESS>(Michael Shields)](/authors/shields_at_tembel_org_michael_shields_)"

+ 1995-11-13 (Tue, 14 Nov 1995 04:38:46 +0800) - [Who needs time vaults anyway?](/archive/1995/11/709d3b4e2014be16c3a2b313ca113454fd6f691f7e96c759cf2336bd817a61a0) - _Bryce<EMAIL_ADDRESS>  + 1995-11-13 (Tue, 14 Nov 1995 04:33:28 +0800) - [Re: Who needs time vaults anyway?](/archive/1995/11/730cd507383c62d0f04c7b20b2a258589c1698b0cdf79ce91abe385080ace6ff) - _sameer<EMAIL_ADDRESS>    + 1995-11-12 (Sat, 11 Nov 95 18:15:21 PST) - Re: Who needs time vaults anyway? -<EMAIL_ADDRESS>(Michael Shields)_
    + 1995-11-13 (Mon, 13 Nov 1995 13:16:28 +0800) - [Who needs time vaults anyway?](/archive/1995/11/7965698f2f668d4bf4d09eb2725fee4ff414bfeaee28061214a758fc274f381f) -<EMAIL_ADDRESS>    + 1995-11-13 (Mon, 13 Nov 1995 20:05:11 +0800) - [Re: Who needs time vaults anyway?](/archive/1995/11/014d24c78f9cf80fcc3884a9225a8525d9a8ec2bc71f045a9ad37a1f5f917929) -<EMAIL_ADDRESS>(Michael Shields)_
    + 1995-11-13 (Tue, 14 Nov 1995 05:33:21 +0800) - [Re: Who needs time vaults anyway?](/archive/1995/11/35bda7d309f2548b45c652f61e04f4a41fa0c98e2258c666477d60f857b39e9d) - _Bryce<EMAIL_ADDRESS>  + 1995-11-14 (Tue, 14 Nov 1995 08:13:19 +0800) - [Re: Who needs time vaults anyway?](/archive/1995/11/07d8f0f42793b7568490e91f29f233ee48685e7b1a6871d56ded9ee75ce41801) - _Kevin L Prigge<EMAIL_ADDRESS>


text:
# @kendelchopp/alpaca-js-backtesting

## Disclaimer

This package is in no way affiliated with Alpaca

## Updated to Alpaca Data API v2

This package is a fork of @kendelchopp/alpaca-js-backtesting in order for it to work with Alpaca Data API v2. All credit for this back still goes to Kendel for his great work.

## Getting Started

### Installing the package

```
$ npm install @michaeljwright/alpaca-js-backtesting
```

### Additional Market Data API usage

You can now set a new environment variable called TWELVEDATA_API_KEY in your .env file in order to make use of Twelve Data's API. Please head [here](https://twelvedata.com) to get your free key.

### Writing the code

1. Initialize your Alpaca object with the keys

```JavaScript
const Alpaca = require('@alpacahq/alpaca-trade-api');

const alpaca = new Alpaca({
  keyId: process.env.API_KEY,
  secretKey: process.env.SECRET_API_KEY,
  paper: true,
  usePolygon: false
});
```

2. Initialize your Backtest object

**Note:** When passing in your alpaca object, you are giving this package the ability to use your keys to make API requests. This package will make API requests for the market data so that it can run the simulation. Be careful when sending out your alpaca object.

```JavaScript
const Backtest = require('@michaeljwright/alpaca-js-backtesting');

const backtest = new Backtest({
  alpaca,
  startDate: new Date(2020, 0, 1),
  endDate: new Date(2020, 1, 1)
});
```

3. Run your algorithm replacing Alpaca/websockets accordingly.

For example (commented out lines are the old lines to be replaced):

```JavaScript
// const client = alpaca.data_ws;
// const client = backtest.data_ws;
const client = data_stream_v2

// alpaca.createOrder({...})
backtest.createOrder({...})
```

4. Add a disconnect handler to see how your algorithm performed

```JavaScript
client.onDisconnect(() => {
  console.log(backtest.getStats());
});
```

## Alpaca Compatibility

This table lists the version of @michaeljwright/alpaca-js-backtesting with the version of [alpaca-trade-api-js](https://github.com/alpacahq/alpaca-trade-api-js) it was tested with. Using other versions may require some syntax changes.

| @kendelchopp/alpaca-js-backtesting    | @alpacahq/alpaca-trade-api-js |
| ------------------------------------- | ----------------------------- |
| 1.0.0                                 | 1.4.1                         |
| 1.1.0                                 | 1.4.1                         |
| 1.1.1                                 | 1.4.1                         |
| 1.1.2                                 | 1.4.1                         |
| 1.1.3                                 | 1.4.1                         |
| @michaeljwright/alpaca-js-backtesting | @alpacahq/alpaca-trade-api-js |
| 2.0.3                                 | 2.1.0                         |

## Relevant Functions

### Backtest#createOrder

Creates an order using the same parameters as Alpaca#createOrder

#### Example

```JavaScript
backtest.createOrder({
  symbol: 'SPY',
  qty: 300,
  side: 'sell',
  type: 'market',
  time_in_force: 'day'
})
```

### Backtest#getStats

Gets the stats for the portfolio including starting and ending value and ROI

#### Example

```JavaScript
console.log(backtest.getStats());
```

### Websocket#connect

Simulates connecting to the API, loads the data, and runs the simulation

#### Example

```JavaScript
client.connect();
```

### Websocket#onConnect

Runs a function when establishing the connection. When backtesting, you will usually just use this to subscribe to channels

#### Example

```JavaScript
client.onConnect(() => {
  client.subscribeForBars(['SPY']);
});
```

### Websocket#onDisconnect

Runs a function when the simulation is completed. You can print out the stats here.

#### Example

```JavaScript
client.onDisconnect(() => {
  console.log(backtest.getStats());
});
```

### Websocket#onStockAggMin

This runs your function when a simulated minute occurrs and returns the relevant data. This is where your trading will likely take place. Subject will look something like `SPY` and data will look like a standard bar data.

#### Example

```JavaScript
client.onStockBar(data => {
  if (data.closePrice < 500) {
    backtest.createOrder({
      symbol: 'SPY',
      qty: 300,
      side: 'buy',
      type: 'market',
      time_in_force: 'day'
    });

    console.log('Bought SPY');
  }
});
```

### Websocket#subscribe

Subscribes to the channels listed. Currently, only aggregate minute channels are supported.

#### Example

```JavaScript
client.onConnect(() => {
  client.subscribeForBars(['SPY', 'AAPL']);
});
```

repository: nagolnad/alpaca-js-backtesting

repo_name: nagolnad/alpaca-js-backtesting


text:
# Build iDynTree from source

iDynTree is a fairly classical C++ project build with CMake, so it should be quite easy to build if you are already familiar with how you build C++ projects with CMake.
If you are not familiar with the use of CMake, you can check some documentation on https://cmake.org/runningcmake/ or https://cgold.readthedocs.io .

## C++ Dependencies

Before building iDynTree, you need to install the dependencies of iDynTree. Not all dependenies are strictly required, some of them can be enabled or disabled.
In case they are disabled, tipically some functionality of iDynTree is not provided or disabled.

| Name | Strictly required? | Option to enable/disable | Enabled in conda-forge builds?  |  Enabled in robotology-superbuild builds?  |
|:-----:|:-----------------:|:------------------------:|:-------------------------------:|:------------------------------------------:|
| [Eigen](http://eigen.tuxfamily.org) | **Yes** |  n.a. | ✔ | ✔ |
| [Libxml2](http://xmlsoft.org/) | **Yes** |  n.a.      | ✔ | ✔ |
| [Assimp](http://www.assimp.org/) | No|  `IDYNTREE_USES_ASSIMP` | ✔ |  ✔ |
| [IPOPT](https://projects.coin-or.org/Ipopt) | No |  `IDYNTREE_USES_IPOPT` | ✔ | ✔ |
| [irrlicht](http://irrlicht.sourceforge.net/) | No | `IDYNTREE_USES_IRRLICHT` | ✔ | ✔ |
| [glfw](https://www.glfw.org/) | No | `IDYNTREE_USES_IRRLICHT` | ✔ | ✔ |
| [osqp-eigen](https://github.com/robotology/osqp-eigen) | No | `IDYNTREE_USES_OSQPEIGEN` | ✔ | ✔ |
| [meshcat-cpp](https://github.com/ami-iit/meshcat-cpp) | No | `IDYNTREE_USES_MESHCATCPP` | ❌ | ❌ |

### Install dependencies with conda-forge

If you are using conda, the dependencies of iDynTree can be installed with:
~~~
conda install -c conda-forge cmake compilers  make ninja pkg-config eigen libxml2 assimp ipopt irrlicht osqp-eigen swig python glfw
~~~

### Install dependencies with apt

If you are using an apt-based distribution such as Ubuntu and you want to use apt, the dependencies can be installed via:
~~~
sudo apt-get install build-essential libeigen3-dev libxml2-dev coinor-libipopt-dev libassimp-dev libirrlicht-dev libglfw3-dev
~~~

## Build
Once you installed the necessary dependencies, the iDynTree library can be compiled as any CMake based project. In the following instructions, we indicate with `<additional_platform_specific_options>` where
you should add the platform specific options, as the use of `-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake` if you are using [vcpkg](https://github.com/Microsoft/vcpkg).

With `make` facilities:
```bash
$ git clone https://github.com/robotology/idyntree
$ cd idyntree
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=<prefix> <additional_platform_specific_options> ..
$ make
$ make install
```

With IDE build tool facilities, such as Visual Studio or Xcode
```bash
$ git clone https://github.com/robotology/idyntree
$ cd idyntree
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=<prefix> <additional_platform_specific_options> ..
$ cmake --build . --target ALL_BUILD --config Release
$ cmake --build . --target INSTALL --config Release
```

If you need more help on how to build CMake-based projects, please check [CGold's First step](https://cgold.readthedocs.io/en/latest/first-step.html) section.

In this documentation, `<prefix>` will indicate the installation prefix in which you installed iDynTree, i.e. the value that you passed as [`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) during the CMake configuration.

Depending on the location in which you installed `iDynTree`, you may need to add `<prefix>/bin` to the `PATH` env variable and `<prefix>` to the `CMAKE_PREFIX_PATH` env variable.

### Bindings
To compile bindings to iDynTree in several scriping languages, you should enable them using the `IDYNTREE_USES_PYTHON`, `IDYNTREE_USES_LUA`, `IDYNTREE_USES_MATLAB`, `IDYNTREE_USES_OCTAVE` CMake options.

Then, properly accessing bindings to iDynTree can require some additional steps.

#### Python
You should add to the `PYTHONPATH` enviromental variable the install path of the `iDynTree.py` file.
~~~
export PYTHONPATH=$PYTHONPATH:<prefix>/lib/python<majorPythonVersion>.<minorPythonVersion>./dist-packages/
~~~

#### Python (pybind11)
To compile the python bindings based on [pybind11](https://github.com/pybind/pybind11) set to `TRUE` the `IDYNTREE_USES_PYTHON_PYBIND11` option.

**NOTE**: the generated bindings are not compatible with the bindings generated by SWIG. Do not expect your Python code to use either of the two without modifications.

##### Use
Modify your `PYTHONPATH` environment variable to point to the bindings installation directory:

```sh
export PYTHONPATH=${PYTHONPATH}:<prefix>/<python_package_path>
```

where `<prefix>` corresponds to the value specified in `CMAKE_INSTALL_PREFIX` and `<python_package_path>` is the Python installation prefix, as returned by

```python
disutils.sysconfig.get_python_lib(1,0,prefix='')
```

for example: `lib/python3.8/site-packages`.

Finally to use the bindings in your Python code, simply import the package:

```python
import idyntree.pybind as iDynTree

```

#### MATLAB
You should add to Matlab path the `<prefix>/mex` directory.
You can modify the relative location for Matlab bindings files in the installation prefix using the `IDYNTREE_INSTALL_MATLAB_LIBDIR` and `IDYNTREE_INSTALL_MATLAB_MFILESDIR` CMake options.

#### Octave
You should add to Octave path the `<prefix>/octave` directory.
You can modify the relative location for Matlab bindings files in the installation prefix using the`IDYNTREE_INSTALL_OCTAVE_LIBDIR` and `IDYNTREE_INSTALL_OCTAVE_MFILESDIR` CMake options.

##### MATLAB/Octave bindings modifications
All the other bindings (Python,Lua, ...) are generated by SWIG and compiled on the fly by the user,
by enabling the `IDYNTREE_USES_<LANGUAGE>` option. The Matlab and Octave bindings are an exception because they
rely on an experimental version of Swig, developed for providing Matlab bindings for the [casadi](https://github.com/casadi/casadi/wiki) project. For this reason, usually the Matlab bindigs
are not generated by the users, but by iDynTree developers that have a special experimental Swig
version installed. The bindings code is then committed to the repository, and the `IDYNTREE_USES_MATLAB`
option simply enables *compilation* of the bindings. If you want to regenerate the Matlab bindings,
for example because you modified some iDynTree classes, you can install the experimental
version of Swig with Matlab support from https://github.com/robotology-dependencies/swig/ (branch `matlab`) and then enable Matlab bindings generation with the `IDYNTREE_GENERATE_MATLAB` options.
For more info on how to modify the matlab bindings, see https://github.com/robotology/idyntree/blob/master/doc/dev/faqs.md#how-to-add-wrap-a-new-class-or-function-with-swig .

##### MATLAB/Octave high level wrappers
They are a collection of Matlab/Octave functions that wraps the functionalities of (mainly) the iDyntree class `KinDynComputations` into functions with a typical Matlab/Octave interface. The purpose of the high-level wrappers is to provide a simpler and easy-to-use interface for Matlab/Octave users who want to use iDyntree inside Matlab/Octave, also helping in designing code which is less error-prone and easier to debug (e.g. in case the interface of an iDyntree function will change in the future). More details and a complete list of the wrappers can be found in the [wrappers README](/bindings/matlab/+iDynTreeWrappers/README.md).

**Usage**: the wrappers package is installed together with the iDyntree bindings when compiling iDyntree with option `IDYNTREE_USES_MATLAB` or `IDYNTREE_USES_OCTAVE` set to `ON`. The functions can be called from Matlab/Octave using the namespace `iDynTreeWrappers`, i.e. `iDynTreeWrappers.name_of_the_corresponding_iDynTree_method`.

repository: robotology/idyntree

repo_name: robotology/idyntree


text:
---
title: Tools
taxonomy:
    category: docs
process:
    twig: true
---

![Admin Tools](tools.png)

There are instances where you may want to upload a theme or plugin package that isn't currently in the main Grav plugins directory. Perhaps you have a premium theme that is made available in a zip file, or you're developing a plugin and want to upload your latest build to your Grav install for testing. In any case, you can do this by way of FTP, but the Admin gives you an even simpler solution.

Using the **Direct Install** tool, you can upload a zipped package directly to your Grav install and have it available for use in seconds. This isn't just limited to plugins and themes. You can even upload Grav itself this way and upgrade (or downgrade) doing this, as well. This is especially useful for Grav contributors that want to test their work easily.

As with any installation process, we recommend having a recent backup of your Grav install before using this tool - especially if you plan on using it to change your entire Grav install.

### Uploading

![Admin Tools](tools1.png)

The first method of direct install available is a file upload. You can upload a zip package directly to Grav using this tool. Simply select the **Choose File** button (or drag your zip package to the button with some browsers) and select your local package file. Once you have your file selected, simply hit **Upload and Install** to install your package.

![Admin Tools](tools1b.png)

Once your package has been successfully installed, you will be greeted with an alert letting you know. That's all there is to it!

#### Remote Location

![Admin Tools](tools2.png)

The second method involves linking directly to a package file. For example, if you have a package hosted on a remote server, you can enter the URL of that package in the field. GPM friendly download links such as `https://getgrav.org/download/themes/bootstrap/1.6.0` should work fine.

By default, these uploads are limited to official GPM repository links. But, you can go to **Configuration > System** and toggle the **Official GPM Only** option to **No** to unlock this field and enable direct zip package links that are not official GPM repositories. For example: `http://example.com/mypackage.zip`. This is an advanced feature and should only be used in cases where you have properly vetted the package as safe.

repository: getgrav/grav-learn

branch_name: refs/heads/develop

gha_language: SCSS

repo_name: getgrav/grav-learn


text:
# Release Template

> short tl;dr; of the release

# 🗺 What's left for release

<List of items with PRs and/or Issues to be considered for this release>

# 🚢 Estimated shipping date

<Date this release will ship on if everything goes to plan (week beginning...)>

# 🔦 Highlights

<Top highlights for this release>

# 🏗 API Changes

<Any API changes breaking or otherwise that people should know of>

# ✅ Release Checklist

- [ ] **Stage 0 - Automated Testing**
  - [ ] Feature freeze. If any "non-trivial" changes (see the footnotes of [docs/releases.md](https://github.com/ipfs/js-ipfs/tree/master/docs/releases.md) for a definition) get added to the release, uncheck all the checkboxes and return to this stage.
  - [ ] Automated Testing (already tested in CI) - Ensure that all tests are passing, this includes:
    - [ ] unit/functional/integration/e2e
    - [ ] interop
    - [ ] ~~sharness~~ (Does not run `js-ipfs`)
    - [ ] all the examples run without problems
    - [ ] IPFS application testing
      - [ ] ~~[webui](https://github.com/ipfs-shipyard/ipfs-webui)~~ (Does not depend on `js-ipfs` or `js-ipfs-http-client`)
      - [ ] ~~[ipfs-desktop](https://github.com/ipfs-shipyard/ipfs-desktop)~~ (Does not depend on `js-ipfs` or `js-ipfs-http-client`)
      - [ ] [ipfs-companion](https://github.com/ipfs-shipyard/ipfs-companion)
      - [ ] [npm-on-ipfs](https://github.com/ipfs-shipyard/npm-on-ipfs)
      - [ ] [peer-base](https://github.com/peer-base/peer-base)
      - [ ] [service-worker-gateway](https://github.com/ipfs-shipyard/service-worker-gateway)
    - [ ] Third party application testing
      - [ ] [ipfs-log](https://github.com/orbitdb/ipfs-log)
      - [ ] [orbit-db](https://github.com/orbitdb/orbit-db)
      - [ ] [sidetree](https://github.com/decentralized-identity/sidetree)
- [ ] **Stage 1 - Internal Testing**
  - [ ] Documentation
    - [ ] Ensure that [README.md](https://github.com/ipfs/js-ipfs/tree/master/README.md) is up to date
      - [ ] Install section
      - [ ] API calls
      - [ ] Packages Listing
  - [ ] Publish a release candidate to npm
    ```sh
    # All successful builds of master update the `build/last-successful` branch
    # which contains an `npm-shrinkwrap.json`.
    # This command checks that branch out, installs it's dependencies using `npm ci`,
    # creates a release branch (e.g. release/v0.34.x), updates the minor prerelease
    # version (e.g. 0.33.1 -> 0.34.0-rc.0) and publishes it to npm.
    npx aegir publish-rc

    # Later we may wish to update the rc. First cherry-pick/otherwise merge the
    # new commits into the release branch on github (e.g. not locally) and wait
    # for CI to pass. Then update the lockfiles used by CI (n.b. one day this
    # will be done by our ci tools) with this command:
    npx aegir update-release-branch-lockfiles release/v0.34.x

    # Then update the rc published on npm. This command pulls the specified
    # release branch, installs it's dependencies `npm ci`, increments the
    # prerelease version (e.g. 0.34.0-rc.0 -> 0.34.0-rc.1) and publishes it
    # to npm.
    npx aegir update-rc release/v0.34.x
    ```
  - Network Testing:
    - test lab things - TBD
  - Infrastructure Testing:
    - TBD
- [ ] **Stage 2 - Community Dev Testing**
  - [ ] Reach out to the IPFS _early testers_ listed in [docs/EARLY_TESTERS.md](https://github.com/ipfs/js-ipfs/tree/master/docs/EARLY_TESTERS.md) for testing this release (check when no more problems have been reported). If you'd like to be added to this list, please file a PR.
  - [ ] Reach out on IRC for additional early testers.
- [ ] **Stage 3 - Community Prod Testing**
  - [ ] Update [js.ipfs.io](https://js.ipfs.io) examples to use the latest js-ipfs
  - [ ] Invite the IPFS [_early testers_](https://github.com/ipfs/js-ipfs/tree/master/docs/EARLY_TESTERS.md) to deploy the release to part of their production infrastructure.
  - [ ] Invite the wider community (link to the release issue):
    - [ ] [discuss.ipfs.io](https://discuss.ipfs.io/c/announcements)
    - [ ] Twitter
    - [ ] IRC
- [ ] **Stage 4 - Release**
  - [ ] Take a snapshot of everyone that has contributed to this release (including its direct dependencies in IPFS, libp2p, IPLD and multiformats) using [the js-ipfs-contributors module](https://www.npmjs.com/package/js-ipfs-contributors).
  - [ ] Publish to npm:
    ```sh
    git checkout release/v0.34.x

    # Re-install dependencies using lockfile (will automatically remove your
    # node_modules folder) (Ensures the versions used for the browser build are the
    # same that have been verified by CI)
    npm ci

    # lint, build, test, tag, publish
    npm run release-minor

    # reintegrate release branch into master
    git rm npm-shrinkwrap.json yarn.lock
    git commit -m 'chore: removed lock files'
    git checkout master
    git merge release/v0.34.x
    git push
    ```
  - [ ] Publish a blog post to [github.com/ipfs/blog](https://github.com/ipfs/blog) (at minimum, a c&p of this release issue with all the highlights, API changes and thank yous)
  - [ ] Broadcasting (link to blog post)
    - [ ] Twitter
    - [ ] IRC
    - [ ] [Reddit](https://reddit.com/r/ipfs)
    - [ ] [discuss.ipfs.io](https://discuss.ipfs.io/c/announcements)
    - [ ] Announce it on the [IPFS Users Mailing List](https://groups.google.com/forum/#!forum/ipfs-users)
  - [ ] Copy release notes to the [GitHub Release description](https://github.com/ipfs/js-ipfs/releases)

# ❤ Huge thank you to everyone that made this release possible

<Generated contributor list>

# 🙌🏽 Want to contribute?

Would you like to contribute to the IPFS project and don't know how? Well, there are a few places you can get started:

- Check the issues with the `help wanted` label in the [js-ipfs repo](https://github.com/ipfs/js-ipfs/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
- Join an IPFS All Hands, introduce yourself and let us know where you would like to contribute - https://github.com/ipfs/team-mgmt/#weekly-ipfs-all-hands
- Hack with IPFS and show us what you made! The All Hands call is also the perfect venue for demos, join in and show us what you built
- Join the discussion at https://discuss.ipfs.io/ and help users finding their answers.
- Join the [🚀 IPFS Core Implementations Weekly Sync 🛰](https://github.com/ipfs/team-mgmt/issues/992) and be part of the action!

# ⁉ Do you have questions?

The best place to ask your questions about IPFS, how it works and what you can do with it is at [discuss.ipfs.io](https://discuss.ipfs.io). We are also available at the `#ipfs` channel on Freenode.

repository: Developerayo/js-ipfs

gha_license_id: NOASSERTION

repo_name: Developerayo/js-ipfs


text:
This directory has been deprecated.

ContractKit was split into 15 packages and is now located under [`/packages/sdk/contractkit`](https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk/contractkit)

See [#4790](https://github.com/celo-org/celo-monorepo/pull/4790) for details.

repository: reachjason/celo-monorepo

repo_name: reachjason/celo-monorepo


text:
quoted-printable
===
![Build Status](https://github.com/staktrace/quoted-printable/actions/workflows/test.yml/badge.svg)
[![Crate](https://img.shields.io/crates/v/quoted_printable.svg)](https://crates.io/crates/quoted_printable)

A quoted-printable decoder and encoder.

API
---
quoted-printable exposes three functions at the moment:

```rust
    decode<R: AsRef<[u8]>>(input: R, mode: ParseMode) -> Result<Vec<u8>, QuotedPrintableError>
    encode<R: AsRef<[u8]>>(input: R) -> Vec<u8>
    encode_to_str<R: AsRef<[u8]>>(input: R) -> String
```

using `R: AsRef<[u8]>` means that you can pass in a variety of types, including:
`String`, `&String`, `&str`, `Vec<u8>`, `&Vec<u8>`, `&[u8]`, `Box<[u8]>`, `Arc<[u8]>`

The decode function can be used to convert a quoted-printable string into the decoded bytes, as per the description in [IETF RFC 2045, section 6.7](https://tools.ietf.org/html/rfc2045#section-6.7).
The ParseMode option can be used to control whether the decoding is "strict" or "robust", as per the comments in that RFC.
In general you should probably use "robust" decoding, as it will gracefully handle more malformed input.

The encode and encode_to_str functions obviously do the reverse, and convert a set of raw bytes into quoted-printable.

no_std
---

This crate supports no_std. By default the crate targets std via the `std` feature. You can deactivate the `default-features`  to support `no_std` like this:

```toml
quoted-printable = { version = "*", default-features = false }
```

Documentation
---
See document on [https://docs.rs](https://docs.rs/quoted_printable/).

repository: staktrace/quoted-printable

gha_language: Rust

repo_name: staktrace/quoted-printable


text:
# lab-06

# Project Name: Lab-06

**Author**: Areej Obaid
**Version**: 1.0.4

## Overview
This website using allowing a user to search for a location, present a Map, as well as interesting information about the area, all using data from APIs that your server will fetch and manage.

## Getting Started
<!-- What are the steps that a user must take in order to build this app on their own machine and get it running? -->
1- clone the git repo => `git clone https://github.com/areejobaid94/city_explorer_api.git`
2- start the code => `node server`

Or you can open it from => [https://cityexplorer123.herokuapp.com/](https://cityexplorer123.herokuapp.com/)

## Architecture
<!-- Provide a detailed description of the application design. What technologies (languages, libraries, etc) you're using, and any other relevant design information. -->
I used JS, Node, Express, CSS and HTML.

## Change Log

01-01-2001 4:59pm - Application now has a fully-functional express server, with a GET route for the location and weather resources.

<!-- Use this area to document the iterative changes made to your application as each feature is successfully implemented. Use time stamps. Here's an examples:

01-01-2001 4:59pm - Application now has a fully-functional express server, with a GET route for the location resource.

## Credits and Collaborations
<!-- Give credit (and a link) to other people or resources that helped you build this application. -->
-->

Number and name of feature:  Repository Set Up

Estimate of time needed to complete: 1 hour

Start time: 1:10

Finish time: 2:00

Actual time needed to complete: 40 minutes.

Number and name of feature:  Locations

Estimate of time needed to complete: 1:30 hour

Start time:  2:00

Finish time:  3:30

Actual time needed to complete: 1 hour.

Number and name of feature:  Weather

Estimate of time needed to complete: 1 hour

Start time:  3:30

Finish time:  4:30

Actual time needed to complete: 1 hour.

Number and name of feature:  Errors

Estimate of time needed to complete: 30 minutes

Start time:  4:30

Finish time:  5:10

Actual time needed to complete: 40 minutes.

////////2nd Day

Number and name of feature: Data formatting

Estimate of time needed to complete: .5 hour

Start time: 2:40

Finish time: 3:00

Actual time needed to complete: 20 minutes.

Number and name of feature: Locations

Estimate of time needed to complete: .5 hour

Start time: 3:00

Finish time: 3:30

Actual time needed to complete: 30 minutes.

Number and name of feature: Weather

Estimate of time needed to complete: .5 hour

Start time: 3:30

Finish time: 4:00

Actual time needed to complete: 30 minutes.

Number and name of feature: Parks

Estimate of time needed to complete: 1 hour

Start time: 4:00

Finish time: 5:30

Actual time needed to complete: 90 minutes.

branch_name: refs/heads/main

gha_language: JavaScript


text:
date: 2016-08-22 05:19
comments: true
categories: [golang, google, quora]
description: An interesting quote from Rob Pike, one of the creators of golang.
---

A few days ago a very interesting digest popped up in my
inbox, straight away from [Quora](https://www.quora.com/Why-did-Google-create-the-Go-language-Isnt-Python-good-enough/answer/Garry-Taylor-5?srid=pefr):

{% blockquote Rob Pike https://en.wikipedia.org/wiki/Rob_Pike %}
The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python.

They’re not capable of understanding a brilliant language but we want to use them to build good software.

So, the language that we give them has to be easy for them to understand and easy to adopt.
{% endblockquote %}

branch_name: refs/heads/source

extension: markdown


text:
### [1817\. Finding the Users Active Minutes](https://leetcode.com/problems/finding-the-users-active-minutes/)

Difficulty: **Medium**

Related Topics: [Hash Table](https://leetcode.com/tag/hash-table/)

You are given the logs for users' actions on LeetCode, and an integer `k`. The logs are represented by a 2D integer array `logs` where each `logs[i] = [ID<sub style="display: inline;">i</sub>, time<sub style="display: inline;">i</sub>]` indicates that the user with `ID<sub style="display: inline;">i</sub>` performed an action at the minute `time<sub style="display: inline;">i</sub>`.

**Multiple users** can perform actions simultaneously, and a single user can perform **multiple actions** in the same minute.

The **user active minutes (UAM)** for a given user is defined as the **number of unique minutes** in which the user performed an action on LeetCode. A minute can only be counted once, even if multiple actions occur during it.

You are to calculate a **1-indexed** array `answer` of size `k` such that, for each `j` (`1 <= j <= k`), `answer[j]` is the **number of users** whose **UAM** equals `j`.

Return _the array_ `answer` _as described above_.

**Example 1:**

```
Input: logs = [[0,5],[1,2],[0,2],[0,5],[1,3]], k = 5
Output: [0,2,0,0,0]
Explanation:
The user with ID=0 performed actions at minutes 5, 2, and 5 again. Hence, they have a UAM of 2 (minute 5 is only counted once).
The user with ID=1 performed actions at minutes 2 and 3\. Hence, they have a UAM of 2.
Since both users have a UAM of 2, answer[2] is 2, and the remaining answer[j] values are 0.
```

**Example 2:**

```
Input: logs = [[1,1],[2,2],[2,3]], k = 4
Output: [1,1,0,0]
Explanation:
The user with ID=1 performed a single action at minute 1\. Hence, they have a UAM of 1.
The user with ID=2 performed actions at minutes 2 and 3\. Hence, they have a UAM of 2.
There is one user with a UAM of 1 and one with a UAM of 2.
Hence, answer[1] = 1, answer[2] = 1, and the remaining values are 0.
```

**Constraints:**

*   `1 <= logs.length <= 10<sup>4</sup>`
*   `0 <= ID<sub style="display: inline;">i</sub> <= 10<sup>9</sup>`
*   `1 <= time<sub style="display: inline;">i</sub> <= 10<sup>5</sup>`
*   `k` is in the range `[The maximum **UAM** for a user, 10<sup>5</sup>]`.

#### Solution

Language: **JavaScript**

```javascript
/**
 * @param {number[][]} logs
 * @param {number} k
 * @return {number[]}
 */
var findingUsersActiveMinutes = function(logs, k) {
  const map = new Map()
  for (const [id, m] of logs) {
    if (!map.has(id)) map.set(id, new Set())
    map.get(id).add(m)
  }

  const ans = Array(k).fill(0)
  for (const set of map.values()) {
    if (set.size <= k) {
      ans[set.size - 1] += 1
    }
  }

  return ans
};
```


text:
# SegmentationLearner
## About
### Segmentation tasks
Image segmentation is a technique to label each individual pixel in an image (or pic sections with geometry) using a deep neural network (DNN).
Segmentation techniques can be of use in object extraction from images in real life applications.
I.e. a DNN running on a car software using cameras can extract people, roads, road signs, bikes, etc. and later use that info for orientation.
***An example segmentation image:***
![segmentation_image](https://miro.medium.com/max/3200/1*MQCvfEbbA44fiZk5GoDvhA.png)
Image is from [How to do Semantic Segmentation using Deep learning](https://medium.com/nanonets/how-to-do-image-segmentation-using-deep-learning-c673cc5862ef)

### Problem
As in most cases the labeling must be done by a dedicated group of people.
Needless to say, that labeling each pixel in a picture (essentially drawing over) is a hard and mind-numbing grunt work.
But hey, what all those art degrees are doing anyways?? Jk, of course. But seriously, to mitigate the whole lot of boring work, we should try to automate it somehow.
Why not to use a free game engine to build an environment, generate loads of precisely labeled data and try to train a network on that.
Afterwards, if the virtual environment is realistic looking enough, we could try transfer learning to pip up the model on real photos, or even use it right away.

I mean, some video games nowadays look quite realistic, proving the capabilities of building capable environments:
![Senua](https://miro.medium.com/max/2560/1*v3XZZXSo-tdeHfvZAGr_IQ.jpeg)
This is a screenshot from a game released in 2017 called "Hellblade: Senua's Sacrifice", featuring high quality visuals, particularly volumetric lighting and vegetation among other things, which in the game dev community are notorious to pull off good looking.
The game was crafted by Unreal Engine 4, a popular (now also made free) game engine. Graphical engine capabilities have only improved since then by miles, both by UE and Unity, providing us with even better tools to create virtual worlds.

I am by no means first to claim to propose this technique. I.e. my assumption is that [Tesla](https://www.tesla.com/autopilotAI) must have done something similar to kickstart it's own networks in virtual environment.
It just happened that I was learning DNNs and wanted to make something, while also using my other skills (Unity, in this case).

## What this is
This project is an attempt to automate segmentation image labeling, by generating ready-made label-picture pairs automatically.
It is thus made of three parts:
- Virtual environment setup and generator in Unity game engine;
- A prototype Jupyter notebook to train on the generated data;
- Fastapi server to serve the model and feed that data back to Unity and visualize predictions (almost) realtime.

## What this is not
- not a commercial product/tool. Use it at your own discretion.
- not a cure for all. Your project might require different approach. Please do not spam feature requests.

## Setup
1. Download UnityHub and install an appropriate version. Should work on 2021.1.5 or later. Will update this when we get a 2021 LTS release.
2. Install python if your system does not have it. Python version used to develop this was 3.8.1
3. Git pull this repo. Add it your Unity projects.
4. Install python dependencies using requirements.txt file form this repo.

## How to use
### Dataset generation
Within Unity you will find a scene. Load it if you have not yet done it. The scene will contain an example level ready to be used. If you hit "play" button in the editor, the level should load and setup the environment for you.
Then just input how many pictures you want to generate (i.e. 500) and click "Generate" button. You will find your dataset in ```/Assets/Data~``` folder.

For more details about Unity part of this project see [Unity Readme](Readmes/README_UNITY.md).

### Training
Run Jupyter server. If you do not know how to do it or even what it is, I recommend watching a few tutorials online, there's loads of them. Just google "Jupyter Notebooks".
The notebook itself is with quite detailed descriptions. It is a fastai based prototype by loading a unet resnet34 model (a convolutional neural network, or CNN in short).
<EMAIL_ADDRESS>*Unet picture source: Silburt, Ari & Ali-Dib, Mohamad & Zhu, Chenchong & Jackson, Alan & Valencia, Diana & Kissin, Yevgeni & Tamayo, Daniel & Menou, Kristen. (2018). Lunar Crater Identification via Deep Learning. Icarus. 317. 10.1016/j.icarus.2018.06.022.*

For more details about training see [Train Readme](Readmes/README_TRAIN.md).

### Inference
First start the fastapi server. Then in Unity Play mode move the camera around and enable "inference" mode to communicate to API by pressing "Space". See the overlayed results :)

** insert a screenshot of overlayed in unity **

- Move the camera using "W-A-S-D" keys. Aim with mouse.
- The API simply returns labels and overlays them via a shader. With buttons F1-F4 you can isolate label groups to see only a single group one at a time, i.e. furniture, building, animals.
- With "+" and "-" keys (num-pad) you can regulate label overlay opacity. Use it if you cannot see objects well enough.
- "Q" key to show/hide background, leaving only label layer.
- "E" to force show labels, or to clear them (if they are being shown). This works also in non-inference mode (as a single web request), but will return nothing if there are no models saved/running.

For more details about server and inference in general see [Inference Readme](Readmes/README_INFER.md).

## Discussion
If you are interested in the roadmap of this project, I wrote a short story discussing the problems encountered and summarizing possibilities. See [Discussion Readme](Readmes/README_DISC.md). You will find these chapters there:
- Roadmap story
- Usability discussion
- Ideas for improvements
- Summary

## To Do / Ideas
- Make a YT video walk-through.

## Kudos To
- [Dovydas Ceilutka ](https://www.linkedin.com/in/dovydasceilutka/) for taking up the initiative to create a local AI learning community and mentoring this project.
- [Jeremy Howard](https://www.fast.ai/about/) for great video material and library (with Rachel Thomas).
- [Stasys Vysniauskas](https://github.com/analizatorius) for the setup of the test level in Unity.
## License and copyright
Licenced under the [MIT Licence](LICENSE). Take it and use however you like :)
Would be nice if you share the results, but it's not required.

repository: Darth-Carrotpie/SegmentationLearner

gha_language: Jupyter Notebook

repo_name: Darth-Carrotpie/SegmentationLearner


text:
# FFmpeg support
[FFmpeg](https://www.ffmpeg.org/) A complete, cross-platform solution to record, convert and stream audio and video.

## Install FFmpeg
- Download FFmpeg from [here](https://www.ffmpeg.org/download.html)
- `./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib`
- `make`
- `sudo make install`

## Add FFmpeg to your project
- Add library: `FFmpeg` (for GCC: `-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread`)

## Usage

Enable `LV_USE_FFMPEG` in `lv_conf.h`.

See the examples below.

Note that, the FFmpeg extension doesn't use LVGL's file system.
You can simply pass the path to the image or video as usual on your operating system or platform.

## Example
```eval_rst

.. include:: ../../examples/libs/ffmpeg/index.rst

```

## API

```eval_rst

.. doxygenfile:: lv_ffmpeg.h
  :project: lvgl

```

repository: zephyrproject-rtos/lvgl

branch_name: refs/heads/zephyr

gha_language: C

repo_name: zephyrproject-rtos/lvgl


text:
# 2017-kubecon-eu

This repository contains code for KubeCon EU 2017 that implements a simple controller that
watches for a [Third Party Resource](https://kubernetes.io/docs/user-guide/thirdpartyresources/)
called `Backup`. When the controller receives any event on `Backup`, it fetches the state of
some part of the cluster in which it's running and logs it to the console.

See below for usage instructions.

## Install the Watcher

Install the watcher to your cluster with the following command:

```console
helm install --name=kubecon-watcher --namespace=default --set docker.tag=c0ffcab ./charts/watcher
```

Note that the watcher may restart a few times and even go into `CrashLoopBackOff` until the
`Backup` third party resource definition it relies upon is created. This behavior is expected, and
good practice.

## Install a `Backup`

To tell the watcher to back up all pods, create a `Backup` in the cluster:

```console
helm install --name=kubecon-backup --namespace=default ./charts/backup
```

## Clean Up

Simply run the following command to clean up:

```console
helm delete --purge kubecon-watcher kubecon-backup
```


text:
---
layout: post
title: "Using the OnAir HDTV Creator on Ubuntu 8.10"
description: "How to setup and use the OnAir HDTV creator on Ubuntu Linux 8.10"
category: ["hardware", "old-content"]
tags: ["ubuntu", "onair creator", "autumnwave", "hdtv"]
---
{% include JB/setup %}

This blog post was originally a comment on the V4L wiki for the AutumnWave Onair USB HDTV Creator; however, I wasn't easily able to locate it last time I needed the information. On 2012-11-18 I moved it here.

-----

The [OnAir USB HDTV Creator](http://www.autumnwave.com/index.php/products/tv-tuners/onair-creator) is dual purpose Digital/Analog TV tuner with hardware-based MPEG2 encoding for analog (RCA, S-Video and NTSC/PAL inputs).  Support for this device was added in the Linux kernel [v 2.6.27](http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.26).

*Disclaimer:* I am running kernel 2.6.27-9, Ubuntu Linux 8.10 x86_64. Instructions for other systems should be similar.

A change in the 2.6.27 kernel broke a portion of the pvrusb2 module.  Until this issue is resolved, it is necessary to load the module manually before connecting the tuner to your computer:

    $ sudo modprobe pvrusb2 initusbreset=0

This will probably be fixed in later versions of the kernel. Now, plug in the tuner and type

    $ dmesg

you should see a series of lines that read something similar to the following:

    pvrusb2: Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner : V4L in-tree version
    pvrusb2: Debug mask is 31 (0x1f)
    usb 1-1: new high speed USB device using ehci_hcd and address 2
    usb 1-1: configuration #1 chosen from 1 choice
    saa7115' 3-0021: saa7115 found (1f7115d0e100000) @ 0x42 (pvrusb2_a)
    tuner' 3-0043: chip found @ 0x86 (pvrusb2_a)
    tda9887 3-0043: creating new instance
    tda9887 3-0043: tda988[5/6/7] found
    tuner' 3-0061: chip found @ 0xc2 (pvrusb2_a)
    cs53l32a' 3-0011: chip found @ 0x22 (pvrusb2_a)
    pvrusb2: Supported video standard(s) reported available in hardware: PAL-B/B1/D/D1/G/H/I/K/M/N/Nc/60;NTSC-M/
    pvrusb2: Mapping standards mask=0xffffff (PAL-B/B1/D/D1/G/H/I/K/M/N/Nc/60;NTSC-M/Mj/443/Mk;SECAM-B/D/G/H/K/K1/L/LC)
    pvrusb2: Setting up 28 unique standard(s)
    pvrusb2: Set up standard idx=0 name=PAL-B/G
    pvrusb2: Set up standard idx=1 name=PAL-D/K
    pvrusb2: Set up standard idx=2 name=SECAM-B/G
    pvrusb2: Set up standard idx=3 name=SECAM-D/K
    pvrusb2: Set up standard idx=4 name=PAL-B
    pvrusb2: Set up standard idx=5 name=PAL-B1
    pvrusb2: Set up standard idx=6 name=PAL-G
    pvrusb2: Set up standard idx=7 name=PAL-H
    pvrusb2: Set up standard idx=8 name=PAL-I
    pvrusb2: Set up standard idx=9 name=PAL-D
    pvrusb2: Set up standard idx=10 name=PAL-D1
    pvrusb2: Set up standard idx=11 name=PAL-K
    pvrusb2: Set up standard idx=12 name=PAL-M
    pvrusb2: Set up standard idx=13 name=PAL-N
    pvrusb2: Set up standard idx=14 name=PAL-Nc
    pvrusb2: Set up standard idx=15 name=PAL-60
    pvrusb2: Set up standard idx=16 name=NTSC-M
    pvrusb2: Set up standard idx=17 name=NTSC-Mj
    pvrusb2: Set up standard idx=18 name=NTSC-443
    pvrusb2: Set up standard idx=19 name=NTSC-Mk
    pvrusb2: Set up standard idx=20 name=SECAM-B
    pvrusb2: Set up standard idx=21 name=SECAM-D
    pvrusb2: Set up standard idx=22 name=SECAM-G
    pvrusb2: Set up standard idx=23 name=SECAM-H
    pvrusb2: Set up standard idx=24 name=SECAM-K
    pvrusb2: Set up standard idx=25 name=SECAM-K1
    pvrusb2: Set up standard idx=26 name=SECAM-L
    pvrusb2: Set up standard idx=27 name=SECAM-LC
    pvrusb2: Initial video standard (determined by device type): NTSC-M
    pvrusb2: Device initialization completed successfully.
    pvrusb2: registered device video0 [mpeg]
    DVB: registering new adapter (pvrusb2-dvb)
    tuner-simple 3-0061: creating new instance
    tuner-simple 3-0061: type set to 64 (LG TDVS-H06xF)
    saa7115' 3-0021: Audio frequency: 48000 Hz
    saa7115' 3-0021: Input:           Composite 4
    saa7115' 3-0021: Video signal:    bad
    saa7115' 3-0021: Frequency:       50 Hz
    saa7115' 3-0021: Detected format: BW/No color
    saa7115' 3-0021: Width, Height:   720, 480
    tda9887 3-0043: Data bytes: b=0xd4 c=0x30 e=0x44
    tuner' 3-0061: Tuner mode:      analog TV
    tuner' 3-0061: Frequency:       175.25 MHz
    tuner' 3-0061: Standard:        0x00001000
    cs53l32a' 3-0011: Input:  2
    cs53l32a' 3-0011: Volume: 0 dB
    firmware: requesting v4l-cx2341x-enc.fw
    DVB: registering frontend 0 (LG Electronics LGDT3303 VSB/QAM Frontend)...
    tuner-simple 3-0061: attaching existing instance
    tuner-simple 3-0061: type set to 64 (LG TDVS-H06xF)

*Notice:* that the analog portion of the driver is using firmware for Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner. I have yet to test the analog tuning features of the OnAir HDTV Creator.

If you intend to use the tuner on a regular basis and are stuck with the 2.6.27 kernel, you may wish to add an entry anywhere in a file in `/etc/modprobe.d/`

    options pvrusb2 initusbreset=0

which automatically loads the module with the specified parameter.

Now, if you plan on viewing ATSC/QAM channels, you will need to scan for them.  Full details on the following section are found here in the manpages for [scan](http://www.linuxtv.org/wiki/index.php/Scan).  The scanning program simply sets the frequency of the DTV tuner and then looks for signal.  Because of the wide array of frequencies used in different countries, in order to scan you need a scan file that contains the frequencies used in your country.  Common locations for these files are:

    /usr/share/dvb/
    /usr/share/doc/dvb-utils/examples/scan/
    /usr/share/doc/dvb-apps/
    /usr/local/share/dvb/scan/

On Ubuntu 8.10, the default scan files are contained in `/usr/share/doc/dvb-utils/examples/scan/dvb-t/`.  After you find the location of the files, browse through the subdirectories to find the scan file that applies to your location.  In the case of US ATSC, the file is located in `/usr/share/doc/dvb-utils/examples/scan/atsc`.

With the scan files, you are now ready to scan for stations.  On Ubuntu 8.10, the DTV scanning program is called `scan`, but it may be called `dvbscan` on other systems.  To scan for US ATSC channels:

    $ scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB

Similarly, for QAM encrypted cable, you can use

    $ scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-Cable-Standard-center-frequencies-QAM256

Now, we need to store the output from the scan file for use by other programs.  If you wish to receive ATSC OTA stations, you would use the .azap directory:

    $ mkdir ~/.azap
    $ scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB > ~/.azap/channels.conf

For countries that used dvb-c, dvb-s, or dvb-t, refer to the [scan manpage](http://www.linuxtv.org/wiki/index.php/Scan) for more information.  While scan is running, you will see output on your screen similar to the following:

    scanning /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB
    using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
    >>> tune to: 57028615:8VSB
    WARNING: >>> tuning failed!!!
    >>> tune to: 57028615:8VSB (tuning failed)

    ...

    >>> tune to: 485028615:8VSB
    service is running. Channel number: 9:1. Name: 'KUSA-HD'
    service is running. Channel number: 9:2. Name: 'WX-Plus'
    >>> tune to: 491028615:8VSB
    service is running. Channel number: 7:1. Name: 'KMGH-HD'
    service is running. Channel number: 7:27. Name: 'KZCO-SD'
    >>> tune to: 497028615:8VSB
    WARNING: filter timeout pid 0x0000
    WARNING: filter timeout pid 0x1ffb

Clearly, stations that work are prefixed by "service is running."  Stations that have poor reception or have other technical difficulties often time-out. For me, my `channels.conf` file looks like this:

    KUSA-HD:485028615:8VSB:49:52:1
    WX-Plus:485028615:8VSB:65:68:2
    KMGH-HD:491028615:8VSB:49:52:3
    KZCO-SD:491028615:8VSB:65:68:4

    ...

    KCEC-DT:695028615:8VSB:49:52:3

The text at the beginning is a user-defined string (with no spaces) that will be used to identify the station later.  If you have gotten this far, your tuner is working properly.

Now, the LinuxTV Wiki suggests using a program called zap to test your tuner (see [zap](http://linuxtv.org/wiki/index.php/Dvbscan)).  For ATSC, we use azap.  If I wished to tune KUSA-HD from the above list, I open a shell and type:

    $ azap -r 'KUSA-HD'

For which I receive

    using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
    tuning to 485028615 Hz
    video pid 0x0031, audio pid 0x0034
    status 00 | signal 0000 | snr 0000 | ber 00000000 | unc 00000000 |
    status 1f | signal a791 | snr 16e8 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
    status 1f | signal b54e | snr 18c9 | ber 00000000 | unc 0000003d | FE_HAS_LOCK
    status 1f | signal bbee | snr 19b1 | ber 00000000 | unc 00000000 | FE_HAS_LOCK

Full documentation on the meaning of these columns is found on the LinuxTV Wiki.  The important columns are the status column (00 means the tuner is initialized, but nothing has been decoded, 1f means tuning is working) and the last column (FE_HAS_LOCK means everything is working).  Sadly, I was not able to get any of the suggested testing methods to work (see [Testing your DBV device](http://linuxtv.org/wiki/index.php/Testing_your_DVB_device)), but I did find that xine works with ATSC stations.

To watch DTV, install xine (on Ubuntu, sudo apt-get install xine-ui) run it to create the configuration directory, and then copy the channels.conf file over to the .xine directory:

    $ cp ~/.azap/channels.conf ~/.xine/

Now, launch xine and click on the DTV button.  Using the playlist, you can change between stations.


text:
# conda_amber_phenix
Repository for building amber_phenix as a conda package

# Instructions
1. clone this repository
2. Extract amber_phenix-0.8 at the same level (e.g. "conda_amber_phenix"
   and "amber_phenix-0.8" are in the same directory)
3. Create a conda-build environment
   (`conda create -n build conda-build conda-verify`)
4. Activate conda-build environment
   (`conda activate build`)
5. Build!
   (`cd conda_amber_phenix/recipe; conda build .`)


text:
My Exercises
============

Exercise 1:
-----------

1.  Script used in the exercise is:
    [GitHub](https://github.com/UniversityOfAppliedSciencesFrankfurt/se-cloud-2019-2020/tree/SahanaPrasad/MYWORK:Cloud_Computing/Exercise_1)

2.  Resource group created in the Azure portal is: [Microsoft
<EMAIL_ADDRESS>
Exercise 2: Docker in Azure
---------------------------

1.  My Docker file:
    [GitHub](https://github.com/UniversityOfAppliedSciencesFrankfurt/se-cloud-2019-2020/tree/SahanaPrasad/MYWORK:Cloud_Computing/Exercise_2)

2.  The image in Docker Hub:
    [DockerHub](https://hub.docker.com/r/4982230/docker)

-   The docker image can be pulled from Docker hub using the following
    command: \> docker pull

Exercise 3: Hosting a Web application with Azure Application Service
--------------------------------------------------------------------

1.  My Web Application: [Microsoft
    Azure](https://exercise4cloud.azurewebsites.net/)

2.  The source code URL of hosted application is:
    [GitHub](https://github.com/UniversityOfAppliedSciencesFrankfurt/se-cloud-2019-2020/tree/SahanaPrasad/MYWORK:Cloud_Computing/Exercise_3)

3.  The Azure script used to publish the application is as follows:
    [GitHub](https://github.com/UniversityOfAppliedSciencesFrankfurt/se-cloud-2019-2020/blob/SahanaPrasad/MYWORK:Cloud_Computing/Exercise_3/AzureScript.md)

Exercise 4 - Deploy and run the containerized app in AppService
---------------------------------------------------------------

1.  The docker image of the application:
    [DockerHub](https://hub.docker.com/repository/registry-1.docker.io/4982230/demowebapplication/tags?page=1)

Steps: \* Create a registry in Azure container registry. \* Build a
docker image and upload to Azure container registry. \* Create and
deploy web app from docker image.

Exercise 5 - Blob Storage
-------------------------

Container which contains blobs uploaded is: [Microsoft
<EMAIL_ADDRESS>
Exercise 6 - Table Storage
--------------------------

The account which you have used for table exersises: [Microsoft
<EMAIL_ADDRESS>
Exercise 7 - Queue Storage
--------------------------

The account which you have used for queue exersises: [Microsoft
<EMAIL_ADDRESS>


text:
# ReplaceWords
Replace words in a text file

```
Usage: ReplaceWords <text file> [words file]
Words file should contain from,to pairs
Comma separated, one pair per line
Default name is words.csv
```

repository: russellw/ReplaceWords

repo_name: russellw/ReplaceWords


text:
# Black Jack exercise for Epicodus

### Connor Abdelnoor & Tom Mertz

###### April 16, 2015

#### Description

Lets a user play a game of black jack against a computer.

#### Set up

1. `git clone` the repository
2. Navigate into the project directory and open the `index.html` file.

#### License

[MIT](https://gist.github.com/tfmertz/f59650110a594d4e226b)


text:
# Projections Overview

Tangram is optimized for standard [Web Mercator](https://en.wikipedia.org/wiki/Web_Mercator_projection) tiles. However, through the clever use of vertex shaders, the apparent position of vector data may be modified, effectively "reprojecting" the data on the fly.

![wavy](https://user-images.githubusercontent.com/459970/74368286-33501a00-4d88-11ea-8931-7d3896784946.gif)

[Shaders](Shaders-Overview.md) are created as part of a custom [_style_](../Syntax-Reference/styles.md). The style used to create the above effect looks like this:

```yaml
styles:
    warp:
        animated: true
        base: lines
        shaders:
            defines:
                EARTH_RADIUS: 6378137.0 //radius of ellipsoid, WGS84
            blocks:
                position: |
                    position.y += sin(u_time + position.x/EARTH_RADIUS * 2.) * EARTH_RADIUS * .5;
```

The whole scene file is only 26 lines long, and can be found [here](https://github.com/meetar/projection-tests/blob/master/wavy.yaml).

The general idea for any Tangram projection is the same: use a custom style with a vertex shader in it, to modify the position of the geometry generated from the source data.

## Making a new Tangram projection

### Some fine print

Most map projections work with spherical "geodetic" coordinates, aka latitude and longitude, typically represented by phi (ϕ) and lambda (λ) respectively. Many tilesets, including [Nextzen's vector tiles](https://www.nextzen.org/), encode data in this format. However, by the time this data gets to Tangram's vertex shader, it's been converted to screenspace coordinates, measured in "Mercator meters." These strange units equal standard meters at the equator but represent increasingly smaller distances the further you get from the equator, because Mercator.

This isn't a problem if you don't mind distorting the projected data directly, as the "wavy" shader above does, but to make it work with other standard projections, you must first "unproject" the data data back to spherical coordinates.

### Convert to geodetic coordinates

Tangram vertex coordinates are measured from the center of the viewport. To convert a vertex position to latitude and longitude, we must also refer to a [built-in uniform](../Syntax-Reference/shaders.md#built-in-uniforms) called "u_map_position", which stores the center of the viewport in Mercator meters from the top-left corner of the Web Mercator base tile, which is 180 W, 85.05 N.

To convert Tangram's Mercator coordinates to standard geodetic coordinates, two separate functions are needed:

```yaml
float EARTH_RADIUS = 6378137.0 //radius of ellipsoid, WGS84
float y2lat_m (float y) { return 2.0*atan(exp((y/EARTH_RADIUS)))-HALF_PI; }
float x2lon_m (float x) { return x/EARTH_RADIUS; }
```

Pass the Mercator meters coordinates to these functions to get latitude and longitude:

```yaml
// u_map_position = center of screen
// position.xy = vertex screen position in meters from the center of the screen
vec2 mercator = u_map_position.xy + position.xy;
float lat = y2lat_m(mercator.y);
float lon = x2lon_m(mercator.x);
```

### Reproject to taste

Once you have lat & lon, you can re-transform them any way you like.

Here's a basic stereographic (aka "spherical") projection:

```yaml
// convert from lat, lon to position on a sphere
vec3 latLongToVector3(float lat, float lon, float radius) {
    float phi = lat;
    float theta = lon;

    float x = radius * cos(phi) * cos(theta);
    float y = radius * cos(phi) * sin(theta);
    float z = radius * sin(phi);
    return vec3(x,z,y);
}
```

If you use this in a vector shader, it looks like this:

```yaml
position.xyz = latLongToVector3(lat, lon, 2.) * EARTH_RADIUS;
```

![globe](https://user-images.githubusercontent.com/459970/74368547-b96c6080-4d88-11ea-81f7-f7c90c2eedf7.png)

### Interaction Example: Globe

Projections may sometimes be adjustable through the use of special variables to become interactive – for instance, to center on a specific point on the globe – but not all projection algorithms include those sorts of variables. In the above example, the projection draws a globe centered on the equator, with [0,0] on the right and north up. As it stands there is no accomodation for other views.

We could add some variables to the projection function to make it interactive, but in this case it's simpler to modify the result with some extra steps:

```yaml
// rotation matrix transformations
mat3 rotateX3D(float phi){
    return mat3(
        vec3(1.,0.,0.),
        vec3(0.,cos(phi),-sin(phi)),
        vec3(0.,sin(phi),cos(phi))
    );
}
mat3 rotateY3D(float theta){
    return mat3(
        vec3(cos(theta),0.,-sin(theta)),
        vec3(0.,1.,0.),
        vec3(sin(theta),0.,cos(theta))
    );
}

// Latitude_Of_Origin
float centerlat = y2lat_m(u_map_position.y);
// Central_Meridian
float centerlon = x2lon_m(u_map_position.x);

// rotate globe with map navigation
// 90 degrees in radians = 1.5708
position.xyz *= rotateY3D((-centerlon - 1.5708));
position.xyz *= rotateX3D(-(centerlat));
```

Now the globe will be centered on the map's location, and will respond to navigation.

- Interactive demo: [http://meetar.github.io/projection-tests/?globe.yaml](http://meetar.github.io/projection-tests/?globe.yaml)
- Full scene file: [globe.yaml](https://github.com/meetar/projection-tests/blob/master/globe.yaml)
- Repo: [https://github.com/meetar/projection-tests/](https://github.com/meetar/projection-tests/)

### Interaction Example: Albers

For comparison, the Albers conic projection explicitly includes the concept of a center point plus two "standard parallels" – these function as variables which change the result.

```yaml
// convert from lat/long to albers -- from https://gist.github.com/RandomEtc/476238
vec2 albers(float lat, float lng, float lat0, float lng0, float phi1, float phi2) {
    float n = 0.5 * (sin(phi1) + sin(phi2));
    float c = cos(phi1);
    float C = c*c + 2.*n*sin(phi1);
    float p0 = sqrt(C - 2.*n*sin(lat0)) / n;
    float theta = n * (lng * PI/180. - lng0);
    float p = sqrt(C - 2.*n*sin(lat* PI/180.)) / n;

    float x = p * sin(theta);
    float y = p0 - p * cos(theta);

    return vec2(x,y);
}
```

The Albers implementation below takes the viewport's center as the center of the projection, and arbitrarily uses latitudes +/- 10 degrees as the standard parallels, because I thought they looked nice. A couple of helper functions are used to convert values to the range expected by the projection: one to convert from meters to degrees, and another to convert to radians. (The radians requirement isn't explicit in the projection, but it's quite common, because trigonometry is built around radians.) (In fact this would all be a lot easier if latitude and longitude were in radians to begin with. I'll notify the Babylonians.)

```yaml
position: |
    // mercator position of the current vertex, u_map_position = center of screen,
    // position.xy = vertex screen position in meters from the center of the screen
    vec2 mercator = u_map_position.xy + position.xy;
    float lat = y2lat_m(mercator.y);
    float lon = x2lon_m(mercator.x);

    // Latitude_Of_Origin
    float centerlat = deg2rad(y2lat_m(u_map_position.y));
    // Central_Meridian
    float centerlon = deg2rad(x2lon_m(u_map_position.x));

    // Standard_Parallel_1
    float phi1 = deg2rad(y2lat_m(u_map_position.y) + 10.);
    // Standard_Parallel_2
    float phi2 = deg2rad(y2lat_m(u_map_position.y) - 10.);

    position.xy = albers(lat, lon, centerlat, centerlon, phi1, phi2)*EARTH_RADIUS;
```

- Interactive demo: [http://meetar.github.io/albers/](http://meetar.github.io/albers/)
- Full scene file: [scene.yaml](https://github.com/meetar/albers/blob/master/scene.yaml)
- Repo: [https://github.com/meetar/albers/](https://github.com/meetar/albers/)

## Limitations

There are some limitations to these techniques – as they all take place entirely in the vertex shader, Tangram doesn't "know" about them, and continues to fetch, build, and draw tiles as though they were still in standard Web Mercator.

### Tiles

For instance, tiles will continue to be fetched for the current Web Mercator viewport, which means if your projection expands the effective view, tiles may appear to be missing or duplicated. In the example below, tiles to the north are missing, because Tangram doesn't realize they are needed:

![Albers with missing tiles](https://user-images.githubusercontent.com/459970/74368621-e15bc400-4d88-11ea-9fab-0ca9b79af1f1.png)

And in the globe example, at low zooms the earth is being drawn multiple times, which is obvious in standard Web Mercator:

![Wide Earth](https://user-images.githubusercontent.com/459970/74470644-c86c1500-4e53-11ea-997b-d41ab57cda78.png)

But not in the globe, because the repeated tiles are wrapped around and layered on top of each other. This can cause surprises if you are using any kind of transparency. There may be ways to "clip" the projection to only draw the front-facing hemisphere, but they may not work precisely as expected, due to the Hinges issue mentioned below.

Here's code which prevents this kind of looping, by simply moving any vertices which are half a globe away from the center of the map back to the allowed limit:

```yaml
shaders:
    defines:
        EARTH_RADIUS: 6378137.0 //radius of ellipsoid, WGS84
        HALF_CIRC: 20037508.5 //half-circumference of earth
    blocks:
        position:
            // handle low-zoom longitude-repetition
            if (position.x > HALF_CIRC) position.x = HALF_CIRC;
            if (position.x < -HALF_CIRC) position.x = -HALF_CIRC;
```

This technique is used in the ["globe warp" example](http://meetar.github.io/projection-tests/?globe-warp.yaml).

### Layers

Projections may appear to be drawn in 3D, but invidual layers are still being ordered in 2D space as specified in the scene file. For instance, in a globe projection, if you set a the `order` of a _line_ layer above that of a _polygon_ layer, that ordering will be in screenspace, not relative to the surface of the Earth. In this case, lines on the back side of the globe may be drawn over water features in the front of the globe.

![Tangram map sandwich](https://user-images.githubusercontent.com/459970/74470393-4f6cbd80-4e53-11ea-940c-7c5cfb226cd7.png)

This is because of the way Tangram's [`order`](../Syntax-Reference/draw.md#order) system is optimized for 2D cartography, allowing layers to be rearranged and composited without requiring more complex 3D operations. Unfortunately this means more complex 3D operations aren't possible in the way they might be in a classical 3D application.

### Hinges

Maps are drawn with lines, but vertex shaders can only change the position of vertices. If your projection wants to curve the map, and there are not enough vertices in your geometry to draw curved lines, you will get straight lines drawn directly between the available vertices instead.

This effect may be exacerbated by the fact that numerous optimization steps in the Tangram pipeline deliberately remove apparently "extraneous" detail, such as colinear vertices. These steps are fine for a Web Mercator map, but may produce unexpected results in other situations.

In the example below, the projection is attempting to "bend" various large flat polygons backward in 3D space, but there aren't enough vertices in the sparse ocean geometry to produce smooth curves – so they wind up just going straight back to the next available polygon edge.

![globe-glitch](https://user-images.githubusercontent.com/459970/74368939-621ac000-4d89-11ea-930c-f4a8e9523306.png)

This limitation may also be seen when "clipping" a projection – there's currently no way to slice a polygon at an arbitrary point without adding vertices. Maybe someday.

### Iterations

Many projections (such as the [Mollweide](https://en.wikipedia.org/wiki/Mollweide_projection)) include some kind of iterated step, intended to converge toward an ideal solution, which will theoretically be reached only if the iteration is performed an infinite number of times. In practice most people don't have that kind of patience, so the iterated step is performed until some kind of threshold is achieved.

Unfortunately, vertex shaders don't allow this kind of non-deterministic loop. As part of the tradeoff for extremely fast execution, shaders must know beforehand exactly what code they'll be running. Loops are allowed only if they have a fixed number of iterations. So instead of testing for some kind of condition, just pick a number of loops that's good enough for your purposes. The result won't be as accurate in some cases, and less efficient in others, but it should mostly work out fine. This one from the Mollweide is being run `4` times, because it looks better than when it was run `3` times, and `5` times didn't look much different:

```glsl
// convert from lat/lon to mollweide -- Adapted from https://github.com/d3/d3-geo-projection/blob/master/src/mollweide.js
float mollweideBromleyTheta(float phi) {
    float cpsinPhi = PI * sin(phi);
    for ( int i = 4; i != 0; i--) {
        float delta = (phi + sin(phi) - cpsinPhi) / (1. + cos(phi));
        phi -= delta;
    }
    return phi / 2.;
}
```

## Adding a Projection to a Style

The simplest way to integrate a projection with an existing style is to [mix](../Syntax-Reference/styles.md#mix) it in. Here's a sample structure:

```yaml
### my-projection.md

# define your projection here
styles:
    my-projection-style:
        shaders:
            blocks:
                # you might have some helper globals
                globals:
                # projection code goes in the "position" block
                position: |
```

```yaml
### existing-style.md

# import the projection here
import: my-projection.md

styles:
    existing-style:
        base: polygon
        # mix the projection in here
        mix: my-projection-style

layers:
    earth:
        existing-style: # this style will now use your custom projection
```

If you don't have any custom styles in your scene (or if you have lots of custom styles in your scene file), it might be useful to set up some custom base styles, like so:

```yaml
styles:
    projected-polygons:
        base: polygons
        mix: my-projection
    projected-lines:
        base: lines
        mix: my-projection
```

Then you can replace any instance of plain _polygons_ or _lines_ in your draw layers with the projected versions. If you have lots of custom styles, this trick allows you to do the mixes just once, instead of per style.


text:
Find the longest palindrome in the following 1169-character string:

`Fourscoreandsevenyearsagoourfaathersbroughtforthonthisconta`
`inentanewnationconceivedinzLibertyanddedicatedtotheproposit`
`ionthatallmenarecreatedequalNowweareengagedinagreahtcivilwa`
`rtestingwhetherthatnaptionoranynartionsoconceivedandsodedic`
`atedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWeh`
`avecometodedicpateaportionofthatfieldasafinalrestingplacefo`
`rthosewhoheregavetheirlivesthatthatnationmightliveItisaltog`
`etherfangandproperthatweshoulddothisButinalargersensewecann`
`otdedicatewecannotconsecratewecannothallowthisgroundThebrav`
`elmenlivinganddeadwhostruggledherehaveconsecrateditfarabove`
`ourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorl`
`ongrememberwhatwesayherebutitcanneverforgetwhattheydidhereI`
`tisforusthelivingrathertobededicatedheretotheulnfinishedwor`
`kwhichtheywhofoughtherehavethusfarsonoblyadvancedItisrather`
`forustobeherededicatedtothegreattdafskremainingbeforeusthat`
`fromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwh`
`ichtheygavethelastpfullmeasureofdevotionthatweherehighlyres`
`olvethatthesedeadshallnothavediedinvainthatthisnationunsder`
`Godshallhaveanewbirthoffreedomandthatgovernmentofthepeopleb`
`ythepeopleforthepeopleshallnotperishfromtheearth`

Your task is to write a function that finds the longest palindrome in a string and apply it to the string given above.

* taken from http://challenge.greplin.com/ :)

_____________________________________________________

It seems the number of users giving challenges have been reduced. Since my final exams are going on and its kinda difficult to think of all the challenges, I kindly request you all to suggest us interesting challenges at /r/dailyprogrammer_ideas .. Thank you!

path: /Intermediate Challenges/Challenge #64 [intermediate]/challenge_text.md

gha_language: Python


text:
# 07 Client side rendering

Let's works with Nextjs using client side rendering.

We will start from `06-server-side-rendering`.

# Steps to build it

- `npm install` to install previous sample packages:

```bash
npm install
```

# Server Side Rendering

If we don't need to pre-render the data and frequently updating data.

- The page is generated on client side.
- Available on pages and internal components.
- You can use [SWR](https://swr.vercel.app/) (stale-while-revalidate) for handle cache

> SWR is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data

- Let's implement the api method to book a car:

_./src/api/car.api.ts_

```diff
...

+ export const bookCar = async (car: Car): Promise<boolean> => {
+   await Axios.put(`${url}/${car.id}`, car);
+   return true;
+ };

```

- Create mapper from `Vm to Api`:

_./src/mappers/car.mappers.ts_

```diff
...

+ export const mapCarFromVmToApi = (car: viewModel.Car): apiModel.Car => ({
+   id: car.id,
+   name: car.name,
+   imageUrl: car.imageUrl.split(envConstants.BASE_PICTURES_URL)[1],
+   features: car.features,
+   isBooked: car.isBooked,
+ });
```

- And use it:

_./src/components/car.container.ts_

```diff
import React from 'react';
import { useRouter } from 'next/router';
import * as api from '../api';
import { routeConstants } from '../common/constants';
- import { mapCarFromApiToVm } from '../mappers';
+ import { mapCarFromApiToVm, mapCarFromVmToApi } from '../mappers';
...

  const handleBook = async () => {
+   try {
+     const apiCar = mapCarFromVmToApi({ ...car, isBooked: !car.isBooked });
+     await api.bookCar(apiCar);
-     // TODO: Book a car
      router.push(routeConstants.carList);
+   } catch (error) {
+     console.error({ error });
+   }
  };

...

```

- Run:

```bash
npm run start:api-server
npm run build
npm run start:prod
```

> NOTE: We can use this API Request from any component.

- Let's migrate `car list` request to client-side (demo purpose):

_./src/pages/cars.ts_

```diff
import React from 'react';
- import { GetServerSideProps } from 'next';
import Head from 'next/head';
import * as api from '../api';
import { AppLayout, CarListContainer } from '../components';

- interface Props {
-   carList: api.Car[];
- }

- const CarListPage: React.FunctionComponent<Props> = (props) => {
+ const CarListPage: React.FunctionComponent = () => {
- const { carList } = props;
+ const [carList, setCarList] = React.useState<api.Car[]>([]);

+ const onLoad = async () => {
+   const apiCarList = await api.getCarList();
+   setCarList(apiCarList);
+ };

+ React.useEffect(() => {
+   onLoad();
+ }, []);

- console.log('Render car list Page');
+ console.log(`Render car list: ${carList.length}`);
  return (
    <AppLayout>
      <Head>
        <title>Rent a car - Car list</title>
      </Head>
      <CarListContainer carList={carList} />
    </AppLayout>
  );
};

- export const getServerSideProps: GetServerSideProps = async () => {
-   const carList = await api.getCarList();
-   console.log('Car list build time:', { carList });

-   return {
-     props: {
-       carList,
-     },
-   };
- };

export default CarListPage;

```

- Run:

```bash
npm run start:api-server
npm run build
npm run start:prod
```

- Each time navigate to this page, fetch data and renders again the page. Let's try [SWR](https://swr.vercel.app/):

```bash
npm install swr --save
```

- Let's export cars url:

_./src/api/car.api.ts_

```diff
import Axios from 'axios';
import { envConstants } from '../common/constants';
import { Car } from './car.api-model';

- const url = `${envConstants.BASE_API_URL}/cars`;
+ export const url = `${envConstants.BASE_API_URL}/cars`;
...

```

_./src/pages/cars.ts_

```diff
import React from 'react';
+ import useSWR from 'swr';
import Head from 'next/head';
import * as api from '../api';
import { AppLayout, CarListContainer } from '../components';

const CarListPage: React.FunctionComponent = () => {
- const [carList, setCarList] = React.useState<api.Car[]>([]);

- const onLoad = async () => {
-   const apiCarList = await api.getCarList();
-   setCarList(apiCarList);
- };

- React.useEffect(() => {
-   onLoad();
- }, []);
+ const { data } = useSWR(api.url, api.getCarList);
+ const carList = data || [];

  console.log(`Render car list: ${carList.length}`);
...

```

- Run:

```bash
npm run start:api-server
npm run build
npm run start:prod
```

- Open two browser tabs in `http://localhost:8080/cars`

- Add new car:

_./api-server/mock-data/data.json_

```diff
...
+   {
+     "id": "10",
+     "name": "New car",
+     "imageUrl": "/vw-touran.png",
+     "features": [],
+     "isBooked": false
+   }
```

- Remove `new car` Open two windows to check [revalidate on focus demo](https://swr.vercel.app/docs/revalidation#revalidate-on-focus) and add `new car` again.

# About Basefactor + Lemoncode

We are an innovating team of Javascript experts, passionate about turning your ideas into robust products.

[Basefactor, consultancy by Lemoncode](http://www.basefactor.com) provides consultancy and coaching services.

[Lemoncode](http://lemoncode.net/services/en/#en-home) provides training services.

For the LATAM/Spanish audience we are running an Online Front End Master degree, more info: http://lemoncode.net/master-frontend

repository: jahama/master-frontend-lemoncode

repo_name: jahama/master-frontend-lemoncode


text:
# lftc
My compilation and formal languages homework repo

# Lexical Analyzer

The lexical Analyzer in the current form only analyzes a strapped down JS-language and outputs the IPF and ST tables in the console.

The Analyzer is written in Java. Not very user friendly yet.

repository: daniftinca/lftc

repo_name: daniftinca/lftc


text:
---
layout: default
---

# 1998-08-05 - Leaving the fishroute list.

## Header Data

From<EMAIL_ADDRESS>(fishroute)

To<EMAIL_ADDRESS>Message Hash: 297675dcef65ed4f8b766d350c310b1cff6f36c28ca3665ed7281e5ad2f07f46

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-08-05 18:26:29 UTC

Raw Date: Wed, 5 Aug 1998 11:26:29 -0700 (PDT)

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(fishroute)
Date: Wed, 5 Aug 1998 11:26:29 -0700 (PDT)
To<EMAIL_ADDRESS>Subject: Leaving the fishroute list.
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Thank you for your participation in this list.

{% endraw %}
```

## Thread

+ Return to [August 1998](/archive/1998/08)

+ Return to<EMAIL_ADDRESS>(fishroute)](/authors/_null_at_fishroute_com_fishroute_)"

+ 1998-08-05 (Wed, 5 Aug 1998 11:26:29 -0700 (PDT)) - Leaving the fishroute list. -<EMAIL_ADDRESS>(fishroute)_


text:
---
title: Troubleshooting
authors: 8none1, alonbl, dneary, hozn, jbrooks, jumper45, mburns, sgtpepper, tscofield
---

# Troubleshooting

*See also other troubleshooting documents in the wiki:*

*   *[Node Troubleshooting](Node Troubleshooting) - issues related to booting oVirt Node*
*   *[Troubleshooting NFS Storage Issues](Troubleshooting NFS Storage Issues) - when your storage isn't working as you wish*
*   *[Building oVirt engine#Troubleshooting](Building oVirt engine#Troubleshooting) - Issues related to compiling and deploying oVirt Engine*
*   *[Vdsm Developers#Troubleshooting Fake KVM Support](Vdsm Developers#Troubleshooting_Fake_KVM_Support) - For VDSM developers having trouble with "fake_kvm_support"*

## Engine

### Installation

When running engine-setup, I get the message "myhost.local did not resolve into an IP address", but setting up bind locally is hard. Is there an easy way to spoof full DNS locally?
The easiest solution is to use dnsmasq for DNS. You then use the IP address of your engine as your DNS server, and in /etc/dnsmasq.conf you point to your regular DNS servers with "server=<IP_ADDRESS>" (for example). You will also need to open port 53 in iptables to enable computers on your home network to use this DNS server. To do this, add the line "-A INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT" to your iptables configuration, remembering to add it also to any configuration files required to ensure that the option persists across reboots.

It is recommended to use static IP addresses for your server and nodes, but dnsmasq can also spoof reverse DNS for DHCP hosts and serve as a DHCP server for your local network if, for example, you wanted to use devices connecting over Wifi such as laptops as nodes.

After an apparently successful installation of ovirt-engine, the service fails to start. In the system log, I see the error in /var/log/httpd/error.log:

      [Fri Sep 21 13:37:03 2012] [error] (111)Connection refused: proxy: AJP: attempt to connect to <IP_ADDRESS>:8009 (localhost) failed
      [Fri Sep 21 13:37:03 2012] [error] ap_proxy_connect_backend disabling worker for (localhost)
      [Fri Sep 21 13:37:03 2012] [error] proxy: AJP: failed to make connection to backend: localhost}}}

JBoss is failing to start up. There are several possible reasons for this. One potential reason is that you are trying to install the engine on a 32 bit server. If you have the following error in /var/log/ovirt-engine/console.log this may be your problem.

      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

If this is the case, you will need to [modify the command line for Java by removing a 64 bit options](https://bugzilla.redhat.com/show_bug.cgi?id=852037).

I am having trouble connecting to the database. In the system log, I get the following message from Postgres:

      Sep 21 14:00:59 clare pg_ctl[5298]: FATAL:  could not create shared memory segment: Invalid argument
      Sep 21 14:00:59 clare pg_ctl[5298]: DETAIL:  Failed system call was shmget(key=5432001, size=36519936, 03600).
      Sep 21 14:00:59 clare pg_ctl[5298]: HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 36519936 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
      Sep 21 14:00:59 clare pg_ctl[5298]: If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
      Sep 21 14:00:59 clare pg_ctl[5298]: The PostgreSQL documentation contains more information about shared memory configuration.
      Sep 21 14:01:03 clare pg_ctl[5298]: pg_ctl: could not start server

The system default size for the parameter SHMMAX is too small for the oVirt database. You should increase it to at least 64MB (64\*1024\*1024). To do this, run the command "sysctl -w kernel.shmmax=67108864" to modify the running system, and add "kernel.shmmax=67108864" to the file /etc/sysctl.conf to ensure that it persists through reboots.

I installed ovirt engine and now DNS does not work any more
If you let ovirt engine manage the iptables configuration for your server, it will close port 53 UDP which is required for DNS. You should add the line back to the iptables settings as mentioned above.

I ran engine-setup once but there was a problem. So I ran engine-cleanup and re-ran engine-setup. After asking engine-setup to manage my ISO NFS domain, I get the message "/mnt/iso already exists in /etc/exports" and cannot continue
The easiest way to get past this step is to open another tab, remove the line mentioned from /etc/exports, and retry this step.

When building the oVirt-Engine with maven, some tests might fail
Try running the maven clean install command with: -DskipTests

### Usage

When I add my host its status is unreachable. The logs indicate the the host is missing the 'engine' network.
Solution: you need to add a bridge to the host with the name 'engine'

## Node

### Installation

I am setting up the Engine to also run virtual machines through the management interface, but the engine is no longer working properly
When you set up a host through ovirt-engine, the iptables configuration can be over-written with one which is appropriate for an ovirt node. Unfortunately, this configuration closes some ports which are required by oVirt Engine. The solution is to merge both config files - save the iptables configuration required by the engine, and add extra rules to open ports required by the node. The [ quick start guide](Quick Start Guide) has a copy of the iptables set-up required by the engine. If you are also using masqdns or bind for DNS on the engine, you should also open the port 53 in the final configuration. If you have opened any other ports (for example VNC) this is the time to add those to the iptables config file also.

When installing a host via the engine interface, I get an error "rsync.x86_64 is not available"
You are trying to set up a 32 bit host. oVirt requires 64 bit hosts with virtualisation extensions enabled to run KVM effectively.

After installing a host through the engine, I get an error "<name> does not comply with the cluster Default networks, the following networks are missing on host: 'ovirtmgmt'"
It seems that in certain situations (e.g. NetworkManager having been removed before install from engine?) the engine will not configure the bridge network. Instructions for configuring the 'ovirtmgmt' bridge interface can be found at: [Installing_VDSM_from_rpm#Configuring_the_bridge_Interface](Installing_VDSM_from_rpm#Configuring_the_bridge_Interface).

### Usage

## VDSM

### Installation

VDSM won't start and /var/log/messages reports detected unhandled Python exception in '/usr/share/vdsm/vdsm'
Check the permissions on /var/log/vdsm/vdsm.log. The owner and group should be vdsm:kvm.

### Usage

Additional error details can be found in the VDSM log in **/var/log/vdsm/vdsm.log**

If vdsm logs show problems executing sudo commands, check that the /etc/sudoers file contains the group definitions created by the install process. They end with

      Defaults:vdsm !requiretty
      Defaults:vdsm !syslog

## engine-manage-domains

<big>ATTENTION: This page is obsoleted for >=ovirt-engine-3.5 by [Features/AAA](Features/AAA)</big>

### Adding an IPA domain to ovirt engine

Adding an IPA domain to ovirt engine fails with an error that begins:

      General error has occurednull
      java.lang.NegativeArraySizeException

We have seen a similar issue with OpenLDAP that required to set the minimum security strength factor (SSF) to 1 instead of the default 0. This default triggers a bug in the Java virtual machine Kerberos support.

IPA uses the 389 directory server, and it also has the possibility to configure this, as described here:

<http://directory.fedoraproject.org/wiki/Minimum_SSF_Setting>

To check that you can run a query like this in your IPA installation:

      # kinit admin
      # ldapsearch \
      -H `[`ldap://your_ipa_server`](ldap://your_ipa_server)` \
      -Y GSSAPI \
      -LLL \
      -b 'cn=config' \
      -s base \
      nsslapd-minssf

The output will probably be like this:

      dn: cn=config
      nsslapd-minssf: 0

The important thing there is the value 0. You can try to change it to 1, via LDAP or modifying directly the file /etc/dirsrv/slapd-YOUR-REALM/dse.ldif. Do this with the directory server stopped, and remember how to revert it in case things fail.

From: <http://lists.ovirt.org/pipermail/users/2013-November/017853.html>

repository: msbai/ovirt-site

repo_name: msbai/ovirt-site


text:
# django-js-error-logger
A Django application that logs errors from front end.

This project's purpose was to collect frontend errors to backend to debug easier.

## Requirements
- Python 3

## Setup
```
$ git clone https://github.com/hens-virtuella-varld/django-js-error-logger.git
$ cd django-js-error-logger/backend
(create and activate virtual environment if needed)
$ pip install -r requirements.txt
```

## Test
```
$ ./manage.py test
```

## License
Copyright (c) 2019 [hens-virtuella-varld](https://github.com/hens-virtuella-varld)

The project is licensed under the MIT License.

## Contact
### Regan Y.
E-mail<EMAIL_ADDRESS>
LinkedIn: https://www.linkedin.com/in/regan-y/
I will be happy to talk to you if you have any advices to my project.