text:
## Unit 11 Express Homework: Note Taker

  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

  ## DESCRIPTION

  this note taking application was designed to git the user the ability to take notes quickly a efficiently, and allows the user to have the information at their fingertips which saves the user time and the hassle of going through files  to find their notes. This application is easy to use, when the user first arrives at the web app, they are greeted with a nice prompt that invites them to get started taking notes. after the user click the "the get started" button, then the user is taken to the notes page where then they can input their notes and save them, on the left side there is a section where they can view the existing notes and from there they can erase the notes they no longer want to keep.

  ## TABLE OF CONTENTS

  * [Description](#description)
  * [Installation](#install)
  * [Usage](#usage)
  * [Contribution](#contribution)
  * [Test](#test)
  * [license](#license)
  * [Questions](#questions)

  ## INSTALLATION

  The install for this project is easy all the user has to do is clone my repo and run node.

  ## USAGE

  This application was designed to  give the user the ability to take notes and access them quickly without having to dig through all there existing folders

  ## CONTRIBUTIONS

  We appreciate your interest in the application, but at this time we are not accepting and contributions.

  ## TEST

  Run your normal tests

  ## LICENSE

  MIT

  ## QUESTIONS

  If you have any questions about this project, please feel free to contact me:

  Github Repository: [luismvela1](https://github.com/luismvela1)

  Email Adress: [luismvela1<EMAIL_ADDRESS>
  Application URL: [Note Taker](https://intense-anchorage-98966.herokuapp.com/)


text:
---
layout: post
title: Pycon India 2014
comments: true
---

I was amongst the 1300 people that attended the Pycon India event this year in Bangalore.
It was a 3 day event which involved workshop on day 1 and conference on the other two days.
I attended the two day conference and got to interact a lot of people and attend some good sessions that took place.
Many companies like redhat, Blue Jeans, plotty, placed their booths in the conference area and  were displaying their products
and ideas and also providing open opportunities to the people to join them.
We also got plenty of t-shirts at the conference. :D

Sessions
--------

One of the sessions that I found really interesting was the pannel discussion about the different python frameworks Django,
flask and web.py. It was a very insightful and healty discussions involving the various features and the best scenarios to
use the frameworks in order to make the most out of them.
We also had Kushal Das and Michael Foord conducting the keynote sessions. It was really great to have such a core contributor
of the python project amongst us and to be able to interact with them in person.
Some of the other sessions that I found useful included how to process data faster in Python and Django design patterns.

--------
Overall, I feel the event was more to do with interacting with different people, sharing ideas.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title: "Multi-level information fusion for induction motor fault diagnosis"
date: 2019-01-01
publishDate: 2019-10-03T09:00:43.172544Z
authors: ["Jinjiang Wang", "Peilun Fu", "Laibin Zhang", "Robert X Gao", "Rui Zhao"]
publication_types: ["2"]
abstract: "Condition monitoring and fault diagnosis are of
significance to improve the safety and reliability of motors, given
their widespread applications in virtually every branch of the
industry. Sequential data modeling based on recurrent neural
network (RNN) and its variants have drawn increasing attention
because the temporal nature of motor signals can be well
leveraged for motor analysis. One common drawback of prior
research is that signals measured on motors are typically analyzed
with a fixed time window, making it difficult to trade off between
global state estimation and local feature extraction. This paper
presents a deep learning-based model termed Multi-Resolution &
multi-Sensor Fusion Network (MRSFN) for motor fault diagnosis,
through multi-scale analysis of motor vibration and stator current
signals. Specifically, vibration and current signals are first
segmented by analysis windows of varying lengths to create a new
data stream for the joint representation and temporal encoding of
the original sensor signals, based on two network structures:
convolutional neural network (CNN) and long short-term
memory (LSTM). The advantage of the developed method is that
it automatically learns the discriminative features through the
network training process, without requiring manual feature
selection as is typically the case in prior methods. By considering
the temporal dependence of the signals being analyzed, the
developed multi-resolution fusion technique not only improves the
effectiveness of feature extraction but is also adaptive to varying
motor speed. Two case studies demonstrate the advantages of the
developed method."
featured: false
publication: "*IEEE/ASME Transactions on Mechatronics*"
url_pdf: "https://www.researchgate.net/profile/Jinjiang_Wang2/publication/334532323_Multi-level_information_fusion_for_induction_motor_fault_diagnosis/links/5d314003a6fdcc2462ebaedf/Multi-level-information-fusion-for-induction-motor-fault-diagnosis.pdf"
---

repository: rzntu/academic-kickstart

gha_license_id: MIT

repo_name: rzntu/academic-kickstart


text:
# OK Extension

Jupyter notebook extension that enables a form-filling mode for limiting the
interface and executing tests through the
[OK Client](https://github.com/Cal-CS-61A-Staff/ok-client).

With this extension, most Notebook contents is not editable by default.
Click the *Edit* button to toggle editing, which reverts to the standard Notebook interface.

When *Edit* is toggled off (default):
- Shift-enter executes every code cell from the previously executed cell and
  clears all output from any subsequent cell. If the previously executed cell
  is below the current cell, then execution begins at the top of the notebook.
- Cell editing is modeless; cells can be edited, but there is no command mode.
- A *scratch* cell is available in a separate sandboxed environment.
- The *Run Tests* button executes the `ok` client on the notebook contents.

## Installation

Install via pip.

```
pip install notebook-ok-extension
```

Separately, install a version of `okpy` via pip.

```
pip install okpy
```

gha_language: JavaScript


text:
# Summary of Week 4

Week 4 concluded your introduction to smaller networks by looking at representing network addresses, tracing packets and managing Wi-Fi.

You should now be able to:

* use the binary and hexadecimal number base systems and convert between different number bases using a calculatoruse the binary and hexadecimal number base systems and convert between different number bases using a calculator

* express a subnet mask in Classless Inter-Domain Routing (CIDR) notationexpress a subnet mask in Classless Inter-Domain Routing (CIDR) notation

* recognise the role of CIDR in the scalability of communication networksrecognise the role of CIDR in the scalability of communication networks

* use traceroute and interpret traceroute responsesuse traceroute and interpret traceroute responses

* understand the principles of multiple access and collision avoidance in Wi-Fiunderstand the principles of multiple access and collision avoidance in Wi-Fi

* understand how enterprise-scale networking differs from home networking.understand how enterprise-scale networking differs from home networking.

Next week you will look start your exploration of enterprise networking, which shares many of the same principles with home networking but uses more complex equipment that requires special techniques to configure and manage.


text:
# Ready, Steady, Connect - A Kafka Connect Quickstart

*'Ready, Steady, Connect - A Kafka Connect Quickstart'* is an example project to play around
with [Apache Kafka Connect](https://kafka.apache.org/documentation/#connect). This project contains examples and tools
to develop, inspect and deploy Kafka Connect plugins (connectors, transforms, etc.) from a Java Maven project.

This project uses the following versions:

- Confluent Platform 6.2.1 (Docker images)
- Kafka 2.8
- Java 11

The following components are part of the quickstart project:

- The **Docker image** ([Dockerfile](Dockerfile)) has two parts. A *builder image* to build the example connector from
  the Java source code and the *main image* to run a Kafka Connect container with all the Kafka Connect plugin examples
  and some plugins from conlfuent-hub.
- The **Java source code** ([src](src)) of all the Kafka Connect plugin (connectors, transforms, etc.) examples.
- The *Docker Compose* ([docker-compose.yml](docker-compose.yml)) for setting up and running the whole infrastructure (
  Kafka broker, zookeeper, etc).

The following tools are available when you run the whole infrastructure with Docker Compose:

- **[Kafdrop](https://github.com/obsidiandynamics/kafdrop) (Obsidian Dynamics)** is a web UI for viewing Kafka topics
  and browsing consumer groups.
- **[Kafka Connect UI](https://github.com/lensesio/kafka-connect-ui) (Lenses.io)** is a web tool for Kafka Connect for
  setting up and managing connectors for multiple connect clusters.
- **[Kafka UI](https://github.com/provectus/kafka-ui) (Provectus)** is a web UI for monitoring and management of Apache
  Kafka clusters.

CI Build:

- Builds the Java code and Docker
  image. ![Build Java & Docker](https://github.com/rueedlinger/kafka-connect-quickstart/workflows/Build%20Java%20&%20Docker/badge.svg)

## Getting Started

### Build and Startup the Environment

To use the custom sink and source connectors we have to build and start the Docker containers.

```bash
docker-compose up --build
```

This will start the following Docker containers:

- `zookeeper` => Apache Zookeeper (`confluentinc/cp-zookeeper`)
- `broker` => Apache Kafka (`confluentinc/cp-kafka`)
- `schema-registry`=> Confluent Schema Registry (`confluentinc/cp-schema-registry`)
- `connect`=> Kafka Connect. This services uses a [custom Docker image](Dockerfile) which is based
  on `confluentinc/cp-kafka-connect-base`.
- `kafdrop`=> [Kafdrop](https://github.com/obsidiandynamics/kafdrop) – Kafka Web UI  (`obsidiandynamics/kafdrop`)
- `connect-ui` => [Kafka Connect UI](https://github.com/lensesio/kafka-connect-ui) from
  Lenses.io (`landoop/kafka-connect-ui`)
- `kafka-ui` => [Kafka UI](https://github.com/provectus/kafka-ui) from Provectus (`provectuslabs/kafka-ui`)

> **Note** The docker containers have all the prefix *quickstart*. To get
> the logs from the container *connect* just run `docker logs quickstart-connect`

When all containers are started you can access different services like

- **Kafka Connect Rest API** => http://localhost:8083/
- **Kafdrop** => http://localhost:8082/
- **Schema Registry** => http://localhost:8081/
- **Kafka UI** from Provectus => http://localhost:8080/
- **Kafka Connect UI** from Lenses.io => http://localhost:8000/

As default [Avro](https://avro.apache.org/) will be used as value and key convertor. If you want to change the default
settings just adapt the [docker-compose.yml](docker-compose.yml)
file for the Kafka Connect service or override the settings in connector config.

```yaml
environment:
  CONNECT_KEY_CONVERTER: io.confluent.connect.avro.AvroConverter
  CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081

  CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
  CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
```

Or set the converter in connector config:

```json
{
  "name": "random-source-schemaless",
  "config": {
    "key.converter": "org.apache.kafka.connect.storage.StringConverter",
    "value.converter": "org.apache.kafka.connect.json.JsonConverter"
  }
}
```

### Let’s Deploy Some Connectors

First we have to check if Kafka Connect is available.

```bash
curl http://localhost:8083/
```

When Kafka Connect is up and running you should see a response like this.

```json
{
  "version": "6.1.0-ccs",
  "commit": "5496d92defc9bbe4",
  "kafka_cluster_id": "614erc9tQx6LxGXtzBvh9w"
}
```

In the [config](config) directory are the connector configuration files for the custom source and sink connector.

- [LogSinkConnector](src/main/java/ch/yax/connect/quickstart/sink)
- [RandomSourceConnector](src/main/java/ch/yax/connect/quickstart/source)

#### Source Connector

##### Avro

This will install the `RandomSourceConnector` [(random-source-avro.json)](config/random-source-avro.json)
which publishes random data in the Kafka topic `random-data-avro`.

> **Note** In our configuration Avro is set as default. So we don't have to set the `value.converter` in the connector configuration.

```bash
curl -X POST http://localhost:8083/connectors  \
    -H "Content-Type: application/json" \
    --data @config/random-source-avro.json
```

##### JSON (embedded schema)

The same source can be deployed with a JSON converter.

```properties
"value.converter":"org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable":"true",
```

Here the message will contain the `schema` and `payload` as top-level elements in the JSON.

```bash
curl -X POST http://localhost:8083/connectors  \
    -H "Content-Type: application/json" \
    --data @config/random-source-json.json
```

##### JSON (schemaless)

Or as JSON without a schema.

```properties
"value.converter":"org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable":"false",
```

This will only contain the raw JSON message.

```bash
curl -X POST http://localhost:8083/connectors  \
    -H "Content-Type: application/json" \
    --data @config/random-source-schemaless.json
```

#### Sink Connector

##### Avro

With the following command we install the `LogSinkConnector` [(log-sink-avro.json)](config/log-sink-avro.json)
which will log the data from the Kafka topic `random-data` to the console.

> **Note** In our configuration Avro is set as default. So we don't have to set the `value.converter` in the connector configuration.

```bash
curl -X POST http://localhost:8083/connectors \
    -H "Content-Type: application/json" \
    --data @config/log-sink-avro.json
```

##### JSON (embedded schema)

The same sink can be deployed with JSON converter. Here the message will contain the `schema` and `payload` top-level
elements in the JSON.

```bash
curl -X POST http://localhost:8083/connectors \
    -H "Content-Type: application/json" \
    --data @config/log-sink-json.json
```

##### JSON (schemaless)

Or as JSON without a schema.

```bash
curl -X POST http://localhost:8083/connectors \
    -H "Content-Type: application/json" \
    --data @config/log-sink-schemaless.json
```

#### Let’s See What We Got!

With the following command you should se all the connectors we have deployed so fare.

```bash
curl http://localhost:8083/connectors
```

When everything went well yo should see an output like this:

```json
[
  "random-source-json",
  "random-source-schemaless",
  "random-source-avro",
  "log-sink-json",
  "log-sink-avro",
  "log-sink-schemaless"
]
```

We can also display the state and configuration of all connectors with one simple command.

```bash
curl "http://localhost:8083/connectors?expand=status&expand=info"
```

A detail description of the Kafka Connect Rest API can be found here

- https://kafka.apache.org/documentation/#connect_rest
- https://docs.confluent.io/current/connect/references/restapi.html

### How to Install Other Connectors

If you want to install a special Connect plugin you have three options:

1. Download the JAR file and copy it in the [mount](mount) directory. This directory will be automatically mounted as
   Docker volume to the Kafka Connect plugin path `/etc/kafka-connect/jars`
   (`CONNECT_PLUGIN_PATH`).

```yaml
services:

  connect:

    environment:
      CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components,/etc/kafka-connect/jars"

    volumes:
      - ./mount:/etc/kafka-connect/jars

```

2. Modify the [Dockerfile](Dockerfile) and install the plugin with the `confluent-hub` CLI.

```dockerfile
FROM confluentinc/cp-kafka-connect-base:6.0.1

RUN confluent-hub install --no-prompt confluentinc/kafka-connect-datagen:0.4.0
```

>

3. Build a connector plugin fat jar with Maven and add it to Kafka Connect plugin path.

```dockerfile
FROM confluentinc/cp-kafka-connect-base:6.0.1

COPY target/connect-quickstart-*.jar /usr/share/java/quickstart
```

## Example Plugins (Java)

Here are some examples of **Kafka Connect Plugins** which can be used to build your own plugins:

- **Sink Connector** - loading data from kafka and store it into an external system (eg. database).
- **Source Connector** - loading data from an external system and store it into kafka.
- **Single Message Transforms (SMTs)** - transforms a message when processed with a connector.
- **Predicates** - Transforms can be configured with a predicate so that transforms only applies when the condition
  is `true` ([KIP-585](https://cwiki.apache.org/confluence/display/KAFKA/KIP-585%3A+Filter+and+Conditional+SMTs)).
- **Config Providers** - can load configurations for the connectors from external resources.
- **Rest Extensions** - with the Connect Rest Extension
  Plugin ([KIP-285](https://cwiki.apache.org/confluence/display/KAFKA/KIP-285%3A+Connect+Rest+Extension+Plugin)) you can
  extend the existing Rest API.
- **Converters** - provide support for translating between Kafka Connect's runtime data format and the raw payload of
  the Kafka messages.

Here are some examples of the general **Kafka Plugins** which can be used with Kafka Connect:

- **Kafka Consumer** - the Producer / Consumer
  Interceptors ([KIP-42](https://cwiki.apache.org/confluence/display/KAFKA/KIP-42%3A+Add+Producer+and+Consumer+Interceptors))
  can be used to intercept Kafka messages. These are part of the Kafka Client API and not Connect Plugins, but can be
  used to extend Kafka Connect.
- **Producer Interceptors** - the Producer / Consumer
  Interceptors ([KIP-42](https://cwiki.apache.org/confluence/display/KAFKA/KIP-42%3A+Add+Producer+and+Consumer+Interceptors))
  can be used to intercept Kafka messages. These are part of the Kafka Client API and not Connect Plugins, but can be
  used to extend Kafka Connect.
- **Metrics Reporter** - can be configured to report metrics from Kafka Connect.

### Source Connector

The [`RandomSourceConnector`](src/main/java/ch/yax/connect/quickstart/source) will create random data. The output data
could look like this:

```json
{
  "value":<PHONE_NUMBER>091898043,
  "count": 34,
  "message": "Task Id: 0",
  "timestamp": "2020-11-06T18:28:31.314616Z"
}
```

The following configuration options are possible.

- `topic` - the kafka topic where the data will be published.
- `poll.interval.ms` - the interval in milliseconds the polling of data should happen. The default is 1000 milliseconds.

### Sink Connector

#### LogSinkConnector

The [`LogSinkConnector`](src/main/java/ch/yax/connect/quickstart/sink) will log the output of a message. The following
configuration options exists.

- `log.level: [INFO, 'DEBUG', 'WARN', 'ERROR', 'TRACE']`. The log level which should be used. Default is `INFO`.
- `log.content: [ALL, 'KEY', 'VALUE', 'KEY_VALUE']`. Which part of the message should be logged the key, the value, key
  & value or the whole record (ALL). Default is `ALL`.
- `log.format`. The format of the log message. Default is `{} {}`.

### Single Message Transforms (SMTs)

Single Message Transformations (SMTs) are applied to messages as they go through Connect.

#### UUIDField

The [`UUIDField`](src/main/java/ch/yax/connect/quickstart/transforms) transforms adds a UUID field to the record. This
transform can be used to add a UUID as key or value to the Kafka message.

```properties
"transforms":"UUIDField",
"transforms.UUIDField.type":"ch.yax.connect.quickstart.transforms.UUIDField$Value",
"transforms.UUIDField.field":"my-uuid"
```

Before the transformation the message might look like this.

```json
{
  "value":<PHONE_NUMBER>091898043,
  "count": 34
}
```

After the transform the message contains the new field `my-uuid` with a generated uuid as value.

```json
{
  "value":<PHONE_NUMBER>091898043,
  "count": 34,
  "my-uuid": "de32f3bf-b65a-41ab-a9c3-db4956a4e7db"
}
```

### Predicates

####

Transformations can be configured with predicates so that the transformation is applied only to records which satisfy a
condition. The [`EqualsField`](src/main/java/ch/yax/connect/quickstart/predicates) Predicate will test a spefic vale of
field and apply the transformation only when the value is equal to value set by `expected.value`.

For example to enable the Predicate for the existing transform `UUIDField` you add the following configuration to your
connector. This will add the `UUIDField` transform only when the value in the `message` field ìs equals to the expected
value `task id: 0`. With `ignore.case=true` set to true lowercase and uppercase letters are treated as equivalent.

```properties
transforms.UUIDField.predicate=EqualsField
predicates=EqualsField
predicates.EqualsField.type=ch.yax.connect.quickstart.predicates.EqualsField$Value
predicates.EqualsField.field=message
predicates.EqualsField.expected.value=task id: 0
predicates.EqualsField.ignore.case=true
```

### Config Provider

#### EnvironmentConfigProvider

The [`EnvironmentConfigProvider`](src/main/java/ch/yax/connect/quickstart/config/provider/EnvironmentConfigProvider.java)
can be used to access Environment variables from the connector config.

> **Note:** to register a Kafka Connect Config Provider you need to add the file [`org.apache.kafka.common.config.provider.ConfigProvider`](src/main/resources/META-INF/services)
in `META-INF/services` which contains the full class name of your config provider.

The config provider `EnvironmentConfigProvider` supports the following config parameters:

- `BLACKLIST` a list of env variables which should be filtered out. When set to `"foo,bar"`

```yaml
CONNECT_CONFIG_PROVIDERS: "env"
CONNECT_CONFIG_PROVIDERS_ENV_CLASS: "ch.yax.connect.quickstart.config.provider.EnvironmentConfigProvider"
CONNECT_CONFIG_PROVIDERS_ENV_PARAM_BLACKLIST: "foo,bar"
```

With the pattern `${<CONFIG_RROVIDER>:<PATH>:<KEY>}` you can access the config values from your config
with `${env:my-path:my-value}`. Note the `path` is ignored by `EnvironmentConfigProvider` and has no effect.

You could use the env `CONFIG_POLL_INTERVAL_MS` to set the configuration property `poll.interval.ms` in
the `RandomSourceConnector`
configuration.

```properties
connector.class=ch.yax.connect.quickstart.source.RandomSourceConnector
max.interval.ms=${env:CONFIG_POLL_INTERVAL_MS}
tasks.max=1
topic=foo
```

### Rest Extension

#### HealthExtension

The [`HealthExtension`](src/main/java/ch/yax/connect/quickstart/rest) is Rest extension which provides a health
API (http://localhost:8083/health)
to Kafka Connect.

The response from the health API (`/health`) might look something like this:

```json
{
  "status": "UP",
  "connectors": [
    {
      "status": "UP",
      "connectorName": "log-sink",
      "connectorType": "sink",
      "connectorState": "RUNNING",
      "connectorWorkerId": "connect:8083",
      "connectorErrors": null,
      "tasks": [
        {
          "taskId": 0,
          "status": "UP",
          "taskState": "RUNNING",
          "tasksWorkerId": "connect:8083",
          "taskErrors": null
        }
      ]
    },
    {
      "status": "UP",
      "connectorName": "random-source",
      "connectorType": "source",
      "connectorState": "RUNNING",
      "connectorWorkerId": "connect:8083",
      "connectorErrors": null,
      "tasks": [
        {
          "taskId": 0,
          "status": "UP",
          "taskState": "RUNNING",
          "tasksWorkerId": "connect:8083",
          "taskErrors": null
        }
      ]
    }
  ]
}
```

> **Note:** to register a Kafka Connect Rest Extension you need to add the file [`org.apache.kafka.connect.rest.ConnectRestExtension`](src/main/resources/META-INF/services)
in `META-INF/services` which contains the full class name of your rest extension.

To enable the Connect Rest Extensions add the following configuration:

```yaml
CONNECT_REST_EXTENSION_CLASSES: "ch.yax.connect.quickstart.rest.HealthExtension"
```

### Converter

#### AvroDebugConvertor

The [`AvroDebugConvertor`](src/main/java/ch/yax/connect/quickstart/converter) is a Wrapper around
the `io.confluent.connect.avro.AvroConverter`. The `AvroDebugConvertor` will just log the internal connect data
structure which was created or received.

```yaml
CONNECT_VALUE_CONVERTER: ch.yax.connect.quickstart.converter.AvroDebugConverter
```

This will display a log output the data structure which was created.

```bash
quickstart-connect | [2021-02-10 22:09:22,907] INFO Topic random-data-avro, created connect data 'SchemaAndValue{schema=Schema{ch.yax.connect.quickstart.source.RandomData:STRUCT}, value=Struct{value=7476346340551272290,count=632,message=Task Id: 1,timestamp=Wed Feb 10 22:09:22 GMT 2021}}' (ch.yax.connect.quickstart.converter.AvroDebugConverter)
```

It will also log the data structure which was received.

```bash
quickstart-connect | [2021-02-10 22:09:28,377] INFO Topic random-data-avro, got connect data 'Struct{value=6085501730739912467,count=633,message=Task Id: 1,timestamp=Wed Feb 10 22:09:28 GMT 2021}' and schema 'Schema{ch.yax.connect.quickstart.source.RandomData:STRUCT}' (ch.yax.connect.quickstart.converter.AvroDebugConverter)
```

#### JsonDebugConverter

A similar converter (`JsonDebugConverter`) exists also for the`org.apache.kafka.connect.json.JsonConverter`.

```properties
value.converter=ch.yax.connect.quickstart.converter.JsonDebugConverter
```

### Consumer / Producer Interceptor

#### LogConsumerInterceptor

The [`LogConsumerInterceptor`](src/main/java/ch/yax/connect/quickstart/interceptor) logs part of the Kafka message
(topic, timestamp, partition and offset).

To enable the `LogConsumerInterceptor` add the following configuration.

> *Note*: In some cases you might add the JAR with your Interceptor into the `CLASSPATH` environment variable.
> Because adding your Interceptors into the `CONNECT_PLUGIN_PATH` might not work.

```yaml
CONNECT_CONSUMER_INTERCEPTOR_CLASSES: "ch.yax.connect.quickstart.interceptor.LogConsumerInterceptor"
```

#### LogProducerInterceptor

The [`LogProducerInterceptor`](src/main/java/ch/yax/connect/quickstart/interceptor)  logs part of the Kafka message
topic, timestamp and partition) before it's stored in the topic.

To enable the `LogProducerInterceptor` add the following configuration.

```yaml
CONNECT_PRODUCER_INTERCEPTOR_CLASSES: "ch.yax.connect.quickstart.interceptor.LogProducerInterceptor"
```

*Note*: In some cases you might add the JAR with your Interceptor into the `CLASSPATH` environment variable. Because
adding your Interceptors to the `CONNECT_PLUGIN_PATH` might not work.

```dockerfile
ENV CLASSPATH=/usr/share/java/quickstart/*
```

### Metric Reporter

#### LogMetricsReporter

The [`LogMetricsReporter`](src/main/java/ch/yax/connect/quickstart/metrics) will log various metrics from Kafka Connect.

To enable the `LogMetricsReporter` add the following configuration.

```yaml
CONNECT_METRIC_REPORTERS: "ch.yax.connect.quickstart.metrics.LogMetricsReporter"
```

You have to add the JAR of the Metrics Report in the Java classpath. Because adding your JAR to
the `CONNECT_PLUGIN_PATH` will not work. If you don't put the JAR in the classpath you get a `ClassNotFoundException`.
For a production case you should separate Kafka Connect plugins from the `MetricsReporter`s.

```dockerfile
ENV CLASSPATH=/usr/share/java/quickstart/*
```

When you have some connectors running you might see some log statement like this.

```bash
[2021-02-10 23:09:41,815] INFO metricChange: name: MetricName [name=record-send-total, group=producer-topic-metrics, description=The total number of records sent for a topic., tags={client-id=producer-1, topic=docker-connect-offsets}], value: 0.0 (ch.yax.connect.quickstart.metrics.LogMetricsReporter)
```

## References

- [Apache Kafka Connect](https://kafka.apache.org/documentation/#connect)
- [Confluent Platform Kafka Connect](https://docs.confluent.io/current/connect/index.html)
- [Docker images for Kafka](https://github.com/confluentinc/kafka-images)
- [Confluent Supported Versions and Interoperability](https://docs.confluent.io/platform/current/installation/versions-interoperability.html)

repository: wefine/kafka-connect-quickstart

repo_name: wefine/kafka-connect-quickstart


text:
IPython cell magic with the `%%mmd` command allows to include python expressions (and other things) in a markdown text.
The cells can be edited as markdown, python expression are indicated by the double mustaches.

 You can also access variables and functions you defined or imported before. [Checkout the full example.](https://github.com/transfluxus/magic_markdown/blob/master/example/magic_markdown_test.ipynb)


text:
Promise Throttle   [![Build Status](https://api.travis-ci.org/JMPerez/promise-throttle.svg)](https://travis-ci.org/JMPerez/promise-throttle/) [![Coverage Status](https://coveralls.io/repos/github/JMPerez/promise-throttle/badge.svg?branch=master)](https://coveralls.io/r/JMPerez/promise-throttle?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/JMPerez/promise-throttle.svg)](https://greenkeeper.io/)
==================

This small ([~530B minified and compressed](https://cost-of-modules.herokuapp.com/result?p=promise-throttle)) dependency-free library limits promises run per unit of time. Useful for Rest API consumption, which is normally rate-limited to a certain number of requests in a set amount of time.

On Node.js, pass the Promise library you are using to the constructor.

To use, simply add functions to the `PromiseThrottle` that, once called, return a `Promise`.

## Use

The library can be used either server-side or in the browser.

```javascript
  var PromiseThrottle = require('promise-throttle');
  /**
   * A function that once called returns a promise
   * @return Promise
   */
  var myFunction = function(i) {
    return new Promise(function(resolve, reject) {
      // here we simulate that the promise runs some code
      // asynchronously
      setTimeout(function() {
        console.log(i + ": " + Math.random());
        resolve(i);
      }, 10);
    });
  };

  var promiseThrottle = new PromiseThrottle({
    requestsPerSecond: 1,           // up to 1 request per second
    promiseImplementation: Promise  // the Promise library you are using
  });

  var amountOfPromises = 10;
  while (amountOfPromises-- > 0) {
    promiseThrottle.add(myFunction.bind(this, amountOfPromises))
      .then(function(i) {
        console.log("Promise " + i + " done");
      });
  }

  // example using Promise.all
  var one = promiseThrottle.add(myFunction.bind(this, 1));
  var two = promiseThrottle.add(myFunction.bind(this, 2));
  var three = promiseThrottle.add(myFunction.bind(this, 3));

  Promise.all([one, two, three])
    .then(function(r) {
        console.log("Promises " + r.join(", ") + " done");
    });
```

### Options

#### weight
You can specify `weight` option for each promise to dynamically adjust throttling depending on
action "heaviness". For example, action with `weight = 2` will be throttled as two regular actions. By default weight of all actions is 1.

```javascript
  var regularAction = promiseThrottle.add(performRegularCall);
  var heavyAction = promiseThrottle.add(performHeavyCall, {weight: 2});
```

#### signal
You can cancel queued promises using an [AbortSignal](https://developer.mozilla.org/docs/Web/API/AbortController). For this, pass a `signal` option obtained from an `AbortController`. Once it is aborted, the promises queued using the signal will be rejected.

If the environment where you are running the code doesn't support AbortController, you can use [a polyfill](https://github.com/mo/abortcontroller-polyfill).

```js
  var controller = new AbortController();
  var signal = controller.signal;
  var pt = createPromiseThrottle(10);
  pt.addAll([
    function() {
      return fetch('example.com/a');
    },
    function() {
      return fetch('example.com/b');
    },
    function() {
      ...
    }
  ], {signal: signal});
  ...

  // let's abort the promises
  controller.abort();
```

You can decide to make only specific promises abortable:

```js
  var controller = new AbortController();
  var signal = controller.signal;
  var pt = createPromiseThrottle(10);
  pt.add(function() { return fetch('example.com/a') });
  pt.add(function() { return fetch('example.com/b') }, {signal: signal});
  pt.add(function() { return fetch('example.com/c') });
  ...

  // let's abort the second one
  controller.abort();
```

When aborting, the promise returned by `add` or `addAll` is rejected with a specific error:

```js
  var controller = new AbortController();
  var signal = controller.signal;
  var pt = createPromiseThrottle(10);
  pt.addAll([
    function() {
      return fetch('example.com/a');
    },
    function() {
      return fetch('example.com/b');
    },
    function() {
      ...
    }
  ], {signal: signal}).catch(function(e) {
    if (e.name === 'AbortError') {
      console.log('Promises aborted');
    }
  });
  ...

  // let's abort the promises
  controller.abort();
```

## Installation

For node.js, install the module with: `npm i promise-throttle`

If you are using it in a browser, you can use bower: `bower install promise-throttle`

## Development

Install the dependencies using `npm install`.
Run `npm start` to lint, test and browserify promise-thottle.

## Projects using it

See how some projects are using it:

- [ivasilov/promised-twitter](https://github.com/ivasilov/promised-twitter)
- [JMPerez/spotify-dedup](https://github.com/JMPerez/spotify-dedup)
- [johannesss/randify](https://github.com/johannesss/randify)
- [JoseBarrios/mturk-api](https://github.com/JoseBarrios/mturk-api)
- [zackiles/lucy-bot](https://github.com/zackiles/lucy-bot)

## License

MIT

repository: JMPerez/promise-throttle

repo_name: JMPerez/promise-throttle


text:
v0.8.8
========================================
Update to Kotlin 1.5.10, same api as 0.8.6

v0.8.7
========================================
Update to Kotlin 1.4.0, same api as 0.8.6

v0.8.6
========================================
* Fixed that processing of file annotation on native targets was called too often

v0.8.5
========================================

Fix method signature of overridden abstract method

v0.8.4
========================================

* Build with Kotlin 1.3.71

* Fixed bug that produced a crash when annotating functions with expression body like
 "fun functionWithExpressionBody() = 1 + 1" on Native (thx to @chippmann)

* Removed SyntheticResolveExtensionImpl, you don't need add:
 SyntheticResolveExtension.registerExtension(project, mpapt) anymore

v0.8.3
========================================
* You can now detect annotated expressions in functions

* Added util method "printMessage()"
Added an extension function to the MessageCollector that can be used to print text or raise compiler errors.

Inside your processor, you can use it like that:
```kotlin
configuration.messager().printMessage(DiagnosticKind.ERROR,"My error message", CompilerMessageLocation.Companion.create("/home/jens/Code/2019/MpApt/kotlin-plugin-shared/src/main/java/de/jensklingenberg/MpAptTestProcessor.kt",42,106))
```

This will print the message to the log and stop the compiler:
```kotlin
e: /home/jens/Code/2019/MpApt/kotlin-plugin-shared/src/main/java/de/jensklingenberg/MpAptTestProcessor.kt: (42, 106): My error message

```

v0.8.2
========================================
fixed that processingOver was called to often
You can now detect annotation with Target (ANNOTATION_CLASS,TYPE_PARAMETER,FIELD,FILE,LocalVariable)

v0.8.1

========================================

You can now distinguish between which  native target platforms you want to support.
Before processing the isTargetPlatformSupported(platform: TargetPlatform) will be called and you can return true if you want to enable your processor for this target or false if you don't. By default this methods returns true

configuration.nativeTargetPlatformName() will get you the names of the Native Targets(macos_x64,linux_x64,etc) the values are defined in KonanTargetValues.
It needs to be used only on Kotlin Native otherwise it will return an empty string

Example:
```kotlin
override fun isTargetPlatformSupported(platform: TargetPlatform): Boolean {
         val targetName = platform.first().platformName

         return when (targetName) {
             KotlinPlatformValues.JS -> false
             KotlinPlatformValues.JVM -> true
             KotlinPlatformValues.NATIVE -> {
                 return when (configuration.nativeTargetPlatformName()) {
                     KonanTargetValues.LINUX_X64,KonanTargetValues.MACOS_X64 -> {
                         false
                     }
                     else->{
                         false
                     }
                 }
             }
             else -> {
                 log(targetName)
                 false
             }
         }

     }

```

  ========================================

Changed the initialization of the library.

Now you need to add the compiler configuration to the MpAptProject

```kotlin
val processor = MpAptTestProcessor()
val mpapt = MpAptProject(processor,configuration)
```

repository: Foso/MpApt

gha_language: Kotlin

repo_name: Foso/MpApt


text:
---
layout: article
title: "[Experience] How I'm Like a Pencil "
date: 2017-08-16T00:14:02
modified:
categories: media
excerpt: "It occurs to me that I have a lot in common with a pencil. "
tags: [anma, feelgood, relationship, mistakes, character, forgiveness, purpose]
comments: true
ads: true
image:
  feature:
  teaser: "anma_exp13.jpg"
---

<img style="display: block;
    flex-shrink: 1;
    min-width: 0;
    height: auto;
    width: 100%;
    align-self: flex-start;
    margin-right: .5rem;" src="../../images/experience_anon01.jpg" height="480" width="480" />

It occurs to me that I have a lot in common with a pencil. That’s right – a simple and humble little pencil. Not the fancy mechanical kind. That’s too high-maintenance for me. And I’m not as showy as a plume pen or as smooth as a ball point. I don’t live in bold strokes like a heavy marker. But I’m a lot like a pencil. Here’s how:

1. Like a pencil, I have a built-in eraser. I can correct my mistakes. No, I can't change the past, but I can make it right again. And if I can't erase history (after all, what’s done is done) I can at least erase a great deal of guilt and anger with forgiveness.

2. Like a pencil, I do better if I’m sharpened once in a while. My mind and skills grow dull without occasional honing. Even my spirit and attitudes need refining if I’m to be at my best. And there is something else, too. I find that the difficulties of life wear away at me, and they can either grind me down or shape me into a person who is more capable and creative. The sharpening I get from living through tough times is often painful, but I know it can make me a better person.

3. Pencils work best in a skilled hand. And like a pencil, I can do some pretty terrific things with a little guidance. Other people bring out the best in me, and with the help of others, I can do far more than I ever can alone.

4. Like a pencil, I should leave my mark whenever possible. I too often underestimate my influence on another. I have daily opportunities to leave something good behind. That is what it means to leave my mark. It may be in small ways, it may be in the lives of people I love, people I have touched or nurtured, or even in incidental conversations struck with strangers. But, I have a mark to leave and should use every opportunity to leave something good behind.

5. Like a pencil, it is what is on the inside that matters. A pencil without lead is useless. And a yellow pencil will not do when a black or red pencil is called for. What is on the inside is all important. My outer appearance matters less than I probably think, while it’s the stuff on the inside that folks notice about me. Whether it is understanding or intolerance, love or bitterness, peace or unrest, kindness or self-centeredness, hope or despair, courage or fear, what is on the inside matters most.

6. A pencil works best on paper or canvass. It will never leave its mark on water and will wear itself down against a mirror. I do best knowing my strengths and limitations. I can’t do everything well and that is okay. There is still plenty of good to be done by doing what I do best.

7. And finally, like a pencil, the biggest part of my purpose in this life can be summed up in three words: to be useful. When I’m too broken to hold it together, when everything is ground away or worn down, when I no longer have anything to contribute, I know my life is coming to an end. But until then, my job is to be useful.

Like I said, I have a lot in common with a pencil.

**Author: Steve Goodier**

Spread love with AnMa! #FeelGood #ANMA

[Facebook](https://www.facebook.com/anxietymanager/)

[Twitter](https://twitter.com/anxiety_manager)

[Life Support Sytem](http://stevegoodier.blogspot.com/)

gha_language: SCSS


text:
---
layout: default
title: Transports
nav_order: 2
---

# Transports

_This page is a work in progress_

TSWoW supports creating custom transports that can carry players and creatures (boats, zeppelins).
Transports, however, come with a lot of caveats and bugs that users should be aware of as they don't really follow the exact path specified for them,
but interpolates between in an attempt to make them appear more smooth.
However, often with custom transports the effect turns out the exact opposite and causes weird glitches, janky turns and teleporting between endpoints.

Getting transports to work well, especially if trying to do tight turns and/or keep them in a continuous line on a single map, requires a lot of trial and error.

## Barebones Example
The following code will create a working transport going between GM Island and flying above westfall.

```ts
import { std } from "wow/wotlk"
std.Transports.create("<modid>","<transport-id>",[
    {map:1,x:16189.607422,y:16197.315430,z:0.000922,o:3.939514},
    {map:1,x:16167.085938,y:16174.223633,z:0.000922,o:3.939514},
    {map:1,x:16138.680664,y:16145.097656,z:0.000922,o:3.939514,delay:10},
    {map:1,x:16114.849609,y:16120.662109,z:0.000922,o:3.939514},
    {map:1,x:16095.241211,y:16100.556641,z:0.000922,o:3.939514},
    {map:1,x:16073.052734,y:16077.804688,z:0.000922,o:3.939514},
    {map:0,x:-10235.200195,y:1222.469971,z:93.185204,o:3.813462}, // <-- transport will automatically teleport here!
    {map:0,x:-10261.190430,y:1201.799683,z:93.185204,o:3.813462},
    {map:0,x:-10288.276367,y:1180.257935,z:93.185204,o:3.813462},
    {map:0,x:-10314.266602,y:1159.587646,z:93.185204,o:3.813462},
    {map:0,x:-10340.958008,y:1138.359619,z:93.185204,o:3.813462},
    {map:0,x:-10364.011719,y:1120.024658,z:93.185204,o:3.813462},
    {map:0,x:-10388.161133,y:1100.818359,z:93.185204,o:3.813462},
    {map:0,x:-10413.055664,y:1081.019409,z:93.185204,o:3.813462},
    {map:0,x:-10439.024414,y:1060.366455,z:93.185204,o:3.813462},
])])
```

## General Notes
- Always make sure to mark at least one node as having a `delay`. If not, transports will stop randomly before teleporting between maps and/or at the end of their loops.
- Starting and ending on different maps will often flawlessly avoid the most annoying issue with transports (continuous loops, see section below).
- Always have at least 3~4 nodes per map (they can be very close to each others), having fewer leads to instability and possibly crashes.
- Transports do not follow the exact path you specify for them, but attempt to interpolate them. Try to keep nodes somewhat evenly spaced and don't make too sharp turns.
This takes a lot of trial and error until you start understanding it.
- Having nodes too close to each others usually cause jankyness

## Transports in a single continuous loop

If trying to create a transport in a single map going in a loop,
you will likely soon notice how difficult it is to get the start and endpoints to go smoothly between each others,
and the transport usually ends up teleporting between the locations.

It **is** possible to get this working smoothly, and becomes easier if your loops contains a long, single straight line at some point. The shorter this line,
the more difficult it will become to get a smooth transition.

What I usually do is:

- Printscreen the map (`pressing m`) I'm making a path for and start `drawing` the path I want the transport to go and draw out small dots where the waypoints should be.
- Plot out a straight line along the path containing at least 4-6 waypoints.
- Start plotting my waypoints ingame (using the `.at` command) at the **center** of this line and trace out the path I want the transport to go
- When I complete the entire path, make sure the last 2-4 waypoints are all on the line leading up to the first
- When done, copy the **first** waypoint to the end. This _may_ cause the calculated start/endpoints on the transport path to line up perfectly,
and there should be no visible teleportation between them.

**TODO**: Working example of this

repository: tswow/tswow-wiki-new

repo_name: tswow/tswow-wiki-new


text:
---
hrs_structure:
  division: '1'
  volume: '2'
  title: '9'
  chapter: 103D
  section: 103D-212
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0103D-0212
    parent: HRS0103D
    name: 103D-212 Collection of data concerning public procurement
weight: 66120
title: Collection of data concerning public procurement
full_title: 103D-212 Collection of data concerning public procurement
---
**[§103D-212] Collection of data concerning public procurement.** The chief procurement officer and the heads of all purchasing agencies shall cooperate in the preparation of statistical data concerning the procurement, usage, and disposition of all goods, services, and construction, and employ such trained personnel as may be necessary to carry out this function. All using agencies shall furnish such reports as the chief procurement officer may require concerning usage, needs, and stocks on hand, and the chief procurement officer may prescribe forms to be used by the using agencies in requisitioning, ordering, and reporting of goods, services, and construction. [L Sp 1993, c 8, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
### Installation

In your Gemfile, add this line:

    gem "pocket"

### Options & Defaults

Here are the possible options.  Whatever you pass in will merge with and overwrite these defaults.  The :headers options will merge as well, so if you don't want those default headers, you'll
need to pass in a :headers option that overwrites (e.g. 'Content-Type') with nil.

    # defaults
    _options = {
      :method     => :get,
      :username   => nil,
      :password   => nil,
      :use_ssl    => false,
      :data       => nil,
      :headers    => {
        "Content-Type"  => "application/json",
        "Accept"        => "application/json",
      }
    }

### Example Usage

(testing off http://button.herokuapp.com)

Simple get:

    response = Pocket.make_request("http://button.herokuapp.com/stitches")

Simple post:

    response = Pocket.make_request("http://button.herokuapp.com/stitches", {
      :method   => :post,
      :data     => {
        :stitch => {
          :thread_color => "blue",
          :length       => 2
        }
      }
    })

Simple put:

    response = Pocket.make_request("http://button.herokuapp.com/stitches/" + stitch["id"].to_s, {
      :method   => :put,
      :data     => {
        :stitch => {
          :thread_color => "blue",
          :length       => 3
        }
      }
    })

Simple delete:

    response = Pocket.make_request("http://button.herokuapp.com/stitches/" + stitch["id"].to_s, {
      :method   => :delete,
    })

Get with authentication:

    response = Pocket.make_request("http://button.herokuapp.com/needles", {
      :username   => "username",
      :password   => "password"
    })

Post with authentication:

    response = Pocket.make_request("http://button.herokuapp.com/needles", {
      :method   => :post,
      :data     => {
        :needle => {
          :sharpness    => 7,
          :length       => 2
        }
      },
      :username   => "username",
      :password   => "password"
    })

repository: mysterioustrousers/Pocket

repo_name: mysterioustrousers/Pocket


text:
---
title: "K8ssandra quick start"
linkTitle: "Quick start"
no_list: true
weight: 1
description: |
  Kick the tires and take K8ssandra for a spin!
---

**Completion time**: **10 minutes**.

Welcome to K8ssandra! This guide gets you up and running with a single-node Apache Cassandra® cluster on Kubernetes (K8s). If you're interested in a more detailed component walkthroughs check out the [tasks]({{< ref "topics">}}) section.

In this quick start, we'll cover the following topics:

* [Prerequisites]({{< relref "#prerequisites" >}}): Required supporting software including resource recommendations.
* [K8ssandra Helm repository configuration]({{< relref "#configure-the-k8ssandra-helm-repository" >}}): Accessing the Helm charts that install K8ssandra.
* [K8ssandra installation]({{< relref "#install-k8ssandra" >}}): Getting K8ssandra up and running using the Helm chart repo.
* [Verifying K8ssandra functionality]({{< relref "#verify-your-k8ssandra-installation" >}}): Making sure K8ssandra is working as expected.
* [Retrieve K8ssandra superuser credentials]({{< relref "#superuser" >}}): Getting the K8ssandra superuser name and password so you can access common utilities as well as the Stargate API.

Once these basic configuration and verification steps are completed, you can choose more detailed paths for either a developer or a site reliability engineer.

## Prerequisites

In your local environment the following tools are required for provisioning a K8ssandra cluster:

* [Helm v3+](https://helm.sh/docs/intro/install/)
* [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)

As K8ssandra deploys on a K8s cluster, one must be available to target for installation. The K8s environment may be a local version running on your development machine, an on-premises self-hosted environment, or a managed cloud offering.

K8ssandra works with the following versions of Kubernetes either standalone or via a cloud provider:

* 1.16
* 1.17
* 1.18
* 1.19
* 1.20

To verify your K8s server version:

```bash
kubectl version
```

**Output**:

```json
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.3", GitCommit:"01849e73f3c86211f05533c2e807736e776fcf29", GitTreeState:"clean", BuildDate:"2021-02-18T12:10:55Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.16", GitCommit:"7a98bb2b7c9112935387825f2fce1b7d40b76236", GitTreeState:"clean", BuildDate:"2021-02-17T11:52:32Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
```

Your K8s server version is a combination of the `Major:` and `Minor:` key/value pairs following `Server Version:`, in the example above, `1.18`.

If you don't have a K8s cluster available, you can use [OpenShift CodeReady Containers](https://developers.redhat.com/products/codeready-containers/overview) that run within a VM, or one of the following local versions that run within Docker:

* [K3D](https://k3d.io/)
* [Minikube](https://minikube.sigs.k8s.io/docs/start/)
* [Kind](https://kind.sigs.k8s.io/)

The instructions in this section focus on the Docker container solutions above, but the general instructions should work for other environments as well.

### Resource recommendations for local Kubernetes installations

We recommend a machine specification of **no less** than 16 gigs of RAM and 8 virtual processor cores (4 physical cores). You'll want to adjust your Docker resource preferences accordingly. For this quick start we're allocating 4 virtual processors and 8 gigs of RAM to the Docker environment.

{{% alert title="Tip" color="success" %}}
See the documentation for your particular flavor of Docker for instructions on configuring resource limits.
{{% /alert %}}

The following Minikube example creates a K8s cluster running K8s version 1.18.16 with 4 virtual processor cores and 8 gigs of RAM:

```bash
minikube start --cpus=4 --memory='8128m' --kubernetes-version=1.18.16
```

**Output**:

```bash
😄  minikube v1.17.1 on Darwin 11.2.1
✨  Automatically selected the docker driver. Other choices: hyperkit, ssh
👍  Starting control plane node k8ssandra in cluster k8ssandra
🔥  Creating docker container (CPUs=4, Memory=8128MB) ...
🐳  Preparing Kubernetes v1.18.16 on Docker 20.10.2 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
```

### Verify your Kubernetes environment

To verify your Kubernetes environment:

1. Verify that your K8s instance is up and running in the `READY` status:

    ```bash
    kubectl get nodes
    ```

    **Output**:

    ```bash
    NAME        STATUS   ROLES    AGE   VERSION
    k8ssandra   Ready    master   21m   v1.18.16
    ```

### Validate the available Kubernetes StorageClasses {#storage-classes}

Your K8s instance **must** support a storage class with a `VOLUMEBINDINGMODE` of `WaitForFirstConsumer`.

To list the available K8s storage classes for your K8s instance:

```bash
kubectl get storageclasses
```

**Output**:

```bash
NAME                 PROVISIONER                RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
standard (default)   k8s.io/minikube-hostpath   Delete          Immediate           false                  2m25s
```

If you don't have a storage class with a `VOLUMEBINDINGMODE` of `WaitForFirstConsumer` as in the Minikube example above, you can install the [Rancher Local Path Provisioner](https://github.com/rancher/local-path-provisioner):

```bash
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
```

**Output**:

```bash
namespace/local-path-storage created
serviceaccount/local-path-provisioner-service-account created
clusterrole.rbac.authorization.k8s.io/local-path-provisioner-role created
clusterrolebinding.rbac.authorization.k8s.io/local-path-provisioner-bind created
deployment.apps/local-path-provisioner created
storageclass.storage.k8s.io/local-path created
configmap/local-path-config created
```

Rechecking the available storage classes, you should see that a new `local-path` storage class is available with the required `VOLUMEBINDINGMODE` of `WaitForFirstConsumer`:

```bash
kubectl get storageclasses
```

**Output**:

```bash
NAME                 PROVISIONER                RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path           rancher.io/local-path      Delete          WaitForFirstConsumer   false                  3s
standard (default)   k8s.io/minikube-hostpath   Delete          Immediate              false                  39s
```

## Configure the K8ssandra Helm repository

K8ssandra is delivered via a collection of Helm charts for easy installation, so once you've got a suitable K8s environment configured, you'll need to add the K8ssandra Helm chart repositories.

To add the K8ssandra helm chart repos:

1. Install [Helm v3+](https://helm.sh/docs/intro/install/) if you haven't already.

1. Add the main K8ssandra stable Helm chart repo:

    ```bash
    helm repo add k8ssandra https://helm.k8ssandra.io/stable
    ```

1. If you want to access K8ssandra services from outside of the Kubernetes cluster, also add the Traefik Ingress repo:

    ```bash
    helm repo add traefik https://helm.traefik.io/traefik
    ```

1. Finally, update your helm repository listing:

    ```bash
    helm repo update
    ```

{{% alert title="Tip" color="success" %}}
Alternatively, you can download the individual charts directly from the project's [releases](https://github.com/k8ssandra/k8ssandra/releases) page.
{{% /alert %}}

## Install K8ssandra

The K8ssandra helm charts make installation a snap. You can override chart configurations during installation as necessary if you're an advanced user, or make changes after a default installation using `helm upgrade` at a later time.

K8ssandra can install the following versions of Apache Cassandra:

* 3.11.7
* 3.11.8
* 3.11.9
* 3.11.10
* 4.0-beta4

{{% alert title="Important" color="warning" %}}
K8ssandra comes out of the box with a set of [default values](https://github.com/k8ssandra/k8ssandra/blob/main/charts/k8ssandra/values.yaml) tailored to getting up and running quickly.  Those defaults are intended to be a great starting point for smaller-scale local development but are **not** intended for production deployments.
{{% /alert %}}

To install a single node K8ssandra cluster:

1. Copy the following YAML to a file named `k8ssandra.yaml`:

    ```yaml
    cassandra:
      version: "3.11.10"
      cassandraLibDirVolume:
        storageClass: local-path
        size: 5Gi
      allowMultipleNodesPerWorker: true
      heap:
       size: 1G
       newGenSize: 1G
      resources:
        requests:
          cpu: 1000m
          memory: 2Gi
        limits:
          cpu: 1000m
          memory: 2Gi
      datacenters:
      - name: dc1
        size: 1
        racks:
        - name: default
    kube-prometheus-stack:
      grafana:
        adminUser: admin
        adminPassword: admin123
    stargate:
      enabled: true
      replicas: 1
      heapMB: 256
      cpuReqMillicores: 200
      cpuLimMillicores: 1000
    ```

    That configuration file creates a K8ssandra cluster with a datacenter, `dc1`, containing a single Cassandra node, `size: 1` version `3.11.10` with the following specifications:

    * 1 GB of heap
    * 2 GB of RAM for the container
    * 1 CPU core
    * 5 GB of storage
    * 1 Stargate node with
      * 1 CPU core
      * 256 MB of heap

    {{% alert title="Important" color="warning" %}}
The `storageClass:` parameter must be a storage class with a `VOLUMEBINDINGMODE` of `WaitForFirstConsumer` as described in [Validate the available Kubernetes StorageClasses]({{< relref "#storage-classes" >}}).
    {{% /alert %}}

1. Use `helm install` to install K8ssandra, pointing to the example configuration file using the `-f` flag:

    ```bash
    helm install -f k8ssandra.yaml k8ssandra k8ssandra/k8ssandra
    ```

    **Output**:

    ```bash
    NAME: k8ssandra
    LAST DEPLOYED: Thu Feb 18 10:05:44 2021
    NAMESPACE: default
    STATUS: deployed
    REVISION: 1
    ```

    {{% alert title="Tip" color="success" %}}
In the example above, the K8ssandra pods will have the cluster name `k8ssandra` prefixed or appended inline.
    {{% /alert %}}

    {{% alert title="Note" color="primary" %}}
When installing K8ssandra on newer versions of Kubernetes (v1.19+), some warnings may be visible on the command line related to deprecated API usage.  This is currently a known issue and will not impact the provisioning of the cluster.

```bash
W0128 11:24:54.792095  27657 warnings.go:70]
apiextensions.k8s.io/v1beta1 CustomResourceDefinition is
deprecated in v1.16+, unavailable in v1.22+;
use apiextensions.k8s.io/v1 CustomResourceDefinition
```

For more information, check out issue [#267](https://github.com/k8ssandra/k8ssandra/issues/267).
    {{% /alert %}}

## Verify your K8ssandra installation

Depending upon your K8s configuration, initialization of your K8ssandra installation can take a few minutes. To check the status of your K8ssandra deployment, use the `kubectl get pods` command:

```bash
kubectl get pods
```

**Output**:

```bash
NAME                                                  READY   STATUS      RESTARTS   AGE
k8ssandra-cass-operator-6666588dc5-s4xgc              1/1     Running     0          6m59s
k8ssandra-dc1-default-sts-0                           2/2     Running     0          6m27s
k8ssandra-dc1-stargate-6f7f5d6fd6-2dz8f               1/1     Running     0          7m
k8ssandra-grafana-6c4f6577d8-469qx                    2/2     Running     0          6m59s
k8ssandra-kube-prometheus-operator-5556885bd6-l5pxz   1/1     Running     0          6m59s
k8ssandra-reaper-k8ssandra-5b6cc959b7-wt22j           1/1     Running     0          3m20s
k8ssandra-reaper-k8ssandra-schema-dnrpk               0/1     Completed   0          3m35s
k8ssandra-reaper-operator-cc46fd5f4-lzq96             1/1     Running     0          7m
prometheus-k8ssandra-kube-prometheus-prometheus-0     2/2     Running     1          6m32s
```

The K8ssandra pods in the example above have the identifier `k8ssandra` either prefixed or inline, since that's the name that was specified when the cluster was created using Helm. If you choose a different cluster name during installation, your pod names will be different.

The actual Cassandra node name from the listing above is `k8ssandra-dc1-default-sts-0` which we'll use throughout the following sections.

Verify the following:

* The K8ssandra pod running Cassandra, `k8ssandra-dc1-default-sts-0` in the example above should show `2/2` as `Ready`.
* The Stargate pod, `k8ssandra-dc1-stargate-6f7f5d6fd6-2dz8f` in the example above should show `1/1` as `Ready`.

{{% alert title="Important" color="warning" %}}

* The Stargate pod will not show `Ready` until at least 4 minutes have elapsed.
* The pod `k8ssandra-reaper-k8ssandra-schema-xxxxx` runs once as part of a job and does not persist.

{{% /alert %}}

Once all the pods are in the `Running` or `Completed` state, you can check the health of your K8ssandra cluster. There must be **no `PENDING` pods**.

To check the health of your K8ssandra cluster:

1. Verify the name of the Cassandra datacenter:

    ```bash
    kubectl get cassandradatacenters
    ```

    **Output**:

    ```bash
    NAME   AGE
    dc1    51m
    ```

1. Confirm that the Cassandra operator for the datacenter is `Ready`:

    ```bash
    kubectl describe CassandraDataCenter dc1 | grep "Cassandra Operator Progress:"
    ```

    **Output**:

    ```bash
       Cassandra Operator Progress:  Ready
    ```

1. Verify the list of available services:

    ```bash
    kubectl get services
    ```

    **Output**:

    ```bash
    NAME                                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                 AGE
    cass-operator-metrics                       ClusterIP   <IP_ADDRESS>     <none>        8383/TCP,8686/TCP                                       47m
    k8ssandra-dc1-all-pods-service              ClusterIP   None             <none>        9042/TCP,8080/TCP,9103/TCP                              47m
    k8ssandra-dc1-service                       ClusterIP   None             <none>        9042/TCP,9142/TCP,8080/TCP,9103/TCP,9160/TCP            47m
    k8ssandra-dc1-stargate-service              ClusterIP   <IP_ADDRESS>    <none>        8080/TCP,8081/TCP,8082/TCP,8084/TCP,8085/TCP,9042/TCP   47m
    k8ssandra-grafana                           ClusterIP   <IP_ADDRESS>    <none>        80/TCP                                                  47m
    k8ssandra-kube-prometheus-operator          ClusterIP   <IP_ADDRESS>     <none>        443/TCP                                                 47m
    k8ssandra-kube-prometheus-prometheus        ClusterIP   <IP_ADDRESS>   <none>        9090/TCP                                                47m
    k8ssandra-reaper-k8ssandra-reaper-service   ClusterIP   <IP_ADDRESS>    <none>        8080/TCP                                                47m
    k8ssandra-seed-service                      ClusterIP   None             <none>        <none>                                                  47m
    kubernetes                                  ClusterIP   <IP_ADDRESS>        <none>        443/TCP                                                 53m
    prometheus-operated                         ClusterIP   None             <none>        9090/TCP                                                47m
    ```

    Verify that the following services are present:

    * <cluster-name>-<datacenter-name>-all-pods-service
    * <cluster-name>-<datacenter-name>-dc1-service
    * <cluster-name>-<datacenter-name>-stargate-service
    * <cluster-name>-<datacenter-name>-seed-service

## Retrieve K8ssandra superuser credentials {#superuser}

You'll need the K8ssandra superuser name and password in order to access Cassandra utilities and do things like generate a Stargate access token.

To retrieve K8ssandra superuser credentials:

1. Retrieve the K8ssandra superuser name:

    ```bash
    kubectl get secret k8ssandra-superuser -o jsonpath="{.data.username}" | base64 --decode ; echo
    ```

    **Output**:

    ```bash
    k8ssandra-superuser
    ```

1. Retrieve the K8ssandra superuser password:

    ```bash
    kubectl get secret k8ssandra-superuser -o jsonpath="{.data.password}" | base64 --decode ; echo
    ```

    **Output**:

    ```bash
    PGo8kROUgAJOa8vhjQrE49Lgruw7s32HCPyVvcfVmmACW8oUhfoO9A
    ```

{{% alert title="Tip" color="success" %}}
Save the superuser name and password for use in following sections.
{{% /alert %}}

## Next

* If you're a developer, and you'd like to get started coding using CQL or Stargate, see the [K8ssandra developer quick start]({{< relref "docs/getting-started/developer" >}}).
* If you're a site reliability engineer, and you'd like to explore the K8ssandra administration environment including monitoring and maintenance utilities, see the [K8ssandra site engineer quick start]({{< relref "docs/getting-started/site-engineer" >}}).

branch_name: refs/heads/main


text:
Most of the work with ProfileService is setting up your data loading code. Afterwards, data is read and written directly to the `Profile.Data` table without the nescessety to use any ProfileService method calls - you set up your own read / write functions, wrappers, classes with profiles as components, etc!

The code below is a basic profile loader implementation for ProfileService:

!!! note
	Unlike most custom DataStore modules where you would listen for `Players.PlayerRemoving` to clean up,
	ProfileService may release (destroy) the profile before the player leaves the server - this has to be
	handled by using `Profile:ListenToRelease(listener_function)` - any amount of functions can be added!

```lua
-- ProfileTemplate table is what empty profiles will default to.
-- Updating the template will not include missing template values
--   in existing player profiles!
local ProfileTemplate = {
	Cash = 0,
	Items = {},
	LogInTimes = 0,
}

----- Loaded Modules -----

local ProfileService = require(game.ServerScriptService.ProfileService)

----- Private Variables -----

local Players = game:GetService("Players")

local GameProfileStore = ProfileService.GetProfileStore(
	"PlayerData",
	ProfileTemplate
)

local Profiles = {} -- [player] = profile

----- Private Functions -----

local function GiveCash(profile, amount)
	-- If "Cash" was not defined in the ProfileTemplate at game launch,
	--   you will have to perform the following:
	if profile.Data.Cash == nil then
		profile.Data.Cash = 0
	end
	-- Increment the "Cash" value:
	profile.Data.Cash = profile.Data.Cash + amount
end

local function DoSomethingWithALoadedProfile(player, profile)
	profile.Data.LogInTimes = profile.Data.LogInTimes + 1
	print(player.Name .. " has logged in " .. tostring(profile.Data.LogInTimes)
		.. " time" .. ((profile.Data.LogInTimes > 1) and "s" or ""))
	GiveCash(profile, 100)
	print(player.Name .. " owns " .. tostring(profile.Data.Cash) .. " now!")
end

local function PlayerAdded(player)
	local profile = GameProfileStore:LoadProfileAsync(
		"Player_" .. player.UserId,
		"ForceLoad"
	)
	if profile ~= nil then
		profile:Reconcile() -- Fill in missing variables from ProfileTemplate (optional)
		profile:ListenToRelease(function()
			Profiles[player] = nil
			-- The profile could've been loaded on another Roblox server:
			player:Kick()
		end)
		if player:IsDescendantOf(Players) == true then
			Profiles[player] = profile
			-- A profile has been successfully loaded:
			DoSomethingWithALoadedProfile(player, profile)
		else
			-- Player left before the profile loaded:
			profile:Release()
		end
	else
		-- The profile couldn't be loaded possibly due to other
		--   Roblox servers trying to load this profile at the same time:
		player:Kick()
	end
end

----- Initialize -----

-- In case Players have joined the server earlier than this script ran:
for _, player in ipairs(Players:GetPlayers()) do
	coroutine.wrap(PlayerAdded)(player)
end

----- Connections -----

Players.PlayerAdded:Connect(PlayerAdded)

Players.PlayerRemoving:Connect(function(player)
	local profile = Profiles[player]
	if profile ~= nil then
		profile:Release()
	end
end)
```

repository: FableRBX/ProfileService

repo_name: FableRBX/ProfileService


text:
---
layout: post
blog-category: blog
title: Corrosion Lecture 13
author: Som Phene
bigimg: log/images/hans-eiskonen-qTxwKHZwl6M-unsplash.jpg
tags: [Kinetics, Overpotential, Polarization, Butler-Volmer Reaction Kinetics, Reaction, Activation, Exchange Current Density, Corrosion, MM 454, Vijayshankar Dandapani]
---
### Kinetics of Corrosion- Reaction Kinetics
Find the $$13^{th}$$ lecture notes linked: [MM 454 IITB Lecture Notes 13 (Google Drive link)](https://drive.google.com/file/d/1Pp_Y1e3NH-sSV2jp39CWJDHzV_hOc7DE/view?usp=sharing)

gha_language: HTML

gha_license_id: NOASSERTION


text:
# Orbit

[![CI Status](http://img.shields.io/travis/Eduardo Scoz/Orbit.svg?style=flat)](https://travis-ci.org/Eduardo Scoz/Orbit)
[![Version](https://img.shields.io/cocoapods/v/Orbit.svg?style=flat)](http://cocoadocs.org/docsets/Orbit)
[![License](https://img.shields.io/cocoapods/l/Orbit.svg?style=flat)](http://cocoadocs.org/docsets/Orbit)
[![Platform](https://img.shields.io/cocoapods/p/Orbit.svg?style=flat)](http://cocoadocs.org/docsets/Orbit)

## Usage

Orbit is a simple dependency injection for your Obj-C projects. Say goodbye to singletons everywhere.

Orbit simplifies creation of domains and viewControllers on your class, by forcing you to follow simple and
straightforward rules on how objects can be created.

- it only supports property injection
- it always uses the init: initializer for classes
- it doesnt support recursion when creating objects.
- it currently doesnt support protocols

Orbit is a great way to quickly cleanup object sharing and singletons in your application.

More documentation will come.

## Requirements

## Installation

Orbit is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

    pod "Orbit"

## Author

Eduardo Scoz<EMAIL_ADDRESS>
## License

Orbit is available under the MIT license. See the LICENSE file for more info.

repository: escoz/Orbit

repo_name: escoz/Orbit


text:
---
layout: page
title: Proposals
subtitle: For MDS Capstone Projects

---

The first step in applying to participate as a capstone partner involves writing a project proposal. Check out our [About](/capstone/about) page to learn more about the type of projects we address through our capstone course.

Your proposal should be

- one page maximum (plus a possible appendix containing reference material), and
- submitted as a pdf file to<EMAIL_ADDRESS>
In addition, please provide a one-sentence description of the project for us to put next to your project name for the students to see. You can simply indicate this in the email you send upon submission.

Your proposal should contain the following information:

### About your organization

Briefly introduce your organization. Why might the MDS students be interested in partnering with this organization?

### Brief description of the problem/question

Just a brief description of the problem. If you'd like, you can suggest data science approaches that the students can take to address the problem, but this is not necessary. What are the main difficulties that come with this project?

### Available data

Describe the data that you will make available to the students. How much data is there? What type of features are available? What type of complications might arise from the data? In what form will the data be available to the students?

### Data Product

What product(s) would you like to receive from our students, and what (in general) should it communicate or have the ability to do? Examples:

- A dashboard such as a `shiny` app to explore an aspect of your data
- An `R` package with documentation to simplify an analysis
- A data pipeline that includes some data science model
- A report outlining student findings

### Legal info

Outline the gist of the legalities you intend to have in place, if any -- particularly on how secretive you anticipate the students to be with the data and their finished data product. The key here is to just put the main ideas here, not an actual legal document (we'll address that later).

We understand that you may require some restrictions to be put in place, but we also would like for our students to have some freedom to talk about the work they've done when applying for jobs. We want our students to know about these restrictions up-front so that they can make an informed decision about the project.

Feel free to ask us about our standard UBC NDA. Contact us at<EMAIL_ADDRESS>
This section should also include any other requirements of students participating in the project, like background checks, etc.

### Conflicts of interest

Declare any conflicts of interest. For example, if a current MDS student or family member is involved with your organization on a professional or personal level, this should be declared along with a short explanation.


text:
# A Taxonomy of Software Smells
Kent Beck coined the term "code smell" in the popular Refactoring book by Martin Fowler and defined it informally as certain structures in the code that suggest (sometimes they scream for) the possibility of refactoring. Since then, various smells have been reported that impair software quality in one or more ways. I attempt to prepare and present a taxonomy of software smells by cataloging, classifying, and inter-relating smell definitions present in existing literature with their references.

The taxonomy is generated by a python program that I wrote to generate html pages. I provide smell description as well as corresponding references in a specific format and supply them to the python program. The program generates required html pages with links that inter-relate the generated html pages. I used basic CSS to look the collection of the html files a little better.

This taxonomy is evolving. I plan to add many more smells and populate other relevant information such as tool support. If you would like to see something relevant which is currently missing, feel free to offer a pull request.

You can make following two types of contributions:
- Add more information related to smells (using the pre-defined templates; see below)
- Modify the python program that generates Html pages

## Compilation and execution
Specify the path variables in the Main.py, and execute it using python3. I used PyCharm CE for developing and executing the program.

## Templates
You may add new smells, categories, and references to the collection. The new items must follow the template specified below.

### Smell template
```
[smell]
[smell-id]XX (must be unique)
[smell-category]category-id such as DESIGN
[smell-name]smell name
[smell-description]description of the smell (one line; could be multiple statements)
[smell-aka]also known as (one line; a smell may have multiple [smell-aka] statements)
[smell-ref]main reference in which it was defined
[smell-end]
```

### Category template
```
[define-smell-category]
[smell-category-id] must be unique
[smell-category-name]such as "Design smells"
[smell-category-parent]it is used to create hierarhcy of smells. It should be empty for root level smell categories, specify the parent category such as "CODE" for sub-categories "DESIGN" and "ARCH".
[define-smell-category-end]
```

### Reference template
```
[reference]
[ref-id]must be unique
[ref-text]a single line reference text (in ACM ref format)
[ref-image]it is not used currently
[ref-url]url of the resource
[ref-end]
```

repository: neilernst/smells

repo_name: neilernst/smells


text:
# Anypoint MQ Bindings

This document defines how to describe Anypoint MQ-specific information in AsyncAPI documents.

[Anypoint MQ](https://docs.mulesoft.com/mq/) is MuleSoft's multi-tenant, cloud messaging service and is fully integrated with [Anypoint Platform](https://www.mulesoft.com/platform/enterprise-integration).

## Versions

The version of this bindings specification is `0.0.1`.
This is also the `bindingVersion` for all binding objects defined by this specification.
In any given binding object, `latest` MAY alternatively be used to refer to the currently latest published version of this bindings specification.

## Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this bindings specification are to be interpreted as described in IETF [RFC2119](https://www.ietf.org/rfc/rfc2119.txt).

## Protocol

These bindings use the `anypointmq` [protocol](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#definitionsProtocol) in AsyncAPI documents to denote connections to and interactions with Anypoint MQ message brokers.

The Anypoint MQ protocol is based on invocations of the [Anypoint MQ Broker REST API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/anypoint-mq-broker/).

## Server Object

The fields of the standard [Server Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#serverObject) are constrained and interpreted as follows:

Server Object Field Name | Values for Anypoint MQ Protocol | Description
---|:---|:---
`protocol`               | `anypointmq`                                                 | **REQUIRED**. MUST be `anypointmq` for the scope of this specification.
`url`                         | e.g., `https://mq-us-east-1.anypoint.mulesoft.com/api`       | **REQUIRED**. MUST be the endpoint URL of the Anypoint MQ Broker REST API _excluding_ the final major version indicator (e.g., `v1`). Valid examples are `https://mq-us-east-1.anypoint.mulesoft.com/api` and `https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api` (and _not_ `https://.../api/v1`).
`protocolVersion` | e.g., `v1`                                                   | **OPTIONAL**, defaults to `v1`. If present MUST be the major version indicator of the Anypoint MQ Broker REST API omitted from the `url`, e.g. `v1`.
`security`               | suitably configured OAuth 2.0 client credentials grant type  | **REQUIRED**. Authentication against the MuleSoft-hosted Anypoint MQ message brokers uses the OAuth 2.0 client credentials grant type. At runtime, the client ID and client secret values of an Anypoint MQ client app must be supplied. Also, the OAuth 2.0 scopes are currently not client-configurable. The `security` field of the server object MUST correctly match these constraints.

Note that the choice of a particular Anypoint MQ client app (via its client ID and secret) decides the Anypoint Platform organization ID and environment (ID) to be those in which this client app is defined. See the [Anypoint MQ documentation](https://docs.mulesoft.com/mq/mq-client-apps) for details on how to configure Anypoint MQ client apps.

## Server Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.

## Channel Binding Object

The Anypoint MQ [Channel Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#channel-bindings-object) is defined by a [JSON Schema](json_schemas/channel.json), which defines these fields:

Field Name | Type | Description
---|:---:|---
`destination`       | string | **OPTIONAL**, defaults to the channel name. The destination (queue or exchange) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name in Anypoint MQ.
`destinationType`          | string | **OPTIONAL**, defaults to `queue`. The type of destination, which MUST be either `exchange` or `queue` or `fifo-queue`. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, strict message ordering) supported by this channel.
`bindingVersion` | string | **OPTIONAL**, defaults to `latest`. The version of this binding.

Note that an Anypoint MQ exchange can only be sent to, not received from. To receive messages sent to an exchange, [an intermediary queue must be defined and bound to the exchange](https://docs.mulesoft.com/mq/mq-understanding#message-exchanges). In this bindings specification, these intermediary queues are not exposed in the AsyncAPI document. Instead, it is simply assumed that whenever messages must be received from an exchange, such an intermediary queue is involved yet invisible in the AsyncAPI document.

### Examples

The following example shows a `channels` object with two channels, the second having a channel binding object for `anypointmq`:

```yaml
channels:
  user/signup:
    description: |
      This application receives command messages from this channel about users to sign up.
      Minimal configuration, omitting a channel binding object.
    publish:
      #...
  user/signedup:
    description: |
      This application sends events to this channel about users that have signed up.
      Explicitly provides a channel binding object.
    bindings:
      anypointmq:
        destination:     user-signup-exchg
        destinationType: exchange
        bindingVersion:  '0.0.1'
    subscribe:
      #...
```

## Operation Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.

## Message Binding Object

The Anypoint MQ [Message Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#message-bindings-object) is defined by a [JSON Schema](json_schemas/message.json), which defines these fields:

Field Name | Type | Description
---|:---:|---
`headers`               | [Schema Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject) | **OPTIONAL**. A Schema object containing the definitions for Anypoint MQ-specific headers (so-called protocol headers). This schema MUST be of type `object` and have a `properties` key. Examples of Anypoint MQ protocol headers are `messageId` and `messageGroupId`.
`bindingVersion` | string | **OPTIONAL**, defaults to `latest`. The version of this binding.

Note that application headers must be specified in the [`headers` field of the standard Message Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#messageObjectHeaders) and are transmitted in the [`properties` section of the Anypoint MQ message](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/anypoint-mq-broker/).
In contrast, protocol headers such as `messageId` must be specified in the [`headers` field of the message binding object](#messageBindingObjectHeaders) and are transmitted in the [`headers` section of the Anypoint MQ message](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/anypoint-mq-broker/).

### Examples

The following example shows a `channels` object with two channels, each having one operation (`subscribe` or `publish`) with one message. Only the message of the `subscribe` operation has a message binding object for `anypointmq`:

```yaml
channels:
  user/signup:
    publish:
      message:
        #...
  user/signedup:
    subscribe:
      message:
        headers:
          type: object
          properties:
            correlationId:
              description: Correlation ID set by application
              type: string
        payload:
          type: object
          properties:
            #...
        correlationId:
          description: Correlation ID is specified as a header and transmitted in the Anypoint MQ message properties section
          location:    $message.header#/correlationId
        bindings:
          anypointmq:
            headers:
              type: object
              properties:
                messageId:
                  type: string
            bindingVersion: '0.0.1'
```

## Complete Example

The following is a complete, simple AsyncAPI document illustrating the usage of all binding objects defined in this bindings specification, with all their fields.

```yaml
asyncapi: '2.0.0'
info:
  title: Example with Anypoint MQ
  version: '0.0.1'

servers:
  development:
    protocol: anypointmq
    protocolVersion: v1
    url: https://mq-us-east-1.anypoint.mulesoft.com/api
    description: |
      Anypoint MQ broker for development, in the US East (N. Virginia) runtime plane
      under management of the US control plane.
    security:
      - oauthDev: []
  production:
    protocol: anypointmq
    protocolVersion: v1
    url: https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api
    description: |
      Anypoint MQ broker for production, in the EU Central (Frankfurt) runtime plane
      under management of the EU control plane.
    security:
      - oauthProd: []
    bindings:
      anypointmq:
        bindingVersion: '0.0.1'

channels:
  user/signup:
    description: |
      This application receives command messages from this channel about users to sign up.
    bindings:
      anypointmq:
        destination:     user-signup-queue
        destinationType: fifo-queue
        bindingVersion:  '0.0.1'
    publish:
      operationId: signUpUser
      description: |
        This application receives command messages via this operation about users to sign up.
      message:
        contentType: application/json
        headers:
          type: object
          properties:
            correlationId:
              description: Correlation ID set by application
              type: string
        payload:
          type: object
          properties:
            username:
              type: string
              minLength: 3
        correlationId:
          description: Correlation ID is specified as a header and transmitted in the Anypoint MQ message properties section
          location: $message.header#/correlationId
        bindings:
          anypointmq:
            headers:
              type: object
              properties:
                messageId:
                  type: string
            bindingVersion: '0.0.1'

components:
  securitySchemes:
    oauthDev:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://mq-us-east-1.anypoint.mulesoft.com/api/v1/authorize
          scopes: {}
    oauthProd:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api/v1/authorize
          scopes: {}
```

repository: asyncapi/bindings

repo_name: asyncapi/bindings


text:
# Very simple site wide password protection for Laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/drkmode/laravel-knock-knock.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
[![Total Downloads](https://img.shields.io/packagist/dt/drkmode/laravel-knock-knock.svg?style=flat-square)](https://packagist.org/packages/drkmode/filament-redirects)

This will add a simple password form in front of your application to protected it from any access. The password is
specified using the `.env` file to protect your sites, commonly used for DEV or STAGE sites. You can use multiple
passwords for different user groups. Once the password is removed, the access is revoked.

You can use multiple passwords for different user groups. Once the password is
removed, the access is revoked.

This does not protect any assets files like css or images.

__Looks like__

![SiteProtection](https://raw.githubusercontent.com/DrkMode/laravel-knock-knock/main/preview.jpg)

## Installation

```
composer require drkmode/laravel-knock-knock
```

### Laravel >= 5.2

This package requires at least the Laravel Framework of version **5.2**.

Add ServiceProvider to the providers array in `app/config/app.php`.

```
DrkMode\SiteProtection\SiteProtectionServiceProvider::class,
```

### Laravel >= 5.5

You don't need to add this package to your `app/config/app.php` since it supports auto discovery.

### Add Middleware

Add Middleware to `app/Http/Kernel.php` or specific routes you want to protect.

```
protected $middlewareGroups = [
    'web' => [
        ...
        \DrkMode\SiteProtection\Http\Middleware\SiteProtection::class,
    ],
    ...
];
```

### Configuration

Most configuration can be done using ENV variables by adding the following keys
to your `.env` file.

#### Adjusting the passwords

You can use multiple passwords separated by comma.

```
SITE_PROTECTION_PASSWORDS=password1,password2
```

To revoke access to your site simply change the password. This requires every
user using the old password to re-enter a password.

#### Exclude certain paths from protection

You can exclude specific paths from protection. Add a comma seperated list of paths to your
`.env` file. You can use the `*` to exclude a group of paths.

```
SITE_PROTECTION_EXCEPT_PATHS=path1,path2,login*
```

#### Protect only specific paths

You can protect only some paths. Add a comma seperated list of paths to your
`.env` file. You can use the `*` to protect a a group of paths.

```
SITE_PROTECTION_PROTECTED_ONLY_PATHS=path1,path2,admin*
```

#### Set a CSS file uri

You can change the look and feel of the password protection page by adding an uri
to your main css file. The css file is appened to the existing css styles to keep
basic alignments.

```
SITE_PROTECTION_CSS_FILE_URI=/assets/app.css
```

#### Set a Logo file path

You can add your own company or project logo by setting this `.env` variable to the path of the image.

```
SITE_PROTECTION_LOGO_PATH=/assets/logo.png
```

### Customization

In case you really need to. You can modify the view that handles password entry by publishing the views to your
resource folder. This is not recommended and might cause problems on future updates. Try using the uri to a css
file first.

Run the following command:

```
php artisan vendor:publish --provider="DrkMode\SiteProtection\SiteProtectionServiceProvider" --tag=views
```

You can now make the changes in `resources/vendor/views/site-protection/site-protection-form.blade.php`.

repository: DrkMode/laravel-knock-knock

repo_name: DrkMode/laravel-knock-knock


text:
# Century From Year

Introduction
The first century spans from the year 1 up to and including the year 100, The second - from the year 101 up to and including the year 200, etc.

Task :
Given a year, return the century it is in.

### Solution

function century(year) {

### For solution of this excercise I have used the Math methode called Math.ceil() which rounds the number to top always

return Math.ceil(year/100);
}

### More about the ceil methode is here:

https://www.w3schools.com/jsref/jsref_ceil.asp


text:
---
layout: post
title: Rep Update - July 2018
subtitle: Some important information
---

## Research Funds

Just a reminder that this fund (£250FT, £125 PT) expires on **31st July**.

It is important that we take advantage of these funds, as the university may end up <b> taking it away </b> if we aren't using it.

To access this fund please see the [Funding opportunities](https://share.coventry.ac.uk/students/ResearchDegrees/Pages/Funding-Opportunites.aspx) page on the Doctoral College CU Student portal.

The HLS contact to get this funding is Andy Davis. Contact him by emailing *[hls.ro@coventry.ac.uk](mailto:hls.ro@coventry.ac.uk)*

## Payment of write-up Fees

The paying system has not been updated to reflect the changes in write up year fees for 2018/19 etc.

Any student concerned who needs to pay the fees should wait until they get confirmation from the Doctoral college/or their account has been credited with the balance before they do so.

There has been issues with those who have paid the initial amount and are now claiming a refund. It was acknowledged it is a very frustrating experience so students should consult the Doctoral college before making any payment.

## Working hours post-viva

The PGR working hours pre- and post-viva will remain the same.

Sadly, the changes students had proposed to extend the number of post-viva work hours allowed was **rejected by the University Research Committee (URC)** and there is nothing the Doctoral College can do at this time.

## Research Student Forum

Minutes are being confirmed at the moment, with actions to be completed waiting to be confirmed. REPS will let you know once the actions are confirmed


text:
# Tools Working Group

2019-01-09

## Present

* Guillaume Charest
* Nick Schonning
* Adam Peck
* Jim Cowie
* Mike Nguyen
* Reg Maltais
* Andrew Sinkinson
* Al Akdari
* Caster Parham

## Agenda
* Review OSAB action items
* Review last meeting action items
* New priority: GC Version Control System

## Roundtable

Nick: Back end/help desk, parts of the VCS

Reg: Kent Jacobs (ESDC) for Geospatial already in place and published online.

Mike: Unlimited free private repos for up to 3 collaborators.

There are efforts being made to make it easier to live in both on-premise and online worlds.

PSPC has identified the need for a central DVCS as part of its offerings for other government departments.

Need for scoping:

(Mike) Inner source only for this scope: all departments should have access but not public, yet.

(Reg) If at some point the project is to be released as open source, it would be migrated to an open source repo on a public tool (GitHub, BitBucket, GitLab, etc. online offerings)

(Mike) Enterprise version of GitHub is trying to solve the on-premise/PaaS version.

(Reg) Requirements for
* internal Inner Source (share across all departments with private repos nonetheless)
* publish open source projects
* might be a need for keeping other VCS in specific departments

Question:
Hosting internally vs externally (Cloud first)
Hosting production code: day to day use
Accessing repos internally vs publicly (Exception to )

Requirement of solution: Need to provide proper hooks and APIs to support different SDLC models and environments.

Out of scope: CI/CD functionalities

If Cloud based: agnostic of service provider

Open Source instance running on hybrid cloud? Services already exist and the cost may be higher to host.

(Reg) Industry Canada (?) used to host a VCS (RedMind) for internal use.


text:
This project is based on Adafruit Python DHT Sensor Library
Copyright @ Adafruit
===============================================================================
##Project aim:
- Read room's temperature and humidity by using DHT11
- Update data to thingspeak.com
My channel is: https://thingspeak.com/channels/82606

===============================================================================
##How's to:

###1.Prepare:
- 01 Raspberry Pi (I am using Pi2, B) with power suppy and wifi dongle (or ethernet)
- 01 DTH11
- Breakboard, wire
- 01 4.7kOhm resister

###2.Installation:
Read Adafruit README

###3.Register an account on thingspeak.com. It's free!!
Create a channel

Read more here: https://www.mathworks.com/help/thingspeak/getting-started-with-thingspeak.html
###4.Run:
cd examples/

vi AdafruitDHT.py (or nano AdafruitDHT.py)

Add your API key (at line 61)

save and quit vi

./AdafruitDHT.py 11 4 (Note that: 11 - DHT11, 4 - pin 4th of Pi)

See the graph and customise you channel

Viel Spaß ^^


text:
# Swift plugin

The Swift plugin provides endpoints for carrying out operations on Swift containers and objects. It also enforces CloudMC's environment-centric multi-tenancy model and RBAC over top of Swift.

repository: cloudops/cloudmc-api-docs

branch_name: refs/heads/cmc-dev

repo_name: cloudops/cloudmc-api-docs


text:
---
title: "Watches and Clocks"
created_at: Tue Aug 25 20:59:27 MDT 2015
kind: article
tags:
  - wristwatch
  - clock
  - alarm_clock
  - timex_indiglo
  - donna_watch
---

  timex.com/easy-reader
  Timex T2H3519J Women's Easy Reader for Donna

  ebay.com/p/Timex-Easy-Reader
  Timex T2H3519J Women's Easy Reader

# Seiko Men's SNK803 Seiko 5 Automatic Watch with Beige Canvas Strap

My first Automatic, what a great value.

http://www.seikowatches.com/support/ib/pdf/Analogue_E.pdf

For models with day and date calendar

1.    Pull out the crown to the first click.
2.    Turn the crown until the previous day’s date appears in the calendar frame.
3.    Turn the crown in the opposite direction until the desired language (bilingual) for the day before the desired day appears in the calendar frame.
4.    Pull out the crown to the second click, and advance the hour and minute hands until the desired date and day appears.
5.    Adjust the time by turning the crown in the desired direction.
6.    Push the crown back in to the normal position.

# Straps

## broadarrow.net maratac straps

#### [broadarrow.net maratac straps](http://www.broadarrow.net/maratac.htm) maratac straps

* Maratac Mil Series 18mm - $12
* Maratac Mil Series NATO 18mm - $17

## cheapestnatostraps.com

#### [cheapestnatostraps.com](http://www.cheapestnatostraps.com/collections/leather-nato-straps/products/pvd-leather-nato-strap-cognac-18mm-20mm-22mm?variant=307019139) PVD Leather NATO Strap Cognac - $17

## ebay

### Strapsco

$20
StrapsCo Leather G10 Zulu Wrap Around Mens Military Army Watch Band Strap

### winneger23

$16
New Great Strap Leather Zulu Military Band G10 Panerai colour Desert 18/20/22mm

# watches

## Casio Wave Ceptor

Casio Wave Ceptor Tough Solar WVA-M630D-2AJF Men's Watch
$89

CASIO watch WAVE CEPTOR Waveceptor radio clock MULTIBAND 5 WV-59J-1AJF
$47

CASIO watch WAVE CEPTOR Waveceptor radio clock MULTIBAND 5 WV-59DJ-1AJF
$59

## Timex

Timex Men's Easy Reader Watch T200119J
brown leather strap, white face, gold case, weekday-date, 18mm band
$23