text:
---
title: Controller lifecycle
description: Basic features > Controller lifecycle and it's API
---

IMA.js **AbstractController** provides a few methods you can implement in order to catch various lifecycle events and react to them. Each method description has *@server* or *@client* notation next to them symbolizing where the method is executed.

![](/img/docs/diagram-controller.png)

## `init()` *@server/client*

This is the first method that gets called in the lifecycle chain. Init method is substitution for native `constructor()` method. Route parameters are already set when this method is called.

## `load()` *@server/client*

Callback the controller uses to load all resources it needs to render a view.

The method must return a plain flat object that will be used to set the state of the controller. The field names of the object identify the resources being fetched and prepared, each value must be either the resource (e.g. view configuration or a value retrieved synchronously) or a `Promise` that will resolve to the resource.

`Promise`s are handled differently when rendering on the server side or the client side.

- At the **server side**, the IMA will wait for all the promises to resolve, then replace the promises with the resolved values and sets the resulting object as the controller's state. Even though promises are resolved in parallel it's a good practice to keep their number on minimum because their resolution is blocking sending the response to the client.

- At the **client side**, the IMA.js will first set the controller's state to
an object containing only the fields of the returned object that were
**not promises**. IMA will then update the controller's state every time a
promise of the returned object resolves.

Any returned promise that gets **rejected** will redirect the application to
the error page. The error page that will be used depends on the status
code of the error.

Since **v17** you can use `async/await` instead of promises. This means the `load` method will have **async** prefix and resources will be loaded synchronously using **await** keyword.

```javascript
async load() {
  const user = await this._userService.getById(this.params.userId);
  const comments = await this._commentService.list({ userId: user.id });

  return {
    user,
    comments
  };
}
```

This functionality has its pros and cons. Main contradiction would be synchronous loading and thus response time increase. A lot of requests can happen independently on each other and save some of the response time. In this case it's better to combine promises and `async/await` to achieve best performance.

```javascript
async load() {
  const userPromise = this._userService.getById(this.params.userId); // load parallel to article and comments
  const article = await this._articleService.get(this.params.articleUrl);
  let comments = [];

  if (article.commentsCount && article.commentsAllowed) {
    comments = await this._commentService.list({ articleId: article.id });
  }

  return { article, comments, user: userPromise };
}
```

A benefit to using **async/await** is simplicity and better handling of data. Imagine you have a request that loads 2 resources and you want to add these resources to page state. When using promises this would be impossible as promises must return single value and we're returning the promise itself not the resolved value.

```javascript
async load() {
  const checkoutData = await this._checkoutService.getByCookie();
  const { items, payment, shipping } = checkoutData;

  return {
    cartItems: items,
    paymentDetails: payment,
    shippingDetail: shipping
  };
}
```

## `setMetaParams()` *@server/client*

