text:
# Datamill

This gem implements a *reactor* processing events in a at-least-once delivery way.
Events are either dispatched to singleton *handlers*, or they represent a message to a *cell*
handled by the cell's *behaviour*.

Cells are stateful entities identified by `id` and the names of their behaviours.

Persistence for cell data and the reactor message queue is currently provided
by Redis.

## Architecture overview

### Persistent event queue, reactor and reactor handlers

This illustrates how datamill works at the lowest level:

```

+-----+
| app |--\                                       +---------+
+-----+  |                                    /->| handler |
         |                                    |  +---------+
+-----+  |   +-------------+     +---------+  |  +---------+
| app |--+->-| pers. queue |-->--| reactor |--+->| handler |
+-----+  |   +-------------+     +---------+  |  +---------+
         |                           ^        |  +---------+
+-----+  |                           |        \->| handler |
| app |--/               (injected messages)     +---------+
+-----+

```

You need to ensure that there is only one reactor at any time,
across all processes. Message producers ("app") can live in
various processes, but there must be only one reactor consuming
from the queue.

Each message is delivered to each handler, inside the reactor process.
When the reactor process terminates, processing will continue with the
last message that was not completely processed.

Apart from messages from the persistent queue, the reactor can
deliver messages injected from inside the reactor's process. There
is no guarantee that these messages will be handled (the process
may terminate).

### Cells and behaviours

Cells and behavious are implemented on top of the concepts
illustrated above, by using a special handler:

```
                                             +-----------+
                                        /-<>-| behaviour |
                                        |    +-----------+
     +---------+  +-------------------+ |    +-----------+
-->--| reactor |--| (special handler) |-|-<>-| behaviour |
     +---------+  +-------------------+ |    +-----------+
                        ^               |    +-----------+
                        v               \-<>-| behaviour |
                    persistent storage       +-----------+
```

Each behaviour handles its own set of cells. A cell is implemented
by its behaviour and has an id and some persistent data. The cells
of each behaviour are identified by their id. A behaviour's methods
are called inside the reactor's process.

Any code can send a message to a cell through the persistent queue.
From inside the process hosting the reactor, a non-persistent message
to a cell can be sent when persistence and delivery guarantees are
not desired. Messages to a cell are handled by a behaviour's
`handle_message` method.

A behaviour is also called on behalf of a cell in one of the following
situations:
* upon boot, when persistent data for the cell is found
* the cell has requested a timeout that has expired

Timeouts are non-persistent, a cell requiring a timeout has to
re-request one upon boot, should the process terminate too early.

All information needed by the behaviour to operate on behalf of a cell
is bundled in a `Datamill::Cell::State` object. The behaviour must
set attributes on this object for managing a cell's persistent data
and requesting a timeout for the cell.

The lifetime of a cell is directly bound to its persistent data.
A cell without persistent data is dead, unless a message for it has been
send which is handled by the behaviour's `handle_message` method.
The cell dies right away unless the behaviour sets persistent data for
it.  A dead cell consumes no resources. A behaviour must clear a cell's
persistent data as soon as possible.

This means these transitions are possible:

```
 dead or alive -> handling a message                      -> dead or alive
         alive -> handling a timeout or boot notification -> dead or alive
```

If needed, a behaviour must implement migrating
persistent data from previous versions.

## Example

TBD

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'datamill'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install datamill

## Usage

TODO: Write usage instructions here

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/datamill. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
---
layout: post
title: Training on the Fly
categories: Computer Vision
tags:
mathjax: true
comments: true
---

