text:
# sra_download
This is a python script (draft) for download sequencing data from SRA database

---

### Features

- Parallel processing download or fastq-dump

### Usage

```txt
usage: sra_download.py [-h] [--wget] [--prefetch] [--fastq-dump] [--sam-dump]
                       [-t TARGET_PATH] [--sra SRA_FILE] [--threads THREADS]
                       [--version]

optional arguments:
  -h, --help            show this help message and exit
  --wget                download sra file through ftp use wget
  --prefetch            download sra file through https use prefetch
  --fastq-dump          tranverse sra to fastq.gz
  --sam-dump            tranverse sra to SAM and then to fastq with CB and UB
                        information, specially for dropseq data
  -t TARGET_PATH, --target TARGET_PATH
                        download path of sra file use --wget. For --fastq-
                        dump, this is the path containing sra file
  --sra SRA_FILE        The txt file contains SRR id for download
  --threads THREADS     threads for tasks
  --version             show program's version number and exit
```

```shell
#for example
# step1. Download SRA file though ftp (wget)
python sra_download.py --wget -t $target_path --sra sra_list.txt --threads 5
# or Download SRA file though https (prefetch)
# Under this mode, user can not define the download path,
# except define by vdb-config. (vdb-config -i)
# The default download path is /home/${user_name}/ncbi
python sra_download.py --prefetch --sra sra_list.txt --threads 5
# step2. Tranverse SRA file to FASTQ file
python sra_download.py --fastq_dump -t $target_path --threads 5
```

`sra_list.txt` contains a series of SRR ID. Each ID takes up one line.

`run.pbs` is a pbs script running on Nebula cluster.

Please add `sratoolkit` directory to you $PATH first.

For details of `vdb-config`, see this link: <https://github.com/ncbi/sra-tools/wiki/Toolkit-Configuration>

### Requirements