Callback used to configure the meta attribute manager. The method is
called after the the controller's state has been patched with the all
loaded resources from the [`load()`](#load-serverclient) method and the view has been rendered.

`setMetaParams()` method receives following arguments:
- **loadedResources** - A plain object representing a map of resource names to resources loaded by the [`load()`](#load-serverclient) method. This is the same object as the one passed to the `setState()` method.
- **metaManager** - Meta attributes manager instance to configure (See [SEO & MetaManager](./seo-and-meta-manager) page).
- **router** - The current application router.
- **dictionary** - The current localization dictionary
- **settings** - The application settings for the current application environment.

## `activate()` *@client*

Callback for activating the controller when the **route updated** to one of those that are associated with the controller or the controller is **revived** at the client side.

This method is the last method invoked during controller initialization. `activate()` is called after all the promises returned from the [`load()`](#load-serverclient) method have been resolved and the controller has configured the meta manager.

When reviving the state from the **server side** all promises are resolved and meta values set, therefore the controller state is fully complete.

This method is a good place to register any React and DOM event listeners. The controller may start receiving event bus event after this method completes.

## `update()` *@client*

Callback for updating the controller after a route update. This method
is invoked if the current [route has the `onlyUpdate = true` flag set](./routing/introduction.md#onlyupdate) and the current controller and view match those used by the previously active route, or, the `onlyUpdate` option of the current route is a callback and returned `true`.

The method must return an object with the same semantics as the result
of the [`load()`](#load-serverclient) method. The controller's state will only be
patched by the returned object instead of replacing it completely.

The other controller lifecycle callbacks ([`init()`](#init--serverclient), [`load()`](#load-serverclient), [`activate()`](#activate--client), [`deactivate()`](#deactivate--client), [`destroy()`](#destroy--client)) are not call in case this method is used.

`update()` method receives argument **prevParams**; an object containing previous route parameters.

## `deactivate()` *@client*

Callback for deactivating the controller. This is the first
method invoked during controller deinitialization. This usually happens
when the user navigates to a different URL.

This method is the lifecycle counterpart of the [`activate()`](#activate--client) method. When the [`activate()`](#activate--client) method has not been called `deactivate()` won't be called either.

The controller should deregister listeners and release all
resources obtained in the [`activate()`](#activate--client) method.

## `destroy()` *@client*

Finalization callback, called when the controller is being discarded by the application. This usually happens when the user navigates to a different URL.

This method is the lifecycle counterpart of the [`init()`](#init--serverclient) method.

The controller should release all resources obtained in the [`init()`](#init--serverclient) method. The controller must release any resources that might not be released automatically when the controller's instance
is destroyed by the garbage collector.

repository: seznam/ima

gha_language: TypeScript

repo_name: seznam/ima


text:
---
layout: page
title: About me
subtitle: Why are you doing this to yourself?
---

My name is Jed Imasuen-Brodrick.

(If you need something, click [here](https://url.bio/jedbrodrick).)

![Fork-n-Go!](https://github.com/jlord/forkngo/blob/gh-pages/badges/lime.png?raw=true)

license: MIT

repository: jedbrodrick/old-website

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: jedbrodrick/old-website


text:
Floodgate is a hybrid mode plugin which allows for **Minecraft: Bedrock Accounts** to join **Minecraft: Java Edition** servers without needing a Minecraft: Java Edition account. This is something you install **in addition** to Geyser. Unlike Geyser, Floodgate can **only** be installed as a plugin on Spigot (including Paper and forks), Bungeecord, and Velocity, and can only be utilized on servers that have it installed.

[Download](https://ci.nukkitx.com/job/GeyserMC/job/Floodgate/job/development/)

## Setting Up
**NOTE: Floodgate does not replace the Geyser jar. If you are running a plugin version of Geyser, you still MUST have Geyser installed.**

*Any reference to Spigot here also refers to compatible server softwares such as Paper.*

### Plugin Setup (You have Geyser and Floodgate on the same server)

For multi-server setups: you only are required to install Floodgate on the BungeeCord or Velocity instance unless you want to use the Floodgate API on the other servers - see below for the installation process.

*If using Velocity*: Set `player-info-forwarding-mode` to `LEGACY` in `velocity.toml`

- Download the Floodgate plugin from [here](https://ci.nukkitx.com/job/GeyserMC/job/Floodgate/job/development/) and add it to your plugins folder.
- Change the `auth-type` in the Geyser config to `floodgate`.
- Restart/start up the server.

### Standalone Setup (Geyser and Floodgate are in separate places)

- Download the Floodgate plugin from [here](https://ci.nukkitx.com/job/GeyserMC/job/Floodgate/job/development/) and add it to your plugins folder.
- Run the server with Floodgate.
- *Copy* the `public-key.pem` file in the Floodgate config folder to the same directory as Geyser (standalone) or Geyser's config folder (plugin versions). **DO NOT DISTRIBUTE THIS KEY TO ANYBODY!** This key is what allows for Bedrock accounts to bypass the Java Edition authentication, and if anyone gets ahold of this, they can wreak havoc on your server.
- Change the `auth-type` in the Geyser config to `floodgate`.

### Running Floodgate on Spigot servers behind BungeeCord or Velocity

This is only needed when you want to use the Floodgate API on your Spigot server(s) behind a proxy.

- Download the Floodgate plugin from [here](https://ci.nukkitx.com/job/GeyserMC/job/Floodgate/job/development/) and install it as a plugin on both BungeeCord/Velocity and the Spigot server(s).
- Enable `ip_forwarding` in your BungeeCord `config.yml` if using BungeeCord
- Set `player-info-forwarding-mode` to `LEGACY` in `velocity.toml` if using Velocity
- Set `bungeecord` to `true` in your `spigot.yml`
- Start the proxy server.
- Edit the Floodgate config on your proxy server and set `send-floodgate-data` to `true`.
- *Copy* both key files in the Floodgate config folder to Spigot Floodgate's config folder. **DO NOT DISTRIBUTE THIS KEY TO ANYBODY!** This key is what allows for Bedrock accounts to bypass the Java Edition authentication, and if anyone gets ahold of this, they can wreak havoc on your server.
- Restart the Spigot servers and proxy server.

## Known Issues/Caveats

## Skins
Due to how Minecraft: Java Edition handles skins, all Bedrock players will appear as Steve or Alex to other Java players.

## Access token can not be null or empty
This may be because you forgot to set the auth-type in the config to `floodgate`. If that isn't it, check to make sure your config contains the line `floodgate-key-file: public-key.pem`. If not, just copy that in directly.

## Invalid packet id: 27
This usually means one of two things:

* You did not follow the Floodgate instructions properly. However, in an unlikely scenario, this could also be an error related to uploading through FTP. Using ascii will not work here, and you need to make sure you're on binary when uploading.
* You're trying to log in without an Xbox account. Floodgate requires an Xbox account to authenticate the Bedrock player.

## Whitelist command not working
See [this page](FAQ#how-do-i-add-players-to-the-whitelist-when-using-floodgate).

## Obtaining UUIDs for Floodgate players
Check the server log for their UUIDs, or use [this method](FAQ#how-do-i-find-a-players-uuid-without-them-joining-when-using-floodgate).

## Using PlaceholderAPI
If you're using the Bukkit version of Floodgate, download the Placeholder plugin [here](https://github.com/rtm516/FloodgatePlaceholders/). Using the placeholders shouldn't require additional setup other than having [PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/) installed. See the section above on installing Floodgate on backend servers if you wish to use this on BungeeCord.

## Using Skript
If you're using the Bukkit version of Floodgate, there is an unofficial plugin that adds Skript support [here](https://github.com/DoctorMacc/floodgate-skript).

repository: SinonGame/GeyserWikiTranslate

repo_name: SinonGame/GeyserWikiTranslate


text:
**Hyperbolic, Geometry Dash for the web.**

Including many features ranging but not limited to from Level feedback, collaboration system, and much more.

## Development
When developing or debugging the Hyperbolic codebase, a few prerequisites are required as following:
* An IDE that supports the C# language in automatic completion, and syntax highlighting; examples of such being [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) and above, or [JetBrains Rider](https://www.jetbrains.com/rider/).
* A MySQL Database.

## Contributions
All contributions are appreciated, as to improve the on it's performance, functionality and security. As this website isn't perfect, we would enjoy all additions to the code through bug fixing and ideas. Contributions should be done over an issue or a pull request, to give maintainers a chance to review changes to the codebase.

For new ideas and features, we would prefer for you to write an issue before trying to add it to show the maintainers.

## Seeking Help
If you need help with anything, you have two options:

### Create an issue
If you have something you would like to discuss in detail, or have an issue which you believe others will also have in deployment or development of the system, [opening an issue](https://github.com/gd-Pythagorean/Hyperbolic/issues) is the best way to get help. It creates a permanent resource for others wishing to contribute to the conversation. Please **make sure to search first** in case someone else has already addressed the same issue!

### Discord
Alternatively, you can join the [development discord](https://discord.gg/sgAQZpc) for assistance.

repository: gd-Pythagorean/Hyperbolic

repo_name: gd-Pythagorean/Hyperbolic


text:
# FastX9CXX

Arduino library for digital potentiometers X9C102, X9C103, X9C104 and X9C504

Provides a simple way to set the desired resistance step and get the estimated resistance.

Depends on Fast library for IO https://github.com/GitMoDu/Fast

gha_license_id: MIT


text:
---
hrs_structure:
  division: '1'
  volume: '5'
  title: '17'
  chapter: 291C
  section: 291C-171
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0291C-0171
    parent: HRS0291C
    name: 291C-171 Disposition of fines and forfeitures
weight: 48645
title: Disposition of fines and forfeitures
full_title: 291C-171 Disposition of fines and forfeitures
---
**§291C-171 Disposition of fines and forfeitures.** (a) All fines and forfeitures collected upon conviction or upon the forfeiture of bail of any person charged with a violation of any section or provision of the state traffic laws and all assessments collected relating to the commission of traffic infractions shall be paid to the director of finance of the State.

(b) In addition to any monetary assessment imposed for a traffic infraction, the court may impose penalties on all outstanding traffic citations and judgments. The penalties shall be established pursuant to rules approved by the supreme court; provided that the amounts of the penalties shall be based upon a graduated scale that increases in proportion to the length of the delinquency. Any interest penalty imposed as provided in this section may be waived by the court for good cause. All penalties collected for such outstanding citations and judgments shall be paid to the director of finance of the State. [L 1978, c 111, pt of §2; am L 1993, c 214, §17; am L 1997, c 154, §1]

Cross References

Adjudication of traffic infractions, see chapter 291D.

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
---
output: html_document
editor_options:
  chunk_output_type: console
---

# Probability and random variables {#probability}

### Probability vs estimation

Here are two quotes from *STFS* that encapsulate the distinction between probability and estimation:

> *In probability theory, we think about processes that generate data, and we ask "what can we say about the data generated by such a process?*

> *In statistical estimation and inference, we work in the opposite direction. We start with data, and we ask "what can we say about the process that generated these data?*

So, we can define probability as the *study of data generated by specified processes* - and that's the focus of this chapter. Later on, when we get to data - we'll be assuming probabilistic models - but we have to accept the fact that the data we observed were not likely to be generated by the assumed model! But we do the best we can.

### What is a probability?

Frequency view

  - the probability of a given event is simply the proportion of times it occurs over many trials
  - difficult to apply to statements like "*what is the probability that it will rain tomorrow*" and "*what is the probability that a meteor will hit the earth tomorrow*" (i.e., one-shot events)

Degrees-of-belief view

  - what is the degree of belief in the occurrence of an event that a rational person would have?

An aside: is the universe fundamentally probabilistic or deterministic?

### Set notation

A **set** ($\Omega$, in *STFS*) is an unordered collection of objects (*elements*).

**Intersection** ($\cap$) of two sets is the set of elements that appear in both sets.

**Union** ($\cup$) of two sets is the set that has every element that appears in *either* of the two original sets.

The **complement** of a set ($S^C$) includes all of the elements *not* in the original set but present in the **sample space** ($\Omega$) (which contains all possible elements). Subsets are referred to as *S*, and have the following properties:

$$
\begin{aligned}
S \cup S^C = \Omega  \\
S \cap S^C = \emptyset
\end{aligned}
$$

where $\emptyset$ is used to denote the empty set, or the set with no elements.

A Venn diagram is useful here:

![](images/venn_1.png)

The notation for the probability of an event is typically denoted using either $P()$ or $[]$:

$$
\begin{aligned}
P(event) = [event] \\
\end{aligned}
$$

## Kolmogorov's three axioms of probability

1. Probabilities of any event *i* ($E_i$) cannot be negative:

$$
\begin{aligned}
\ [E_i] \geq 0 \\
\end{aligned}
$$

2. The probability of the event that includes every outcome is 1:

$$
\begin{aligned}
\ [\Omega] = 1 \\
\end{aligned}
$$

3. The probability of observing either of two mutually exclusive events is the sum of their individual probabilities:

$$
\begin{aligned}
\text{If } E_1 \cap E_2 = \emptyset,  \\
\text{then } [E_1 \cup E_2] = [E_1] + [E_2]
\end{aligned}
$$

### Exercise set 4-1

1. Given P($A$), we would like to know P($A^C$). We already learned the following properties of complements:

$$
\begin{aligned}
A \cup A^C = \Omega  \\
A \cap A^C = \emptyset
\end{aligned}
$$
The intersection between $A$ and $A^C$ is zero, meaning they don't share any elements. The union of $A$ and $A^C$ is $[\Omega]$. We also learned the 2nd axiom of probability, $[\Omega] = 1$. Therefore:

$$
\begin{aligned}
\ [A] + [A^C] = 1 \\
\ [A^C] = 1 - [A]
\end{aligned}
$$

2. On paper.

3. Below I've pasted an image of my handwritten version of Edge's solution - I found it easier to think about once I visualized it using a Venn diagram.

![](images/edge_4_1_3.png)

## Conditional probability and independence

The law of conditional probability states that:

$$
\begin{aligned}
\ [A \mid B] = \frac{[A \cap B]}{[B]} \\
\end{aligned}
$$

If A and B are independent, then:

$$
\begin{aligned}
\ [A \mid B] = [A] \\
\end{aligned}
$$

### Exercise set 4-2

1. If we rearrange the law of probability, we get:

$$
\begin{aligned}
\ [A \mid B] [B] = [A \cap B] \\
\end{aligned}
$$

By definition, if A and B are independent, then we can replace $[A \mid B]$ with $[A]$ and get:

$$
\begin{aligned}
\ [A \cap B] = [A] [B] \\
\end{aligned}
$$

If we divide both sides by $[A]$, we get:

$$
\begin{aligned}
\ [B] = \frac{[A \cap B]}{[A]} \\
\end{aligned}
$$

The right-hand side of the above equation is, by the law of conditional probability, equal to $[B \mid A]$ and thus:

$$
\begin{aligned}
\ [B] = [B \mid A]\\
\end{aligned}
$$

2. Suppose you know $[A \mid B]$, $[A]$, and $[B]$. Calculate $[B \mid A]$.

$$
\begin{aligned}
\ [A \mid B] = \frac{[A \cap B]}{[B]} \\
\end{aligned}
$$

$$
\begin{aligned}
\ [A \mid B] [B] = [A \cap B] \\
\end{aligned}
$$

$$
\begin{aligned}
\ [B \mid A] = \frac{[A \cap B]}{[A]} \\
\end{aligned}
$$

$$
\begin{aligned}
\ [B \mid A] = \frac{[A \mid B] [B]}{[A]} \\
\end{aligned}
$$

## Bayes' Theorem

## Discrete random variables and distributions

**Random variable**: e.g., the process of rolling a die, $X$

  - $X$ is random, can take integer values 1-6
  - $X$ is not a number yet - it is the unrealized outcome of a random process
  - The realization of that process is an **instance** - which is a number
  - Capital $X$: random variable
  - Lower case $x$: instance

All the probability information is contained in its distribution.

In our case, $X$ is a **discrete** random variable, meaning that the number of outcomes is countable, in principle.

Two ways to represent the distribution:

  1. Probability mass function (pmf), $f_X(x) = P(X = x)$
  2. Cumulative distribution function (cdf), $F_X(x) = P(X \leq x)$

The cdf is a series of partial sums of the pmf,

$$
\begin{aligned}
F_X(x) = P(X \leq x) = \sum_{x_i \leq x} f_X(x_i)
\end{aligned}
$$
and increases monotonically in $x$.

### Exercise set 4-3

1. Flipping a fair coin 3 times. X is a random variable that represents the number of heads observed, and the sample space $\Omega$ contains the elements {0, 1, 2, 3}. Here are all of the ways we can observe these elements:

> x = 0: (T, T, T)
> x = 1: (H, T, T); (T, H, T); (T, T, H)
> x = 2: (H, H, T); (H, T, H); (T, H, H)
> x = 3: (H, H, H)

There are 8 possible instances. Thus, the probability mass function is:

$$
\begin{aligned}
f_X(0) =& f_X(3) = 1/8 \\
f_X(1) =& f_X(2) = 3/8 \\
f_X(x) =& 0 \text{ for all other } x \\
\end{aligned}
$$

2. If we sum $f_X(x_i)$ for all possible $x_i$, the sum would be 1 (1/8 + 1/8 + 3/8 + 3/8).

3. In terms of $F_X$, what is $P(a \lt X \le b)$, if $b \gt a$? Hint: notice that $a \lt X \le b$ if and only if $X \leq b$ and $X > a$.

Note that the cdf, $F_X$, for $x = a$ and $x = b$ are given by the following:

$$
\begin{aligned}
F_X(a) =& P(X \le a) \\
F_X(b) =& P(X \le b) \\
\end{aligned}
$$

We want the probability of observing a value $x$ between $a$ and $b$, so:

$$
\begin{aligned}
P(a \lt X \le b) = F_X(b) - F_X(a) \\
\end{aligned}
$$

## Continuous random variables and distributions

What about values that are not countable - anything with a decimal? Impossible to get a specific number, or instance (e.g., the probability a person weighs exactly 70kg), and thus we cannot use the pmf. But we can still use the cdf:

$$
\begin{aligned}
F_X(x) = P(X \leq x)
\end{aligned}
$$

That is, we can ask about the probability that a person will weigh 70kg or less, or whether a person will weigh between 70 and 71kg.

### Exercise set 4-4

1. $X$ is a random variable that takes values in the interval [0, 1], and the probability distribution is uniform. Draw the cumulative distribution function $F_X(x)$ for $x \in [-1, 2]$.

```r
x <- c(0,1)
Fx <- x
plot(x, Fx, type = "l", xlim = c(-1,2))
lines(c(-1, 0), c(0, 0))
lines(c(1,2), c(1, 1))
```

2. If $X$ were more likely to land in [0.4, 0.6] than in any other region of length 0.2, the line between 0.4 and 0.6 would be steeper.

```r
x1 <- c(0,0.4)
x2 <- c(0.4, 0.6)
x3 <- c(0.6, 1)
Fx1 <- c(0,0.3)
Fx2 <- c(0.3, 0.7)
Fx3 <- c(0.7, 1)
plot(x1, Fx1, type = "l", xlim = c(-1,2), ylim = c(0,1), xlab =
"x", ylab = "Fx")
lines(x2, Fx2)
lines(x3, Fx3)
lines(c(-1, 0), c(0, 0))
lines(c(1,2), c(1, 1))
```

## Probability density functions

**For a continuous random variable, the pdf is the derivative of the cdf**

Recall that the cdf for a discrete random variable is a series of partial sums, given by:

$$
\begin{aligned}
F_X(x) = P(X \leq x) = \sum_{x_i \leq x} f_X(x_i)
\end{aligned}
$$

In an analogous fashion, we can integrate a continuous function to get the cdf of a continous random variable. We define the probability density function $f_X$ (pdf) of a continuous random variable as:

$$
\begin{aligned}
F_X(x) =& \int_{- \infty}^{x} f_X(u) du \\
\end{aligned}
$$

Below I have re-created Fig 4-4, with a pdf in the upper panel and a cdf in the lower panel - for an *exponential* random variable with rate 1.

### Additional viz

We can visualize the principle of question 3 from Exercise Set 4-3 using the cdf of a standard normal distribution, where $a = -1$ and $b = 1$:

### Exercise set 4-5

1. If $f_X(x)$ is a probability density funcion, then total area under $f_X(x)$ is 1.
2. Yes, $f_x$ can be a probability density funcion, because the area under the function is 1. This situation is different from a probability mass function, because the y-axis values for a pdf can be > 1 (in this case, the maximum y is 10).

## Families of distributions

Two requirements for mass or density functions:

1. Must be non-negative

2. Sum of all values is 1 (mass), or area under curve is 1 (density)

Distribution family

  - similarly shaped distributions
  - summaries of their behavior can be computed from the same functions
  - but **parameter** values differ

### Exercise set 4-6

1. The probability mass function of the Poisson distribution is $P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}$. Plugging in the appropriate values for $k$ and $\lambda$ gives:

(i). $e^{-5}$
(ii). $5e^{-5}$
(iii). $\frac{25}{2}e^{-5}$

2. Use the probability mass function of the geometric distribution with parameter 1/2. If our first “heads” occurs on the 6th flip, then we have five tails before it. We plug $p$ = 1/2 and $k$ = 5 into $P(X = k) = (1-p)^kp$ to get 1/64.

3. Consider a Poisson distribution with parameter $\lambda$ = 5. If we want to know the value of the probability mass function for x = 2, $f_X(2)$, we use the `dpois()` function:

```r
dpois(2, lambda = 5)
```

```
## [1] 0.08422434
```

To get the value of the cumulative distribution function $F_X(2)$, we use `ppois()`:

```r
ppois(2, lambda = 5)
```

```
## [1] 0.124652
```

If we want to know the *inverse* of the cumulative distribution function. That is, we want to know the value of $q$ that solves the equation $F_X(q) = p$. What is the number $q$ such that the probability tha the random variable is less than or equal to $q$ is $p$; $q$ is the $pth$ percentile of the distribution. We can get this using `qpois()`:

```r
qpois(0.124652, lambda = 5)
```

```
## [1] 2
```

The inverse of the cdf is also called the quantile function. Using the standard normal distribution (mean = 0, sd = 1), plot the probability density function for x $\in$ [-3, 3].

```r
x <- seq(-3, 3, by = 0.1)
fx <- dnorm(x = x)
plot(x, fx, type = "l", main = "PDF", col = "red")
```

Plot the cdf for x $\in$ [-3, 3].

```r
x <- seq(-3, 3, by = 0.1)
fx <- pnorm(q = x)
plot(x, fx, type = "l", main = "CDF", col = "red")
```

What value of $x$ is at the 97.5th percentile of the standard normal?

```r
qnorm(p = 0.975)
```

```
## [1] 1.959964
```

4. Simulating from a normal distribution and from a uniform distribution:

```r
n <- 1000
x <- rnorm(n)
hist(x)
```

```r
x <- runif(n, min = 0, max = 1)
hist(x)
```

Now take those values between 0 and 1, and feed them into the `qnorm` function to get the values at which we see those quantiles:

```r
y <- qnorm(p = x, mean = 0, sd = 1)
hist(y)
```

These values are normally distributed around 0. This plot is saying that most of the probability (in fact ~95%) lies between -2 < y < 2 (2 standard deviations).

```r
r <- seq(-3, 3, length.out = 1000)
cdf <- pnorm(r)
#Draw the normal cumulative distribution function.
plot(r, cdf, type = "l", xaxs = "i", yaxs = "i", xlim = c(-3,
3), xlab = expression(italic(x)), ylab =
expression(paste(italic(F[X]), "(", italic(x), ")", sep = "")),
lwd = 2)
#Draw light grey lines representing random samples from the
#standard normal distribution.
x <- rnorm(100)
for(i in x){
  lines(c(i,i), c(min(x), pnorm(i)), col = rgb(190, 190, 190,
     alpha = 60, max = 255))
  lines(c(min(x)-1,i), c(pnorm(i), pnorm(i)), col = rgb(190,
     190, 190, alpha = 60, max = 255))
}
```

### Additional exercise

(Courtesy Blondin & Goodman)

Assume that destructive earthquakes occur in California every 20 years. You’d like to know how probable an earthquake is between now and some future date.

1. What distribution family describes the waiting time until California’s next earthquake? What value should we use for this distribution’s parameter? [Hint: convert 20 years to a rate]

Use the exponential distribution, where $\lambda = 1/20$:

$$
\begin{aligned}
f_X(x) = \lambda e ^{-\lambda x} \\
\end{aligned}
$$

2. What is the probability that an earthquake will happen in the next 10 years? [Hint: You need to find a cumulative distribution function for the distribution you chose, either online or by integration].

Rules for integrating "e raised to the x power":

$$
\begin{aligned}
\int e^xdx =& e^x + c \\
\int e^{ax}dx =& \frac{1}{a} e^{ax} + c \\
\int be^{ax}dx =& \frac{b}{a} e^{ax} + c \\
\end{aligned}
$$

With these rules in hand, we can get the cdf by integrating the pdf for the exponential distribution:

$$
\begin{aligned}
f_X(x) =& \lambda e ^{-\lambda x} \\
F_X(X = x) =& \int_{0}^{x} \lambda e^{-\lambda x} dx \\
=& \frac{1}{- \lambda} \lambda e^{-\lambda x} \bigg\rvert_{0}^{x} \\
=& -e^{-\lambda x} \rvert_{0}^{x} \\
=& -e^{-\lambda x} \rvert_{0}^{x} \\
=& -e^{-\lambda x} - (-e^{-\lambda 0}) \\
=& -e^{-\lambda x} - (-1) \\
=& 1 -e^{-\lambda x}  \\
\end{aligned}
$$

Then, plug in $x = 10$ and $\lambda = 1/20$:

```r
1 - exp(-(1/20) * (10))
```

```
## [1] 0.3934693
```

Check to make sure we've done this right using the `pexp` function in R:

```r
pexp(q = 10, rate = 1/20)
```

```
## [1] 0.3934693
```

3. What is the probability that an earthquake will occur between 10 and 20 years from now?

```r
pexp(q = 20, rate = 1/20) - pexp(q = 10, rate = 1/20)
```

```
## [1] 0.2386512
```

4. If you have time, write the CDF of your chosen distribution as an R function. It should take a value x and a parameter, and return a probability P(X ≤ x). Use your function to plot the cumulative distribution as a function of x.

```r
exp_cdf <- function(x, lambda) 1 - exp(-lambda * x)
x <- seq(0, 80, by = 0.1)
p <- exp_cdf(x = x, lambda = 1/20)
plot(p ~ x, type = "l", xlab = "x", ylab = "FX(x)")
```


text:
## Education

I am a **current PhD student at the University of Washington** in Seattle and an affiliate student of the Max Planck School of Demographic Research in Rostock, Germany.

I have a **MSc in Demography** from the London School of Hygiene and Tropical Medicine and **BS in Public Health** from the University of Colorado Denver.

Although my research background was previously focused on global health research, my current work is centered on the evolving healthcare access before and after the desegregation of American hosptials during the civil rights era. I use quantitative and demographic methods to understand how the social and political sphere affected healthcare access and health trajectories.

---

## PORTFOLIO

---

### Peer-Reviewed Publications

[Demographic and Fertility Characteristics of Contraceptive Clusters in Burundi](/sample_page)

---
[Project 2 Title](/pdf/sample_presentation.pdf)

---
[Project 3 Title](http://example.com/)

---

### Category Name 2

- [Project 1 Title](http://example.com/)
- [Project 2 Title](http://example.com/)
- [Project 3 Title](http://example.com/)
- [Project 4 Title](http://example.com/)
- [Project 5 Title](http://example.com/)

---

---

Page template forked from evanca


text:
# PHP Helpers: Command-line Input and Input Type Handlers

-   Version: v1.2.2
-   Date: Aug 06 2019
-   [Release notes](https://github.com/pointybeard/helpers-cli-input/blob/master/CHANGELOG.md)
-   [GitHub repository](https://github.com/pointybeard/helpers-cli-input)

Collection of classes for handling argv (and other) input when calling command-line scripts. Helps with parsing, collecting and validating arguments, options, and flags.

## Installation

This library is installed via [Composer](http://getcomposer.org/). To install, use `composer require pointybeard/helpers-cli-input` or add `"pointybeard/helpers-cli-input": "~1.2.0"` to your `composer.json` file.

And run composer to update your dependencies:

    $ curl -s http://getcomposer.org/installer | php
    $ php composer.phar update

### Requirements

This library makes use of the [PHP Helpers: Flag Functions](https://github.com/pointybeard/helpers-functions-flags) (`pointybeard/helpers-functions-flags`) and [PHP Helpers: Factory Foundation Classes](https://github.com/pointybeard/helpers-foundation-factory) packages. They are installed automatically via composer.

To include all the [PHP Helpers](https://github.com/pointybeard/helpers) packages on your project, use `composer require pointybeard/helpers` or add `"pointybeard/helpers": "~1.1"` to your composer file.

## Usage

Include this library in your PHP files with `use pointybeard\Helpers\Cli`. See example code in `example/example.php`. The example code can be run with the following command:

    php -f example/example.php -- -vvv -d example/example.json import

## Support

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/pointybeard/helpers-cli-input/issues),
or better yet, fork the library and submit a pull request.

## Contributing

We encourage you to contribute to this project. Please check out the [Contributing documentation](https://github.com/pointybeard/helpers-cli-input/blob/master/CONTRIBUTING.md) for guidelines about how to get involved.

## License

"PHP Helpers: Command-line Input and Input Type Handlers" is released under the [MIT License](http://www.opensource.org/licenses/MIT).

## Credits

*   Some inspiration taken from the [Symfony Console Component](https://github.com/symfony/console) (although no code has been used).

repository: pointybeard/helpers-cli-input

gha_language: PHP

gha_license_id: NOASSERTION

repo_name: pointybeard/helpers-cli-input


text:
# Overview
In this project a quantum based PCA algorithm is implemented.
The quantum modules are integrated into a classical computing environment as follows:

* Classical preprocessing to compute necessary unitary operations
* Quantum modules:
  * Swap test
  * Quantum Phase Estimation
* Classical preprocessing to compute the eigenvalues

## Open Tasks
During the project phase the program logic, how to transform classical data into quantum state could not be implemented.
Therefore, no "main" file to run the PCA algorithm exists yet.

The following tasks are open:
* Unitary operation for quantum state initialization
* Universal logic to compute qpe unitary operation (depends on initialized quantum state)

## Test Runner
The used example data sets can be found in src > tests > test_data_sets.py

To run all test cases the test runner can be called as follows:
```
python ./src/tests/test_runner.py
```

repository: hpi-sam/QuantumProgramming

branch_name: refs/heads/main

gha_language: Jupyter Notebook

repo_name: hpi-sam/QuantumProgramming


text:
Looking at MLB Draft through WAR
==========================

Project for 2015 Baseball Hack Day by Daigo Fujiwara, Chad Curll, and David Thrysson

Based on jekyll-foundation-5-starter
===========================

Start [a github pages](https://pages.github.com/) website powerd by [Jekyll](http://jekyllrb.com/docs/quickstart/) using [Foundation/SCSS](http://foundation.zurb.com/docs/sass.html) in under 5 minutes!

### What it is.

Ever wanted a simple but nice looking responsive website as your project page or page for your repo? Are you in [a hackathon](http://baseballhackday.com) needing to put up a working website in munites? I do. Here is what I do, and I am sharing for you to use it, free. Free as in free speach AND free beer.

You can see [the working example site here](http://daigofuji.github.io/jekyll-foundation-5-starter/)

### For User & Organization Pages
See [documentation](https://help.github.com/articles/user-organization-and-project-pages/)

1. Fork this repo to your user or project
2. From the `settings` rename the repo to `username.github.io` naming scheme.

### For Project Pages
See [documentation](https://help.github.com/articles/user-organization-and-project-pages/#project-pages)

1. Create a `gh-pages` branch, i.e. `git checkout -b gh-pages`
2. [Download the contents of this repo](https://github.com/daigofuji/jekyll-foundation-5-starter/archive/master.zip)
3. Replace the entire branch contents with unzipped stuff
4. Add, Commit then Publish the branch to github, i.e. `git push --set-upstream origin gh-pages`

### To edit contents:
1. edit `_config.yml`
2. edit html/md files (hint: `_layouts/default.html` is the base)
3. edit sass and run `grunt` (hint: Try [editing `scss/_stettings.scss`](http://foundation.zurb.com/docs/using-sass.html))
4. edit `_include/nav.html`

Use at your own resk, and follw licence restriction of each products used. Most are MIT (OK to use commercially).

### Useful command:

Run grunt to compile css from sass by simply run

`grunt`

from your terminal. It will launch watch. control-c to stop.

You need to have grunt installed. This blog post may be useful if you are like me and running Mac OS X.

To run jekyll locally, run

`bundle exec jekyll serve --watch`

Your website should be viewable by going to [localhost:4000](http://localhost:4000/)

If you want to make sure foundation is up to date, try

`foundation update`

(requires bower)

Github's doc on how to use Jekyll on Github Pages.

### Special Thanks

Special thanks to HTML 5 Boilerplate whose code I have based this on.

@kionoshp's padding-margin. Because it has become part of every site that I manage.

and Font Awesome for bing awesome.

repository: daigofuji/draft-war-visualization

repo_name: daigofuji/draft-war-visualization


text:
---
layout: post
title: How to download and interface with MinIO using Ansible
comments: true
show-avatar: false
tags: [aws, s3, minio, ansible]
---

In this post, we look at how we can interface with MinIO and download a file from it.

Ansible has the aws_s3 module which does exactly what we need and can be used to interface with minio.

Example to get a file from minio:
```yaml
- name: download from minio
  aws_s3:
    s3_url: "{% raw %}{{m_host}}{% endraw %}"
    bucket: "{% raw %}{{m_bucket}}{% endraw %}"
    object: "{% raw %}{{m_object}}{% endraw %}"
    dest: "{% raw %}{{m_dest}}{% endraw %}"
    mode: get
    aws_access_key: "{% raw %}{{m_access_key}}{% endraw %}"
    aws_secret_key: "{% raw %}{{m_secret_key}}{% endraw %}"
```

**Important:** you're minio url might be https and therefore require SSL,
however, if you don't want to have to supply a cert, set the validate_certs
attribute to: ```validate_certs: no```

**Top Tip #1:** if you specify a ***non-existent*** folder on the ```dest```
attribute, you will get a SSL error which is completely irrelevant to the
actual error!

**Top Tip #2** you should encrypt your secret and access keys. Use Ansible
Vault! [See this tutorial](/2020-03-04-how-to-encrypt-your-ansible-vars-with-ansible-vault)

Reagrds,

John


text:
Frisk By Casing
===============

Openscad drawings for a casing for the Frisk By Bergen air pollution sensors.

This will be a complete casing for the "Frisk By Bergen" project's sensors. It is designed primarily
to be used to cut a master mold with a CNC milling machine, but can be adapted to be printed
by a 3D printer. Currently the panels are in separate toplevel files, and there is no
full model of the box. That may be made later, but is not required to make the parts,
though it will be nice for giving an impression of how the box will look in the end.

The plan is to make negative silicone molds of the parts and cast plastic parts for the box.

The following files are toplevel files:

```
frontpanel.scad - The front side of the box, with logo

backpanel.scad  - The back side of the box

sidepannel.scad - The sides of the box (two needed)

top.scad        - The top and bottom of the box

lamellas.scad   - The lamellas to let in outside air to the sensors

mounts.scad     - Mounts to allow the box being fastened by a hook and loop fastener band.
```

Status
======

All parts of a potential box are made, but a model of the whole box is not.
Also, some way of fastenening the electronics, batteries and sensors on the inside
should is missing, but the design of the electronics is not finalized.

repository: gizle/friskbybox

repo_name: gizle/friskbybox


text:
## In-app content blocks

Exponea SDK allows you to display native In-app content blocks based on definitions set up on the Exponea web application.

In-app content block will be shown exactly where you'll place a StaticInAppContentBlockView / prepareInAppContentBlockView. You can get a placeholder view from API:

For tableView and collectionView
```swift
    Exponea.shared.inAppContentBlockManager.prepareInAppContentBlockView(placeholderId: String, indexPath: IndexPath) -> UIView
```

You need to implement method for heightForRow
```swift
    Exponea.shared.inAppContentBlockManager.getUsedInAppContentBlocks(placeholder: "placeholder", indexPath: indexPath)?.height
```

For correct behavior you need to use in VC callback from SDK:
Animation and reload is up to you. You can reload enitre tableView or collectionView. Reload is required

```swift
    Exponea.shared.inAppContentBlockManager.refreshCallback = { [weak self] indexPath in
        onMain {
            self?.tableView.reloadSections(IndexSet(integer: indexPath.section), with: .automatic)
        }
    }
```

For everywhere in UIView
```swift
    StaticInAppContentBlockView(placeholder: "placeholder")
```

For correct behavior you need to use .reload() method:
 - using .reload() is fully up to you. Use it when you need to reload its content.

```swift
    let placeholderView = StaticInAppContentBlockView(placeholder: "placeholder")
    placeholderView.reload()
```

In-app content blocks are shown within placeholder view by its ID automatically based on conditions setup on the Exponea backend. Once a message passes those filters, the SDK will try to present the message.

### If displaying In-app content blocks has delay

In-app content block is able to be shown only if it is fully loaded (content and height) and also its images are loaded too. In case that In-app content block is not yet fully loaded (including its images) then you may experience delayed showing.

If you need to show In-app content block as soon as possible (ideally instantly) you may set a auto-prefetch of placeholders. In-app content blocks for these placeholders are loaded immediately after SDK initialization.
For correct behavior you need to setup placeholders in config which should be downloaded:

```swift
    inAppContentBlocksPlaceholders
```

This has to be done (by specification, chapter 2. Pre-fetch on SDK init) on SDK init, anonymize and identifyCustomer. Not callable anytime.

### In-app content blocks caching
To reduce the number of API calls, SDK is caching the images displayed in messages. Therefore, once the SDK downloads the image, an image with the same URL may not be downloaded again, and will not change, since it was already cached. For this reason, we recommend always using different URLs for different images.

### In-app content blocks tracking

In-app content blocks are tracked automatically by SDK. You may see these `action` values in customers tracked events:

- 'show' - event is tracked if In-app content block has been shown to user
- 'action' - event is tracked if user clicked on action button inside In-app content block. Event contains 'text' and 'link' properties that you might be interested in
- 'close' - event is tracked if user clicked on close button inside In-app content block
- 'error' - event is tracked if showing of In-app content block has failed. Event contains 'error' property with meaningfull description

> The behaviour of In-app content block tracking may be affected by the tracking consent feature, which in enabled mode considers the requirement of explicit consent for tracking. Read more in [tracking consent documentation](./TRACKING_CONSENT.md).

repository: exponea/exponea-ios-sdk

branch_name: refs/heads/develop

gha_language: Swift

repo_name: exponea/exponea-ios-sdk


text:
# isotropy-lib-filesystem
Filesystem Library for the Isotropy Project

```javascript
import * from "isotropy-lib-filesystem"
```

```
1. getFiles(dir, recurse = false)
  returns a promise which returns
  an array
  [
    { dir: "/abc", filename: "hllo.txt", contents: "words a..."


text:
# liho-gradle-plugin

[![Build](https://github.com/arsysop/liho-gradle-plugin/workflows/Java%20CI/badge.svg)](https://github.com/arsysop/liho-gradle-plugin/actions?query=workflow%3A%22Java+CI%22)
[![Hits-of-Code](https://hitsofcode.com/github/arsysop/liho-gradle-plugin)](https://hitsofcode.com/view/github/arsysop/liho-gradle-plugin)

[![](https://img.shields.io/badge/License-Apache--2.0-brightgreen.svg)](https://github.com/arsysop/liho-gradle-plugin/blob/master/LICENSE)

[Standalone Plug-in](https://docs.gradle.org/current/userguide/custom_plugins.html#sec:custom_plugins_standalone_project)
for [Gradle](http://gradle.org), who's work is to employ
[LiHo](https://github.com/arsysop/liho) checker to verify
if a project source base is sufficiently equipped with license headers.

**Currently is under construction.**

#### to publish
```
./gradlew publish
```
It builds and stores publish-ready artifacts into _buildDir/local-repo_.

#### to apply
1. _apply_ the plugin in _plugins_ block of your `build.gradle`
    ```groovy
    plugins {
        id("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
    }
    ```
   As the plugin is published without [plugin marker](https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_markers),
   configure _resolution strategy_ in your `settings.gradle` script:
   ```groovy
    pluginManagement {
        repositories {
            jcenter()
        }
        resolutionStrategy {
            eachPlugin {
                if (requested.id.namespace == "ru.arsysop.liho" &&
                    requested.id.name == "liho-gradle-plugin"
                ) {
                    useModule("ru.arsysop.liho:liho-gradle-plugin:${requested.version}")
                }
            }
        }
    }
   ```
2. configure plugin extension in your `build.gradle`:
    ```groovy
    liho {
        root.set(project.file("src"))
        strict.set(true)
        report.set(project.file("$buildDir/liho/report.txt"))
    }
    ```
3. run `liho` task:
    ```
    ./gradlew liho
    ```
   It analyses all the supported types of sources and stores report
   into the configured _liho/report_ file

repository: arsysop/liho-gradle-plugin

gha_language: Groovy

repo_name: arsysop/liho-gradle-plugin


text:
prologame
=========

#Prolog game for our AI Project

##Game description:

##Board, piece and players:

##Game rule:
###Setup:

###Object

###Reference
http://www.di.fc.ul.pt/~jpn/gv/369.htm
http://boardgamegeek.com/boardgame/32597/369

repository: thovo/prologame

repo_name: thovo/prologame


text:
+++
title = "1. Setting Up AWS Cloud9"
weight = 1
+++

Now you are going to provision your AWS Cloud9 Integrated Development Environment.

**STEP 1** Go to [AWS Cloud9 Console](https://console.aws.amazon.com/cloud9/home).

![screenshot-1-1](/aws-cicd-cdk-workshop/images/content/screenshot-1-1.png)

**STEP 2** Click [**Create environment**](https://console.aws.amazon.com/cloud9/home/create)

**STEP 3** Put "CICD-CDK-Workshop" or any name you like in the **Name** field. You can leave the description empty. Click **Next step** to proceed.

![screenshot-1-2](/aws-cicd-cdk-workshop/images/content/screenshot-1-2.png)

**STEP 4** In the **Environment settings**, choose below configuration

1. "Create a new EC2 instance for environment (direct access)" in the **Environment type**
2. "t2.micro (1 GiB RAM + 1 vCPU)" in the **Instance type**
3. "Amazon Linux 2" in the **Platform**

Leave everything else as default.
Click **Next step** to proceed.

![screenshot-1-3](/aws-cicd-cdk-workshop/images/content/screenshot-1-3.png)

![screenshot-1-4](/aws-cicd-cdk-workshop/images/content/screenshot-1-4.png)

**STEP 5** In the step **Review**, make sure the configurations are correct. Click **Create environment** to proceed.

![screenshot-1-5](/aws-cicd-cdk-workshop/images/content/screenshot-1-5.png)

**STEP 6** Please wait for a couple of minutes while an instance of AWS Cloud9 is being set up.

![screenshot-1-6](/aws-cicd-cdk-workshop/images/content/screenshot-1-6.png)

**FINAL** Now the new AWS Cloud9 IDE is ready to use.

![screenshot-1-7](/aws-cicd-cdk-workshop/images/content/screenshot-1-7.png)

Click the orange arrow on the right hand side to continue to next step.

repository: petrabarus/aws-cicd-cdk-workshop

repo_name: petrabarus/aws-cicd-cdk-workshop


text:
# DotWebStack Framework

Publishing rich data services can become quite complex. The DotWebStack framework provides a set of standardized
building blocks to build rich data services with a minimal development effort. DotWebStack provides a lot of advantages
compared to other solutions:

- **Robust**: The framework is built upon proven open-source components, such
  as [Spring Boot](https://spring.io/projects/spring-boot), [GraphQL Java](https://www.graphql-java.com/)
  and [Project Reactor](https://projectreactor.io/). By relying on these building blocks, lots of robust enterprise
  features are available out-of-the-box or can be integrated easily.
- **Performant**: The framework fully embraces the reactive programming paradigm and relies heavily on Java's
  multi-threading capabilities.
- **Declarative**: The framework is configuration-based, which means there is no need to write any code for simple
  applications.
- **Flexible**: The framework is composed of multiple decoupled modules and can easily be extended for more advanced use
  cases where more customization is required.
- **Battle-tested**: The framework is being used within the Dutch government for a few years already. A high level of
  quality assurance is being enforced from the beginning.

## Features

- Backend-agnostic. Official implementations available: [JSON](./backend/json.md), [PostgreSQL](./backend/postgres.md)
  and [RDF4J](./backend/rdf4j.md)
- Different service types, such as [REST](./service/openapi.md) and [GraphQL](./service/graphql.md)
- Smart backend fetching-algorithm for optimal performance
- Hypermedia controls (configuration-based)
- Using open standards (e.g. JSON Schema, OpenAPI Specification, GraphQL)

Curious how it works? [Get started](./overview/getting_started.md) now!

## License

The DotWebStack Framework is published under
the [MIT License](https://github.com/dotwebstack/dotwebstack-framework/blob/v0.4/LICENSE.md).

repository: dotwebstack/dotwebstack-framework

gha_language: Java

repo_name: dotwebstack/dotwebstack-framework


text:
Reference Plane
===============

[![Build Status](https://travis-ci.org/ElDeveloper/reference-plane.svg?branch=master)](https://travis-ci.org/ElDeveloper/reference-plane)

**Note**: this is a transient repository, as such the code will be expected to
reside, at some point, somewhere else where it can be better monitored and
maintained.

# R Users

An R implementation based on this repository can be found
[here](https://github.com/waasp/plane.R). Support for that implementation
should be referred to that repo's
[issue tracker](https://github.com/waasp/plane.R/issues).

# License

This software is released under the BSD 3-Clause license.

repository: ElDeveloper/reference-plane

repo_name: ElDeveloper/reference-plane


text:
# Java 9 Jigsaw modules example suite
## Example example_reflection

### Info
Written by [Martin Lehmann](https://github.com/mrtnlhmnn), [Kristine Schaal](https://github.com/kristines) and [Rüdiger Grammes](https://github.com/rgrammes)

see https://github.com/accso/java9-jigsaw-examples

## What is this example about?

### Modules in this example
* modb, modmain
* modmain has a Main class which is started in run.sh

### Module Dependency Graph, created with [DepVis](https://github.com/accso/java9-jigsaw-depvis)
![Example's Module Dependency Graph](moduledependencies.png)

### Example shows ...
Before J9 build b136, there was a difference between `exports` and `exports dynamic`. In our example we've had a difference between the (exported) package `pkgb` with class `B` and the (non-exported) package `pkgbinternal` with class `InternalB`.

In modmain, we call methods of both classes statically (only B) and dynamically via reflection (`B` and `InternalB`), with variants of methods (public, private, private static methods) are all called via reflection. In the `module-info` of `modb` there is no more distinction possible, both exports are `exports private`.

gha_language: Shell


text:
## THIS REPO IS NOT MAINTAINED

**It will soon get deleted. I am currently working on a new and very much improved static site generator for Zettelkasten that works very well with Obsidian: [mdzk](https://github.com/mdzk-rs/mdzk). It is agnostic with regards to text editors, so it will work just as well with any other editor that supports wiki links. If you like Oboe, be sure to give [mdzk](https://github.com/mdzk-rs/mdzk) a try.**

Oboe

  Installation -
  Usage -
  Tips

Oboe is a Python command line tool made to convert an [Obsidian](https://obsidian.md/) vault into a vault of HTML files, with the goal of publishing them as static files. It depends on the excellent [markdown2](https://github.com/trentm/python-markdown2) by [trentm](https://github.com/trentm) for Markdown parsing, but also deals with parsing Obsidian's flavor of Markdown. In addition, Oboe handles the structure of your vault and supports templates.

# Installation

1. Make sure Python and PIP are installed.
2. Install Oboe with `pip install git+https://github.com/kmaasrud/oboe`

# Usage

Supply the path to an Obsidian vault, and Oboe will convert all its notes into HTML, appended by the notes' backlinks.

    oboe <path to vault>

These HTML-files are by default placed in the directory `./html`. To specify another output directory, use the flag `-o` or `--output-directory`.

    oboe <path to vault> -o <output directory>

## Sub-directories

By default, Oboe only converts notes in the vault root, and not those inside sub-directories. To include sub-directories, add them with the flag `-d` or `--sub-directories`. For example, say you have the folders `Daily notes` and `Zettels` that you want to have converted. In this case, run

    oboe <path to vault> -d "Daily notes" "Zettels"

If you want to include all sub-directories recursively and add every note in your vault regardless of where it is located, add the `-d` flag without any arguments.

## Templates

The output is not very exciting from the get-go. It needs some style and structure. This is done by using a HTML template. A template must have the formatters `{title}` and `{content}` present. Their value should be obvious. The template file is supplied to `obsidian-html` by the flag `-t` or `--template`, like this:

    oboe <path to vault> -t template.html

Here you can add metadata, link to CSS-files and add unified headers/footers to all the pages. [Here's](https://github.com/kmaasrud/brain/blob/master/template.html) an example of how I use the template function on my own hosted vault.

Note that because of the way Python does formatting, the template cannot contain single curly braces other than the abovementioned formatters. To include Javascript or CSS in your template, always use double curly braces (e.g. `{{`). These will be changed into single braces in the final result.

## Filtering notes by tag

Oboe supports only converting notes that contain a certain tag. The filter is specified via the `-f` or `--filter` flag. For example, say you had a tag `#physics` for notes relating to physics, and the same for `#chemistry`. To convert all notes relating to physics and/or chemistry, run Oboe like this:

    oboe <path to vault> -f physics chemistry

Filters are not strict, so Oboe will convert any notes containing any of the tags in the filter. Filters can also be negated by prefixing a tag with `.`, for example:

    oboe <path to vault> -f physics .chemistry

The above would convert all notes with the `#physics` tag, but exclude all notes with the `#chemistry` tag. If the filter contains only exclusions, Oboe will convert every note except those who match the exclusion.

## Other flags

- `-e` or `--add-file-extensions`: Most web-servers do not need the `.html` file extension in URLs to find the correct file. However, that might be needed when browsing the converted vault locally. If you experience issues with this or want all links to have a `.html` extension, just add this flag when running.

- `-b`or `--omit-backlink-dash`: Removes the `- ` in front of the backlink when inserted in html.

# Tips

## Publishing your vault automatically to GitHub Pages

Make a GitHub Actions workflow using the YAML below, and your vault will be published to GitHub Pages every time you push to the repository.

1. Make sure you have GitHub Pages set up in the vault, and that it has `gh-pages` `/root` as its source.
2. Copy and modify the following YAML job to match your repository. Add it to your vault repository as `.github/workflows/publish.yml`.

    ```yaml
    name: Publish to GitHub Pages

    on:
      push:
        branches: [ master ]

    jobs:
      deploy:
        runs-on: ubuntu-latest

        steps:
        - uses: actions/checkout@v2

        - name: Set up Python 3.8
          uses: actions/setup-python@v2
          with:
            python-version: 3.8

      - name: Install oboe
        run: |
          python -m pip install --upgrade pip
          pip install git+https://github.com/kmaasrud/oboe.git

      - name: Generate HTML through oboe
        run: oboe ./vault -o ./out -t ./template.html -d daily

      - name: Publish
        uses: s0/git-publish-subdir-action@develop
        env:
          REPO: self
          BRANCH: gh-pages
          FOLDER: out
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    ```
3. ????
4. PROFIT!!!

## Support for TeX via KaTeX

By loading KaTeX in the HTML template and initializing it with `$` and `$$` as delimiters, you will have TeX support on the exported documents.

Just add this to the bottom of you template's body:

```html
<!-- KaTeX -->
<link rel="stylesheet"<EMAIL_ADDRESS>  integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">

<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer<EMAIL_ADDRESS>  integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz"
  crossorigin="anonymous"></script>

<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer<EMAIL_ADDRESS>  integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI"
  crossorigin="anonymous"></script>

<!-- Parsing single dollar signs -->
<script>
  document.addEventListener("DOMContentLoaded", function () {{
      renderMathInElement(document.body, {{
        delimiters: [
          {{left: "$$", right: "$$", display: true}},
        {{left: "\\[", right: "\\]", display: true}},
    {{left: "$", right: "$", display: false}},
    {{left: "\\(", right: "\\)", display: false}}
      ]
  }});
  }});
</script>
```

> Note the double `{`'s. This is to work around how Python formatting works, and will be correct in the outputted HTML.

## Syntax highlighting

Using [highlight.js](https://highlightjs.org/), syntax highlighting is easily achieved.

Just add this to the bottom of you template's body:

```html
<!-- Syntax highlighting through highlight.js -->
<link rel="stylesheet" href="https://unpkg.com/<EMAIL_ADDRESS><script src="https://unpkg.com/<EMAIL_ADDRESS>
<script>
  // Ignore highlighting of mermaid
  hljs.configure({{noHighlightRe: /^mermaid$/}});
  hljs.initHighlightingOnLoad();
</script>
```

> Note the double `{`'s. This is to work around how Python formatting works, and will be correct in the outputted HTML.

repository: aduplessis/oboe

repo_name: aduplessis/oboe


text:
# About This Project

A fashion e-commerce website made with Django web framework and integrated with Firebase Storage and Paypal Smart Payment Buttons **(developed on Windows)**.

You can test it out here https://ruri-commerce.herokuapp.com/. Use sandbox paypal account to checkout.

# Web Page Appearance

**Home Page**
![Home Page](https://user-images.githubusercontent.com/17781413/139363212-fe253209-528f-46a3-9432-3ef4d39d967a.PNG)

**Shop Page**
![Shop Page](https://user-images.githubusercontent.com/17781413/139363217-2ff9051f-7f29-4342-a6d2-eca1e23d2098.PNG)

**Product Page**
![Product Detail Page](https://user-images.githubusercontent.com/17781413/139363224-443392e4-4c44-4233-8573-982a3ff79f34.PNG)

**Cart Page**
![Cart Page](https://user-images.githubusercontent.com/17781413/139363235-b476baf0-de05-4ba5-baac-3d43a1c50eeb.PNG)

**Checkout Page**
![Checkout Page](https://user-images.githubusercontent.com/17781413/139363240-47e0b2cb-491f-4760-b536-360bbb8b34d3.PNG)

**Order Status Page**
![Order Status Page](https://user-images.githubusercontent.com/17781413/139363264-cf89350c-2168-487d-ae71-749e0dfef9d3.PNG)

**Order Detail Page**
![Order Details Page](https://user-images.githubusercontent.com/17781413/139363268-403c9665-9732-46db-92bd-e54a390b630a.PNG)

**Login / Signup Page**
![Login-Signup Page](https://user-images.githubusercontent.com/17781413/139363272-15fdd7f7-b60e-4476-9305-e05a40c84c98.PNG)

# How to run this project?

- Download the project using this command.

```
git clone https://github.com/ruriarmandhani/django-ecommerce.git
```

- Go to the project directory and make a virtual environtment.

```
py -m venv venv
```

- Run your virtual environtment.

```
venv\Scripts\activate.bat
```

- Intall the requirements.

```
pip install -r requirements.txt
```

- Go to olshop directory and set the SECRET_KEY variable in settings.py. You can generate django secret key here https://djecrety.ir/.

```
SECRET_KEY = 'your secret key'
```

- Now you need to download the firebase service account key.

![image](https://user-images.githubusercontent.com/17781413/139064434-9484ac02-29b9-46fd-b578-4e866317802a.png)

- And then set up the google cloud storage in the settings.py.

```
GS_BUCKET_NAME = 'your firebase bucket name '
GS_CREDENTIALS = service_account.Credentials.from_service_account_file('your json key path')
```

- Set up SMTP config in settings.py. You can change the config if you don't want to use gmail smtp server.
- See the smtp servers list [here](https://www.arclab.com/en/kb/email/list-of-smtp-and-pop3-servers-mailserver-list.html).

```
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '587'
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your email'
EMAIL_HOST_PASSWORD = 'your password'
```

- Get the GEODB API key from [here](https://rapidapi.com/wirefreethought/api/geodb-cities/). (GEODB API key is used to get all of the cities in the world to run the autocomplete.js)
- Set up your system variable.

```
set GEODB_API_KEY='your geodb api key'
```

- Or you can add it manually like this.

![GEODB_API_KEY](https://user-images.githubusercontent.com/17781413/139062002-8fe7df92-cd36-4458-8b38-bb11cb6f29fa.PNG)

- Create database scheme.

```
py manage.py makemigrations
py manage.py migrate
```

- Create super user to access django admin.

```
py manage.py createsuperuser
```

- And finally you can run the project.

```
py manage.py runserver
```

repository: ruriarmandhani/django-ecommerce

repo_name: ruriarmandhani/django-ecommerce


text:
# handwritten-wasm
Wasm examples, brought to you by humans!

**Why would anyone want to write Wasm by hand?**

There are a few reasons:

 * you want to to learn about WebAssembly and how it works!
 * you're compiling code to WebAssembly
 * you want to actually write some for use in a project, perhaps for performance

Reading machine generated Wasm is not always a fun experience, so if you want to learn, it's best to read Wasm written by humans.

**List of handwritten Wasm examples**

 * [mdn/webassembly-examples](https://github.com/mdn/webassembly-examples)
 * [dominictarr/quicksort.wasm](https://github.com/dominictarr/quicksort.wasm)
 * [dominictarr/fib.wasm](https://github.com/dominictarr/fib.wasm)
 * [rhmoller/wasm-by-hand](https://github.com/rhmoller/wasm-by-hand)
 * [mafintosh/blake2b-wasm](https://github.com/mafintosh/blake2b-wasm)
 * [guybedford/wasm-intro](https://github.com/guybedford/wasm-intro)
 * [WebAssembly/wasm-jit-prototype](https://github.com/WebAssembly/wasm-jit-prototype/tree/master/Test/wast) (handwritten echo and tee)
 * [jungomi/xxhash-wasm](https://github.com/jungomi/xxhash-wasm)
 * [blog.scottlogic.com/2018/04/26/webassembly-by-hand.html](https://blog.scottlogic.com/2018/04/26/webassembly-by-hand.html) (Conway's game of life)
 * [LingDong-/wasm-fun](https://github.com/LingDong-/wasm-fun)
 * [binji/raw-wasm](https://github.com/binji/raw-wasm)

If you know of any others, please add it to the list! I'm especially interested in larger handcrafted Wasm programs, rather than small examples.

*N.B. Strictly speaking, all of the examples are wast, not Wasm, but that somewhat goes without saying when humans are involved.*

repository: Widdershin/handwritten-wasm

repo_name: Widdershin/handwritten-wasm


text:
WSDLDownloader
==============

Utility to download WSDL/XSD including transitive dependencies (eg. xs:include)

Usage:
------

> clone project

> cd project folder

> mvn  exec:java -Dexec.args=<wsdl url>

repository: bsorrentino/WSDLDownloader

repo_name: bsorrentino/WSDLDownloader


text:
# commands/

This folder holds modules for implementing one's own commands and
command sets. All the modules' classes are essentially empty and just
imports the default implementations from Evennia; so adding anything
to them will start overloading the defaults.

You can change the organization of this directory as you see fit, just
remember that if you change any of the default command set classes'
locations, you need to add the appropriate paths to
`server/conf/settings.py` so that Evennia knows where to find them.
Also remember that if you create new sub directories you must put
(optionally empty) `__init__.py` files in there so that Python can
find your modules.

## Customizations

[spaceshipconsole.py](spaceshipconsole.py) - Commands and Command Set for the
Space Ship Consoles

repository: QBFreak/SolarWinds-Evennia

repo_name: QBFreak/SolarWinds-Evennia


text:
# ECB_pwnage
Python script to auto-generate a privileged cookie, abusing a ECB encryption [ONLY WITH BLOCKS OF 8].

## Exploit

The script will create different users adding some rubbish chars (b's), then compare the encrypted cookie HEX to guess the corresponding encrypted portion to the assigned b's, after detecting the b's , an authenticated cookie is generated based on the rest of the username.

## POC
We have a login & register form, we can enumerate users on register form, detecting an admin username. That's going to be our objective, log in with admin account.

Knowing that the authentication is using ECB encryption we can use the python script to auto generate an authenticated cookie for us.

If you look closely 2 users are created `bbbbbbb` and `bbbbbbbadmin` , in the first line of each we get the base64 of the encrypted value, on the second we have the decoded base64 in hex, after that, compare them to detect the HEX values assigned to the b's, encode the rest of the string (admin) and GG.

After that, we just need to copy the cookie and change it in our burp session. And we have succesfully logged in as admin!


text:
Mid Term Exam
All questions except Q8 are worth 5 points each. Please provide short answers (4-6 sentences) for each. Q8 is worth 10 points.

1. What is virtual data integration? When is virtual data integration undesirable?

There are a variety of possible architectures for data integration: warehousing and virtual integration. In virtual integration, the data remains in the sources and are accessed as needed at query time.

If the data is volatile, the warehousing method would incur a lot of overhead: not optimal. Warehouse/materialization is good when you want historical data — in order to do analytics. Virtual table is more vulnerable to network delays or source failures.

2. What is data exchange in the context of data integration? Where is data exchange used?

The main advantage of data warehousing is that it can support complex queries more efficiently. Data exchange is an architecture in which we have a source database and our goal is to translate the data and store them in a target database that has a different schema, and answer queries over the target database.

The process of data exchange results in a materialized central database, much like the data warehouse, except that the data transformations are specified declaratively as in our prior discussions of virtual data integration.

3. When should Affine Gap Measure be used in preference to the Smith-Waterman Method for string comparison? Give examples.

It depends on your goals. If your data has large gaps, then SW would penalize more heavily than Affine Gap Measure b/c it extension of the Needleman-Wunch measure that handles longer gaps more gracefully. Affine considers global alignments while SW works well when you want to match on arbitrary substrings in your data or local alignments.

An score function using an Affine Gap Measure would excel w/ the scenario below w/ a long gap between David and Smith.
David Smith
David Richardson Smith

4. Give an example of conditional inclusion dependency and its use in data cleaning.

Example from the credit card account holder example in the class slides: An disjoint constraint prohibits that holder and joint holder roles be exerted by the same customer. However, there are a customer (c2) with both roles on the same card (cc4 and cc10). This will help in data cleaning b/c it ensures that a relation is not in two mutually exclusive states at the same time. For example, the user in the credit card example cant be the holder and not the holder at the same time (as is the case in the class slides).

5. How is query unfolding used in data integration?

It is used to rewrite a mediated query into their reduced form to query the source relations. In the context of data integration, query unfolding will be used to reformulate a query posed over a mediated schema into a query referring to data sources.

6. Give an example of semantic heterogeneity in the context of data integration.

The difference between two schemas, the mediator and source: Data from multiple sources can only be integrated if we bridge this so-called semantic heterogeneity. In fact, semantic heterogeneity turns out to be a major bottleneck for data integration. Here are some more detailed examples from the text:

The underlying reason for semantic heterogeneity is that schemas are created by different people whose tastes and styles are likely to be different. We see the same phenomenon when comparing computer programs written by different programmers. Even if two programmers write programs that behave exactly the same, it is likely that they will structure the programs differently, and certainly name variables in different ways. Another fundamental source of heterogeneity is that disparate databases are rarely created for the exact same purpose. In our example, even though both schemas model movies, the DVD vendor is managing its inventory, while the aggregator is concerned only with customer-facing attributes. (125)

Finally, the representation of the data can be significantly different as well. For example, in FullServe’s Employee database, the company records the first, middle, and last name of every employee in a separate field. In the Training database, it only records the full name of the employee in a single field, and as a result, names often occur in various formats, such as (First, Last) or (Last, First Initial). Consequently, it may be hard to match records from these two databases. The same problem occurs between the Sales and Services databases. While the Sales database only records a field for the name and a field for the address, the Services database records much finer-grained information about each subscriber. Of course, the units of measure will differ as well: FullServe uses American dollars for prices, while EuroCard uses Euros. Since the exchange rate between the currencies constantly changes, the correspondence between the values cannot be set a priori.

(8)

7. Consider two tables T1 and T2 where T1 contains two columns for latitude and longitude and T2 has one column containing latitude and longitude separated by a comma (,). What would be your data matching strategy for this information?

First we would merge the columns of T1 into 1 full_name column. Then we can do data matching on the two columns. A good technique for measuring similarity between latitude and longitude would be Euclidean distance measure with a more significant weight on the characters to the left of the "." in the GPS string, eg: "-117.23423" b/c they are more significant than the fraction part.

8. Consider the strings "US President Barak Obama" and "Obama, Barak Hussein, President". Use a suitable string matching method to find their similarity and justify your choice of algorithm.

The Smith-Waterman Measure
The previous measures consider global alignments between the input strings. That is, they attempt to match all characters of x with all characters of y.

Global alignments may not be well suited for some cases. For example, consider the two strings Prof. John R. Smith, Univ of Wisconsin and John R. Smith, Professor. The similarity score based on global alignments will be relatively low. In such a case, what we really want is to find two substrings of x and y that are most similar, and then return the score between the substrings as the score for x and y. For example, here we would want to identify John R. Smith to be the most similar substrings of the above two strings. This means matching the above two strings by ignoring certain prefixes (e.g., Prof.) and suffixes (e.g., Univ of Wisconsin in x and Professor in y). We call this local alignment.

The Smith-Waterman measure is designed to find matching substrings by introducing two key changes to the Needleman-Wunch measure.

US President Barak Obama
Obama, Barak Hussein, President

Python code to match the substrings using Smith-Waterman:

```
match = 2
mismatch = -1
gap_penalty= -1
In [21]: alignment = sw.align('US President Barak Obama','Obama, Barak Hussein, President')

In [22]: alignment.dump()
Query: 22  President 31
          ||||||||||
Ref  :  3  President 12

Score: 20
Matches: 10 (100.0%)
Mismatches: 0
```

OR if I tweak the parameters:

```
match = 5
mismatch = -3
gap_penalty=-4

Query: 22  President 31
          ||||||||||
Ref  :  3  President 12

Score: 50
Matches: 10 (100.0%)
Mismatches: 0
CIGAR: 10M
```

(102)

9. Give a practical example where binding patterns are used for querying a data source.

A query system that lets you check where your paper was cited. But you can't check the inverse where, given a citation, check what papers use it.

10. Illustrate with an example how sorting can help the scaling up of rule based data matching.

Sorting: We use a key to sort the tuples, then scan the sorted list and match each tuple with only the previous (w − 1) tuples, where w is a prespecified “window size.” The key should be strongly discriminative, in that using it to sort “brings together” tuples that are likely to match and “pushes apart” tuples that are not likely to match.

For example, we may hash houses into buckets using zip codes, then sort houses within each bucket using street names, before matching them using a sliding window. As another example, we can use hashing, sorting, or indexing to speed up the application of the cheap similarity measure in the canopy technique.(204)

11. When should the generalized Jaccard similarity measure be used for string matching?

Jaccard measure is useful when words are drawn form some finite domain or set. For example: movie ratings, book titles or country names.

12. Suppose we know that source S1 with table T1(eventID, eventType, eventDate, eventCountry, eventCity, responsibleParty, eventDescription) is complete for the countries 'USA', 'Iraq', and 'Germany'. How does this knowledge help us in the integration of this source with another data source on organizations that claim responsibility for an event?

If we know that data sources are complete for USA, Iraq and Germany, the system can save work by not accessing other datasources that have overlapping data. This means that we don’t have to access any sources that have only USA, only Iraq and only Germany data. Additionally, We can use this heuristic (knowing certain countries have missing data) to do the join w/ s2 more intelligently. For example, knowing that a join using s1 and s2 w/ a country outside of the approved list might fail b/c of missing data.

13. Suppose we have a source schema:

```
Patient(pid, name, healthplan, date)
Doctor(pid, docid)
```

and a target schema

```
History(pid, plan, date, docid)
Physician(docid, name, office)
```

and the mapping Patient(x,y,z,u), Doctor(x,v) → History(x,z,u,v)

What kind of schema mapping is this? Explain your reasoning.

This is an example of GLAV schema mapping because the source is a subset of the target.

14. Write the query

```
select e.name, e.salary, p.title
from employees e, projects p
where e.works_in = p.title and e.salary > 100000"
```

in Datalog.

```
Ans(name, works_title) :- Employee(name, salary, title, works_title), Project(works_title), salary > 100000
```

15. Explain the concept of producing "certain answers" against a mediated schema.

This describes the obvious constraint that you must put on your mediated schema that says: any relation defined in your mediated schema must exist in some form in the source schemas. In other words: the mediated schema can't specify data, the source schema doesn't define.

16. Is TF-TDF a good measure to match tweets? If so, explain why. If not, how would you match them?

It depends on what your goals are. If you are looking for a method that puts heavy weight on unique tokens in the corpus of documents, then yes, TF/IDF would be a good solution, b/c it is designed to work on a large number of documents which could be considered tweets.

17. With an example show how a conditional functional dependency can be expressed as a denial constraint for data cleaning.

Example: The Customer relation has a conditional functional dependency between State, City and Zipcode, denoted by [State, City → ZipCode, Tp]. Pattern Tableau Tp specifies that state “SP” and city “SP” uses the zipcode range between 08000 and 08499, while the same state and city “SJC” has a zipcode range from 12200 to 12248. However, the tuples c7 and c11 violate these patterns

Conditional functional Dependency
Let R(A, B, C) be a relation
If C = c1, A→B, not otherwise
If country = 'us', zip→city

18. Give an example where a logistic regression rule should be used for data matching between two relational tables.

High dimensionality (# of columns) would favor a rule-based logistical regression, b/c the a decision tree would be too deep and the computational cost would be too expensive.

19. What is "semantic match" in the context of data integration?

It's when you match something w/ the same meaning but it is represented by a different column. Users use different identifiers in different systems. Can we match the identities of users by comparing the rest of their data records? For example Hospital A's record vs Hospital B's record the names are close but not exact.


text:
# Notes on the Schemas

## Generate `Atom.xsd`

This does not seem to exist on its own. Its specification is given in [RFC4287](https://validator.w3.org/feed/docs/rfc4287.html#rfc.section.B)
using the [RELAX NG Schema](https://relaxng.org/compact-20021121.html).
To convert use the [trang.jar](http://www.thaiopensource.com/download/) tool:

```cmd
java -jar trang.jar -I rnc -O xsd atom.rnc atom.xsd
```

repository: gkantsidis/Utils

repo_name: gkantsidis/Utils


text:
# Callbacks Concept
## What is Callback?
Callback is an asynchronous equivalent for a function. A callback function is called at the completion of a given task. Node makes heavy use of callbacks. All the APIs of Node are written in such a way that they support callbacks.

For example, a function to read a file may start reading file and return the control to the execution environment immediately so that the next instruction can be executed. Once file I/O is complete, it will call the callback function while passing the callback function, the content of the file as a parameter. So there is no blocking or wait for File I/O. This makes Node.js highly scalable, as it can process a high number of requests without waiting for any function to return results.

## Blocking Code Example
Create a text file named **input.txt** with the following content:
```
Tutorials Point is giving self learning content
to teach the world in simple and easy way!!!!!
```

Create a js file named main_blocking.js with the following code:
```javascript
var fs = require("fs");
var data = fs.readFileSync('input.txt');

console.log(data.toString());
console.log("Program Ended");
```

Now run the main.js to see the result:
```
$ node main_blocking.js
```
Verify the Output.
```
Tutorials Point is giving self learning content
to teach the world in simple and easy way!!!!!

Program Ended
```

## Non-Blocking Code Example
Create a text file named **input.txt** with the following content:
```
Tutorials Point is giving self learning content
to teach the world in simple and easy way!!!!!
```

Create a js file named main_nonblocking.js with the following code:
```javascript
var fs = require('fs');

fs.readFile('input.txt', function (err, data) {
    if (err) return console.error(err);
      console.log(data.toString());
});

console.log('Program Ended');
```

Now run the main.js to see the result:
```
$ node main_blocking.js
```
Verify the Output.
```
Program Ended
Tutorials Point is giving self learning content
to teach the world in simple and easy way!!!!!
```

These two examples explain the concept of blocking and non-blocking calls.

* The first example shows that the program blocks until it reads the file and then only it proceeds to end the program.

* The second example shows that the program does not wait for file reading and proceeds to print "Program Ended" and at the same time, the program without blocking continues reading the file.

Thus, a blocking program executes very much in sequence. From the programming point of view, it is easier to implement the logic but non-blocking programs do not execute in sequence. In case a program needs to use any data to be processed, it should be kept within the same block to make it sequential execution.


text:
# Express-Survey

A framework to quickly create surveys, written on top of [Express.js](https://github.com/strongloop/express).

To get started:

```
git clone https://github.com/jonmbake/express-survey.git
cd express-survey && npm install --production
npm start
open http://localhost:3000/example
```

The questions for the example survey, defined in `json/survey_instances/example.json`, will be displayed within the browser.  Navigating to `http://localhost:3000/example/results` will display the results of the survey.

## Survey Types

*Express-Survey* currently supports two types: **Open** (default) and **Closed** (aka Invitation Only).

### Open

With *Open Surveys*, anyone with access to the survey URL can respond and view survey results.  This is the default.

### Closed

*Closed Surveys*, on the other hand, can only be viewed and responded to by people you specify on an *invitation list*.  Closed surveys are specified by adding an *invite_list* property to the *Survey Instance Definition*, which lives in `json/survey_instances`.  See `json/survey_instances/invite_only_example.json` for an example.

A unique token is generated for each invitee, which is then sent to them as a query param appended to the survey URL.  Somehow this URL has to be sent to them; you do this by specifying a *transporter*.  There are currently two transporter defined: *slack* and *email*.  The transporter is defined by the *invitation_transporter* property in the *Survey Instance Definition*.  It defaults to *email*.

Note: when using a *slack* transporter you must define a `slack_webhook_url` and `slack_from_username` in `json/app_config.json`.  When using *email*, you must `email_service`, `email_from_address` and `email_from_password`.

## Further Configuration

### Defining Fields

A survey is composed of fields.  Fields for a survey are defined in `json/field_sets`.  *Field Sets* can have the following properties

Name        | Description
----------- | ---------------------------------------------------------------
title       | Displays as label to the field in the survey.
name        | Internal name.  Will be used as database column name.
type        | Can be *number*, *text* or *options*.
validations |  Array of validations, which will be enforced on submitted survey values.  Possible validations are: *required*, *min* and *max*.  Types are also validated.

### Defining Survey Instances

Survey instances are defined in `json/survey_instances`.  The following properties can be defined:

Name                   | Description
---------------------- | ------------------------------------------------------
title                  | Displays as the header when navigating to the survey instance page.
message                | Short message that displays under the title heading.
html_escape_message    |  Should the message be HTML-escaped?  Defaults to true.
field_set              | Field set to use with survey.  Must reference a file defined in `json/field_sets`.
invite_list            | Invitation list (if Closed Survey).
invitation_transporter | Transporter to use to send out survey invitations.  Defaults to *email*.

**The Survey Instance file name defines the URL that the survey will be accessible from**

### Defining Invitation Lists

*Invitations Lists* are defined in *json/invite_lists*.  The definition is an Array of Objects with *name* and *address* properties.

## Other notes

Results are stored in a sqlite database.  Each survey instance will have a corresponding database file in the *db* directory.  You can query results directly from the database:

```bash
$> sqlite3 db/example.db
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> select * from responses;
1|10|Add some validation.|Scary
sqlite>
```

repository: luyiming/express-survey

repo_name: luyiming/express-survey


text:
This is a standalone version of the TagMap example built upon [deck.gl](http://deck.gl).

![tagmap](https://raw.githubusercontent.com/rivulet-zhang/rivulet-zhang.github.io/master/dataRepo/static/tagmap.png)

### Usage
Copy the content of this folder to your project. Run
```
npm install
npm start
```
### Note on "Map Tokens"
This example is set up to read the token from the environment variable
`MapboxAccessToken`, so you don't have to edit the code to test them.

### Data format
Sample data can be found [here](https://rivulet-zhang.github.io/dataRepo/tagmap/hashtags10k.json).


text:
---
layout: page
header:
  title: Soroka Clinical Research Center
  image_fullwidth: twodudes.png
  caption: Soroka Clinical Research Center
  caption_url: https://vsevkayf.github.io/OmarKhayyam/
title: "Collaboration"
meta_title: "collaboration"
subheadline: ""
teaser: ""
permalink: "/collaboration/"
---

• SCRC supports over 150 clinical studies and trials at Soroka University Medical Center. That is done in a variety of medical fields such as Internal Medicine, Pulmonology, Oncology, Rheumatology, Surgery, Intensive Care, Pediatrics, OB/GYN, Infectious Diseases, Neurology etc.

• SCRC initiated collaboration with researchers from various disciplines in Ben-Gurion University of the Negev. One of the promising and new directions is Environmental Medicine. With the cooperation of the Department of Geography, we have started a number of projects combining clinical medicine, epidemiology and environmental science.

• SCRC is involved in a number of international projects and has gradually made good ties with hospitals in the Harvard system, Columbia University and Cooper Medical School  in several fields of Respiratory Medicine, Cardiology, Oncology and Intensive Care.

repository: vsevkayf/OmarKhayyam

repo_name: vsevkayf/OmarKhayyam


text:
# Read_it

## Description
Read it is a web application designed for anyone interested in keeping track of their present, past, and future reading endeavors.

## User story
- As a Reader.
- I want to keep track of books.
- SO THAT I can easily view books I have read, am currently reading, and would like to read in the future.

## Wireframe
![Screen Shot 2021-05-17 at 9 25 33 PM](https://user-images.githubusercontent.com/73543476/118580968-6e44b880-b756-11eb-95d5-dcd48f8b9978.png)
![Screen Shot 2021-05-17 at 9 25 50 PM](https://user-images.githubusercontent.com/73543476/118580984-77358a00-b756-11eb-88db-86990e1b3e53.png)

## User flow
On page load, the user will be presented with the sign-in/sign-up page.
If the user is not a member they will be required to create an account if they are they will need to sign in.
Then the user will be directed to their profile which will contain the list of books they are currently reading, want to read, and have read.

## Tech
- Bcrypt
- Bootstrap
- Session
- Sequelize
- Date-fns
- Dotenv
- Express
- Handlebars
- Mysql
- CSS
- HTML

## Link to deployed site
https://sleepy-savannah-76210.herokuapp.com/

![Screen Shot 2021-05-22 at 9 50 19 AM](https://user-images.githubusercontent.com/73543476/119234458-a3a12b80-baf3-11eb-8bf8-99afd2034ba7.png)

## Collaborators
Janei Jones and Ryan Owens

## Contact
Email<EMAIL_ADDRESS>
## MIT license
Copyright (c) 2021 Olivia Lopez

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

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

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

gha_language: JavaScript


text:
# Méphistophélès

Méphistophélès is a software for bypassing auth system.

![Méphisto](https://image.noelshack.com/fichiers/2020/26/5/1593174767-mephi.png)

## Installation

You can download the releases [here](https://github.com/call-042PE/Mephistopheles/releases/)
/!\ Make sure you have python3 installed and added to your path /!\

## How many auth Mephistopheles can bypass?
Méphistophélès can bypass 70% of cracked.to auth same for nulled.to/nulledauth.net and custom auth.
But you can update Méphistophélès yourself for bypassing specific auth and improve it !
I put many comments in the code so that the beginners can understand how méphistophélès bypass auth and how you could improve it !

## In what language is it code?
The "server side" is coded in python and the application is coded in c#.

## Usage

If the target software don't use nulledauth.net or cracked.to advanced auth you just have to click start.

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## Frequently asked questions
How to know what auth use the program ? I don't really have technique you can use HTTPDebuggerPro to find wich auth he use or you can search for strings in process hacker like "ForlaxWasHere" it's for cracked.to forlaxmode or for nulledauth.net you can search for "nulledauth.net" or just if one method doesn't work try the other one.

Both auth techniques doesn't work what can i do ? You can try to adapt Méphistophélès to the current auth.

How can i update or customize Méphistophélès ? learn how to code(https://www.sololearn.com/) and learn how Méphistophélès do for bypassing auth.

What is auth ? "Our Auth System is like a login for a specific tool. Before getting access to the tool you are about to open, you will need to put your Key in, which is linked to your Cracked.to Forum Profile." Cracked.to definition.

## Common errors
If you have trouble with ssl try to install the "server.crt" to trusted root certification authorities.

## License
[UNLICENSE](https://choosealicense.com/licenses/unlicense/)

license: Unlicense

repository: Shunre/Mephistopheles

repo_name: Shunre/Mephistopheles


text:
<!--

Thank you for your pull request.

If this fixes an existing github issue, make sure to have a line saying 'Fixes #XXXX' (without quotes) in the commit message.

-->

### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

* [ ] documentation is added or updated
* [ ] tests are added or updated

repository: libtom/libtomcrypt

gha_language: C

repo_name: libtom/libtomcrypt