text:
# LNMarkets Trading Bot

A trading bot for [LNMarkets](https://lnmarkets.com/), using the [LNMarkets API](https://pypi.org/project/LNMarkets/) in Python.

To install: `pip install LNMarketBot`

An abstract class `LNMarketBot.Strategy` is provided, which must be extended with implementation of `LNMarketBot.Strategy.init()`, `LNMarketBot.Strategy.execute()`, and `LNMarketBot.Strategy.stop()` methods. The `init()` method will be called only once, before the bot starts processing price information, while `execute()` is called repetedly, for every new price bar that bot recieves. Any parameters required by the strategy, can be passed during instantiation, and will be accessible using `LNMarketBot.Strategy.params` dictionary. Example strategies are provided in LNMarketBot/Examples/ on github.

The price information is obtained from Kraken, using [Pykrakenapi](https://github.com/dominiktraxl/pykrakenapi), as the methods for same are currently not working for LNMarkets API. This may result in price discrepancy between strategy and broker execution. The price bars are of 1 minute duration, and at present, only supplied for last 12 hours. You can also provide csv files containing price information for backtesting (see examples). A strategy can consume data from multiple data feeds, and bot can process multiple strategies simultaneously.

 Bot interacts with LNMarkets through `LNMarketBot.LNMBroker` class, which provides methods for buying/selling, as well as properties for viewing opne/closed positions, balance, etc. If backtesting, the strategy connects to `LNMarketBot.BacktestBroker` class instead.

 You can enable Telegram or Pushover notifications through `LNMarketBot.Notifier`, which provides methods enableTelegram(chatID, token) and enablePushover(userkey, APIkey) for the same. A notifier instance is added to broker on instantiation and access via `broker.notifier` and all position updates through broker will automatically be notified. If you want to disable the automatic notification, instantiate broker with `silent=False`.

Example Usage:
```python
from LNMarketBot import Strategy, LNMBroker, KrakenData, Bot

LNMToken = '<YOUR TOKEN>'
broker = LNMBroker(LNMToken, <Starting Balance>)
telegramToken = '<Telegram Bot Token>'
chatId = <Your Chat Id with Telegram Bot>
broker.notifier.enableTelegram(chatID = chatId, token = telegramToken)

#LowestPriceStrat is provided in LNMarketBot/Examples/ on git
strategy = LowestPriceStrat(
    broker=broker,
    BollingerPeriod=20, Deviation=2.0,
    AveragePeriod=240,
    StopMargin=0.02,
    BuyLimit=1.05,
    TradeDistance=0.1,
    RiskPercent=0.01,
    TrailPercent=0.1,
    CashLimit=1.0e06,
)
strategy.addData(KrakenData())

bot = Bot()
bot.addStrategy(strategy)
bot.run()
```

Note:
* LNMarket token needs only 'positions' scope. This ensures leaking it cannot result in loss of funds through withdrawal.
* This project is under development and not well tested. You are advised to review the code if you plan to use it for trading.
* The author is not responsible for any loss that may result from use of this project.

repository: DivyanshuBagga/LNMarketBot

repo_name: DivyanshuBagga/LNMarketBot


text:
# Maintenance guide

**Intended audience**

This guide is intended for maintainers and developers of InvenioRDM itself.

## Guides

- **[Newcomers](newcomers.md)**: A quick overview for new core developers.
- **[Sprintboard workflow](board-workflow.md)**: A reference for our sprintboard workflow.
- **[Release management](release-management.md)**: A checklist for releasing InvenioRDM.
- **[Branch management](branch-management.md)**: A checklist for releasing InvenioRDM.
- **[Demo site & docs deployment](demosite.md)**: A reference guide for deploying the demo site and docs.

## References

- **[RFCs](rfcs.md)**: An overview of RFCs relevant for InvenioRDM.

license: MIT

repository: mb-wali/docs-invenio-rdm

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: mb-wali/docs-invenio-rdm


text:
# DeepHyperion

DeepHyperion is a tool for generating test inputs and feature maps using illumination-search algorithm.

## DeepHyperion-MNIST ##
To set up the environment and run the DeepHyperion tool adapted to the handwritten digit classification case study, follow the instructions [here](../DeepHyperion-MNIST/README.md).

## DeepHyperion-BNG ##
To set up the environment and run the DeepHyperion tool adapted to the self-driving car case study, follow the instructions [here](../DeepHyperion-BNG/README.md).

## Experimental Data and Scripts ##
To regenerate the results and plots reported in the ISSTA paper, follow the instructions [here](../experiments-issta/README.md)
To regenerate the results and plots reported in the TOSEM paper, follow the instructions [here](../experiments-tosem/README.md)

## Extra Use Case Scenarios ##
This section contains plausible scenarios on how DeepHyperion could be extended beyond the experiments performed in the paper.

### Scenario 1: Modify the intervals of the maps ###

This scenario shows that a map can be rescaled to the granularity defined by the user. This adjustment is particularly useful when the user wants to compare maps produced in different runs/configurations or by different tools.

As an example, you can configure _DeepHyperion-BeamNG_ to generate maps with _N_ (_N > 0_) bins for each feature.
To do this, first run _DeepHyperion-BNG_ with predefined configuration. Then, as explained in [Generate Processed Data and Rescaled Maps](../DeepHyperion-BNG/report_generator/README.md) step 3, you can set the number of bins for each feature as follows:

```
python report_generator/app.py generate-map \
    --feature sd_steering 13 171 <N> \
    --feature mean_lateral_position 153 173 <N> \
        .\logs\run_XXX\simulations
```

For example, you can set N = 25, which generates the following map:

Or, you can set the N = 10, which generates the following map:

### Scenario 2: Test a different DL model ###

This scenario shows the possibility of using trained models for _DeepHyperion-MNIST_ different from the one considered in the experimental evaluation.
As an example, you can configure _DeepHyperion-MNIST_ to use the alternative model `cnnClassifier.h5` which is already in _models_ folder.
To do this, you need to place the name of the new model in _DeepHyperion-MNIST/properties.py_ as follows:

```
    MODEL = os.getenv('DH_MODEL', 'models/cnnClassifier.h5')
```

Moreover you can test your own model. You can train a new model by running the following command:

```
python DeepHyperion-MNIST/train_model.py <YOUR_MODEL_NAME>
```

After the new model has been trained, you can place it in _DeepHyperion-MNIST/models_ folder, then edit the configuration in _DeepHyperion-MNIST/properties.py_ file as follows:

```
    MODEL = os.getenv('DH_MODEL', 'models/<YOUR_MODEL_NAME>.h5')
```

repository: testingautomated-usi/DeepHyperion

branch_name: refs/heads/main

gha_language: Python

repo_name: testingautomated-usi/DeepHyperion


text:
# ff-timeslot-booking
Plugin that extends Formidable Form Pro Wordpress plugin.
It allows a user role on form update based on a the status of a field in the form.
It works even when the form entry is updated by and admin.

It's based on the ideas from this thread:
https://formidablepro.com/help-desk/register-user-after-paypal-payment-complete/

TODO:

 * use field keys instead of ID for portability: https://formidablepro.com/help-desk/possible-to-replace-field-id-with-key-in-functinos-php-code/


text:
# 20Fifty Linter

This is the linter package used for 20Fifty Flutter projects,
this project relies in [pedantic](https://pub.dev/packages/pedantic) internally and is simply the
implementation of it used within our projects to more easily
maintain standards across projects.

## Using the Lints

To use the lints add a dev_dependency in your `pubspec.yaml`:

```yaml
dev_dependencies:
  twentyfifty_linter:
      git:
       url: git@github.com:20fifty/20Fifty_linter.git
       ref: main
```

then, add an include in your `analysis_options.yaml`. If you want to always
use the latest version of the lints, add a dependency on the main
`analysis_options` file:

```yaml
include: package:twentyfifty_linter/analysis_options.yaml
```

If your continuous build and/or presubmit check lints then they will likely
fail whenever a new version of `package:twentyfifty_linter` is released. To avoid this,
specify a specific version of `analysis_options.yaml` instead:

```yaml
include: package:twentyfifty_linter/analysis_options.[VERION_NUMBER].yaml
```

# Updating

When updating the lint rules, please ensure to create a versioned `analysis_options.[VERSION_NUMBER].yaml` file,
this allows us to use version pinning in projects mor easily to minimize the impact on other
projects, also this ensure that should we had projects over to clients, they are then not impacted
by updates in our process, we can then pin them to the latest version that project was using
and they can choose weather or not to update or abandon our preferences.

Also ensure to update `CHANGELOG.md` with what has changed to make it easier
for those implementing to gauge the impact of updating.

## Features and bugs

Please file feature requests and bugs at the [issue tracker][tracker].

[tracker]: https://github.com/20fifty/20Fifty_linter/issues


text:
# Week 8 Status Report

The first goal I set out to accomplish this week was the completion of my second dataset.
I finished collecting data for my second dataset.
My second dataset now contains images of the five knots from my initial dataset, this time with a non-reflective background.

Next, I decided that I should try knot classification again, although this time, I trained the network on my complete initial dataset and tested the network's accuracy on images I downloaded from ImageNet.
I call this dataset a ‘wild’ dataset, as the validation images are not part of my original dataset, and there are external variations (such as rope type, background etc.).
The trained CNN managed an accuracy of 90% after 50 epochs on this ‘wild’ dataset.

Following from last week’s meeting, I also decided to alter my Keras model in my classification script.
First, I increased the batch_size from 4 to 8 and ran the classification script.
The batch_size increase immediately improved the accuracy from 90% (attained last week) to 95% after 50 epochs when trained on my initial dataset.
Next, I experimented with separately adding normalisation layers and a Gaussian noise layer.
The normalisation layers seemed to decrease the network accuracy slightly.
However, the addition of one Gaussian noise layer increased the 90% accuracy achieved on the ‘wild’ dataset to 95%.
In the process of learning about these layers and their purpose, I managed to find many useful papers from the University of Toronto (Hinton etc.), so I plan to spend more time over the coming weeks deepening my understanding of the dropout and normalisation concepts.

Similarly to the normalisation layers, I experimented with the Adam optimiser function in the model.compile method, although the original RMSprop optimiser function seemed to outperform Adam consistently.
After finding a paper on Adam by Hinton, I also plan to deepen my understanding of optimiser functions during the next week.


text:
# EctoFacade

EctoFacade can be used as interface through which you can query multiple repositories.
Main objective of this is to use separate separate repository for writes and separate repository for reads.

For example:

Lets say you have PostgreSQL database replicated to 4 different slave nodes that should be used for reads only.
With this small library you can do that!

## Installation

```elixir
def deps do
  [
    {:ecto_facade, "~> 0.1.0"}
  ]
end
```

## Usage

```elixir
defmodule MyApp.FacadeRepo do
  use EctoFacade.Repo,
    master_repo: MyApp.Repo,
    read_repos: [MyApp.ReadReplicaOne, MyApp.ReadReplicaTwo],
    algorithm: MyApp.Repo.ReadAlgorithm
end

MyApp.FacadeRepo.all(MyApp.SomeSchema) # and other operations that you would do with ecto repo
```

Possible algorithms for selecting repository for read operation:
- `EctoFacade.Algorithms.Random` - selects randomly repository
- `EctoFacade.Algorithms.Roundrobin` - selects next repository in list till last and then goes again from beginning
- `EctoFacade.Algorithms.WeightRoundrobin` - selects next repository in list depending on weight. Check module documentation for more info.

or your own that implement behaviour `EctoFacade.Algorithm`.

for more information please check documentation

## Usage (testing)

When in test just configure you FacadeRepo to use only master repository. This way you won't have issues with separate repositories with Sandbox Ecto adapter.

## Documentation

[Hex.pm](https://hexdocs.pm/ecto_facade)


text:
---
title: xdm with notion
layout: post
comments: true
---
Today I am attempting to switch to xdm as my display manager. I currently use LXDE but I am integrating parts of it with the notion windows manager. LXDM is not needed so I would like to replace it with the original xdm.

To start install xdm

        emerge -av x11-apps/xdm

add xdm as the display manager

        nano /etc/conf.d/xdm

set DISPLAYMANAGER to xdm

The [NVIDIA Driver with Optimus Laptops](https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops) guide has some pointers on how to setup xdm correctly. The driver requres that some xrandr commands are executed on xinit. The instructions are easy to follow.

Now that this is complete I am exiting to the console and running the xdm command.

It turns out that xdm is not loading my .xinitrc file.

From my research on how xdm works and gentoo I learned a few things and this is what I did to get things running.

* copy /etc/X11/xinit/xinitrc to ~/.xinitrc
* make ~/.xinitrc executable
* create ~/.xsession
* add export XSESSION=notion to the top of the file
* add any other commands you need to execute
* add ~/.xinitrc as the final command

The gentoo X system is setup in such a way that /etc/X11/xinitrc does everything most people want in a xinitrc file. The only problem is the file is not executable. By copying it to my home directory I am able to resuse it.

Gentoo's xinitrc looks for a XSESSION varaible and executes that session. If the session is not found twm is started.

To get the default session to work x11-apps/xsm needs to be installed along with xterm an twm.

xdm only executes a .xsession file in the user's home directory using the authenticated user's account.

With this setup I am setting the XSESSION variable to run notion. The /etc/X11/Sessions/notion file points to /usr/bin/notion rather than where I installed it /usr/local/bin/notion.

So far, I think this is one thing I can check of my list for building my system.


text:
---
collection: episodes
layout: episode.swig

number: 13
title: Top Ten Lists We’ll Never Do
description: For unlucky number 13, Brian and Melissa reveal the top ten lists that will never appear on the podcast.
pubdate: 2016-09-02
slug: 013-top-ten-lists-well-never-do
bytes: 10636278
duration: 0:22:09
tags: lists
---

## Melissa

High School moments

Southern foods

Relatives

Makeup brands

Body parts

Chuck Norris jokes

Funerals

Animals with PG-13 names

Sports teams

Torture devices

## Brian

Numbers

Shades of green

Pairs of pants

People I know named “George”

Words that rhyme with “wolf”

Uses for sunglasses

Crimes I’d like to commit

Family members

Religions

Prospects if my spouse dies

repository: briankoser/tto-metalsmith

repo_name: briankoser/tto-metalsmith


text:
# javaee-javamelody-rest-jpa-ejb-monitoring-example

:pushpin: WORK IN PROGRESS :pushpin:

An example Java EE application that demonstrates how to use
[JavaMelody](https://github.com/javamelody/javamelody/) for application
monitoring, including monitoring HTTP requests, SQL queries, EJB calls,
hotspots and other application details.

## The application

The application shows the list of conference speakers and looks like this:

![Screenshot of the app](docs/app.png)

The goal of the project is to demonstrate how to monitor Java EE applications
with JavaMelody and how to configure it properly. To do that, we need a simple
yet realistic application that

- uses Java EE technologies like JAX-RS, JPA and EJB,
- is packaged into an EAR and structured like large Java EE applications in
  accordance with best practices.

The project consists of a web application WAR module that uses services that
are implemented as EJBs in a separate EJB JAR module. The whole application is
packaged into an EAR.

We use [Vue.js](https://vuejs.org/) and [Vue Material](https://vuematerial.github.io/)
for the frontend.

Here's how the EAR looks:

    application-ear.ear
    ├── web-application.war
    ├── service-ejb-impl.jar
    ├── lib
    │   ├── service-ejb-api.jar
    │   ├── javamelody-core.jar
    │   └── jrobin.jar
    └── META-INF
        ├── MANIFEST.MF
        └── application.xml

It’s a Maven project with the following modules:

- *web-application* – JAX-RS application that uses the EJB services, open
  <http://localhost:8080/conference-speakers/> to access it
- *service-ejb-api* – service interface with `@Local` annotation
- *service-ejb-impl* – `@Stateless` EJB that implements the service interface
  and uses DeltaSpike for data access
- *application-ear* – packages the EJB JAR into an EAR.

Build it with `mvn package` and deploy
`application-ear/target/application-ear.ear` to the application server to run
it.

You will see `Failed to define class net.bull.javamelody.[...]`, these are
caused by JavaMelody plugins for various frameworks and are harmless.

## Monitoring

You can access the JavaMelody monitoring console at
<http://localhost:8080/web-application/monitoring>.

Besides the common [machine load charts](https://github.com/javamelody/javamelody/wiki/Screenshots#charts) and
[HTTP requests statistics](https://github.com/javamelody/javamelody/wiki/Screenshots#statistics-of-requests),
the following advanced statistics are available:

### SQL queries statistics

![Screenshot of SQL queries statistics](docs/sql-statistics.png)

### EJB calls statistics

![Screenshot of EJB calls statistics](docs/ejb-statistics.png)

### Hotspots

![Screenshot of hotspots](docs/hotspots.png)

## Adding JavaMelody support to EAR-based applications

See :pushpin:!!sha of commit!!:pushpin: to see what changes are required to
enable JavaMelody.


text:
# Overview

With the Cyberimpact API, you can build a variety of programs and applications
to automate your email marketing. Here are some examples of what you can build:

- An email marketing program that automatically sends out weekly or monthly
  newsletters to your subscribers
- A program that allows you to send out automated emails based on certain
  triggers, such as if a user abandon's their shopping cart
- An email template builder that makes it easy to create and customize email
  templates
- A tool that analyzes your email marketing campaigns and provides insights on
  what's working and what's not


text:
# Visual Studio Live 2019 ISP Speed Test systemd Worker
This project is a proof-of-concept .NET Core 3.0 Linux worker service with systemd integration that gathers and logs internet speed data. It was inspired by a combination of a tech talk and extremely slow internet speeds at the hotel.

# Prerequisites
Naturally, this is intended to run on a Unix machine with the systemd suite. For reference, I used a Debian 9 machine for all development and testing.

# Getting Started
To run locally without integrating with systemd, simply navigate to the folder with the .csproj file and use dotnet build and dotnet run. To build, publish, and integrate with systemd, run sh deploy.sh. Since this is a simple proof-of-concept, you'll need to update the paths in the Shell script to get this working on your machine. Normally, you would move the executable somewhere like the /sbin folder outside of the local repository file structure.

# Checking Output
To view the status of the service, run sudo systemctl status speedtest. You can also view the logs using sudo journalctl -u speedtest.

# Tearing Down
To stop the service, run sudo systemctl stop speedtest.service.


text:
---
layout: post
title: Participating in GitHub Sponsors
date: 2019-10-28 22:50:00 +0100
excerpt: It ain't much, but it's honest work.
tags: [Other]
---

Hey! This is just a very quick announcement that I've been recently accepted into
the [GitHub Sponsors](https://github.com/sponsors) program, a new Patreon-like service from GitHub.
My page is now up and running and while it's still very barebones, it should do the trick for now.

What do I offer in return for sponsorships? As mentioned on the sponsorships page, not much for now -- so far I'm only
able to offer a place in credits for those who sponsor. I want to avoid perks like early/exclusive access,
because I believe fragmenting the community is not a good idea -- that said, I may come up with something better
later which also will not lock people out!

***

The link to my Sponsors page is now added to the footer of the website, next to a PayPal link.
If you wish to visit the page, either scroll down or click here: \\
 Become a sponsor

gha_language: HTML


text:
# Swiss QR Bill in HTML

Creation of Swiss QR Bills as HTML. There is no need to send data to a server. Only HTML, CSS and JavaScript are used.

For the QR Code the QR Code generator library from Nayuki (https://github.com/nayuki/QR-Code-generator) is used.

## ChangeLog

A simple string as reference is now converted to a Creditor Reference (ISO 11649) if possible.
A Creditor Reference (ISO 11649) with an incorrect checksum is now displayed in red.

---

Version 1.6 of Nayuki's QR Code Generator is now included because the newer version is different.

repository: bvisible/html-swiss-qr-bill

repo_name: bvisible/html-swiss-qr-bill


text:
---
---
### Hi there!

I'm Andrew, and I'm into computational [drug discovery](/evolution) and [social science](https://www.darpa.mil/program/ground-truth).

I want to accelerate the rate at which we discover new treatments for big diseases.

I [want](/autoabm) a robust understanding of how social systems _work_ and how they can be _improved_.

I try to augment my ability to do both of these things with machines that can do the computation better than I can.

I'm interested in how we can evaluate our own institutions---scientific, economic, and political---and how we might be able to design [better ones](/decentralization).

I'm best known for creating [AgentMaps](https://github.com/noncomputable/AgentMaps), a popular framework for agent-based simulations.

I broadly agree with the principles of [Effective Altruism](https://en.wikipedia.org/wiki/Effective_altruism).

I like [Scott Walker](https://www.youtube.com/watch?v=DRPXfsCBvVU), [Marty Robbins](https://www.youtube.com/watch?v=6x6o_tBU8DU), and [Leonard Cohen](https://www.youtube.com/watch?v=yOnXe8ttmjY).

If you wanna talk, say hello at andcomputable on gmail.

[GitHub](https://github.com/noncomputable)
[Twitter](https://twitter.com/chocolateycrepe)


text:
## Focus Areas by Working Group

 *CHAOSS metrics are sorted into Focus Areas. CHAOSS uses a Goal-Question-Metric format to present metrics. Individual metrics are released based on identified goals and questions. The metrics include a detail page with definitions, objectives, and examples.*

### Dates for Release 2021-10
Release Freeze: September 1st, 2021
Public Comment Period: September 1st, 2021 to September 30th, 2021
Metrics Release Date: First week of October 2021

- [PDF of released CHAOSS Metrics - English (v.2021-10)](https://chaoss.community/wp-content/uploads/2021/10/English-Release-2021-10-21.pdf)
- [PDF of released CHAOSS Metrics - Chinese (v.2021-10)](https://chaoss.community/wp-content/uploads/2021/10/Chinese-Release-2021-10-21.pdf)

### Tentative Dates for Next Release 2022-04
Release Freeze: March 1st, 2022
Public Comment Period: March 1st, 2022 to March 30th, 2022
Metrics Release Date: First week of April 2022

repository: vchrombie/website

repo_name: vchrombie/website


text:
Pagila
======

Pagila is a port of the Sakila example database available for MySQL, which was
originally developed by Mike Hillyer of the MySQL AB documentation team. It
is intended to provide a standard schema that can be used for examples in
books, tutorials, articles, samples, etc.

All the tables, data, views, and functions have been ported; some of the
changes made were:

* Changed char(1) true/false fields to true boolean fields
* The last_update columns were set with triggers to update them
* Added foreign keys
* Removed 'DEFAULT 0' on foreign keys since it's pointless with real FK's
* Used PostgreSQL built-in fulltext searching for fulltext index.
  Removed the need for the film_text table.
* The rewards_report function was ported to a simple SRF

The schema and data for the Sakila database were made available under the BSD
license which can be found at http://www.opensource.org/licenses/bsd-license.php.
The pagila database is made available under this license as well.

FULLTEXT SEARCH
---------------

Fulltext functionality is built in PostgreSQL, so parts of the schema exist
in the main schema file.

Example usage:

SELECT * FROM film WHERE fulltext @@ to_tsquery('fate&india');

PARTITIONED TABLES
------------------

The payment table is designed as a partitioned table with a 6 month timespan
for the date ranges.
If you want to take full advantage of table partitioning, you need to make
sure constraint_exclusion is turned on in your database. You can do this by
setting "constraint_exclusion = on" in your postgresql.conf, or by issuing the
command "ALTER DATABASE pagila SET constraint_exclusion = on" (substitute
pagila for your database name if installing into a database with a different
name)

INSTALL NOTE
------------

The pagila-data.sql file and the pagila-insert-data.sql both contain the same
data, the former using COPY commands, the latter using INSERT commands, so you
only need to install one of them. Both formats are provided for those who have
trouble using one version or another.

VERSION HISTORY
---------------

Version 2.0
* Update schema for newer PostgreSQL versions
* Remove RULE for partitioning, add trigger support.
* Update years in sample data.
* Remove ARTICLES section from README, all links are dead.

Version 0.10.1
* Add pagila-data-insert.sql file, added articles section

Version 0.10
* Support for built-in fulltext. Add enum example

Version 0.9
* Add table partitioning example

Version 0.8
* First release of pagila

repository: ldnicolasmay/Udacity

repo_name: ldnicolasmay/Udacity


text:
## Grafana dashboard for BigBlueButton

The provided `docker-compose` should work out of the box as an all in one solution.
In theory in has all the data necessary to be up and running in a matter
of minutes. Add a user to grafana and it should pick up all the data
from you BigBlueButton instance right away.

To get started make sure you have `Docker` and `docker-compose`
installed. Then rename the `bbb.env.example` file to `bbb.env` and add
ypur server details. To get the `Secret` run `bbb-conf --secret` on your
bbb server.

Additionally there is an influxdb server to monitor the server itself.

I like the influxdb dashboards slightly better for server monitoring so
I have added that as well to the `docker-compose` file. To set up a
server add a telegraf configuration, create a new bucket and install
telegraf on your server. Influxdb will give you the config file.

repository: hmt/bbb-dashboards

repo_name: hmt/bbb-dashboards


text:
---
title: Assets Insights
description:  Learn how the Assets Insights feature lets you track user ratings and usage statistics of images that are used in third-party websites, marketing campaigns, and Adobe's creative solutions.
contentOwner: AG
role: User, Admin
feature: Asset Insights,Asset Reports
exl-id: 0130ac40-a72b-4caf-a10f-3c7d76eaa1e6
hide: yes
---
# Assets Insights {#asset-insights}

| Version | Article link |
| -------- | ---------------------------- |
| AEM as a Cloud Service  |    [Click here](https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/assets-insights.html?lang=en)                  |
| AEM 6.5     | This article         |

The Assets Insights feature enables you to track user ratings and usage statistics of images that are used in third-party websites, marketing campaigns, and Adobe's creative solutions. It helps derive insights regarding their performance and popularity.

[!DNL Assets] Insights captures user activity details, such as the number of times an image is rated, clicked, and impressions (number of times an image is loaded on the website). It assigns scores to images based on these statistics. You can use the scores and performance statistics to select popular images for inclusion in catalogs, marketing campaigns, and so on. You can even formulate archival and license renewal policies based on these statistics.

For [!DNL Assets] Insights to capture usage statistics for images from a website, you must include the embed code for the image in the website code.

To let Assets Insights display usage statistics for assets, first configure the feature to fetch reporting data from Adobe Analytics. For details, see [Configure Assets Insights](/help/assets/configure-asset-insights.md). To use this feature in an on-premise installation, purchase [!DNL Adobe Analytics] license separately. Customers on [!DNL Managed Services] receive [!DNL Analytics] license bundled with [!DNL Experience Manager]. See [Managed Services product description](https://helpx.adobe.com/legal/product-descriptions/adobe-experience-manager-managed-services.html).

>[!NOTE]
>
>Insights are only supported and provided for images.

## View statistics for an image {#viewing-statistics-for-an-image}

You can view the Assets Insights scores from the metadata page.

1. From the [!DNL Assets] user interface (UI), select the image and then click **[!UICONTROL Properties]** from the toolbar.
1. From the Properties page, click the **[!UICONTROL Insights]** tab.
1. Review the usage details for the asset in the **[!UICONTROL Insights]** tab. The **[!UICONTROL Score]** section describes the total asset usage and performance sores of an asset .

   Usage score describes the numbers of times asset is used in various solutions.

   The **[!UICONTROL Impressions]** score is the number of times the asset is loaded on the web site. The number displayed under **[!UICONTROL Clicks]** is the number of times the asset is clicked.

1. Review the **[!UICONTROL Usage Statistics]** section to know which entities the asset was part of and which creative solutions recently used it. The higher the usage, the greater the chances that the asset is popular among users. Usage data is displayed under the following heads:

    * **Asset**: The number of times the asset was part of a collection or compound asset
    * **Web & Mobile**: The number of times the asset was part of websites and apps
    * **Social**: The number of times the asset was used in solutions, such as Adobe Social and Adobe Campaign
    * **Email**: The number of times the asset was used in email campaigns

   ![usage_statistics](assets/usage_statistics.png)

   >[!NOTE]
   >
   >Because the Assets Insights feature typically fetches the Solutions data from Adobe Analytics in a periodic manner, the Solutions section may not display the most recent data. The time period for which the data is displayed depends the schedule of the fetch operation that Assets Insights runs to retrieve Analytics data.

1. To view performance statistics for the asset graphically over a period of time, select period in the **[!UICONTROL Performance Statistics]** section. Details, including clicks and impressions are displayed as trend lines of a graph.

   ![chlimage_1-3](assets/chlimage_1-3.jpeg)

   >[!NOTE]
   >
   >Unlike the data in the Solutions section, the Performance Statistics section displays the most recent data.

1. To obtain the embed code for the asset that you include in websites to gets performance data, click **[!UICONTROL Get Embed Code]** below the asset thumbnail. For more information on how to include your Embed code in third-party web pages, see [Using Page Tracker and embed code in web pages](/help/assets/use-page-tracker.md).

   ![chlimage_1-98](assets/chlimage_1-303.png)

## View aggregate statistics for images {#viewing-aggregate-statistics-for-images}

You can view scores of all assets within a folder simultaneously using **[!UICONTROL Insights View]**.

1. In the [!DNL Assets] user interface, navigate to the folder containing the assets for which you want to view insights.
1. Click Layout from the toolbar, and then choose **[!UICONTROL Insights View]**.
1. The page displays usage scores for the assets. Compare the ratings of the various assets and draw insights.

## Schedule background job {#scheduling-background-job}

Assets Insights fetches usage data for assets from Adobe Analytics report suites in a periodic manner. By default, Assets Insights runs a background job every 24 hours at 2 AM to the fetch data. However, you can modify both the frequency and the time by configuring the **[!UICONTROL Adobe CQ DAM Asset Performance Report Sync Job]** service from the web console.

1. Click the [!DNL Experience Manager] logo, and go to **[!UICONTROL Tools]** > **[!UICONTROL Operations]** > **[!UICONTROL Web Console]**.
1. Open the **[!UICONTROL Adobe CQ DAM Asset Performance Report Sync Job]** service configuration.

   ![chlimage_1-99](assets/chlimage_1-304.png)

1. Specify the desired scheduler frequency and the start time for the job in the property scheduler expression. Save the changes.

gha_language: Groovy


text:
# Google Cloud Storage

## Using the Storage API

### Setting up StorageConfig

To make the GoogleCloudProvider as flexible as possible to work with different API's and projects,
you can configure each API with their own configuration if the default `GoogleCloudProviderConfig` doesn't satisfy your needs.

For example the `GoogleCloudProviderConfig` can be configured with a `ProjectID`, but you might
want to use this API with a different project. Additionally every API has their own scope and you might want to configure it.
You must register a `GoogleCloudStorageConfig` in one of 2 ways.

In `configure.swift`
```swift
let cloudStorageConfig = GoogleCloudStorageConfig(scope: [StorageScope.fullControl], serviceAccount: "default", project: "myproject-000000")
services.register(cloudStorageConfig)
// OR
services.register(GoogleCloudStorageConfig.default())
```
The priority of which projectID to use is as follows:
`$PROJECT_ID` environment variable
Service Account projectID
`GoogleCloudStorageConfig`'s `.project` (the config for this API)
`GoogleCloudProviderConfig`'s `.project`
and will throw an error if no projectID is set.

### Creating a storage bucket

```swift
func create(_ req: Request) throws -> Future<GoogleStorageBucket> {
    let cloudStorage = try req.make(GoogleCloudStorageClient.self)

    return try cloudStorage.buckets.create(name: "vapor-cloud-storage-demo")
}
```

```json
// Results in the following response
{
    "updated": "2018-05-27T20:21:19Z",
    "selfLink": "https://www.googleapis.com/storage/v1/b/vapor-cloud-storage-demo",
    "projectNumber": "0000000011",
    "id": "vapor-cloud-storage-demo",
    "location": "US",
    "storageClass": "STANDARD",
    "metageneration": "1",
    "kind": "storage#bucket",
    "timeCreated": "2018-05-27T20:21:19Z",
    "name": "vapor-cloud-storage-demo",
    "etag": "CAE="
}
```

### Uploading an object to cloud storage

```swift
func upload(_ req: Request) throws -> Future<GoogleStorageObject> {
    let cloudStorage = try req.make(GoogleCloudStorageClient.self)

    return try cloudStorage.object.createSimpleUpload(bucket: "vapor-cloud-storage-demo",
                                                      data: Data(imagedata),
                                                      name: "hello",
                                                      mediaType: .jpeg)
}
```

There are other API's available which are well [documented](https://cloud.google.com/storage/docs/json_api/v1/).
This is just a basic example of creating a bucket and uploading an object.

### What's implemented

* [x] BucketAccessControls
* [x] Buckets
* [x] Channels
* [x] DefaultObjectAccessControls
* [x] Notifications
* [x] ObjectAccessControls
* [x] Simple Object upload
* [ ] Multipart Object upload
* [ ] Resumable Object upload

repository: popaaaandrei/google-cloud-provider

gha_language: Swift

repo_name: popaaaandrei/google-cloud-provider


text:
%{
    "Id":"272",
    "Title": "blogs every pggmr",
    "Url":"blogs-every-programmers-developers-read
",
    "PubDate":"99-Dec-9999",
    "Tags": ["personal"],
    "Preview": "",
}%
[Source](http://gizmoblogr.com/257/blogs-every-programmers-developers-read "Permalink to Blogs That Every Programmer / Developer Should Read")

# Blogs That Every Programmer / Developer Should Read

[Â Home][1]Â >Â [Featured][2]Â >Â Blogs That Every Programmer / Developer Should Read

![more joel on software][3]![more joel on software][4]When I don't write code, I read 'em. Yes, I am such a bookworm. I just love reading. Back in elementary you can already see me spending some time in the library. I also save money to buy some comics (those horror comics in Tagalog). I also prefer to read about comets, planets, dinosaurs and other Science-and-illustrated books back then.

In High School, I read K-Zone (and collect some). Childish, right.

In College, I started to collect PC-Mag. Though I was not able to continue collecting it, it was one of the magazines which I read front to back and read some of the articles more than one time. That was my addiction. Computer, technology, the latest and greatest. I don't know but I think they stopped publishing in the Philippines.

Right now, no more magazine collections, no more K-zone kiddie magazine and no more horror comics. I guess that's what you get from growing up.

E-books about tech replaced them. There are a lot of free e-books published in the internet.  But e-books are sometimes not fun to read. Especially the 'technical' ones.

Here's a secret to mastering a subject. Read the book at least three times. First reading, just scan and skim. On the second reading, read each paragraph but stop once you get the point. During the last reading, do the hands-on. Practice what you learned and use the book as a reference.

OK. Enough of that. If you will ask me what blogs I read (related to software development and general programming) at least once a week, then here's the complete list.

    * [Scott Hanselman][6]Â (http://www.hanselman.com). Scott is a remote-employee from Microsoft specifically working with the Web Platform team. I often see him in video presentations and he is a frustrated stand-up comedian (aka a great speaker). Who wants a boring presenter? If you want to be updated about the latest from Microsoft and want to have it in a 'lighter' and easy-to-understand tone, then this blog is for you.

Â

    * [Joel on Software][7] (http://www.joelonsoftware.com). I bought a 25-peso (~$0.50) book from Book Sale entitled "More Joel on Software". It's an eye opener. If you are a coder, tester, programmer, team lead, developer or a wannabe on whatever language and platform, I strongly suggest that you read this one. Or at least his blog since the contents of the book are taken from his blog. This blog is authored by Joel Spolsky, CEO and co-founder of StackOverflow.

Â

    * [Coding Horror][8] (http://www.codinghorror.com). Just like Joel on Software, Coding Horror talks about programming in general. The thoughts are witty. Period. It is authored by Jeff Atwood, co-founder of StackOverflow.

Â

See, I am a big fan of StackOverflow. I bet you will agree with me if I say that it was one of the few very useful site in the internet (not only to developers but to everyone c/o Stack Exchange).

Reading articles from these three guys makes me a day wiser than yesterday. So, I want to share these to you if you haven't checked their blogs yet.

What about you? What are your favorite and most-often-read technical / non-technical blogs. Comment out below. ![:\)][3]

![:\)][9]

PS. I love reading Harry Potter, Percy Jackson and the Game of Thrones, too.

#### About The Author

![][10]

##### [GizmoBlogr][11]

Mark writes about his love for programming and codes via GizmoBlogr. He also writes about [personal finance][12] and about [food and travel][13]. Get in touch by [sending him a message][14]. Connect with him through  [Google+][15] or Twitter [@markhughneri][16]

[1]: http://gizmoblogr.com
[2]: http://gizmoblogr.com/category/featured "View all posts in Featured"
[3]: http://gizmoblogr.com/assets/loading.gif
[4]: http://gizmoblogr.com/wp-content/uploads/2013/09/more-joel-on-software-224x300.jpg
[5]: http://blogs.msdn.com/b/mssmallbiz/archive/2013/06/28/almost-150-free-microsoft-ebooks-covering-windows-7-windows-8-office-2010-office-2013-office-365-office-web-apps-windows-server-2012-windows-phone-7-windows-phone-8-sql-server-2008-sql-server-2012-sharepoint-server-2010-s.aspx
[6]: http://www.hanselman.com
[7]: http://www.joelonsoftware.com
[8]: http://www.codinghorror.com
[9]: http://gizmoblogr.com/wp-includes/images/smilies/icon_smile.gif
[10]: http://0.gravatar.com/avatar/0a71fb2741e1e3052384c81c65fde29a?s=100&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&r=G
[11]: http://gizmoblogr.com/author/mhneri
[12]: http://moneygizmo.net
[13]: http://www.sisigbytes.com
[14]: http://gizmoblogr.com/contact
[15]: http://plus.google.com/108873856677774227247?rel=author
[16]: https://twitter.com/markhughneri

repository: kimerran/kimerran-blog

repo_name: kimerran/kimerran-blog


text:
---
id: cypress
title: "Configuration Syntax: Cypress"
sidebar_label: Cypress
---

Please refer to the [Common Configuration Syntax Reference](/testrunner-toolkit/configuration/common-syntax)for information regarding fields such as `apiVersion`, `kind`, `suites`, `sauce`, etc.

## Example Configuration

```yaml reference
https://github.com/saucelabs/saucectl-cypress-example/blob/master/.sauce/config.yml
```

## `cypress`

__Description__: Details specific to the `cypress` configuration.

__Type__: *object*

__Example__:
```yaml
cypress:
  version: 6.6.0
  configFile: "cypress.json"
```

### `version`

__Description__: Version of `cypress` to use during tests.

__Type__: *string*

__Example__:
```yaml
  version: ##VERSION##
```

### `configFile`

__Description__: The designated `cypress` configuration file. `saucectl` determines related files based on the location of the config file. By default `saucectl` defers to the test file location defined in `cypress.json`.

__Type__: *string*

__Example__:
```yaml
  configFile: "cypress.json"
```

### `record`

__Description__: Record video of tests running.

__Type__: *boolean*

__Example__:
```yaml
  record: true
  key: $MY_SECRET_KEY
```

### `key`

__Description__: Secret record key.

__Type__: *string*

__Example__:
```yaml
  record: true
  key: $MY_SECRET_KEY
```

The `record` and `key` fields depend on the cypress `"projectId"` being set in your `cypress.json` file because the value of your `projectId` correlates directly with the value of the `key` field. See [Cypress Project-ID Documentation](https://docs.cypress.io/guides/dashboard/projects.html#Project-ID) for details about how to configure/retrieve the cypress `projectId` or [Cypress Record-Key Documentation](https://docs.cypress.io/guides/guides/command-line.html#cypress-run-record-key-lt-record-key-gt) for details about configuring Record-Key parameters.

:::note
For additional information regarding cypress configurations, please consult the [Cypress documentation](https://docs.cypress.io/guides/references/configuration.html#Options).
:::

## `config`

__Description__: Details specific to the cypress test configuration

__Type__: *object*

__Example__:
```yaml {5}
  suites:
    - name: "Hello"
    browser: "firefox"
    platformName: "Windows 10"
    config:
      env:
        hello: world
      testFiles: [ "**/*.*" ]
```

### `env`

__Description__: Any ephemeral/environment variables needed to run cypress tests.

__Type__:  *string* | *int* | *float* | *boolean*

__Example__:

```yaml
      env:
        hello: world
```

### `testFiles`

__Description__: The specific location of the cypress test files (if not otherwise specified explicitly in `cypress.json`).

__Type__:  *string array* | *string* | *regex*

__Example__:

```yaml
      testFiles: [ "**/*.*" ]
```

repository: brawin-ando/sauce-docs

repo_name: brawin-ando/sauce-docs


text:
---
layout: post
title:  "Installing Ceph on K8s by Helm"
date:   2019-01-02 21:00:00
author:     "Yan"
header-img: "img/the_dark_times_are_coming_by_msdudettes-d5m99ns.jpg"
catalog: true
comments: true
tags:
    - devops
---

This blog is written at Jan 2019. And the k8s and ceph-helm version used are:

- k8s: v1.12.2
- ceph chart: 743a7441ba4361866a6e017b4f8fa5c15e34e640, which is the head of the master branch of [ceph-helm](https://github.com/ceph/ceph-helm).

# What is ceph

In a simple term:

- Ceph is a opensource software storage platform. The core members of ceph have included Canonical, Cisco, Red Hat, Intel e.g.

- Ceph implements object storage and provides object-, block- and file-level storage

# Why helm

Helm is a package management tool for kubernetes. There are basically two parts for Helm, the helm client and tiller.
According to its [documentation](https://docs.helm.sh/using_helm/), Helm is very easy to install to a k8s cluster:

{% highlight bash %}

    #!/bin/bash

    # install helm client
    brew install kubernetes-helm

    # initial Helm
    helm init

    # if you need change the helm repo or for some reason you cannot the offical
    # resource of helm which is hosted by google cloud
    helm init --upgrade -i \
    registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.12.0 \
    --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts \
    --node-selectors "tiller-enabled"="true"

    # upgrade tiller
    helm init --upgrade

    # delete or reinstall tiller
    # besides, most of time, you will don't need delete the helm chart already
    # deployed in the k8s by helm.
    # Those helm-charts will be manageable after the tiller is re-installed
    kubectl delete deployment tiller-deploy --namespace kube-system

    # or run
    helm reset

    # then reinstall tiller.
    helm init
{% endhighlight %}

# Install Ceph by Helm

## 1. Build the ceph-chart

Checking out and building the ceph helm chart is the very first thing the offical tutorial introduced. By reading this [issue](https://github.com/ceph/ceph-helm/issues/64) on the offical ceph helm chart repo, the ceph-helm in official helm repo is very outdated.

{% highlight bash %}

    #!/bin/bash

    # initial a local helm repo
    helm serve &
    helm repo add local http://localhost:8879/charts

    # checkout the ceph helm chart repo, and build
    git clone https://github.com/ceph/ceph-helm
    cd ceph-helm/ceph
    make

{% endhighlight %}

Once above done, the helm will use the local helm chart to install ceph into your k8s.

## 2. Install Ceph Cluster into K8s

Below is a typical ceph config file for k8s:

{% highlight bash %}

    #!/bin/bash

    cat ~/ceph-overrides.yaml
    # network:
    #   public:   <IP_ADDRESS>/16
    #   cluster:   <IP_ADDRESS>/16

    # osd_devices:
    #   - name: dev-sdb
    #     device: /dev/sdb
    #     zap: "1"
    # storageclass:
    #   name: ceph-rbd
    #   pool: rbd
    #   user_id: k8s

    # create namespace for ceph
    kubectl create namespace ceph

    # configure the ceph rbac in k8s by the rbac.yaml in the ceph chart repo
    kubectl create -f ~/ceph-helm/ceph/rbac.yaml

    # label the k8s node for deploying the ceph monitor and ceph manager
    kubectl label node <nodename> ceph-mon=enabled ceph-mgr=enabled

    # label the k8s node for deploying the ceph osd agent and the actual machine
    # contains the hard drive
    kubectl label node <nodename> ceph-osd=enabled ceph-osd-device-dev-sdb=enabled

    # to remove the ceph osd for some reason,
    # you just need delete the ceph-osd-device-dev-sdb=enabled label
    kubectl label node <nodename> ceph-osd-device-dev-sdb-

    # now, deploy ceph cluster by helm
    helm install --name=ceph local/ceph --namespace=ceph -f ceph-overrides.yaml

{% endhighlight %}

Make sure the public and cluster IP are same and covered by the actual host's IP range. Otherwise, the ceph network will not function well.

The `osd_devices` part is used to define the physical hard drive that will be used as the storage device. You must make sure that the hard drive is clean and not contain any partition. Otherwise, you can use the following command to checkout and delete those partitions:

{% highlight bash %}

    #!/bin/bash

    # check/dev/sdb the status of sbd
    lsblk /dev/sdb
    # NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    # vdb    252:16   0  40G  0 disk
    # |-vdb1 252:17   0  35G  0 part
    # `-vdb2 252:18   0   5G  0 part

    # remove the header info by clean the very first 110 mb
    dd if=/dev/zero of=/dev/sdb1 bs=1M count=110 oflag=sync
    dd if=/dev/zero of=/dev/sdb2 bs=1M count=110 oflag=sync

    # delete the partition by parted
    parted /dev/sdb rm 1
    parted /dev/sdb rm 2

{% endhighlight %}

You will need run this every time you reinstall ceph cluster and want ceph to use that hard drive as its storage again.

After you've created the ceph chart, you might have an unhealthy cluster instead of a healthy one in the offical tutorial. Don't worry about this, if it's just unhealthy caused by unactive pgs. for example my one:

![ceph-unhealth.png]({{ site.url }}/img/ceph-unhealth.png)

## 3. Configure the keys for a pod to use PVC

Now we need configure the keys for a pod in a namespace so that it can use the persistent volume claim.

{% highlight bash %}

    #!/bin/bash

    # go to the ceph-mon pod
    kubectl -n ceph exec -ti ceph-mon-cppdk -c ceph-mon -- bash
    # and get the auth key
    ceph auth get-or-create-key client.k8s mon 'allow r' osd \
    'allow rwx pool=rbd'  | base64
    # QVFCLzdPaFoxeUxCRVJBQUVEVGdHcE9YU3BYMVBSdURHUEU0T0E9PQo=
    exit

    # edit the pod to use the key
    kubectl -n ceph edit secrets/pvc-ceph-client-key

    # apiVersion: v1
    # data:
    # key: QVFCLzdPaFoxeUxCRVJBQUVEVGdHcE9YU3BYMVBSdURHUEU0T0E9PQo=
    # kind: Secret
    # metadata:
    # creationTimestamp: 2017-10-19T17:34:04Z
    # name: pvc-ceph-client-key
    # namespace: ceph
    # resourceVersion: "8665522"
    # selfLink: /api/v1/namespaces/ceph/secrets/pvc-ceph-client-key
    # uid: b4085944-b4f3-11e7-add7-002590347682
    # type: kubernetes.io/rbd

    # Create a Pod that consumes a RBD in the default namespace.
    # Copy the user secret from the ceph namespace to default
    kubectl -n ceph get secrets/pvc-ceph-client-key -o json | \
    jq '.metadata.namespace = "default"' | kubectl create -f -
    # secret "pvc-ceph-client-key" created

    # checkout all hte secrets in default namespace
    kubectl get secrets
    # NAME                  TYPE                                  DATA      AGE
    # default-token-r43wl   kubernetes.io/service-account-token   3         61d
    # pvc-ceph-client-key   kubernetes.io/rbd                     1         20s

{% endhighlight %}

## 4. Adjust the Ceph Pool size

It's almost impossible to have a healthy ceph cluster after first installation. Now, let's fix this. First, create a rbd pool:

{% highlight bash %}

    # create a rbd pool
    kubectl -n ceph exec -ti ceph-mon-cppdk -c ceph-mon -- ceph osd pool create rbd 256
    # pool 'rbd' created

    # initial the rbd pool
    kubectl -n ceph exec -ti ceph-mon-cppdk -c ceph-mon -- rbd pool init rbd

{% endhighlight %}

From what I've noticed, the ceph status depends on the osd size and pool size. My ceph cluster has configured two osd at the very beginning but relatively large pool size. And I've tried several times, none of those tries have successful ceph cluster. The main reason is the default pool size isn't proper for a small osd cluster. To adjust the pool size:

{% highlight bash %}

    #!/bin/bash

    # see all the pool's name and it's size
    ceph osd lspools

    # checkout the pool name and its  size
    ceph osd dump | grep 'replicated size'

    # use ceph osd pool set adjust the pool size
    # ceph osd pool set {poolname} size {num-replicas}
    ceph osd pool set .rgw.root size 1
    ceph osd pool set cephfs_data size 1
    ceph osd pool set cephfs_metadata size 1
    ceph osd pool set default.rgw.control size 1
    ceph osd pool set default.rgw.meta size 1
    ceph osd pool set default.rgw.log size 1

{% endhighlight %}

For my cluster, I simply reduce all the pool size to 1 since I only have 2 osd devices. Afterwards, the ceph cluster status should turn to health.

{% highlight bash %}

    #!/bin/bash

    # check ceph status
    kubectl -n ceph exec -ti ceph-mon-xm7df -c ceph-mon -- ceph -s
    # cluster:
    #     id:     9ab761d6-60bd-4197-9513-2dfe47b3cf57
    #     health: HEALTH_OK

    # services:
    #     mon: 1 daemons, quorum k8s-node1
    #     mgr: k8s-node1(active)
    #     mds: cephfs-1/1/1 up  {0=mds-ceph-mds-68c79b5cc-6r54r=up:active}
    #     osd: 2 osds: 2 up, 2 in
    #     rgw: 1 daemon active

    # data:
    #     pools:   7 pools, 198 pgs
    #     objects: 299 objects, 136 MB
    #     usage:   350 MB used, 11163 GB / 11164 GB avail
    #     pgs:     198 active+clean

{% endhighlight %}

## 5. Install Ceph client on host machine

Installing ceph client into the host machine is missing in all the tutorials about installing ceph by Helm. This is because rbd will be used when Kubelet creates and mounts the pvc to the pod. If you you didn't install ceph client, you may see the following errors or similar and the pod will be stucked at Container Creating stage:

```
rbd: Error creating rbd image: executable file not found in $PATH
```

There is no extra configuration needed to be done after installing rbd or ceph-client.

Install `ceph-common` package on to your host machine which has the ceph-mon and ceph-mgr running is all you need.

{% highlight bash %}
#!/bin/bash

yum install python-rbd
yum install ceph-common
{% endhighlight %}

# 6. Test the Ceph cluster

In order to tell if the ceph cluster is working or not, we can create a pvc and mount it to a pod:

{% highlight bash %}

    #!/bin/bash

    # the pvc configuration file
    cat pvc-rbd.yaml
    # kind: PersistentVolumeClaim
    # apiVersion: v1
    # metadata:
    # name: ceph-pvc
    # spec:
    # accessModes:
    # - ReadWriteOnce
    # resources:
    #     requests:
    #     storage: 20Gi
    # storageClassName: ceph-rbd

    # create the pvc
    kubectl create -f pvc-rbd.yaml
    # persistentvolumeclaim "ceph-pvc" created

{% endhighlight %}

Now, the pvc and its pv should be created. Use `kubectl get pvc` and `kubectl get pv` to see the the pvc and the pv.

Next, we want to create a pod use that pvc we just created:

{% highlight bash %}

    #!/bin/bash

    # create a k8s config file
    cat pod-with-rbd.yaml
    # kind: Pod
    # apiVersion: v1
    # metadata:
    # name: mypod
    # spec:
    # containers:
    #     - name: busybox
    #     image: busybox
    #     command:
    #         - sleep
    #         - "3600"
    #     volumeMounts:
    #     - mountPath: "/mnt/rbd"
    #         name: vol1
    # volumes:
    #     - name: vol1
    #     persistentVolumeClaim:
    #         claimName: ceph-pvc

    # create the pod
    kubectl create -f pod-with-rbd.yaml
    # pod "mypod" created

{% endhighlight %}

# 7. Managing Kubernetes and its network

By the time you create the pod, you may see the container is stucked at conatiner creating stage. And the log could say something like:

```
can not resolve ceph-mon.ceph.svc.cluster.local
```

Remember we've installed the ceph onto the host machine and the rbd on host will be invoked by kubelet during pod creation. The host machine is trying to reach the ceph monitor node and failed since it's actually in the k8s cluster to use the kube-dns. There are few ways to fix this. One is add the kube-dns svc endpoint to `/etc/resolv.conf` as a dns service. Or add the domain mapping to the `/etc/hosts` to my node's host machine.

```
<IP_ADDRESS> ceph-mon.ceph.svc.cluster.local
```
However, the second way is not secure as if the ceph-mon is restart or the IP is changed inside k8s cluster. The ceph cluster will be broke.

After fixing the dns issue, the `cannot resolve ceph-mon.ceph.svc.cluster.local` should be gone. But I see another one which is:

```
timeout expired waiting for volumes to attach/mount for pod :
Error syncing pod 096ac42b-919a-11e8-bd1d-fa163eaae838
("mypod_ceph(096ac42b-919a-11e8-bd1d-fa163eaae838)"), skipping:
timeout expired waiting for volumes to attach/mount for pod
"ceph"/"mypod". list of unattached/unmounted volumes=[vol1]
```

The offical tutorial has documented the reason, which is:

```
Kubernetes uses the RBD kernel module to map RBDs to hosts.
 Luminous requires CRUSH_TUNABLES 5 (Jewel). The minimal kernel
 version for these tunables is 4.5.  It's caused by the ceph helm chart is using a old version of luminous image.

# Conclusion

Above is all you need to do for using helm install ceph.

# Delete Ceph cluster

Delete ceph with helm will open another worm can. When you run `helm delete --purge ceph`, two extra one-time pod will be started to delete all keys that ceph created. However, if you run `find / -name "*ceph*"`, you will see there are some leftover that the helm didn't managed well:

```
...
/var/lib/ceph-helm
/var/lib/ceph-helm/ceph
/var/lib/ceph-helm/ceph/mon/bootstrap-osd/ceph.keyring
/var/lib/ceph-helm/ceph/mon/bootstrap-mds/ceph.keyring
/var/lib/ceph-helm/ceph/mon/bootstrap-rgw/ceph.keyring
...

```

Those keys will be a blocker for your brand new ceph cluster trying to communicate to each other. So we have delete them manually everytime if we want to re-install ceph by helm.

Also, you may need remove the partition listed in step 2 when a harddrive is reused.

# Reference

- [Ceph at Wikipedia](https://en.wikipedia.org/wiki/Ceph_(software))
- [Installation (Kubernetes + Helm)](http://docs.ceph.com/docs/mimic/start/kube-helm/)
- [Installing Helm](https://github.com/helm/helm/blob/master/docs/install.md)
- [跟我学 K8S--运维: helm 安装 ceph 到 kubernetes 集群](https://segmentfault.com/a/1190000015806843)
- [ceph-helm](https://github.com/ceph/ceph-helm)

extension: markdown


text:
Website update instructions:

Note: at some point, read:
* https://www.digitalocean.com/community/tutorials/how-to-set-up-uwsgi-and-nginx-to-serve-python-apps-on-ubuntu-14-04
* https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
* https://www.digitalocean.com/community/tutorials/how-to-deploy-python-wsgi-applications-using-uwsgi-web-server-with-nginx

# Update HTML/CSS files on website:

1. Update files in `development/personal_website` locally
2. Use `update_website` commmand
3. Full command: `scp -r -i ~/.ssh/Lucia_2.pem.txt ~/personal_website/* ec2-user@ec2-54-90-232-170.compute-1.amazonaws.com:/home/ec2-user/weidman`

# Update Flask app:

## Test locally:

1. `cd development/personal_website/wsgi-scripts`
2. python3 routes.py
3. Fix errors

## When ready to run on website:

1. Upload files to website following steps above

### Restart server:

1. `ps aux | grep uwsgi`
2. `kill -9 <pid>`
3. `cd ~/weidman/wsgi-scripts/`
4. `source ~/weidman/venv/bin/activate` - here you can `pip install` packages
if you need to
5. `uwsgi --socket <IP_ADDRESS>:8080 --wsgi-file routes.py --callable app`


text:
---
layout: common-errors
title: Cannot perform more than one GSI creation or deletion in a single update
image: /assets/social-cards/common-errors.png
description: Cannot perform more than one GSI creation or deletion in a single update.
---

#### Error Message

> Cannot perform more than one GSI creation or deletion in a single update.

#### Problem

This error occurs when you try to:

- create a DynamoDB table with more than one Global Secondary Index (GSI); or
- add or remove more than one GSI for an existing table

This implies that you can only perform one GSI creation/deletion for a given table per  `serverless deploy`.

#### Solution

A work around would be to break up your changes to only perform one GSI update at a time.

For example, if you need to add a GSI and also remove one in a table, try the following:

1. Add the first GSI and run `serverless deploy`
2. Wait for the GSI to be created and for it to show an `Active` status
3. Remove the second GSI and run `serverless deploy` again

Note that, the second step can take longer for existing tables with large number of rows, as DynamoDB backfills the index.

repository: seed-run/homepage

gha_language: SCSS

repo_name: seed-run/homepage


text:
# Changelog

## 2.x Series

### 2.2.1
##### 2021-09-11

- Alignment to rest of Vanilo 2.2 modules
- Changed internal CS ruleset from PSR-2 to PSR-12
- Added strict type checking, fixed errors it brought to surface
- Improved the Documentation
- Dropped PHP 7.3 support

### 2.2.0
##### 2020-12-31

> 2.2.0 is actually **part of Vanilo 2.1 series**, but because of semver... 🤷

- Added PHP 8 support
- Added `Order::findByNumber()` method
- Added unique index to `orders.number` field
- Changed the internal implementation of the nanoid order number generator to utilize the generic
  nanoid generator from the support module
- Changed CI from Travis to Github
- Only works with Vanilo 2.1+ modules

### 2.1.1
##### 2020-10-28

- Fixed invalid method call in `Order::open()` scope (introduced with 2.1.0)

### 2.1.0
##### 2020-10-28

- Added `isOpen` and `getOpenStatuses` methods to OrderStatus
- Added the `open()` scope to orders for retrieving open orders

### 2.0.0
##### 2020-10-11

- BC: Updated interfaces to v2
- BC: Upgrade to Enum v3
- Added nanoid order number generator
- Added Laravel 8 Support
- Dropped PHP 7.2 support
- Dropped Laravel 5 Support

## 1.x Series

### 1.2.0
##### 2020-03-29

- Added Laravel 7 Support
- Added PHP 7.4 support
- Dropped PHP 7.1 support

### 1.1.0
##### 2019-11-25

- Added Laravel 6 Support

### 1.0.0
##### 2019-11-11

- Version bump only, no new features

## 0.5 Series

### 0.5.2
##### 2019-08-25

- Added the [Laravel Migration Compatibility v1.0](https://konekt.dev/migration-compatibility/1.0/README) package to properly solve the Laravel 5.8 + bigInt problem.

### 0.5.1
##### 2019-03-17

- Complete Laravel 5.8 compatibility (likely works with 0.4.0 & 0.5.0 as well)
- PHP 7.0 support has been dropped

### 0.5.0
##### 2019-02-11

- No change, version bumped for v0.5 series

## 0.4 Series

### 0.4.0
##### 2018-11-12

- Laravel 5.7 compatible
- Tested with PHP 7.3
- Removed vanilo/address dependency
- New events: `OrderWasCancelled` and `OrderWasCompleted`

## 0.3 Series

### 0.3.0
##### 2018-08-15

- Adjusted to Vanilo v0.3 series

## 0.2 Series

### 0.2.2
##### 2018-04-01

- Fixed a bug introduced with v0.2.1 that prevented from submitting an order with OrderFactory

### 0.2.1
##### 2018-02-22

- Custom Order and OrderItem attributes can be mass assigned (without extending the model classes)

### 0.2.0
##### 2018-02-19

- Laravel 5.6 compatible

## 0.1 Series

### 0.1.2
##### 2017-12-17

- Billing Address => Billpayer
- Billpayer implemented here (temporary, should be moved in upcoming `billing` module)
- Order factory works
- Basic totals can be calculated
- Order statuses have proper labels
- Orders are soft delete

### 0.1.1
##### 2017-12-11

- Composer dependency fix (for subsequent modules)

### 0.1.0
##### 2017-12-11

- 🚀

repository: Gellish/framework

repo_name: Gellish/framework


text:
# SQL - CREATE EDGE

This command creates a new Edge into the database. Edges, together with Vertices, are the main components of a Graph. OrientDB supports polymorphism on edges. The base class is "E". Look also how to [Create Vertex](SQL-Create-Vertex.md).

Before 2.1, if no edges were created, no error was thrown. Starting from 2.1, instead, if no edges are created, an `OCommandExecutionException` exception is thrown. This makes easier to use `CREATE EDGE` in transactions where if source or target vertices doesn't exist the entire transaction is rolled back.

## Syntax

```sql
CREATE EDGE <class> [CLUSTER <cluster>] FROM <rid>|(<query>)|[<rid>]* TO <rid>|(<query>)|[<rid>]*
                    [SET <field> = <expression>[,]*]|CONTENT {<JSON>}
                    [RETRY <retry> [WAIT <pauseBetweenRetriesInMs]]
```

Where:
- **class**, is the Edge's class name, or "E" if you don't use sub-types
- **cluster**, is the cluster name where to physically store the edge
- **JSON**, is the JSON content to set as record content, instead of field by field
- **retry**, is the number of retries in case of conflict (optimistic approach)
- **pauseBetweenRetriesInMs**, are the milliseconds of delay between retries

## Control vertices version increment
Creation and deletion of edges cause updating of versions in involved vertices. To avoid this behavior use [Bonsai structure](RidBag.md). By default [Bonsai](RidBag.md) is used as soon as the threshold is reached to optimize operations. To always use Bonsai, set this configuration on JVM (or in `orientdb-server-config.xml` file):

```
-DridBag.embeddedToSbtreeBonsaiThreshold=-1
```
Or in Java by calling this before opening the database:

```java
OGlobalConfiguration.RID_BAG_EMBEDDED_TO_SBTREEBONSAI_THRESHOLD.setValue(-1);
```

For more information look at [Concurrency on adding edges](Concurrency.md#concurrency-on-adding-edges).

| ![NOTE](images/warning.png) | _NOTE: While running as distributed, edge creation could be done in two steps (create+update). This could break some constraint defined at Edge's class level. To avoid this kind of problem disable the constrains in Edge's class. While running in distributed mode SBTrees are not supported. If using a distributed database then you must set `ridBag.embeddedToSbtreeBonsaiThreshold=Integer.MAX\_VALUE` to avoid replication errors._ |
|----|----|

## Examples

### Create a new edge between two vertices of the base class 'E'

```sql
CREATE EDGE FROM #10:3 TO #11:4
```

### Create a new edge type and a new edge of the new type

```sql
CREATE CLASS E1 EXTENDS E
CREATE EDGE E1 FROM #10:3 TO #11:4
```

### Create a new edge in a particular cluster

```sql
CREATE EDGE E1 CLUSTER EuropeEdges FROM #10:3 TO #11:4
```

### Create a new edge setting properties

```sql
CREATE EDGE FROM #10:3 TO #11:4 SET brand = 'fiat'
```

### Create a new edge of type E1 setting properties

```sql
CREATE EDGE E1 FROM #10:3 TO #11:4 SET brand = 'fiat', name = 'wow'
```
### Create new edges of type Watched between all the action Movies and me using sub-queries

```sql
CREATE EDGE Watched FROM (SELECT FROM account WHERE name = 'Luca') TO (SELECT FROM movies WHERE type.name = 'action')
```

### Create an edge with JSON content
```sql
CREATE EDGE E FROM #22:33 TO #22:55 CONTENT { "name" : "Jay", "surname" : "Miner" }
```

## History and compatibility

- 1.1: first version
- 1.2: the support for query and collection of RIDs in FROM/TO
- 1.4: the command uses the Blueprints API under the hood, so if you're working in Java using the OGraphDatabase API you could experience in some difference how edges are managed. To force the command to work with the "old" API change the GraphDB settings described in [Graph backward compatibility](SQL-Alter-Database.md#use-graphdb-created-with-releases-before-14)
- 2.0: New databases have [Lightweight Edges](Lightweight-Edges.md) disabled by default, so this command creates regular edges.

To know more about other SQL commands look at [SQL commands](SQL.md).


text:
# gcp-data-drive
GCP Data Drive leverages a composable url path to retrieve data in JSON formats from supported GCP data platforms. Bigquery and Firestore are currently supported.

## Installation
Clone this repo. Change directory to gcp-data-drive.
```bash
git clone https://github.com/GoogleCloudPlatform/DIY-Tools
cd DIY-Tools/gcp-data-drive
```

### Deploy to multiple compute platforms
[Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstarts) must be installed and initialized to preform these actions. Edit the PROJECT_ID variable as required.

#### Cloud Run
```bash
PROJECT_ID=YourProjectID
gcloud builds submit --config cloudbuild_run.yaml \
--project $PROJECT_ID --no-source \
--substitutions=_GIT_SOURCE_BRANCH="master",_GIT_SOURCE_URL="https://github.com/GoogleCloudPlatform/DIY-Tools"
```

#### Cloud Functions
```bash
PROJECT_ID=YourProjectID
gcloud builds submit --config cloudbuild_gcf.yaml \
--project $PROJECT_ID --no-source \
--substitutions=_GIT_SOURCE_BRANCH="master",_GIT_SOURCE_URL="https://github.com/GoogleCloudPlatform/DIY-Tools"
```

#### Appengine
:warning: Edit the deploy script and app.yaml for your needs. Used as is, the command below will deploy and new version of the default App Engine service. Fork this repo to customize your app.yaml configuration.

```bash
PROJECT_ID=YourProjectID
gcloud builds submit  --config cloudbuild_appengine.yaml \
--project $PROJECT_ID --no-source \
--substitutions=_GIT_SOURCE_BRANCH="master",_GIT_SOURCE_URL="https://github.com/GoogleCloudPlatform/DIY-Tools"
```

## Web API Composition
Each web api is composed by a drive navigation pattern.
https://{host}/{platform}/{gcp_project}/{param1}/param2}...

## Examples

### Bigquery
Assuming projectid of testbqproject in Bigquery dataset mybqviews with a view name of coolnumbersview cloud be accessed via the following gcp-data-drive path:
https://{host}/bq/testbqproject/mybqviews/collnumbersview

### Firestore
Assuming projectid of testfsproject in Firestore collection firstcollection in document firstdocument with collection mydocs all documents would be returned with following gcp-data-drive path:
https://{host}/fs/testfsproject/firstcollection/firstdocument/mydocs

A single document can also be accessed with the following:
https://{host}/fs/testfsproject/firstcollection/firstdocument/mydocs/12345

## Authentication
When deployed on App Engine, the app engine default service account must be granted Bigquery read and Bigquery create job permission. These settings are the default if the App Engine service and Firestore or Bigquery are in the same project.

repository: GoogleCloudPlatform/DIY-Tools

gha_language: Go

repo_name: GoogleCloudPlatform/DIY-Tools


text:
# Command line switches #

There are many settings that can be customized through Chromium command line switches. These switches can only be set programmatically by passing a dictionary of switches as a second argument to [cefpython](cefpython).Initialize(applicationSettings, commandLineSwitches). The `commandLineSwitches param` is a dictionary with switch name as a key. The switch name should not contain the "-" or "--" prefix, otherwise it will be ignored. Switch value may be an empty string, if the switch doesn't require a value. These switches are set for the main process and all subprocesses. See the description of the [cefpython](cefpython).Initialize() function to see how to preview the final command line strings formed by CEF.

There are two types of switches, Chromium switches and CEF switches:
  * An assembled list of all Chromium switches can be found on this webite: [peter.sh/experiments/chromium-command-line-switches](http://peter.sh/experiments/chromium-command-line-switches/)
  * A list of all CEF switches can be found in [cef\_switches.cc](https://bitbucket.org/chromiumembedded/cef/src/master/libcef/common/cef_switches.cc)

Some of the switches in Chromium are experimental, and may crash application if used inappropriately.

When debbugging is On, the whole command line string will be displayed in console, with both CEF switches set internally, and the ones appended by cefpython. On Linux you will also see in console the command line string for subprocesses. On Windows, command line strings for subprocesses won't be seen in console, you can view them by opening the debug.log file. Example command line strings from debug logs, for the main process and the renderer process:

```text
# Main process
python --browser-subprocess-path="C:\cefpython\cefpython\cef3\windows\binaries
/subprocess" --lang=en-US --log-file="C:\cefpython\cefpython\cef3\windows
\binaries\debug.log" --log-severity=info --enable-release-dcheck
--no-sandbox wxpython.py

# Renderer process
"C:\cefpython\cefpython\cef3\windows\binaries/subprocess" --type=renderer
--no-sandbox --lang=en-US --lang=en-US --log-file="C:\cefpython\cefpython\
cef3\windows\binaries\debug.log" --log-severity=info --enable-release-dcheck
--channel="4152.0.209609692\1183564454" /prefetch:673131151
```

## Example switches ##

### enable-media-stream ###

To enable media (WebRTC audio/video) streaming set the "enable-media-stream" CEF switch. This will enable the `getUserMedia` function in javascript.

### proxy-server ###

To set custom proxy set the "proxy-server" Chromium switch to "socks5://<IP_ADDRESS>:8888" for example. See also [Proxy Resolution](https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-proxy-resolution) page.

### no-proxy-server ###

By default Chromium uses the IE proxy settings (set in Internet Explorer options), to disable that set the "no-proxy-server" Chromium switch. See also [Proxy Resolution](https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-proxy-resolution) page.

### disable-gpu ###

Disable GPU rendering and switch to CPU software rendering. This flag can fix the [black/white browser screen](KnowledgeBase) issue.

## Chromium switches by category ##

The peter.sh website should list all Chromium switches that are assembled from many Chromium files. Though, some switches may be missing there. Here is a list (in some way categorized) of all Chromium source files that define switches (list assembled on January 16, 2014):

  * [apps/switches.cc](https://src.chromium.org/svn/trunk/src/apps/switches.cc)
  * [ash/ash\_switches.cc](https://src.chromium.org/svn/trunk/src/ash/ash_switches.cc)
  * [base/base\_switches.cc](https://src.chromium.org/svn/trunk/src/base/base_switches.cc)
  * [cc/base/switches.cc](https://src.chromium.org/svn/trunk/src/cc/base/switches.cc)
  * [chrome/common/chrome\_switches.cc](https://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc)
  * [components/autofill/core/common/autofill\_switches.cc](https://src.chromium.org/svn/trunk/src/components/autofill/core/common/autofill_switches.cc)
  * [components/nacl/common/nacl\_switches.cc](https://src.chromium.org/svn/trunk/src/components/nacl/common/nacl_switches.cc)
  * [content/public/common/content\_switches.cc](https://src.chromium.org/svn/trunk/src/content/public/common/content_switches.cc)
  * [google\_apis/gaia/gaia\_switches.cc](https://src.chromium.org/svn/trunk/src/google_apis/gaia/gaia_switches.cc)
  * [gpu/command\_buffer/service/gpu\_switches.cc](https://src.chromium.org/svn/trunk/src/gpu/command_buffer/service/gpu_switches.cc)
  * [ipc/ipc\_switches.cc](https://src.chromium.org/svn/trunk/src/ipc/ipc_switches.cc)
  * [media/base/media\_switches.cc](https://src.chromium.org/svn/trunk/src/media/base/media_switches.cc)
  * [ppapi/shared\_impl/ppapi\_switches.cc](https://src.chromium.org/svn/trunk/src/ppapi/shared_impl/ppapi_switches.cc)
  * [ui/base/ui\_base\_switches.cc](https://src.chromium.org/svn/trunk/src/ui/base/ui_base_switches.cc)
  * [ui/base/ui\_base\_switches\_util.cc](https://src.chromium.org/svn/trunk/src/ui/base/ui_base_switches_util.cc)
  * [ui/compositor/compositor\_switches.cc](https://src.chromium.org/svn/trunk/src/ui/compositor/compositor_switches.cc)
  * [ui/gfx/switches.cc](https://src.chromium.org/svn/trunk/src/ui/gfx/switches.cc)
  * [ui/gl/gl\_switches.cc](https://src.chromium.org/svn/trunk/src/ui/gl/gl_switches.cc)
  * [ui/keyboard/keyboard\_switches.cc](https://src.chromium.org/svn/trunk/src/ui/keyboard/keyboard_switches.cc)


text:
# how to use raster with cartodb.js

The way to add a raster layer to your map with cartodb.js is similar to add a regular cartodb layer,
as everything in CartoDB it uses ``SQL`` + ``CartoCSS``

## introduction to raster

In [mapschool](http://mapschool.io/) you have a very good introduction to the basis of raster. Here
we are going to explain how raster works in CartoDB.

Raster usually takes a lot of space in the database and therefore render tiles is a heavy task.
Luckily CartoDB solved this for you, when you import a raster using the editor or the [Import
API](http://docs.cartodb.com/cartodb-platform/import-api.html) it generates a series of overviews,
that's it, a bunch of tables with preprocessed information in order to speedup rendering.

You don't need to care about that but there are special cases you should be aware of when you create
a raster based visualization

##  creating a layer

As always a layer is created using ``createLayer`` method:

```
cartodb.createLayer(map, {
  user_name: 'doc',
  type: 'cartodb',
  sublayers: [{
     sql: 'select * from pop',
     cartocss: '#pop { raster-opacity: 1.0; }',
     raster: true,
  }],
  no_cdn: true
})
.addTo(map)
```

The only special thing here is the ``raster`` flag, that tells Maps API that you are going to use a
raster table so all the optimizations and so on are enabled

## working the the layer

Change CartoCSS and so on it's the same than working with a regular layer, you can use methods like
``setCartoCSS``:

```
layer.getSubLayer(0).setCartoCSS('#layer {..... }');
```

You can also use ``setSQL`` but if you use a query different than the identity (select * from table)
the raster optimizations are not going to work and you will get a timeout depending on the zoom
level you are working on.

## using SQL for analysis

You can also access raster tables using SQL API  though cartodb.js, the following example gets the
average value for a raster in a radius of 100 meters with center in latlng 0, 0

```
 var sql = new cartodb.SQL({ user: 'doc' });
 var query = "SELECT avg((stats).mean) as m from (select st_summarystats(the_raster_webmercator, 1) as stats from pop where st_intersects(the_raster_webmercator, st_transform(st_buffer(cdb_latlon(0, 0)::geography, 100)::geometry, 3857) as foo";

 sql.execute(q).done(function(data) {
    if (data.rows && data.rows.length > 0) {
        console.log("Average raster value inside the " + type + ": " + data.rows[0].m);
    }
```

don't forget to use ``the_raster_webmercator`` column.

## limitations

- changing the SQL to something custom could avoid Maps API to use overviews and not rendering the
  tiles due to timeout
- cartocss version should be 2.3.0. You usually don't need to do anything but if you are working
  with specific versions take this into account
- interaction does not work for rasters

branch_name: refs/heads/develop


text:
---
title: Purchase and Approval Flow Example
---

In this purchase and approval flow example, we make use of the new buyer and approver that were set up with your new organization.

***

**Table of Contents**

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

***

## Purchase Flow Example

In these steps, we are working with John Doe, the new buyer that we created in previous steps of this tutorial.

In this example, we'll purposely order something over the purchase limit so that we can see the approval process in action.

1. In a separate browser, or using a private browser window, log in to the Powertools site as your buyer (for example, John Doe).

   **Note:** If you try to log in using the same browser, you will lose the administrator browser session.

2. Add products to the cart until the total is over $500, and then start the checkout process.

   **Note:** The approval process will only be triggered if the purchase amount surpasses the purchase limits you have created. In this tutorial, we created a per-order limit of $500 for the buyer.

3. For the payment method, select **Account**, and then click **Continue**.

4. Select a cost center and shipping address, and then click **Continue**.

5. Select a delivery mode, and then click **Continue**.

   The **Review Order** page is displayed.

6. Select the terms and conditions check box, and then click **Place Order**.

The order is now held.

Because the order is over $500, the order is placed, but it is held for approval by the buyer's organization.

To see that an order is being held, display your order history. Wait a few moments for the back end to start the order flow. The order status starts out as **Created** but eventually you will see **Pending** and an approval table at the bottom of the order. The following is an example:

You can see the reason why an order is held under the **Permission** heading. In this case, the order was held because the total cost of the order exceeded the per-order limit. You can also see who the approver is.

## Approving the Order

To review the order, the approver that was created earlier in this tutorial must log in. You might want to do this in yet another browser so that you can see the status of the order before and after approval.

In these steps, we are working with Tommy Durang, the new approver that we created in previous steps of this tutorial.

1. Log in to the Powertools site as your approver (for example, Tommy Durang).

2. Click the **My Account** menu, and then click **Approval Dashboard**.

   The list of orders requiring approval is displayed, as shown in the following example:

3. Click the order number for the order that requires approval.

   The entire order is displayed in the same way that the buyer would see it, but with the addition of an approval section at the top. The following is an example:

4. Click **Approve Order**.

   The **Order Approval** screen is displayed, as shown in the following example:

   You can enter a comment if you wish.

5. To submit the approval, click **Approve**.

   The order can now proceed.

   If John Doe checks the order after approval, he can see that the approval table has been updated with the confirmation that the order was approved, along with the comment. The same would appear if the order were rejected. The following is an example:

repository: SAP/spartacus-docs

repo_name: SAP/spartacus-docs


text:
---
usemathjax: true
---

A *factorial function* $f:N \to Z^{+}$ or $f(n) = n!$ is the product of first n positive integers. Also, $f(0) = 0! = 1$

repository: bovem/digital-garden-jekyll-template

gha_license_id: NOASSERTION

repo_name: bovem/digital-garden-jekyll-template


text:
# Dart Apexcharts

A Dart API for [APEXCHARTS](https://apexcharts.com/) using dart:js.

## Usage

To understand usage, see the example source code and the corresponding output.

## Features and bugs

Please file feature requests and bugs at the [issue tracker][tracker].

[tracker]: https://github.com/mdemyanov/dart_apex_charts/issues

## License

ApexCharts is released under MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact.

repository: instance-id/gclone-flutter

repo_name: instance-id/gclone-flutter


text:
# Udacity: AI Programming With Python Nanodegree
This nanodegree introduces students to Python, Numpy, Pandas, Matplotlib, Linear Algebra, Neural Networks, and Pytorch.

This repo contains two projects:

- Lab Exercise: Image Classification for a City Dog Show

- Final Project: Flower Classification - image classification using Pytorch

repository: aimeeu/Udacity-AIProgrammingWithPython

repo_name: aimeeu/Udacity-AIProgrammingWithPython


text:
---
layout: blog
title: "Free Skin Cancer Screening 9/27"

---

The Rutherford Health Department will be conducting a Free Skin Cancer
Screening Program for Rutherford residents on **Thursday, September 27,
2018 between the hours of 12:00 – 2:00 PM** at the Health Department,
184 Park Avenue, Rutherford, NJ.

Preethi Ramaswamy, MD a board
certified dermatologist who specializes in the diagnosis and treatment of
skin cancers will be performing the screening.
One in five Americans will be diagnosed with skin cancer in the course of
a lifetime. Skin cancer is curable if diagnosed early.

Melanoma, an aggressive form of skin cancer is rising among young men and women
between the ages of 20 and 39. If you have moles that are irregular and
are changing in shape, size or color, please participate in the skin cancer
screening event. Appointments are required for the screening.

Those interested in attending this program and/or obtaining more
information can contact the Public Health Nurses at<PHONE_NUMBER>
between 8:30 and 4:00 PM Monday through Friday.

branch_name: refs/heads/beta


text:
# Hacker News Favorites NLP Analysis

## Introduction

If you are reading this probably you know Hacker News, an aggregation platform for computer science, start-ups, etc. It was created and maintained by __Y Combinator Startup Accelerator__.

## Installation and usage

1. Python environment

```bash
git clone ...
cd ...
virtualenv .venv
. .venv/bin/activate
pip install -r requirements.txt
```
2. Selenium Chrome webdriver

We use Chrome backend for Selenium in headless mode.
[https://sites.google.com/a/chromium.org/chromedriver/downloads](Download) the `chromedriver` version for your Chrome and install in "contrib" subfolder.

3. Just execute jupyter-lab

```bash
jupyter-lab
```

## License

MIT License

repository: jmrobles/hn-favorites-topic-modelling

repo_name: jmrobles/hn-favorites-topic-modelling


text:
---
title: RoseHosting
localname: rose.dev
twig_first: true
process:
    twig: true
ssh_port: '7022'
taxonomy:
    category: docs
---

Back in 2001, [RoseHosting](https://www.rosehosting.com) was the first and only company in the world to offer commercial Linux virtual servers.  Now they offer a wide range of Linux hosting packages, including **Linux VPS** powered by enterprise **SSD Storage**. All their hosting plans are **fully managed** and include **free 24/7 support**, so they can install and set up Grav for you for free.

![](rosehosting-home.png?classes=center)

Navigate to their [Linux VPS Hosting](https://www.rosehosting.com/linux-vps-hosting.html) page and **choose a VPS hosting plan** that suits you the most. You can even create a custom VPS based on your needs. For this guide, we'll be using the smallest plan, 'SSD 1 VPS'.

![](rosehosting-plans.png?classes=center)

After you enter your existing domain name's information or order a new one, you'll be taken to the **Product Configuration** page where you can choose your billing cycle and the OS you want to use. For this guide we'll be using **Ubuntu 18.04 LTS**. You can get an additional DNS service for free and order addons like WHM/cPanel and Softaculous. Their support team can install Webmin or any other application on your VPS for free. Confirm the order information and billing information and submit it.

Your order will be processed and confirmed, after which you will receive an e-mail with information about your VPS. You will get an SSH login and password with **full root access**.

---

[plugin:content-inject](/webservers-hosting/vps/ubuntu-18.04)

repository: getgrav/grav-learn

repo_name: getgrav/grav-learn


text:
### [CVE-2014-1884](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1884)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Apache Cordova 3.3.0 and earlier and Adobe PhoneGap 2.9.0 and earlier on Windows Phone 7 and 8 do not properly restrict navigation events, which allows remote attackers to bypass intended device-resource restrictions via content that is accessed (1) in an IFRAME element or (2) with the XMLHttpRequest method by a crafted application.

### POC

#### Reference
- http://packetstormsecurity.com/files/124954/apachecordovaphonegap-bypass.txt
- http://seclists.org/bugtraq/2014/Jan/96
- http://www.cs.utexas.edu/~shmat/shmat_ndss14nofrak.pdf

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve


text:
# Open Bandit Pipeline Examples

This page contains a list of example codes written with the Open Bandit Pipeline.

- [`obd/`](./obd/): example implementations for evaluating standard off-policy estimators with the small sample Open Bandit Dataset.
- [`synthetic/`](./synthetic/): example implementations for evaluating several off-policy estimators with synthetic bandit datasets.
- [`multiclass/`](./multiclass/): example implementations for evaluating several off-policy estimators with multi-class classification datasets.
- [`online/`](./online/): example implementations for evaluating Replay Method with online bandit algorithms.
- [`opl/`](./opl/): example implementations for comparing the performance of several off-policy learners with synthetic bandit datasets.
- [`quickstart/`](./quickstart/): some quickstart notebooks to guide the usage of the Open Bandit Pipeline.

repository: Minyus/zr-obp

repo_name: Minyus/zr-obp


text:
# Crypto Challenge Set 3

This is the next set of **block cipher cryptography challenges** (even
the randomness stuff here plays into block cipher crypto).

This set is **moderately difficult**. It includes a famous attack
against CBC mode, and a "cloning" attack on a popular RNG that can be
annoying to get right.

We've also reached a point in the crypto challenges where all the
challenges, with one possible exception, are valuable in breaking
real-world crypto.

17. [The CBC padding oracle](https://github.com/wasamasa/cryptopals/blob/master/03/17.md)
18. [Implement CTR, the stream cipher mode](https://github.com/wasamasa/cryptopals/blob/master/03/18.md)
19. [Break fixed-nonce CTR mode using substitutions](https://github.com/wasamasa/cryptopals/blob/master/03/19.md)
20. [Break fixed-nonce CTR statistically](https://github.com/wasamasa/cryptopals/blob/master/03/20.md)
21. [Implement the MT19937 Mersenne Twister RNG](https://github.com/wasamasa/cryptopals/blob/master/03/21.md)
22. [Crack an MT19937 seed](https://github.com/wasamasa/cryptopals/blob/master/03/22.md)
23. [Clone an MT19937 RNG from its output](https://github.com/wasamasa/cryptopals/blob/master/03/23.md)
24. [Create the MT19937 stream cipher and break it](https://github.com/wasamasa/cryptopals/blob/master/03/24.md)

license: Unlicense

repository: adelapie/cryptopals

repo_name: adelapie/cryptopals


text:
Data can be stored here, but remember that Github has a repository limit of 1GB. Only store small original data sources here - ask Neal for help with large files so they can be stored on Amazon S3.

### PresCat_Export_20160401
A (slightly) old version of the Preservation Catalog, our core data source of affordable housing buildings in DC. See the data dictionary in the folder itself for details.

repository: timfoley/housing-insights

branch_name: refs/heads/dev

repo_name: timfoley/housing-insights


text:
---
hrs_structure:
  division: '1'
  volume: '7'
  title: '20'
  chapter: '356'
  section: ''
type: chapter
tags:
  - Government
menu:
  hrs:
    identifier: HRS0356
    parent: title20
    name: Chapter 356 Hawaii Housing Authority; Low Income Housing--Repealed
weight: 40000
title: Hawaii Housing Authority; Low Income Housing--Repealed
full_title: Chapter 356 Hawaii Housing Authority; Low Income Housing--Repealed
---
**CHAPTER 356**

**HAWAII** **HOUSING AUTHORITY;**

**LOW INCOME HOUSING**

**REPEALED.** L 1997, c 350, §18.

Cross References

For present provisions, see chapter 356D.

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
---
hrs_structure:
  division: '1'
  volume: '3'
  title: '11'
  chapter: '147'
  section: 147-23
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0147-0023
    parent: HRS0147
    name: 147-23 Prohibited acts
weight: 40070
title: Prohibited acts
full_title: 147-23 Prohibited acts
---
**§147-23 Prohibited acts.** (a) No commercial exporter shall ship any fresh or processed agricultural commodities to points outside the State unless such products meet the quality, condition, and labeling requirements of the rules adopted under this part.

(b) No Hawaii-grown coffee beans shall be shipped outside the area of their geographic origin to any point within the State or outside the State unless the coffee bean package containing the beans has been marked with or contains documentation of geographic origin approved by the department. [L 1955, c 258, §5; RL 1955, §22-23; am L 1959, c 267, §1; [HRS §147-23](/title-11/chapter-147/section-147-23/); am L 1983, c 257, pt of §5; am L 1985, c 5, §2; am L 1997, c 345, §4; am L 2012, c 328, §5]

Cross References

False labeling of Hawaii-grown coffee, see §708-871.5.


text:
---
name: Feature Request
about: Suggest a new feature or change for the project.
labels: enhancement, needs vetted
---
<!--- Provide a general summary of the issue in the Title above -->
# Expected Behavior
<!--- Tell us how it should work, what do you expect to happen, etc. -->

# Context
<!--- How has this affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

# Possible Solution (optional)
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

# Acceptance Criteria
<!-- Tell us what specific criteria you need to meet to consider this fixed. -->
- [ ]
- [ ]

repository: dolosse/dolosse

repo_name: dolosse/dolosse


text:
# copy_folder_to_another_repo_action
This GitHub Action copies a folder from the current repository to a location in another repository

# Example Workflow
    name: Push File

    on: push

    jobs:
      copy-file:
        runs-on: ubuntu-latest
        steps:
        - name: Checkout
          uses: actions/checkout@v2

        - name: Pushes test folder
          uses<EMAIL_ADDRESS>          env:
            API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
          with:
            source_folder: 'test_files'
            destination_repo: 'dmnemec/release-test'
            destination_folder: 'test-dir'
            user_email<EMAIL_ADDRESS>            user_name: 'dmnemec'
            commit_msg: '[GHA] Update the test files.'

# Variables
* source_folder: The folder to be moved.
* destination_repo: The repository to place the folder in.
* destination_folder: [optional] The folder in the destination repository to place the file in, if not the root directory.
* user_email: The GitHub user email associated with the API token secret.
* user_name: The GitHub username associated with the API token secret.
* destination_branch: [optional] The branch of the source repo to update, if not master.
* commit_msg: [optional] The commit message to use.

# Behavior Notes
The action will remove the destionation folder before recreating it to place any copied files in it.


text:
---

type: "copy"
name: "homepage__commitment"
title: "Our Commitment"

---

We are a family owned and local service business, and because of that, customer satisfaction is our first priority and is the key to our success. We will never forget that. As your service provider:

* We promise you will receive the finest quality repairs available

* Honest recommendations and fair prices and repair estimates are our policy

* We are ready and willing to answer all your questions concerning the estimating or repair process as well as put them in writing

Our philosophy, as service professionals, is to exert every effort to provide the best service we can and eliminate problems before, during and after the repairs are made. We want your visit to our repair facility to be a positive experience, and we will work toward that goal. Please don't hesitate to call us with any questions or concerns!<PHONE_NUMBER>

repository: domobritton/gatsby-kg-auto

gha_language: JavaScript

repo_name: domobritton/gatsby-kg-auto


text:
# createTiles

Automate creation of Census [cartographic boundary file](https://www.census.gov/geo/maps-data/data/tiger-cart-boundary.html) vector tile datasets, and upload to s3 buckets.

The created tilesets are purposefully incomplete at zoom levels less than 9 (for tract, bg and place) to cut down on the displayed number of vertices (and thereby improve performance).  To accomplish this, an algorithm combining small features into larger has been implemented which respects logical geographic boundaries (so that features are not combined across County or State boundaries).

Additionally, features in each tile zoom level are assigned to geographic k-means clusters.  Map panning and zooming queries the geojson cluster layer instead of rendered features (as the traditional approach using queryRenderedFeatures would do).  The benefit of this is being able to pre-emptively load data without waiting for the base tiles to render first.  It also will also gather information for features outside the view area, so panning or zooming doesnt result in a temporary flash of blank features.

**Supported Geographies:**

State, Place, County, Tract, Block Group

**Supported Years**

2014, 2015, 2016

**Notes**

Running from an Amazon Linux EC2 instance is highly recommended for performance reasons (and is the only environment I've tested in).

This script requires linuxbrew or homebrew to run tippecanoe.  Here's how I installed linuxbrew:

```
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" < /dev/null
echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>~/.bash_profile
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.bash_profile
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.bash_profile
source ~/.bash_profile
```

You'll also need to install nodeJS.  Here's my favorite way:

```
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads
nvm install node
```

### Before Starting ###

**Note:** *This script assumes your buckets have already been created.*

Assuming bucket names of:

```
geo-metadata: list what GEOIDs are in each cluster
v2-cluster-json: geographic representation of each cluster
v2-geography-tiles: the tileset that will be loaded by the map
```

### Installation

Clone the repository:

```
sudo yum install git
git clone https://github.com/royhobbstn/createTiles.git
cd createTiles
npm install
```

**Running**

```
bash geotiles_carto_2014-2016.sh geolayer year
```

where ```geolayer``` is one of: county, state, tract, bg, place

where ```year``` is one of: 2014 2015 2016.  perhaps beyond.

repository: royhobbstn/createTiles

repo_name: royhobbstn/createTiles