text:
# High Low Game

#### _C#, .NET: High Low Game, 9/24/2019_

## Description
Create a High Low Game console application that 'guesses' what number a user is thinking of.

## Application should have:
- Separate frontend and backend logic

- Make a console app with a `HighLowNumber` class.

- Use `Console.ReadLine()` to gather three numbers from the user.

- Create a method in the `HighLowNumber` class:
    - That 'guesses' what number a user is thinking of.
    - The app should ask the user to pick a number between 1-100.
    - The app should then 'guess' a number and ask whether the user's number is higher or lower than the 'guessed' number.
    - If the user says the number is lower, the program should guess a lower number. If the user says the number is higher, the program should guess a higher number.
    - The game should go on until the program guesses the correct number.

## Use Case:
Program: Would you like to play the higher/lower game? (Yes/No)
User: Yes.
Program: Okay.
Program: Is your number higher or lower than 50? (Higher/Lower/Correct)
User: Lower
Program: Is your number higher or lower than 25? (Higher/Lower/Correct)
User: Higher
Program: Is your number higher or lower than 33? (Higher/Lower/Correct)
User: Higher
Program: Is your number higher or lower than 42? (Higher/Lower/Correct)
User: Higher
Program: Is your number higher or lower than 46? (Higher/Lower/Correct)
User: Lower
Program: Is your number higher or lower than 44? (Higher/Lower/Correct)
User: Correct
Program: Great! I guessed your number. Would you like to play again? (Yes/No)
User: No
-Program Quits-

## Setup/Installation Requirements

1. Clone this repo:
```
$ git clone this repo URL
```

2. Go into the repo and run this application:
```
$ dotnet run
```

## Known Bugs
* No known bugs at this time.

## Support and contact details
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
## Technologies Used
_Git, GitHub, C# and .NET Core

## License
Copyright © 2019 under the MIT License

repository: jordanHS/high-low

repo_name: jordanHS/high-low


text:
# GitLab Recurring Issues

A Docker image for creating recurring issues based on templates as part of a GitLab scheduled pipeline.

## Usage

Create template issues in the `.gitlab/recurring_issue_templates/` directory. Template issues use YAML front matter for configuration settings. The template body is used as the issue description.

```markdown
---
title: "Daily reminder" # The issue title
confidential: false
duein: "24h" # Duration string as per https://pkg.go.dev/time?tab=doc#ParseDuration (e.g "30m", "1h")
crontab: "@daily" # The recurrance schedule using crontab syntax, such as "*/30 * * * *", or a predefined value of @annually, @yearly, @monthly, @weekly, or @daily
---
This is your daily reminder to perform the following actions

* [ ] Action 1
* [ ] Action 2
```

Create a pipeline in the `.gitlab-ci.yml` file:

```yaml
recurring issues:
  image: ph1ll/gitlab-recurring-issues
  script: gitlab-recurring-issues
  only:
    - schedules
```

Create project CI/CD variables:

| Name | Value |
| ---- | ----- |
| GITLAB_API_TOKEN | The API access token for the user account that will create the issues (see: https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html) |

Finally, create a new schedule under the project CI/CD options, ensuring that the pipeline runs at least as often as your most frequent job.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: default
---

# 1997-05-21 - Re: encryption laws (fwd)

## Header Data

From<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)

To<EMAIL_ADDRESS>Message Hash: 20a4a2310376c308ba6141080ee478eca816fb4eb47e570549628a6d9113f122

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-05-21 07:38:32 UTC

Raw Date: Wed, 21 May 1997 15:38:32 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)
Date: Wed, 21 May 1997 15:38:32 +0800
To<EMAIL_ADDRESS>Subject: Re: encryption laws (fwd)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Jim Choate<EMAIL_ADDRESS>writes:

> Forwarded message:
>
> > Date: Thu, 15 Jul 1993 23:04:39 -0400
> > From: Allan Thompson<EMAIL_ADDRESS>> > Subject: encryption laws
>
> > Would it be possible for a court to subpeona a encrypted file or key,
> >
> > and order you to tell them the key ?
> > If you didn't would you be held in 'contempt of court' ?
>
> If they had reasonable cause to believe you had knowledge of the key and
> were refusing to divulge it under direct order of the court you would be
> held in contempt until you were very old and gray.

Yes - the 5th Amendment is useless like all the other consitutional "rights".

---

Dr.Dimitri Vulis KOTM
Brighton Beach Boardwalk BBS, Forest Hills, N.Y.: +1-718-261-2013, 14.4Kbps

{% endraw %}
```

## Thread

+ Return to [May 1997](/archive/1997/05)

+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "[frissell@panix.com](/authors/frissell_at_panix_com)"
+ Return to "[Jim Choate <ravage@EINSTEIN.ssz.com>](/authors/jim_choate_ravage_at_einstein_ssz_com_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1997-05-21 (Wed, 21 May 1997 12:45:58 +0800) - [encryption laws (fwd)](/archive/1997/05/a8090f77f907a7bad9f84462dd96c798ad42180eccc3ed29cf6f469e0232e1fc) - _Jim Choate<EMAIL_ADDRESS>  + 1997-05-21 (Wed, 21 May 1997 13:50:01 +0800) - [Compelling a key](/archive/1997/05/1e6019c3ba577052795cd2e3a1a3b70523a8341a123836b419c877e833f6bf68) - _Tim May<EMAIL_ADDRESS>  + 1997-05-21 (Wed, 21 May 1997 15:38:32 +0800) - Re: encryption laws (fwd) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
  + 1997-05-21 (Wed, 21 May 1997 20:00:36 +0800) - [Re: encryption laws (fwd)](/archive/1997/05/03ff93ba785e2e5d68e8d10b09d157033d9fe75dfbf54bc0b92a0e4b32815be2) -<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# C++

### Easy

|Problem Solution|Problem Statement|
|:--------------:|-----------------|
|[E0001]|[Say "Hello, World!" With C++]|
|[E0002]|[Input and Output]|
|[E0003]|[Basic Data Types]|
|[E0004]|[Conditional Statements]|
|[E0005]|[For Loop]|
|[E0006]|[Functions]|
|[E0007]|[Pointer]|
|[E0008]|[Arrays Introduction]|
|[E0009]|[Variable Sized Arrays]|
|[E0010]|[StringStream]|
|[E0011]|[Strings]|
|[E0012]|[Structs]|
|[E0013]|[Class]|
|[E0014]|[Classes and Objects]|
|[E0015]|[Box It!]|
|[E0016]|[Vector-Sort]|
|[E0017]|[Vector-Erase]|
|[E0018]|[Lower Bound-STL]|
|[E0019]|[Sets-STL]|
|[E0020]|[Maps-STL]|
|[E0021]|[Inheritance Introduction]|
|[E0022]|[Rectangle Area]|
|[E0023]|[Multi Level Inheritance]|
|[E0024]|[Preprocessor Solution]|
|[E0025]|[Print Pretty]|
|[E0026]|[C++ Class Templates]|
|[E0027]|[Overload Operators]|

### Medium

|Problem Solution|Problem Statement|
|:--------------:|-----------------|
|[M0001]|[Inherited Code]|
|[M0002]|[Exceptional Server]|
|[M0003]|[Virtual Functions]|

[//]: # (Easy)

[E0001]: Easy/E0001.cpp?ts=4
[Say "Hello, World!"

repository: Mohammed-Shoaib/Coding-Problems

repo_name: Mohammed-Shoaib/Coding-Problems


text:
# Setup
1) Setup Jupiter on the same server as your game server
2) Add `RenX.Listen` and `RenX.Relay` to your root `Config.ini`
3) Configure `RenX-ListenServer` (see RenX.Listen.ini) server block in `RenX.Core.ini`. These are the settings for any servers which connect to your bot.
4) In UDKRenegadeX.ini on the game server, replace `devbot.ren-x.com` with `<IP_ADDRESS>`
5) Startup Jupiter Bot
6) Startup game server
7) Verify your server is listed on the RenX server list

### Optional:
It's also possible to use this plugin as a general proxy for devbot traffic, so that you can change the listed IP address of your game server. To do this:
1) Setup Jupiter on the server (i.e: proxy node) you wish to have listed instead of your game server
2) Follow the same steps as above, except use your proxy node's IP address instead of `<IP_ADDRESS>`

# Function

Sanitizes logs going to the Renegade X devbot (server list), and sanitizes commands coming from the Renegade X devbot.

When all sanitizations are disabled, this can also be used to change the listed IP address for a Renegade X server,
without relying on Cronus. This is done by hosting Jupiter on the IP address you wish to have listed, and routing
traffic from there.

# Rationale

*Short*: Thieves shouldn't be trusted with personally identifiable information. This prevents that.

*Long* (copied from RenX.Relay.ini):

Certain server owners report great unease about a specific Totem Arts sysadmin who is entirely unrestrained, who has
entirely unrestrained access to player personal information such as IP addresses, Hardware IDs (MAC addresses),
SteamIDs, and usernames, particularly since it's known that this sysadmin logs all of that information every time any
player joins any Renegade X server. It's also known that this data is stored alongside C&C Renegade player information,
meaning that C&C Renegade players and Renegade X players can be tracked across each game.

By sanitizing personal information going to the DevBot, players can be feel safe knowing that their data is not being
tracked by a sysadmin who is extremely well known to hoard, steal, and misuse data.

license: ISC

repository: JAJames/Jupiter-Bot

gha_license_id: ISC

repo_name: JAJames/Jupiter-Bot


text:
# SPOTIFY CHARTS API (Unofficial)
A fully-fledged installable python package for extracting **top 200** and **viral 50** charts off of [spotifycharts.com](http://spotifycharts.com)

## INSPIRATION
This was built to fill the gap left when Spotify deprecated their official Spotify charts API. It arose as a needed crawler for the Spotify data analysis and machine learning project done [here](bit.ly/incitefuldata)

## INSTALLATION
```bash
pip install fycharts
```

## SAMPLE USAGE
Say you want to extract top 200 daily charts for all time, all regions
```python
from fycharts import SpotifyCharts

