text:
The `range_proof` module contains an API for producing a proof that multiple integer values are within a certain range.

Aggregated range proof protocol
===============================

This is a documentation for the internal implementation of the aggregated range proof. You may find the introduction to all the pieces of the range proof protocol in the [notes](../notes/index.html) module.

The aggregated range proof is a zero-knowledge proof of the following relation:
\\[
\operatorname{ZK-PK}\left\\{
  v_{(0)}, v_{(1)}, \dots, v_{(m-1)}  \in {\mathbb Z\_p}
  : v_{(0)}, v_{(1)}, \dots, v_{(m-1)} \in [0, 2^n)
\right\\}
\\]

where \\(n\\) and \\(m\\) are both a power of \\(2\\).

Party and Dealer's algorithm
----------------------------

To create the aggregated range proof, \\(m\\) individual parties which each have a secret value \\(v_{(j)}\\)exchange messages with one dealer, without revealing their secrets. You may find more information on how the parties and dealers are implemented in [aggregated protocol notes](../aggregation/index.html#api-for-the-aggregated-multiparty-computation-protocol).

The protocol begins with each party \\(j\\) computing three commitments: to the value \\(v_{(j)}\\), to the bits of that value \\(\mathbf{a}\_{L, (j)}, \mathbf{a}\_{R, (j)}\\), and to the per-bit blinding factors \\(\mathbf{s}\_{L, (j)}, \mathbf{s}\_{R, (j)}\\).

\\[
\begin{aligned}
V_{(j)} &\gets \operatorname{Com}(v_{(j)}, {\widetilde{v}\_{(j)}})                   && = v\_{(j)} \cdot B + {\widetilde{v}\_{(j)}} \cdot {\widetilde{B}} \\\\
A_{(j)} &\gets \operatorname{Com}({\mathbf{a}}\_{L, (j)}, {\mathbf{a}}\_{R, (j)}) && = {\langle {\mathbf{a}}\_{L, (j)}, {\mathbf{G}\_{(j)}} \rangle} + {\langle {\mathbf{a}}\_{R, (j)}, {\mathbf{H}\_{(j)}} \rangle} + {\widetilde{a}\_{(j)}} {\widetilde{B}} \\\\
S_{(j)} &\gets \operatorname{Com}({\mathbf{s}}\_{L, (j)}, {\mathbf{s}}\_{R, (j)}) && = {\langle {\mathbf{s}}\_{L, (j)}, {\mathbf{G}\_{(j)}} \rangle} + {\langle {\mathbf{s}}\_{R, (j)}, {\mathbf{H}\_{(j)}} \rangle} + {\widetilde{s}\_{(j)}} {\widetilde{B}} \\\\
\end{aligned}
\\] where \\(\widetilde{v}\_{(j)}, \widetilde{a}\_{(j)}, \widetilde{s}\_{(j)}\\) are sampled randomly
from \\({\mathbb Z\_p}\\) and \\(\mathbf{s}\_{L, (j)}, \mathbf{s}\_{R, (j)}\\) are sampled randomly from \\({\mathbb Z\_p}^{n}\\).

The parties all send their \\(V_{(j)}\\), \\(A_{(j)}\\), and \\(S_{(j)}\\) values to the dealer as `BitCommitment`. The dealer adds each \\(V_{(j)}\\) value to the protocol transcript, in order. The dealer then computes \\(A\\) and \\(S\\) as follows:

\\[
\begin{aligned}
	A &= \sum_{j=0}^{m-1} A_{(j)} \\\\
	S &= \sum_{j=0}^{m-1} S_{(j)}
\end{aligned}
\\]

The dealer adds \\(A\\) and \\(S\\) to the protocol transcript and obtains challenge scalars \\(y,z \in {\mathbb Z\_p}\\) from the transcript. The dealer sends \\(y, z\\) as `BitChallenge` to all of the parties.

Using their secret vectors and the challenges \\(y, z\\) from `BitChallenge`, each party constructs vector polynomials:
\\[
\begin{aligned}
  {\mathbf{l}}\_{(j)}(x) &= {\mathbf{l}}\_{0, (j)} + {\mathbf{l}}\_{1, (j)} x \\\\
  {\mathbf{r}}\_{(j)}(x) &= {\mathbf{r}}\_{0, (j)} + {\mathbf{r}}\_{1, (j)} x \\\\
  {\mathbf{l}}\_{0, (j)} &\gets {\mathbf{a}}\_{L, (j)} - z {\mathbf{1}} \\\\
  {\mathbf{l}}\_{1, (j)} &\gets {\mathbf{s}}\_{L, (j)} \\\\
  {\mathbf{r}}\_{0, (j)} &\gets {\mathbf{y}}^{n}\_{(j)} \circ ({\mathbf{a}}\_{R, (j)}   + z {\mathbf{1}}) + z^{2} z_{(j)}{\mathbf{2}}^{n} \\\\
  {\mathbf{r}}\_{1, (j)} &\gets {\mathbf{y}}^{n}\_{(j)} \circ {\mathbf{s}}\_{R, (j)}
\end{aligned}
\\]

The inner product of the above vector polynomials is:
\\[
  t\_{(j)}(x) = {\langle {\mathbf{l}}\_{(j)}(x), {\mathbf{r}}\_{(j)}(x) \rangle} = t\_{0, (j)} + t\_{1, (j)} x + t\_{2, (j)} x^{2},
\\]

Each party uses Karatsuba’s method to compute the coefficients of that polynomial as follows:
\\[
\begin{aligned}
  t\_{0, (j)} &\gets {\langle {\mathbf{l}}\_{0, (j)}, {\mathbf{r}}\_{0, (j)} \rangle},  \\\\
  t\_{2, (j)} &\gets {\langle {\mathbf{l}}\_{1, (j)}, {\mathbf{r}}\_{1, (j)} \rangle},  \\\\
  t\_{1, (j)} &\gets {\langle {\mathbf{l}}\_{0, (j)}+ {\mathbf{l}}\_{1, (j)}, {\mathbf{r}}\_{0, (j)} + {\mathbf{r}}\_{1, (j)} \rangle} - t\_{0, (j)} - t\_{2, (j)}
\end{aligned}
\\]

The party commits to the terms \\(t\_{1, (j)}, t\_{2, (j)}\\):
\\[
\begin{aligned}
T\_{1, (j)} &\gets \operatorname{Com}(t\_{1, (j)}, {\tilde{t}\_{(j1}})  && = t\_{1, (j)} \cdot B + {\tilde{t}\_{1, (j)}} \cdot {\widetilde{B}} \\\\
T\_{2, (j)} &\gets \operatorname{Com}(t\_{2, (j)}, {\tilde{t}\_{2, (j)}})  && = t\_{2, (j)} \cdot B + {\tilde{t}\_{2, (j)}} \cdot {\widetilde{B}}
\end{aligned}
\\] where \\(\tilde{t}\_{1, (j)}, \tilde{t}\_{2, (j)}\\) are sampled randomly from \\({\mathbb Z\_p}\\).

The parties all send their \\(T_{1, (j)}\\) and \\(T_{2, (j)}\\) values to the dealer as `PolyCommitment`. The dealer then computes \\(T_1\\) and \\(T_2\\) as follows:
\\[
\begin{aligned}
	T_1 &= \sum_{j=0}^{m-1} T_{1, (j)} \\\\
	T_2 &= \sum_{j=0}^{m-1} T_{2, (j)} \\\\
\end{aligned}
\\]

The dealer adds \\(T_1\\) and \\(T_2\\) to the protocol transcript and obtains a challenge scalar \\(x \in {\mathbb Z\_p}\\) from the transcript. The dealer sends \\(x\\) as `PolyChallenge` to all of the parties.

Each party uses \\(x\\) to evaluate their polynomials \\(\mathbf{l}\_{(j)}(x), \mathbf{r}\_{(j)}(x), t\_{(j)}(x)\\):

\\[
\begin{aligned}
  \mathbf{l}\_{(j)}  &\gets  {\mathbf{l}}\_{0, (j)} + {\mathbf{l}}\_{1, (j)} x\\\\
  \mathbf{r}\_{(j)}  &\gets  {\mathbf{r}}\_{0, (j)} + {\mathbf{r}}\_{1, (j)} x\\\\
  t\_{(j)}(x)        &\gets  t\_{0, (j)} + t\_{1, (j)} x + t\_{2, (j)} x^{2}
\end{aligned}
\\]

Next, each party computes their synthetic blinding factors:
\\[
\begin{aligned}
  {\tilde{t}}\_{(j)}(x) &\gets z^{2} {\tilde{v}}\_{(j)} + x {\tilde{t}}\_{1, (j)} + x^{2} {\tilde{t}}\_{2, (j)} \\\\
   \tilde{e}\_{(j)}     &\gets {\widetilde{a}}\_{(j)}   + x {\widetilde{s}}\_{(j)}
\end{aligned}
\\]

The parties all send their values \\(t_{(j)}(x), {\tilde{t}}\_{(j)}(x), \tilde{e}\_{(j)}, \mathbf{l}\_{(j)}(x), \mathbf{r}\_{(j)}(x)\\) to the dealer as `ProofShare`. The dealer then computes \\(t(x), \tilde{t}(x), \tilde{e}\\) as follows:
\\[
\begin{aligned}
	t(x) &= \sum_{j=0}^{m-1} t_{(j)}(x) \\\\
	{\tilde{t}}(x) &= \sum_{j=0}^{m-1} {\tilde{t}}\_{(j)}(x) \\\\
	{\tilde{e}} &= \sum_{j=0}^{m-1} \tilde{e}\_{(j)}
\end{aligned}
\\]

The dealer adds \\(t(x), {\tilde{t}}(x), {\tilde{e}}\\) to the protocol transcript, obtains a challenge scalar \\(w \in {\mathbb Z\_p}\\), and uses it to create a point \\(Q\\):

\\[
	Q \gets  w \cdot B
\\]

The dealer creates the aggregated vector polynomials \\(\mathbf{l}(x), \mathbf{r}(x)\\) by concatenating all of the individual party \\(\mathbf{l}\_{(j)}(x)\\) and \\(\mathbf{r}\_{(j)}(x) \\) values:

\\[
\begin{aligned}
	{\mathbf{l}}(x) &= {\mathbf{l}}\_{(0)}(x) || {\mathbf{l}}\_{(1)}(x) || \dots || {\mathbf{l}}\_{(m-1)}(x) \\\\
	{\mathbf{r}}(x) &= {\mathbf{r}}\_{(0)}(x) || {\mathbf{r}}\_{(1)}(x) || \dots || {\mathbf{r}}\_{(m-1)}(x) \\\\
\end{aligned}
\\]

The dealer then performs the [inner product argument](../inner_product_proof/index.html) to prove the relation:
\\[
\operatorname{PK}\left\\{
  ({\mathbf{G}}, {\mathbf{H}}' \in {\mathbb G}^{n \cdot m}, P', Q \in {\mathbb G}; {\mathbf{l}}, {\mathbf{r}} \in {\mathbb Z\_p}^{n\cdot m})
  : P' = {\langle {\mathbf{l}}, {\mathbf{G}} \rangle} + {\langle {\mathbf{r}}, {\mathbf{H}}' \rangle} + {\langle {\mathbf{l}}, {\mathbf{r}} \rangle} Q
\right\\}
\\] where \\({\mathbf{H}}' = {\mathbf{y}}^{-n \cdot m} \circ {\mathbf{H}}\\).

The result of the inner product proof is a list of \\(2k\\) points and \\(2\\) scalars, where \\(k = \log_2(n \cdot m)\\): \\(\\{L\_k, R\_k, \\dots, L\_1, R\_1, a, b\\}\\).

The complete range proof consists of \\(9+2k\\) 32-byte elements:
\\[
  \\{A, S, T_1, T_2, t(x), {\tilde{t}}(x), \tilde{e}, L\_k, R\_k, \\dots, L\_1, R\_1, a, b\\}
\\]

Verifier's algorithm
--------------------

The input to the verifier is the aggregated proof, which contains the range size \\(n\\), the \\(m\\) value commitments \\(V_{(j)}\\), and \\(32 \cdot (9 + 2 k)\\) bytes of the proof data where \\(k = \log_2(n \cdot m)\\):

\\[
  \\{A, S, T_1, T_2, t(x), {\tilde{t}}(x), \tilde{e}, L\_{k}, R\_{k}, \\dots, L\_1, R\_1, a, b\\}
\\]

The verifier uses the Fiat-Shamir transform to obtain challenges by adding the appropriate data sequentially to the protocol transcript:

1. \\(V_{(0)}, V_{(1)}, \dots, V_{(m)}, A, S\\) are added to obtain challenge scalars \\(y,z \in {\mathbb Z\_p}\\),
2. \\(T_1, T_2\\) are added to obtain a challenge \\(x \in {\mathbb Z\_p}\\),
3. \\(t(x), {\tilde{t}}(x), \tilde{e}\\) are added to obtain a challenge \\(w \in {\mathbb Z\_p}\\).

The verifier computes the following scalars for the [inner product argument](../inner_product_proof/index.html):

\\[
	\\{u\_{1}^{2}, \dots, u\_{k}^{2}, u\_{1}^{-2}, \dots, u\_{k}^{-2}, s_0, \dots, s_{n-1}\\}
\\]

The goal of the verifier is to check two equations:

1. First, verify the constant term of the polynomial \\(t(x)\\) (see [notes](../notes/index.html#proving-that-t_0-is-correct-1)):

  \\[
  \begin{aligned}
    t(x) B + {\tilde{t}}(x) {\widetilde{B}} \stackrel{?}{=} \sum_{j=0}^{m-1} z^{j+2} V_{(j)} + \delta(y,z) B + x T\_{1} + x^{2} T\_{2},\\\\
    \delta(y,z) = (z - z^{2}) \cdot {\langle {\mathbf{1}}, {\mathbf{y}}^{n \cdot m} \rangle} - \sum_{j=0}^{m-1} z^{j+3} \cdot {\langle {\mathbf{1}}, {\mathbf{2}}^{n \cdot m} \rangle}\\\\
  \end{aligned}
  \\]

  If we rewrite the check as a comparison with the identity point, we get:
  \\[
  0 \stackrel{?}{=} \sum_{j=0}^{m-1} z^{j+2} V_{(j)} + \delta(y,z) B + x T\_{1} + x^{2} T\_{2} - t(x) B - {\tilde{t}}(x) {\widetilde{B}}.
  \\]

2. Second, verify the inner product argument for the vectors \\(\mathbf{l}(x), \mathbf{r}(x)\\) that form the \\(t(x)\\) (see [inner-product protocol](../inner_product_proof/index.html#verification-equation))

  \\[
  P' \overset ? = {\langle a \cdot {\mathbf{s}}, {\mathbf{G}} \rangle} + {\langle {\mathbf{y}^{-n \cdot m}} \circ (b /{\mathbf{s}}), {\mathbf{H}} \rangle} + abQ - \sum\_{j=1}^{k} \left( L\_{j} u\_{j}^{2} + u\_{j}^{-2} R\_{j} \right).
  \\]

  Rewriting as a comparison with the identity point and expanding \\(Q = wB\\) and \\(P' = P + t(x) wB\\) as [needed for transition to the inner-product protocol](../notes/index.html#inner-product-proof):

  \\[
  0 \overset ? = P + t(x) wB - {\langle a \cdot {\mathbf{s}}, {\mathbf{G}} \rangle} - {\langle {\mathbf{y}^{-n \cdot m}} \circ (b /{\mathbf{s}}), {\mathbf{H}} \rangle} - abwB + \sum\_{j=1}^{k} \left( L\_{j} u\_{j}^{2} + u\_{j}^{-2} R\_{j} \right),
  \\]
  where the [definition](../notes/index.html#proving-that-mathbflx-mathbfrx-are-correct-1) of \\(P\\) is:

\\[
\begin{aligned}
  P &= -{\widetilde{e}} {\widetilde{B}} + A + x S - z{\langle {\mathbf{1}}, {\mathbf{G}} \rangle} + z{\langle {\mathbf{y}}^{n \cdot m}, {\mathbf{H}'} \rangle} + \sum_{j=0}^{m-1} {\langle z^{j+2} \cdot {\mathbf{2}}^n, {\mathbf{H}'}\_{[j \cdot n : (j+1) \cdot n]} \rangle}  \\\\
  &= -{\widetilde{e}} {\widetilde{B}} + A + x S - z{\langle {\mathbf{1}}, {\mathbf{G}} \rangle} + z{\langle {\mathbf{1}}, {\mathbf{H}} \rangle} + \sum_{j=0}^{m-1} {\langle z^{j+2} \cdot {\mathbf{2}}^n \circ {\mathbf{y}}^{n \cdot m}\_{[j \cdot n : (j+1) \cdot n]}, {\mathbf{H}}\_{[j \cdot n : (j+1) \cdot n]} \rangle}\\\\
  &= -{\widetilde{e}} {\widetilde{B}} + A + x S - z{\langle {\mathbf{1}}, {\mathbf{G}} \rangle} + z{\langle {\mathbf{1}}, {\mathbf{H}} \rangle} + {\langle {{\mathbf{y}}^{-n \cdot m} \circ z^2 (z^0 \mathbf{2}^n || z^1 \mathbf{2}^n || \dots || z^{m-1} \mathbf{2}^n)}, {\mathbf{H}} \rangle}
\end{aligned}
\\]

The verifier combines two equations in one by sampling a random factor \\(c \\; {\xleftarrow{\\$}} \\; {\mathbb Z\_p}\\),
multiplying the first equation by \\(c\\), and adding it with the second equation.

Finally, verifier groups all scalars by each point and performs a single multiscalar multiplication:

\\[
\begin{aligned}
0 \quad \stackrel{?}{=} & \quad 1       \cdot A \\\\
                      + & \quad x       \cdot S \\\\
                      + & \quad cz^2    \cdot V_{(0)} + cz^3 \cdot V_{(1)} + \dots + cz^{m+1} \cdot V_{(m-1)} \\\\
                      + & \quad cx      \cdot T_1 \\\\
                      + & \quad cx^2    \cdot T_2 \\\\
                      + & \quad \Big(w \big(t(x) - ab\big) + c \big(\delta(y,z) - t(x)\big) \Big) \cdot B\\\\
                      + & \quad (-{\widetilde{e}} - c{\tilde{t}}(x)) \cdot \widetilde{B} \\\\
                      + & \quad {\langle {-z\mathbf{1} - a\mathbf{s}}, {\mathbf{G}} \rangle}\\\\
                      + & \quad {\langle {z\mathbf{1} + {\mathbf{y}}^{-n \cdot m} \circ (z^2 (z^0 \mathbf{2}^n || z^1 \mathbf{2}^n || \dots || z^{m-1} \mathbf{2}^n) - b/{\mathbf{s}})}, {\mathbf{H}} \rangle}\\\\
                      + & \quad {\langle [u_{1}^2,    \dots, u_{k}^2    ], [L_1, \dots, L_{k}] \rangle}\\\\
                      + & \quad {\langle [u_{1}^{-2}, \dots, u_{k}^{-2} ], [R_1, \dots, R_{k}] \rangle}
\end{aligned}
\\] where \\(1/{\mathbf{s}}\\) are inverses of \\(\mathbf{s}\\), computed as a reversed list of \\(\mathbf{s}\\).

Individual share validation
---------------------------

If the dealer is aggregating a proof across \\(m\\) parties, and if one of those parties is faulty (or malicious) and creates an invalid `ProofShare`, then the `AggregatedProof` that the dealer creates will also be invalid. Therefore, it is helpful to be able to check the validity of an individual `ProofShare`, in order to determine if a party is at fault and if so, to block it.

The math for checking `ProofShare` validity is very similar to checking `AggregatedProof` validity, but does not require combining values from multiple parties. The goal of checking `ProofShare` validity is to verify three equations:

1. Verify that \\(\langle \mathbf{l}\_{(j)}(x), \mathbf{r}\_{(j)}(x) \rangle = t_{(j)}(x)\\)

The dealer can perform this check by simply taking the inner product of \\(\mathbf{l}\_{(j)}(x)\\) and \\( \mathbf{r}\_{(j)}(x)\\) and verifying that it is equal to \\(t_{(j)}(x)\\). Note that the dealer is not creating a proof, and thus the proof compactness of the inner product protocol is not a benefit in this situation, so it is sufficient to just perform an inner product multiplication.

2. Verify the constant term of the polynomial \\(t_{(j)}(x)\\)

The dealer wants to check if this statement is correct:
  \\[
  \begin{aligned}
    t\_{(j)}(x) B + {\tilde{t}}\_{(j)}(x) {\widetilde{B}} \stackrel{?}{=} z^{2} z\_{(j)} V_{(j)} + \delta(y,z)\_{(j)} B + x T\_{1, (j)} + x^{2} T\_{2, (j)},\\\\
    \delta\_{(j)}(y,z) = (z - z^{2}) \cdot {\langle {\mathbf{1}}, {\mathbf{y}}^{n}\_{(j)} \rangle} - z^{3} z\_{(j)} \cdot {\langle {\mathbf{1}}, {\mathbf{2}}^{n} \rangle}\\\\
  \end{aligned}
  \\]

  If we rewrite the check as a comparison with the identity point, and plug in the definitions \\(z_{(j)} = z^j\\) and \\({\mathbf{y}}^{n}\_{(j)} = {\mathbf{y}}^{n \cdot m}\_{[j\cdot n : (j+1) \cdot n]} = {\mathbf{y}}^n y^{j \cdot n}\\), we get:

  \\[
  \begin{aligned}
    0 \stackrel{?}{=} z^{j+2} V_{(j)} + \delta(y,z)\_{(j)} B + x T\_{1, (j)} + x^{2} T\_{2, (j)} - t\_{(j)}(x) B - {\tilde{t}}\_{(j)}(x) {\widetilde{B}},\\\\
    \delta\_{(j)}(y,z) = (z - z^{2}) \cdot {\langle {\mathbf{1}}, {\mathbf{y}}^n \cdot y^{j \cdot n} \rangle} - z^{j+3} \cdot {\langle {\mathbf{1}}, {\mathbf{2}}^{n} \rangle}\\\\
  \end{aligned}
  \\]

3. Prove that \\( \mathbf{l}\_{(j)}(x), \mathbf{r}\_{(j)}(x) \\) are correct

The dealer wants to check if this statement is correct:
\\[
\begin{aligned}
	A_{(j)} + xS_{(j)} - z{\langle {\mathbf{1}}, {\mathbf{G}}\_{(j)} \rangle} + z{\langle {\mathbf{1}}, {\mathbf{H}}\_{(j)} \rangle} + {\langle z^{2} z_{(j)} (\mathbf{y}^{n}\_{(j)})^{-1} \circ {\mathbf{2}}^n, {\mathbf{H}}\_{(j)} \rangle} \stackrel{?}{=} {\widetilde{e}}\_{(j)} {\widetilde{B}} + {\langle \mathbf{l}\_{(j)}(x), {\mathbf{G}}\_{(j)} \rangle} + {\langle \mathbf{r}\_{(j)}(x) \circ (\mathbf{y}^{n}\_{(j)})^{-1}, {\mathbf{H}}\_{(j)} \rangle}
\end{aligned}
\\]

If we rewrite the check as a comparison with the identity point, and plug in the definitions \\(z_{(j)} = z^j\\) and \\({\mathbf{y}}^{n}\_{(j)} = {\mathbf{y}}^{n \cdot m}\_{[j\cdot n : (j+1) \cdot n]} = {\mathbf{y}}^n y^{j \cdot n}\\), we get:

\\[
\begin{aligned}
	0 \stackrel{?}{=}A_{(j)} + xS_{(j)} - z{\langle {\mathbf{1}}, {\mathbf{G}}\_{(j)} \rangle} + z{\langle {\mathbf{1}}, {\mathbf{H}}\_{(j)} \rangle} + {\langle z^{j+2} \cdot \mathbf{y}^{-n} y^{-j \cdot n} \circ {\mathbf{2}}^n, {\mathbf{H}}\_{(j)} \rangle} - {\widetilde{e}}\_{(j)} {\widetilde{B}} - {\langle \mathbf{l}\_{(j)}(x), {\mathbf{G}}\_{(j)} \rangle} - {\langle \mathbf{r}\_{(j)}(x) \circ \mathbf{y}^{-n} y^{-j \cdot n} , {\mathbf{H}}\_{(j)} \rangle}
\end{aligned}
\\]

The dealer can combine equations `2` and `3` into one by sampling a random factor \\(c \\; {\xleftarrow{\\$}} \\; {\mathbb Z\_p}\\),
multiplying equation `2` by \\(c\\), and adding it with equation `3`. Finally, the dealer groups all scalars by each point and performs a single multiscalar multiplication:

\\[
\begin{aligned}
0 \quad \stackrel{?}{=} & \quad 1       \cdot A_{(j)} \\\\
                      + & \quad x       \cdot S_{(j)} \\\\
                      + & \quad (-{\widetilde{e}\_{(j)}} - c{\tilde{t}}\_{(j)}(x)) \cdot \widetilde{B} \\\\
                      + & \quad c \big(\delta_{(j)}(y,z) - t_{(j)}(x)\big) \cdot B\\\\
                      + & \quad cz^{j+2}    \cdot V_{(j)} \\\\
                      + & \quad cx      \cdot T_{1, (j)} \\\\
                      + & \quad cx^2    \cdot T_{2, (j)} \\\\
                      + & \quad {\langle {- \mathbf{l}\_{(j)}(x)} -z\mathbf{1}, {\mathbf{G}\_{(j)}} \rangle}\\\\
                      + & \quad {\langle {- \mathbf{r}\_{(j)}(x)} \circ \mathbf{y}^{-n} y^{-j \cdot n} + z\mathbf{1} + z^{j+2} \cdot \mathbf{y}^{-n} y^{-j \cdot n} \circ {\mathbf{2}}^n, {\mathbf{H}}\_{(j)} \rangle}\\\\
\end{aligned}
\\]

repository: dalek-cryptography/bulletproofs

gha_language: Rust

repo_name: dalek-cryptography/bulletproofs


text:
# E.D.D.I

Scalable Open Source Chatbot Platform. Build multiple Chatbots with NLP, Behavior Rules, API Connector, Templating.
Developed in Java (with Quarkus), provided with Docker, orchestrated with Kubernetes or Openshift.

v5.0.0 - Stable

License: Apache License 2.0

Project website: [here](https://eddi.labs.ai/)

Documentation: [here](http://docs.labs.ai/)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2c5d183d4bd24dbaa77427cfbf5d4074)](https://www.codacy.com/gh/labsai/EDDI/dashboard?utm_source=github.com&utm_medium=referral&utm_content=labsai/EDDI&utm_campaign=Badge_Grade) [![CircleCI](https://circleci.com/gh/labsai/EDDI/tree/master.svg?style=svg)](https://circleci.com/gh/labsai/EDDI/tree/master)

## Intro

The Chatbot System - E.D.D.I \(Enhanced Dialog Driven Intelligence\),
has been developed with the focus on the use in enterprise applications as well as the ease of connecting it
to other resources \(such as databases or other Services\).

The most outstanding features are:

* Flexible in NLP and Behavior
* Fluently connect to REST APIs
* Powerful Templating
* Reuse Conversation Flows in multiple bots

technical spec:

* Resource- / REST-oriented architecture
* OAuth 2.0 / Basic Authentication (Keycloak)
* Java Quarkus
* JAX-RS
* Dependency Injection
* NoSQL (MongoDB)
* HTML, CSS, Javascript, JSON

## Prerequirements

* Java 17
* Maven 3.8.4
* MongoDB > 4.0

## How to run the project

1. Setup a local mongodb \(> v4.0\)
2. On a terminal, under project root folder, run the following command:

```shell script
./mvnw compile quarkus:dev
```

3. Go to Browser --> [http://localhost:7070](http://localhost:7070)

Note: If running locally inside an IDE you need _lombok_ to be enabled \(otherwise you will get compile errors
complaining about missing constructors\). Either download as plugin \(e.g. inside Intellij\) or follow instructions
here [https://projectlombok.org/](https://projectlombok.org/

## Build App & Docker image

```shell script
./mvnw clean package '-Dquarkus.container-image.build=true'
```

Open a browser and navigate to:

```text
http://<IP_ADDRESS>:7070/
```

## Run Docker image

For development, use

```bash
docker-compose -f docker-compose.yml -f docker-compose.local.yml up
```

For integration testing run

```bash
./integration-tests.sh
```

or

```bash
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.testing.yml -p ci up -d
```

For running in cloud \(with authentication\),
check: [https://hub.docker.com/r/labsai/eddi](https://hub.docker.com/r/labsai/eddi)

repository: anniyanvr/EDDI

branch_name: refs/heads/master

extension: md

gha_language: Java

license_type: permissive

repo_name: anniyanvr/EDDI


text:
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![CodeQL](https://github.com/zaproxy/zap-extensions/actions/workflows/codeql.yml/badge.svg)](https://github.com/zaproxy/zap-extensions/actions/workflows/codeql.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=zaproxy_zap-extensions&metric=alert_status)](https://sonarcloud.io/dashboard?id=zaproxy_zap-extensions)

This project contains add-ons for the [Zed Attack Proxy](https://github.com/zaproxy/zaproxy) (ZAP).

If you are using the latest version of ZAP then you can browse and download add-ons from within ZAP by clicking on this button in the toolbar:

![Image](https://github.com/zaproxy/zap-extensions/wiki/images/zap-screenshot-browse-addons.png)

You can also import add-ons you have downloaded manually from https://github.com/zaproxy/zap-extensions/releases via the "File / Load Add-on File..." menu option.

Please see the [wiki](https://github.com/zaproxy/zap-extensions/wiki) for more details.

## Building

The add-ons are built with [Gradle], each add-on has its own project which is located under the `addOns` project/directory.

To build zap-extensions follow the instructions on:

https://www.zaproxy.org/docs/developer/quick-start-build/

[Gradle]: https://gradle.org/

repository: zaproxy/zap-extensions

branch_name: refs/heads/main

repo_name: zaproxy/zap-extensions


text:
# fabricSnapper, snapping fabric objects

Allows center-snapping objects while objects dragging.
Inspired by online editors like Canva and Crello.

## Sample Usage

```
  var canvas = new fabric.Canvas('c');
  var settings = {fill: 'green', stroke: 'green'}; // optional
  var snapper = new fabricSnapper(this.canvas, settings);
```

## Todo
- [ ] Allow limiting snapping objects
- [ ] Add snapping to boundaries
- [ ] Dynamic axis size
- [ ] Create a codepen sample

license: MIT

repository: zanzarra/fabricSnapper

gha_language: JavaScript

gha_license_id: MIT

repo_name: zanzarra/fabricSnapper


text:
# -HIDin-Human-Interface-Devices
Human Interface Devices for PC [hidin] and Mac [hid]

Hacked generic usb joystick and turnned into a noise, synth, performance and live sampling instrument and modulator.

Sound excerpt:
https://soundcloud.com/miguelito-oliveros/hacking-for-noise-hidin

More info:
http://en.flossmanuals.net/pure-data/sensors/game-controllers/


text:
# Choose Maryland: Compare States - Workforce

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/choose-maryland-compare-states-workforce) |
| Metadata | [Link](https://data.maryland.gov/api/views/5esm-neyf) |
| Data: JSON | [100 Rows](https://data.maryland.gov/api/views/5esm-neyf/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.maryland.gov/api/views/5esm-neyf/rows.csv?max_rows=100) |
| Host | data.maryland.gov |
| Id | 5esm-neyf |
| Name | Choose Maryland: Compare States - Workforce |
| Attribution | Maryland Department of Commerce |
| Category | Business and Economy |
| Tags | maryland, state, compare, employment, unemployment, labor force |
| Created | 2013-07-29T01:08:29Z |
| Publication Date | 2017-04-12T14:07:27Z |

## Description

Workforce summary - employed, unemployed, participation rates, STEM employment.

## Columns

```ls
| Included | Schema Type    | Field Name                   | Name                                                  | Data Type | Render Type |
| ======== | ============== | ============================ | ===================================================== | ========= | =========== |
| No       | time           | :updated_at                  | updated_at                                            | meta_data | meta_data   |
| Yes      | series tag     | state                        | State                                                 | text      | text        |
| Yes      | numeric metric | civilian_laborforce          | Civilian Labor Force                                  | number    | number      |
| Yes      | numeric metric | employment                   | Employment                                            | number    | number      |
| Yes      | numeric metric | unemployment                 | Unemployment                                          | number    | number      |
| Yes      | numeric metric | unemployment_rate            | Unemployment Rate (%)                                 | percent   | percent     |
| Yes      | numeric metric | laborforce_rate_total        | Labor Force Participation Rate, Total (%)             | percent   | percent     |
| Yes      | numeric metric | laborforce_rate_male         | Labor Force Participation Rate, Male (%)              | percent   | percent     |
| Yes      | numeric metric | laborforce_rate_female       | Labor Force Participation Rate, Female (%)            | percent   | percent     |
| Yes      | numeric metric | stem_workers                 | Employment in STEM Occupations (%)                    | percent   | percent     |
| Yes      | numeric metric | scientists_engineers_per100k | Doctoral Scientists and Engineers per 100,000 Workers | number    | number      |
```

## Time Field

```ls
Value = updated_at
Format & Zone = seconds
```

## Data Commands

```ls
series e:5esm-neyf d:2017-04-12T14:06:55.000Z t:state=Alabama m:unemployment_rate=6 m:employment=2039000 m:unemployment=130000 m:scientists_engineers_per100k=358 m:laborforce_rate_male=62.3 m:laborforce_rate_female=51.9 m:civilian_laborforce=2169000 m:laborforce_rate_total=56.9 m:stem_workers=5.1

series e:5esm-neyf d:2017-04-12T14:06:55.000Z t:state=Alaska m:unemployment_rate=6.6 m:employment=337000 m:unemployment=24000 m:scientists_engineers_per100k=426 m:laborforce_rate_male=75.5 m:laborforce_rate_female=65 m:civilian_laborforce=360000 m:laborforce_rate_total=70.5 m:stem_workers=6.2

series e:5esm-neyf d:2017-04-12T14:06:55.000Z t:state=Arizona m:unemployment_rate=5.3 m:employment=3066000 m:unemployment=172000 m:scientists_engineers_per100k=398 m:laborforce_rate_male=63.7 m:laborforce_rate_female=54 m:civilian_laborforce=3238000 m:laborforce_rate_total=58.8 m:stem_workers=6.7
```

## Meta Commands

```ls
metric m:civilian_laborforce p:integer l:"Civilian Labor Force" t:dataTypeName=number

metric m:employment p:integer l:Employment t:dataTypeName=number

metric m:unemployment p:integer l:Unemployment t:dataTypeName=number

metric m:unemployment_rate p:float l:"Unemployment Rate (%)" t:dataTypeName=percent

metric m:laborforce_rate_total p:float l:"Labor Force Participation Rate, Total (%)" t:dataTypeName=percent

metric m:laborforce_rate_male p:float l:"Labor Force Participation Rate, Male (%)" t:dataTypeName=percent

metric m:laborforce_rate_female p:float l:"Labor Force Participation Rate, Female (%)" t:dataTypeName=percent

metric m:stem_workers p:float l:"Employment in STEM Occupations (%)" t:dataTypeName=percent

metric m:scientists_engineers_per100k p:integer l:"Doctoral Scientists and Engineers per 100,000 Workers" t:dataTypeName=number

entity e:5esm-neyf l:"Choose Maryland:  Compare States - Workforce" t:attribution="Maryland Department of Commerce" t:url=https://data.maryland.gov/api/views/5esm-neyf

property e:5esm-neyf t:meta.view v:id=5esm-neyf v:category="Business and Economy" v:attributionLink=http://commerce.maryland.gov v:averageRating=0 v:name="Choose Maryland:  Compare States - Workforce" v:attribution="Maryland Department of Commerce"

property e:5esm-neyf t:meta.view.owner v:id=m2gt-bxeg v:screenName="Mike Grandel" v:displayName="Mike Grandel"

property e:5esm-neyf t:meta.view.tableauthor v:id=m2gt-bxeg v:screenName="Mike Grandel" v:roleName=editor v:displayName="Mike Grandel"
```

## Top Records

```ls
| :updated_at | state       | civilian_laborforce | employment | unemployment | unemployment_rate | laborforce_rate_total | laborforce_rate_male | laborforce_rate_female | stem_workers | scientists_engineers_per100k |
| =========== | =========== | =================== | ========== | ============ | ================= | ===================== | ==================== | ====================== | ============ | ============================ |
|<PHONE_NUMBER>  | Alabama     | 2169000             | 2039000    | 130000       | 6.0               | 56.9                  | 62.3                 | 51.9                   | 5.1          | 358                          |
|<PHONE_NUMBER>  | Alaska      | 360000              | 337000     | 24000        | 6.6               | 70.5                  | 75.5                 | 65.0                   | 6.2          | 426                          |
|<PHONE_NUMBER>  | Arizona     | 3238000             | 3066000    | 172000       | 5.3               | 58.8                  | 63.7                 | 54.0                   | 6.7          | 398                          |
|<PHONE_NUMBER>  | Arkansas    | 1343000             | 1289000    | 54000        | 4.0               | 57.6                  | 62.7                 | 52.8                   | 4.0          | 244                          |
|<PHONE_NUMBER>  | California  | 19103000            | 18065000   | 1038000      | 5.4               | 63.0                  | 69.4                 | 56.9                   | 7.6          | 693                          |
|<PHONE_NUMBER>  | Colorado    | 2891000             | 2795000    | 96000        | 3.3               | 68.0                  | 73.6                 | 62.5                   | 8.6          | 651                          |
|<PHONE_NUMBER>  | Connecticut | 1892000             | 1796000    | 96000        | 5.1               | 66.7                  | 71.2                 | 62.5                   | 6.7          | 658                          |
|<PHONE_NUMBER>  | Delaware    | 473000              | 452000     | 21000        | 4.4               | 62.5                  | 66.5                 | 58.8                   | 6.9          | 823                          |
|<PHONE_NUMBER>  | Florida     | 9839000             | 9359000    | 480000       | 4.9               | 58.4                  | 63.0                 | 54.1                   | 4.6          | 295                          |
|<PHONE_NUMBER>  | Georgia     | 4920000             | 4656000    | 264000       | 5.4               | 62.6                  | 67.6                 | 58.0                   | 6.0          | 403                          |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
# metrics

Demonstrates how streaming telemetry on Cisco IOS-XR devices can be incorporated into a metrics pipeline.

![metrics](./static/metrics.png "Metrics Overview")

## Running / Usage

The entire demo is provided as  a [topology.virl](./topology.virl) you can launch it
by simply typing `virl up` in this directory.

## Network topology

The network topology is provided by virl as defined in [topology.virl](./topology.virl)

![network](./static/network.png)

## Metrics Pipeline - Technology Stack

The metrics pipeline is installed on the metrics server in the topology.

![metric pipeline](./static/pipeline.png "Metrics Pipeline")

The grafana ui can be found at http://mgmt-ip-of-metrics-server:3000
You can find the management IP of the metrics server node in your simulation using `virl nodes`

## IOS-XR Configuration

The following model-driven telemetry configuration is placed on all the XR nodes
via the [topology.virl](./topology.virl) file

```

telemetry model-driven
 destination-group PIPELINE
  address-family ipv4 <IP_ADDRESS> port 5432
   encoding self-describing-gpb
   protocol tcp
  !
 !
 sensor-group CPU
  sensor-path Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization
 !
 sensor-group OSPF
  sensor-path Cisco-IOS-XR-ipv4-ospf-oper:ospf/processes/process/default-vrf/ospf-summary
 !
 sensor-group BGP
  sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/process-info
  sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/afs/af/af-process-info/global
 !
 sensor-group BGP-RIB
  sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/bgp/as/information
  sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/connected/non-as/information
!
 sensor-group INTFS
  sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/data-rate
  sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters
 !
 sensor-group MEMORY
  sensor-path Cisco-IOS-XR-nto-misc-oper:memory-summary/nodes/node/summary
 !
 sensor-group ROUTING
  sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/rib-table-ids/rib-table-id/summary-protos
 !
 subscription SUB1
  sensor-group-id CPU sample-interval 10000
  sensor-group-id OSPF sample-interval 10000
  sensor-group-id BGP sample-interval 10000
  sensor-group-id BGP-RIB sample-interval 10000

  sensor-group-id INTFS sample-interval 10000
  sensor-group-id MEMORY sample-interval 10000
  sensor-group-id ROUTING sample-interval 10000
  destination-id PIPELINE
```

## Party On, Wayne!

To get you started quickly, we've added some very common charts / telemetry configuration.  You can now explore adding your own metrics and graphs.


text:
## Data-Science-Hands-on-Projects

## Frameworks:

https://github.com/google/trax

https://opennmt.net/OpenNMT-py/index.html

https://huggingface.co/

https://rasa.com/docs/rasa/

https://imageai.readthedocs.io/en/latest/index.html

## Reference:

Model Evaluation

https://www.jeremyjordan.me/evaluating-a-machine-learning-model/

Word Embedding

http://mccormickml.com/2016/04/19/word2vec-tutorial-the-skip-gram-model/

Transformer

https://arxiv.org/pdf/1706.03762.pdf

https://ai.googleblog.com/2017/08/transformer-novel-neural-network.html

Unbalanced Dataset

https://elitedatascience.com/imbalanced-classes

Grid Search

https://medium.com/ml-book/neural-networks-hyperparameter-tuning-in-tensorflow-2-0-a7b4e2b574a1


text:
# window

> Exports a [`jsdom`](https://github.com/tmpvar/jsdom) window object.

[![Build Status](https://travis-ci.org/lukechilds/window.svg?branch=master)](https://travis-ci.org/lukechilds/window) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/window/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/window?branch=master) [![npm](https://img.shields.io/npm/dm/window.svg)](https://www.npmjs.com/package/window)

Exports a jsdom window object. This is useful for enabling browser modules to run in Node.js or testing browser modules in any Node.js test framework.

## Install

```shell
npm install --save window
```

Or if you're just using for testing you'll probably want:

```shell
npm install --save-dev window
```

## Usage

```js
const Window = require('window');

const window = new Window();

const div = window.document.createElement('div');
// HTMLDivElement

div instanceof window.HTMLElement
// true
```

Because `window` is just a normal JavaScript object it can be used more efficiently with object destructuring.

```js
const { document } = new Window();

document.body.innerHTML = '<div class="foo">Hi!</div>';
document.body.querySelector('.foo').textContent;
// "Hi!"
```

## License

MIT © Luke Childs

repository: JeanHenriqueFerreira/nodeJSFaceDetect

repo_name: JeanHenriqueFerreira/nodeJSFaceDetect


text:
# Searching cCREs

## Query cCREs by location

Returns the cCREs in the given range, their location, and their zscores in K562.

```graphql
query {
  ccres(
    assembly: GRCh38
    range: { chrom: "chr2", start: 115500000, end: 116000000 }
  ) {
    total
    ccres {
      accession
      range {
        chrom
        start
        end
      }
      ctspecific(ct: "K562") {
        dnase_zscore
        h3k4me3_zscore
        h3k27ac_zscore
        ctcf_zscore
      }
    }
  }
}
```

## Query cCREs by max epigenetic signal

Searches for cCREs on chromosome 2, with max H3K4me3 zscore between 2 and 3.

```graphql
query {
  ccres(
    assembly: GRCh38
    range: { chrom: "chr2" }
    expmaxs: { rank_promoter_start: 2, rank_promoter_end: 3 }
  ) {
    total
    ccres {
      accession
      k4me3max
    }
  }
}
```

## Query cCREs by biosample-specific epigenetic signal

Returns cCREs on chromosome 2 active in K562 (dnase zscore >= 1.64).

```graphql
query {
  ccres(
    assembly: GRCh38
    range: { chrom: "chr2" }
    ctexps: { cellType: "K562", rank_dnase_start: 1.64 }
  ) {
    total
    ccres {
      accession
      k4me3max
    }
  }
}
```

## Query cCREs by accession

Returns back two cCREs by accession.

```graphql
query {
  ccres(assembly: GRCh38, accessions: ["EH38E2000616", "EH38E1972623"]) {
    ccres {
      accession
    }
  }
}
```

# Try it out

What query would you use to find the nearby protein-coding genes of enhancer-like GRCh38 cCREs in GM12878 on chromosome 16?

See answer

```graphql
query {
  ccres(
    assembly: GRCh38
    range: { chrom: "chr16" }
    ctexps: { cellType: "GM12878", rank_dnase_start: 1.64, rank_enhancer_start: 1.64 }
  ) {
    total
    ccres {
      accession
      nearbygenes {
        pc {
          distance
          gene {
            approved_symbol
          }
        }
      }
    }
  }
}
```


text:
---
layout: babyupost
title: Baby U in the News
---

Jan 29, 2017 - Toledo Blade:
- [Charity gala kicks off the Toledo Auto Show](http://www.toledoblade.com/BarbaraHendel/2017/01/29/On-The-Town-Charity-gala-kicks-off-the-Toledo-Auto-Show.html)

 > The Toledo Auto Dealers United for Kids “The Cars are the Stars XIV” Preview Gala on Wednesday night kicked off the 100th Greater Toledo Auto Show, sponsored by the The Blade and produced by the Toledo Automobile Dealers Association. Since its inception, the gala has contributed more than $1.7 million dollars to local children’s charities.

 > This year’s recipients include Make-AWish Foundation, **Baby University,** Imagination Station Adopt-A-School-Program, the Historic South Initiative, Read for Literacy and Claire’s Day, the Erie Shores Council of Boy Scouts of America, and the University of Toledo’s and Owens Community College’s ADUK-TADA scholarship endowments. According to Pat Stark, ADUK executive director, this year’s gala is expected to raise $150,000.

---

 Apr 8, 2016 - Toledo Blade [story](http://www.toledoblade.com/local/2016/04/08/4-awarded-recognition-for-community-service.html) about the 2016 Jefferson Award winners for community service. [Kelly and David Kaiser](/our-story) were finalists.

>  The Jefferson Awards recognize community “unsung heroes” devoted to public service. The prize has been nicknamed the Nobel Prize for community service. The awards are sponsored by The Blade, Buckeye CableSystem, WTVG-13, and Leadership Toledo.

---

Aug 1, 2015 - Toledo Blade:
 - [3 area places of faith are 1 in building community](http://www.toledoblade.com/Religion/2015/08/01/3-area-places-of-faith-are-1-in-building-community.html)

> Mosaic is “totally supported by suburban churches” and gets about 200 volunteers a month from 16 congregations, Pastor Kaiser said. The new location “gives us the opportunity to continue to serve people in South Toledo in a womb-to-career pipeline,” including restoring some services for children that were moved out of the community when Head Start left.

---

Aug 14, 2013 - Toledo Blade:
 - [Parents go back to school with children](http://toledoblade.com/Education/2013/08/15/Parents-go-back-to-school-with-children-Copy.html)

> ‘Baby University’ works to break cycle of poverty.

---

Jun 7, 2012 - Toledo Free Press:
 - [South Toledo Community Center seeks new home](/jun-2012-toledo-free-press-article-that-mentions-mosaic-ministries)

---

Mar 30, 2012 - Toledo Free Press:
 - [Churches, agencies partner to develop South Toledo](/mar-2012-toledo-free-press-article-that-mentions-mosaic-ministries)

> Kaiser told the attendees at his community meeting that he’s consciously not calling South Toledo the “South End” anymore. Because this, he said, is not the end.

---

Feb 10, 2012 - Toledo Free Press:
 - [Los Miserables](/feb-2012-toledo-free-press-article-about-mosaic-ministries)

> ... in the midst of collapse and ruin, there are people who believe in a better way, people who believe in the future, people who believe in salvation.


text:
# Relx
Rails plugin maintain release and version history in YAML file.

## Usage
Create `versions.yml` file in root of your Rails project with the contenet like this (in draft yet):

```yaml
# Version history of Dungeons Project
---
0.1.1:
  codename: Probabilitor the Annoying
  release:
    date: 2017-06-02
    changelog:
    - Fix Shield of shielding
    - Housekeeping
  beta:
    date: 2017-05-01
    changelog:
    - Big graphical redesign
    - Ban Infinity sided dice
    - Use Impossibeast where possible
0.1.0:
  codename: Centaur-taur
  release:
    date: 2017-03-22
    changelog:
    - Graph paper initialization
    - Base logics
```

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'relx', github: 'smartlime/relx'
```

And then execute:
```bash
$ bundle
```

## Contributing
Issues and PRs are welcome.

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

repository: osgirl/relx

repo_name: osgirl/relx


text:
# Features

This web app will let you customize badge input and then show you both the markdown code and an HTML preview.

## What can this tool do?

- Quickly and easily generate badges
- Preview your badges and then copy the markdown when you're happy
- Uses dynamic SVG images defined by URL - no image editing
- Professional and consistent badges
- Use pre-made generic badges or create a new one

## Where do I use the badges?

Put the badges wherever you like:

- At the top of your `README.md`.
- In your docs directory files
- In your docs site or website.
- Link to your repo from another site - like another website or GitHub repo of yours, or even post a link in a blog or forum.

## Content

- Meta badges
- Made with (OS level or important tool or package)
- Dependency badge (usually packages)
- Made for
- Call to Action - download, view docs site, view live site
- Social badges
- Custom badges
- Link maker (no badge) including optional alt text

These could also be available as JS to include in other projects and not just this project's frontend.

## How does it work?

The badges are created using URLs which are loaded as images.

When you load the SVG image, it appears as rendered HTML - thanks to an external service like [shields.io](https://shield.io) API or the GH Actions badge service.

## Why use this tool?

- It relies mostly on sites like [shields.io](https://shields.io/) to generate professional badges that you can embed in your documentation and then add your own hyperlinks to.
- Great for new projects which have no badges yet, or updating older projects
- You don't need to learn the syntax for each badge type or worry about escaping a space character. The generator will save you time and give you just the markdown you need (you can also come back to the generator to regenerate a badge when you need to modify an existing badge).
- It aims to be more convenient and user-friendly than the generator on shields.io site.
- It focuses on the badge choices I commonly use and bundles the badges together as output, to avoid sifting through [shields.io](https://shields.io/) docs every time and to keep my projects looking consistent.
- Ideal for these topics:
    - JS, Python, Jekyll and Bash projects
    - GitHub Actions badges
    - Tags, license and Use this Template badges in the GitHub environment
- Need a badge which has custom text, color and URL? The generator can do that too.

repository: JhonataRibeiro/badge-generator

repo_name: JhonataRibeiro/badge-generator


text:
---
layout: post
title: The website foundation - LAMP stack
date: '2017-06-22 10:42:00'
tags:
- hosting
---

 **tl;dr** a simple guide to setting up a LAMP stack on an existing Ubuntu server.

For my purposes I'm referring to LAMP as:
**L** inux (Ubuntu LTS): _Operating system_
**A** pache: _webserver_
**M** ySQL: _database_
**P** HP: _scripting language_

**Linux:**
see alternate post

**Apache:**
Install Apache from the Ubuntu repositories

    $ sudo apt-get install apache2

Configure Apache to start automatically

    $ sudo systemctl enable apache2
    $ sudo systemctl start apache2
    $ sudo systemctl status apache2

Test Apache by opening the server IP address in a web-browser
`server_ip`
If everything went as expected you should see a generic page describing the Apache install and configuration files.

**MySQL:**
Install MySQL and set the root password

    $ sudo apt-get install mysql-server mysql-client

Check the status of the service

    $ sudo systemctl status mysql

Clean out some insecure default permissions

    $ mysql_secure_installation

**PHP:**
Update the repositories, then install PHP and associated packages

    $ sudo apt-get update
    $ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

Check that everything installed correctly by testing the current version of php that is installed (a version number should be displayed).

    $ php -v

Once satisfied that everything has installed correctly, lets create a test page to confirm PHP is playing nice with Apache.

    $ sudo nano /var/www/html/test.php

Enter the following code and save
`<?php phpinfo(); ?>`
Save the file, then restart Apache

    $ sudo systemctl restart apache2

Navigate to the page we just created
`server_ip/test.php`
If everything works as expected we should see some details on the PHP installation.
Once satisfied everything is working as expected, remove the page just created.

    $ sudo rm /var/www/html/test.php

Congratulations, you've now got a server setup and a LAMP stack installed.

extension: markdown

gha_language: Ruby


text:
---
title: Mastering CSS - The Box Model
date: '2020-09-01T11:53:32.169Z'
---

Today we're going to do something different but necesary, we're going to condense the most important and basics concepts of CSS.

## The Box Model

The “CSS box model“ is a set of rules that define how every web page on the Internet is rendered. CSS treats each element in your HTML document as a “box” with a bunch of different properties that determine where it appears on the page. So far, all of our web pages have just been a bunch of elements rendered one after another. The box model is our toolkit for customizing this default layout scheme.

Each HTML element rendered on the screen is a box, and they come in two flavors: “block” boxes and “inline“ boxes.

![code](inline vs block boxes.png)

Let's see some properties of block boxes:

- Block boxes always appear below the previous block element. This is the “natural” or “static” flow of an HTML document when it gets rendered by a web browser.

- The width of block boxes is set automatically based on the width of its parent container. In this case, our blocks are always the width of the browser window.

- The default height of block boxes is based on the content it contains. When you narrow the browser window, the `<h1>` gets split over two lines, and its height adjusts accordingly.

- Inline boxes don’t affect vertical spacing. They’re not for determining layout—they’re for styling stuff inside of a block.

- The width of inline boxes is based on the content it contains, not the width of the parent element.

- When you set the left and right margin of a block-level element to auto, it will center the block in its parent element.

We can override the default box type of HTML elements with the CSS display property. For example, if we wanted to make our <em> and <strong> elements blocks instead of inline elements, we could update our rule

## Content, Padding, Border and Margin

The “CSS box model” is a set of rules that determine the dimensions of every element in a web page. It gives each box (both inline and block) four properties:

- Content – The text, image, or other media content in the element.
- Padding – The space between the box’s content and its border.
- Border – The line between the box’s padding and margin.
- Margin – The space between the box and surrounding boxes.

![code](box-model.png)

You can change the values of padding and margin in one line:

```css
p {
  padding: 20px 0 20px 10px; /* Top  Right  Bottom  Left */
}
```

You can do the same for border:

```css
h1 {
  padding: 50px;
  border: 1px solid #5d6063;
}
```

## Content and Border Boxes

Imagine trying to fill a 600px container with three boxes that are all width: 200px, but they don’t fit because they all have a 1px border (making their actual width 202px).

![code](content-border-box.png)

Fortunately, CSS lets you change how the width of a box is calculated via the box-sizing property. By default, it has a value of content-box, which leads to the behavior described above. Let’s see what happens when we change it to border-box:

![code](correct-box.png)

This is much more intuitive, and as a result, using **border-box** for all your boxes is considered a best practice among modern web developers.

## Resetting Styles

Notice that white band around our page? That’s a default margin/padding added by your browser. Different browsers have different default styles for all of their HTML elements, making it difficult to create consistent stylesheets.

![code](reset.png)

It’s usually a good idea to override default styles to a predictable value using the “universal” CSS selector (\*).

```css
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
```

This selector matches every HTML element, effectively resetting the margin and padding properties for our web page. We also converted all our boxes to border-box, which, again, is a best practice.

## Conclusion

- Everything is a box.
- Boxes can be inline or block-level.
- Boxes have content, padding, borders, and margins.
- They also have seemingly arbitrary rules about how they interact.
- Mastering the CSS box model means you can lay out most web pages.

See you on the next post.

Sincerely,

**Eng Adrian Beria.**

repository: Radinax/React-Personal-Blog-Gatsby

repo_name: Radinax/React-Personal-Blog-Gatsby


text:
#How to build a docker image for the dev environment

Prerequisites:
- AWS CLI installed
- Valid AWS Credentials (See Janus to obtain new ones)

1. Retrieve the docker login command that you can use to authenticate your Docker client to your registry:
    - `aws ecr get-login --region eu-west-1 --profile frontend`

2. Run the docker login command that was returned in the previous step.

3. Build your Docker image using the following command.
    - `docker build -t frontend-dev -f Dockerfile-dev .`

4. Flatten image to reduce its size. (This will get rid of image layers)
    - `ID=$(docker run -d frontend-dev /bin/bash)`
    - `docker export $ID | docker import - frontend-dev:latest`

5. After the build completes, tag your image so you can push the image to this repository:
    - `docker tag frontend-dev:latest<PHONE_NUMBER>62.dkr.ecr.eu-west-1.amazonaws.com/frontend-dev:latest`

6. Run the following command to push this image to your newly created AWS repository:
    - `docker push<PHONE_NUMBER>62.dkr.ecr.eu-west-1.amazonaws.com/frontend-dev:latest`

repository: tina-trenkner/frontend

repo_name: tina-trenkner/frontend


text:
# Docker Workshop - Dockerfile

# Sections:

* [What is a Dockerfile](#what-is-a-dockerfile)
* [Usage of docker build](#usage-of-docker-build)
* [Understand how CMD and ENTRYPOINT interact](#understand-how-cmd-and-entrypoint-interact)
* [Bread Crumb Navigation](#bread-crumb-navigation)

## What is a Dockerfile
_________________________

* Docker can build images automatically by reading the instructions from a `Dockerfile`.
* A `Dockerfile` is a text document that contains all the commands a user could call on the command line to assemble an image.
* Using `docker build` users can create an automated build that executes several command-line instructions in succession.

## Usage of docker build
_________________________

* The `docker build` command builds an image from a `Dockerfile` and a `context`.
* The build’s context is the files at a specified location `PATH` or `URL`
    * The `PATH` is a directory on your local filesystem.
    * The `URL` is a Git repository location.
* A context is processed recursively
    * So, a `PATH` includes any subdirectories and the `URL` includes the repository and its submodules.

Remember in the previous document `docker basics` we did the following:

```bash
$ docker build -t hello-world .
Sending build context to Docker daemon  5.632kB
Step 1/2 : FROM nginx:1.8-alpine
 ---> c0dddb65129b
Step 2/2 : ADD site /usr/share/nginx/html
 ---> Using cache
 ---> 37e37aa0cac0
Successfully built 37e37aa0cac0
```

Dockerfile Reference Table:

| Command | Reference | Description |
| --- | --- | --- |
| ADD | [Doc](https://docs.docker.com/engine/reference/builder/#add) | Copies files, directories or remote file URLs from `src` and adds them container |
| CMD | [Doc](https://docs.docker.com/engine/reference/builder/#copy) | Provide defaults for an executing container |
| ENTRYPOINT | [Doc](https://docs.docker.com/engine/reference/builder/#entrypoint) | Allows you to configure a container that will run as an executable |
| ENV | [Doc](https://docs.docker.com/engine/reference/builder/#env) | Instruction sets the environment variable `key` to the value `value` |
| EXPOSE | [Doc](https://docs.docker.com/engine/reference/builder/#expose) | Instruction informs Docker that the container listens on the specified network ports at runtime |
| COPY | [Doc](https://docs.docker.com/engine/reference/builder/#copy) | Instruction copies new files or directories from `src` and adds them to the filesystem of the container at the path `dest` |
| LABEL | [Doc](https://docs.docker.com/engine/reference/builder/#label) | Instruction adds metadata to an image. A `LABEL` is a key-value pair |
| VOLUME | [Doc](https://docs.docker.com/engine/reference/builder/#volume) | Creates a shared volume that can be shared among containers or by the host machine |
| WORKDIR | [Doc](https://docs.docker.com/engine/reference/builder/#workdir) | Set the default working directory for the container |
| FROM | [Doc](https://docs.docker.com/engine/reference/builder/#from) | The base image to use in the build. This is mandatory and must be the first command in the file. |
| USER | [Doc](https://docs.docker.com/engine/reference/builder/#user) | Sets the default user within the container |
| ARG | [Doc](https://docs.docker.com/engine/reference/builder/#arg) | Instruction defines a variable that users can pass at build-time to the builder with the docker build command using the `--build-arg` `varname=value` flag |
| ONBUILD | [Doc](https://docs.docker.com/engine/reference/builder/#onbuild) | A command that is triggered when the image in the `Dockerfile` is used as a base for another image |
| STOPSIGNAL | [Doc](https://docs.docker.com/engine/reference/builder/#stopsignal) | Instruction sets the system call signal that will be sent to the container to exit |
| HEALTHCHECK | [Doc](https://docs.docker.com/engine/reference/builder/#healthcheck) | Instruction tells Docker how to test a container to check that it is still working |
| SHELL | [Doc](https://docs.docker.com/engine/reference/builder/#shell) | Instruction allows the default `shell` used for the shell form of commands to be overridden |
| MAINTAINER | [Doc](https://docs.docker.com/engine/reference/builder/#maintainer-deprecated) | Instruction sets the Author field of the generated images. |

[Dockerfile Project](http://dockerfile.github.io/)

Go Dockerfile:

```dockerfile
# Pull base image.
FROM dockerfile/go

LABEL<EMAIL_ADDRESS>
# This is deprecated so you should use the LABEL command instead
MAINTAINER Marcel Belmont<EMAIL_ADDRESS>
ENV GOVERSION 1.8.3

# Add scripts.
ADD bin/go-build /usr/local/bin/go-build
ADD bin/go-run /usr/local/bin/go-run

# Add executable permission to scripts.
RUN chmod +x /usr/local/bin/go-*

# Set instructions on build.
ONBUILD ADD . /gopath/src/app/
ONBUILD RUN go-build

# Define default command.
CMD ["go-run"]

# Expose port.
EXPOSE 8080
```

Node.js Dockerfile:

```dockerfile
#
# Node.js Dockerfile
#
# https://github.com/dockerfile/nodejs
#

# Pull base image.

WORKDIR /data

# Define default command.
CMD ["bash"]
```

## Understand how CMD and ENTRYPOINT interact
_________________________

[Understand how CMD and ENTRYPOINT interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact)

* Both `CMD` and `ENTRYPOINT` instructions define what command gets executed when running a container.
* There are few rules that describe their co-operation.
* Dockerfile should specify at least one of `CMD` or `ENTRYPOINT` commands.
* ENTRYPOINT should be defined when using the container as an executable.
* `CMD` should be used as a way of defining default arguments for an ENTRYPOINT command or for executing an ad-hoc command in a container.
* `CMD` will be overridden when running the container with alternative arguments.

EntryPoint Dockerfile:

```dockerfile
FROM ubuntu:16.04

COPY debug-mode.sh /root

RUN \
uptime

ENTRYPOINT ["/usr/bin/uptime"]
CMD ["-V"]
```

ARG Dockerfile:

```dockerfile
# ARG is the only command that can precede FROM which is ordinarily first COMMAND in Dockerfile
ARG  CODE_VERSION=latest
FROM base:${CODE_VERSION}
CMD  /code/run-app

FROM extras:${CODE_VERSION}
CMD  /code/run-extras
```

RethinkDB dockerfile:

```dockerfile
#
# RethinkDB Dockerfile
#
# https://github.com/dockerfile/rethinkdb
#

# Pull base image.
FROM dockerfile/ubuntu

# Install RethinkDB.
RUN \
  echo "deb http://download.rethinkdb.com/apt `lsb_release -cs` main" > /etc/apt/sources.list.d/rethinkdb.list && \
  wget -O- http://download.rethinkdb.com/apt/pubkey.gpg | apt-key add - && \
  apt-get update && \
  apt-get install -y rethinkdb python-pip && \
  rm -rf /var/lib/apt/lists/*

# Install python driver for rethinkdb
RUN pip install rethinkdb

# Define mountable directories.
VOLUME ["/data"]

# Define working directory.
WORKDIR /data

# Define default command.
CMD ["rethinkdb", "--bind", "all"]

# Expose ports.
#   - 8080: web UI
#   - 28015: process
#   - 29015: cluster
EXPOSE 8080
EXPOSE 28015
EXPOSE 29015
```

USER dockerfile:

```dockerfile
FROM oracle

USER root

RUN echo 'export ORACLE_SID=XE' >> /etc/bash.bashrc

USER oracle

RUN sqplus @my_schema.sql
```

STOPSIGNAL dockerfile:

```dockerfile
FROM busybox
CMD sleep 3600
STOPSIGNAL SIGKILL
```

HEALTHCHECK dockerfile:

```dockerfile
FROM alpine:3.3

MAINTAINER tomwillfixit

RUN apk update && apk add curl && rm -rf /var/cache/apk/*

COPY helloworld.bin /

EXPOSE 80

HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
      CMD curl -f http://localhost:80 || exit 1

ENTRYPOINT ["/helloworld.bin"]
```

SHELL dockerfile:

```dockerfile
FROM microsoft/windowsservercore

# Executed as cmd /S /C echo default
RUN echo default

# Executed as cmd /S /C powershell -command Write-Host default
RUN powershell -command Write-Host default

# Executed as powershell -command Write-Host hello
SHELL ["powershell", "-command"]
RUN Write-Host hello

# Executed as cmd /S /C echo hello
SHELL ["cmd", "/S"", "/C"]
RUN echo hello
```

## Bread Crumb Navigation
_________________________

Previous | Next
:------- | ---:
← [Docker Basics](../docker-basics/README.md) | [Volumes](../volumes/README.md) →


text:
---
description: laying out the ongoing development of Second Civilization high-level structure
---

# cC devmap

## intro

This is the initial iteration 00.00 mapping the current development of Second Civilization high-level structure. Once the structure have been given a first outfolding, this version 00.00 will be reiterated into version 00.01 by the creation of a new gitbook variant. Once the development have reached a stage where these materials start making out some level of public documentation, the idea is to raise the version number to 01.00. This idea on versioning may though come to change at any instance along the way.

`DEVNOTE: on this work, the Second Civilization is abreviated`**`cC`** `( maybe think of it as the civilized Civilization =)`

{% hint style="warning" %}
BEWARE: Second Civilization is still in the earliest stages of development, **expect changes** to occur without notice thereof
{% endhint %}

right here `(00.00)`and now `(2020.08)`we work on figuring out how to adapt the [second civilization](https://opencollective.com/secondcivilization) original structure to include a best fit also against the [Open Collective platform](https://opencollective.com/) while at the very same exploring how _**gitbook**_ could fit in with our undertaking to inspire the rise of highly participatory _real world systems_ development

the objective right now is to create a first overall structure that works smoothly with using the _**open collective platform**  \(and gitbook\)_ to enable, support and guide the **Second Civilization** mission to provide openly accessible implements for participatory human and world development.

{% embed url="http://secondcivilization.world/stand" %}

{% embed url="https://opencollective.com/secondcivilization" %}

{% hint style="info" %}
NOTE: this gitbook itself makes out part of the effort to integrate smoothly with the [open collective](https://opencollective.com/) platform \(there´s gitbook [alternatives](https://alternativeto.net/software/gitbook/), but right now gitbook is the preferred choice partly because it´s also what [**docs.**opencollective](https://docs.opencollective.com/help/) uses\)
{% endhint %}

{% embed url="https://honestyroom.gitbook.io/second-civilization/" caption="" %}

## devmap 00.00

### exploring extended systems potential

the following is a work in progress that may come to change several times, though right now the aim is to:  both **preserve** the Second Civilization original structure while **adapting** it ****to the _**open collective platform**_  \(and gitbook\) to make it cognitively easy for people to across the board work with items and descriptions intrinsic to different platforms, frameworks, systems and their constituting structures

> currently this seems promisingly feasible due the fortunate fit between Second Civilization structural systems models and the open collective terminology on participants and entities \(even the visual language appear rest on a similar basis=\)

### experimenting with global development spaces

testing new platforms is a great opportunity for seeking out new avenues of own development, whereas here such an first avenue is to explore the possibility-space of employing the open collective platform as a means for the provision of real world systems spaces to cooperative multi-stakeholder partnerships

_these spaces may or may not come to reflect and maybe even make out a primary representation for ongoing work on: **global theory, problem-space, conflict-space, possibility-space and opportunity-space**_

{% tabs %}
{% tab title="global theory" %}
the circumstances of a planet-wide human civilization differ from all previous civilizations, making us having to seek out new working approaches on human and world development better suited for today's evermore inter-linked, inter-connected, interdependent human age

if never before then by now we should have realized we can not make us independent the planet, the nature nor one another, but instead  learn to accept and even take advantage from embracing sincere mentalities, attitudes and structures for coexistence among ourselves as human beings as well as with the very planet, all living and life itself.

in this both inescapable and highly beneficial planet-wide circumstance of coexistence, it is here considered that the future of human civilization will grow increasingly dependent on human agreement in all its forms and to every extent.

#### the weakest link

in a world of present time levels of abstraction and complexity, **the weakest link** is never again any one individual human being but instead elements, aspects and phenomenons in the complex bodywhole of abstractions.
{% endtab %}

{% tab title="problem-space" %}
`DEV: not happy with this focal`

FUNDAMENTALS 00.00

There is no final end to the amount of ways we could look at problems as well as define, explain, understand and deal with problems. It can begin already with questions such as _what_ is a problem, what does the _word_ "problem" stand for  and how to possibly find and agree on a _definition_ that covers it all, and for everyone

Such is the nature of problems that there can be no end to the problems about problems, which also makes problems useable as means against attempts to solve or dissolve them

defining the problem in ways that make it optimally possible to either solve it or else dissolve it \(straight on make the problem disappear\)
{% endtab %}

{% tab title="conflict-space" %}
awaiting notes
{% endtab %}

{% tab title="possibility-space" %}
awaiting notes
{% endtab %}

{% tab title="opportunity-space" %}
awaiting notes
{% endtab %}
{% endtabs %}

### factors with decisive effect on the future of humanity

{% tabs %}
{% tab title="countries" %}
#### countries and the future of formal world systems
{% endtab %}

{% tab title="nations" %}
#### nations and the human future of human civilization
{% endtab %}

{% tab title="institutions" %}
#### institutions and the human future
{% endtab %}

{% tab title="organizations" %}
#### the uncertain future of human organization
{% endtab %}

{% tab title="networks" %}
#### the future of human connectivity
{% endtab %}

{% tab title="businesses" %}
#### fitness of organized human efforts / future of human bisynesse
{% endtab %}

{% tab title="systems" %}
awaiting notes
{% endtab %}

{% tab title="humans" %}
What would we answer if we would ask ourselves whether or not we shall seek out a way to really **get to the bottom of things**,

- so that we can have something truly lasting upon what to keep on improving on our doings and ways forward towards better times and places for us all.
{% endtab %}
{% endtabs %}

### core systems overview

part representing the original ecosystem by the Second Civilization labs and part, enabling creation, forking and expansion into other new or existing ecosystem structures that take yet one more crosscut focal on participatory human and world development

{% tabs %}
{% tab title="developer framework" %}
_**the second civilization labs** seek to provide an actionable, participatory and collaborative developer framework in form of ecosystems that allow, enable and serve multi-stakeholder partnerships with transparent access to challenges and opportunities of decisive conseguenze to our planet-wide human civilization_

      structural labs
      social labs
      permanence

econance

deep impact

Renewable

Industries

Futurefit

Technologies

electrified

network

futurefit

network

The Human

Value Chain .com

The Human

Value Chain .org

the ethos

operative system

The Human

Agreement

{% endtab %}

{% tab title="the second theory" %}
awaiting description
\(hint; you decide\)
{% endtab %}

{% tab title="relations platform" %}
the relations platform provides a modern time ontological foundation for everyone´s _own, shared, mutual development of ways of relating to worldviews, perceptions of reality and views on human being_

The key to a 21st century real world ontology lies in the ability to make distinction between the imagined and the actual. Even though it can sound trivial at first, one may quite soon come to experience that in reality it is not always straightforward simple to tell apart _the imagined_ from **the actual.**

{% code title="devnote:  EVENTUAL SAMPLES ON POSSIBLY ALARMING DEVELOPMENTS" %}
```text
so called "armed conflict between countries" or "war"
increasing levels of abstraction (sciences, world systems)
more abstraction, more levels, more links = more complexity
global identity crisis
"data is the new oil"
adaptive data analytics (e.g. algorithms, "AI")
global automation
from concentraion of power to loss/concentration of agency
```
{% endcode %}

introducing the next chapter in human and world development; _**human & world relations**_
{% endtab %}
{% endtabs %}

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
functionality testing \(to be removed\)

## automagic header links =\)

![SVG support =\)](http://www.gwoptics.org/research/et/layout/ET_layout_02.svg)

{% tabs %}
{% tab title="images" %}
images inside tabs

![](.gitbook/assets/icon-theory.svg)
{% endtab %}

{% tab title="texts" %}
{% code title="thetelescope.txt" %}
```text
ever wondered about the Einstein telescope?
- well here it is
#thetelescope
https://honestyroom.gitbook.io/second-civilization#auto-links
```
{% endcode %}
{% endtab %}
{% endtabs %}

![javascript embedded into svg - NOT SUPPORTED \(null surprise=\)](http://sozi.wdfiles.com/local--files/presentations/AFM-sozi3.svg)


text:
# Introduction
[![Code Standard](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://standardjs.com/)
[![Experimental Mode](https://img.shields.io/badge/experimental-off-brightgreen.svg)](https://en.help.roblox.com/hc/en-us/articles/115003766763-Experimental-Mode)
[![Current Libraries](https://img.shields.io/badge/libraries-0-red.svg)](http://localhost)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/WelpNathan/Waterbottle/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/badges/shields.svg)](https://github.com/WelpNathan/Waterbottle/issues)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FWelpNathan%2FWaterbottleServer.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FWelpNathan%2FWaterbottleServer?ref=badge_shield)

The Roblox HttpService unlocks so many potentials within your game or/and group. The newly created [``HttpService:RequestAsync()``](http://robloxdev.com/api-reference/function/HttpService/RequestAsync) function added in Version [0.343](https://anaminus.github.io/api/diff.html#v0.343) has made this project the most secure Roblox http server you can currently find as it allows authentication headers and so much more.

## How does it work?
The Roblox library [``Waterbottle``](https://github.com/WelpNathan/Waterbottle) contains API methods using secure functions to connect to the Waterbottle Server. Using this, it creates a powerful tool for group promotions, shouts and so much more. This project utilises high security methods using features such as [Helmet](https://www.npmjs.com/package/helmet) but a simple setup to make your life a lot easier when developing on the platform.

## Getting started
Installation instructions

## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FWelpNathan%2FWaterbottleServer.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FWelpNathan%2FWaterbottleServer?ref=badge_large)

repository: fossabot/WaterbottleServer

repo_name: fossabot/WaterbottleServer


text:
<<<<<<< HEAD

=======

>>>>>>> 31c21228683fdfb2cc16a4bbb94f1680070773a9

  Huffman Encoding Compressor

A text file compressor based on the histogramic Huffman encoding

Overview •
Nuances •
  How To Use •
  Download •
  Credits •
  License

## Overview

The purpose of this program is to reduce the space required to store/transfer a text file without any loss of data.

The strategy is to reduce the typical space required for each character of the text (8 bits/character). This is done by calculating the frequencies of each character, then creating a Huffman Binary Tree, allowing us to allocate each character with a unique prefix code, with more frequent characters using the least bits.

We are able to store more frequent characters using significantly less than the typical 8 bits by storing the character as the unique prefix code. Thus the compressed file is saved as an encoding table (original file characteristics including the frequency of each character) and a stream of prefix codes corresponding to the original order of characters.

For uncompressing the file, the Huffman Binary Tree is recreated from the character frequencies and the process is reversed to give us the original document.

## Nuances

Customized:

- Command line arguments.
- Uncompressed filename.
- Encoding table write/read:
  - The first four bytes are the length of the input file
  - The next byte is the number of different characters in the file, which is 76 for Hamlet.txt
  - The next 380 bytes are the frequency table, where each of the 76 characters uses five bytes

## Sample

The file used to test the program is Hamlet.txt, which can be found in the test folder of the repository.

> The original file is 196848 bytes.
>
> The compressed file, Hamlet.txt.huf, was 111024 bytes.
>
> The uncompressed file, Hamlet2.txt, was 196848 bytes. This is the same
> as the original file.

This is a **46.3%** reduction in filesize.

## How To Use

Requires installation of [Java](https://java.com/en/download/help/download_options.xml). To compile and run this application from your command line:

```bash
# To compile program.
$ javac HCompressor.java
```

```bash
# To compress text file to filename.txt.huf
$ java HCompressor -h filename.txt
```

```bash
# To uncompress the filename.txt.huf file to filename2.txt
$ java HCompressor -i filename.txt.huf
```

## Download

You can [download](https://github.com//wajeehanwar/Huffman-Encoding-Text-Compressor) here.

## Credits

This software was developed using the following:

- Java

## License

MIT

---

> GitHub [@wajeehanwar](https://github.com/wajeehanwar)

repository: wajeehanwar/Huffman-Encoding-Compressor

repo_name: wajeehanwar/Huffman-Encoding-Compressor


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

### Description

Unspecified vulnerability in the Oracle Customer Interaction History component in Oracle E-Business Suite 12.1.1, 12.1.2, 12.1.3, 12.2.3, 12.2.4, and 12.2.5 allows remote attackers to affect confidentiality and integrity via vectors related to User GUI, a different vulnerability than CVE-2016-0527, CVE-2016-0528, and CVE-2016-0529.

### POC

#### Reference
- http://www.oracle.com/technetwork/topics/security/cpujan2016-2367955.html

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

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
Vendor: IBM
===========
Product: Guardium
-----------------

### Use Cases

_The following Use Cases can be operationalized using log data from this data source_

### Event Types

_The following list of Event Types can be generated by Data Source Guardium_IBM, and power the use cases above:_

- database-access

### Parsers

_The following Parsers can be operationalized using log data from this data source_

* [s-db-access](../Parsers/parserContent_s-db-access.md)
* [s-guardium-db-access](../Parsers/parserContent_s-guardium-db-access.md)

repository: gt-kabir/Content-Doc

repo_name: gt-kabir/Content-Doc


text:
# openshift-yolo

OpenShift CronJob to check if updates are available, and if so, upgrade the
cluster to the latest version.

By default it is scheduled every hour at 53 minutes, but you can break your
cluster whenever you want :)

```bash
oc apply -f https://raw.githubusercontent.com/e-minguez/openshift-yolo/main/yolo.yaml
```

repository: e-minguez/openshift-yolo

repo_name: e-minguez/openshift-yolo


text:
# Interactive Map using D3

Aim - Create an interactive performane oriented map in D3.JS and React-Typescript.

## Setup

- `yarn` to install dependencies
- `yarn dev` to start project
- checkout `package.json` for more commands


text:
---
layout: post
title: The beauty of Unix
---

The Unix Way is powerful. After some time adhering to its philosophy you
may be surprised by how much it can do for you. Things you build
or use can be assembled in new intricate ways in which the authors
never expected.

Last week I was in need to convert a curl data from the browser to a PHP
array, so I could use it to debug Compufácil at phpunit.

Look at the size of such a request, equivalent to that one I needed:

```
myRequest="curl
'http://app.compufacil.dev/rpc/v1/inventory.post-purchase.json'
-H 'Host: homolog.compufacil.com.br' -H 'User-Agent: Mozilla/5.0
(X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0' -H
'Accept: application/json, text/plain, */*' -H 'Accept-Language:
pt_BR' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type:
application/x-www-form-urlencoded' -H 'Authorization-Compufacil:
apiCode' -H 'Referer:
http://homolog.compufacil.com.br/app/' -H 'Cookie:
_ga=GA1.3.427769913.1455651539; _gat=1; language=pt_BR;
sessionId=eb8d7e2d5bd7450ce585e1509cc64e1c6140b999;subscription_status=2
00; isAdmin=true' --data
'shippingInfo%5Baddress%5D=&shippingInfo%5Bphone%5D=&shippingInfo%5Bemai
l%5D%5Baddress%5D=gandalf%40a.com&shippingInfo%5Bemail%5D%5Btype%5D=2&sh
ippingInfo%5Bemail%5D%5Bid%5D=282&shippingInfo%5BcontactPerson%5D=&produ
ctOfTradeCollection%5B0%5D%5Bprice%5D=110.01&productOfTradeCollection%5B
0%5D%5Bquantity%5D=1&productOfTradeCollection%5B0%5D%5Bproduct%5D%5Bid%5
D=2444&eletronicInvoiceSerie=1&discount=0&freightPrice=0&extraValue=0&ca
tegory%5Bid%5D=1184&paymentMode%5Bid%5D=1445&paymentMode%5Brange%5D%5B0%
5D%5Bvalue%5D=27.51&paymentMode%5Brange%5D%5B0%5D%5Bdate%5D=2016-03-12&
paymentMode%5Brange%5D%5B1%5D%5Bvalue%5D=27.5&paymentMode%5Brange%5D%5B1
%5D%5Bdate%5D=2016-04-12&paymentMode%5Brange%5D%5B2%5D%5Bvalue%5D=27.5&p
aymentMode%5Brange%5D%5B2%5D%5Bdate%5D=2016-05-12&paymentMode%5Brange%5D
%5B3%5D%5Bvalue%5D=27.5&paymentMode%5Brange%5D%5B3%5D%5Bdate%5D=2016-06-
12&account%5Bid%5D=621&buyer%5Bid%5D=1046&eletronicInvoiceModel=32&eletr
onicInvoiceNumber=1231&flowGroup%5Bid%5D=57&observation=My%20staff&disco
untIsPercentage=false'"array
```

As you probably noticed, i saved it's value in an varible ($myRequest)
so i don't have to repeat myself with it along the post. Any way, I'll
show you here, step by step how I turned it into a PHP array.

First I needed only the data, so I have to extract if from the rest:

```
echo $myRequest | rev | cut -d" " -f1 | rev
shippingInfo%5Baddress%5D=&shippingInfo%5Bphone%5D=&shippingInfo%5Bemail
%5D%5Baddress%5D=gandalf%40a.com&shippingInfo%5Bemail%5D%5Btype%5D=2&shi
ppingInfo%5Bemail%5D%5Bid%5D=282&shippingInfo%5BcontactPerson%5D=&produc
tOfTradeCollection%5B0%5D%5Bprice%5D=110.01&productOfTradeCollection%5B0
%5D%5Bquantity%5D=1&productOfTradeCollection%5B0%5D%5Bproduct%5D%5Bid%5D
=2444&eletronicInvoiceSerie=1&discount=0&freightPrice=0&extraValue=0&cat
egory%5Bid%5D=1184&paymentMode%5Bid%5D=1445&paymentMode%5Brange%5D%5B0%5
D%5Bvalue%5D=27.51&paymentMode%5Brange%5D%5B0%5D%5Bdate%5D=2016-03-12&pa
ymentMode%5Brange%5D%5B1%5D%5Bvalue%5D=27.5&paymentMode%5Brange%5D%5B1%5
D%5Bdate%5D=2016-04-12&paymentMode%5Brange%5D%5B2%5D%5Bvalue%5D=27.5&pay
mentMode%5Brange%5D%5B2%5D%5Bdate%5D=2016-05-12&paymentMode%5Brange%5D%5
B3%5D%5Bvalue%5D=27.5&paymentMode%5Brange%5D%5B3%5D%5Bdate%5D=2016-06-12
&account%5Bid%5D=621&buyer%5Bid%5D=1046&eletronicInvoiceModel=32&eletron
icInvoiceNumber=1231&flowGroup%5Bid%5D=57&observation=My%20staff&discoun
tIsPercentage=false
```

Reverting the string and splitting it by the space getting the first occurrence, after that reverting back did the trick for me.

Now with the content in hand the next challenge is to decode it to get the natural form of the data.

I know that PHP has a funciton to do that, so I wrote a small PHP script to do that for me.

```
# !/usr/bin/env php
# file url-decode
<?php

$data = $argv[1] ?? null;
if (empty($data)) {
    $data = fgets(STDIN);
}

$data = rawurldecode($data);
echo $data;

```

This small script simply get the data from an argument or from stdin and decode it.

So this is our point now:

```
echo $myRequest | rev | cut -d" " -f1 | rev | url-decode
shippingInfo[address]=&shippingInfo[phone]=&shippingInfo[email][address]
<EMAIL_ADDRESS>hippingInfo[contactPerson]=&productOfTradeCollection[0][price]=110.01&pr
oductOfTradeCollection[0][quantity]=1&productOfTradeCollection[0][produc
t][id]=2444&eletronicInvoiceSerie=1&discount=0&freightPrice=0&extraValue
=0&category[id]=1184&paymentMode[id]=1445&paymentMode[range][0][value]=2
7.51&paymentMode[range][0][date]=2016-03-12&paymentMode[range][1][value]
=27.5&paymentMode[range][1][date]=2016-04-12&paymentMode[range][2][value
]=27.5&paymentMode[range][2][date]=2016-05-12&paymentMode[range][3][valu
e]=27.5&paymentMode[range][3][date]=2016-06-12&account[id]=621&buyer[id]
=1046&eletronicInvoiceModel=32&eletronicInvoiceNumber=1231&flowGroup[id]
=57&observation=My staff&discountIsPercentage=false
```

From here I had to convert this data in an PHP array. But it happend
that I already did something similar before. Once I wrote a script to
convert JSON's to PHP arrays, so I thought I might use it, but for doing
so I would need this data as JSON.

Luckly, it happens that I already wrote another tool to convert form-data to
JSON as well.

So here is the script to convert form-data to JSON:

```
# !/usr/bin/env php
# file url-to-json
<?php

$result = [];

$data = $argv[1] ?? null;
if (empty($data)) {
    $data = fgets(STDIN);
}

parse_str($data, $result);
echo json_encode($result, true);

```

And after its usage the data is the following:

```
$echo $myRequest | rev | cut -d" " -f1 | rev | url-decode | url-to-json
{"shippingInfo":{"address":"","phone":"","email":{"address":"gandalf@a.
com","type":"2","id":"282"},"contactPerson":""},"productOfTradeCollecti
on":[{"price":"110.01","quantity":"1","product":{"id":"2444"}}],"eletro
nicInvoiceSerie":"1","discount":"0","freightPrice":"0","extraValue":"0"
,"category":{"id":"1184"},"paymentMode":{"id":"1445","range":[{"value":
"27.51","date":"2016-03-12"},{"value":"27.5","date":"2016-04-12"},{"val
ue":"27.5","date":"2016-05-12"},{"value":"27.5","date":"2016-06-12"}]},
"account":{"id":"621"},"buyer":{"id":"1046"},"eletronicInvoiceModel":"3
2","eletronicInvoiceNumber":"1231","flowGroup":{"id":"57"},"observation
":"My staff","discountIsPercentage":"false\n"}%
```

And finally the script to convert JSON to a PHP array:

```

# !/usr/bin/env php
# file export-php-from-json
<?php

$data = $argv[1] ?? null;
if (empty($data)) {
    $data = fgets(STDIN);
}

if (empty($data)) {
    echo "You must pass a valid JSON";
    exit(1);
}

$data = json_decode($data, true);

echo var_export($data);

```

Using it all together:

```
echo $myRequest | rev | cut -d" " -f1 | rev | url-decode | url-to-json | export-php-from-json
array (
  'shippingInfo' =>
  array (
    'address' => '',
    'phone' => '',
    'email' =>
    array (
      'address' =><EMAIL_ADDRESS>      'type' => '2',
      'id' => '282',
    ),
    'contactPerson' => '',
  ),
  'productOfTradeCollection' =>
  array (
    0 =>
    array (
      'price' => '110.01',
      'quantity' => '1',
      'product' =>
      array (
        'id' => '2444',
      ),
    ),
  ),
  'eletronicInvoiceSerie' => '1',
  'discount' => '0',
  'freightPrice' => '0',
  'extraValue' => '0',
  'category' =>
  array (
    'id' => '1184',
  ),
  'paymentMode' =>
  array (
    'id' => '1445',
    'range' =>
    array (
      0 =>
      array (
        'value' => '27.51',
        'date' => '2016-03-12',
      ),
      1 =>
      array (
        'value' => '27.5',
        'date' => '2016-04-12',
      ),
      2 =>
      array (
        'value' => '27.5',
        'date' => '2016-05-12',
      ),
      3 =>
      array (
        'value' => '27.5',
        'date' => '2016-06-12',
      ),
    ),
  ),
  'account' =>
  array (
    'id' => '621',
  ),
  'buyer' =>
  array (
    'id' => '1046',
  ),
  'eletronicInvoiceModel' => '32',
  'eletronicInvoiceNumber' => '1231',
  'flowGroup' =>
  array (
    'id' => '57',
  ),
  'observation' => 'My staff',
  'discountIsPercentage' => 'false
',
)%
```

To get even easier whe might write an alias for it:

```
alias curl-to-array=' rev | cut -d" " -f1 | rev | url-decode |
url-to-json | export-php-from-json'
```

Now you only need ``echo $myRequest | curl-to-array`` to turn any
curl request in a PHP array format.

So this is it. I wrote a generic tool to convert requests exported by
the browser into PHP format by writing a simple script, some shell
commands and two other simple scripts I wrote in another time for other
purposes. And this is the beuty I mean, as the time goes on you find new
purposes to old simple tools adehring to the Unix principles of wrinting
little programs where which one do only one thing well, assembling them
in new ways.

repository: jeanCarloMachado/blog

repo_name: jeanCarloMachado/blog


text:
---
layout: post
title: "You don't need a hypothesis"
date: "2019-05-16"
categories: ["Web strategy"]
---

There, I said it. A/B test hypotheses, as they're commonly written, are wasted keystrokes that don't do enough to ensure your test results will be valid or that your analysis will be accurate. Let's take a look at why, and what you can do about it

### What's wrong with A/B test hypotheses

I've seen hundreds of hypotheses from agency CRO leads and in-house optimization team strategists. They all take this general form:

> If we change the CTA from Orange to Blue, it will increase conversions.

Let's give credit for what's done right here: you've stated what you're changing, and what you're measuring. That is a great start. But rephrasing "we're turning the button blue to see if we get more conversions" into a science-y sounding declarative statement isn't enough to ensure you're safe from bias, errors, or analysis paralysis.

### What's missing from A/B test hypotheses

The above hypothesis is light on details. How long do you plan to run the test, and how long _must_ you run it to get reliable results? Stating these conditions explicitly will protect your team from the [peeking problem](https://briandavidhall.com/the-peeking-problem/).

Intimately tied up with your test duration is the Minimum Detectable Effect. When we say "increase conversions," how much of an increase can we actually measure? Your test duration should be based on expected visitor count (along with the length of your business cycle), so you should be able to calculate the MDE in advance. Be sure to state it - if the MDE is 70%, you might have to be more ambitious than turning a button blue.

Finally, and most importantly, the above hypothesis says nothing about how we'll act on the results. This seems obvious and trivial in the excitement to launch a test, but it's a huge area of risk. I've seen teams spend thousands of dollars in person-hours to build, launch, and analyze a test ... and get a conclusive winner ... only to conclude "we can't put that into production because we don't feel like it's on brand, but these are interesting learnings."

### What you need

You need all of the above. How long will the test run, and how many visitors are we assuming it will get during that time? What's the baseline conversion rate, and how much of an effect will we be able to detect?

Given that information, how will we act on the results? Assuming an A/B/n test with 8 different button colors, there are three possible outcomes and ways that we will (hopefully) act on them:

- _One or more variation is a conclusive winner over the baseline._ So we'll put it into production - right? What if two or more are tied; how will we choose one?
- _All variations have significantly lower conversion rates compared to the baseline._ We'll note that design changes like button color are impactful on this element, possibly across the whole site. So we'll look for other impactful elements to optimize for design.
- _The results are inconclusive._ Assuming we tested a broad range of feasible options for the button color, we should write "Don't bother with button color" on the wall and move our focus elsewhere. Given there's no measurable impact on conversions, we're free to pick any color we like; how will we decide?

If you're writing hypotheses that include all this information, please forgive the clickbait title. I'd love to hear about how you cram all that info into a sentence or two, and whether there's anything I missed.

If your hypotheses are more along the lines of "the new hero image will increase conversions," try blocking off a half hour to work through some calculations prior to launch. Share them, and talk to your team about how you'll act on the results ... _before_ they come in.


text:
# Kubernetes Wordsmith Demo (Pivotal FR Edition)

Wordsmith is the demo project shown at DockerCon EU 2017, where Docker announced that support for Kubernetes was coming to the Docker platform.

The demo app runs across three containers:

- [db](db/Dockerfile) - a Postgres database which stores words

- [words](words/Dockerfile) - a Java REST API which serves words read from the database

- [web](web/Dockerfile) - a Go web application which calls the API and builds words into sentences:

![The Wordsmith app running in Kubernetes on Docker for Mac](img/pivotal-edition.png)

## Original Edition

If you want to deploy the original edition, replace in kube-deployment.yml:

```
image: docker.io/ecointet/k8s-wordsmith-db-pivotal
image: docker.io/ecointet/k8s-wordsmith-web-pivotal
```
with

```
image: dockersample/k8s-wordsmith-db
image: dockersample/k8s-wordsmith-web
```

> Or you can use the original manifest
> `https://github.com/dockersamples/k8s-wordsmith-demo/blob/master/kube-deployment.yml`

## Deploy Using a Kubernetes Manifest

Clone this repo :

```
git clone https://github.com/ecointet/k8s-wordsmith-demo
cd k8s-wordsmith-demo/
```

Apply the manifest using `kubectl`:

```
kubectl apply -f kube-deployment.yml
```

Check the external IP:

```
kubectl get services
```

Now browse to `http://IP-LOAD-BALANCER:8081`.

## The full story with Pivotal PKS
Before the previous commands, please login to PKS `kubectl`:

```
pks login -a <PKS API> -u <PKS USER> -p <PKS PASSWORD> -k
```
```
pks get-credentials <CLUSTER NAME>
```
```
kubectl cluster-info
```

##  Edit your own Words

If you want to set new words, you can edit `db/words.sql`:

```
cd db
docker build -t <YOUR-REPO>/<NEW-DOCKER-IMAGE> .
docker push <YOUR-REPO>/<NEW-DOCKER-IMAGE>
```
Then edit the file `kube-deployment.yml` to replace it with your container name.


text:
![](./logo.png)
# vizceral

![](./vizceral-example.png)

vizceral is a component for displaying traffic data on a webgl canvas. If a graph of nodes and edges with data about traffic volume is provided, it will render a traffic graph animating the connection volume between nodes.

This component can take multiple traffic graphs and will generate a 'global' graph showing all incoming traffic into each of the 'regions', with support for cross-region traffic.

There are three levels of information, global, regional, and service-level, with clicking or double-clicking on a node bringing you one level deeper.

## Using

See [the wiki](https://github.com/Netflix/vizceral/wiki) for full documentation.

## Developing Locally

To see your changes to `vizceral` locally, you'll need to link the package with bower:

    $ git clone https://github.com/Netflix/vizceral.git
    $ cd vizceral
    $ npm link
    $ npm run dev
    $ cd /path/to/project-using-vizceral
    $ npm link vizceral

## Contributing

1.  Clone this repo
2.  Create a branch: `git checkout -b your-feature`
3.  Make some changes
4.  Test your changes by [running your local version](#developing-locally)
5.  Push your branch and open a Pull Request

## Supported Browsers

Current development focuses on most recent version of Chrome. Minor sanity checking for the latest versions of Safari and Firefox.

## TODO

- Unit Tests
- Modular layout algorithms
  - Smarter current layout algorithm
- Cross-browser support / testing
- Create predefined locations and design styles to modularly represent custom metadata
- Implement redesigned third-level view

## License

Code released under [the Apache 2.0 license](./LICENSE).

repository: jimpick/vizceral-dat

repo_name: jimpick/vizceral-dat


text:
<img src="./utilities/spatialAudioLogo.svg" alt="High Fidelity Spatial Audio" width="375"/>

[![npm](https://img.shields.io/npm/v/hifi-spatial-audio?style=flat-square)](https://www.npmjs.com/package/hifi-spatial-audio)
[![npm](https://img.shields.io/npm/dm/hifi-spatial-audio?style=flat-square)](https://www.npmjs.com/package/hifi-spatial-audio)

[![GitHub Workflow Status (event)](https://img.shields.io/github/workflow/status/highfidelity/hifi-spatial-audio-js/Run-Jest-Unit-Tests?label=automated%20tests&style=flat-square)](https://github.com/highfidelity/hifi-spatial-audio-js/actions/workflows/run-unit-tests.yml)
[![GitHub issues](https://img.shields.io/github/issues/highfidelity/hifi-spatial-audio-js?style=flat-square)](https://github.com/highfidelity/hifi-spatial-audio-js/issues)

[![Discord](https://img.shields.io/discord/789545374837768242?label=discord&style=flat-square)](https://discord.gg/GrhxWPrp)
[![Twitter Follow](https://img.shields.io/twitter/follow/HighFidelityXR?style=flat-square)](https://twitter.com/HighFidelityXR)

The High Fidelity Spatial Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.

## Installation
### NodeJS
```
npm i hifi-spatial-audio
```

### Plain Web JavaScript
Import the latest version of the main library with:

```JavaScript
<script src="https://hifi-spatial-audio-api.s3-us-west-2.amazonaws.com/releases/latest/HighFidelityAudio-latest.js"></script>
```

## You'll Need a Developer Account
To use the Spatial Audio API, you'll need to sign up for a High Fidelity Developer Account. Sign up for free at [account.highfidelity.com](https://account.highfidelity.com).

## Documentation
API documentation is available at [docs.highfidelity.com](https://docs.highfidelity.com).

## Examples
You'll find a bunch of examples that make use of this API in the [Spatial-Audio-API-Examples GitHub Repository](https://github.com/highfidelity/Spatial-Audio-API-Examples).

## Walkthrough Guides
Walkthrough guides of sample applications written in plain Web JavaScript and written in NodeJS are available at [highfidelity.com/api/guides](https://highfidelity.com/api/guides).

## Release Notes
Release notes for the Spatial Audio Client Library are available on [the GitHub releases page](https://github.com/highfidelity/hifi-spatial-audio-js/releases).

-----

## Super QuickStart - Web JavaScript
Here's a super basic version of how to use the High Fidelity Spatial Audio Client Library in the Web JavaScript context:

```JavaScript
<script src="https://hifi-spatial-audio-api.s3-us-west-2.amazonaws.com/releases/latest/HighFidelityAudio-latest.js"></script>
<script>
    // Set up the initial data for our user.
    // They'll be standing at the origin, facing "forward".
    let initialHiFiAudioAPIData = new HighFidelityAudio.HiFiAudioAPIData({
        position: new HighFidelityAudio.Point3D({ "x": 0, "y": 0, "z": 0 }),
        orientation: new HighFidelityAudio.OrientationQuat3D({ "w": 1, "x": 0, "y": 0, "z": 0 })
    });

    // Set up our `HiFiCommunicator` object, supplying our media stream and initial user data.
    let hifiCommunicator = new HighFidelityAudio.HiFiCommunicator({
        initialHiFiAudioAPIData: initialHiFiAudioAPIData
    });
    // `audioMediaStream` is obtained from a separate `getUserMedia()` call.
    await hifiCommunicator.setInputAudioMediaStream(audioMediaStream);

    // Connect to the High Fidelity Audio Spatial API Server by supplying your own JWT here.
    // Follow this guide to get a JWT: https://www.highfidelity.com/api/guides/misc/getAJWT
    // If you don't need a guide, obtain JWT credentials after signing up for a developer account at https://account.highfidelity.com/dev/account
    const HIFI_AUDIO_JWT = "";
    try {
        await hifiCommunicator.connectToHiFiAudioAPIServer(HIFI_AUDIO_JWT);
    } catch (e) {
        console.error(`Error connecting to High Fidelity:\n${e}`);
        return;
    }
</script>
```

---

## Living on the Edge
If you'd like to use an experimental version of the Spatial Audio Client library built automatically from the tip of the `main` branch:

### NodeJS
```
npm i hifi-spatial-audio@main
```

### Plain Web JavaScript
Import the experimental version of the main library with:

```JavaScript
<script src="https://hifi-spatial-audio-api.s3-us-west-2.amazonaws.com/releases/main/HighFidelityAudio-latest.js"></script>
```

repository: bridie-hifi/hifi-spatial-audio-js

repo_name: bridie-hifi/hifi-spatial-audio-js