(From [Krull et al, 2019](https://arxiv.org/pdf/1906.00651.pdf))
> "N2V proposes a way to leverage information of the network’s blind-spots. However, PN2V is not restricted to Gaussian noise models or Gaussian intensity predictions. More precisely, to compute the posterior distribution of a pixel, we combine (i) a general noise model that can be represented as a histogram (observation likelihood), and (ii) a distribution of possible truepixel intensities (prior), represented by a set of predicted samples."

Recently, we attempted to investigate whether the noise model of Probabilistic Noise2Void which was defined as a 256 times 256 sized-histogram could be replaced by a fewer parameter definition. One intuition behind why this may work is because firstly, the variance of the observations given the signal seems to follow a linear function of the signal in the case of *Convallaria images*:
i.e. $$ \sigma^{2}_{x|s} = e^{a} + e^{b} \times s $$
and secondly, the observations given the signal seem to follow a unimodal distribution. (We hypothesize that such a unimodal distribution can be captured through representation as a normal distribution:
i.e. $$ P(x|s) \simeq N(s, \sigma_{x|s}))$$

In the early days while implementing this, we initialized $$a$$ to be equal to 6 and $$b$$ to  a random value between -1 and 1, and also normalized $$s$$ by a factor 10000. This implies that the new equation showing linear dependence would be:
$$ \sigma^{2}_{x|s} = e^{a} + e^{b} \times \hat{s} $$,
where $$\hat{s} =\frac{s}{10000}$$.
Such a formulation worked well in a supervised setup (where one has both the observations and the signal). However, it produced very narrow noise models $$p(x|\hat{s})$$ during on-the-fly training.

I reasoned that if one were to assume perfect Poisson noise, then $$b$$ would equal $$log(10000)$$. Since, it is quite probable that the observations capture some modification of ideal Poisson noise, hence instead of initializing $$a$$, we should initialize $$b$$ as it would lead to a shorter learning trajectory for $$b$$! Also, we thought it would be a good idea to have a separate learning rate for the denoising parameters and the noise model parameters. This is easily implemented as follows [here](https://github.com/malaalam/PyTorchExperiments/blob/master/03August2019/01_pn2v_OnTheFlyTraining.ipynb):

```python
optimizer=optim.Adam([
                {'params': net.parameters()},
                {'params': noiseModel.weight, 'lr': 1e-2}
            ], lr=learningRate)
```

license: MIT

repository: malaalam/minuteskeeper

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: malaalam/minuteskeeper


text:
---
title: 暗角特效
layout: usermanual-page.hbs
position: 6
---

In photography and optics, [vignetting][1] is the reduction of an image's brightness or saturation at the periphery compared to the image center. You can use it to draw attention to the center of the frame.

这是一张没有经过处理的图片:

![Image without effect][2]

And the same image with the effect applied:

![Image with effect][3]

内置的暗角效果有以下属性:

* **Offset**: Controls the offset of the effect.
* **Darkness**: Controls the darkness of the effect.

Find the post-processing effect script on [GitHub][4].

[1]: https://en.wikipedia.org/wiki/Vignetting
[2]: /images/platform/posteffects/without_effects.png
[3]: /images/platform/posteffects/with_vignette.png
[4]: https://github.com/playcanvas/engine/blob/main/scripts/posteffects/posteffect-vignette.js

branch_name: refs/heads/dev

gha_language: JavaScript

gha_license_id: MIT


text:
# Affiliate website theme
A theme to create an affiliate website with bolt cms

This is only the theme, if you want to all the resources to setup your own affiliate website, check our other repository Bolt affiliate template

We have created a kit to help people create their own affiliate website, if you are interested, check our kit and its documentation

Have fun with it and share your link with us we would be happy to hear from you.

Ideate and collaborate on symbiodyssey.com

repository: symbiodyssey/affiliatews-theme

repo_name: symbiodyssey/affiliatews-theme


text:
# Operator/expression 's Backward

## Motivation

In Neural Network, most models are solved by the backpropagation algorithm(known as **BP**) at present. Technically, BP calculates the gradient of the loss function, then propagates it back through the networks following the chain rule. Hence we need a module that chains the gradient operators/expressions together to construct the backward pass. Every forward network needs a backward network to construct the full computation graph. The operator/expression's backward pass will be generated with respect to the forward pass.

## Implementation

In this design doc, we exported only one API for generating the backward pass.

```c++
std::unique_ptr<OperatorBase> Backward(const OperatorBase& forwardOp,
    const std::unordered_set<std::string>& no_grad_vars);
```

The implementation behind it can be divided into two parts, **Backward Operator Creating** and **Backward Operator Building**.

### Backward Operator Registry

A backward network is built up with several backward operators. Backward operators take forward operators' inputs, outputs, and output gradients and then calculate its input gradients.

|                        | forward operator | backward operator
| ---------------------- | ---------------- |------------------------- |
| **Operator::inputs_**  | Inputs       | Inputs, Outputs, OutputGradients |
| **Operator::outputs_** | Outputs          | InputGradients            |

 In most cases, there is a one-to-one relation between the forward and backward operators. These relations are recorded by a global hash map(`OpInfoMap`). To follow the philosophy of minimum core and to make operators pluggable, the registry mechanism is introduced.

For example, we have `mul_op`, and we can register its information and corresponding backward operator by the following macro:

```cpp
REGISTER_OP(mul, MulOp, MulOpMaker, mul_grad, MulOpGrad);
```

`mul` is the operator's type. `MulOp` and `MulOpMaker` are the operator class and the operator maker class respectively.

`mul_grad` is the type of backward operator, and `MulOpGrad` is its class name.

### Backward Opeartor Creating

Given a certain forward operator, we can get its corresponding backward operator by calling:

```cpp
OperatorBase* bwd_op = BuildGradOp(const OperatorBase* fwd_op);
```

The function `BuildGradOp` will sequentially execute following processes:

1.

2. Build two maps named `inputs` and `outputs` to temporarily store backward operator's inputs and outputs. Copy forward operator's `inputs_` and `outputs_` to map `inputs`, except these, are not necessary for gradient computing.

3. Add forward inputs' gradient variables into map `output`, adding forward outputs' gradient variables into map `input`.

4. Building backward operator with `inputs`, `outputs` and forward operator's attributes.

### Backward Network Building

A backward network is a series of backward operators. The main idea of building a backward network is creating backward operators in the inverted sequence and appending them together one by one. There are some corner cases that need special processing.

1. Op

   When the input forward network is an Op, return its gradient Operator immediately. If all of its outputs are in no gradient set, then return a special `NOP`.

2. NetOp

   In our design, the network itself is also a kind of operator(**NetOp**). So the operators contained by a big network may be some small network. When the input forward network is a NetOp, it needs to call the sub NetOp/Operators backward function recursively. During the process, we need to collect the `OutputGradients` name according to the forward NetOp.

3. RnnOp

   RnnOp is a nested stepnet operator.  Backward module needs to recusively call `Backward` for every stepnet.

4. Sharing Variables

   As illustrated in the figure 1 and figure 2, two operators share the same variable name **W@GRAD**, which will overwrite their shared input variable.

	Figure 1. Sharing variables in operators.

	Sharing variable between operators or same input variable used in multiple operators can lead to duplicate gradient variables. As illustrated in figure 2, we need to rename the gradient names recursively and add a generic add operator to prevent overwriting.

	Figure 2. Replace sharing variable's gradient with `Add` operator.

	Because the framework finds variables according to their names, we need to rename the output links. We add an integer suffix to represent its position in the clockwise direction.

5. Part of the Gradient is Zero.

   In the whole graph, there is some case of that one operator's gradient is not needed, but its input's gradient is a dependency link of other operator,  we need to fill a same shape gradient matrix in the position. In our implementation, we insert a special `fillZeroLike` operator.

Follow these rules above, then collect the sub graph `OutputGradients`/`InputGradients` as the NetOp's and return it.

repository: hyqskevin/Paddle

branch_name: refs/heads/develop

repo_name: hyqskevin/Paddle


text:
# How to run the benchmarks locally

## Run in the browser

```bash
yarn bazel run modules/benchmarks/src/tree/{name}:devserver

# e.g. "ng2" tree benchmark:
yarn bazel run modules/benchmarks/src/tree/ng2:devserver
```

## Run e2e tests

```
# Run e2e tests of individual applications:
yarn bazel test modules/benchmarks/src/tree/ng2/...

# Run all e2e tests:
yarn bazel test modules/benchmarks/...
```

## Use of *_aot.ts files

The `*_aot.ts` files are used as entry-points within Google to run the benchmark
tests. These are still built as part of the corresponding `ng_module` rule.

## Specifying benchmark options

There are options that can be specified in order to control how a given benchmark target
runs. The following options can be set through [test environment variables](https://docs.bazel.build/versions/master/command-line-reference.html#flag--test_env):

* `PERF_SAMPLE_SIZE`: Benchpress performs measurements until `scriptTime` predictively no longer
  decreases. It does this by using a simple linear regression with the amount of samples specified.
  Defaults to `20` samples.
* `PERF_FORCE_GC`: If set to `true`, `@angular/benchpress` will run run the garbage collector
  before and after performing measurements. Benchpress will measure and report the garbage
  collection time.
* `PERF_DRYRUN`: If set to `true`, no results are printed and stored in a `json` file. Also
  benchpress only performs a single measurement (unlike with the simple linear regression).

Here is an example command that sets the `PERF_DRYRUN` option:

```bash
yarn bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true
```

repository: angular/angular

branch_name: refs/heads/main

gha_language: TypeScript

repo_name: angular/angular


text:
# About
Stupid counter of UBB computer science/math students in 2015 from the excel files.

# Install
Change into the directory of the code.

1. Create virtual env:
`virtualenv -p /usr/bin/python3 env`

2. Activate env:
`. env/bin/activate`

3. Install requirements:
`pip install -r requirements.txt`

4. Run and have fun :).
`python main.py `

repository: vampy/university

repo_name: vampy/university


text:
# Simple Expressions

## Logical Expressions

[Logical Operators](logical-operators.md)  lists the operators and calculation rules of logical expressions.

## Comparative Expressions

[Operators](operators.md)  lists the common comparative operators.

In addition to comparative operators, you can also use the following sentence structure:

-   BETWEEN operator

    **a  BETWEEN  x  AND  y**  is equivalent to  **a \>= x AND a <= y**.

    **a  NOT BETWEEN  x  AND y**  is equivalent to  **a < x OR a \> y**.

-   To check whether a value is null, use:

    expression_ _IS NULL

    expression IS NOT NULL

    or an equivalent \(non-standard\) sentence structure:

    expression_ _   ISNULL

    expression  NOTNULL

    >![](public_sys-resources/icon-notice.gif) **NOTICE:**
    >Do not write  **expression=NULL**  or  **expression<\>\(!=\)NULL**, because  **NULL**  represents an unknown value, and these expressions cannot determine whether two unknown values are equal.


text:
---
layout: post
author: Veronica White
title: Where to get vaccinated in the Madison, WI Area
tags: Health COVID-19
# need both visible 1 and published false to not publish post
#published: false
#visible: 1
---

For anyone still looking on where to get vaccinated in Madsion, WI I have compiled the following list:

Local pharmacies' sign up contact forms. Fill it out and they will call/email you to set up an appointment when they have availability:
- Neuhauser Pharmacy: [https://hipaa.jotform.com/210208045386147](https://hipaa.jotform.com/210208045386147)
- **Fitchburg Family Pharmacy**: (where I got mine!) [https://hipaa.jotform.com/210748615388161](https://hipaa.jotform.com/210748615388161)

Call to make next avialible appointment:
SMMHealth:
- **Dean Medical Group**:<PHONE_NUMBER> (7 am – 8 pm weekdays, 8 am – 5 pm weekends)
- **Agnesian HealthCare**:<PHONE_NUMBER> (7 am – 5 pm weekdays)
- **Monroe Clinic**:<PHONE_NUMBER> (8 am – 5 pm weekdays)

Check the following daily:
- **CVS**: [https://www.cvs.com/vaccine/intake/store/cvd-store-select/first-dose-select](https://www.cvs.com/vaccine/intake/store/cvd-store-select/first-dose-select)
- **Walgreens** (shows appointments 5 days out): [https://www.walgreens.com/findcare/vaccination/covid-19/location-screening](https://www.walgreens.com/findcare/vaccination/covid-19/location-screening)
- **Kroger**: [https://www.kroger.com/rx/covid-vaccine](https://www.kroger.com/rx/covid-vaccine)
- **Walmart**: [https://www.walmart.com/pharmacy/clinical-services/immunization/scheduled?imzType=covid](https://www.walmart.com/pharmacy/clinical-services/immunization/scheduled?imzType=covid)
- **Hy-Vee**: [https://www.hy-vee.com/my-pharmacy/covid-vaccine-consent](https://www.hy-vee.com/my-pharmacy/covid-vaccine-consent)
- **UW-Health**: [https://coronavirus.uwhealth.org/covid-19-vaccine-scheduling-for-eligible-patients/first-dose-scheduling-for-eligible-patients/](https://coronavirus.uwhealth.org/covid-19-vaccine-scheduling-for-eligible-patients/first-dose-scheduling-for-eligible-patients/)
- **UW - UHS appointment** ( if your a current UW-student, staff or faculty): [https://myuhs.uhs.wisc.edu/login_dualauthentication.aspx](https://myuhs.uhs.wisc.edu/login_dualauthentication.aspx)

If you need a specific type of vaccine (i.e. Moderna, Pzfizer, J&J) you can use this tool to see which pharmacies carry which vaccines: [https://vaccinefinder.org/search/](https://vaccinefinder.org/search/)

For more options or for searching for vaccines outside of madison you can use the Wisconsin DHS preovider map for more options: [https://www.dhs.wisconsin.gov/covid-19/vaccine-map.htm](https://www.dhs.wisconsin.gov/covid-19/vaccine-map.htm)


text:
What kind of issue is this?

 - [ ] Question. If you want to ask how to do something, or to understand why something isn't
       working the way you expect it to.

 - [ ] Bug report. Please provide your device name, device OS version, and describe the reproduction steps.

 - [ ] Feature Request. Telling us what problem you’re trying to solve.

##### Info:

 * PinView version:
 * Device OS version:
 * Device Name:

##### Description:

##### Reproduction Steps:

##### What did I do:


text:
# sack

Search and edit those results instantly. (Named comes from search-ack, now ag).

## Demonstration

  [sack demo](http://showterm.io/8f3421bae1d48c2109e1d#fast)

## Details

Search for specific terms in files using AG (the-silver-searcher) and then jump to instantly edit those lines in VIM.

Sack outputs those shortcuts into `~/.sack_shortcuts` for easy editing/re-use across any terminal on the system.

It's a reimplementation of [sack](https://github.com/zph/sack), which was a ruby re-implementation of the original bash script [sack](https://github.com/sampson-chen/sack).

## Installation (on Mac)

`wget -o ~/bin/sack https://github.com/zph/go-sack/releases/download/v0.3.0/sack && chmod +x ~/bin/sack`

Or for the reckless:

```
curl -sSL https://github.com/zph/go-sack/raw/master/src/install | bash -s
```

## Installation on other platforms

Install script will try to match for the right version of binary (only amd64 arch):

```
curl -sSL https://github.com/zph/go-sack/raw/master/src/install | bash -s
```

Check for your platform's bin on repo's [Release Page](https://github.com/zph/go-sack/releases).

Install that into somewhere in your $PATH and chmod +x that puppy.

OR:

Install from source using usual go build. Clone it && `make build` or `make install`.

For shell integration (sets up two aliases) add the following to your `.zshrc or .bashrc`

```
eval "$(sack init)"
```

## Usage

To search in a directory:

    sack -s SEARCH_TERM [DIRECTORY: defaults to current]

    OR (with shell integration)

    S SEARCH_TERM [DIRECTORY: defaults to current]

To edit one of those results by index number (zero indexed):

    sack -e 1

    OR (with shell integration)

    F 1

To display current shortcuts:

    sack -p

### Options

```
NAME:
   Sack - sack [searchterm] [optional directory]

USAGE:
   sack [global options] command [command options] [arguments...]

VERSION:
   0.4.0

COMMANDS:
    init	shell init script
    eval	shell eval command to insert into .{zsh,bash}rc

GLOBAL OPTIONS:
   --edit, -e			edit a given shortcut
   --search, -s			search-ack/ag it
   --print, -p			display existing shortcuts
   --debug, -d			show all the texts
   --flags value, -f value	flags to pass to ag
   --help, -h			show help
   --version, -v		print the version

```

## Credit

  Original idea & implementation belong to @sampson-chen:
  https://github.com/sampson-chen/sack.

  Rewritten for cleanliness in go-lang for speed b/c Ruby standalone scripts with dependencies aren't convenient, & b/c Shell scripts past a certain length are unwieldy.

## Dependencies

  - ag [the-silver-searcher](https://github.com/ggreer/the_silver_searcher)
    - Falls back to use grep... but don't do that :P.

## License

MIT License (MIT)
Copyright (c) 2014 Zander Hill

## Contributing

  Input and pull requests are welcomed!

1. Fork it ( http://github.com/zph/go-sack/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: zph/go-sack

repo_name: zph/go-sack


text:
Introduction
------------

This is a calendar-booking application.

Functional tests and APIs are written as a part of the following Postman collection.

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/5b67adc20c80dff9d781)

This app is currently running at Heroku [here](https://calendarly-app.herokuapp.com/calendarly/health).

It is assumed that the slots are hourly in length. The database model is in data.sql which is executed during startup.

Features:

1. Uses an in-memory session implementation.
2. Uses in-memory H2 database.
3. Runs on Spring Boot.
4. Uses JPA for database and transaction management.
5. Unit test coverage of 90%.

Data flow diagram
-----------------
![Data Flow diagram](data-flow.png "Calendarly Data flow diagram")

ER diagram
------------
![ER diagram](erd-calendarly.png "Calendarly ER diagram")

API documentation
-----------------
1. Register user

We provide a unique email address, a name and a password to the API and the user is registered if it does not already exist.

```
curl --location --request POST 'https://calendarly-app.herokuapp.com/calendarly/user/signup' \
--header 'Content-Type: application/json' \
--data-raw '{
	"version":1.0,
	"timestamp": "2020-04-02@15:30:00.000+0530",
	"name":"Zafar Ansari",
	"email"<EMAIL_ADDRESS>	"password":"pass@098"
}'
```

Response:

```
{
    "timestamp": "2020-04-04@19:53:57.912+0000",
    "version": 1.0,
    "message": "Success",
    "userRegistered": true
}
```

2. Login user

We provide an already registered email address and its password to the API, and the user is logged in if the authentication is successful. The response contains a sessionId which has to be provided in all future requests for this user as a header parameter.

```
curl --location --request POST 'https://calendarly-app.herokuapp.com/calendarly/user/login' \
--header 'Content-Type: application/json' \
--data-raw '{
	"version":1.0,
	"timestamp": "2020-04-02@15:30:00.000+0530",
	"email"<EMAIL_ADDRESS>	"password":"pass@098"
}'
```

Response:

```
{
    "timestamp": "2020-04-04@20:13:04.261+0000",
    "version": 1.0,
    "message": "Success",
    "sessionId": "XjU9iXBWxu8V9It"
}
```

3. Add slots

We provide the session id got in the login step as a header, and a list of timestamps representing the starts of available slots that we want to add for the logged-in user. If authenticated and not in the past, the slots are added as 'available' for the user.

```
curl --location --request POST 'https://calendarly-app.herokuapp.com/calendarly/slot/add' \
--header 'Content-Type: application/json' \
--header 'session-id: XjU9iXBWxu8V9It' \
--data-raw '{
	"version":1.0,
	"timestamp": "2020-04-02@15:30:00.000+0530",
	"slots":[
		"2020-05-02@11:00:00.000+0530",
		"2020-05-02@12:00:00.000+0530",
		"2020-05-02@19:00:00.000+0530"
		]
}'
```

Response:

```
{
    "timestamp": "2020-04-04@20:16:18.838+0000",
    "version": 1.0,
    "message": "Success"
}
```

4. Get slots

We provide the session id got in the login step as a header, a target user's email address, and a range of timestamps between which we want to view the available slots for the target user. If authenticated, available and not in the past, the slots are returned for the target user.

Request:

```
curl --location --request POST 'https://calendarly-app.herokuapp.com/calendarly/slot/get' \
--header 'Content-Type: application/json' \
--header 'session-id: XjU9iXBWxu8V9It' \
--data-raw '{
	"version":1.0,
	"timestamp": "2020-04-02@15:30:00.000+0530",
	"emailAddressBookee"<EMAIL_ADDRESS>	"fromTime":"2020-05-02@00:00:00.000+0530",
	"toTime":"2020-05-02@23:30:00.000+0530"
}'
```

Response:

```
{
    "timestamp": "2020-04-04@20:19:25.953+0000",
    "version": 1.0,
    "message": "Success",
    "result": [
        "2020-05-02@05:30:00.000+0000",
        "2020-05-02@06:30:00.000+0000",
        "2020-05-02@13:30:00.000+0000"
    ]
}
```

5. Book slots

We provide the session id got in the login step as a header, a target user's email address, and a list of timestamps representing the beginning times of the slots we want to book in the calendar of the target user. If available, not in the past, we would return the slots that were booked.

```
curl --location --request POST 'https://calendarly-app.herokuapp.com/calendarly/slot/book' \
--header 'Content-Type: application/json' \
--header 'session-id: XjU9iXBWxu8V9It' \
--data-raw '{
	"version":1.0,
	"timestamp": "2020-04-02@15:30:00.000+0530",
	"emailAddressBookee"<EMAIL_ADDRESS>	"slots":[
		"2020-05-02@11:00:00.000+0000",
		"2020-05-02@12:00:00.000+0000",
		"2020-05-02@20:00:00.000+0530"
		]
}'
```

Response:

```
{
    "timestamp": "2020-04-04@20:23:53.952+0000",
    "version": 1.0,
    "message": "Success",
    "result": {
        "2020-05-02T11:00:00Z": true,
        "2020-05-02T12:00:00Z": true,
        "2020-05-02T20:00:00Z": false
    }
}
```

6. Health

Indicates if the application is up or not.

```
curl --location --request GET 'https://calendarly-app.herokuapp.com/calendarly/health
```

Response:

```
{
    "timestamp": "2020-04-04@20:37:15.236+0000",
    "version": 1.0,
    "message": "UP"
}
```

Build
------

You can build the project by 'mvn clean install' locally. Run it using java -jar target/calendarly-1.0.jar


text:
# Purpose

The purpose of this project is to create a one-button script to construct a OpenVPN server on Amazon Linux for personal use.

For other platforms, you may want to use [script for ubuntu/debian/centos](https://github.com/Nyr/openvpn-install)

# Prerequisite

* You have already got an Amazon EC2 instance running, assuming the IP is `<SERVER_IP>`
* You have setup the security group of the EC2 instance correctly
  * `TCP port 22 `is open to your desktop (where this script will run)
  * `OpenVPN port UDP 1194` is open to <IP_ADDRESS> (OpenVPN service will be open to all Internet), or open to your desktop's public ip if you want the server to be accessible to you only.
  * You have the key file (ssh-key.pem) used to login to the EC2 instance. Assuming the key file path is `</path/to/key.pem>`
# Server Installation

Run the script and follow the assistant:

```bash
git clone https://github.com/cheney-yan-sirca/openvpn-amzn-linux && cd openvpn-amzn-linux && bash openvpn-install.sh <SERVER_IP> </path/to/key.pem>
```

# Client setup
Your client setup file will be under `openvpn-amzn-linux` directory.
I am using [tunnelblick](https://www.tunnelblick.net/). It is just a matter of dragging the client.conf file to the app window.

# Customization

This script is hard coded to use UDP 1194 only. Go ahead to modify the script so it can be customized. Create PR if you like this project and want to improve it.

# Donation

If I have saved your time so you can sit and enjoy a coffee, don't bother buy me one, too!

[PayPal](#TODO) [Wechat](#TODO)

repository: cheney-yan-sirca/openvpn-amzn-linux

gha_language: Shell

repo_name: cheney-yan-sirca/openvpn-amzn-linux


text:
CP means to copy, where a user can copy files or even group of files.

![Image of CP](https://www.howtogeek.com/wp-content/uploads/2016/12/01_entering_cp_command_three_times.png)


text:
# ConnectionMonitorTestConfiguration

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | The name of the connection monitor test configuration. | [default to nothing]
**testFrequencySec** | **Int64** | The frequency of test evaluation, in seconds. | [optional] [default to nothing]
**protocol** | **String** | The protocol to use in test evaluation. | [default to nothing]
**preferredIPVersion** | **String** | The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters. | [optional] [default to nothing]
**httpConfiguration** | [***ConnectionMonitorHttpConfiguration**](ConnectionMonitorHttpConfiguration.md) |  | [optional] [default to nothing]
**tcpConfiguration** | [***ConnectionMonitorTcpConfiguration**](ConnectionMonitorTcpConfiguration.md) |  | [optional] [default to nothing]
**icmpConfiguration** | [***ConnectionMonitorIcmpConfiguration**](ConnectionMonitorIcmpConfiguration.md) |  | [optional] [default to nothing]
**successThreshold** | [***ConnectionMonitorSuccessThreshold**](ConnectionMonitorSuccessThreshold.md) |  | [optional] [default to nothing]

[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md)

gha_language: Julia

gha_license_id: NOASSERTION


text:
ZSON
====

JSON is awesome. It solves so many problems. But it also creates a few, like,
"How do I add comments?" and "How do I conveniently build strings like HTML
templates?" Enter Bedizened JSON (ZSON).

ZSON adds these helpful, human-friendly features on top of regular JSON.
The ZSON parser strips out this special syntax and converts the input to
plain JSON, which is then interpreted by your JSON parser of choice.

Demo: http://www.itsagoldenage.com/zson

### Single-Line Comments

You have these now. Huzzah.

```javascript
{
  // Do not change unless you really, REALLY mean it.
  "self-destruct": false
}
```

### Multi-Line Comments

Because what would `//` be without its good friends `/*` and `*/`:

```javascript
/**
 * Header.
 */
{
  "foo": /* Here it comes ... */ "bar"
}
```

### Multi-Line Strings

Here comes the fun part. Use three double quotes to open and close a multi-line
string literal. Double quotes inside don't have to be escaped.

```javascript
{
  "soliloquy": """
To be, or not to be, that is the question—
Whether 'tis Nobler in the mind to suffer" ...""
  "template": """
<html>
  <body onload="javascript:alert('Hello, world!')">
    Hello, world!
  </body>
</html>
"""
}
```

### Trailing Commas

ZSON also goes Python style by allowing trailing commas after the last elements in lists and arrays:

```javascript
[
  1,
  2,
  3,
]
```

```javascript
{
  "a": 1,
  "b": 2,
  "c": 3,
}
```

### Thousands Separators for Numbers

This was really a spur-of-the-moment thing, but you can put underscores in
numeric literals to break up large numbers and make them more readable:

```javascript
{
  "mibi": 1_048_576,
  "gibi": 1_073_741_824,
  "tibi": 1_099_511_627_776
}
```

There's no validation that these have to be used as thousands separators, so
you could put the separators on the ten thousands if you wanted:

```javascript
{
  "8_yi": 8_0000_0000
}
```

### Custom JSON Parser

If you hate `JSON.parse`, you can send your own custom JSON parser to use as
the final step of the ZSON parser:

```javascript
var value = ZSON.parse('{}', goog.json.parse);
```

If you just want to get the raw JSON string back, you can pass a `false`
for the parser:

```javascript
var rawJson = ZSON.parse('{/*excise*/}', false);
// Returns '{}'
```

### Stringification

The module also includes `ZSON.stringify` which is just an alias to
`JSON.stringify`, to allow you to do all your ZSON parsing with one module.

### Testing

Run unit tests with `nodeunit tests/`.

repository: pbaumstarck/ZSON

repo_name: pbaumstarck/ZSON


text:
---
layout: post
title: Handle Exceptions Middleware in AspNetCore
---

In AspNetCore, it may be advantageous to have the first piece of custom middleware catch any unhandled exceptions and return something proper to the client. This shows an example...

```c#
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;

public class HandleExceptionsMiddleware
{
    private readonly RequestDelegate next;
    private readonly ILogger<HandleExceptionsMiddleware> logger;

    public HandleExceptionsMiddleware(RequestDelegate next, ILogger<HandleExceptionsMiddleware> logger)
    {
        this.next = next;
        this.logger = logger;
    }

    public async Task Invoke(HttpContext context)
    {
        var exist = context.Response.Body;
        using var buffer = new MemoryStream();
        context.Response.Body = buffer;
        try
        {
            await this.next(context);
            buffer.Seek(0, SeekOrigin.Begin);
            await buffer.CopyToAsync(exist);
            context.Response.Body = exist;
        }
        catch (HttpStatusException ex)
        {
            context.Response.Body = exist;
            context.Response.Clear();
            this.logger.LogError(ex, "the following exception was raised by a controller...");
            context.Response.StatusCode = ex.StatusCode;
            context.Response.Headers["Content-Type"] = "text/plain";
            await context.Response.WriteAsync(ex.Message);
            await context.Response.CompleteAsync();
        }
        catch (Exception ex)
        {
            context.Response.Body = exist;
            context.Response.Clear();
            this.logger.LogError(ex, "the following exception was raised by a controller...");
            context.Response.StatusCode = 500;
            context.Response.Headers["Content-Type"] = "text/plain";
            await context.Response.WriteAsync("An error occurred while processing your request.");
            await context.Response.CompleteAsync();
        }
    }
}
```

You might register it with an extension like this...

```c#
public static void UseCustomMiddleware(this IApplicationBuilder app)
{
    app.UseMiddleware<HandleExceptionsMiddleware>();
    // more middleware
}
```

It is important that this be the first middleware as it is going to handle the exceptions for all other middleware components and operations.

You can define an HttpStatusException that allows controllers or middleware to throw exceptions that inform the response, like this...

```c#
using System;
using System.Diagnostics.CodeAnalysis;
using System.Net;

public class HttpStatusException : Exception
{
    public HttpStatusException(HttpStatusCode statusCode, string message, Exception innerException = null)
    : base(message, innerException)
    {
        this.StatusCode = (int)statusCode;
    }

    public HttpStatusException(int statusCode, string message, Exception innerException = null)
    : base(message, innerException)
    {
        this.StatusCode = statusCode;
    }

    public int StatusCode { get; }
}
```

Notice that the middleware changes context.Response.Body to use a memory buffer and then puts it back. Using a buffer allows other middleware components to throw exceptions after something has been written to context.Response.Body (for example, a controller writes the output but then a middleware component throws an exception). Otherwise, you can get an exception since the response has already been partially sent to the client.


text:
# Android Setup

## `AndroidManifest`

Flutter seems to have a problem with 3rd-party Android libraries which merge their own `AndroidManifest.xml` into the application, particularly the `android:label` attribute.

##### :open_file_folder: `android/app/src/main/AndroidManifest.xml`:

```diff
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.helloworld">

    <application
+        tools:replace="android:label"
         android:name="io.flutter.app.FlutterApplication"
         android:label="flutter_background_geolocation_example"
         android:icon="@mipmap/ic_launcher">
</manifest>

```

##### ⚠ Failure to perform the step above will result in a **build error**

```
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@label value=(hello_world) from AndroidManifest.xml:17:9-36
    is also present at [tslocationmanager-2.13.3.aar] AndroidManifest.xml:24:18-50 value=(@string/app_name).
    Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:15:5-38:19 to override.
```

## `android/gradle.properties`

Ensure your app is [migrated to use AndroidX](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility).

:open_file_folder: `android/gradle.properties`:

```diff
org.gradle.jvmargs=-Xmx1536M
+android.enableJetifier=true
+android.useAndroidX=true
```

## `android/build.gradle`

As an app grows in complexity and imports a variety of 3rd-party modules, it helps to provide some key **"Global Gradle Configuration Properties"** which all modules can align their requested dependency versions to.  `background_fetch` **is aware** of these variables and will align itself to them when detected.

:open_file_folder: `android/build.gradle`:

```diff
buildscript {
+   ext.kotlin_version = '1.3.72'               // or latest
+   ext {
+       compileSdkVersion   = 30                // or latest
+       targetSdkVersion    = 30                // or latest
+       appCompatVersion    = "1.1.0"           // or latest
+   }

    repositories {
        google()
        jcenter()
    }

    dependencies {
+        classpath 'com.android.tools.build:gradle:3.3.1' // Must use 3.3.1 or higher.  4.x is fine.
    }
}

allprojects {
    repositories {
        google()
        jcenter()
+       maven {
+           // [required] background_fetch
+           url "${project(':background_fetch').projectDir}/libs"
+       }
    }
}
```

## `android/app/build.gradle`

In addition, you should take advantage of the *Global Configuration Properties* **yourself**, replacing hard-coded values in your `android/app/build.gradle` with references to these variables:

:open_file_folder: `android/app/build.gradle`:

```diff
android {
+   compileSdkVersion rootProject.ext.compileSdkVersion
    .
    .
    .
    defaultConfig {
        .
        .
        .
+       targetSdkVersion rootProject.ext.targetSdkVersion
    }
}
```


text:
# ttf2cp437
[![crates.io](https://img.shields.io/crates/v/ttf2cp437.svg)](https://crates.io/crates/ttf2cp437)
[![license](https://img.shields.io/crates/l/ttf2cp437)](https://github.com/hamaluik/ttf2cp437/blob/master/LICENSE)

Converts a `.ttf` file into a square [Codepage 437](https://en.wikipedia.org/wiki/Code_page_437) font atlas. Especially handy for converting fonts from [The Oldschool PC Font Resource](https://int10h.org/oldschool-pc-fonts/) to images for use in roguelikes.

## Usage

```
$ ttf2cp437 --help
ttf2cp437 1.0.0
Kenton Hamaluik<EMAIL_ADDRESS>Converts a `.ttf` file into a square Codepage 437 font atlas.

USAGE:
    ttf2cp437 <FONT> <HEIGHT> [SCALE]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <FONT>      the path to a .ttf font file to process
    <HEIGHT>    the height (in px) for each glyph
    <SCALE>     an optional real number scale to apply to the resulting glyph set
```

## Example

```
ttf2cp437 Px437_ATI_8x8.ttf 8 2
```

Will open the `Px437_ATI_8x8.ttf` file from [The Oldschool PC Font Resource](https://int10h.org/oldschool-pc-fonts/fontlist/#ati_gfx) and render its glyphs with a height of 8 and a scale of 2. The resulting image will be 256x256 pixels, will be named `Px437_ATI_8x8_2x.png`, and will produce:

![](Px437_ATI_8x8_2x.png)


text:
# pyschedule - resource scheduling in python

![](https://github.com/timnon/pyschedule/blob/master/pics/gantt.png)

pyschedule is the easiest way to match tasks with resources. Do you need to plan a conference or schedule your employees and there are a lot of requirements to satisfy, like availability of rooms or maximal allowed working times? Then pyschedule might be for you. Install it with pip:

```python
pip install pyschedule
```

Here is a hello world example, the bike shop offers a more complete overview of the base features.

```python
# Load pyschedule and create a scenario with ten steps planning horizon
from pyschedule import Scenario, solvers, plotters
S = Scenario('hello_pyschedule',horizon=10)

# Create two resources
Alice, Bob = S.Resource('Alice'), S.Resource('Bob')

# Create three tasks with lengths 1,2 and 3
cook, wash, clean = S.Task('cook',1), S.Task('wash',2), S.Task('clean',3)

# Assign tasks to resources, either Alice or Bob
cook += Alice|Bob
wash += Alice|Bob
clean += Alice|Bob

# Solve and print solution
S.use_makespan_objective()
solvers.mip.solve(S,msg=1)

# Print the solution
print(S.solution())
```

    INFO: execution time for solving mip (sec) = 0.025879621505737305
    INFO: objective = 3.0
    [(clean, Alice, 0, 3), (cook, Bob, 0, 1), (wash, Bob, 1, 3), (MakeSpan, Alice, 3, 4)]

In this example we use a makespan objective which means that we want to minimize the completion time of the last task. Hence, Bob should do the cooking from 0 to 1 and then do the washing from 1 to 3, whereas Alice will only do the cleaning from 0 to 3. This will ensure that both are done after three hours. This table representation is a little hard to read, we can visualize the plan using matplotlib:

```python
%matplotlib inline
plotters.matplotlib.plot(S,fig_size=(10,5))
```

![png](pics/hello-world.png)

Post any question is this google group. There are more notebooks here and simpler examples in the examples folder. For a technical overview go to here.

pyschedule supports different solvers, classical MIP- as well as CP-based ones. All solvers and their capabilities are listed in the technical overview. The default solver used above uses a standard MIP-model in combination with CBC, which is part of package pulp. If you have SCIP installed (command "scip" must be running), you can easily switch to SCIP using:

```python
solvers.mip.solve(S,kind='SCIP')
```

Similarly, if you have CPLEX installed (command "cplex" must be running), you can switch to CPLEX using:

```python
solvers.mip.solve(S,kind='CPLEX')
```

pyschedule is under active development, there might be non-backward-compatible changes. More base features are explained in the following example.

repository: renesugar/pyschedule

repo_name: renesugar/pyschedule


text:
# Evolutionary Telomere Dynamics
Author: Kent Horvath, MD PhD<EMAIL_ADDRESS>
Date: October 6, 2016
GitHub Repository: https://github.com/kenthorvath/evolutionary-telomere-dynamics
License: MIT (see LICENSE file)

## Description:
Here we provide a Monte Carlo simulation to model evolutionary telomere dynamics across generations. For an in depth description of epidemiological and theoretical considerations of our model, please refer to [1].

## Requirements:
The following open source libraries and packages are required for compiling and running this software. Installation instructions are provided for MacOS via [homebrew](https://brew.sh).
  - Java Runtime Environment (via: `brew cask install java`)
    - tested with Open JDK Runtime Environment 18.9
  - sbt 1.2.6+ (via: `brew install sbt`)
  - scala 2.12 (via: `brew install scala`)

## Compile:
Compile the project from the project root directory using `sbt assembly`.

## Run:
### Commands:
Run the Simulator from the project root via:
* `sbt "run <pacAgeCenter> <crossOverYear> <brinkEffect> <cancerIncidenceAdjustment> <maternalInheritance> <initialPopulationTL> <runLength> <numberOfTrials> <outputFileName>"`

Alternatively, run the compiled jar:
* `scala -cp ./target/scala-2.12/pac-effect-assembly-1.0.jar Simulator <pacAgeCenter> <crossOverYear> <brinkEffect> <cancerIncidenceAdjustment> <maternalInheritance> <initialPopulationTL> <runLength> <numberOfTrials> <outputFileName>`

### Parameters:
  - `<pacAgeCenter>` (`None` or a `Double`): PAC in years above which TL is added, below which subtracted
  - `<crossOverYear>` (`None` or an `Int`): Year that PAC model is switched on during simulation
  - `<brinkEffect>` (`Boolean`): Whether or not to include a brink effect in the model
  - `<cancerIncidenceAdjustment>` (`Double`): Scaling factor for cancer incidence (0.0 -> implies no cancer incidence)
  - `<maternalInheritance>` (`Double`): Weight of inherited maternal birth TL (range -> 0.0 to 1.0)
  - `<initialPopulationTL>` (`Int`): Given in base pairs
  - `<runLength>` (`Int`): Given in years
  - `<numberOfTrials>` (`Int`): Must be greater than or equal to 1
  - `<outputFileName>` (`String`): path to write CSV output

### Examples:
* via sbt: `scala "run 34.2 500 True 1.0 0.5 10000 1000 1 output.csv"`
* via compiled JAR: `scala -cp ./target/scala-2.12/pac-effect-assembly-1.0.jar Simulator 34.2 500 True 1.0 0.5 10000 1000 1 output.csv`

## References
1. [Paternal Age and Transgenerational Telomere Length Maintenance: A Simulation Model](http://doi.org/10.1038/s41598-018-36923-x),
    Horvath, K. Eisenberg, D., Stone, R., Anderson, J., Kark, J., Aviv, A., Nature Scientific Reports (accepted)

gha_language: Scala


text:
You can also have a look at the [Go documentation](https://pkg.go.dev/github.com/microsoftgraph/msgraph-sdk-go-core/)

> **Note:** Although you can use this library directly, we recommend you use the [v1](https://github.com/microsoftgraph/msgraph-sdk-go) or [beta](https://github.com/microsoftgraph/msgraph-sdk-go) library which rely on this library and additionally provide a fluent style Go API and models.
>
> **Note:** the Microsoft Graph Go SDK is currently in Community Preview. During this period we're expecting breaking changes to happen to the SDK based on community's feedback. Checkout the [known limitations](https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/1).

## Samples and usage guide

- [Middleware usage](https://github.com/microsoftgraph/msgraph-sdk-design/)

## 1.  Getting started

### 2.1 Register your application

Register your application by following the steps at [Register your app with the Microsoft Identity Platform](https://docs.microsoft.com/graph/auth-register-app-v2).

### 2.2 Create an AuthenticationProvider object

An instance of the **GraphRequestAdapterBase** class handles building client. To create a new instance of this class, you need to provide an instance of **AuthenticationProvider**, which can authenticate requests to Microsoft Graph.

For an example of how to get an authentication provider, see [choose a Microsoft Graph authentication provider](https://docs.microsoft.com/graph/sdks/choose-authentication-providers?tabs=Go).

> Note: we are working to add the getting started information for Go to our public documentation, in the meantime the following sample should help you getting started.

```Golang
import (
    azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
    a          "github.com/microsoft/kiota-authentication-azure-go"
    "context"
)

cred, err := azidentity.NewDeviceCodeCredential(&azidentity.DeviceCodeCredentialOptions{
    TenantID: "<the tenant id from your app registration>",
    ClientID: "<the client id from your app registration>",
    UserPrompt: func(ctx context.Context, message azidentity.DeviceCodeMessage) error {
        fmt.Println(message.Message)
        return nil
    },
})

if err != nil {
    fmt.Printf("Error creating credentials: %v\n", err)
}

auth, err := a.NewAzureIdentityAuthenticationProviderWithScopes(cred, []string{"Mail.Read", "Mail.Send"})
if err != nil {
    fmt.Printf("Error authentication provider: %v\n", err)
    return
}

```

### 2.3 Get a Request Adapter object

You must get a **GraphRequestAdapterBase** object to make requests against the service.

```Golang
import core "github.com/microsoftgraph/msgraph-sdk-go-core"

adapter, err := core.NewGraphRequestAdapterBase(auth)
if err != nil {
    fmt.Printf("Error creating adapter: %v\n", err)
    return
}
```

## 3. Make requests against the service

After you have a **GraphRequestAdapterBase** that is authenticated, you can begin making calls against the service. The requests against the service look like our [REST API](https://docs.microsoft.com/graph/api/overview?view=graph-rest-1.0).

### 3.1 Get the user's details

To retrieve the user's details

```Golang
import abs "github.com/microsoft/kiota-abstractions-go"

requestInf := abs.NewRequestInformation()
targetUrl, err := url.Parse("https://graph.microsoft.com/v1.0/me")
if err != nil {
    fmt.Printf("Error parsing URL: %v\n", err)
}
requestInf.SetUri(*targetUrl)

// User is your own type that implements Parsable or comes from the service library
user, err := adapter.SendAsync(*requestInf, func() { return &User }, nil)

if err != nil {
    fmt.Printf("Error getting the user: %v\n", err)
}
```

## 4. Issues

For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-sdk-go-core/issues).

## 5. Contributions

The Microsoft Graph SDK is open for contribution. To contribute to this project, see [Contributing](https://github.com/microsoftgraph/msgraph-sdk-go-core/blob/main/CONTRIBUTING.md).

## 6. License

Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MIT license](LICENSE).

## 7. Third-party notices

[Third-party notices](THIRD%20PARTY%20NOTICES)

repository: openshift/installer

repo_name: openshift/installer


text:
# Get-ArmorAccount

## SYNOPSIS
Retrieves Armor account details.

## SYNTAX

### ID (Default)
```
Get-ArmorAccount [[-ID] <UInt16>] [[-ApiVersion] <String>] [<CommonParameters>]
```

### Name
```
Get-ArmorAccount [[-Name] <String>] [[-ApiVersion] <String>] [<CommonParameters>]
```

## DESCRIPTION
Retrieves a list of Armor account memberships for the currently authenticated
user.
Returns a set of accounts that correspond to the filter criteria
provided by the cmdlet parameters.

## EXAMPLES

### EXAMPLE 1
```
Get-ArmorAccount
```

Gets all Armor accounts assigned to the logged in user account.

### EXAMPLE 2
```
Get-ArmorAccount -Name *Child*
```

Gets all Armor accounts assigned to the logged in user account with a name
containing the word 'Child'.

### EXAMPLE 3
```
1, 'Example Child Account' | Get-ArmorAccount
```

Gets the Armor accounts assigned to the logged in user account with ID=1 and
Name='Example Child Account' via pipeline values.

### EXAMPLE 4
```
[PSCustomObject] @{ 'ID' = 1 } | Get-ArmorAccount
```

Gets the Armor account assigned to the logged in user account with ID=1 via
property name in the pipeline.

### EXAMPLE 5
```
[PSCustomObject] @{ 'Name' = 'My Secure Account' } | Get-ArmorAccount
```

Gets the Armor account assigned to the logged in user account with
Name='My Secure Account' via property name in the pipeline.

## PARAMETERS

### -ApiVersion
Specifies the API version for this request.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: $Global:ArmorSession.ApiVersion
Accept pipeline input: False
Accept wildcard characters: False
```

### -ID
Specifies the ID of the Armor account.

```yaml
Type: UInt16
Parameter Sets: ID
Aliases:

Required: False
Position: 1
Default value: 0
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -Name
Specifies the name of the Armor account.

```yaml
Type: String
Parameter Sets: Name
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: True
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### UInt16

String

PSCustomObject

## OUTPUTS

### ArmorAccount

### ArmorAccount[]

## NOTES
- Troy Lindsay
- Twitter: @troylindsay42
- GitHub: tlindsay42

## RELATED LINKS

[https://tlindsay42.github.io/ArmorPowerShell/public/Get-ArmorAccount/](https://tlindsay42.github.io/ArmorPowerShell/public/Get-ArmorAccount/)

[https://github.com/tlindsay42/ArmorPowerShell/blob/master/Armor/Public/Get-ArmorAccount.ps1](https://github.com/tlindsay42/ArmorPowerShell/blob/master/Armor/Public/Get-ArmorAccount.ps1)

[https://docs.armor.com/display/KBSS/Get+Accounts](https://docs.armor.com/display/KBSS/Get+Accounts)

[https://developer.armor.com/#!/Account_Management/Accounts_GetAccounts](https://developer.armor.com/#!/Account_Management/Accounts_GetAccounts)

repository: vors/ArmorPowerShell

repo_name: vors/ArmorPowerShell


text:
---
title: "Upgrade a virtual guest"
description: "This example demonstrates the use of helper functions that
simplify the process of placing a virtual guest upgrade order"
date: "2016-09-19"
tags:
    - "VirtualGuest"
    - "UpgradeVirtualGuest"
---

```go
package main

import (
    "fmt"
    "log"

    "github.com/softlayer/softlayer-go/datatypes"
    "github.com/softlayer/softlayer-go/helpers/product"
    "github.com/softlayer/softlayer-go/helpers/virtual"
    "github.com/softlayer/softlayer-go/session"
    "github.com/softlayer/softlayer-go/sl"
)

const guestID = 123456

func main() {
    sess := session.New()

    // Create a minimal Virtual_Guest object to pass to the upgrade helper
    guestToUpgrade := datatypes.Virtual_Guest{
        Id: sl.Int(guestID),
    }

    // Upgrade to 4 Core, 8 GB
    upgradeOptions := map[string]float64{
        product.CPUCategoryCode:    float64(4),
        product.MemoryCategoryCode: float64(8),
    }

    receipt, err := virtual.UpgradeVirtualGuest(sess, &guestToUpgrade, upgradeOptions)
    if err != nil {
        log.Fatal("Couldn't upgrade virtual guest:", err)
    }

    fmt.Printf("Virtual Guest upgrade submitted.  Order ID: %s\n", *receipt.OrderId)
}
```

gha_language: HTML


text:
---
id: ffa6a4ba-5eda-48c7-add5-8e2333ba27b4
title: Configuration
desc: ''
updated:<PHONE_NUMBER>111
created:<PHONE_NUMBER>051
toc: true
nav_order: 3
---

# Configuration

Dendron lets you control publication behavior at three levels:
- **globally** through `dendron.yml` configuration
- **per note** through the publication related frontmatter
- **per line** through custom dendron directives inside the note

## Table of Contents

## Global Configuration

The `dendron.yml` configuration file controls what notes get published. It is located at the root of your workspace.

```
.
└── {workspace}
    └── dendron.yml
```

Below is the config that is used to publish `dendron.so` from the contents of this [repo](https://github.com/dendronhq/dendron-template)

```yml
site:
  siteHierarchies: [dendron]
  siteRootDir: docs
```

### Properties

#### assetsPrefix?: str
Prefix for assets.

- NOTE: By default, assets are served from the root. If you are publishing to github pages and followed the instructions [here](https://pages.github.com/) by creating a repo named `{username}.github.io`, then no further action is needed. This is because github will make your site available at `https://{username}.github.io`. If you created a custom repo, you will need to set the prefix to the name of your repo because github will make your site available at `https://username.github.io/{your-repo-name/}`

#### copyAssets
- required: no
- type: boolean
- default: true

Copy assets from vault to site.

#### siteHierarchies: str[]

List of hierarchies to publish

#### siteIndex?: str
- optional, path of your index (home page)
- defaults to the first element of `siteHierarchies`

#### siteRootDir

Location of the directory where site will be build. Relative to your workspace

#### siteRepoDir
- required: no
- type: string

Location of the github repo where your site notes are located. By default, this is assumed to be your `workspaceRoot` if not set. This is used with the `Publish Notes` command

#### usePrettyRefs
- default: True

Whether to use pretty note refs or plain refs.

#### config

Per hierarchy specific config. To set options for **all** hierarchies, set `{hiearchy name}` to **root**.

```yml
config:
  {hierarchy name}: {hierarchy options}
```

The list of possible options:
- **publishByDefault**: boolean, default: true
  - if set to false, dendron will only publish notes within the hierarchy that have `published: true` set in the frontmatter
- **noindexByDefault**: boolean, default: false
  - if set to true, dendron will add the following meta tag `<meta name="robots" content="noindex, nofollow”>` which will tell google to not index your page
  - when google indexes a page, it will penalize sites that have duplicate content from other sites. this is useful if you are using your hiearchy as a [[cache|dendron.workflows.cache]]
- **customFrontmatter**: list, default: []
  - if set, dendron will add the specified frontmatter to each published note in the hierarchy. note that this will override existing keys with the same name when publishing
  - eg. add `toc: true` to all notes published under the `iam.*` hierarchy
  ```yml
    config:
      iam:
          customFrontmatter: [
            {
              key: "toc",
              value: true,
            }
          ]
  ```

### Examples

#### Blog

Below is the config for [kevinslin.com](https://kevinslin.com). It publishes everything under the `home` and `blog` hierarchies but will only publish notes under `books` if `published: true` is set on the frontmatter.

- dendron.yml
```yml
site:
  siteHierarchies: [home, blog, books]
  siteRootDir: docs
  config:
    books:
      publishByDefault: false
```

#### Example publishing entire vault
- vault
```
.
├── root.md
├── dendron.md
├── dendron.quickstart.md
├── dendron.zen.md
├── flowers.md
└── flowers.bud.md
```
- dendron.yml
```yml
publish:
  siteHierarchies: [root]
```
- what gets published

```
.
└── root.md
    ├── dendron
    │   ├── dendron.quickstart
    │   └── dendron.zen
    └── flowers
        └── flowers.bud
```

#### Example publishing just one domain
- vault
```
.
├── root.md
├── dendron.md
├── dendron.quickstart.md
└── dendron.zen.md
```
- dendron.yml
```yml
publish:
  siteHierarchies: [dendron]
```
- published:

```
.
└── dendron
    ├── dendron.quickstart
    └── dendron.zen
```

## Note Configuration

You can specify how notes are published via the frontmatter of each note.

### Properties

#### published
- type: boolean
- default: true

To exclude a page from publication, you can add the following to the frontmatter. If you set `publishByDefault: false` for a hierarchy, this needs to be set to `true` to publish

```yml
...
published: false
```

#### noindex
- type: boolean
- default: true

To tell google to not index a page, you can add the following tag to the frontmatter. You can also have this as a default for a given hierarchy by setting `noIndexByDefault: true` in the site config.

```yml
...
noindex: true
```

#### toc
- type: boolean
- default: false

To generate a table of contents in a given note, enable this directive in the note frontmatter.

```yml
toc: true
```

You will also need to include the following line somewhere in the note body. Dendron will generate a table of contents when it finds that particular header

```md
## Table of Contents
```

The output will look like the below.
![](https://foundation-prod-assetspublic53c57cce-8cpvgjldwysl.s3-us-west-2.amazonaws.com/assets/images/change.toc.jpg)

- NOTE: in order to generate a table of contents, the heading levels after ToC need to be at an equal level or greater than the heading level of `Table of Contents`
  - this is okay
  ```markdown
  ## Table of Contents
  ## Header1
  ## Header2
  ```
  - this is not
  ```markdown
  ## Table of Contents
  ### Header1
  ### Header2
  ```

## Line Configuration

You can control publication on a per line basis.

## Properties

### LOCAL_ONLY_LINE

Sometimes, you just want to keep a few lines private while publishing the rest of your vault. You can do that with `Local only`. In order to mark a line as `Local Only`, add the following markdown comment at the end of the line: `<!--LOCAL_ONLY_LINE-->`

```markdown
Hello World!  <!-- Will be published -->

This is a secret <!--LOCAL_ONLY_LINE--> <!-- won't be published -->
```

![](https://foundation-prod-assetspublic53c57cce-8cpvgjldwysl.s3-us-west-2.amazonaws.com/assets/images/pod-local.gif)

repository: tsnieman/dendron-template

repo_name: tsnieman/dendron-template


text:
# Rgit

A reimplementation of some Git commands using Ruby. The following commands are implemented:

- `init`
- `checkout` (slightly modified - 2nd parameter specifies directory to write files to, must be empty)
- `log`
- `tag` (listing tags and creating a tag, either annotated or not)
- `branch` (listing branches only)
- `help`
- `cat-file`
- `hash-object`
- `ls-tree`
- `show-ref`

Sources:
- https://github.com/git/git/tree/master/Documentation/technical
- https://wyag.thb.lt/

## Installation

Run `./bin/setup` to install all the correct dependencies to `./vendor`. This project assumes you have Ruby and `bundle` available
on your PATH. `bundle` can be installed by running `gem install bundler` and ensuring the Gems binary dir is in your PATH.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dgavedissian/rgit.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

repository: dgavedissian/rgit

repo_name: dgavedissian/rgit


text:
# while

`(while CONDITION EXPRESSION...)`

The special expression `while` takes a condition and a variable number
of EXPRESSIONS. It evaluates the EXPRESSIONS if CONDITION
evaluates to `#true`, then repeats until CONDITION
evaluates to `#false`.

Always returns `#null`.

Examples:

```lisp
> (let (i 1 total 0)
    ; Sum numbers from 1 to 10.
    (while (<= i 10)
        (set! total (+ total i))
        (inc! i)
    )
    total
  )
55
```

repository: Wilfred/trifle

gha_language: Python

repo_name: Wilfred/trifle


text:
# libdvid-utils [![Picture](https://raw.github.com/janelia-flyem/janelia-flyem.github.com/master/images/gray_janelia_logo.png)](http://janelia.org/)
## C++ tools that work with DVID

Utilities that peform operations on data stored in [DVID](http://github.com/janelia-flyem/dvid).
It uses the [libdvid](http://github.com/janelia-flyem/libdvid-cpp) C++ library.

## Installing the dvid-viewer

To simplify the build we now use the [conda-build](http://conda.pydata.org/docs/build.html) tool.
The resulting binary is uploaded to the [flyem binstar channel](https://binstar.org/flyem),
and can be installed using the [conda](http://conda.pydata.org/) package manager.

The [Miniconda](http://conda.pydata.org/miniconda.html) tool first needs to installed:

```
# Install miniconda to the prefix of your choice, e.g. /my/miniconda

# LINUX:
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
bash Miniconda-latest-Linux-x86_64.sh

# MAC:
wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh
bash Miniconda-latest-MacOSX-x86_64.sh

# Activate conda
CONDA_ROOT=`conda info --root`
source ${CONDA_ROOT}/bin/activate root
```
Once conda is in your system path, call the following to install neuroproof:

    % conda create -n CHOOSE_ENV_NAME -c flyem dvid-viewer

Add CHOOSE_ENV_NAME/bin to your path to run dvid_viewer.

## Installation Instructions from Source (remaining packages)

libdvid-utils is currently only supported on linux operating systems.  It probably
would be relatively straightforward to build on a MacOS.

libdvid-utils supports two mechanisms for installation:

### Buildem (currently preferred but soon to be deprecated)

The most-supported and most push-button approach involves using the build system
called [buildem](https://github.com/janelia-flyem/buildem).  The advantage
of using buildem is that it will automatically build all of the dependencies
and put it in a separate environment so as not to conflict with any other
builds.  The disadvantage of buildem is that it will
install a lot of package dependencies.  The initial build of all of the dependencies
could take on the order of an hour to complete.

To build libdvid-utils using buildem

    % mkdir build; cd build;
    % cmake .. -DBUILDEM_DIR=/user-defined/path/to/build/directory
    % make -j num_processors

This will automatically load the binaries into BUILDEM_DIR/bin.  To run
the test regressions, add this directory into your PATH environment and
run make test in the build directory.

### Package only (untested)

libdvid-utils can be built without Buildem with the following:

    % mkdir build; cd build;
    % cmake ..
    % make

To successfully compile this code, you will need to install the following
dependencies and make sure their headers and libraries can be found in
the common linux search paths:

* jsoncpp
* boost
* libdvid-cpp

For more information on the supported versions of these dependencies, please
consult buildem.

To run make test, the installed libraries will need to be in the default
library search path or set in LD_LIBRARY_PATH. The
binaries produced will be placed in the libdvid-utils bin directory.

repository: janelia-flyem/libdvid-utils

repo_name: janelia-flyem/libdvid-utils


text:
# Sentima
This is a web application that integrates IBM Watsons Natural Language Processing to analyze how the user feels every day.

# Note
Make sure you use your own custom API Key and enter it in the classifier.js file.

# Run the Program
Go to the App folder and "application.html"

repository: aryanvichare/Sentima

repo_name: aryanvichare/Sentima


text:
#### `monitor/clock.json`
This report contains the date and time that is set on your pump, but does **NOT** include timezone information.
##### Setup code
`openaps report add monitor/clock.json JSON pump read_clock`
##### Sample contents
`"2016-05-22T00:18:41"`
##### Dependencies
* [`pump.ini`](./openaps-device-pump.md)

repository: eliotsdad/docs

repo_name: eliotsdad/docs


text:
---
title: Did You Know?
description: >
  Things you might not know about uibuilder.
created: 2022-11-30 17:35:40
lastUpdated: 2022-11-30 17:35:46
---

* *There is a set of new client (front-end) libraries*

  `uibuilder.iife.min.js` and `uibuilder.esm.min.js`. These are the new standard client libraries, there are some examples that use them and I'll be updating all of the examples when time permits. How to use them is described [here](https://totallyinformation.github.io/node-red-contrib-uibuilder/#/uibuilder.module).

* *You can create and update web page content and design direct from Node-RED!*

  Using both **no-code** (via the `uib-element` and `uib-update` nodes) and/or using **low-code** (via `msg._ui` configuration data) approaches. **Both approaches can also be used together**. This does not preclude you from using additional front-end frameworks either.

  See [here](client-docs/config-driven-ui.md) for details.

* *You can use uibuilder with any front-end framework*

  However, frameworks that need a build step can be somewhat intimidating to get started. [The front-end builds page](front-end-builds) gives more detail. A future version of uibuilder will add some additional helpers to make it easier.

  uibuilder is regularly tested with VueJS and Svelte but many other frameworks are known to work and some have examples in the [WIKI](https://github.com/TotallyInformation/node-red-contrib-uibuilder/wiki).

* *uibuilder comes with example flows*

  See Node-RED's import function in the Editor.

* *uibuilder comes with some built-in templates*

  These set up your front-end code for you, demonstrating the basic requirements. But did you know that it also supports [_external_ templates](https://github.com/TotallyInformation/node-red-contrib-uibuilder/wiki/External-Templates-Catalogue). Use these when you have a visual baseline that you want to reproduce or share with customers/colleagues. An external template is simply a preconfigured uibuilder instance folder that you put on GitHub. Why not showcase your external templates on the [WIKI](https://github.com/TotallyInformation/node-red-contrib-uibuilder/wiki/External-Templates-Catalogue).

* *There is a [first-timers walkthrough](walkthrough1) for getting started with uibuilder*

* *There are some YouTube videos on how to use uibuilder*

  [Julian Knight's uibuilder playlist](https://www.youtube.com/playlist?list=PL9IEADRqAal3mG3RcF0cJaaxIgFh3GdRQ).

* *You don't have to use Node-RED's ExpressJS web server with uibuilder*

  If you want to have your own custom web server settings, a few changes in Node-RED's settings.js will let you do that.

  That even lets you use server-side templating in your UI! [EJS templates](https://ejs.co/) can be turned on.

  See [Configuring uibuilder](uib-configuration.md) for details.

* *uibuilder provides data and middleware capabilities for custom security*

  While uibuilder does not provide any built-in security features, it does provide ExpressJS and Socket.IO middleware capabilities using external, shared files. These can be used for authentication and authorisation decisions.

  It also provides a stable client ID, client IP address, the source page nameg, and other client data in both control and standard messages. This can help with authentication and authorisation processing using Node-RED flows or the middleware as you prefer.

  This documentation also contains information specific to security both Node-RED and uibuilder. Specifically it documents how to use an external proxy server to handle authentication.

* *The default folder for all uibuilder content is `~/.node-red/uibuilder`*

  However, you don't _have_ to keep it there. You can make it any folder that is accessible to Node-RED.

  Each uibuilder node gets its own sub-folder named after the `url` name you specify in the node. The `url` value is also used as the `path` in the browser location. So a url named `test` would have a sub-folder `~/.node-red/uibuilder/test` and a browser location of `http://node-red.server:1880/test/`. These are simple examples and several Node-RED variables can change particularly the browser location.


text:
---
title: "APIs"
---

# SpaceVim public APIs:

SpaceVim provide many public apis, you can use this apis in your plugins. SpaceVim api got inspired by [vital.vim](https://github.com/vim-jp/vital.vim)

## Usage

```viml

let s:file = SpaceVim#api#import('file')
let s:system = SpaceVim#api#import('system')

if s:system.isWindows
    echom "Os is Windows"
endif
echom s:file.separator
echom s:file.pathSeparator
```

here is the list of all the apis, and welcome to contribute to SpaceVim.

name | description | documentation
----- |:----:| -------
file  | basic api about file and directory | [readme](https://spacevim.org/api/file)
system | basic api about system | [readme](https://spacevim.org/api/system)

gha_language: Vim script


text:
# GAAAN
GAAAN is a Generative Album Art Adversarial Network that uses the DCGAN architecture to generate unique music album-art images.
This repository contains folders for acquiring the data, training the GAN, and deploying the GAN with a Flask webserver.
### Future Iterations
The plan is to experiment more with training and different architectures to produce more detailed results as well as
re=implementing the user interface of the web service.
## IMAGES
* **Webservice Landing Page**

* **Training Output**

* **Output Examples**

## GETTING STARTED

### Running The Web Service
* Download or clone the repository and change your working directory to the repository.
* Type these commands in to your terminal or command prompt:
* ``` cd WebService ```
* ``` pip install requirements ```
* ``` python3 main.py ```

### Making Your Own Training Dataset
* You sign up for a spotify developers credential here: https://developer.spotify.com/console/
* Use the albumArtDownloader.py to scrape Spotify and save a csv file with the artists info and weblinks to their album art covers
     - THIS DOES NOT ACTUALLY DOWNLOAD THE IMAGES.
* Use DataSetAnalysis.ipynb to load the masterAlbumList.csv and check for duplicates, make smaller subsets.
* THEN download the images to a directory
     - you will need to specify the directory name in the Album_Art_GAN.ipynb notebook so the training can find the images.

### Doing Your Own Training
* You can train locally on your machine using Jupyter Notebooks or upload the repository to your Google Drive and train using Google Colab Pro.
* In the "data_and_training" directory, open Album Art Gan.ipynb
* If you are training locally, skip the first two cells of the Album Art Gan notebook.

## BUILT WITH
* [Tensorflow](https://www.tensorflow.org) - ML model creation
* [Keras](https://keras.io) - Model creation
* [Google Colab](https://colab.research.google.com/) - Free Cloud Training
* [Flask](https://flask.palletsprojects.com/en/1.1.x/) - Web Server
* [Pillow](https://pillow.readthedocs.io/en/stable/) - Library for image handling
* [Spotipy](https://spotipy.readthedocs.io/en/2.12.0/) - Python library for connecting to Spotify API
## REFERENCES
* [Unsupervised representation learning with deep convolutional generative adversarial networks](https://arxiv.org/pdf/1511.06434.pdf%C3 )
* [Generating modern arts using generative adversarial network gan on spell ](https://towardsdatascience.com/generating-modern-arts-using-generative-adversarial-network-gan-on-spell-39f67f83c7b4 )
* [Generate Anime Style Face Using DCGAN and Explore Its Latent Feature Representation](towardsdatascience.com/generate-anime-style-face-using-dcgan-and-explore-its-latent-feature-representation-ae0e905f3974 )

## Contributors
Michael McDermott, Joshua Matthews, Patrick Caldwell

## LICENSE
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

gha_language: Jupyter Notebook


text:
Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path.

In a UNIX-style file system, a period `.` refers to the current directory. Furthermore, a double period `..` moves the directory up a level. For more information, see: Absolute path vs relative path in Linux/Unix.

Note that the returned canonical path must always begin with a slash `/` , and there must be only a single slash `/` between two directory names. The last directory name(if it exists) must not end with a trailing `/`. Also, the canonical path must be the shortest string representing the absolute path.

Example 1:

```
Input: "/home/"
Output: "/home"
```

Example 2:

```
Input: "/../"
Output: "/"
```

Example 3:

```
Input: "/home//foo/"
Output: "/home/foo"
```

Example 4:

```
Input: "/a/./b/../../c/"
Output: "/c"
```

solution steps:

1. replace the ./

description: this step should be the last

2. replace the // 、///、////

```js
var str = "///..///";
var res = str.replace(/\/+/,'/');
console.log(res);
```

description: can't replace the string except the first substring.

```js
var str = "///..///";
var res = str.replace(/\/+/g,'/');
console.log(res);
```

3. look for the index of ..

```js
var index = /\.\./g.exec(str);
console.log(index);
```

description: can't look for all the places of ..

# JavaScript String substring() Method

string.substring(start, end)

start Required. The position where to start the extraction. First character is at index 0

end Optional. The position (up to, but not including) where to end the extraction. If omitted, it extracts the rest of the string

# Array.prototype.push()

```js
var animals = ['pigs', 'goats', 'sheep'];

console.log(animals.push('cows'));
// expected output: 4

console.log(animals);
// expected output: Array ["pigs", "goats", "sheep", "cows"]

animals.push('chickens');

console.log(animals);
// expected output: Array ["pigs", "goats", "sheep", "cows", "chickens"]
```

```js
// not finished
/**
 * @param {string} path
 * @return {string}
 */
var simplifyPath = function(path) {
    let len = path.length;
    let count = 0;
    let dp = new Array();
    let last = 0;
    if(len == 0)
        return "";
    let start;
    for(let i = 0; i < len; i++) {
         if(path[i] == '/') {
             dp.push(path.substring(0, i+1));
             start = i+1;
             break;
         }
    }
    last = start;
    for(let i = start; i < len; i++) {
        if(path[i] == '/')
            count++;
        if(path[i] == '/') {
            let sTemp = path.substring(last+1, i);
            if(sTemp != "..")
            if(sTemp )
            last = i;
        }
    }
    console.log(count);
    return "/home";
};
```

# JavaScript String replace() Method

```js
var str = "Visit Microsoft!";
var res = str.replace("Microsoft", "W3Schools");
// Visit W3Schools
```

But it just replace the first searchstring.

# Regular Expressions

Regular expressins are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the `exec` and `test` methods of `RegExp`, and with the `match`, `mathcAll`, `replace`, `search` , and `spilt` methods of `String`. This chapter describes JavaScript regular expressions.

## Creating a regular expression

You constuct a regular expression in one of two ways:

Using a regular expression literal, which consists of a pattern enclosed between slashes, as follows:

```js
var re = /ab+c/;
```

Regular expression literal provide compilation of the regular expression when the script is loaded. If the regular expression remains constant, using this can improve performance.

Or calling the constructor function of the `RegExp` object, as follows:

```js
var re = new RegExp('ab+c');
```

Using the constructor function provides runtime compilation of the regular expression. Use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and are getting it from another source, such as user input.

## Writing a regular expression pattern

A regular expression pattern is composed of simple characters, such as `/abc/`, or a combination of simple and special characters, such as `/ab*c/` or `/Chapter (\d+)\.\d*/`. The last example includes parentheses which are used as a memory device. The match made with this part of the pattern is remembered for later use, as described in **Using parenthesized substring matches**.

### Using simple patterns

Simple patterns are constructed of characters for which you want to find a direct match. For example, the pattern `/abc/` matches character combinations in strings only when exactly the character `abc` occur together and in that order. Such a match would succeed in the strings "Hi, do you know your abc's?" and "The latest airplane designs evolved from slabcraft". In both cases the match is with substring `abc`.

### Using special characters

When the search for a match requires something more than a direct match, such as finding one or more b's, or finding white space, you can include special characters in the pattern. For example, to match a single 'a' followed by zero or more 'b's followed 'c', you'd use the pattern `/ab*c/`: the `*` aftern 'b' means "0 or more occurrences of the preceding item". In the string 'cbbabbbbcdebc', the pattern matches the substring 'abbbbc'.

The following pages provide a complete list and description of the special characters that can be used in regular expressions.

### Assertions

Indicate in some way that a match is possible. Assertions include look-ahead, look-behind, and conditional expressions.

### Working with regular expressions

Regular expressions are used with the `RegExp` methods `test` and `exec` and with the `String` methods `match` , `replace`, `search`, and `split`. These methods are explained in detail in the JavaScript reference.

**Methods that use regular expressions**

| **Method** | Description                                                  |
| ---------- | ------------------------------------------------------------ |
| `exec`     | A  `RegExp` method that executes a search for a match in a string. It returns an array of imformation or null on a mismatch |
| `test`     | A `RegExp` method that tests for a match in a string. It returns true or false. |
| `match`    | A `String` method that excutes a search for a match in a string. It returns an array of information or null on a mismatch. |
| `matchAll` | A `String` method that returns an iterator containing all of the matches, including capturing groups. |
| `search`   | A `String` method that tests for a match in a string. It returns the index of the match, or -1 if the search fails. |
| `replace`  | A `String` method that excutes a search for a match in a string, and replaces the matched substring with a replacement substring. |
| `split`    | A `String` method that uses a regular expression or a fixed string to break a string into an array of substrings. |

When you want to know whether a pattern is found in a string, use the `test` or `search` method; for more imformation(but slower execution) use the `exec` or `match` methods. If you use `exec` or `match` and if the match succeeds, these methods return an array and update properties of the associated regular expression object and also of the predefined regular expression object, `RegExp`. If the match fails, the `exec` method returns `null`(which coerces tp `false`).

In the following example, the script uses the `exec` method to find a match in a string.

```js
var myRe = /d(b+)d/g;
var myArray = myRe.exec('cdbbdbsbz');
```

If you do not need to access the properties of the regular expression, an alternative way of creating `MyArray` is with this script:

```js
var myArray = /d(b+)d/g.exec('cdbbdbsbz');
    // similar to "cdbbdbsbz".match(/d(b+)d/g); however,
    // "cdbbdbsbz".match(/d(b+)d/g) outputs Array [ "dbbd" ], while
    // /d(b+)d/g.exec('cdbbdbsbz') outputs Array [ 'dbbd', 'bb', index: 1, input: 'cdbbdbsbz' ].
```

If you want to construct the regular expression from a string, yet another alternative is this script:

```js
var myRe = new RegExp('d(b+)d', 'g');
var myArray = myRe.exec('cdbbdbsbz');
```

With these scripts, the match succeeds and returns the array and updates the properties shown in the following table:

| **Object** | Property or index | Description                                                  | In this example                                |
| ---------- | ----------------- | ------------------------------------------------------------ | ---------------------------------------------- |
| `myArray`  |                   | The matched string and all remembered substrings.            | `['dbbd', 'bb', index: 1, input: 'cdbbdbsbz']` |
| `myArray`  | `index`           | The 0 - based index of the match in the input string.        | `1`                                            |
| `myArray`  | `input`           | The original string                                          | `"cdbbdbsbz"`                                  |
| `myArray`  | `[0]`             | The last matched characters.                                 | `"dbbd"`                                       |
| `myRe`     | `lastIndex`       | The index at which to start the next match. (This property is set only if the regular expression uses the g option, descripe in Advanced Searching With Flags). | `5`                                            |
| `myRe`     | `source`          | The text of the pattern. Updated at the time that the regular expression is created, not executed. | `"d(b+)d"`                                     |

As shown in the second form of this example, you can use a regular expression created with an object initializer without assigning it to a variable. If you do, however, every occurence is a new regular expression. For this reason, if you use this form without assigning it to variable, you cannot subsequently access the properties of that regular expression. For example, assume you have this script:

```js
var myRe = /d(b+)d/g;
var myArray = myRe.exec('cdbbdbsbz');
console.log('The value of lastIndex is ' + myRe.lastIndex);

// "The value of lastIndex is 5"
```

However, if you have this script:

```js
var myArray = /d(b+)d/g.exec('cdbbdbsbz');
console.log('The value of lastIndex is ' + /d(b+)d/g.lastIndex);

// "The value of lastIndex is 0"
```

The occurrences of `/d(b+)d/g` in the two statments are different regular e


text:
# battleship

Play it here -- https://mbeckdev.github.io/battleship/

Guide to creating your own here: https://www.theodinproject.com/paths/full-stack-javascript/courses/javascript/lessons/battleship

## Notes
Holy moley! So much logic goes into this game in checking whether or not you can drag and drop to a valid square.

Did you know that JavaScript doesn't allow 2d arrays natively? To get around that I made 100 divs and added data-id's to them to approximate a coordinate system. Then I could call any one I liked. I thought that was neat because I've made grids of divs before named 1 to 100 so you'd have to do math to remember that up and down you need to add a row's worth of numbers. I like this method better.

The main point of making this project was to practice using Jest to test code.  I started making this by creating modules, and the functions each one will have and test them individually with Jest.  When all that was done, I went ahead and made all the visual things in the dom. What an odd way of creating a project. Odd to me right now because I've been doing the spaghetti method (just keep making things until it works) but this method is soooo more organized in the code and it's sooo much easier to find what you want. I really like it.  The hard part about testing is knowing when to make a test. Mostly it's like tests are black boxes. You put in an input and expect an output. The code inside the black box doesn't matter and you shouldn't test that part (it'll just make your life complicated down the road). At least that's what some articles I read said.

## Coding Things Used
- Jest
- HTML
- CSS
- JavaScript
- webpack

## Possible Future Improvements For Someday
- Improve computer's guesses - not just random guesses on an unguessed spot, but if it gets a hit, check squares around it until you guess an entire ship.
- Sound effects
- Background music with a music toggle button
- Maybe multiplayer using some node.js  -- I don't know how to do this yet, but I know it's possible.
- Making ships look like ships instead of rectangles

license: Unlicense

repository: mbeckdev/battleship

repo_name: mbeckdev/battleship


text:
# {Marigas Portfolio}
#### {A portfolio showcasing who Mariga is, and Projects he has worked on}, {6/11/21}
#### By **Isaac Wangombe**
## Description
{Mariga;s Portfolio with his name, an image of him,a list of projects he has created with active links to them (either on GitHub or GitHub pages) For each, including a brief description of the project and what languages it uses An "About Me" section including:
his background his current interests/hobbies/skills

## Setup/Installation Requirements
site live at
https://isaacmariga.github.io/Isaac_Portfolio/

## Known Bugs
Not fully responsive to smaller page sizes
Live site at times has an error
## Technologies Used
Build wth HTML and CSS
## Support and contact details
Coontact me at<EMAIL_ADDRESS>or call<PHONE_NUMBER>
### License
This is under [MIT](license)

Copyright (c) {2021} **{Isaac Wangombe}**


text:
# Necessary change in OpenDaylight DLUX

In order to use latest features of [ui-bootstrap](https://angular-ui.github.io/bootstrap/) the version number used by OpenDaylight Boron-SR1 was changed to  "~2.1.3" in the static ODL DLUX WEB project.

This change results in a modified "loader.implementation-0.4.1-Boron-SR1.jar" which needs to be extraced to the Openraylight Karaf "system" folder.
```
tar -xzf distribution-karaf-0.5.3-Boron-SR3.dluxloader.tar.gz -C $ODL_KARAF_HOME/system
```

Please restart karaf.

## Changes in DLUX project Boron-SR1
```
$ git diff
diff --git a/dlux-web/bower.json b/dlux-web/bower.json
index fc64524..c6f6bee 100644
--- a/dlux-web/bower.json
+++ b/dlux-web/bower.json
@@ -42,7 +42,7 @@
     "angular": "~1.4.0",
     "angular-mocks": "~1.4.0",
     "bootstrap": "~3.0.2",
-    "angular-bootstrap": "~0.13.0",
+    "angular-bootstrap": "~2.3.1",
     "ng-grid": "~2.0.7",
     "requirejs-domready": "~2.0.1",
     "ocLazyLoad": "0.3.0",
diff --git a/dlux-web/src/less/design.less b/dlux-web/src/less/design.less
index 083787e..2fdbc54 100644
--- a/dlux-web/src/less/design.less
+++ b/dlux-web/src/less/design.less
@@ -13,7 +13,7 @@
 }

 a {
-       color: #414042 !important;
+       color: #414042 /* !important */;
 }

 li.active {
```


text:
# mysimplecompedium

<!-- badges: start -->
[![R build status](https://github.com/LiYingWang/mysimplecompedium/workflows/R-CMD-check/badge.svg)](https://github.com/LiYingWang/mysimplecompedium/actions)
[![Launch Rstudio Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LiYingWang/mysimplecompedium/master?urlpath=rstudio)
<!-- badges: end -->

The goal of mysimplecompedium is to ...

## Installation

You can install the released version of mysimplecompedium from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("mysimplecompedium")
```

## Example

This is a basic example which shows you how to solve a common problem:

``` r
library(mysimplecompedium)
## basic example code
```

repository: LiYingWang/mysimplecompedium

repo_name: LiYingWang/mysimplecompedium


text:
ember-cli-sentry
================

An ember-cli addon adding [Sentry](https://www.getsentry.com) support.

Docs are available [here](https://damiencaselli.github.io/ember-cli-sentry/).

## What it does (and does not)

This addon does:

* Enable safe use of Raven.js whether you are in development mode or not.
* Inject a logging service to routes, components, controllers and models to access Raven object.
* Provide a default logger generator that should work for the vast majority of people.
* Add an **opt-out** bower dependency to ravenjs.
* Provide rather complete customization.

This addon does **not**:

* Generate the logging service for you.
* Provide a Sentry key for testing.

## Important notice if you migrate from 1.x.x to 2.x

Please have a look at [this wiki entry](https://github.com/damiencaselli/ember-cli-sentry/wiki/Migration-from-1.x.x-to-2.x) if you upgrade major version of ember-cli-sentry.

## Install

From any ember-cli application, run `ember install ember-cli-sentry`.

_Note: Since **v2.1.2**, Raven bower component is automatically included by this addon.
If you want to use your own packaged version or the cdn option, you'll have to opt-out by removing it from bower dependencies._

The addon will assume there is an available service that proxies Raven, which is not the case unless you already did the install.

The easiest way of doing it is to create a service only extending `ember-cli-sentry/services/raven`:

```js
// your-app/services/custom-logger.js
export { default } from 'ember-cli-sentry/services/raven';
```

You can also use a generator `ember g logger <logger-name>`, which will generate a service called `<logger-name>` extending `ember-cli-sentry/services/raven` and exposing its methods and properties.
If you create the logger service that way, note that you must use the same name for the `serviceName` property.

Now that you have a dedicated service for Raven.js, let's configure it.

## Configuration

### TLDR

You already have a service named `raven` that extends `ember-cli-sentry/services/raven`.

```js
// config/environment.js

module.exports = function(environment) {
  var ENV = {

    /* config */

    sentry: {
      dsn<EMAIL_ADDRESS>    }
  }
}
```

### Complete config

```js
// config/environment.js

module.exports = function(environment) {
  var ENV = {

    /* config */

    sentry: {

      /**
       * If Raven.js is not inlined in your code, this is
       * where you want to define it.
       *
       * I recommend **not** using a build containing ember.js plugin
       * (https://github.com/getsentry/raven-js/blob/master/plugins/ember.js)
       * since setting `globalErrorCatching: true` will perform the same
       * operation, but safely.
       *
       * @type {String}
       * @default undefined
       */
      cdn: 'https://cdn.ravenjs.com/3.3.0/raven.min.js',

      /**
       * The only mandatory parameter.
       *
       * @type {String}
       */
      dsn<EMAIL_ADDRESS>
      /**
       * Sets Raven.debug property when running `Raven.config`.
       *
       * @type {Boolean}
       * @default true
       */
      debug: true,

      /**
       * If set to true, it will prevent Raven.js from being initialized.
       * Errors and logs will be logged to the console (default) instead of
       * being reported by Raven.
       *
       * @type {Boolean}
       * @default undefined
       */
      development: false,

      /**
       * Injects the logging service as this property.
       *
       * @type {String}
       * @default 'raven'
       */
      exposedPropertyName: 'raven',

      /**
       * If set to true, addon will try to have Ember.onerror
       * and Ember.RSVP.on('error') captured by Raven.
       *
       * @type {Boolean}
       * @default true
       */
      globalErrorCatching: true,

      /**
       * Service used to interface with Raven.
       *
       * @type {String}
       * @default 'raven'
       */
      serviceName: 'raven',

      /**
       * Raven.js option.
       *
       * @type {Array}
       * @default []
       */
      includePaths: [],

      /**
       * Raven.js option.
       *
       * @type {Array}
       * @default []
       */
      whitelistUrls: [],

      /**
       * Options to pass directly to Raven.js. Note: whitelistUrls and
       * includePaths in this will take precedence
       * over the above.
       *
       * @default {}
       */
      ravenOptions: {},
    }
  }
}
```

## Content Security Policy

To allow Ravenjs to work properly, you need to add a couple of thing to the content security policy rules:

```
'script-src': "'self' 'unsafe-inline' 'unsafe-eval' cdn.ravenjs.com",
'img-src': "data: app.getsentry.com",
'connect-src': "'self' app.getsentry.com"
```

## Meaningless stack traces?

See [this issue](https://github.com/damiencaselli/ember-cli-sentry/issues/28).

## Example

The dummy application in tests is a working example with a couple of logging here and there, and a default logger.

## Dependencies

[Raven.js](https://github.com/getsentry/raven-js)

## Licence

[MIT](https://raw.githubusercontent.com/damiencaselli/ember-cli-sentry/master/LICENSE.md)

repository: tchak/ember-cli-sentry

repo_name: tchak/ember-cli-sentry


text:
# 1.0.9 (2018-01-26)
* Update RxJS to [5.5.6](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#556-2017-12-21) and
removed deep operator imports in favor of [pipeable](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) operators.

# 1.0.10 (2018-02-16)
* Update types from 'any'.
* Add [setDisabledState()]() implementation.
* Demo cleanup.
* Refactor input properties to provide better completion.

# 1.0.11 (2018-02-16)
* Fix an [error](https://github.com/angular/angular/issues/20095) when
importing directly from Rxjs.
* **This will [change](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#breaking-changes-1)
in future versions (version 2.x) to keep best practices moving forward**

repository: nartc/file-input-accessor

repo_name: nartc/file-input-accessor