- [sratoolkit](<https://www.ncbi.nlm.nih.gov/sra/docs/toolkitsoft/>)


text:
# Orzo

[![CI](https://github.com/luchiniatwork/orzo/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/luchiniatwork/orzo/actions/workflows/ci.yml)
[![Clojars Project](https://img.shields.io/clojars/v/luchiniatwork/orzo.svg)](http://clojars.org/luchiniatwork/orzo)
[![cljdoc badge](https://cljdoc.org/badge/luchiniatwork/orzo)](https://cljdoc.org/d/luchiniatwork/orzo/CURRENT)
![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
![Beta Project](https://img.shields.io/badge/project%20status-beta-brightgreen.svg)

Orzo lets you manage the versioning strategy of any project from one
single place.

## Table of Contents

* [Getting Started](#getting-started)
* [Motivation](#motivation)
* [Usage](#usage)
* [Bugs](#bugs)
* [Help!](#help)

## Getting Started

Add `orzo` as a dependency in your `deps.edn` file (possibly as an
alias as shown below):

``` clojure
{:aliases
 {:orzo {:extra-deps
         {luchiniatwork/orzo {:mvn/version "23.2.5"}}}}}
```

`orzo` has a series of composable functions specifically designed to
implement versioning strategy. You can see other example in
[Usage](#usage) below or refer to the [API
docs](https://cljdoc.org/d/luchiniatwork/orzo/CURRENT) to compose your
own strategy.

For the sake of this getting started, lets assume you want a semver
strategy that composes the major and minor from a text file with a
patch that is the job number of your build server.

Assumption one: you have a file `resources/base_version.txt` that
contains:

``` text
1.2
```

Assumption two: your build server places the build number on an
environment variable called `BUILD_NUM`.

Assumption three: you want to save the calculated version into a file
at `resources/version.txt` so that your users are able to identify
this built.

Assumption four: if everything goes fine (assuming your build server
runs tests as well) you want to tag your repo with the version number
prefaced with a `v` (as in `v0.4.542`).

In order to accomplish these you'll first need to create a script
called `gen_version.clj` on your classpath:

``` clojure
(ns gen-version
  (:require [orzo.core :as orzo]))

(defn -main [& args]
  (try
    (println (-> (orzo/read-file "resources/base_version.txt")
                 (orzo/extract-base-semver)
                 (orzo/set-semver {:patch (orzo/env "BUILD_NUM")})
                 (orzo/save-file "resources/version.txt")
                 (orzo/stage)))
    (System/exit 0)
    (catch Exception e
      (println e)
      (System/exit 1))))
```

`orzo` works with composable functions that can be easily piped with a
thread-first macro.

The first function `orzo/read-file` reads the first line of
`resources/base_version.txt` and returns its contents.

`orzo/extract-base-semver` will take that version just read and return
a semver object that can be manipulated.

For the next line we use `orzo/set-semver` to set the `:patch` of the
semver with whatever is the content of the environment variable
`BUILD_NUM` (read here with another `orzo` function `orzo/env`).

We then save the generated version with `orzo/save-file` so that it
can be read by users of this packaged later.

`orzo` also offers a convenient function for "staging" the version so
that it can be used at a later point. The function here is
`orzo/stage` and it's usually the last one in the script.

To run the script above:

``` shell
$ clojure -A:orzo -m gen-version
```

If your base version file is `1.2` and your build number is `451` you
should see:

``` text
1.2.451
```

Tip: if you are testing it locally and do not have an environment
version `BUILD_NUM` set, simply run:

``` shell
$ BUILD_NUM=451 clojure -A:orzo -m gen-version
```

Staging the version is important for the next script. We will call it
`tag_and_push_version.clj`:

``` clojure
(ns tag-and-push-version
  (:require [orzo.core :as orzo]
            [orzo.git :as git]))

(defn -main [& args]
  (try
    (println (-> (orzo/unstage)
                 (orzo/prepend "v")
                 (git/tag)
                 (git/push-tag)))
    (System/exit 0)
    (catch Exception e
      (println e)
      (System/exit 1))))
```

This script is recovering the version that was staged by the previous
script with `orzo/unstage`. Then it prepends it with a `v`, creates a
tag (`orzo/tag`) and pushes the tag back to your origin
(`orzo/push-tag`).

Of course you will only run this script if the build was
successful. In such case, run it with:

``` shell
$ clojure -A:orzo -m tag-and-push-version
```

## Motivation

Versioning is a concern in every single project. `orzo` is a simple,
configurable and extensible tool to implement any versioning strategy
your project requires.

## Usage

All functions withing `orzo` are composable via thread-first
macros. Such a practice allows for very short and easy-to-read scripts.

For a detailed insight over each function, do refer to the [API
docs](https://cljdoc.org/d/luchiniatwork/orzo/CURRENT).

The functions are grouped by informational functions, transformation
functions, validation functions and persistence functions.

**Informational functions** read some information from the system into the
stream. Examples are `orzo.core/env` or `orzo.core/read-file` that
read an environment variable or a file, respectively. Many other
functions fall into that category, for instance `orzo.git/last-tag`
that extracts the last tag from git.

**Transformation functions** alter the version in the
pipeline. Examples are `orzo.core/append`
`orzo.core/extract-base-semver` or `orzo.core/bump-semver`. These let
you append a value to the version, transform the version into semver
or bump certain semver indicators.

**Validation functions** will throw if something is wrong. For
instance `orzo.git/assert-clean?` will throw if the repo is not clean
locally.

**Persistence functions** are usually at the very end of `orzo`
scripts. They will have side effects and therefore must be used
carefully. `orzo.core/save-file` is a great example where a file is
saved with the version passed to it. Other examples are `orzo.git/tag`
and `orzo.git/push`. Both functions have implications on your git
repo (locally and remotely, respectively).

## Bugs

If you find a bug, submit a [GitHub
issue](https://github.com/luchiniatwork/orzo/issues).

## Help

This project is looking for team members who can help this project
succeed!  If you are interested in becoming a team member please open
an issue.

## License

Copyright © 2023 Tiago Luchini

Distributed under the MIT License.

license: MIT

repository: luchiniatwork/orzo

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: luchiniatwork/orzo


text:
---
title: "Glow: Generative Flow with Invertible 1×1 Convolutions"
date: 2019-05-07 14:59:24 +0200
tags: [generative models, reversible networks]
categories: [Generative Models]
author: D. Kingma and P. Dhariwal
venue: NeurIPS
paperurl: 'https://arxiv.org/abs/1807.03039'
thumb: /images/thumbs/notes/glow.png
year: 2018
---

  Invertible flow based generative models such as [2, 3] have several advantages including exact likelihood inference process (unlike VAEs or GANs) and easily parallelizable training and inference (unlike the sequential generative process in auto-regressive models). This paper proposes a new, more flexible, form of invertible flow for generative models, which builds on [3].

Pros (+):  Very clear presentation, promising results both quantitative and qualitative.

Cons (-): One of the disadvantages of the models seem to be a large number of parameters, it would be interesting to have a more detailed report on training time. Also a comparison to [5] (a variant of PixelCNN that allows for faster parallelized sample generation) would be nice.

 Invertible flow-Based Generative Models

Given input data $$x$$, invertible  flow-based generative models are built as two steps processes that generate data from an intermediate latent representation $$z$$:

$$
\begin{align}
z \sim p_{\theta}(z)\\
x = g_\theta(z)
\end{align}
$$

 where $$g_\theta$$ is an *invertible* function, i.e. a bijection, $$g_\theta: \mathcal X \rightarrow \mathcal Z$$. It acts  as an encoder from the input data to the latent space.
  $$g$$  is usually built as a sequence of smaller invertible functions $$g = g_1 \circ \dots \circ g_n$$. Such a sequence is also called a *normalizing flow* [1]. Under this construction, the *change of variables formula* applied to $$x = g(z)$$ gives the following equivalence between the input and latent densities:

$$
\begin{align}
\log p(x) &= \log p(z) + \log\ \left| \det \left( \frac{d z}{d x} \right)\right|\\
&= \log p(z) + \sum_{i=1}^n \log\ \left| \det \left( \frac{g_{\leq i}(x)}{g_{\leq i - 1}(x)} \right)\right|
\end{align}
$$

where $$\forall i \in [1; n],\ g_{\leq i} = g_i \circ \dots g_1$$ In particular, this means $$g_{\leq n}(x) = z$$ and $$g_0(x) = x$$. $$p_\theta(z)$$ is usually chosen as a simple density such as a unit Gaussian distribution, $$p_\theta(z) = \mathcal N(z; 0, \mathbf{I})$$.
In order to efficiently estimate the likelihood, the functions $$g_1, \dots g_n$$ are usually chosen such that the *log-determinant of the Jacobian*, $$\log\ \left\vert \det \left( \frac{g_{\leq i}}{g_{\leq i - 1}}  \right) \right\vert$$, is easily computed, for instance by choosing transformation such that the Jacobian is a triangular matrix.

---

 Proposed Flow Construction: GLOW

### Flow step
Each flow step function $$g_i$$ is a sequence of three operations as follows. Given an input tensor of dimensions $$h \times w \times c$$:

| Step Description | Functional Form of flow $$g_i$$ | Inverse  Function of the flow, $$g_i^{-1}$$| Log-determinant Expression|
| ------- | ------------------- | --------------------------- | ------------ | --------------------------- |
| **ActNorm**
 $$s: [c,]$$
 $$b: [c,]$$ | $$y = \sigma\odot x + \mu$$ | $$x = (y - \mu) / \sigma$$ | $$hw\ \mbox{sum} \log(\vert\sigma\vert)$$ |
| **1x1 conv**
 $$W: [c,c]$$  | $$y = Wx$$ | $$x = W^{-1}y$$ | $$h w \log \vert \det (W) \vert$$ |
| **Affine Coupling**
 **(ACL)** [2] |  $$x_a,\ x_b = \mbox{split}(x)$$
 $$(\log \sigma, \mu) = \mbox{NN}(x_b)$$
 $$y_a = \sigma \odot x_a + \mu$$
 $$y = \mbox{concat}(y_a, x_b)$$|    $$y_a,\ y_b = \mbox{split}(y)$$
 $$(\log \sigma, \mu) = \mbox{NN}(y_b)$$
 $$x_a = (y_a - \mu) / \sigma$$
 $$x = \mbox{concat}(x_a, y_b)$$|$$\mbox{sum} (\log \vert\sigma\vert)$$ |

  * **ActNorm.** The activation normalization layer is introduced as a replacement for *Batch Normalization* (`BN`) to avoid degraded performance with small mini-batch sizes, e.g. when training with batch size 1. This layer has the same form as `BN`, however the *bias, $$\mu$$, and variance, $$\sigma$$, are data-independent variables*: They are initialized based on an initial mini-batch of data (data-dependent initialization), but are optimized during training with the rest of the parameters, rather than estimated from the input minibatch statistics.

  * **1x1 convolution.** This is a simple 1x1 convolutional layer. In particular, the cost of computing the determinant of $$W$$ can be reduced by writing $$W$$ in its *LU decomposition*, although this increases the number of parameters to be learned.

  * **Affine Coupling Layer.** The `ACL` was introduced in [2]. The input tensor $$x$$ is first split in half along the channel dimension. The second half, $$x_b$$, is fed through a small neural network to get parameters $$\sigma$$ and $$\mu$$, and the corresponding affine transformation is applied to the first half,  $$x_a$$.
The rescaled $$x_a$$ is the actual transformed output of the layer, however $$x_b$$ also has to be propagated in order to make the transformation invertible, such that $$\sigma$$ and $$\mu$$ can also be estimated in the reverse flow.
Finally, note that the previous 1x1 convolution can be seen as a generalized *permutation of the input channels*, and guarantees that different channels combinations are seen during the `split` operation.

### General Pipeline
These operations are then combined in a *multi-scale architecture* as described in [3], which in particular relies on a *squeezing* operation to trade of spatial resolution for number of output channels.
Given an input tensor of size $$s \times s \times c$$, the squeezing operator takes blocks of size $$2 \times 2 \times c$$ and flatten them to size $$1 \times 1 \times 4c$$, which can easily be inverted by reshaping.
The final pipeline consists in $$L$$ levels that operate on different scales: each level is composed of $$K$$ flow steps and a final squeezing operation.

Figure: Overview of the multi-layer GLOW architecture.

In summary, the *main differences* with [3] are:
  * Batch Normalization is replaced with Activation Normalization
  * 1x1 convolutions are considered as a more generic operation to replace permutations
  * Only channel-wise splitting is considered in the Affine Coupling Layer, while [3]  also considered a binary spatial checkerboard pattern to split the input tensor in two.

---

 Experiments

### Implementation
In practice, the authors implement `NN` as a convolutional neural network of depth 3 in the `ACL`; which means that each flow step contains 4 convolutions in total. They also use $$K = 32$$ flow steps in each level. Finally the number of levels $$L$$ is 3 for small-scale experiments (32x32 images) and 6 for large scale (256x256 ImageNet images).
In particular this means that the model contains *a lot of parameters* ($$L \times K \times 4$$ convolutions) which might be a practical disadvantage compared to other method that produce samples of similar quality, e.g. `GAN`s. However, contrary to these models, `GLOW` provides *exact likelihood inference*.

### Results
`GLOW` outperforms `RealNVP` [3] in terms of data likelihood, as evaluated on standard benchmarks (ImageNet, CIFAR-10, LSUN). In particular, the 1x1 convolutions performs better than other more specific permutations operations, and only introduces a small computational overhead.

Qualitatively, the samples are of great quality and the model  seems to scale well with higher resolution. However this greatly increases the *memory requirements*. Leveraging the model's invertibility to avoid storing activations during the feed-forward pass such as in [4]  could be used to (partially) palliate the problem.

---

 References

  * [1]  Variational inference with normalizing flows, Rezende and Mohamed, ICML 2015
  * [2] NICE: Non-linear Independent Components Estimation, Dinh et al., ICLR 2015
  *  [3]  Density estimation using Real NVP, Dinh et al., ICLR 2017
  * [4]  The Reversible Residual Network: Backpropagation Without Storing Activations, Gomez et al., NeurIPS 2017
  * [5] Parallel Multiscale Autoregressive Density Estimation, S.Reed et al, ICML 2017

extension: markdown

gha_language: Jupyter Notebook


text:
# Preussia intermedia (Auersw.) S. Ahmad, 1979 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Monogr. Biol. Soc. Pakistan 8: 49 (1979)

#### Original name
Sporormia intermedia Auersw., 1868

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Dothideomycetes/Pleosporales/Sporormiaceae/Sporormiella/Sporormiella intermedia/ Syn. Preussia intermedia/README.md

repo_name: mdoering/backbone


text:
---
id: running-eventbridge-canon
title: Running EventBridge Canon
sidebar_label: Running EventBridge Canon
---

##### Getting Started

First before we run the application itself, we need to populate the local database with your schemas.

Populating data takes seconds, just run the following command:

```bash
npm run populate
```

This will use AWS SDK to get your schemas and populate the `/data/database.json` file.

> Tip: You can run this as much as you want and your collections + custom data will not get lost. If ever want to update your sources or schemas run this command! (for now ;))

##### Running the application

Next once you populated your database using the command above you can run:

```bash
npm run dev
```

This will run the NextJS application (in development mode) and you should then be able to go to [http://localhost:3000](http://localhost:3000) to get started!


text:
About ant-yui-compressor
==================

ant-yui-compressor is an [Apache Ant](http://ant.apache.org/) task for compressing multiple JavaScript and CSS files using [YUI compressor](http://developer.yahoo.com/yui/compressor/).

### Features
* JS files minification
* CSS files minification
* Option to automatically delete original source files after generating minified files

##### Origins

This project is based on [yui-compressor-ant-task](https://code.google.com/p/yui-compressor-ant-task/) by Simon Buckle

### Basic Usage
```xml
<ant-yui-compressor todir="js">
	<fileset dir="js">
		<include name="backbone.js" />
		<include name="jquery.js" />
	</fileset>
	<mapper type="glob" from="*.js" to="*-min.js"/>
</ant-yui-compressor>
```
**Note: The `toDir` attribute, as well as `fileset` & `mapper` elements are required**.
The `fileset` element specifies the list of files to be minified. The `mapper` elements describes the naming convention for minified files.
Both [fileset](http://ant.apache.org/manual/Types/fileset.html) and [mapper](http://ant.apache.org/manual/Types/mapper.html) are standard Ant types and have various configuration options.
Version 1.1.0 adds `charset` attribute

### Example

A working ant sample project is available with the source code (https://github.com/bardware/ant-yui-compressor/tree/master/example).

### Options

**JavaScript**

The ant task supports the following attributes for JS files:

        Attribute
        Required?
        Default

    	toDir
    	Yes
    	N/A

        deleteOriginal
        No
        false

        linebreak
        No
        -1

    	munge
    	No
    	true

    	preserveAllSemiColons
    	No
    	false

    	disableOptimizations
    	No
    	false

    	verbose
    	No
    	false

**CSS**

The following options are available for CSS files:

        Attribute
        Required?
        Default

    	toDir
    	Yes
    	N/A

        deleteOriginal
        No
        false

        linebreak
        No
        -1

repository: bardware/ant-yui-compressor

repo_name: bardware/ant-yui-compressor


text:
Lab: Strings and Regular Expressions
====================================

Problems for in-class lab for the ["JavaScript Advanced" course \@
SoftUni](https://softuni.bg/courses/js-advanced). Submit your solutions in the
SoftUni judge system at
<https://judge.softuni.bg/Contests/1803/Lab-String-and-RegExp>.

01\. Pascal or Camel Case
--------------------

Write a function that takes **two string parameters** as an input.

-   **The first parameter** will be the text that you need to modify depending
    on the second parameter. The words in it will **always** be **separated by
    space**.

-   **The second parameter** will be either "**Camel Case**" or "**Pascal
    Case**". In case of a different input, you should print **"Error!"**

Convert the first string to either of the cases. The **output** should consist
of only **one word** - the string you have modified. For more information, see
the examples below:

### Example

![](media/1.png)

### Hints

First, take the two values from the input fields:

![](media/9aee186fa2664a4ea4732822042d14ff.png)

Then, write a function that generates the result:

![](media/31b85f40f81a69b60de4f226bc217018.png)

-   First, convert all the **letters to lower-case**

-   Depending on the command, make the input either **Pascal Case** or **Camel
    Case**

-   If another command is received, print **"Error!"**

    ![](media/21ac019fad238c6cf4577c0af2ced00e.png)

02\. Find ASCII Equivalent
---------------------

Write a function which receives **one string parameter** as an input. It will
contain different words and numbers which will **always** be **separated by
space**. Your job is to find **all the numbers** and convert them to their
**ASCII char** equivalent and find **all the words** and convert **each letter**
to its **ASCII number**. If there are **other symbols** such as "%", "\@", "!"
etc., **convert** them to their ASCII number **as well**.

The **output** should consist of each number that corresponds to each letter
from the ASCII table for each word, on **separate lines**, **separated by
space**. The final word to print is received by **appending all the chars**,
converted from the input numbers.

For more information, see the example below:

### Example

![](media/2.png)

### Hints

First, get the input and the result:

![](media/39cbc53ab1fe51a43d480ca896120a94.png)

Then, create a function that generates the result:

![](media/0550c762599cfdec318427ba35f529eb.png)

-   If the current **element is a number**, convert it to **character**

-   Otherwise, loop through each **character** and **convert it into number**

-   Finally, append the result

    ![](media/71d877abc001cf5fc02281229bc66584.png)

03\. Split String Equally
--------------------

Write a function that takes **two parameters** as an input.

-   The **first parameter** will be of type **string**

-   The **second parameter** will always be **a positive integer**, **bigger
    than 0**

Your task is to **split the string equally by the number** you have received,
**separated by space**. However, if the string **cannot** be split into equal
parts, fill the last sequence until its **length** is **equal** to the **second
parameter**, starting from the **beginning** of the string.

For more information, see the examples below:

### Example

![](media/3.png)

### Hints

First, get the two input fields:

![](media/64b83dd1a0e896924252d736bad34155.png)

Then, create the function that splits the resulting string:

-   Split the string into separate parts

-   Add them to an array

-   Set the result to equal that array joined by a space

![](media/b276c7183673e2c5b5043003f198f00d.png)

![](media/d62a9d21478513bbfd64744b58ec9d49.png)

04\. Replace a Certain Word
----------------------

Write a function that receives **two parameters** as an input.

-   The **first parameter** will be **a string** - the **word** that will be
    **used for replacing**.

-   The **second parameter** will be **an array of strings**.

The word that needs to be **replaced** in each of the strings will **always** be
found in the **first string** of the array **at the second index**. Your task is
to **replace every word with the given** one from the input. Have in mind that
the cases are **case-insensitive**.

Print **each** of the strings from the array on a **new \<p\> element**.

For more information, see the examples below:

### Example

![](media/4.png)

### Hints

-   Get the input fields

-   Create a separate function that replaces each element of the array with the
    given string (use **RegEx**)

-   Add paragraphs to the **\<span\>** containing the new strings

    ![](media/43260be37535b29b9e524eceedb1510b.png)

05\. Extract User Data
-----------------

Write a function that receives **an array of strings** as an input.

Your task is to **extract** all **valid user data** from each of the strings.
**Valid data** consists of:

-   It will always start with a **name**. A valid name will always consist of
    **first name** and **surname separated by space**. Note that the first name
    will **always start with an uppercase letter** and can be followed by
    lowercase ones (**but not necessarily**). The surname will always start with
    a **capital letter**, followed by **one or more** lowercase ones.

-   The name will be followed by **a phone number**. A valid phone number will
    be in the following format: *+359 2 569 789*, *+359 3 759 846*,
    *+359-5-789-359*. Note that it will **always start with +359** and the
    digits can be separated by **either spaces** or **dashes** but **NOT** both.

-   The phone number will be followed by **an email**. A valid email can consist
    of only **lowercase Latin letters** or **digits**, followed by **\@** and
    **one or more lowercase Latin letters**. There will always be **a dot before
    the domain**, which can consist of **at least** two lowercase Latin letters **BUT** no more than three.

Note that the data will be **always separated by a single space**.

In case part of the above described data is **missing** or is **invalid**, print "**Invalid data**" on the console. Otherwise, print each of the extracted information **on a new line** in the following format:

- **Name: {extractеdName}**

- **Phone Number: {extractedPhoneNumber}**

- **Email: {extractedEmail}**

- **- - -**

For more information, see the examples below:

### Example

![](media/5.png)

![](media/ccba8f7ee63a04418df3fc5e6bc3f0eb.png)

url: https://raw.githubusercontent.com/iPavelGeorgiev/SoftUni/27d2a1d114ab4fdc3eec0df22e24c84aaf1ceb59/JS Advanced/9. String and RegExp/1. String and RegExp - Lab/README.md

repository: iPavelGeorgiev/SoftUni

gha_language: JavaScript

gha_license_id: MIT

repo_name: iPavelGeorgiev/SoftUni


text:
# CureIO's Organization Website

![Created by CureIO](https://img.shields.io/badge/Created%20By-CureIO-FF2719.svg?style=for-the-badge)
![C++](https://img.shields.io/badge/Built%20With-BOOTSTRAP%20STUDIO-808EE0.svg?style=for-the-badge&logo=cpp)
![MIT License](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=for-the-badge)

#### This static website is built for the CureIO Open Source Organization. It is made with Bootstrap Studio (Education Edition) and exported in HTML, JavaScript & CSS.

## Contributing
Pull requests are welcome and greatly appreciated. If you need help open an issue and we will provide support ASAP. Before contributing make sure you open an issue explaining your changes before performing any work. Thanks in advance for your support!

![](https://s3.amazonaws.com/one_org_international/international/media/international/2015/11/06135444/tank-you-gif.gif)

## Contributors
 - [Sam Poder](https://github.com/sampoder)
 - [Arsh Shrivastava](https://github.com/Arshshrivastava)
 - Neil Ghosh

Want to be on the list? When ever you make your first pull request add your name in.

## About CureIO
CureIO is an open source organization that creates code to better the lives of the elderly population. We were started by three passionate teenagers; Sam Poder, Arsh Shrivastava and Neil Ghosh.

[Read More](https://github.com/cureio/cureio.github.io/blob/master/ABOUT_US.md)

## Licensed Under The MIT License
[View License](https://github.com/cureio/cureio.github.io/blob/master/LICENSE)


text:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

### Description
<!-- Add a clear and concise description of what the bug is -->

### Steps to reproduce
<!-- Provide steps to reproduce the behavior -->

### Actual result
<!-- Describe how the issue manifests -->

### Expected result
<!-- Describe what you expected to happen -->

### Environment
<!-- Provide any environment description you may find relevant -->

### Connected requirement IDs
<!-- Provide the requirement IDs if you know -->

### Screenshots
<!-- If applicable, add screenshots to help explain your problem -->

gha_language: Scala


text:
[Ring](https://ring.cx/) Secure, Distributed Messaging, a Better Alternative to a Phone Number
==============================================================================================

Many of the difficulties incurred by people who want to stop using mobile
phones, or even just mobile voice and text plans, are related to the difficulty
of contacting people who do use mobile phones with voice and text plans as
their primary form of communication. With the age of smartphones, however, it
has become possible for people to create apps which supplement the functionality
of the device, including adding things like instant messaging over the internet
or, in the case of the Ring messaging system, a distributed network providing
functionality that is like telephony but which doesn't require a central
authority to assign unique names and numbers. There are in fact many messaging
systems which can be used in much the same way as Ring, and many of them will
be included here, Ring is just the first one I'm writing about.

What are the Key Differences between Ring and SMS messages?
-----------------------------------------------------------

Ring is designed to be similar to use to other messaging systems, but under the
hood, it's pretty different. One thing you'll quickly notice is that Ring uses
identifiers that are long and complicated compared to phone numbers. This is
because in order to guarantee that all the identifiers are unique, all the
identifiers have to have a sufficient amount of randomness. This is achieved
using cryptographic techniques, and it helps Ring achieve the following three
properties.

###Ring is "Distributed"

Ring does not use a central server to help you find your contacts, instead it
uses a Distributed Hash Table known as OpenDHT. This means that once you have
joined the Ring network, you can always find contacts by using their Ring ID
and you can't be denied service by denying you access to Ring's services. The
job of being the service is in some senses shared by every "Peer" in the Ring.

As an aside, Peer-to-Peer technology and philosophy has gotten a COMPLETELY
UNDESERVED bad rep due to it's frequent association with the file sharing
community.   You deserve to be treated like a PEER.
Subordinating you to a corporation that wants to tell you how to communicate is
downright sick. Use Peer-to-Peer technology wherever possible, just respect
people's privacy and property.

###Ring is "Authenticated"

Ring users, once they have shared their contact information and confirmed their
identities initially, can guarantee that the subsequent conversations with the
same ring ID are being carried on with someone who has the private key
corresponding to that ID. Anything else, and messaging just won't work and
therefore, Ring guarantees to the maximum known extent that you will be talking
to the person that you think you are talking to.

Similarly, if you are using a device which doesn't have your Ring keys, you'll
be identified as a different user since your identity is verified
cryptographically. Lose your Ring keys, you'll be unable to re-create them. This
is a good thing, otherwise, someone could forge them and impersonate you.

###Ring is "Encrypted"

Ring also encrypts connections between peers, after authenticating them, using
new keys for each connection. This gives it Forward Secrecy, which means that
even if your equipment is confiscated, they cannot retrieve keys from your
device which can be used to decrypt enciphered data that had been intercepted
by some other channel.

When Ring is Installed
----------------------

Once you have Ring started up for the first time, you'll be asked to create an
account. This isn't really an account like you're used to, though, remember Ring
doesn't have a server. Instead, creating an account generates an identity for
you on the DHT, and involves generating cryptographic keys and certificates,
then downloading the data necessary to connect with the DHT, so on very old
hardware, it can sometimes take up to about 2 minutes. Usually much less though.

Once you've done that, you're ready to add contacts and make calls. Get a friend
to sign up and add their Ring ID, and make a call. It just works. That is what
Peer-to-Peer technology presents to you, simple, direct connections to people
who's identities are cryptographically authentic, with no dependencies on
external services.


text:
## Version 0.1.4

* Added support/testing for setting service environment variables, closes #3 (thanks @klamontagne)

## Version 0.1.3

* Fixed stock service resource initialization and proxying, fixes #2  (thanks @srenatus)
* Upstart provider now compliant with Debian policy 9.11.1 - init.d compatibility
* Improved testing for resource notifications and auto-starting services
* Added support/testing for removal of PID files after services are stopped
* Further integration of run_action_now cookbook
* Added some examples to documentation

## Version 0.1.2

* Fixed SysV services not returning proper status codes
* Fixed some Chef includes
* Updated default to SysV if no better provider determined
* Updated to depend on 'run_action_now' cookbook (code-reuse)
* Updated to use Unix Mock Service Daemon (code-reuse)
* Added :path_variables resource attribute

## Version 0.1.1

Initial release.

gha_language: Ruby


text:
# Atomic Blender Material Compactor
(C) 2020 James Dean

## What is this?
Atomic blender creates a lot of extra materials when importing molecules. This saves time by fixing the materials for you.

## Why should I use this?

This can get kinda unwieldy when you're importing a lot of different molecules into a scene.

To fix the problem, this script finds the 'ball' objects created by Atomic Blender, and collapses their materials down into a single one. It's saved me probably dozens of hours of tedium in changing material names.

In effect, all your `Element`, `Element.001`, ..., `Element.obscenely_high_number_here` materials all get swapped to just `Element`. Which is useful if all you care about is a uniform look in your renders when it comes to molecules.

## How do I use this?
1. Run the code in `compactify.py` from the scripting window in Blender, and wait a few seconds for your materials to fix themselves.
2. Use the time saved to make yourself a cup of coffee or something.

## Known Issues
Make sure you understand this code before running it. It also goes without saying that you should *probably* back up your blender project when you run this, in case your materials get jumbled up.

That being said, this has a high chance of garbling up your object materials if:
* You've already got other materials that share names with elements in your moleules (e.g. you've already got a material named `Gold` that you're not using for molecules)
* You've already got other objects with "ball" or "Stick" in their name that weren't created by Atomic Blender

branch_name: refs/heads/main


text:
# Vsauce Math Magic [![Build Status](https://travis-ci.org/stevemao/vsauce-math-magic.svg?branch=master)](https://travis-ci.org/stevemao/vsauce-math-magic)

Demo of [Math Magic](https://www.youtube.com/watch?v=ObiqJzfyACM#t=14m56s)

> Every time you shuffle a deck of cards well, smoosh it for a few minutes or
> riffle it seven or more times, chances are you have put those playing cards
> into an order that they have never been in in the entire history of cards, or
> humans, or the universe. **Seriously.**
> -- [Michael Stevens](https://www.youtube.com/user/Vsauce)

When the program starts, it will continuously and randomly reorder a deck of
cards, remembering each order it produces. When an order has appeared more than
once, it stops. This program demonstrates how long it would take to achieve
two identical deck orders through random shuffling. In fact, the program will
start to take a significant amount of time even if there are only 12 cards. So
if you select 13 cards, chances are your program is going to freeze for a
while. `13!` *(13 factorial)* is already **QUITE BIG!!**

Please check out the
[awesome video](https://www.youtube.com/watch?v=ObiqJzfyACM)
and the links provided in the video description!

## Install

```
$ npm install --save vsauce-math-magic
```

## Usage

```js
const vsauceMathMagic = require('vsauce-math-magic');

vsauceMathMagic(3);
//=> [ [ 2, 3, 1 ], [ 2, 1, 3 ], [ 2, 3, 1 ] ]
```

## API

### vsauceMathMagic(count)

#### count

Type: `number`

## CLI

```
$ npm install --global vsauce-math-magic
$ vsauce-math-magic 3
```

## License

MIT © [Steve Mao](https://github.com/stevemao)

repository: stevemao/vsauce-math-magic

repo_name: stevemao/vsauce-math-magic


text:
---
extends: _layouts.post
title: PHP CLI increase memory limit
author: Cristian Radulescu
description: When running a PHP script from command line interface, a higher memory limit may be required...
date: 2009-10-03
section: content
categories: []
---
When running a PHP script from command line interface, a higher memory limit may be required in order for the script to be successfully executed. This can be achieved using the *-d* or *--define* option in the command.

An example of running a PHP script in CLI with custom memory limit:

```shell
php -d memory_limit=128M script.php
```

The option is not limited to the memory limit directive and it can be use to alter other php.ini directives as well.

gha_language: Blade


text:
# CliMT: Climate Modeling and Diagnostics Toolkit

CliMT is a Python-based software component toolkit which provides a
 flexible, multi-purpose problem-solving environment geared to climate
 science problems.

## Requirements:
* Python 2.4 or higher
* Numpy 1.0 or higher
* GNU gcc and a Fortran compiler

## Obtaining CliMT

Make sure you have a git client installed. Most operating systems
have a git client available, you can choose any.

To obtain CliMT, use the following command:

git clone --recursive https://github.com/CliMT/climt-python.git

Please note the **recursive** keyword. Without this, the dynamical
core will *not* be downloaded.

## Installation:
Make sure that numpy is installed, and that the version of f2py
on your path is the one installed by numpy. Then:

**python setup.py build**

will build the package using the default fortran compiler. For
information on the compilers available on your platform:

**f2py -c --help-fcompiler**

To build with a different compiler:

**python setup.py build --fcompiler=<compiler>**

where <compiler> is one of the choices offered by f2py above.

When the build is complete:

**python setup.py install --prefix=<dir where you want climt to live>**

You can also install the "lite" version of CliMT, used in
Ray Pierrehumbert's book "Principles of Planetary Climate",
by doing

**python setup.py install --lite**

Rodrigo Caballero<EMAIL_ADDRESS>Feb 2012

repository: CliMT/climt-legacy

repo_name: CliMT/climt-legacy


text:
[![Build Status](https://travis-ci.org/bivas/rivi.svg?branch=development)](https://travis-ci.org/bivas/rivi)
[![Go Report Card](https://goreportcard.com/badge/github.com/bivas/rivi)](https://goreportcard.com/report/github.com/bivas/rivi)
[![codecov](https://codecov.io/gh/bivas/rivi/branch/development/graph/badge.svg)](https://codecov.io/gh/bivas/rivi)

# rivi - Automate your review process

Managing a repository can require tedious administrative work, and as pull requests increase, it becomes even more complex. Today’s pull review flow lacks important visible information that leads to serious management issues.

Rivi is an innovative bot that automates repository management. Forget about manually checking which module was modified, or which people are in charge of a pull review, Rivi will do it for you.
Rivi enables automatic labeling with common parameters so that administrators can immediately understand their repository status with a quick glance. It also assigns relevant people to pull request reviews, allows to add comments, merges pull requests, sends triggers to relevant users and notifying them about issues that require prompt attention and more.

With Rivi, developers can focus on the actual code base and less on administrative unambiguous actions made every day.  We are looking to add more automation features to make the repository management process seamless, and our highest priority is to ensure that Rivi lives up to the community standards by providing true value and efficiency.

## Usage
Rivi can be run as a bot which listens to incoming repository webhooks. This service must be internet facing to accept incoming requests (e.g. GitHub).
```
Usage: rivi bot [options] CONFIGURATION_FILE(S)...

	Starts rivi in bot mode and listen to incoming webhooks

Options:
	-port=8080				Listen on port
	-uri=/					URI path
```
### Example
```
$ rivi bot -port 9000 repo-x.yaml repo-y.yaml
```

### Docker

It is also possible to run Rivi as Docker container. Rivi's images are published to Docker Hub as `bivas/rivi`.

You should visit [bivas/rivi](https://hub.docker.com/r/bivas/rivi/) Docker Hub page and check for published [tags](https://hub.docker.com/r/bivas/rivi/tags/).

```
$ docker run --detach \
             --name rivi \
             --publish 8080:8080 \
             --env RIVI_CONFIG_TOKEN=<rivi oauth token> \
             --volume /path/to/config/files:/config \
             bivas/rivi rivi bot /config/repo-x.yaml
```

## Requirements

- Create a token with `repo` permissions
- Create a webhook and make sure the following are configured:

  - Select **content type** as `application/json`
  - Optionally, set a **secret** (this will be used by the bot to validate webhook content)
  - Register the following events
    - Pull request
    - Pull request review
    - Pull request review comment

  - If you have started rivi with several configuration files, you can set the hook URL to access each different file by passing `namespace` query param with the file name (without the `yaml` extension)
  Example: `http://rivi-url/?namespace=repo-x`

# Configuration File Structure

## Config Section

Configure the Git client for repository access and webhook validation
```yaml
config:
  provider: github
  token: my-very-secret-token
  secret: my-hook-secret-shhhhh
```

- `token` (required; unless set by env) - the client OAuth token the bot will connect with (and assign issues, add comments and lables)
- `provider` (optional) - which client to use for git connection - the bot tries to figure out which client to use automatically (currently only `github` is supported but others are on the way)
- `secret` (optional) - webhook secret to be used for content validation (recommended)

### Environment Variables

You can set the values for `token` and `secret` via environment variables:
`RIVI_CONFIG_TOKEN` and `RIVI_CONFIG_SECRET` respectively.

It is common to configure the bot by injecting environment variables via CI server.

## Roles Section

List of roles for selecting (login) users for assignment.
```yaml
roles:
  admins:
      - user1
      - user2
  reviewers:
      - user3
      - user4
  testers:
      - user2
      - user4
```

## Rules Section

Configure rules to be processed by the bot on each issue event. Each rule may have several actions.
### Structure

```yaml
rules:
  rule-name1:
    <condition>
    <action-name>
    <action-name>
    <action-name>
    ...
  rule-name2:
    <condition>
    <action-name>
...
```

### Example
```yaml
rules:
  rule-name:
      condition:
        if-labeled:
          - label1
          - label2
        skip-if-labeled:
          - label3
        files:
          patterns:
            - "docs/.*"
          extensions:
            - ".go"
        title:
          starts-with: "BUGFIX"
          ends-with: "WIP"
          patterns:
            - ".* Bug( )?[0-9]{5} .*"
        description:
          starts-with: "test PR please ignore"
          ends-with: "don't review yet"
          patterns:
            - ".*depends on #[0-9]{1,5}.*"
        ref:
          match: "master"
          patterns:
            - "integration_v[0-9]{2}$"
        comments:
          count: ">10"
        order: 5
      commenter:
        comment: "We have a match!"
      labeler:
        label: ready-for-review
```
### Condition

The entire `condition` section is optional - you can run all rules all the time and see if it helps :smile:
- `if-labeled` - apply the rule if the issue has any of the provided labels
- `skip-if-labeled` - skip rule processing if issue has any of the provided labels
- `files`
  - `patterns` - [pattern](https://golang.org/s/re2syntax) matching the pull request file list (any of the patterns)
  - `extensions` - which file extension to match on pull request file list (must start with a dot [`.`])
- `ref`
  - `patterns` - [pattern](https://golang.org/s/re2syntax) matching the pull request ref name
  - `match` - matches the pull request ref name
- `title`
  - `starts-with` - issue title has a prefix
  - `ends-with` - issue title has a suffix
  - `patterns` - [pattern](https://golang.org/s/re2syntax) matching issue title (any of the patterns)
- `description`
  - `starts-with` - issue description has a prefix
  - `ends-with` - issue description has a suffix
  - `patterns` - [pattern](https://golang.org/s/re2syntax) matching issue description (any of the patterns)
- `comments`
  - `count` - number of comments for issue (supported operators: `==`, `>`, `<`, `>=`, `<=`)
- `order` - apply order hint to a rule. All rules are given order index **0**.
**Important**: This will not place a rule in the exact position, but can assist in re-order rules.

### Available Actions
- [`autoassign`](engine/actions/autoassign/autoassign.md) - Automatic assignment of issue reviewers
- [`automerge`](engine/actions/automerge/automerge.md) - Automatic merge for approved pull requests
- [`commenter`](engine/actions/commenter/commenter.md) - Add comment to an issue
- [`labeler`](engine/actions/labeler/labeler.md) - Add/Remove label to/from an issue
- [`sizing`](engine/actions/sizing/sizing.md) - Size a pull request
- [`trigger`](engine/actions/trigger/trigger.md) - Send HTTP triggers
- [`locker`](engine/actions/locker/locker.md) - Lock an issue
- [`slack`](engine/actions/slack/slack.md) - Send Slack messages

# Example Configuration

```yaml
config:
  provider: github
  token: my-very-secret-token
  secret: my-hook-secret-shhhhh

roles:
  admins:
      - user1
      - user2
  reviewers:
      - user3
      - user4
  testers:
      - user2
      - user4

rules:
  pr-size:
        sizing:
          xs:
            label: size/xs
            changed-files-threshold: 5
          s:
            label: size/s
            changed-files-threshold: 15
          default:
            label: pending-approval
            comment: "Your pull-request is too large for review"

  docs:
        condition:
          files:
            patterns:
              - "docs/.*"
        labeler:
          label: documentation

  assignment:
        condition:
          skip-if-labeled:
            - pending-approval
        autoassign:
          roles:
            - admins
            - reviewers
```

repository: asafho/rivi

repo_name: asafho/rivi


text:
> :warning: **DISCONTINUATION OF PROJECT** -
> *This project will no longer be maintained by Intel.
> Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.*
> **Intel no longer accepts patches to this project.**
> *If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.*

Tour de Block
=============

Tour de Block is a game developed using Intel Labs' [River Trail](http://github.com/IntelLabs/RiverTrail), an API for parallel programming in JavaScript.  You can play a hosted version [here](http://intellabs.github.io/RiverTrail-TourDeBlock/)!

The game is released under a BSD-style license. See the [LICENSE.md](https://github.com/IntelLabs/RiverTrail-TourDeBlock/blob/master/LICENSE.md) file for details.

repository: IntelLabs/RiverTrail-TourDeBlock

repo_name: IntelLabs/RiverTrail-TourDeBlock


text:
# Errors

Below are the types of errors that the API has standardized on.

### 400: Bad Request
Usually indicates a client error i.e. not specifying the arguments correctly.

### 401: Unathorized

### 403: Forbidden

### 404: Not Found

### 415: Unsupported Media Type
For POST, PUT, and DELETE requests with a non-empty request body, the `Content-Type` header is required and should be "application/json". If the header is missing or does not specify a JSON content type, the request will be rejected with an HTTP status code of 415.


text:
## Overview

Collect-ExchangeInfo.ps1 is a PowerShell script to collect Microsoft Exchange Server related information. This includes various Exchange-related cmdlets, event logs, and IIS configuration etc.

For more details, see the script's comment-based help.

[Download Link](https://github.com/jpmessaging/CollectExchangeInfo/releases/download/v2023-05-21/Collect-ExchangeInfo.ps1)

Load-Clixml.ps1 contains a function "Load-Clixml" which simply imports all xml files in a specified folder and creates corresponding variables in the global scope. For example, for a file "ExchangeServer.xml" it creates a variable \$ExchangeServer. This script is just to make it easy to load all the xml files collected. You do not need this file to use Collect-ExchangeInfo.ps1 and this function can be used independently.

## Sample usage

1. This will collect only Active Directory-based information

   ```PowerShell
   .\Collect-ExchangeInfo.ps1 -Path C:\exinfo
   ```

2. In addition to the information gathered by 1., this will include machine-specific informtion for servers whose name matches ("EX-\*"). Their event logs + Exchange's crimson logs are also collected.

   ```PowerShell
   .\Collect-ExchangeInfo.ps1 -Path C:\exinfo -Servers:EX-* -IncludeEventLogsWithCrimson
   ```

## Note

After you download the ps1 file, make sure to "Unblock":

1. Right-click the ps1 file and click [Property]
2. In the [General] tab, if you see "This file came from another computer and might be blocked to help protect this computer", check [Unblock]

## License

Copyright (c) 2020 Ryusuke Fujita

This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: jpmessaging/CollectExchangeInfo

gha_language: PowerShell

repo_name: jpmessaging/CollectExchangeInfo


text:
# ArcticAdmin
[![Gem Version](https://img.shields.io/gem/v/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
[![Gem Downloads](https://img.shields.io/gem/dt/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
[![Gem Version](https://img.shields.io/npm/v/arctic_admin.svg)](https://www.npmjs.com/package/arctic_admin)
[![Gem Downloads](https://img.shields.io/npm/dt/arctic_admin.svg)](https://www.npmjs.com/package/arctic_admin)

Simple theme for ActiveAdmin :ok_hand:

>**Complete demo here : https://arctic-admin.herokuapp.com/**
>
>*admin user<EMAIL_ADDRESS>/ password*

![Screenshot](doc/index.png)

## Installation

### For Sprockets users

- Add this to your Gemfile:

```ruby
gem 'arctic_admin'
```

- Run `bundle install`.

- Add this line to the file `config/initializers/active_admin.rb`

```ruby
meta_tags_options = { viewport: 'width=device-width, initial-scale=1' }
config.meta_tags = meta_tags_options
config.meta_tags_for_logged_out_pages = meta_tags_options
```

### For webpacker / jsbundling-rails or other JS-based asset solutions

Install the needed assets with npm or yarn:

```bash
yarn add arctic_admin @fortawesome/fontawesome-free
```

## Use with Sprockets

### 1a - CSS

In your `active_admin.css`, include the css file:

```css
/*
 *= require arctic_admin/base
 */
```

**Remove the line `*= require active_admin/base`**

Then restart your webserver if it was previously running.

### 1b - Sass Support

:exclamation: **Remove the line `@import "active_admin/base"`**

If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
`active_admin.scss` file:

```scss
@import "arctic_admin/base";
```

If you use the
[Sass indented syntax](http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html),
add this to your `active_admin.sass` file:

```sass
@import arctic_admin/base
```

### 2 - JS

In your `active_admin.js`, include the js file:

```js
//= require arctic_admin/base
```

:exclamation:  **Remove the line `//= require active_admin/base`**

## Use with webpacker

### 1 - CSS

In your `app/javascript/stylesheets/active_admin.scss`, add the line:

```scss
@import '~arctic_admin/src/scss/main';
```

Remove:

```scss
@import "~@activeadmin/activeadmin/src/scss/mixins";
@import "~@activeadmin/activeadmin/src/scss/base";
```

### 2 - JS

Search for `app/javascript/packs/active_admin.js` in your rails project and add the following lines:

```js
import<EMAIL_ADDRESS>import 'arctic_admin'
```

### Customization

For this, you need to use SASS to customize the theming.

Right now you can change the primary color of the theme by placing the following variable in your `active_admin.scss` file:

```scss
$primary-color: #2dbb43;

@import "~arctic_admin/src/scss/main";
```

If you use the
[Sass indented syntax](http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html),
add this to your `active_admin.sass` file:

```sass
$primary-color: #2dbb43

@import ~arctic_admin/src/scss/main
```

Then restart your webserver if it was previously running.

## Contributing

1. Fork it ( https://github.com/cprodhomme/arctic_admin/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


text:
---
layout: post
title: "小软件：ReNamer"
date: 2017-01-16 09:00:46 GMT
tags:
- tool
---
{% include assets/image url="/2017-01-16-renamer.png" %}

> ## [ReNamer](http://www.den4b.com/products/renamer)
> ReNamer is a very powerful and flexible file renaming tool, which offers all the standard renaming procedures, including prefixes, suffixes, replacements, case changes, as well as removing contents of brackets, adding number sequences, changing file extensions, etc. For advanced users there is support for Regular Expressions and a PascalScript rule, which lets users program their very own renaming rule.

界面简洁，功能强大的文件批量重命名工具。这个简直是日常工作救星！

gha_language: CSS


text:
---
layout: text/textblock
---
During [Alpha stage](/topics/service-design-delivery-process/alpha-stage/) you should understand what open standards and common platforms can be used for your service. You should:

- build using the open standards of HTML, CSS and JavaScript to develop prototypes
- follow government better practice and standards in the design of the service
- identify tools, systems, processes that can be adopted or reused from other services
- search for similar solutions in other jurisdictions

During [Beta stage](/topics/service-design-delivery-process/beta-stage/) and as you [go live](/topics/service-design-delivery-process/live-stage/) you should continue applying government solutions while also:

- building using the [Open Web Platform](https://www.w3.org/standards/) standards
- avoiding lock-in to any proprietary solutions where an open standard is available
- addressing any common user needs in a way that is consistent with the rest of government

repository: govau/service-manual

repo_name: govau/service-manual


text:
---
layout: post
title:  "Create RHV Host Network via CLI"
date:   2020-01-14 16:00:00 +0500
categories: [ovirt, homelab]
---

Today I got myself into an interesting situation with my RHV cluster. As it
turned out all of the ovirtmgmt networks were removed from each host. This,
naturally, caused the cluster to crash and the hyperconverged Gluster storage
to stop. Not a happy place. This is also when I learned that one does not
simply add network interfaces to oVirt hypervisors.

What I learned is that the vdsm daemon has total control over the host's
networks. VDSM runs on each host and each host has a service called
`vdsm-network` that will generate the network-scripts from VDSM's database.
When a network change is requested via the VDSM API, it writes the update to
`/var/lib/vdsm/staging/netconf`. The change is then applied to the host. The
API caller would then run a health check to verify the change was successful.
If the change did not cause issues, the caller will make another API call to
VDSM to indicate the change was ssuccessful. VDSM then commits the new
configuration to `/var/lib/vdsm/persistent/netconf`.

So, let's say we need to re-add the ovirtmgmt network to the host. We need to
do it through the VDSM API. The easiest way to do this is with the
`vdsm-client` command on the host itself.

```bash
echo '{"bondings": {}, "networks": {"ovirtmgmt": {"nic": "eno1", "netmask": "<IP_ADDRESS>", "ipaddr": "<IP_ADDRESS>", "gateway": "<IP_ADDRESS>", "defaultRoute": true}}, "options": {"connectivityCheck": false}}' | vdsm-client -f - Host setupNetworks

# verify the change was successful

vdsm-client Host setSafeNetworkConfig
```

It might also be wise to give the system a reboot after this. Just to toggle
all the services and ensure the networks start properly on boot.

Sources
-------
  1. [Gist: phoracek/setup_ovirtmgmt.sh](https://gist.github.com/phoracek/0022434b1f105fa0466ed04576b6d7f4)


text:
---
layout: default
published: true
permalink: /v3_1/en/health/KGZ/
lang: en
---
When asked to provide more context about who was particularly unlikely to enjoy their right to health in 2019, our respondents mentioned all of the following:

-	Individuals moving from remote areas to improve living conditions to various cities like Osh and Bishkek
-	People in urban areas on low incomes
-	People in rural areas
-	Mugat/Lyuli people
-	People with mental health conditions
-	Internal migrants

gha_language: HTML


text:
/*
Title: Picasutra
Description: This description will go in the meta description tag
Author: Pierre W. Bertram
Placing:5
*/
## Welcome to Picasutra

Sorry: SITE UNDER CONSTRUCTION. Some Links and some Information is outdated.

### What is Picasutra ?

Picasutra is a new Fun & Relaxed Kamasutra for the Apple iPad that you can read everywhere...

Take it Easy!

![iPad Badge of Picasutra](http://picasutra.com/files/pica183x183.jpg)

### Where can I get support ?
If you need support contact us per mail, twitter or facebook.
We will upload the contents of Picasutra to github so you will be able to contact us there to.

(LINKS MAYBE BROKEN)

http://www.picasutra.com/contact/contact.php

https://www.facebook.com/pages/Pica-Creations/112394275447225

https://twitter.com/picacreations

### Where can I Download Picasutra ?

Picasutra was released at the iTunes Store. It will be back on github.

### Some Screenshots of Picasutra:

The Kiss in Portrait Mode

![The Kiss](http://www.picasutra.com/picasutra/files/photous3.jpg)

The Kiss in Landscape Mode:

![The Kiss](http://www.picasutra.com/picasutra/files/photous4.jpg)

### People behind Picasutra
Picasutra 1.0 was developed by Pierre W. Bertram with the help of Carolina who did the graphics. The texts have been initially written in English by Pikos and Lokotron.

Picasutra 1.5 was developed by Pierre W. Bertram who also did the graphics. The french translation was made by Marc S. and the spanish translation by Evil Ely and Pierre

### Version history of the App

1.0 - First Release on the App Store

1.1 - Internal changes

1.2 - Integration of Touch Events

1.3 - Localization in spanish

1.4 - Localization in french

1.5 - Second Release of Picasutra on the iTunes App Store. Integration of Graphics

1.5.1 - New Font

1.5.2 - New Background

In the 2.0 version we want to make the app universal, localize it in german, translate it to HTML5 and maybe integrate video animations.

### What licence does Picasutra use ?
Creative Commons Licence

http://creativecommons.org/licenses/by-nc-nd/3.0/

Picasutra by Pierre W. Bertram is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

repository: pierregermain/my-PicoCms-website

repo_name: pierregermain/my-PicoCms-website


text:
# What are you building

This demo reads data about a specific GCP organization.

# Steps to run

## Requirements

1.  Terraform installed on your machine
2.  a Service Account with `Resource Manager` > `Organization Viewer` IAM policy on your organization

## Run it

Before starting, edit the file `demo.tfvars` with your preferred data, then prepare your workspace and apply as following.

```bash
# use a dedicated workspace
terraform workspace new "demo"

# initialize all providers
terraform init

# see what will happen to your project, this will produce a state file called demo.out
terraform plan -var-file="demo.tfvars" -out=demo.out

# apply your plan leveraging the file demo.out
terraform apply "demo.out"

# see the status of your project
terraform show
```

## Clean up

You have nothing to be cleaned up.

repository: favsto/samples

repo_name: favsto/samples


text:
# Change Log

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

# [1.6.0](https://github.com/Zielak/cardsGame/compare/v1.5.2...v1.6.0) (2023-06-02)

**Note:** Version bump only for package @cardsgame/example-certs

# [1.4.0](https://github.com/Zielak/cardsGame/compare/v1.3.1...v1.4.0) (2023-02-12)

### Features

- dragging actions ([9e45343](https://github.com/Zielak/cardsGame/commit/9e45343097786c3a9481e8a12fe08f209c94b931))

# [1.1.0](https://github.com/Zielak/cardsGame/compare/v0.22.1...v1.1.0) (2022-11-06)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.22.0](https://github.com/Zielak/cardsGame/compare/v0.21.4...v0.22.0) (2022-09-04)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.21.0](https://github.com/Zielak/cardsGame/compare/v0.20.3...v0.21.0) (2022-07-24)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.20.0](https://github.com/Zielak/cardsGame/compare/v0.19.3...v0.20.0) (2022-06-18)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.19.0](https://github.com/Zielak/cardsGame/compare/v0.18.2...v0.19.0) (2022-05-23)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.18.0](https://github.com/Zielak/cardsGame/compare/v0.17.1...v0.18.0) (2022-05-02)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.17.0](https://github.com/Zielak/cardsGame/compare/v0.16.1...v0.17.0) (2022-04-11)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.16.0](https://github.com/Zielak/cardsGame/compare/v0.15.0...v0.16.0) (2022-04-02)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.15.0](https://github.com/Zielak/cardsGame/compare/v0.14.1...v0.15.0) (2022-03-26)

### Features

- add server-ts example, finalize docs ([331a0d6](https://github.com/Zielak/cardsGame/commit/331a0d6fa53db2f7e233deb3fc1b1d151fd9f683))

# [0.14.0](https://github.com/Zielak/cardsGame/compare/v0.13.1...v0.14.0) (2022-03-21)

**Note:** Version bump only for package @cardsgame/example-certs

# [0.13.0](https://github.com/Zielak/cardsGame/compare/v0.12.18...v0.13.0) (2022-02-27)

**Note:** Version bump only for package @cardsgame/example-certs

## [0.12.9](https://github.com/Zielak/cardsGame/compare/v0.12.7...v0.12.9) (2022-02-07)

**Note:** Version bump only for package @cardsgame/example-certs

repository: Zielak/cardsGame

gha_language: TypeScript

repo_name: Zielak/cardsGame


text:
---
title: "[!DNL Adobe Camera Raw] support to process digital assets"
description: Learn how to enable [!DNL Adobe Camera Raw] support in [!DNL Adobe Experience Manager Assets]
contentOwner: AG
role: Admin
feature: Developer Tools
exl-id: 7159a908-4c36-42b4-bbb4-d7fb1be4ee1b
---
# Process images using [!DNL Adobe Camera Raw] {#camera-raw-support}

You can enable the [!DNL Adobe Camera Raw] support to process raw file formats, such as CR2, NEF, and RAF, and render the images in JPEG format. The functionality is supported in [!DNL Adobe Experience Manager Assets] using the [Camera Raw package](https://experience.adobe.com/#/downloads/content/software-distribution/en/aem.html?package=/content/software-distribution/en/details.html/content/dam/aem/public/adobe/packages/aem630/product/assets/aem-assets-cameraraw-pkg) available from Software Distribution.

>[!NOTE]
>
>The functionality supports only JPEG renditions. It is supported on Windows 64 bit, Mac OS, and RHEL 7.x.

To enable [!DNL Camera Raw] support in [!DNL Experience Manager Assets], follow these steps:

1. Download the [[!DNL Camera Raw] package](https://experience.adobe.com/#/downloads/content/software-distribution/en/aem.html?package=/content/software-distribution/en/details.html/content/dam/aem/public/adobe/packages/cq650/product/assets/aem-assets-cameraraw-pkg-1.4.8.zip) from [!DNL Software Distribution].
1. Access `https://[aem_server]:[port]/workflow`. Open the **[!UICONTROL DAM Update Asset]** workflow.
1. Edit the **[!UICONTROL Process Thumbnails]** step.
1. Provide the following configuration in the **[!UICONTROL Thumbnails]** tab:

    * **[!UICONTROL Thumbnails]**: `140:100:false, 48:48:false, 319:319:false`
    * **[!UICONTROL Skip Mime Types]**: `skip:image/dng, skip:image/x-raw-(.*)`

   ![chlimage_1-128](assets/chlimage_1-334.png)

1. In the **[!UICONTROL Web Enabled Image]** tab, in the **[!UICONTROL Skip List]** field, specify `audio/mpeg, video/(.*), image/dng, image/x-raw-(.*)`.

   ![chlimage_1-129](assets/chlimage_1-335.png)

1. From the side panel, add the **[!UICONTROL Camera Raw/DNG Handler]** step below the **[!UICONTROL Process Thumbnails]** step.
1. In the **[!UICONTROL Camera Raw/DNG Handler]** step, add the following configuration in the **[!UICONTROL Arguments]** tab:

   * **[!UICONTROL Mime Types]**: `image/dng` and `image/x-raw-(.*)`
   * **[!UICONTROL Command]**:

     * `DAM_Raw_Converter ${directory}/${filename} ${directory} cq5dam.web.1280.1280.jpeg 1280 1280`
     * `DAM_Raw_Converter ${directory}/${filename} ${directory} cq5dam.thumbnail.319.319.jpeg 319 319`
     * `DAM_Raw_Converter ${directory}/${filename} ${directory} cq5dam.thumbnail.140.100.jpeg 140 100`
     * `DAM_Raw_Converter ${directory}/${filename} ${directory} cq5dam.thumbnail.48.48.jpeg 48 48`

   ![chlimage_1-130](assets/chlimage_1-336.png)

1. Click **[!UICONTROL Save]**.

>[!NOTE]
>
>Ensure that the above configuration is the same as the **[!UICONTROL Sample DAM Update Asset With Camera RAW and DNG Handling Step]** configuration.

You can now import camera raw files into Assets. After you install the Camera RAW package and configure the required workflow, **[!UICONTROL Image Adjust]** option appears in the list of side panes.

   ![chlimage_1-131](assets/chlimage_1-337.png)

   *Figure: Options in the side pane.*

   ![chlimage_1-132](assets/chlimage_1-338.png)

   *Figure: Use option to make lightweight edits to your images.*

After saving the edits to a [!DNL Camera Raw] image, a new rendition `AdjustedPreview.jpg` is generated for the image. For other image types except [!DNL Camera Raw], the changes are reflected in all the renditions.

## Best practices, known issues, and limitations {#best-practices}

The functionality has the following limitations:

* The functionality supports only JPEG renditions. It is supported on Windows 64 Bit, Mac OS, and RHEL 7.x.
* Metadata writeback is not supported for RAW and DNG formats.
* The [!DNL Camera Raw] library has limitations around the total pixels it can process at a time. Currently, it can process a maximum of 65000 pixels on the long side of a file or 512 MP whatever criteria is encountered first.

gha_language: Groovy


text:
__Table of Contents__
1. [Intro](#intro)
1. [Building](#building)
1. [Deploying and Running](#deploying-and-running)

# Intro

This is an automated scoring system. The goal is to verify that a set of computers meet standards. The primary use case is to train people on setting up a host computer to a desired configuration, provide them with a computer report + score, and track their progress.

[Design](DESIGN.md)

## Comparison to other tools

There are commercial tools that generally do the similar work to collect data from agents on hosts and generate reports (e.g. Nessus, Rapid7). One motivation was to find software with no purchase, license, or maintenance costs.

There are open-source software, but none of the ones researched met the requirements. Chef and Puppet support large enterprise environments and seemed too heavyweight for the primary use case. Ansible is built for actively configuring other hosts from a master host, so it did not fit the primary use case. Ansible did not meet operational requirements, such as requiring (many) python dependencies and requiring open network ports (e.g. SSH, WinRM) on the hosts.

## Software Components

[The Server] is a binary executable file written in go. [The Server] has a RESTful API that its UI and the [agents] interact with. The UI is a React (JSX) web application.

[agents] are binary executable files written in go. [agents] are built for a particular supported 64-bit operating system:
* Windows
* Linux

# Building

## Language Dependencies

* golang stable (1.10.4+)
* Node.js LTS (10.16.2+)

## Procedure

To build [The Server] and [agents]:

1. `cd cp-scoring`
1. `npm install`
1. `sh build.sh`

To create a bundle for deployment:
1. `sh bundle.sh`

## Tests

The golang code has unit tests (*_test.go files) and integration tests with postgres. Unit tests are run in the `build.sh` script.

The `cp-scoring\server\db_test.go` has integration tests for the persistent backing store. To run the integration tests:
1. Start up a local postgres instance
1. Create a file at `cp-scoring\server\cp-scoring.test.conf`
   - Refer to the `cp-scoring.test.conf.example` file to set up connecting to the postgres instance.
1. Open Terminal
1. `go test github.com/netwayfind/cp-scoring/server --tags=integration`

The UI code does not currently have automated tests.

# Deploying and Running

## [The Server]

Copy the generated cp-scoring-\<version\>.tar.gz (from cp-scoring/target) to the intended location. The archive should have the following:
* public
  * cp-scoring-agent-linux
  * cp-scoring-agent-windows
* ui
* cp-scoring-server-linux

Currently, only Linux is the supported OS to running [The Server].

To extract files:

`tar xzvf cp-scoring.tar.gz`

Prerequisites:
- postgres
  - may be local service or Docker instance

To run server:

`./cp-scoring-server-linux`

Config file at cp-scoring.conf. Settings:

- cert: path to X.509 certificate (default: public/server.crt)
- key: path to RSA private key (default: private/server.key)
- port: TCP port to listen on (default: 8443)
- sql_url: SQL URL for postgres (default: postgres://localhost)

When [The Server] starts up for the first time, it will set up the persistent backing store, and generate a private key and public key for encrypting data.

[The Server] requires a HTTPS certificate and key to run. By default, it expects the certificate at public/server.crt and the key at private/server.key. Either create an RSA private key and X.509 certificate at these paths or specify file paths to these files with the -cert and -key arguments.

When the server is ready, [The Server] should be available over https://\<server\>:\<port\> . By default, the port is 8443. The port number can be changed with the -port argument.

## [agents]

Download from https://\<server\>:\<port\>/public . Choose the correct [agent] for the [host].

Windows instructions:
1. Download cp-scoring-agent-windows.exe
1. Open Administrator Command Prompt
1. `cd C:\Users\<user>\Downloads`
1. `cp-scoring-agent-windows.exe -install`
   - This will install files to C:\cp-scoring
1. `cd C:\cp-scoring`
1. `cp-scoring-agent-windows.exe -server https://<server>:<port>`
   - This will download files to allow sending data to [The Server]
1. `icacls report.html /setowner LOCALSERVICE`
   - This is necessary to finish setting up [agent]
1. Create shortcut for C:\cp-scoring\scoreboard.html to Desktop
1. Create shortcut for C:\cp-scoring\report.html to Desktop
1. Delete cp-scoring-agent-windows.exe in the Downloads folder
1. Restart computer. [agent] will automatically start.

Linux instructions:

1. Download cp-scoring-agent-linux
1. Open Terminal
1. `cd ~/Downloads`
1. `chmod +x cp-scoring-agent-linux`
1. `sudo ./cp-scoring-agent-linux -install`
   - This will install files to /opt/cp-scoring
1. `cd /opt/cp-scoring`
1. `sudo cp-scoring-agent-linux -server https://<server>:<port>`
   - This will download files to allow sending data to [The Server]
1. `ln -s /opt/cp-scoring/scoreboard.html ~/Desktop`
1. `ln -s /opt/cp-scoring/report.html ~/Desktop`
1. Delete cp-scoring-agent-linux in the Downloads folder
1. Restart computer. [agent] will automatically start.

repository: netwayfind/cp-scoring

gha_language: Go

repo_name: netwayfind/cp-scoring


text:
---
path: "/psycho-pass"
date: "2018-11-07T18:00:00.962Z"
title: "Life Update and Psycho Pass"
tags: ["Anime Review", "Anime", "Life", "Personal", "Writing"]
------

![alt text](https://s3.amazonaws.com/a-nerds-word/psycho_pass.jpg "Psycho Pass")

Welcome back! I know it's been a while since I last posted. I've been super busy with work, for the most part, but I've also been working on a couple of other side projects, which I'd like to make a bit of an announcement here about. First, my debut novel has been sent out to my second round of beta readers, and I'm hoping to send it to publishers within the next few months.

On top of that, I started work on my second novel at the end of September, and I finished the first draft a couple of days ago! I'm really pysched about it, and it's certainly been keeping me busy on my commute to work :)

Anyway, today's blog post is about a cyberpunk dystopian anime called Psycho Pass. It's fairly well known in the anime community, but I only got around to watching it over the last few weeks.

The basic premise is that, in the 2100s, the world is ruled by an overseeing body called the Sibyl System.  The Sibyl system also judges what profession a person will take up after graduating high school, as well as a myriad of other decisions, leaving a kind of utopia of luxury where the citizens don't have anything to worry about.

Of course, like most of these shows, things aren't as great as they seem. There are still crimes that occur, and people who are determined by Sibyl to be latent criminals are brutally imprisoned or murdered by the police, lest they commit actual crimes in the future. The show mainly follows Akane Tsunemori, a fresh-faced police officer who doesn't quite approve of how things are done. The police force, which is severely understaffed due to the influence of Sibyl, is made up of inspectors, who have a clear psycho pass, and enforcers, who are latent criminals but have been deemed proficient for the job by the system.

Akane is an inspector, and it soon becomes clear to her that Sibyl isn't the perfect system that everyone seems to think it is.

I won't say anything more about the plot due to spoilers, but what I can say is that this show is fantastic. It really shows the way people tend to think with the flock and get used to comfort, despite obvious downsides. The characters are interesting and believable, and like any good cop show, the suspense keeps you on your toes.

That said, the show is very dark, and, while animated, extremely violent. Many people die in horrifying, gruesome ways, so if that isn't your cup of tea, this show isn't for you.

If you can stomach it, though, I would highly recommend Psycho Pass. It's a thought-provoking show that really gets your heart pumping.

That's all for now! See you next time!

-- Bradley


text:
WiFi Automatic
=============

[![Build Status](https://travis-ci.org/j4velin/WiFi-Automatic.svg?branch=master)](https://travis-ci.org/j4velin/WiFi-Automatic)

This simple app can help you increase the standby time of your device: WiFi Automatic automatically disable your WiFi radio when you don't need it and thereby lowers the battery consumption.
It is designed to be used with WiFi-only* tablets - these devices normally don't require a constant internet connection if you're not using them and turning WiFi off can save a lot of battery power.

You can also specify to automatically turn on WiFi again, if you turn on your device. Also, the app can regularly scan for available networks to connect to and re-disable WiFi if no suitable network is found. This way, you are always connected to your WiFi network when using the device.

This app has a similiar effect like setting the "WiFi sleep policy" in Android to "always", except that you can now exactly define the timeout between turning the screen off and actually turning off WiFi.

*if your device has a cell radio, it might switch to 2G/3G which may consume more power then staying on WiFi

You can download the app for free from the Play Store or from F-Droid

gha_language: Java


text:
---
title: Properties of the Local Interstellar Cloud by SWAN/SOHO
tags: Solar and Stellar Physics
---

**start:** any time
<br>**supervision:** Dr. Erkki Kyrölä, Finnish Meteorological Institute

The SWAN instrument on  board the ESA-NASA  solar observatory SOHO has measured
interplanetary Lyman alpha since 1995. These measurements can be used to study
the solar wind distribution and the properties of the local interstellar cloud
(LIC) surrounding the heliosphere. In this MSc thesis the velocity vector and
temperature of LIC are determined by fitting a model to SWAN measurements.


text:
# cloudmersive_voicerecognition_api_client
Speech APIs enable you to recognize speech and convert it to text using advanced machine learning, and also to convert text to speech.

[Cloudmersive Speech API](https://www.cloudmersive.com/voice-recognition-and-speech-api) provides advanced voice recognition and text to speech capabilities

- API version: v1
- Package version: 1.4.2

## Requirements

PHP 5.5 and later

## Installation & Usage
### Composer

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/cloudmersive/cloudmersive_voicerecognition_api_client.git"
    }
  ],
  "require": {
    "cloudmersive/cloudmersive_voicerecognition_api_client": "*@dev"
  }
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
    require_once('/path/to/cloudmersive_voicerecognition_api_client/vendor/autoload.php');
```

## Tests

To run the unit tests:

```
composer install
./vendor/bin/phpunit
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\RecognizeApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$speech_file = "/path/to/file.txt"; // \SplFileObject | Speech file to perform the operation on.  Common file formats such as WAV, MP3 are supported.

try {
    $result = $apiInstance->recognizeFile($speech_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecognizeApi->recognizeFile: ', $e->getMessage(), PHP_EOL;
}

?>
```

## Documentation for API Endpoints

All URIs are relative to *https://api.cloudmersive.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*RecognizeApi* | [**recognizeFile**](docs/Api/RecognizeApi.md#recognizefile) | **POST** /speech/recognize/file | Recognize audio input as text using machine learning
*SpeakApi* | [**speakPost**](docs/Api/SpeakApi.md#speakpost) | **POST** /speech/speak/text/basicVoice/{format} | Perform text-to-speech on a string
*SpeakApi* | [**speakTextToSpeech**](docs/Api/SpeakApi.md#speaktexttospeech) | **POST** /speech/speak/text/voice/basic/audio | Perform text-to-speech on a string

## Documentation For Models

 - [SpeechRecognitionResult](docs/Model/SpeechRecognitionResult.md)
 - [TextToSpeechRequest](docs/Model/TextToSpeechRequest.md)

## Documentation For Authorization

## Apikey

- **Type**: API key
- **API key parameter name**: Apikey
- **Location**: HTTP header

## Author

gha_language: PHP


text:
# Transaction Journaling on a single system

<PageHeader />

![Picture 1](./Picture1.png)

The diagram above represents the use of Transaction Journaling on a stand-alone system. Why would we use this kind of setup? In the event of system failure, the vast majority of processing which has taken place since the last system backup can be recovered and replayed. This is vital for those situations where the transaction cannot physically be repeated. The majority of these transactions can be replayed during system recovery when TJ is utilized.

## Journal Configuration

The Transaction Journal will be configured with two logsets; logset1 and logset2. Each of these logsets will occupy a separate volume partition on disk; this will allow for correct size monitoring of the logsets. The statistics of the logset usage indicated by the jlogstatus command is not at obvious at first glance. What is displayed is the proportion of the volume that has been used. Naturally, if the volume is shared by one or more logsets and/or other data files, then the percentage full will not necessarily reflect the percentage of the volume used by the transaction log. If the logset is contained within its own volume, then the figures are a fairer reflection of the TJ logset usage (albeit with certain storage overhead being present). Correct automatic invocation of the Log Nofity program relies on the accuracy of the percentages obtained.
Also if the logsets share a volume with other data, there is the possibility that the writing to the transaction log file may abort due to lack of space within the volume. The logset volumes should be created large enough for the expected population of updates between logset switches: i.e. if the logsets are switched every night at midnight, then the logset volume should be large enough to contain all the updates for a whole day (plus contingency).

Thus the logsets are created as below:

![Picture 2](./Picture2.png)

![Picture 3](./Picture3.png)

[Next Page](./../single-system-two-decks/README.md)

Back to [Transaction Journaling](./../README.md)

<PageFooter />

repository: josepheshaw/docs

repo_name: josepheshaw/docs


text:
# CodeShovel - Unearthing Method Histories

Take this shovel to dig in source code history for changes to specific methods and functions. The tool is currently implemented for software projects written in Java. CodeShovel is a tool for navigating method histories and is robust to the kinds of changes methods frequently undergo (e.g., being modified, renamed, or and moved between files and directories).

*This is research!* Primarily undertaken in the [Software Practices Lab](https://spl.cs.ubc.ca) at UBC in Vancouver, Canada we have developed this project to help practitioners to more efficiently check how their methods have changed and give researchers an easier way to track method evolution for academic studies. Please do not hesitate to get in touch if you have any questions!

A conference paper describing how CodeShovel works and how it was evaluated as been accepted for publication at the International Conference on Software Engineering 2021. A pre-print of the paper (which will be finalized in late February 2021) can be found [here](ICSE2021.pdf).

## Pathways for Use

CodeShovel can be used in three ways:

* ***Web Service UI***: We have built a browser-based user interface that you can use to interactively navigate the history of a method of interest. We host a public copy of the [web interface](https://se.cs.ubc.ca/codeshovel/index.html) if you just want to use CodeShovel without installing anything, but this repository also has [instructions for self-hosting](#web-service-ui) the web service on your own computer using Docker.

* ***Web Service REST:*** To programmatically investigate the history of a method, you can also call the CodeShovel web service using standard rest commands. You can direct these against our hosted version of the web service, or against your own self-hosted copy of the web service. The [REST interface instructions](#web-service-rest) are below.

* ***Command Line:*** Finally, if you would prefer to interact with CodeShovel on the command line directly without using the REST interface, you can call the CodeShovel `jar` directly. [Command line instructions](#command-line) are included below.

## Web Service UI

***Public UI:*** The web service UI enables easy interactive exploration of a method history. The quickest way to use this is through our hosted version available at [https://se.cs.ubc.ca/codeshovel/index.html](https://se.cs.ubc.ca/codeshovel/index.html). Through this interface you can explore histories of some sample methods (these are not cached: they are dynamically computed as the underlying repositories are updated), or by providing a link to a public repository of your choosing. **Note:** This is likely to be the least performant of all interface options as it runs on shared infrastructure with minimal resources, but is a viable way to check the results of the tool.

***Self-Hosted UI:*** You can also stand up a copy of the web interface on your own infrastructure. To do this, follow these steps:

1. Clone the repository:
	* `git clone git@github.com:ataraxie/codeshovel.git`
2. Configure the environment:
	* Copy `.env.webservice.sample` to `.env`.
	* Update the log and cache paths in `.env`.
	* Specify a GitHub token; to generate one:
		* Visit: [https://github.com/settings/tokens](https://github.com/settings/tokens)
		* Tap 'Generate New Token'.
		* Grant the 'Repo' permission scope.
		* Copy the token generated to the `.env` file.
	* The default hostname does not need to be changed.

3. Start the web service:
	* `docker-compose build && docker-compose up`
	* Works with Docker 2.2+.
4. Access your server:
	* For the UI: open the web service in your browser (`https://localhost:8080`).
	* For the REST interface: see REST API instructions below.

## Web Service REST

As with the web service UI, you can either use our public web service or self-host your own (see the instructions [#web-service-ui](above)). If you are using the self-hosted web service, change `https://se.cs.ubc.ca/CodeShovel` to point to your own service.

Interacting with the CodeShovel web service is through the following REST endpoints. Examples are provided using `curl` syntax for ease of testing, just adapt the values as needed.

* `GET getHistory/`: Retrieves the history of a method
    * `gitUrl` (should end in `.git`)
    * `sha` (optional)
    * `filePath`
    * `startLine`
    * `methodName`

```
curl "https://se.cs.ubc.ca/CodeShovel/getHistory?gitUrl=${}&sha=${}&filePath=${}&startLine=${}&methodName=${}"
```

e.g.,

`curl "https://se.cs.ubc.ca/CodeShovel/getHistory?gitUrl=https://github.com/apache/commons-math.git&sha=$d71b8c93&filePath=/src/main/java/org/apache/commons/math4/dfp/DfpDec.java&methodName=round&startLine=164"`

Each entry in the history list conforms to the following schema:

```typescript
interface Change {
    type: string;
    commitMessage: string;
    commitDate: string;
    commitName: string; // SHA
    commitAuthor: string;
    commitDateOld?: string;
    commitNameOld?: string;
    commitAuthorOld?: string;
    daysBetweenCommits?: number;
    commitsBetweenForRepo?: number;
    commitsBetweenForFile?: number;
    diff: string;
    extendedDetails?: {[key: string]: any}
}
```

For convenience, we also provide endpoints for listing files and methods within the repository:

* `GET listFiles/`: Retrieves the list of files in a repo at a SHA
  * `gitUrl` should end in .git
  * `sha` (optional)

```
curl "https://se.cs.ubc.ca/CodeShovel/listFiles?gitUrl=${}&sha=${}"
```

e.g.,

`curl "https://se.cs.ubc.ca/CodeShovel/listFiles?gitUrl=https://github.com/apache/commons-math.git&sha=$d71b8c93"`

Every file in the repository is included in the returned list of strings. These can then be passed to `listMethods` to find the methods in any given file.

* `GET listMethods/`: Retrieves the list of methods for a file at a SHA
    * `gitUrl` should end in .git
    * `sha` (optional)
    * `filePath`

```
curl "https://se.cs.ubc.ca/CodeShovel/listMethods?gitUrl=${}&sha=${}&filePath=${}"
```

e.g.,

`curl "https://se.cs.ubc.ca/CodeShovel/listMethods?gitUrl=https://github.com/apache/commons-math.git&sha=$d71b8c93&filePath=/src/main/java/org/apache/commons/math4/dfp/DfpDec.java"`

Each entry in the returned list describes a method conforming to the following schema:

```typescript
interface Method {
    methodName: string; // Name of method
    longName: string; // Method prototype
    startLine: number;
    isStatic: boolean;
    isAbstract: boolean;
    visibility: "" | "public" | "private" | "protected";
}
```

## Command Line

In order to run from the command line CodeShovel for a local repository, you can clone the repo, build the tool, and then call it on the command line.

1. Clone the repo:
  * `git clone git@github.com:ataraxie/codeshovel.git`
2. Switch to the appropriate branch:
  * `cd codeshovel; git checkout research`
2. Build the code:
  * `mvn -DskipTests=true package`
  * Works with mvn version 3.3+.
4. Call the code:
  * `java -jar target/codeshovel-1.0.0-SNAPSHOT.jar OPTIONS`
  * Works with Java version 8+.

`OPTIONS` are defined as follows:

```
 -filepath <arg>      Path to the file containing the method (required)
 -methodname <arg>    Method name (required)
 -outfile <arg>       Output path (optional: defaults to current working directory)
 -reponame <arg>      Name of the repository (optional: defaults to the path name)
 -repopath <arg>      Path to a local copy of the git repository (required)
 -startcommit <arg>   Hash of the commit to begin with backwards history traversal (optional: default is HEAD)
 -startline <arg>     Start line of the method (required: differentiates between overloaded methods)

```

Minimal example (assumes [checkstyle](https://github.com/checkstyle/checkstyle) is checked out in `~/tmp/checkstyle/` and you are in `codeshovel/`):

```
java -jar target/codeshovel-0.3.1-SNAPSHOT.jar \
	-repopath ~/tmp/checkstyle \
	-filepath src/main/java/com/puppycrawl/tools/checkstyle/Checker.java \
	-methodname fireErrors \
	-startline 401 \
	-outfile results.json
```

## Code Shovel Development

While the vast majority of users will use the Web Service UI, Web Service REST, or Command Line interfaces, if you want to build CodeShovel yourself (for instance if you are doing development), you can follow the [Development instructions](DEVELOPMENT.md).

## Tool comparison

```
https://github.com/ataraxie/codeshovel/blob/master/analysis/compare_100_methods.ods
```
The above file contains the results of tool comparison (comparing CodeShovel's accuracy with git log, intelliJ, and FinerGit). For a method, 1 means the tool successfully generated the complete history of the method, and 0 means the tool failed. This result was published in our ICSE 2021 paper.