api = SpotifyCharts.SpotifyCharts()
api.top200Daily(output_file = 'top_200_daily.csv')
```
Run your program.
```bash
python myCrawler.py
```
Watch the terminal for helpful information.

## FUNCTIONS AND PARAMETERS
Four functions, for all data you need are required:
1. top200Weekly
2. top200Daily
3. viral50Weekly
4. viral50Daily

All four functions take the following parameters:
#### Compulsory
1. output_file - CSV file to dump the data.

#### Optional
1. start - Start date of range of interest as string YYYY-MM-DD
2. end - End date of range of interest as string YYYY-MM-DD

Refer to 'PASSING DATES AS PARAMETERS' below for important information on this.

3. region - Region of interest, as a country abbreviation code. 'global' is also valid

Refer to 'SUPPORTED COUNTRY CODES SO FAR' below for important information of this.

If not included, data is extracted for all dates, all regions

## DATA RETURNED
The data extracted from spotifycharts.com is written into a CSV file with the following fields:
1. position - The song's position during that week or day
2. track name - Name of the song
3. artist - Name of artist
4. region - Region of the chart as a code
5. date - Date or range of dates of chart
6. id - Spotify track id
7. streams - Number of streams for that week or day. **Only applicable to top 200 charts**

## SUPPORTED COUNTRY CODES SO FAR
'global', 'ad', 'ar', 'at', 'au', 'be', 'bg', 'bo', 'br', 'ca', 'ch', 'cl', 'co', 'cr', 'cy', 'cz', 'de', 'dk', 'do', 'ec', 'ee', 'es', 'fi', 'fr', 'gb', 'gr', 'gt', 'hk', 'hn', 'hu', 'id', 'ie', 'il', 'is', 'it', 'jp', 'lt', 'lu', 'lv', 'mc', 'mt', 'mx','my', 'ni', 'nl', 'no', 'nz', 'pa', 'pe', 'ph', 'pl', 'pt', 'py', 'ro', 'se', 'sg', 'sk', 'sv', 'th', 'tr', 'tw', 'us', 'uy', 'vn'

## PASSING DATES AS PARAMETERS
For V1.0.0 dates need to be passed following some strict guidelines.
1. Data goes as far back as 2017-01-05 for viral 50 weekly, 2016-12-22 for top 200 weekly, and 2017-01-01 for all daily.
2. Due to (1) above, when passing the start date esp. for weekly data, the date must be i + (7 days * n) where i: First date defined in (1) above, and n: number of weeks.
If the date isn't valid, you shall be notified with a list of valid dates
3. The API returns data up to and excluding the date passed in the 'end' parameter

## STUFF YOU SHOULD KNOW
When extracting data for a range of dates, in loop, the crawler sleeps every iteration for a random number of seconds between 0 and the index of the date. Dig into the code to change this!!!

repository: vviers/Spotify-Charts-API-Unofficial

repo_name: vviers/Spotify-Charts-API-Unofficial


text:
# Flame graph exercise

## Preparation

run `npm install` in here
Don't analyze `app.js` before trying the task

## Difficulty
Open app.js and modify `HOW_OBVIOUS_THE_FLAME_GRAPH_SHOULD_BE_ON_SCALE_1_TO_100`
It will affect how hard it is to find the function you're looking for.

difficulty level | value
--- | ---
a month old baby would spot it | 100
still easy | 30
normal | 10 (default)
hard | 5
please try normal first ;) | 1

## Task 1
Run the app through perf. Make the following request:
```
curl http://localhost:8080/api/tick
```
Or just open it in the browser.

Generate a flame graph, identify the function in your code that performs the long synchronous computation.

## Task 2
Now for something more realistic.

Start the app, open http://localhost:8080/ to simulate traffic (it repeatedly makes requests to /api/tick), run a short perf on the running process and generate a flame graph. See if you would identify the function under real traffic. Try with shorter sleep and lower profiling frequency too.

repository: Mchl/node-example-flamegraph

repo_name: Mchl/node-example-flamegraph


text:
# `ember-cli-critical`

This addon adds an ember-cli post build hook which runs your built app through [Critical](https://github.com/addyosmani/critical/)

> Critical extracts & inlines critical-path (above-the-fold) CSS from HTML

It will remove the extracted CSS from your stylesheets and rewrite the link tags to point to the new files after inlining.

## Installation

    ember install ember-cli-critical

## Configuration

By default this addon will run only on production builds, but you can change this by overwriting
the `enabled` setting in your `ember-cli-build.js`

```js
{
  "ember-cli-critical": {
    enabled: true,
    critical: {
      // critical options
    }
  }
}

```

See [Critical](https://github.com/addyosmani/critical/#usage) usage for available options.

## Running Tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`


text:
---
title: "How to use the java agent injector?"
date: 2022-04-19
author: "[Ye Cao](https://github.com/dashanji), Apache SkyWalking Committer; [Hongtao Gao](https://github.com/hanahmily), Apache SkyWalking PMC member, Tetrate.io."
description: "Introduce how to quickly get started the java agent injector based on SWCK"

tags:
- User Manual
---

### content:

1. [Introduction](#1.-Introduction)
2. [Features](#2.-Features)
3. [Install SWCK](#3.-Install-SWCK)
4. [Deploy a demo application](#4.-Deploy-a-demo-application)
5. [Verify the injector](#5.-Verify-the-injector)
6. [Concluding remarks](#6.-Concluding-remarks)

## 1. Introduction

### 1.1 What's SWCK?

[SWCK](https://github.com/apache/skywalking-swck) is a platform for the SkyWalking user, provisions, upgrades, maintains SkyWalking relevant components, and makes them work natively on Kubernetes.

In fact, SWCK is an operator developed based on [kubebuilder](https://book.kubebuilder.io/introduction.html), providing users with Custom Resources ( CR ) and controllers for managing resources ( Controller ), all CustomResourceDefinitions（CRDs）are as follows:

- [JavaAgent](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#javaagent)
- [OAP](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#oap)
- [UI](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#ui)
- [Storage](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#storage)
- [Satellite](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#satellite)
- [Fetcher](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#fetcher)

### 1.2 What's the java agent injector?

For a java application, users need to inject the java agent into the application to get metadata and send it to the SkyWalking backend. To make users use the java agent more natively, we propose the java agent injector to inject the java agent sidecar into a pod. The java agent injector is actually a [Kubernetes Mutation Webhook Controller](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/). The controller intercepts pod events and applies mutations to the pod if annotations exist within the request.

## 2. Features

- **Transparent**. User’s applications generally run in normal containers while the java agent runs in the init container, and both belong to the same pod. Each container in the pod mounts a shared memory volume that provides a storage path for the java agent. When the pod starts, the java agent in the init container will run before the application container, and the injector will store the java agent file in the shared memory volume. When the application container starts, the injector injects the agent file into the application by setting the JVM parameter. Users can inject the java agent in this way without rebuilding the container image containing the java agent.

- **Configurability.** The injector provides two ways to configure the java agent: global configuration and custom configuration. The default global configuration is stored in the [configmap](https://kubernetes.io/docs/concepts/configuration/configmap/), you can update it as your own global configuration, such as `backend_service`. In addition, you can also set custom configuration for some applications via [annotation](https://kubernetes.io/zh/docs/concepts/overview/working-with-objects/annotations/), such as “service_name”. For more information, please see [java-agent-injector](https://github.com/apache/skywalking-swck/blob/master/docs/java-agent-injector.md).

- **Observability.** For each injected java agent, we provide [CustomDefinitionResources](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) called `JavaAgent` to observe the final agent configuration. Please refer to [javaagent](https://github.com/apache/skywalking-swck/blob/master/docs/javaagent.md) to get more details.

## 3. Install SWCK

In the next steps, we will show how to build a stand-alone Kubernetes cluster and deploy the 0.6.1 version of SWCK on the platform.

### 3.1 Tool Preparation

Firstly, you need to install some tools as follows:

1. [kind](http://kind.sigs.k8s.io), which is used to create a stand-alone Kubernetes cluster.
2. [kubectl](https://kubernetes.io/docs/tasks/tools/), which is used to communicate with the Kubernetes cluster.

### 3.2 Install stand-alone Kubernetes cluster

After installing `kind` , you could use the following command to create a stand-alone Kubernetes cluster.

> Notice! If your terminal is configured with a proxy, you need to close it before the cluster is created to avoid some errors.

```sh
$ kind create cluster --image=kindest/node:v1.19.1
```

After creating a cluster, you can get the pods as below.

```sh
$ kubectl get pod -A
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
kube-system          coredns-f9fd979d6-57xpc                      1/1     Running   0          7m16s
kube-system          coredns-f9fd979d6-8zj8h                      1/1     Running   0          7m16s
kube-system          etcd-kind-control-plane                      1/1     Running   0          7m23s
kube-system          kindnet-gc9gt                                1/1     Running   0          7m16s
kube-system          kube-apiserver-kind-control-plane            1/1     Running   0          7m23s
kube-system          kube-controller-manager-kind-control-plane   1/1     Running   0          7m23s
kube-system          kube-proxy-6zbtb                             1/1     Running   0          7m16s
kube-system          kube-scheduler-kind-control-plane            1/1     Running   0          7m23s
local-path-storage   local-path-provisioner-78776bfc44-jwwcs      1/1     Running   0          7m16s
```

### 3.3 Install certificates manger(cert-manger)

The certificates of SWCK are distributed and verified by the certificate manager. You need to install the [cert-manager](https://cert-manager.io/docs/) through the following command.

```sh
$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
```

Verify whether cert-manager is installed successfully.

```sh
$ kubectl get pod -n cert-manager
NAME                                       READY   STATUS    RESTARTS   AGE
cert-manager-7dd5854bb4-slcmd              1/1     Running   0          73s
cert-manager-cainjector-64c949654c-tfmt2   1/1     Running   0          73s
cert-manager-webhook-6bdffc7c9d-h8cfv      1/1     Running   0          73s
```

### 3.4 Install SWCK

The java agent injector is a component of the operator, so please follow the next steps to install the operator first.

1. Get the deployment yaml file of SWCK and deploy it.

```sh
$ curl -Ls https://archive.apache.org/dist/skywalking/swck/0.6.1/skywalking-swck-0.6.1-bin.tgz | tar -zxf - -O ./config/operator-bundle.yaml | kubectl apply -f -
```

2. Check SWCK as below.

```sh
$ kubectl get pod -n skywalking-swck-system
NAME                                                  READY   STATUS    RESTARTS   AGE
skywalking-swck-controller-manager-7f64f996fc-qh8s9   2/2     Running   0          94s
```

### 3.5 Install Skywalking components — OAPServer and UI

1. Deploy the OAPServer and UI in the `default` namespace.

```sh
$ kubectl apply -f https://raw.githubusercontent.com/apache/skywalking-swck/master/operator/config/samples/default.yaml
```

2. Check the OAPServer.

```sh
$ kubectl get oapserver
NAME      INSTANCES   RUNNING   ADDRESS
default   1           1         default-oap.default
```

3. Check the UI.

```sh
$ kubectl get ui
NAME      INSTANCES   RUNNING   INTERNALADDRESS      EXTERNALIPS   PORTS
default   1           1         default-ui.default                 [80]
```

## 4. Deploy a demo application

In the third step, we have installed SWCK and related Skywalking components. Next, we will show how to use the java agent injector in SWCK through two java application examples in two ways: global configuration and custom configuration.

### 4.1 Set the global configuration

When we have installed SWCK, the default configuration is the configmap in the system namespace, we can get it as follows.

```sh
$  kubectl get configmap skywalking-swck-java-agent-configmap -n skywalking-swck-system -oyaml
apiVersion: v1
data:
  agent.config: |-
    # The service name in UI
    agent.service_name=${SW_AGENT_NAME:Your_ApplicationName}

    # Backend service addresses.
    collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:<IP_ADDRESS>:11800}

    # Please refer to https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/configurations/#table-of-agent-configuration-properties to get more details.
```

In the cluster created by `kind`, the `backend_service` may not be correct, we need to use the real OAPServer's address `default-oap.default` to replace the default `<IP_ADDRESS>`, so we can edit the configmap as follow.

```sh
$ kubectl edit configmap skywalking-swck-java-agent-configmap -n skywalking-swck-system
configmap/skywalking-swck-java-agent-configmap edited

$ kubectl get configmap skywalking-swck-java-agent-configmap -n skywalking-swck-system -oyaml
apiVersion: v1
data:
  agent.config: |-
    # The service name in UI
    agent.service_name=${SW_AGENT_NAME:Your_ApplicationName}

    # Backend service addresses.
    collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:default-oap.default:11800}

    # Please refer to https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/configurations/#table-of-agent-configuration-properties to get more details.
```

### 4.2 Set the custom configuration

In some cases, we need to use the Skywalking component to monitor different java applications, so the agent configuration of different applications may be different, such as the name of the application, and the plugins that the application needs to use, etc. Next, we will take two simple java applications developed based on `spring boot` and `spring cloud gateway` as examples for a detailed description. You can use the [source code](https://github.com/dashanji/swck-spring-cloud-k8s-demo) to build the image.

```sh
# build the springboot and springcloudgateway image
$ git clone https://github.com/dashanji/swck-spring-cloud-k8s-demo
$ cd swck-spring-cloud-k8s-demo && make

# check the image
$ docker images
REPOSITORY     TAG       IMAGE ID       CREATED          SIZE
gateway        v0.0.1    51d16251c1d5   48 minutes ago   723MB
app            v0.0.1    62f4dbcde2ed   48 minutes ago   561MB

# load the image into the cluster
$ kind load docker-image app:v0.0.1 && kind load docker-image gateway:v0.0.1
```

### 4.3 deploy spring boot application

1. Create the `springboot-system` namespace.

```sh
$ kubectl create namespace springboot-system
```

2. Label the `springboot-system`namespace to enable the java agent injector.

```sh
$ kubectl label namespace springboot-system swck-injection=enabled
```

3. Deploy the corresponding deployment file `springboot.yaml` for the spring boot application, which uses annotation to override the default agent configuration, such as `service_name`.

> Notice! Before using the annotation to override the agent configuration, you need to add `strategy.skywalking.apache.org/agent.Overlay: "true"` to make the override take effect.

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-springboot
  namespace: springboot-system
spec:
  selector:
    matchLabels:
      app: demo-springboot
  template:
    metadata:
      labels:
        swck-java-agent-injected: "true"  # enable the java agent injector
        app: demo-springboot
      annotations:
        strategy.skywalking.apache.org/agent.Overlay: "true"  # enable the agent overlay
        agent.skywalking.apache.org/agent.service_name: "backend-service"
    spec:
      containers:
      - name: springboot
        imagePullPolicy: IfNotPresent
        image: app:v0.0.1
        command: ["java"]
        args: ["-jar","/app.jar"]
---
apiVersion: v1
kind: Service
metadata:
  name: demo
  namespace: springboot-system
spec:
  type: ClusterIP
  ports:
  - name: 8085-tcp
    port: 8085
    protocol: TCP
    targetPort: 8085
  selector:
    app: demo-springboot
```

4. Deploy a `spring boot` application in the `springboot-system` namespace.

```sh
$ kubectl apply -f springboot.yaml
```

5. Check for deployment.

```sh
$ kubectl get pod -n springboot-system
NAME                               READY   STATUS    RESTARTS   AGE
demo-springboot-7c89f79885-dvk8m   1/1     Running   0          11s
```

6. Get the finnal injected java agent configuration through `JavaAgent`.

```sh
$ kubectl get javaagent -n springboot-system
NAME                            PODSELECTOR           SERVICENAME       BACKENDSERVICE
app-demo-springboot-javaagent   app=demo-springboot   backend-service   default-oap.default:11800
```

### 4.4 deploy spring cloud gateway application

1. Create the `gateway-system` namespace.

```sh
$ kubectl create namespace gateway-system
```

2. Label the `gateway-system`namespace to enable the java agent injector.

```sh
$ kubectl label namespace gateway-system swck-injection=enabled
```

3. Deploy the corresponding deployment file `springgateway.yaml` for the spring cloud gateway application, which uses annotation to override the default agent configuration, such as `service_name`. In addition, when using `spring cloud gateway`, we need to add the `spring cloud gateway` plugin to the agent configuration.

> Notice! Before using the annotation to override the agent configuration, you need to add `strategy.skywalking.apache.org/agent.Overlay: "true"` to make the override take effect.

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: demo-gateway
  name: demo-gateway
  namespace: gateway-system
spec:
  selector:
    matchLabels:
      app: demo-gateway
  template:
    metadata:
      labels:
        swck-java-agent-injected: "true"
        app: demo-gateway
      annotations:
        strategy.skywalking.apache.org/agent.Overlay: "true"
        agent.skywalking.apache.org/agent.service_name: "gateway-service"
        optional.skywalking.apache.org: "cloud-gateway-3.x" # add spring cloud gateway plugin
    spec:
      containers:
      - image: gateway:v0.0.1
        name: gateway
        command: ["java"]
        args: ["-jar","/gateway.jar"]
---
apiVersion: v1
kind: Service
metadata:
  name: service-gateway
  namespace: gateway-system
spec:
  type: ClusterIP
  ports:
  - name: 9999-tcp
    port: 9999
    protocol: TCP
    targetPort: 9999
  selector:
    app: demo-gateway
```

4. Deploy a `spring cloud gateway` application in the `gateway-system` namespace.

```sh
$ kubectl apply -f springgateway.yaml
```

5. Check for deployment.

```sh
$ kubectl get pod -n gateway-system
NAME                           READY   STATUS    RESTARTS   AGE
demo-gateway-5bb77f6d85-9j7c6   1/1     Running   0          15s
```

6. Get the finnal injected java agent configuration through `JavaAgent`.

```sh
$ kubectl get javaagent -n gateway-system
NAME                         PODSELECTOR        SERVICENAME       BACKENDSERVICE
app-demo-gateway-javaagent   app=demo-gateway   gateway-service   default-oap.default:11800
```

## 5. Verify the injector

1. After completing the above steps, we can view detailed state of the injected pod, like the injected `agent` container.

```sh
# get all injected pod
$ kubectl get pod -A -lswck-java-agent-injected=true
NAMESPACE           NAME                               READY   STATUS    RESTARTS   AGE
gateway-system      demo-gateway-5bb77f6d85-lt4z7      1/1     Running   0          69s
springboot-system   demo-springboot-7c89f79885-lkb5j   1/1     Running   0          75s

# view detailed state of the injected pod [demo-springboot]
$ kubectl describe pod -l app=demo-springboot -n springboot-system
...
Events:
  Type   Reason   Age                From                           Message
  ----   ------  ----                ----                           -------
  ...
  Normal Created  91s  kubelet,kind-control-plane Created  container inject-skywalking-agent
  Normal Started  91s  kubelet,kind-control-plane Started  container inject-skywalking-agent
  ...
  Normal Created  90s  kubelet,kind-control-plane Created  container springboot
  Normal Started  90s  kubelet,kind-control-plane Started  container springboot

# view detailed state of the injected pod [demo-gateway]
$ kubectl describe pod -l app=demo-gateway -n gateway-system
...
Events:
  Type   Reason   Age            From                         Message
  ----   ------  ----            ----                         -------
  ...
  Normal Created 2m20s kubelet,kind-control-plane Created container inject-skywalking-agent
  Normal Started 2m20s kubelet,kind-control-plane Started container inject-skywalking-agent
  ...
  Normal Created 2m20s kubelet,kind-control-plane Created container gateway
  Normal Started 2m20s kubelet,kind-control-plane Started container gateway
```

2. Now we can expose the service and watch the data displayed on the web. First of all, we need to get the `gateway` service and the `ui` service as follows.

```sh
$ kubectl get service service-gateway -n gateway-system
NAME              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service-gateway   ClusterIP   <IP_ADDRESS>   <none>        9999/TCP   9m19s

$ kubectl get service default-ui
NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
default-ui   ClusterIP   <IP_ADDRESS>   <none>        80/TCP    82m
```

3. Then open two terminals to expose the service:  `service-gateway`、`default-ui`.

```sh
$ kubectl port-forward service/service-gateway -n gateway-system 9999:9999
Forwarding from <IP_ADDRESS>:9999 -> 9999
Forwarding from [::1]:9999 -> 9999
```

```sh
$ kubectl port-forward service/default-ui 8090:80
Forwarding from <IP_ADDRESS>:8090 -> 8080
Forwarding from [::1]:8090 -> 8080
```

4. Use the following commands to access the `spring boot` demo 10 times through the `spring cloud gateway` service.

```sh
$ for i in {1..10}; do curl http://<IP_ADDRESS>:9999/gateway/hello && echo ""; done
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
```

5. We can see the Dashboard by accessing `http://<IP_ADDRESS>:8090`.

![](dashboard.png)

6. All services' topology is shown below.

![](topology.png)

7. We can see the trace information of `gateway-service`.

![](gateway.png)

8. We can see the trace information of `backend-service`.

![](backend.png)

## 6. Concluding remarks

If your application is deployed in the Kubernetes platform and requires Skywalking to provide monitoring services, SWCK can help you deploy, upgrade and maintain the Skywalking components in the Kubernetes cluster. In addition to this blog, you can also view [swck document](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md#operator-Usage-Guide) and [Java agent injector documentation](https://github.com/apache/skywalking-swck/blob/master/docs/java-agent-injector.md) for more information. If you find this project useful, please give [SWCK](https://github.com/apache/skywalking-swck) a star! If you have any questions, welcome to ask in [Issues](https://github.com/apache/skywalking/issues) or [Discussions](https://github.com/apache/skywalking/discussions).

repository: apache/skywalking-website

gha_language: CSS

repo_name: apache/skywalking-website


text:
[![Docker Pulls](https://img.shields.io/docker/pulls/layer5/meshery-cpx.svg)](https://hub.docker.com/r/layer5/meshery-cpx)
[![Go Report Card](https://goreportcard.com/badge/github.com/layer5io/meshery-cpx)](https://goreportcard.com/report/github.com/layer5io/meshery-cpx)
[![Build Status](https://github.com/layer5io/meshery-cpx/workflows/Meshery-Cpx/badge.svg)](https://github.com/layer5io/meshery-cpx/actions)
[![GitHub](https://img.shields.io/github/license/layer5io/meshery-cpx.svg)](LICENSE)
[![GitHub issues by-label](https://img.shields.io/github/issues/layer5io/meshery-cpx/help%20wanted.svg)](https://github.com/layer5io/meshery-cpx/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
[![Website](https://img.shields.io/website/https/layer5.io/meshery.svg)](https://layer5.io/meshery/)
[![Twitter Follow](https://img.shields.io/twitter/follow/layer5.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mesheryio)
[![Slack](http://slack.layer5.io/badge.svg)](http://slack.layer5.io)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3564/badge)](https://bestpractices.coreinfrastructure.org/projects/3564)

# meshery-cpx
Meshery Adapter for CPX

>
If you’re using Meshery or if you like the project, please ★ star this repository to show your support! 🤩

## [Meshery](https://layer5.io/meshery)

A service mesh playground to faciliate learning about functionality and performance of different service meshes. Meshery incorporates the collection and display of metrics from applications running in the playground.

## Contributing
Please do! Contributions, updates, [discrepancy reports](/../../issues) and [pull requests](/../../pulls) are welcome. This project is community-built and welcomes collaboration. Contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

Not sure where to start? See the [newcomers welcome guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit) for how, where and why to contribute. Or grab an open issue with the [help-wanted label](https://github.com/issues?utf8=✓&q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22help+wanted%22+) and jump in.

## License

This repository and site are available as open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).

#### About Layer5
[Layer5.io](https://layer5.io) is a service mesh community, serving as a repository for information pertaining to the surrounding technology ecosystem (service meshes, api gateways, edge proxies, ingress and egress controllers) of microservice management in cloud native environments.

repository: dheerajng/meshery-cpx

repo_name: dheerajng/meshery-cpx


text:
context-applied
=============

[![Build Status](https://travis-ci.com/augustjune/context-applied.svg?branch=master)](https://travis-ci.com/augustjune/context-applied)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.augustjune/context-applied_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.augustjune/context-applied_2.13)

### Overview
**context-applied** is a Scala compiler plugin that gives you a handle to the value
that has the abilities specified by type parameter context bounds.

Example:
```scala
def fn[F[_]: Monad]: F[Int] = F.pure(12)
```

This scales across multiple contexts as well as multiple type parameters:
```scala
def fn[F[_]: Applicative: Traverse, G[_]: Applicative]: G[F[Int]] =
  F.traverse(F.pure(""))(s => G.pure(s.size))
```

*This doesn't require any type class specific syntax nor "summoner" method*.

In fact it is achieved by introducing implicit conversions to the
appropriate value from the implicit scope.

Roughly speaking, you can pretend like you have a value named after the type parameter
of the type that combines specified contexts:
```scala
def fn[A: B: C: D] = {
  val A: B[A] with C[A] with D[A] = ???

// In reality A can be either B[A] or C[A] or D[A] in a particular moment
}
```

### Usage
Plugin is available for Scala 2.11, 2.12 and 2.13.
```scala
addCompilerPlugin("org.augustjune" %% "context-applied" % "0.1.4")
```

### Use cases
1. **Custom algebras.**
    ```scala
    trait Console[F[_]] {
      def read: F[String]

      def write(s: String): F[Unit]
    }

    def reply[F[_]: Console: FlatMap]: F[String] =
      for {
        s <- F.read
        _ <- F.write(s)
      } yield s
    ```

1. **Non-linear type class hierarchy.**

    If you specify two algebras that derive from the same parent,
    because of ambiguity you cannot use that parent's syntax.
    Typical example of this problem is `Monad` and `Traverse` from *cats*
    since they are both subtypes of `Functor`.
    ```scala
     import cats.syntax.all._
     def fn[F[_]: Monad: Traverse](fs: F[String]) =
       fs.map(_.size) // Compiler error
     ```
    With **context-applied** the first context that has *map* method
    in function's context bounds is used.
    ```scala
    def fn[F[_]: Monad: Traverse](fs: F[String]) =
       F.map(fs)(_.size)  // Monad's map is used
    ```

### Supported features
1. Kind-projector support.
   ```scala
   def fn[F[_]: ApplicativeError[*[_], Throwable]]: F[Nothing] =
     F.raiseError(new RuntimeException)
   ```
1. Type parameters of any kinds.
    ```scala
    def fn[F[_]: Applicative, B[_, _]: Bifunctor, A: Monoid] = {
      val fa: F[A] = F.pure(A.empty)
      val rf: Functor[B[A, *]] = B.rightFunctor[A]
    }
    ```
1. Nested scopes.

    Syntax is available for any context bounds: in classes, methods and nested methods.
    ```scala
    class Foo[F[_]: Applicative] {

      def bar[A: Monoid] = {
        def baz[G[_]: Functor](ga: G[A]) =
          G.map(ga)(F.pure)

        baz(List(A.empty))
      }
    }
    ```

### Special cases
Since **context-applied** introduces additional syntax to your program
it is important not to break any existing code or change its meaning.
For this reason there are cases when the plugin
just gracefully skips parts of the program.
It happens when:

1. Name of type parameter is already taken.
    ```scala
    class Foo[F[_]: Functor] {
      val F: Int = 12                  // F: Functor[F] will not be introduced inside Foo
      def f1[A: Monoid](A: Int) = ()   // A: Monoid[A] will not be introduced inside f1
      def f2[F[_]: Monad] = ???        // F: Monad[F] will be available inside f2 as local value
    }
    ```
1. Inside value classes.
    ```scala
    class Foo(val dummy: Boolean) extends AnyVal {
      def fn[F[_]: Monad] = ???        // F: Monad[F] will not be introduced inside fn
    }
    ```

repository: augustjune/context-applied

gha_language: Scala

repo_name: augustjune/context-applied


text:
---
layout: post
published: true
title: Installing Docker on Raspi
image: >-
  https://img00.deviantart.net/4230/i/2012/059/9/1/happy_pie_by_katiiia-d4rc78t.jpg
subtitle: For what it's worth...
---
This one was super easy. There is a one line install on the [raspi page for this](https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/).

`curl -sSL https://get.docker.com | sh`

I also found a great install page [here](https://gist.github.com/tyrell/2963c6b121f79096ee0008f5a47cf347)

For me this didn't work and I got a couple of errors that basically seemed to indicate that the docker service wasn't running. Or I should say it didn't work right off the bat the way I thought. I could run docker version, but i couldn't docker run anything.

After a little looking, I came to [this](https://github.com/moby/moby/issues/30917) page and someone mentioned rebooting. So simple. So elegant. So correct. After a reboot everything was working for me. However, prior to rebooting I also ran `sudo systemctl enable docker` to make sure that docker started up after the reboot as I saw that noted in a few places.

Now, the only caveat is that you need arm specific images. So `docker run microsoft/powershell` didn't work but `docker run armhf/hello-world` works fine. You can get around this by using Kubernetes cluster and probably a variety of other ways where you build the image somewhere else and then run it on the rapi.

[Here](https://www.hanselman.com/blog/HowToBuildAKubernetesClusterWithARMRaspberryPiThenRunNETCoreOnOpenFaas.aspx) is a great article on doing something like that.

branch_name: refs/heads/main


text:
A module used for highlighting.

# File system layout

* [`README.md`](./README.md): this current file
* [`index.js`](./index.js): entry point of the module, provides highligthing for a mode

# Models

* [`color.js`](./color.js): a color representation, basically RGB
* [`font.js`](./font.js): a font representation
* [`style.js`](./style.js): a style for text presentation
* [`stylesheet.js`](./stylesheet.js): a set of rules to apply styles on some portion of text (related to the model of a source code)
* [`range.js`](./range.js): a class to handle ranges, taht is a pair of numbers with notions of beginning, end, exclusion, inclusion

# Versioning

To version: _everything_.

# Documentation

## Highlighting

The _highlighting_ is the process of applying different text presentations on partitions of a text displayed inside a text editor in order to show up the semantic.

Entities implied:

* text, source code
* styling rules

Models representing these entities:

* text: list of token nodes or graph from which this list can be extracted (leaves)
* styling rules: stylesheet

Requirements:

* the token nodes must contain location information
* the token nodes must cover a continous range of text

As usual, there are different ways to represent information, implying more or less processing behind, more or less memory, overhead and so on.

Remember that the actual highlighting will be applied by frontends, which will ask the backend for highligthing information.

The main work of the backend is then to transform models to make them understandable by the frontends.

For efficiency, we must limit the amount of information passed to the frontends.

### Backend

The backend must be able to return a continuous list of ranges with style id information:

* the list of ranges represents the list of token nodes: extract it from the graph if necessary
* the style id must correspond to what is used in the stylesheet: we agreed on unsing the token types

It must also be able to provide a stylesheet. The stylesheet should be provided only once, before any highlighting. However, in case this stylesheet changes it should be able to notify the frontend of a change and to provide it again.

Considering the procedure on frontend side (see below), a good way to notify a stylesheet change is to pass a flag anytime a list of ranges is required by the frontend.

The frontend can configure this behavior at session level.also automatically ask for the entire stylesheet anytime it has changed.

Input:

```javascript
{
	start, // the start of the range for which highlighting is requested
	end // the end of this range
}
```

Output:

```javascript
{
	stylesheet, // optional, a boolean telling if the stylesheet changed or not or the new stylesheet itself
	ranges: [
		{
			start, // always >= 0
			end, // always > start
			style // an id corresponding to an id in the stylesheet
		},
		...
	]
}
```

### Frontend

The frontend must require the stylesheet before applying any highlighting.

It should cache this stylesheet to avoid useless transmission. In case the backend notifies a change of stylesheet while

1. if a graph has been passed, extract its list of leaves
1. for each node of the list find its style from the stylesheet or use the default one (specified in the stylesheet too): the style is referenced by the type specifed in the node
1. from the previous point build a list of ranges (locations)

## Color

A model for a color.

There are different physical models to represent a color: RGB, HSV, ...

Our class implements for now RGB colors and provides:

* construction
* factories

No validation is made for now.

To create a color, either call the constructor or a factory.

Constructor input:

Object:

```javascript
{
	r: 0,
	g: 255,
	b: 1
}
```

* number: a grey scale
* string: the name of a predefined color

Any scale must be comprised between `0` and `255`.

## Font

Format:

```javascript
{
	family: 'name',
	height: 12,
	bold: true,
	strike: false,
	underline: false,
	italic: false,
}
```

Factories:

* String: family
* Number: height
* Boolean: bold

## Style

Format:

```javascript
{
	color,
	background,
	font
}
```

## Stylesheet

# Contribute

## Fix the font / text style confusion

__A font is something with specific properties, related to what is contained in font files.__

So a font will return a kind of glyph, for that it needs only:

* size
* bold
* italic
* ...

Things like underline or line-through are just part of the text decoration, what is on top of letters made from the font.

So externalize to another class the irrelevant properties that are currently in `Font`.

## Highlighted nodes specification

There is a rule than could avoid some boilerplate for the user: any node type set in the stylesheet is necessarily part of the highlighted nodes.

We should automatically extract them.

## Highlighting ranges computation

Sometimes highlighting rules could work with kind of _substraction_.

For instance, a node in range `[0, 20]` could have some style, but one of its child in `[5, 10]` could have a more specific style.

So instead of processing it roughly, which would give the result:

```javascript
[
	{
		start: 0,
		end: 20,
		style // parent node style
	},
	{
		start: 5,
		end: 10,
		style // child node style
	}
]
```

We should detect it (e.g. _if a highlighted node has a parent which is itself among highlighted nodes_ ) and _cut it_ like this:

```javascript
	{
		start: 0,
		end: 4,
		style // parent node style
	}
	{
		start: 5,
		end: 10,
		style // child node style
	}
	{
		start: 11,
		end: 20,
		style // parent node style
	}
```

This should be handled.

## Model

* Color
	* accept HSV & co. format
	* add conversion methods (probably use a third-party) module

repository: Gprasad/editor-backend

repo_name: Gprasad/editor-backend


text:
# PyMenu
An easy-to-use python package to create interactive menus in the terminal.

# Installation
This package is pip installable.
```
pip install interactivemenu
```

# Demo
```python
from interactivemenu import Menu, Option

menu = Menu(
    "Are you sure you want to quit?",
    [
        Option("Yes", True),
        Option("No", False)
    ]
)

if menu.show():
    exit()
else:
    ... # Do stuff
```


text:
---
title: Customer tips - Getting the most out of Profile Merge Rules
description: Varun Kalra, Multi-Solution Consultant at Accordant, gives tips on choosing and using Profile Merge Rules (PMRs).
feature: Profile Merge
topics:
activity: use
doc-type: article
team: Technical Marketing
thumbnail: ugc-pmr.jpg
kt: 6049

role: User
level: Beginner
exl-id: 8aa800af-64c0-43e0-b05d-dbb4f4b0d05b
---
# Customer tips - Getting the most out of Profile Merge Rules

**Varun Kalra**, Multi-Solution Consultant at **Accordant**, gives tips on choosing and using Profile Merge Rules (PMRs).

Varun Kalra is a multi-solution consultant working in a Sydney based Adobe Solution Partner - Accordant. Varun works primarily on Audience Manager, Adobe Analytics and AEP projects which involve data discovery, implementation, support and enablement. Tips include topics such as:

* Identifying campaign goals for PMR configuration
* Deeper dive on a targeting use case
* Use cases for various PMR settings

[Read Varun's Tips in the Experience League Community.](https://experienceleaguecommunities.adobe.com/t5/adobe-audience-manager-blogs/getting-the-most-out-of-profile-merge-rules-tips-tricks-and/ba-p/372248)


text:
# Getting Started

## Signup

The registration process for cloco is very easy.  Sign into cloco with GitHub and authorize cloco to read your GitHub profile.  We'll use this to create a user account and a subscription in cloco with the same name as your GitHub username.

You can log in or sign up for cloco from the cloco website [https://www.cloco.io](https://www.cloco.io).

<aside class="warning">
Currently we only support GitHub login.
</aside>

## Install the cloco-cli

The command line interface for managing cloco is available on pypi.

```shell
# install the cloco cli using pip
pip install cloco-cli
```

## Setting API Credentials

When you register on the [cloco website](https://www.cloco.io) you will need to generate API credentials in order to use the cloco client and the cloco cli.

Once you have obtained your credentials you should initialize the cloco cli with them.  The cloco cli will then use the credentials to retrieve an access token from cloco.

```shell
# set api credentials for the cli to use
cloco init --key <cloco_client_key> --secret <cloco_client_secret>
```

### Parameters

Parameter | Description | Usage
--------- | ----------- | -----
key | The client key from the API credentials. | Required for the cloco cli.
secret | The client secret from the API credentials. | Required for the cloco cli.

## Setting Defaults

```shell
# To set the default subscription
cloco init --sub <subscription_id>

# To set the default application
cloco init --app <application_id>

# To set the default environment
cloco init --env <environment_id>

# To set the default API URL (for on-premise installations):
cloco init --url <api url>
```

Using the cloco cli you can set defaults for subscription, application, environment, and for use with on-premise installs of cloco, the API URL.

### Parameters

Parameter | Description | Usage
--------- | ----------- | -----
sub | The ID of the subscription. | Optional.
app | The ID of the application. | Optional.
env | The ID of the environment. | Optional.
url | The cloco API url. | Optional.  Will default to the public hosted cloco API.  Set this for on-premise installations.

<aside class="notice">
Note that these are saved under the logged on user's home directory, so if you are initializing for an application you will need to execute these using the same user as the application will run under.
</aside>

repository: cloudconfig/cloco-docs

repo_name: cloudconfig/cloco-docs


text:
# Pizza Delivery Fullstack App

This is the fullstack application for the Pizza Delivery API project containting both the API and the client side application.

## Usage

Visit [Pizza Delivery](https://hot-pizzadelivery.herokuapp.com/) Application. You can also visit the [API](https://github.com/majid9218/Pirple_Node.js_Master_Class/tree/master/assignment_2) to see how it works.

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# react-form
[![npm version](https://badge.fury.io/js/react-form.svg)](http://badge.fury.io/js/react-form)
[![Build Status](https://travis-ci.org/korbin/react-form.svg?branch=master)](https://travis-ci.org/korbin/react-form)

## Synposis
**react-form** is a lightweight, opinionated form-building system for [React](https://github.com/facebook/react). The react-form DSL was designed to produce clean code that directly resembles an underlying object hierarchy.

## Design Goals
- Consistent, clean, fun-to-use DSL.
- Server-side rendering is assumed.
- Input components are pluggable.
- HTTP POST backward compatibility.

## Quick Start
Install react-form, react-form-inputs:
```Shell
npm install --save react-form react-form-inputs
```
Basic usage example (JSX+ES6):

```JavaScript
var React = require('react');
var {Form, Input} = require('react-form');
var {Password, Text} = require('react-form-inputs');

var LoginForm = React.createClass({
  render() {
    return (
      <Form {...this.props} for="user">
        <h1>Login</h1>
        <Input type={Text} for="username" placeholder="Username" />
        <Input type={Password} for="password" placeholder="Password" />
        <input type="submit" value="Login" />
      </Form>
    );
  }
});

var user = {
  username: null,
  password: null
};

React.render(<LoginForm object={user} />, document.getElementById('login'));
```

react-form ships with an example application - try it out:

```Shell
cd example
npm install
npm link ../
node app
#Open http://localhost:3000
```

## Technical
### Object mapping
react-form uses a context-based materialized path system to track and propagate object changes.

The *Form*, *Inputs*, and *Input* components expose interfaces to easily reference nodes anywhere in an object hierarchy. Each of the aforementioned components represents a "path segment."

Each of these components exposes

### Components
#### Form
Form is a required outer container component. Form components are responsible for maintaining state and propagating changes. Form exposes event interfaces for advanced integration with a parent application, Store, component, etc.

Form has several configurable props:
- **for** `String` - Namespace for a Form instance. Used to generate input names. Defaults to "object."
- **object** `Object` - Object used to hydrate input fields. Defaults to "{}."
- **onSubmit** `Function(event)` - Called when Form instance is submitted.
- **onUpdate** `Function(path, value)` - Called when a nested Input at *path* undergoes a value change to *value*. NOTE: Supplying this handler disables internal Form state management; onUpdate must replace props.object to trigger a rerender.
- Unmentioned props are applied to the resulting form tag.

**Tip:** When implementing a custom onUpdate or onSubmit handler, use objectPath and
this.getValue() to negotiate object changes.

#### Inputs
Inputs is a nested container element. Inputs is required to reference nested objects and arrays of objects. **Inputs is not utilized in simple, single-tier models.**

When referencing an Array of objects, all children are duplicated and mapped to each array element.

Inputs has two user-configurable props:
- **for** `String` - Required path segment. Must reference an object or array of objects.
- **forName** `String` - Optionally used to override "name" attributes of nested components.

Example:
```JavaScript
var {Form, Inputs} = require('react-form');
var gizmo = { //path: []
    widgets: [ //path: [widgets] <-- INPUTS
        { color: "Red" }, //path: [widgets, 0, color]
        { color: "Blue" } //path: [widgets, 1, color]
//...
<Form for="gizmo" object={gizmo}>
  <Inputs for="widgets"> //in this example, children will be duplicated twice
```

#### Input
Input is the most commonly-used component. Input is used to render form controls, each varying in function and complexity.

Input requires API-compliant, pluggable components known as "types." For flexibility, no Input types ship with react-form. A number of useful, common components can be found in [react-form-inputs](https://github.com/korbin/react-form-inputs).

Input has three universally-applicable props:
- **type** `Input type` - Required, API-compliant component to render.
- **for** `String` - Required path segment. Must reference a value appropriate for given Input type.
- **forName** `String` - Optionally used to override generated Input "name."

See type-specific documentation for respective Input types for additional, configurable props.

Example:
```JavaScript
var React = require('react');
var {Form} = require('react-form');
var Text = require('react-form-inputs/text');

var gizmo = { //path: []
    name: "Foo" //path: [name]
//...
<rf.Form for="gizmo" object={gizmo}>
    <rf.Input type={Text} for="name" /> //Initial value of "Foo"
```

### Addons
Documentation regarding the built-in addon system will be provided in an upcoming release. Optional addons enabling conformity with Rails-conventions, field label generation, and error handling are in development.

## Developing
Presently, react-form APIs are highly unstable, untested, and explosive!

Run tests:
```Shell
npm test
```

Link a dependent project:
```Shell
#Within dependent project directory...
npm link ~/path-to-react-form/
```

## Contributing
- [Fork](https://github.com/korbin/react-form/fork) the project.
- Create a descriptively-named branch for your changes. *(fix_whatever, add_this)*
- Commit your change.
- Add appropriate documentation, test coverage.
- Test with "npm test" (requires jest-cli).
- Issue a [pull request](https://github.com/korbin/react-form/pulls) for your branch.

## Thanks
The react-form DSL was **heavily** inspired by (stolen from) [Formtastic](https://github.com/justinfrench/formtastic).

## License
react-form is released under the [MIT License](https://github.com/korbin/react-form/blob/master/LICENSE).


text:
Title:     Maven

# Building the Olingo Project
---

The project uses Git for source code management and version control and uses Maven for build.

### Clone the project

To get the code for just clone the project from:

##### OData 2.0 repository

    git clone https://gitbox.apache.org/repos/asf/olingo-odata2

##### OData 4.0 repository

    git clone https://gitbox.apache.org/repos/asf/olingo-odata4

### Building the Project

The project builds with Maven. Simply call

    mvn clean install

to run the build, execute JUnit tests and create all artifacts.

Further information to Git and Maven is available here:

* http://git-scm.com/
* http://maven.apache.org


text:
---
layout: post
title: FFT multiplication algorithm
---

We introduced in a [previous post](/Bignumbers1/) a library for operating with arbitrarily big numbers, where we implemented some basic arithmetic operations, like addition, multiplication and division.

In this post we will focus on improving the efficiency of the multiplication algorithm through [Fast Fourier Transforms](https://en.wikipedia.org/wiki/Multiplication_algorithm#Fourier_transform_methods).

## The algorithm

Let’s take two random numbers, say

$$\begin{array}{c}  a = 143672,\\  b = 669381  \end{array}$$

The multiplication result is

$$a \cdot b =<PHONE_NUMBER>2$$

If we see each number as a **digit sequence** (digits between 0 and 9), we can think of each of those digits as **coefficients of a polynomial**. The multiplication of two polynomials and the ordinary multiplication are closely related

$$\begin{array}{c}  p_a(x) = x^5+4\,x^4+3\,x^3+6\,x^2+7\,x+2\\  p_b(x) = 6\,x^5+6\,x^4+9\,x^3+3\,x^2+8\,x+1  \end{array}$$

$$\begin{array}{c}  p_a(x) \cdot p_b(x) = 6\,x^{10} + 30\,x^9 + 91\,x^8 + 53\,x^7 + 125\,x^6 + 150\,x^5 + \\  121\,x^4 + 90\,x^3 + 68\,x^2 + 23\,x + 2  \end{array}$$

Thus, we obtain the sequence `[6 30 91 53 125 150 121 90 68 23 2]`. As some of these digits are greater than 9, we need to apply a [carry propagation](https://en.wikipedia.org/wiki/Carry_(arithmetic))  correction, obtaining the sequence `[9 6 1 7 1 3 0 7 0 3 2]`, which is the result we were looking for. The carry correction algorithm has a [time complexity](https://en.wikipedia.org/wiki/Time_complexity) of order $$O(n)$$.

It is well known that a polynomial multiplication algorithm is equivalent to a [discrete convolution](https://en.wikipedia.org/wiki/Convolution#Discrete_convolution) over the coefficients, so we can also conceive our digit sequences as [discrete signals](https://en.wikipedia.org/wiki/Discrete_signal).

  Figure 1: Convolution of two discrete signals.

The discrete convolution can be computed as

$$(a * b)[n] = \displaystyle{\sum_{m=-\infty}^{\infty}{a[m] \cdot b[n-m]}}.$$

The classical algorithm for the convolution has an order of $$O(n^2)$$ time complexity, so there is no point at the moment. To reduce this complexity, we’ll use the [convolution theorem](https://en.wikipedia.org/wiki/Convolution_theorem), which tells us that the Fourier transform of a convolution is the pointwise product of the Fourier transforms.

$$\mathcal{F}\{a * b\} = \mathcal{F}\{a\} \cdot \mathcal{F}\{b\}.$$

That is, we can compute the DFTs of the original signals, multiply them pointwise, compute the inverse DFT and apply the decimal correction. The key point is that we can use efficient [FFT algorithms](https://en.wikipedia.org/wiki/Fast_Fourier_transform) to compute both the DFT and the inverse DFT.

  Figure 2: Block diagram of the algorithm.

From a $$O(n^2)$$ order algorithm, we have moved to the computation of two FFTs, with order $$O(n \cdot log_2(n))$$ each one, a pointwise product, with $$O(n)$$, an inverse FFT, with $$O(n \cdot log_2(n))$$, and a carry propagation correction, with $$O(n)$$, so putting all together, our final algorithm will have an order of $$O(n \cdot log_2(n))$$, much better than the original algorithm.

As a final optimization, it is possible to avoid computing one of the two FFTs if we take into account that the original signals are both real, so if we build a complex signal which carries one of the signals in its real part and the other signal in the imaginary part

$$c[n] = a[n] + i\,b[n],$$

we can extract the original signals applying the real part and imaginary part operators

$$\begin{array}{c}  a[n] = \Re\{y[n]\} = \dfrac{c[n] + c^*[n]}{2}\  \\  b[n] = \Im\{y[n]\} = \dfrac{c[n] - c^*[n]}{2\,i}  \end{array}.$$

Using the following property of the Fourier transform

$$a^*[n] \longrightarrow \mathcal{F}\{a\}^*[-n],$$

we can compute now the DFT of the composite signal and extract the DFTs of the original signals

$$\begin{array}{c}  \mathcal{F}\{a\}[n] = \dfrac{\mathcal{F}\{c\}[n] + \mathcal{F}\{c\}^*[-n]}{2}\  \\  \mathcal{F}\{b\}[n] = \dfrac{\mathcal{F}\{c\}[n] - \mathcal{F}\{c\}^*[-n]}{2\,i}  \end{array},$$

where the extra operations have all order $$O(n)$$.

  Figure 3: Algorithm with only 1 FFT.

## The code

Starting from the original code, some functions have been added: FFT and inverse FFT computation functions, in the files [fft.h](https://github.com/ibancg/bignumbers/blob/1.0.1/fft.h) and [fft.c](https://github.com/ibancg/bignumbers/blob/1.0.1/fft.c). Also, the memory allocation is now dynamic in order to deal with really huge numbers; furthermore, the show() function has been improved in such a way that it only prints the most and less significant digits with very big numbers, while the whole computation is dumped to the file *output.txt*.

To test the new multiplication algorithm, the program evaluates the largest known prime number at the moment this post was written, [the Mersenne prime](https://en.wikipedia.org/wiki/Mersenne_prime) $$2^{43,112,609}-1$$, with 12,978,189 digits. You no longer need to modify `BigNumber::N_DIGITS`, it will automatically adapt to the selected exponent. In this case, we need $$2^{24}$$ = 16,777,216 figures - must be power of 2 - to compute a number with 13 million digits.

The algorithm used to obtain the Mersenne number is detailed in the source code. You will need a few minutes and 1,3 GB of RAM memory to run the program with the current configuration in a normal - as of 2010 - computer. If that’s too long for you, you can compute a cheaper Mersenne prime, e.g. the number $$2^{3,021,377}-1$$ (with 909,526 digits), in a few seconds.

Take a look to those humongous numbers to get an idea of what we are talking about. Find below the execution output for both of them in raw text formatted to 75 columns. Can you imagine how hard it must be to proof that they are indeed prime numbers?

* [Output for Mersenne prime number $$2^{3,021,377}-1$$](/images/mersenne-3021377.zip)
* [Output for Mersenne prime number $$2^{43,112,609}-1$$](/images/mersenne-43112609.zip)

It is possible to aplly some improvements with parallelization and a more dynamic memory allocation, but that’s beyond the scope of this post. In future articles we will introduce algorithms to perform more complicated mathematical operations, like square roots.

## Links

* [Library hosted on github.com](https://github.com/ibancg/bignumbers) (the code explained here is tagged as [1.0.1](https://github.com/ibancg/bignumbers/releases/tag/1.0.1), the posterior code can contain improvements explained in future posts)
* [Source code](https://github.com/ibancg/bignumbers/archive/1.0.1.zip)


text:
# Enron Email Dataset Investigation

This project is 6th of the data analyst nano degree of Udacity, Intro to Machine Learning.

The goal is to build a machine learning capable of catch the person on interest in the Enron database. As person of interest we meant the people that were , or supposed, involved in the Enron bankruptcy and caused it.

The dataset is quite small and contain only few poi , and 146 line. Features are monetary, as salary and other sources of income, but as well information about the mail, like email sent to poi or received ans so on.

##Project Overview

In 2000, Enron was one of the largest companies in the United States. By 2002, it had collapsed into bankruptcy due to widespread corporate fraud. In the resulting Federal investigation, a significant amount of typically confidential information entered into the public record, including tens of thousands of emails and detailed financial data for top executives. In this project, you will play detective, and put your new skills to use by building a person of interest identifier based on financial and email data made public as a result of the Enron scandal. To assist you in your detective work, we've combined this data with a hand-generated list of persons of interest in the fraud case, which means individuals who were indicted, reached a settlement or plea deal with the government, or testified in exchange for prosecution immunity.

## Features

### Financial features

- bonus
- deferral payments
- deferred income
- director fees
- exercised stock options
- expenses
- loan advances
- long term incentive
- other
- restricted stock
- restricted stock_deferred
- salary
- total payments
- total stock value

(all units are in US dollars)

### Email features

- email address
- from messages
- from poi to this person
- from this person to poi
- to messages
- shared receipt with poi

(units are generally number of emails messages; notable exception is ‘email_address’, which is a text string)

### POI label

- poi

(boolean, represented as integer)

## References

- http://scikit-learn.org/stable/index.html


text:
## Persistent Workers

### Introduction

Cirrus CI pioneered an [idea of directly using compute services](https://medium.com/cirruslabs/core-principle-of-continuous-integration-systems-is-obsolete-8d926e17c721)
instead of requiring users to manage their own infrastructure, configuring servers for running CI jobs, performing upgrades, etc.
Instead, Cirrus CI just [uses APIs of cloud providers](supported-computing-services.md) to create virtual machines or containers on demand. This fundamental
design difference has multiple benefits comparing to more traditional CIs:

1. **Ephemeral environment.** Each Cirrus CI task starts in a fresh VM or a container without any state left by previous tasks.
2. **Infrastructure as code.** All VM versions and container tags are specified in `.cirrus.yml` configuration file in your Git repository.
   For any revision in the past Cirrus tasks can be identically reproduced at any point in time in the future using the exact versions of VMs or container tags specified in `.cirrus.yml` at the particular revision. Just imagine how difficult it is to do a security release for a 6 months old version if your CI environment independently changes.
3. **Predictability and cost efficiency.** Cirrus CI uses elasticity of modern clouds and creates VMs and containers on demand
   only when they are needed for executing Cirrus tasks and deletes them right after. Immediately scale from 0 to hundreds or
   thousands of parallel Cirrus tasks without a need to over provision infrastructure or constantly monitor if your team has reached maximum parallelism of your current CI plan.

### What is a Persistent Worker

For some use cases the traditional CI setup is still useful. However, not everything is available in the cloud. For example,
Apple releases new ARM-based products and there is simply no virtualization yet available for the new hardware.
Another use case is to test the hardware itself, since not everyone is working on websites and mobile apps after all! For such use cases
it makes sense to go with a traditional CI setup: install some binary on the hardware which will constantly pull for new tasks
and will execute them one after another.

This is precisely what Persistent Workers for Cirrus CI are: a simple way to run Cirrus tasks beyond cloud!

### Configuration

First, create a persistent workers pool for [your personal account](https://cirrus-ci.com/settings/profile/) or a GitHub organization (`https://cirrus-ci.com/settings/github/<ORGANIZATION>`):

<img src="/assets/images/screenshots/worker-pools.png" />

Once a persistent worker is created, copy registration token of the pool and follow [Cirrus CLI guide](https://github.com/cirruslabs/cirrus-cli/blob/master/PERSISTENT-WORKERS.md)
to configure a host that will be a persistent worker.

Once configured, target task execution on a worker by using `persistent_worker` instance and matching by workers' labels:

```yaml
task:
  persistent_worker:
    labels:
      os: darwin
      arch: arm64
  script: echo "running on-premise"
```

Or remove `labels` filed if you want to target any worker:

```yaml
task:
  persistent_worker: {}
  script: echo "running on-premise"
```


text:
[![Release](https://img.shields.io/github/release/trustbloc/trustbloc-did-method.svg?style=flat-square)](https://github.com/trustbloc/trustbloc-did-method/releases/latest)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/trustbloc/trustbloc-did-method/main/LICENSE)
[![Godocs](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/trustbloc/trustbloc-did-method)

[![Build Status](https://dev.azure.com/trustbloc/edge/_apis/build/status/trustbloc.trustbloc-did-method?branchName=main)](https://dev.azure.com/trustbloc/edge/_build/latest?definitionId=38&branchName=main)
[![codecov](https://codecov.io/gh/trustbloc/trustbloc-did-method/branch/main/graph/badge.svg)](https://codecov.io/gh/trustbloc/trustbloc-did-method)
[![Go Report Card](https://goreportcard.com/badge/github.com/trustbloc/trustbloc-did-method)](https://goreportcard.com/report/github.com/trustbloc/trustbloc-did-method)

# TrustBloc DID Method

This repo defines the trustbloc DID method, which is described [in the spec](/docs/spec/trustbloc-did-method.md).

The TrustBloc DID Method REST server docker image serves requests from the HTTP drivers of the [DIF universal resolver](https://github.com/decentralized-identity/universal-resolver) and [universal registrar](https://github.com/decentralized-identity/universal-registrar/).

## Build
To build from source see [here](/docs/build.md).

## CLI
Manage DID's.
- [Create DID](/docs/cli/create.md)
- [Update DID](/docs/cli/update.md)
- [Recover DID](/docs/cli/recover.md)
- [Deactivate DID](/docs/cli/deactivate.md)

## Contributing
Thank you for your interest in contributing. Please see our [community contribution guidelines](https://github.com/trustbloc/community/blob/main/CONTRIBUTING.md) for more information.

## License
Apache License, Version 2.0 (Apache-2.0). See the [LICENSE](LICENSE) file.

repository: trustbloc/trustbloc-did-method

gha_language: Go

repo_name: trustbloc/trustbloc-did-method


text:
Specific image version
======================

Using latest tag for image versions might result
breaking changes in the container. Defining specific
version for the image helps with predictability.

Maintainers of the images are responsible what the
version actually contains. For example python:2.7
does not automatically mean the image contains
python 2.7 binaries. It's just a convention for naming.

repository: casualuser/docker-examples

repo_name: casualuser/docker-examples


text:
---
hrs_structure:
  division: '1'
  volume: '3'
  title: '12'
  chapter: '171'
  section: 171-8
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0171-0008
    parent: HRS0171
    name: 171-8 Land agents and other employees
weight: 66055
title: Land agents and other employees
full_title: 171-8 Land agents and other employees
---
**§171-8 Land agents and other employees.** The board shall be represented in each land district by a district land agent. The board may employ other necessary employees.

The district land agent shall exercise the powers and duties delegated by the board and shall report to the designated representative of the board.

The appointment, removal, and compensation of district land agents and other employees shall be determined in accordance with chapter 76\. [L 1962, c 32, pt of §2; am L 1965, c 202, §1; Supp, §103A-8; [HRS §171-8](/title-12/chapter-171/section-171-8/); am L 1971, c 154, §1; am L 1981, c 116, §3; am L 2000, c 253, §150]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Decoders

This package provides various decoders to handle decoding of incoming REQUEST bodies.

The following decoders are provides out of the box:

  * [JSON](json.go) handles decoding json objects
  * [XML](xml.go) handles  decoding xml objects

# Writing and registering your own decoders

A decoder is simply a function that matches the `decoders.Func`
func.

```go

func JSON(r io.Reader, v interface{}) error {
	defer io.Copy(ioutil.Discard, r)
	return json.NewDecoder(r).Decode(v)
}

```

To register the docoder with a `render.Controller`, all that is need
is to call the `SetDecoder` method with the given content-type the
decoder will handle.

```go

// This is using the default Controller
render.SetDecoder(ContentType("application/my-json"),JSON)

```

Some predefined content type can be found at [content_type.go](../content_type.go#L182)

repository: gdey/chi-render

repo_name: gdey/chi-render


text:
# DataManager Client
This is the client for the [DataManagerServer](https://github.com/JojiiOfficial/DataManagerServer). It supports uploading, downloading, editing, deleting, moving and en/decrypting files.

# Screenshot
![File List](https://very.highly.illegal-dark-web-server.xyz/preview/raw/5eFeAZ5HRIxuUMIxx4SzUbYwZ)

# Installation
Go 1.11+ is required
```go
go mod download && go build -o main && sudo mv main /usr/local/bin/manager
```

# Setup
Run `manager ping` once to create a config file in `~/.dmanager/`. Change the 'server.url' to your DataManager server url.

# Register/Login
Use `manager register` to create an account. The `allowregistration` must be set to true in the server config.

Use `manager login` to login into your account

# Config

#### Client
`autofilepreview` Preview files using the default application. If you turn it off you will see the file content in the terminal
`defaultorder` The default order for listing files. (id, name, size, pubname, created, namespace). Add '/r' at the end to reverse the order

`defaultdetails` The depth of details if no --details flag was set

`trimnameafter` Trims filename after n chars and append a `...` to the end of the filename

#### Default
`namespace` The default namespace to use

`tags` Specify tags to use as default for uploading filetags

`groups` Specify groups to use as default for uploading filegroups

# Usage
```bash
manager [<flags>] <command> [<args> ...]
```

Tipp: Run `manager --help-man | man -l -` to view the manpage of manager

### Autocompletion
#### Bash
```bash
eval "$(manager --completion-script-bash)"
```
#### Zsh
```zsh
eval "$(manager --completion-script-zsh)"
```

### Examples

#### User
- Register `manager register`
- Login `manager login`

#### Files
- Upload and share your .bashrc `manager upload -t dotfile -g myLinuxGroup --public ~/.bashrc`
- Upload and encrypt your .bashrc `manager upload ~/.bashrc --encrypt aes -r`
- List files `manager files`
- List files having the a tag called 'dotfile' `manager files -t dotfile`
- Delete file by ID `manager file rm 123`
- Delete file by Name  `manager file rm aUniqueName.go`
- Delete all files in namespace `manager file rm % -ay`
- Edit a file `manager file edit 123`
- Add tags to a file `manager file update --ad-tags t1,t2`
- Publish a file `manager file publish <fileID>`

#### Namespace
- List all your namespaces `manager namespaces`
- Create a namespace `manager namespace create <name>`
- Delete a namespace `manager namespace delete <name>`

repository: mosinu/dataClient

repo_name: mosinu/dataClient


text:
Question
--------

You've been told to implement some functionality while preserving encapsulation.
What are your options? What's your approach?
> ?
> Bonus points:

### Some follow-up questions
You've mentioned closures, what are they?
> ?
> Bonus points:

You've mentioned symbols, in what way they solve this issue?
> ?
> Bonus points:

You've mentioned `WeakMap`, in what way it solves this issue?
> ?
> Bonus points:


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.23.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-08-28)

### Features

* Allow launcher to fetch debug data from the worker ([2675c28](https://github.com/konnectors/libs/commit/2675c289e30ce410917cee39f1344f594a773daf))

## [0.22.3](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-08-25)

### Bug Fixes

* Remove allowed log level check ([6bc33e6](https://github.com/konnectors/libs/commit/6bc33e61f59198781be82ab840764bfa1639b64b))

## [0.22.2](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-08-21)

### Bug Fixes

* Regression on regular file download ([f4cce5d](https://github.com/konnectors/libs/commit/f4cce5d9a86a907f0c308e9443fe7a8e966820e8))

## [0.22.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-08-04)

### Bug Fixes

* Add specfic error message when file is empty in saveFiles ([2268e00](https://github.com/konnectors/libs/commit/2268e0069d778e419cf5fd8ebaae819283bf0f00))
* SaveFiles now converts entries with dataUri to ArrayBuffer ([a261b80](https://github.com/konnectors/libs/commit/a261b80ccd7ee8e6cf506e5a3e6835f86936aac4))

# [0.22.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-31)

### Features

* **clisk:** Force log timestamp to milliseconds ([9bca920](https://github.com/konnectors/libs/commit/9bca9204c1a1a7aec11929a5d866fc2749467ee2))

## [0.21.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-28)

### Bug Fixes

* Declare waitForNotAuthenticated ([7c035d7](https://github.com/konnectors/libs/commit/7c035d7b670999fcd2a09f25c1ce26664c9dab7e))
* Default value for waitForAuthenticated* methods ([c85b8ba](https://github.com/konnectors/libs/commit/c85b8bae944876f2f614197a99f1362ced3ea0c4))
* waitForNotAuthenticated result ([835e139](https://github.com/konnectors/libs/commit/835e139bf02a24be71cb1338735a826f75c87197))

# [0.21.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-28)

### Features

* Add waitForNotAuthenticated shortcut method to ContentScript ([58efb8d](https://github.com/konnectors/libs/commit/58efb8de025d66a82517f12300e00d012acd2012))

## [0.20.3](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-25)

### Bug Fixes

* Do not send page message on ContentScript file import ([dc76c78](https://github.com/konnectors/libs/commit/dc76c7819747f472ae62f7057d51199fa778b6df))

## [0.20.2](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-05)

### Bug Fixes

* Duplicated identities ([5039e4e](https://github.com/konnectors/libs/commit/5039e4e63b1db8bbf8bde6924761e43bb654c431))

## [0.20.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-05)

**Note:** Version bump only for package cozy-clisk

# [0.20.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-07-04)

### Features

* Add blockWorkerInteractions command in content script ([b082997](https://github.com/konnectors/libs/commit/b082997b04182a609141285470a6863eba20d311))
* Add queryAll method to content script ([5436082](https://github.com/konnectors/libs/commit/5436082e18648eac20301ab0c496a173f2a912ed))

# [0.19.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-30)

### Features

* Add sourceAccountIdentifer in addData ([6e905c0](https://github.com/konnectors/libs/commit/6e905c049c5c0689d2e3aa870406e68e7a2c533a))

# [0.18.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-29)

### Features

* Add a onWorkerReady callback to the content script ([2d94b0e](https://github.com/konnectors/libs/commit/2d94b0ef7d5a57f98477719e2934d2e6a1c274a9))

# [0.17.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-28)

### Features

* Add evaluateInWorker method ([5ce1d6e](https://github.com/konnectors/libs/commit/5ce1d6e9d47f011edd43b5bb9d2f0d362f55b5b6))

## [0.16.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-26)

### Bug Fixes

* Enhance timeout error message in waitForAuthenticated ([0a96f0b](https://github.com/konnectors/libs/commit/0a96f0bbece6963103b93bc319e6ed52c10566bd))

# [0.16.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-23)

### Features

* Allow waitForElementInWorker to set its own timeout ([0e8fbda](https://github.com/konnectors/libs/commit/0e8fbdaca635c6c33ae9ade6fc4dbbbe07986551))

# [0.15.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-23)

### Features

* Add qualification label handling ([90916e3](https://github.com/konnectors/libs/commit/90916e388129d9d2bfcd4548f35e6a500fa09b07))
* Be more restrictive on mandatory fields ([3a21067](https://github.com/konnectors/libs/commit/3a2106751e84fb03722011aab8350ef09d7c40eb))
* Download files progressively only when needed ([238b1f0](https://github.com/konnectors/libs/commit/238b1f0f5cc72dc1c4df9e808b99ac4e321447c9))

### BREAKING CHANGES

* Metadata attributes are now mandatory

File metadata attributes were not mandatory to allow progressive
migration to file metadata deduplication for node konnector.

Here all clisk konnectors use metadata deduplication. I think it is
better to remove this unneeded complexity in the code

Now we throw an error directly if any metadata attributes are missing.

## [0.14.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-09)

### Bug Fixes

* Add forgotten declaration for checkForElement ([82f92c6](https://github.com/konnectors/libs/commit/82f92c62755753e6de91b9c329b97e1f05137b68))

# [0.14.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-09)

### Features

* Add a function to check if element is present in the worker ([f90e787](https://github.com/konnectors/libs/commit/f90e78795a7a28244e4ad3b4d7bf5870f642192b))

# [0.13.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-06-01)

### Features

* Handle sub path in launcher saveFiles ([0b47e17](https://github.com/konnectors/libs/commit/0b47e173544c4c3edb519fa659a78d217a794383))

## [0.12.2](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-05-23)

### Bug Fixes

* Deduplicate identities on createdByApp ([f9d8fbe](https://github.com/konnectors/libs/commit/f9d8fbec5736ae4f14144c2fdb213f6953ecfe63))

## [0.12.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-04-24)

### Bug Fixes

* **deps:** pin dependencies ([dee699e](https://github.com/konnectors/libs/commit/dee699e0b532447c68f986997a6668bdee8be659))

# [0.12.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-04-24)

### Bug Fixes

* ignore p-timeout and p-wait-for in jest transforms ([4db2b09](https://github.com/konnectors/libs/commit/4db2b091e6f828faf22b59cc6088e0f30e867106))

### Features

* Enhance timeout error messages ([00e7b7b](https://github.com/konnectors/libs/commit/00e7b7b76bd7742f742d0dbf0f8e763843479b51))

# [0.11.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-28)

### Features

* Add getCliskVersion method ([5f39898](https://github.com/konnectors/libs/commit/5f398989a487525413659e80807b75f12b6aa4f6))

# [0.10.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-22)

### Bug Fixes

* Lint warning ([d8db88d](https://github.com/konnectors/libs/commit/d8db88d17c851685ba58a59832df2c3dbf55b3f5))

### Features

* Add ensureNotAuthenticated method ([f9ffdd9](https://github.com/konnectors/libs/commit/f9ffdd95d7552d4317f2f147767e6294500d4638))

## [0.9.4](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-21)

### Bug Fixes

* Not intercepted worker errors ([1182a96](https://github.com/konnectors/libs/commit/1182a96bda4bf157a326ea779ff2ab5f8da3c2f5))

## [0.9.3](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-21)

### Bug Fixes

* **clisk:** Fix deduplication on metadata ([f454d26](https://github.com/konnectors/libs/commit/f454d26ec08118f05c3c7088e4788795a5363ea1))

## [0.9.2](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-16)

### Bug Fixes

* Remove cozy-client-js dependency in cozy-clisk ([cfc9a77](https://github.com/konnectors/libs/commit/cfc9a77072c537b6176ddaa21396dee3b76b48a6))

## [0.9.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-16)

### Bug Fixes

* Allows cozy-clisk to be embedded in other envs (react-native, jest) ([a22d045](https://github.com/konnectors/libs/commit/a22d045e3e877d0fd840c31041389586dd5c369c))

# [0.9.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-16)

### Bug Fixes

* Change some logs from info to debug ([920aaed](https://github.com/konnectors/libs/commit/920aaed1620ffff0b1702d186a40ff83e306a61d))

### Features

* Add wrapTimer function ([8155ef7](https://github.com/konnectors/libs/commit/8155ef7fcbd6894cf127100ec8a8dc7c21f4f71a))
* Send more page events to the launcher ([9b4b44c](https://github.com/konnectors/libs/commit/9b4b44cdc5ff6afdea0bde8f9d04a1d1bade5e62))
* Wrap ContentScript methods with wrapTimer ([3331647](https://github.com/konnectors/libs/commit/33316473f021443ad5564f5db645d625341e02f7))

## [0.8.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-16)

### Bug Fixes

* Babel transpilation ([951fcad](https://github.com/konnectors/libs/commit/951fcad16fa81c75ea826ac2171432e340572647))

# [0.8.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-03-09)

### Bug Fixes

* Fix some JSdoc ([319b163](https://github.com/konnectors/libs/commit/319b163daad6cca5a7eba250a799b4c10a25f652))

### Features

* Implement downloadFileInWorker and remove filtering logic ([836cdf7](https://github.com/konnectors/libs/commit/836cdf737bf25ab373f283dce3ff6caabe444626))

## [0.7.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-02-23)

### Bug Fixes

* convert date string to date object in saveBills ([af08200](https://github.com/konnectors/libs/commit/af0820051a5dddf5ea8d9d26fd5a5345ad61cbad))

# [0.7.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-02-14)

### Bug Fixes

* Make option.args optionnal in runInWorkerUntilTrue ([bb9c4cd](https://github.com/konnectors/libs/commit/bb9c4cdf5d2d138ff27ad084a1de946d44b5bd24))

### Features

* **cozy-clisk:** Add a single entry point ([ce3c1ad](https://github.com/konnectors/libs/commit/ce3c1ad70ab567fa59c66ea7b105b017bd135c1a))

### BREAKING CHANGES

* **cozy-clisk:** In konnector import from 'cozy-clisk/contentscript' should be replace to 'cozy-clisk'

# [0.6.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-02-10)

### Bug Fixes

* Replace import for JSDoc ([97b60d1](https://github.com/konnectors/libs/commit/97b60d1adf5eef38fbbb34a15741272f1125ba61))

### Features

* Add typescript to devDep ([78b1a8f](https://github.com/konnectors/libs/commit/78b1a8f5bce297012312bf2ac234e4c2f21ac04b))

# [0.5.0](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-02-07)

### Features

* Adding log level to the log function in ContentScript ([7b59fca](https://github.com/konnectors/libs/commit/7b59fcaf2a9e246ca0a5ab22300006d7a85950ee))

### BREAKING CHANGES

* All logs with only one argument in connectors will be silent

## [0.4.1](https://github.com/konnectors/libs/compare/cozy-clisk<EMAIL_ADDRESS>(2023-02-06)

### Bug Fixes

* expose different entry points as documented ([2de975b](https://github.com/konnectors/libs/commit/2de975be091e50e4c3556df58fb3d13dbfcbf180))
* publish built version of cozy-ccc-libs ([6a93784](https://github.com/konnectors/libs/commit/6a93784c9efc3dc7c5627a032658a7846dfc3392))

# 0.4.0 (2023-02-03)

### Features

* Rename clisk to cozy-clisk ([4bd7edf](https://github.com/konnectors/libs/commit/4bd7edf6462ed759b37ee73a0db6bdf309dbe7b9))

# 0.3.0 (2023-02-03)

### Features

* Rename cozy-ccc-libs to clisk ([89a724d](https://github.com/konnectors/libs/commit/89a724d27d701ba7fdd320a11794179dd98c869a))

## [0.2.1](https://github.com/konnectors/libs/compare/cozy-ccc-libs<EMAIL_ADDRESS>(2023-02-03)

**Note:** Version bump only for package cozy-ccc-libs

# 0.2.0 (2023-01-23)

### Bug Fixes

* auto fixable lints ([1e87a35](https://github.com/konnectors/libs/commit/1e87a356b7e2100568a2b9361e72eeca1425b87c))
* lint + ts-check ([869d0cf](https://github.com/konnectors/libs/commit/869d0cfb4be815f98b87a524cf9a06999996785c))

### Features

* Build package with babel ([1754662](https://github.com/konnectors/libs/commit/1754662e0fd403e1abf95ff4354dab8bfacda324))
* copy from flagship application + package init ([72502ec](https://github.com/konnectors/libs/commit/72502ec55a9d26f091531348245276010d7092b3))
* Make unit tests runnable ([5b98643](https://github.com/konnectors/libs/commit/5b98643b859577104d4d9f938223a96e83e365e8))
* Place contentscript, launcher and bridge libs at the same level ([1716c1f](https://github.com/konnectors/libs/commit/1716c1fcfc6c7a895ef97ae47f7fd4e130c939d2))
* Remove kyScraper ([bd9d6ff](https://github.com/konnectors/libs/commit/bd9d6ffa7950793bfea3f5ea9d087634f52cf5dd))

repository: konnectors/libs

gha_language: JavaScript

repo_name: konnectors/libs


text:
# inventory-checker

This is a Docker container that will periodically check specified webpages for the (lack of) "out-of-stock" text and sends you notifications via the [IFTTT](https://ifttt.com) app when the text disappears, which indicates that the item for sale is back in stock.

**This is not good code, but it should work.**

## IFTTT setup

1. Signup for an [IFTTT](https://ifttt.com) account.

2. Download their app for your smartphone and enable the 'Notifications' service on your phone.

3. Using either IFTTT's app or website, create two applets with these settings:

    * Applet 1 - Notifications for when items are available
      * If: Webhooks - Receive a web request
        * Event Name: `item_available`
      * Then: Notifications - Send a rich notification from the IFTTT app
        * Title: Item Available
        * Message: `{{Value1}}`
        * Link URL: `{{Value2}}`
    * Applet 2 - **Optional** - Notifications for when no items are available, but you want to know that the script ran
      * If: Webhooks - Receive a web request
        * Event Name: `nothing_available`
      * Then: Notifications - Send a rich notification from the IFTTT app
        * Title: Nothing was available
        * Message: `As of: {{Value1}}. Could not load: [{{Value2}}]`

4. Go [here](https://ifttt.com/maker_webhooks), click on the `Documentation` button at the top right, and copy down the key given at the top of the page.

## Usage instructions

1. Clone this repo onto a machine that is always running and has Docker installed.

2. `cd` into this repo. Optionally, make any customizations you may want to make now by editing the files. Then run `docker build -t inventory-checker:latest .`

3. Run this container with:

    ```bash
    docker run \
      -d \
      --restart always \
      -e 'WEBPAGES=<PAYLOAD_HERE>' \
      -e 'IFTTT_API_KEY=<IFTTT_API_KEY>' \
      --name inventory-checker \
      inventory-checker:latest
    ```

    Replace `<PAYLOAD_HERE>` with a JSON in this format, but minified:

    ```json
    [
      {
        "webpage": "http://www.example.com",
        "text": "Text indicating that the item is out of stock",
        "item_name": "What you want to refer to the item as in notifications and logs"
      },
      {
        ...
      }
    ]
    ```

    Replace `<IFTTT_API_KEY>` with the IFTTT API key that you have.

    Optionally, pass in the env var `ENABLE_NOT_IN_STOCK_NOTIFICATION=true` to get notifications if you want a notification when the scraper runs and doesn't find items in stock.

    Optionally, pass in a mounted volume at `/data` to persist a screenshot/text dump of a scraped webpage.

4. Buy stuff when you get notified.

## Customization

In `crontab.txt`, you can change how frequently the script should run. By default, this script runs every 5 minutes between 9am and 11:55pm (inclusive). I recommend using [crontab.guru](https://crontab.guru) to generate the pattern for how frequently you want this script to run.

## License

MIT

repository: kevindong/inventory-checker

repo_name: kevindong/inventory-checker


text:
# Sourcegraph CLI for Windows

**Note:** Windows support is still rough around the edges. If you encounter issues, please let us know by filing an issue.

## Installation

### Latest version

### Install via PowerShell

Run in PowerShell as administrator:

```powershell
New-Item -ItemType Directory 'C:\Program Files\Sourcegraph'

Invoke-WebRequest https://sourcegraph.com/.api/src-cli/src_windows_amd64.exe -OutFile 'C:\Program Files\Sourcegraph\src.exe'

[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) + ';C:\Program Files\Sourcegraph', [EnvironmentVariableTarget]::Machine)
$env:Path += ';C:\Program Files\Sourcegraph'
```

#### Install manually

1. Download the latest [src_windows_amd64.exe](https://sourcegraph.com/.api/src-cli/src_windows_amd64.exe)
2. Place the file under e.g. `C:\Program Files\Sourcegraph\src.exe`
3. Add that directory to your system PATH to access it from any command prompt

### Version compatible with your Sourcegraph instance

### Install via PowerShell

Run in PowerShell as administrator, but replace `sourcegraph.example.com` with your Sourcegraph instance URL:

```powershell
New-Item -ItemType Directory 'C:\Program Files\Sourcegraph'

Invoke-WebRequest https://sourcegraph.example.com/.api/src-cli/src_windows_amd64.exe -OutFile 'C:\Program Files\Sourcegraph\src.exe'

[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) + ';C:\Program Files\Sourcegraph', [EnvironmentVariableTarget]::Machine)
$env:Path += ';C:\Program Files\Sourcegraph'
```

#### Install manually

1. Download the latest src_windows_amd64.exe from your Sourcegraph instance at e.g. https://sourcegraph.example.com/.api/src-cli/src_windows_amd64.exe (replace sourcegraph.example.com with your Sourcegraph instance URL)
2. Place the file under e.g. `C:\Program Files\Sourcegraph\src.exe`
3. Add that directory to your system PATH to access it from any command prompt

repository: sourcegraph/src-cli

repo_name: sourcegraph/src-cli


text:
# Environments
Quanser OpenAI Driver currently supports two pieces of hardware: the Qube Servo 2 USB and the Quanser Aero.

# Qube
For more information about the Qube click [here](https://www.quanser.com/products/qube-servo-2/)

### QubeBaseEnv
The base class for Qube environments.
Info:

- Reset starts the pendulum from the bottom (at rest).
- Has no reward function.

### QubeBeginDownEnv
Info:

- Reset starts the pendulum from the bottom (at rest).
- The task is to flip up the pendulum and hold it upright.
- Reward is a function of the angles theta (arm angle) and alpha (pendulum), and the alpha angular velocity.
    - Encourages the the arm to stay centered, the pendulum to stay upright, and to stay stationary.

### QubeBeginUprightEnv
Info:

- Reset starts the pendulum from the top (flipped up/inverted).
- The task is to hold the pendulum upright.
- Episode ends once the angle is outside the tolerance angle (falls too much).
- Reward is a function of the angles theta (arm angle) and alpha (pendulum), and the alpha angular velocity.
    - Encourages the the arm to stay centered, the pendulum to stay upright, and to stay stationary.

# Aero
For more information about the Aero click [here](https://www.quanser.com/products/quanser-aero/)

### AeroEnv
The main Aero environment.
Info:

- Reset applies no action (0 voltages) to the motors for a set number of timesteps.
- Reward is a function of the pitch and yaw compared to the reference pitch and yaw (the pitch and yaw at the start of the episode), and the velocities and accelerations in the x, y and z directions.

repository: zuzuba/quanser-openai-driver

repo_name: zuzuba/quanser-openai-driver