text:
---

copyright:
  years: 2016

---

<!-- Common attributes used in the template are defined as follows: -->
{:new_window: target="\_blank"}
{:shortdesc: .shortdesc}
{:screen:.screen}
{:codeblock:.codeblock}

# Configuring mobile connectivity and security
{: #iot4e_configureMCA}

*Last updated: 19 September 2016*
{: .last-updated}

Enable mobile communications and security by configuring {{site.data.keyword.amafull}}. This task is required to use the sample mobile app and only needs to be performed once.
{:shortdesc}

## Before you begin

Before you begin, you must complete the following tasks:
  - Deploy an instance of the {{site.data.keyword.iotelectronics}} starter in your {{site.data.keyword.Bluemix_notm}}
 organization. Deploying an instance of the starter automatically deploys the component applications and services, including {{site.data.keyword.amafull}}.

  - Because the configuration process varies slightly depending on which version of the {{site.data.keyword.Bluemix_notm}} console you use, you should read the instructions for the appropriate version.

  You can determine which version you are using by looking for the following options:
    - [New {{site.data.keyword.Bluemix_notm}}](#configMCAnew). If you are using the New {{site.data.keyword.Bluemix_notm}} experience, the **Go to the Classic Experience** option appears in the heading section of the dashboard.
    - [Classic {{site.data.keyword.Bluemix_notm}}](#configMCAclassic). If you are using the Classic {{site.data.keyword.Bluemix_notm}} experience, the **Try the New Bluemix** option appears in the heading section.

## Configuring {{site.data.keyword.amashort}} in the New {{site.data.keyword.Bluemix_notm}} experience
{: #configMCAnew}

  1. If you just deployed the {{site.data.keyword.iotelectronics}} starter, the Getting Started tab of the starter app is displayed, and you should proceed to the next step of these instructions. If the starter app is not displayed, open your {{site.data.keyword.Bluemix_notm}} dashboard and start your {{site.data.keyword.iotelectronics}} starter application by clicking the starter application tile.

    ![{{site.data.keyword.iotelectronics}} in the dashboard, New Experience](images/IoT4E_bm_dashboard.png "{{site.data.keyword.iotelectronics}} in the dashboard, New Experience")

  2. On the **Connections** tab, click the {{site.data.keyword.amashort}} service to open it.

    ![How to find {{site.data.keyword.amashort}}.](images/IoT4E_Connections.png "{{site.data.keyword.iotelectronics}} connections")

  3. On the **Setup Authentication** page, locate the URL of your {{site.data.keyword.iotelectronics}} starter app by clicking **Mobile options**. Copy the URL that is located in the **Route** field.

    ![{{site.data.keyword.amashort}} Mobile options](images/MCA_config_mobileoptions.png "{{site.data.keyword.amashort}} Mobile options")

  4. In the **Custom section of the **Setup Authentication** page, click **Configure**.

       ![Configure {{site.data.keyword.amashort}}.](images/MCA_config_pg.png "{{site.data.keyword.amashort}} Setup Authentication page")

  5. Enter the following authentication credentials, then click **Save**:
    - **Realm name**: Enter **myRealm**.
    - **Custom Identity Provider Url**: Enter the URL that you copied previously to identify your {{site.data.keyword.iotelectronics}} starter app in the following format: **https://<*myIoT4eStarterApp*>.mybluemix.net**
    - **Your Web Application Redirect URIs**: Leave this field blank.

      ![{{site.data.keyword.amashort}} Custom Authentication entry.](images/MCA_config_pg2.png "{{site.data.keyword.amashort}} Custom Authentication entry")

  6. Return to the Connections tab of the {{site.data.keyword.iotelectronics}} starter console by clicking the name of the starter app, which is located in the heading section.

   ![{{site.data.keyword.amashort}} breadcrumb.](images/MCA_breadcrumb.png "{{site.data.keyword.amashort}} breadcrumb")

## Configuring {{site.data.keyword.amashort}} in the Classic {{site.data.keyword.Bluemix_notm}} experience
{: #configMCAclassic}

1. In your {{site.data.keyword.Bluemix_notm}} dashboard, start your {{site.data.keyword.iotelectronics}} starter application by clicking the starter application tile.

    ![{{site.data.keyword.iotelectronics}} in the dashboard, Classic.](images/IoT4E_bm_dashboard_c.png "{{site.data.keyword.iotelectronics}} in the dashboard, Classic")

2. In your instance of {{site.data.keyword.iotelectronics}}, click the {{site.data.keyword.amashort}} service to open it.

  ![How to find {{site.data.keyword.amashort}}.](images/IoT4E_Connections_c.png "{{site.data.keyword.iotelectronics}} connections")

2. On the **Setup Authentication** page, locate the URL of your {{site.data.keyword.iotelectronics}} starter app by clicking **Mobile options**. Copy the URL that is located in the **Route** field.

  ![{{site.data.keyword.amashort}} Mobile options](images/MCA_config_mobileoptions.png "{{site.data.keyword.amashort}} Mobile options")

3. In the **Custom section of the **Setup Authentication** page, click **Configure**.

 ![Configure {{site.data.keyword.amashort}}.](images/MCA_config_pg.png "{{site.data.keyword.amashort}} Setup Authentication page")

4. Enter the following authentication credentials, then click **Save**:
   - **Realm name**: Enter **myRealm**.
   - **Custom Identity Provider Url**: Enter the URL that you copied previously to identify your {{site.data.keyword.iotelectronics}} starter app in the following format: **https://<*myIoT4eStarterApp*>.mybluemix.net**
   - **Your Web Application Redirect URIs**: Leave this field blank.

    ![{{site.data.keyword.amashort}} Custom Authentication entry.](images/MCA_config_pg2.png "{{site.data.keyword.amashort}} Custom Authentication entry")

5. Return to the Connections tab of the {{site.data.keyword.iotelectronics}} starter console, as follows:
  1. Display the menu by clicking the double arrows beside **Back to the Dashboard** option in the heading section.
  2. Click **Overview** to return to the starter console.

    ![{{site.data.keyword.amashort}} breadcrumb.](images/MCA_breadcrumb_c.png "{{site.data.keyword.amashort}} breadcrumb")

repository: kKronstainBrown/docs

repo_name: kKronstainBrown/docs


text:
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.0.4] - 2015-11-05
### Fixed
- colorize should have been a normal dependency

## [0.0.3] - 2015-11-05
### Added
- Abort on issues present

### Refactored
- Put domain specific code in `lib/webcheck.rb`

## [0.0.2] - 2015-11-03
### Fixed
- Gem lib path

## [0.0.1] - 2015-11-03
### Refactored
- Put URLs to check into separate `lib/urls.yaml` file.

## [0.0.0] - 2015-11-03
Initial Release

license: MIT

repository: justuswilhelm/webcheck

branch_name: refs/heads/master

extension: md

gha_language: Ruby

license_type: permissive

repo_name: justuswilhelm/webcheck


text:
# Agent Spec: DDQN+PER on LunarLander

## 📂The Agent Spec

In this tutorial we look at how to use an **agent spec** to specify an agent, which comprises of its algorithm, memory, and neural network. We will train a DDQN+PER agent on the LunarLander environment.

The agent is specified using the **agent** key in a spec file with the following format. It comprises of **algorithm spec**, **memory spec**, and **net spec**, which allows us to specify and compose modular components together in SLM Lab.

```javascript
{
  "{spec_name}": {
    "agent": [{
      "name": str,
      "algorithm": {
        // Name of an algorithm class in slm_lab/agent/algorithm/
        "name": str,

        // The probability distribution class used for sampling actions, declared in slm_lab/agent/algorithm/policy_util.py
        // - "default": use the default distribution based on the action type (discrete/continuous) of the environment
        // - {str}: use a custom distribution
        "action_pdtype": str,

        // The action policy used, defined in slm_lab/agent/algorithm/policy_util.py
        // - "default": directly sample action from the action distribution
        // - "random": sample action randomly from the environment's action space
        // - "epsilon_greedy": use epsilon-greedy policy (e.g. for DQN family)
        // - "boltzmann": use Boltzmann policy (e.g. for DQN family)
        "action_policy": str,

        // Algorithm-specific options
        ...
      },
      "memory": {
        // Name of a memory class in slm_lab/agent/memory/
        "name": str,

        // Memory-specific options
        ...
      },
      "net": {
        // Name of a network class in slm_lab/agent/net/
        "type": str,

        // Network-specific options
        ...
      }
    }],
    "env": [{...}],
    ...
  }
}
```

{% hint style="info" %}
The agent spec is a list to accommodate for multi-agent setting in the future version of SLM Lab. For full detail on agent spec, refer to [Algorithm](../development/algorithms/#algorithm-spec).
{% endhint %}

## ✍ Agent Spec for DDQN+PER

As an example, let's look at the agent spec for DDQN+PER \(Double DQN + Prioritized Experience Replay\) on LunarLander from [slm\_lab/spec/benchmark/dqn/ddqn\_per\_lunar.json](https://github.com/kengz/SLM-Lab/blob/master/slm_lab/spec/benchmark/dqn/ddqn_per_lunar.json).

{% code title="slm\_lab/spec/benchmark/dqn/ddqn\_per\_lunar.json" %}
```javascript
{
  "ddqn_per_concat_lunar": {
    "agent": [{
      "name": "DoubleDQN",
      "algorithm": {
        "name": "DoubleDQN",
        "action_pdtype": "Argmax",
        "action_policy": "epsilon_greedy",
        "explore_var_spec": {
          "name": "linear_decay",
          "start_val": 1.0,
          "end_val": 0.01,
          "start_step": 0,
          "end_step": 50000
        },
        "gamma": 0.99,
        "training_batch_iter": 1,
        "training_iter": 1,
        "training_frequency": 1,
        "training_start_step": 32
      },
      "memory": {
        "name": "PrioritizedReplay",
        "alpha": 0.6,
        "epsilon": 0.0001,
        "batch_size": 32,
        "max_size": 50000,
        "use_cer": false,
      },
      "net": {
        "type": "MLPNet",
        "hid_layers": [256, 128],
        "hid_layers_activation": "relu",
        "clip_grad_val": 10.0,
        "loss_spec": {
          "name": "SmoothL1Loss"
        },
        "optim_spec": {
          "name": "Adam",
          "lr": 2.5e-4
        },
        "lr_scheduler_spec": null,
        "update_type": "replace",
        "update_frequency": 100,
        "gpu": false
      }
    }],
    "env": [{
      "name": "LunarLander-v2",
      ...
    }],
    ...
  }
}
```
{% endcode %}

Here, we specify **algorithm spec** as "DoubleDQN", which is an algorithm class implemented in `slm_lab/agent/algorithm/dqn.py`. In particular, we are using the epsilon-greedy policy with the epsilon decay further specified in the **"explore\_var\_spec"**.

Thanks to the modular design of SLM Lab, we can compose DDQN with PER by simply specifying the **memory spec** to use "PrioritizedReplay". The total capacity of the memory and the batch size used for sampling elements from it is also given here.

Likewise, we are using a multi-layer perceptron \(feedforward\) network as the function approximator for DDQN, as given by the **net spec**. Notice how we fully expose the network architecture configuration in the spec, including the hidden layers and activation function. The input and output layers of the network is automatically inferred from the algorithm and environment's state space and action space. The loss function, network optimizer, learning rate scheduler, and training device are also specified here. No GPU is required for this training since LunarLander is not image-based.

{% hint style="info" %}
A full rundown of the spec requires a complete understanding of the algorithm at hand and the source code of SLM Lab. See [Learning Deep RL](../resources/untitled.md) for a list of recommended resources.
{% endhint %}

## 🚀 Running DDQN+PER on LunarLander

Let's run a Trial using the spec file above. First, run it in **dev** mode to see the rendering the LunarLander environment.

```bash
python run_lab.py slm_lab/spec/benchmark/dqn/ddqn_per_lunar.json ddqn_per_concat_lunar dev
```

![](../.gitbook/assets/lunarlander.png)

This is a harder environment with a vector state \(8 dimensions\) and a discrete action \(4 values\). A rendering of the environment is shown below. The goal of the task is to steer and land a spacecraft at the landing pad at the center between the two flags. The solution reward is above 200.

Now, let's terminate \(`Ctrl+C`\) and rerun it in **train** mode for the full duration.

```bash
python run_lab.py slm_lab/spec/benchmark/dqn/ddqn_per_lunar.json ddqn_per_concat_lunar train
```

This trial will take only a few hours to complete, and we will see the graphs similar to the ones below generated and saved to the `data/ddqn_per_concat_lunar_{ts}` folder.

The trial graph is an average of the 4 session graphs, each of which plots the episodic rewards once every 1,000 steps averaged over all the vector environments.

![](../.gitbook/assets/ddqn_per_concat_lunar_t0_trial_graph_mean_returns_vs_frames.png)

We can also smoothen the trial graph by plotting its moving average over a window of 100 to obtain the graph below.

![](../.gitbook/assets/ddqn_per_concat_lunar_t0_trial_graph_mean_returns_ma_vs_frames.png)

This tutorial shows us how to configure an agent using the spec file. Next, we will look at the how to configure an environment.

repository: kengz/SLM-Lab-doc

repo_name: kengz/SLM-Lab-doc


text:
Pull request for bug fixes and improvements. DM to my Twitter are welcome ([@Edditoria][my_twitter])

Thanks!

[screen-usage-facebook]: docs/images/facebook-usage-screenshot.png
[my_twitter]: https://twitter.com/Edditoria


text:
# Yawrricks
Yawrricks - Johnny Wong, Richard Wong, and Zane Wang

APCS pd1

L01 -- What Does the Data Say?

2018-03-14

## Hypothesis

 Yawrricks hypothesizes that the best case of QuickSort would be the median as the pivot with a runtime of O(nlogn).
  The worst case would be a random index of an array as the pivot with a runtime of O(n*n). The average case is approximately
   O(nlogn) with the pivot either being the left or right bound of the array.

## Background

 Due to requiring communication like a strong team should, we had other applications such as Google Chrome to write code
   cohesively through https://codeshare.io/ (great site) and Discord for verbal communication. These processes required memory
   which may have slowed down our program.

## Experiment Methodology
  1. Perform 500 trials on the best case, the worst case, and the average case by creating 500 different arrays, that increment
  in size by 100, starting at a size of 1000.
  2. Start timing after these processes have been initialized. Run the quicksort method corresponding to each case, changing the
  pivot depending on the case. Stop timing after each array is sorted.
  3. Print this data into qsort.csv.
  4. Import qsort.csv into Google Spreadsheets in order to create the graphs below.

## Results
  Best Case:

  ![alt text](bestcase.png)

  Worst Case:

  ![alt text](worstcase.png)

  Average Case:

  ![alt text](averagecase.png)

## Conclusions

 Our data appears to show that when QuickSort is run, indiscrimnate of the pivot position and size, the runtime will be O(n^2).
  The best case of QuickSort should have been O(nlogn) because the partition divided the array into two parts at each call.
  The problem may have arisen from the randomness in our arrays resulting in outliers and abnormal data.
  One improvement to our experiment would have been running multiple trials on the same array and taking the average time to reduce inconsistencies.


text:
### Model Description
The Gene Expression Autoencoder capability (Pilot 1 Benchmark 1, also known as P1B1) is an autoencoder that can collapse high-dimensional expression profiles into low-dimensional vectors without much loss of information. The proposed network architecture includes encoding layers, dropout layers, bottleneck layer, and decoding layers. At least three hidden layers are required, including one encoding layer, one bottleneck layer, and one decoding layer. It is useful for compressing the high dimensional expression profiles into low dimensional vectors.

### Description of the Data
* Data source: RNA-seq data from GDC
* Input dimensions: 60,484 floats; log(1+x) transformed FPKM-UQ values
* Output dimensions: Same as input
* Latent representation dimension: 1000
* Sample size: 4,000 samples (3000 training + 1000 test)
* Notes on data balance and other issues: unlabeled data draw from a diverse set of cancer types

### Expected Outcomes
* Reconstructed expression profiles
* Output range: float; same as log transformed input

### Setup
To set up the Python environment needed to train and run this model:
1. Install [conda](https://docs.conda.io/en/latest/) package manager.
2. Clone this repository.
3. Create the environment as shown below.

```bash
   conda env create -f environment.yml -n P1B1
   conda activate P1B1
   ```

To download the processed data needed to train and test the model, and the trained model files:
1. Create an account on the Model and Data Clearinghouse [MoDaC](modac.cancer.gov).
2. Follow the instructions in the Training section below.
3. When prompted by the training and test scripts, enter your MoDaC credentials.

### Training

To train the model from scratch, execute the script [p1b1_baseline_keras2.py](p1b1_baseline_keras2.py), as follows:

```cd Pilot1/P1B1
   python p1b1_baseline_keras2.py --cp TRUE --save_path p1b1 --model vae
   ```

The script  does the following:
* Reads the model configuration parameters from [p1b1_default_model.txt](p1b1_default_model.txt).
* Downloads the training data and splits it to training/validation sets.
* Creates and trains the Keras model.
* Saves the best-trained model based on the model performance on the validation dataset.

The first time you run the script, it downloads the training and test data files. Then it caches the files for future runs.

The baseline implementation supports three types of autoencoders controlled by the `--model` parameter: regular autoencoder (`ae`), variational autoencoder (`vae`), and conditional variational autoencoder (`cvae`).

#### Example Output of Variational Autoencoder (VAE)

```
Using TensorFlow backend.

Shape x_train: (2700, 60483)
Shape x_val:   (300, 60483)
Shape x_test:  (1000, 60483)
Range x_train: [0, 1]
Range x_val:   [0, 1]
Range x_test:  [0, 1]
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to
==================================================================================================
input_1 (InputLayer)            (None, 60483)        0
__________________________________________________________________________________________________
dense_1 (Dense)                 (None, 2000)         120968000   input_1[0][0]
__________________________________________________________________________________________________
dense_2 (Dense)                 (None,<PHONE_NUMBER>     dense_1[0][0]
__________________________________________________________________________________________________
z_mean (Dense)                  (None, 2)            1202        dense_2[0][0]
__________________________________________________________________________________________________
z_log_var (Dense)               (None, 2)            1202        dense_2[0][0]
__________________________________________________________________________________________________
lambda_1 (Lambda)               (None, 2)            0           z_mean[0][0]
                                                                 z_log_var[0][0]
__________________________________________________________________________________________________
model_2 (Model)                 (None, 60483)        122230283   lambda_1[0][0]
==================================================================================================
Total params: 244,401,287
Trainable params: 244,401,287
Non-trainable params: 0
__________________________________________________________________________________________________
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
input_3 (InputLayer)         (None, 2)                 0
_________________________________________________________________
dense_3 (Dense)              (None, 600)               1800
_________________________________________________________________
dense_4 (Dense)              (None, 2000)              1202000
_________________________________________________________________
dense_5 (Dense)              (None, 60483)             121026483
=================================================================
Total params: 122,230,283
Trainable params: 122,230,283
Non-trainable params: 0
_________________________________________________________________
None
Train on 2700 samples, validate on 300 samples

Epoch 99/100
 - 7s - loss: 0.4319 - xent: 0.4315 - corr: 0.8419 - mse: 0.0292 - val_loss: 0.4771 - val_xent: 0.4769 - val_corr: 0.7460 - val_mse: 0.0466
Current time ....677.235
Epoch 100/100
 - 7s - loss: 0.4317 - xent: 0.4314 - corr: 0.8421 - mse: 0.0292 - val_loss: 0.4754 - val_xent: 0.4752 - val_corr: 0.7504 - val_mse: 0.0459
Current time ....684.103
```

### Preliminary Performance

The current best performance in terms of validation correlation for the three types of autoencoders are as follows:

* AE: 0.74
* VAE: 0.77
* CVAE: 0.77

### Inference

To test the trained model in inference, execute the script [p1b1_infer.py](p1b1_infer.py), as follows:

```bash
   python p1b1_infer.py --model vae --model_name p1b1
   ```

This script does the following:
* Downloads the trained model from MoDaC.
* Downloads the processed test dataset from MoDaC with the corresponding labels.
* Learns a representation for the test dataset.
* Reports the performance of the model on the test dataset, including mse, r2_score, and correlation.
* Creates the 2D latent representation of encoded test dataset.

#### Example Output
```
Evaluation on test data: {'mse': 0.033340786, 'r2_score': 0.15194242634880137, 'correlation': 0.8182240011660016}

```
Here is a visual example of the 2D latent representation from VAE.
![VAE latent representation](https://github.com/CBIIT/NCI-DOE-Collab-Pilot1-Gene_Expression_Autoencoder/blob/e40dc4eb0e1ab58ef50d0e3a80a265a2ba036c96/Pilot1/P1B1/images/p1b1.vae.latent.png)


text:
---
title: Manage security and authorization
description: >
  Security, access control, and sensitive secret handling are incredibly important
  when handling any sort of sensitive data.
  This section provides information about managing the security of your InfluxDB instance.
weight: 12
menu:
  influxdb_cloud:
    name: Security & authorization
influxdb/cloud/tags: [security, authentication]
---

Security, access control, and sensitive secret handling are incredibly important
when handling any sort of sensitive data.
This section provides information about managing the security of your InfluxDB instance.

{{< children >}}

gha_license_id: MIT


text:
---
title: Frequency Transformation
sidebar:
  nav: docs-en
aside:
  toc: true
key: 20200929_en
tags: Signal_Processing
lang: en
---

This post is a summary of Professor S. C. Duta Roy's lecture at IIT (Indian Institute of Technology), which can be found at [here](https://www.youtube.com/watch?v=UTznDX7GgkQ&ab_channel=nptelhrd).

# Objectives

1. Understand the concept of Normalized Lowpass Filter.
2. Understand the transformation between filters.
3. Understand the geometrically symmetric property of Bandpass Filters or Bandstop Filters and the problems and solutions it brings.
4. Design filters using Butterworth and Chebyshev Filters based on filter specifications.

# 1. Frequency Transformation

## a. Normalized Lowpass Filter

  Figure 1. Normalized Lowpass Filter.

The Normalized Lowpass Filter (NLPF) is a type of Lowpass Filter with $\Omega_p=1$, and $\Omega_c$ is a variable that can be changed according to the filter's specification. NLPF is important because it can be transformed into any other type of filter.

## b. Terminology

For convenience, we will refer to other types of filters as Other Kinds of Filters (OKF), which are all denormalized forms of NLPF. We will also use the abbreviations LPF, HPF, BPS, and BSP for Lowpass, Highpass, Bandpass, and Bandstop Filters, respectively.

To distinguish between the Laplace frequency $s=j\Omega$ before and after transformation, we will use uppercase S for NLPF and lowercase s for the transformed form.

## c. Frequency Transformation from NLPF to OKF

### 1) NLPF $\rightarrow$ Denormalized LFP

The transformation from Normalized Lowpass Filter (NLPF) to Denormalized Lowpass Filter (DLPF) is generally achieved by the following transformation:

---

Definition 1. Transformation

Normalized Lowpass Filter $\rightarrow$ Denormalized Lowpass Filter

To obtain a Denormalized Lowpass Filter with a passband frequency $\Omega_p$ from a Normalized Lowpass Filter, the following transformation can be applied:

$$S\rightarrow \frac{s}{\Omega_p}$$

---

In summary, the statement "transform $S$ to $s/\Omega_p$" means that $S$ should be replaced by $s/\Omega_p$.

This transformation is not difficult, but it demonstrates the validity of frequency transformation. For example, the transformation can be achieved through the following process. Consider a simple NLPF as follows:

$$\frac{1}{S+1}$$

This LPF can be transformed through the NLPF DLPF transformation as follows:

$$\frac{1}{S+1}\rightarrow \frac{1}{s/\Omega_p +1}=\frac{\Omega_p}{s+\Omega_p}$$

### 2) NLPF $\rightarrow$ Denormalized HPF

Generally, the transformation from Normalized Lowpass Filter (NLPF) to Denormalized Highpass Filter (DHPF) is as follows.

---

Definition 2. Transformation

To obtain a Denormalized Highpass Filter (DHPF) with passband frequency $\Omega_p$ from a Normalized Lowpass Filter (NLPF), the following transformation can be applied:

$$S\rightarrow \frac{\Omega_p}{s}$$

---

Let's examine the validity of this transformation through some function values:

$$S = 0 \rightarrow s = \infty$$

$$S = \infty \rightarrow s = 0$$

$$S = \pm j \rightarrow s \mp j\Omega_p$$

$S=\pm j$ refers to the passband frequency of the NLPF. This is because of the relationship $s=j\Omega$; thus, the $\Omega_p$ on the $\Omega$-axis refers to $j\Omega_p$ in the $s$-domain.

Through this examination, we can confirm that Definition 2's transformation is appropriate for transforming an NLPF into a DHPF. For example:

$$\frac{1}{S+1}\rightarrow \frac{1}{\Omega_p/s + 1}=\frac{s}{\Omega_p+s}$$

Additionally, we should consider the existence of negative frequencies. From the relationship:

$$S = \pm j \rightarrow s \mp j\Omega_p$$

We can see that the frequency of the DHPF corresponding to $S=j$ is $-j\Omega_p$, and the frequency corresponding to $S=-j$ is $j\Omega_p$. In fact, mathematically, all filters have a negative frequency range, and their amplitudes are symmetric with respect to the y-axis.

However, we are interested in frequencies between 0 and $\infty$, and since $S=-j$ corresponds to a positive frequency $s=\Omega_p$ being outputted, this transformation is mathematically and practically sound because we only need to obtain the necessary result.

### 3) NLPF $\rightarrow$ Denormalized BPF

The following is the transformation from Normalized Lowpass Filter to Denormalized Bandpass Filter, which is commonly used.

---

Definition3. Transformation

Normalized Lowpass Filter $\rightarrow$ Denormalized Bandpass Filter

To obtain a Denormalized Bandpass Filter with center frequency $\Omega_0$ and passband edge $\Omega_{p1}$ and $\Omega_{p2}$ ($\Omega_{p1}>\Omega_{p2}$) from a Normalized Lowpass Filter, the following transformation can be applied:

$$S\rightarrow \frac{Q(s^2+\Omega_0^2)}{\Omega_0\times s}$$

where $Q$ and $B$ are defined as

$$Q = \frac{\Omega_0}{B}$$

and

$$B = \Omega_{p2}-\Omega_{p1}$$

---

As with the NLPF $\rightarrow$ DLPF and NLPF $\rightarrow$ DHPF transformations, let's examine the validity of the transformation in Def. 3 through a few values of $s$ and their corresponding output values.

$$S = 0\rightarrow s \pm j\Omega_0$$

$$S =\infty \rightarrow s = \begin{cases}0 \\ \infty\end{cases}$$

In summary, when the value of $S$ is $0$ in NLPF, it is transferred to the center frequency value of DBPF, and when the value of $S$ is $\infty$, it is transferred to the values $0$ and $\infty$ of DBPF. The shape of the bandpass filter that can be obtained through the transformation of Definition 3 has a passband frequency that is the most important part in implementing a bandpass filter. When $S = \pm j$, we can find the passband frequency in the bandpass filter from NLPF as follows:

---

Derivation 1. Finding passband frequency in the bandpass filter from NLPF

Proof:

① When $S = +j$,

By Definition 3,

$$\frac{Q(s^2+\Omega_0^2)}{\Omega_0 \times s} = j$$

$$\Rightarrow s^2 +\Omega_0^2 -j\frac{Q_0\times s}{Q} = 0$$

$$\Rightarrow s^2 - j\frac{\Omega_0}{Q}s+\Omega_0^2 = 0$$

By using the quadratic formula,

$$\therefore s = \frac{j\Omega_0/Q\pm\sqrt{-\Omega_0^2/Q^2-4\Omega_0^2}}{2}$$

$$=\frac{j\Omega\pm\Omega_0\sqrt{-(1+4Q^2)}}{2Q}$$

$$=\frac{j\Omega_0}{2Q}\left[1\pm\sqrt{1+4Q^2}\right]$$

In this case, since $\sqrt{1+4Q^2}>1$ is evident, it can be seen that one of the roots of s is positive and the other is negative.

② When $s=-j$,

Similarly, using the transformation equation,

$$\frac{Q(s^2 + \Omega_0^2)}{\Omega_0\times s} = -j$$

$$s^2 + \Omega_0^2 + j\frac{\Omega_0\times s}{Q} = 0$$

$$s^2 + j\frac{\Omega_0}{Q}s + \Omega_0^2 = 0$$

It can be observed that only the sign of the coefficient of the first term of the quadratic equation has changed. Therefore, we can simply write down the solution for s without further algebra.

$$s = j\frac{\Omega_0}{2Q}\left[-1\pm\sqrt{1+4Q^2}\right]$$

Thus, even when $s=-j$, two solutions of opposite signs are obtained.

③ Intermediate conclusion

In conclusion, it can be seen that the DBPF has four roots due to NLPF's $\Omega_p=1$ (or $S=\pm j$). These four roots consist of two positive and two negative roots.

④ Relation between solutions

When considering the two positive roots, we can obtain the following relationship:

$$s = j\frac{\Omega_0}{2Q}\left[\pm1+\sqrt{1+4Q^2}\right]$$

Thus, the following relationship can be obtained.

$$S = j \rightarrow s = \pm j\Omega_{p1, p2}$$

$$\Omega_{p1} = \frac{\Omega_0}{2Q}\left[\sqrt{1+4Q^2}-1\right]$$

$$\Omega_{p2} = \frac{\Omega_0}{2Q}\left[\sqrt{1+4Q^2}+1\right]$$

At this moment, we can see that $\Omega_{p1}\times\Omega_{p2}=\Omega_0^2$.

---

Through the above derivation, we can see that $\Omega_{p1}\times\Omega_{p2}=\Omega_0^2$ is an important fact when determining the center frequency of a bandpass filter or finding the passband edges using the center frequency.

To summarize, the center frequency is not the arithmetic mean but the geometric mean of the two passband edges. Additionally, this geometric mean applies not only to the passband edges but also to any symmetric pair of frequencies, including the stopband edges $\Omega_{s1}$ and $\Omega_{s2}$.

Therefore, we have:

$$\Omega_0^2 = \Omega_{p1}\Omega_{p2}$$

$$\Omega_0^2 = \Omega_{s1}\Omega_{s2}$$

and the passband and stopband edges must satisfy the relationship:

$$\Omega_0^2 = \Omega_{p1}\Omega_{p2} = \Omega_{s1}\Omega_{s2}$$

Consequently, as with designing a Butterworth filter, it may not be possible to design a bandpass filter that satisfies all the specifications demanded by the consumer. Therefore, one can only design a bandpass filter that exactly satisfies $\Omega_p$ and over-satisfies $\Omega_s$.

### 4) NLPF $\rightarrow$ Denormalized BSF

Now let's design a bandstop filter.

---

Definition 4. Transformation

We can obtain a Denormalized Bandstop Filter with center frequency $\Omega_0$ and passband edges $\Omega_{p1}$ and $\Omega_{p2}$ ($\Omega_{p1}>\Omega_{p2}$) from a Normalized Lowpass Filter by applying the following transformation:

$$S\rightarrow \frac{\Omega_0\times s}{Q(s^2+\Omega_0^2)}$$

where $Q$ and $B$ are defined as

$$Q = \frac{\Omega_0}{B}$$

and

$$B = \Omega_{p2}-\Omega_{p1}$$

---

Bandstop Filter can be considered as the inverse of Bandpass Filter. As with the previous process, let's verify the validity of the transformation by substituting some values.

$$S = 0 \rightarrow s = 0 \text{ or } \infty$$

$$S = \infty \rightarrow s = \pm j\Omega_0$$

Therefore, we can see from the formula that the result has the following shape:

As with the Bandpass Filter, the geometric mean property also applies to the Bandstop Filter. In other words,

$$\Omega_0^2 = \Omega_{p1}\Omega_{p2}=\Omega_{s1}\Omega_{s2}$$

[//]:# (Equation 37)

# 2. Practical problems that arise in making BPF or BSF

So far, we have learned that when designing filters other than LPF, it is possible to design them through a Normalized LPF using the Frequency Transformation method. The specific process was as follows:

For Bandpass Filter and Bandstop Filter, they must satisfy

$$\Omega_0^2 = \Omega_{p1}\Omega_{p2} = \Omega_{s1}\Omega_{s2}$$

This relationship was related to solving the roots of a quadratic equation when $S = \pm j$.

When we are asked to design a filter, $\Omega_0$ is usually not given, but $\Omega_{p1},\Omega_{p2}$ and $\Omega_{s1},\Omega_{s2}$ are given.

If $\Omega_{p1},\Omega_{p2}$ and $\Omega_{s1},\Omega_{s2}$ cannot satisfy equation (38), then we can adjust either $\Omega_{s1}$ or $\Omega_{s2}$ to obtain a normal Bandpass Filter or Bandstop Filter that oversatisfies the stopband frequency while satisfying equation (38).

## a. Case where $\Omega_{s1}\Omega_{s2}>\Omega_{p1}\Omega_{p2}$ and $\Omega_{p1}\Omega_{p2}=\Omega_0^2$

In this case, we need to reduce the magnitude of $\Omega_{s1}\Omega_{s2}$.

Which of $\Omega_{s1}$ and $\Omega_{s2}$ should we reduce? Let's think while looking at the following diagram:

To reiterate, we are facing the situation where $\Omega_{s1}\Omega_{s2}>\Omega_{p1}\Omega_{p2}$ and $\Omega_{p1}\Omega_{p2}=\Omega_0^2$.

In order to oversatisfy the specifications of the filter, we need to decrease $\Omega_{s2}$ of the filter. If we make $\Omega_{s1}$ too small, then the filter will not satisfy the filter specification. Therefore, the new $\hat{\Omega}_{s2}$ can be calculated as follows:

$$\hat{\Omega}_{s2}=\frac{\Omega_0^2}{\Omega_{s1}}$$

In the case where $\Omega_{s1}\Omega_{s2}<\Omega_{p1}\Omega_{p2}$ and $\Omega_{p1}\Omega_{p2}=\Omega_0^2$, we need to increase the size of $\Omega_{s1}$. Similarly, the new $\hat{\Omega}_{s1}$ can be calculated as follows:

$$\hat{\Omega}_{s1}=\frac{\Omega_0^2}{\Omega_{s2}}$$

Now that we have adjusted the stopband edges of the bandpass filter, we need to consider how this affects the corresponding specifications of the NLPF. Given the values of $\delta_p$ and $\delta_s$ and sufficient information about $\Omega_p$, we can think about the value of $\Omega_s$ in the NLPF.

The value of $\Omega_s$ in the NLPF can be determined by the transformation to the BPF as:

$$S = \frac{s^2 +\Omega_0^2}{B\times s}$$

where $S=j\Omega_s$. The stopband edges of the BPF, $\Omega_{s1,s2}$, can be found by the relationship $s=j\Omega_{s1,s2}$. Therefore, the following equation holds.

$$j\Omega_s = \frac{-\Omega_{s1}^2 + \Omega_0^2}{Bj\Omega_{s1}}$$

or

$$j\Omega_s = \frac{-\Omega_{s2}^2 + \Omega_0^2}{Bj\Omega_{s2}}$$

Hence, we can figure out that the following holds:

$$\Omega_s = \frac{\Omega_0^2-\Omega_{s1}^2}{B\Omega_{s1}}$$

[//]:# (식 44)

or

$$\Omega_s = \frac{\Omega_0^2-\Omega_{s2}^2}{B\Omega_{s2}}$$

[//]:# (식 45)

However, we can see that these two equations refer to negative frequency. At this point, we intuitively know that positive frequency and negative frequency differ only in sign, but have the same value of frequency. Therefore, it is possible to use equation (44) or equation (45) interchangeably. To reiterate, a total of four frequencies, including $\pm\Omega_{s1}$ and $\pm\Omega_{s2}$, are mapped to $\pm\Omega_s$. Therefore, finding positive frequency using this method can be considered mathematically correct.

Therefore, if we only consider $\Omega_{s1}$ among $\Omega_{s1}$ and $\Omega_{s2}$, we can obtain the following result:

$$\Omega_{s(NLPF)}=\frac{\Omega_0^2-\Omega_{s1}^2}{B\Omega_{s1}}$$

$$=\frac{\Omega_0^2}{B\Omega_{s1}}-\frac{\Omega_{s1}^2}{B\Omega_{s1}}$$

$$=\frac{\Omega_{s1}\Omega_{s2}}{B\Omega_{s1}}-\frac{\Omega_{s1}^2}{B\Omega_{s1}}$$

$$=\frac{\Omega_{s2}-\Omega_{s1}}{B}$$

$$=\frac{\Omega_{s2}-\Omega_{s1}}{\Omega_{p2}-\Omega_{p1}}$$

# 3. Order of Filter Design

① Obtain the specification of Other Kind of Filter (OKF) other than NLPF.

② Convert the specification to that of NLPF (find $\Omega_s$ using the transformation method or the method obtained in 2.).

③ Design NLPF.

④ Transform the filter using the transformation $S=f(s)$.

⑤ Calculate $H_{OKF}(s)$ for OKF.


text:
> *NOTE* This document was written for stroom v4/5. Some parts may not be applicable for v6+.

## Securing Stroom

### Firewall

The following firewall configuration is recommended:

- Outside cluster drop all access except ports HTTP 80, HTTPS 443, and any other system ports your require SSH, etc
- Within cluster allow all access

This will enable nodes within the cluster to communicate on:

- Native tomcat HTTP 8080, 9080
- Tomcat AJP 8009, 9009
- MySQL 3006

### MySQL

- It is recommended that you run mysql_secure_installation to set a root password and remove test database:

```bash
mysql_secure_installation (provide a root password)
- Set root password? [Y/n] Y
- Remove anonymous users? [Y/n] Y
- Disallow root login remotely? [Y/n] Y
- Remove test database and access to it? [Y/n] Y
- Reload privilege tables now? [Y/n] Y
```

- stroom-setup includes a version of this script designed to be run on instances create using mysqld_instance.sh
(i.e. non standard or multiple instances of mysql)

```bash
[stroomuser@stroom_1 stroom-setup]$ ./mysql_secure_installation.sh --name=mysqld_ref1m
```


text:
Hello!

Thanks for making this contribution! When contributing to this repository please keep in mind the following:
- [You should sign your work](https://github.com/NVIDIA/gpu-operator/blob/master/CONTRIBUTING.md).
- You should be making your contribution against the [gitlab.com repository](https://gitlab.com/nvidia/kubernetes/gpu-operator) as github.com is just a mirror.

repository: NVIDIA/gpu-operator

gha_language: Go

repo_name: NVIDIA/gpu-operator


text:
# Pymanopt

[![Latest version](https://badge.fury.io/py/pymanopt.svg)](https://badge.fury.io/py/pymanopt)
[![Downloads](https://static.pepy.tech/personalized-badge/pymanopt?period=total&units=international_system&left_color=grey&right_color=green&left_text=Downloads)](https://pepy.tech/project/pymanopt)
[![Build status](https://github.com/pymanopt/pymanopt/actions/workflows/run_tests.yml/badge.svg)](https://github.com/pymanopt/pymanopt/actions/workflows/run_tests.yml)
[![Coverage](https://coveralls.io/repos/github/pymanopt/pymanopt/badge.svg?branch=master)](https://coveralls.io/github/pymanopt/pymanopt?branch=master)
[![Gitter](https://badges.gitter.im/pymanopt/pymanopt.svg)](https://gitter.im/pymanopt/pymanopt?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Please refer to the **documentation at [pymanopt.org](https://pymanopt.org)**
and this [JMLR paper](http://www.jmlr.org/papers/v17/16-177.html) to get
started with optimization on manifolds using Pymanopt.

We encourage users and developers to report problems, request features,
ask for help, or leave general comments either here on github,
[gitter](https://gitter.im/pymanopt/pymanopt), or via email to one of the
[maintainers](MAINTAINERS).

Please refer to the [documentation](https://pymanopt.org/docs/) and the
[contributing guide](CONTRIBUTING.md) if you wish to extend Pymanopt's
functionality and/or contribute to the project.

Pymanopt is distributed under the [3-clause BSD license](LICENSE).

repository: vishalbelsare/pymanopt

gha_language: Python

repo_name: vishalbelsare/pymanopt


text:
You've probably heard of the human genome,
the huge collection of genes
inside each and every one of your cells.
You probably also know
that we've sequenced the human genome,
but what does that actually mean?
How do you sequence someone's genome?
Let's back up a bit.
What is a genome?
Well, a genome is all the genes plus some extra
that make up an organism.

Your genome is the code
that your cells use to know how to behave.
Cells interacting together make tissues.
Tissues cooperating with each other make organs.
Organs cooperating with each other
make an organism,
you!

The first human genome
was sequenced ten years ago
and was no easy task.
It took two decades to complete,
required the effort of hundreds of scientists
across dozens of countries,
and cost over three billion dollars.
But some day very soon,
it will be possible to know the sequence of letters
that make up your own personal genome
all in a matter of minutes
and for less than the cost
of a pretty nice birthday present.
How is that possible?
Let's take a closer look.
Knowing the sequence of the billions of letters
that make up your genome
is the goal of genome sequencing.
A genome is both really, really big
and very, very small.
The individual letters of DNA,
the A's, T's, G's, and C's,
are only eight or ten atoms wide,
and they're all packed together into a clump,
like a ball of yarn.
So, to get all that information
out of that tiny space,
scientists first have to break
the long string of DNA down into smaller pieces.
Each of these pieces is then separated in space
and sequenced individually,
but how?
It's helpful to remember
that DNA binds to other DNA
if the sequences are the exact opposite of each other.
A's bind to T's,
and T's bind to A's.
G's bind to C's,
and C's to G's.
If the A-T-G-C sequence of two pieces of DNA
are exact opposites,
they stick together.
Because the genome pieces
are so very small,
we need some way to increase
the signal we can detect
from each of the individual letters.
In the most common method,
scientists use enzymes to make thousands of copies
of each genome piece.
So, we now have thousands of replicas
of each of the genome pieces,
all with the same sequence
of A's, T's, G's, and C's.
But we have to read them all somehow.
To do this, we need to make
a batch of special letters,
each with a distinct color.
A mixture of these special colored letters and enzymes
are then added to the genome
we're trying to read.
At each spot on the genome,
one of the special letters
binds to its opposite letter,
so we now have a double-stranded piece of DNA
with a colorful spot at each letter.
Scientists then take pictures
of each snippet of genome.
Seeing the order of the colors
allows us to read the sequence.
The sequences of each
of these millions of pieces of DNA
are stitched together using computer programs
to create a complete sequence of the entire genome.
This isn't the only way
to read the letter sequences of pieces of DNA,
but it's one of the most common.
Of course, just reading the letters in the genome
doesn't tell us much.
It's kind of like looking through a book
written in a language you don't speak.
You can recognize all the letters
but still have no idea what's going on.
So, the next step is to decipher
what the sequence means,
how your genome and my genome are different.
Interpreting the genes of the genome
is the part scientists are still working on.
While not every difference is consequential,
the sum of these differences
is responsible for differences
in how we look,
what we like,
how we act,
and even how likely we are to get sick
or respond to specific medicines.
Better understanding of how disparities
between our genomes
account for these differences
is sure to change the way we think
not only about how doctors treat their patients,
but also how we treat each other.

repository: prewittdavon/TEDVis

repo_name: prewittdavon/TEDVis


text:
---
layout: entry
title:  "Pagination control"
categories: controls

keyboard:
  tab: |
    Focus visibly moves to control
  arrow keys: |
    Navigate through the pages

mobile:
  swipe up/down: |
    Select pages on iOS
  two finger swipe: |
    Select pages on Android

screenreader:
  name:  |
    The page index (Ex: Page 1 of 3)
  role:  |
    Identifies as "adjustable" in iOS, Android: n/a -name communicates it is a page control
  group: |
    n/a
  state: |
    Expresses its state (disabled/dimmed)
---

## Developer notes

A control that displays a horizontal series of dots, each of which corresponds to a page in the app’s document

### Name

- Page X of X
- **iOS**
  - setTitle( ) method
  - Set a label in Interface Builder in the Identity Inspector
  - accessibilityLabel
  - _(accessibilityLabel overrides setTitle)_
- **Android**
  - android:text XML attribute
  - contentDescription
  - _(contentDescription overrides android:text_

### Role

- **iOS**
  - UIPageControl
  - Announcement: adjustable
- **Android**
  - TabLayout with ViewPager
  - Announcement: no role is announced. Hearing Page x of x in the name tells the screen reader user it is adjustable with two finger swipe. Role and Name are the same for this component.

### Groupings

- n/a

### State

- **iOS**
  - Active: isEnabled property
  - Disabled: UIAccessibilityTraitNotEnabled. Announcement: dimmed
- **Android**
  - Active: android:enabled=true
  - Disabled: android:enabled=false. Announcement: disabled

### Focus

- Only manage focus when needed. Primarily, let the device manage default focus.

- Consider how focus should be managed between child elements and their parent views.
- **iOS Options**
  - accessibilityElementIsFocused
  - isAccessibilityElement - Yes, if the element can respond to user input
  - To move screen reader focus to newly revealed content: UIAccessibilityLayoutChangedNotification
  - To NOT move focus, but announce new content: UIAccessibilityAnnouncementNotification
- **Android Options**
  - android:focusable=true
  - android=clickable=true
  - Implement an onClick( ) event handler for keyboard, not onTouch( )
  - nextFocusDown
  - nextFocusUp
  - nextFocusRight
  - nextFocusLeft
  - accessibilityTraversalBefore (or after)
  - To move screen reader focus to newly revealed content: Type_View_Focused
  - To NOT move focus, but announce new content: accessibilityLiveRegion
  - To hide controls: Important_For _Accessibility_NO

branch_name: refs/heads/main


text:
# bloom-dynamic-search-phrase

![](images/stewieBetterBloom.jpg)

### Love working with Neo4j Bloom, but miss being able to to AND / OR conditional searches that you're used to with classic BI tools? _*Hopefully*_ this will help.

This repository contains the supporting queries for the [medium blog](https://medium.com/p/bdf0a2984837/).

The Cypher queries referenced are data creation queries:

| File Name                          | Description                                                                     |
| ---------------------------------- | ------------------------------------------------------------------------------- |
| 0_1_creatMovieDB.cypher            | Create movies db, from :play movies gist                                        |
| 0_2_enhanceMovie.cypher            | Add `:Rich` and `:Famous` labels for multi-label search phrase                  |

The files beginning with "srchPhrs_" contain the text needed to create a Bloom search phrase. The files are broken into sections to match the input needed to build the Bloom search phrase.  The `:param` statements in these files provide parameter testing values for running the main Cypher query standalone.  The Bloom search phrase definition files are:

| File Name                          | Description                                                                     |
| ---------------------------------- | ------------------------------------------------------------------------------- |
| srchPhrs_1_runCypherText.cypher    | Search Phrase to run cypher query as text input                                 |
| srchPhrs_2_labelNumericProp.cypher | Search Phrase to pick a label and create conditional on a numeric property      |
| srchPhrs_3_labelMultiProp.cypher   | Search Phrase to pick a label with AND / OR conditionals on multiple properties |
| srchPhrs_4_multiLabelCombo.cypher  | Search Phrase to retrieve nodes with multiple and valid label combinations      |
| srchPhrs_5_showSchema.cypher       | Search Phrase to show graph schema (pick one technique in file)                 |

   ***

## Setup

### Enhancing the movies database

1. Have a movies database created by either running `:play movies` gist in the Neo4j Browser, or run "_0_1_creatMovieDB.cypher_"
1. Run the Cypher in "_0_2_enhanceMovie.cypher_" if you want to run the multi-label search phrase, after you've created the movies database (you do).

### Import Bloom perspective that includes the above search phrases into Bloom

1. Make the movies database referenced above the current running database.

1. Start Neo4j Bloom, either from Neo4j Desktop or the url for your server install.

1. Import the perspective "_Bloom conditional and dynamic queries.json_" into Bloom by clicking on "Import Perspective" from Bloom's Perspective Gallery.

license: Unlicense

repository: bigdatavik/bloom-dynamic-cond-search

repo_name: bigdatavik/bloom-dynamic-cond-search


text:
# regressionLabs

This project provides the code of simple regression labs to approximate a one-dimensional function.

To test yourself on the corresponding labs, you need a Google account. Get [the regression lab](https://colab.research.google.com/drive/1_ytWoxs2pITkvakHZ1HACfWnmq8X2RB6), copy-paste it and then answer the questions.

repository: miguelrfernandes/regressionLabs

repo_name: miguelrfernandes/regressionLabs


text:
# Chart.js Metrics Dashboard

This live demo shows a metrics dashboard built with Cube's GraphQL API, PostgreSQL as a database, Chart.js and react-chartjs-2 for data visualization, and Cube.

Follow the [tutorial](https://cube.dev/blog/graphql-postgres-metrics-dashboard-with-cube) or check out a live demo [here](https://graphql-postgres-metrics-dashboard.netlify.app/).

detected_licenses: MIT Apache-2.0 Cube

gha_language: Rust

gha_license_id: NOASSERTION


text:
# LED_strip_driver
Arduino Mini Pro driving RGB LED strip.

Runs from 12V 1A power supply. Uses a photoresistor to sense ambient light. At daytime LED strip is off, average current consumption is about 20 mA. At dusk Arduino switches relay on and runs LED patterns for about 4 hours. After that it switches relay off and keeps it off until next dusk.

PCB size 50x50mm. Relay is Millionspot H500S12. Arduino Mini Pro 5V 16 MHz. Photoresistor 1 MOhm. Enclosure is a 200 ml transparent plastic storage container from www.sistemaplastic.com

![Pic1](https://github.com/akouz/LED_strip_driver/blob/master/LED_strip_drv_in_box.jpg)

  * Gerber files for PCB fabrication in LED_strip_drv_rev_1_1.zip
  * Schematic in LED_strip_drv_rev_1_1.pdf
  * KiCAD_4 project in LED_strip_drv_KiCAD.zip


text:
# SMV Installation

SMV is currently supported on Linux (ubuntu, centos, etc) and OSX.

# Install JDK
SMV requires Sun Java JDK version 1.7 or 1.8.
Download Oracle JDK from [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)

For Ubuntu, please make sure to set the Sun java jdk as the default (See [Install JDK on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get) for details)

* Ensure JAVA_HOME environment variable is set in user profile and added to PATH:
```shell
$ export JAVA_HOME=jdk-install-dir
$ export PATH=$PATH:$JAVA_HOME/bin
```
* Verify JDK installlation in a new shell:
```shell
$ echo $JAVA_HOME
$ java -version
```

# Install Python

SMV works best with Python >= v2.7.x.  To verify the current version of python, run the following:

```bash
$ python --version
```

The correct version of python should already be present on Mac OSX.  For Ubuntu systems, python can be installed with:

```bash
$ sudo apt-get install python
```

# Install SMV

SMV installing requires either pip, curl, or wget to be available.  **Note:** The instructions below will also locally install the appropriate version of Apache Spark.  If Spark is already installed, then the `-spark` flag should be removed to skip the Spark installation.  If the Spark installation is skipped, then the current existing version of Spark **MUST** have been built with Hive support.

## Install SMV using pip

```bash
pip install smv  # install smv, assumes machine already has spark-submit + pyspark available
pip install smv[pyspark]  # installs pyspark along with smv
```

This will automatically add the SMV CLI scripts to the PATH inside of your Python environment

## Install SMV using curl

```bash
$ curl https://raw.githubusercontent.com/TresAmigosSD/SMV/v2.4r1/tools/smv-install | bash -s -- -spark
```

## Install SMV using wget

```bash
$ wget -qO- https://raw.githubusercontent.com/TresAmigosSD/SMV/v2.4r1/tools/smv-install | bash -s -- -w -spark
```

If curl/wget method doesn't work, we can use "sbt assembly" to build SMV by ourselves.

## Updating paths

The install script above will automatically update the user `.profile`, `.bash_profile`, or `.bashrc` files.  For the paths to take effect, user should log out, then log back in to update the paths in the shell.
Users can specify `--no-profile` to stop the update of the profile files.

## Verify SMV installation

To verify that SMV was installed correctly, run the following command:

```bash
$ type smv-run
```
The above should point to the `smv-run` script in the SMV tools directory.  If it can not find `smv-run` ensure that the profile rc file was sourced by either logging out / logging in or sourcing the appropriate profile file.

# Python packages

SMV depends on some third party python packages (e.g. jupyter, graphviz, etc).  To install these packages, use pip as follows:

```bash
$ dirname $(dirname $(type -p smv-run))  # this will show the SMV home directory.
$ pip install -r _SMV_HOME_/docker/smv/requirements.txt
```

repository: TresAmigosSD/SMV

repo_name: TresAmigosSD/SMV


text:
## Getting Started

```
$ npm install -g yo                                # Install Yeoman (if you don't have it yet)...
$ npm install -g generator-react-gulp-browserify   # ...then install this generator...
$ yo react-gulp-browserify                         # ...and run it.
```

If you chose to use sass, you'll need to install it with `gem install sass`.
If you find your css build results are empty, update your sass gem.

## Output folders

scripts - /scripts
styles - /styles
fonts - /fonts

Now, when everything is ready, run the watch task and begin to develop your React components.

```
$ gulp watch
```

How to run test?
Currently, I prefer to run test tasks from npm. Please run this command.
```
$ npm test
```

After development, you can run this task to generate production code.
```
$ gulp build
```

## License

MIT

repository: juliepanda/pennapps

repo_name: juliepanda/pennapps


text:
## What
Megapis is a node.js server application that runs workers.  A worker is an npm module,
and can do anything you can write: fetch data, send email, etc.   It includes a utility
module for workers to read and write data to a Redis backend.

## Why
here's lots of data out there, but it's often not in a format you can use.
Megapis is a framework to help get the info you want, how you want it.
I tried [IFTTT](https://ifttt.com/), but found it too limited -- can only get
content from their list of sources (including RSS but not web pages).
I tried [Huginn](https://github.com/cantino/huginn), but the abstraction didn't
seem quite right -- it's hard to express logic in JSON.  What I really wanted was an easy
way to take advantage of the vast resources just an `npm install` away.

## Who
Megapis is for someone who wants fine-grained control over what info to get, how to
process it, and what to do with it.  There is no user interface; you'll need to install and
run servers, and write workers in JavaScript.

This repository contains:

[server](server/README.md) - runs workers described by config file (default `config/global.json`)

[worker\_util](worker\_util/README.me) - utilities for workers to load, save, and compare values

[workers](workers) - sample workers

## Run a Megapis server

see [running a server](server/README.id)

## Writing a Megapis worker

A Megapis worker is a just a node module that exports a `run` method and (optionally)
a `requiredConfigKeys` array.  Require `megapis-worker` for functions that make
it easier to work with the Redis persistence store.

Before running the worker, the server merges its global
config with the worker config, and passes the config to the worker's run method.

To bootstrap a worker with all the files it needs:

Set environment variables:

`MEGAPIS_GIT_URL` - repository URL for use in worker's `package.json`
`MEGAPIS_AUTHOR` - author name for use in worker's `package.json`

From `megapis/worker_util`, run `new_Worker.js *worker_name* *worker_path*.  This
will generate a set of files in `worker_path/worker_name` and runs
`npm install` to get dependencies.  The files are:

- `index.js` - code to get information and save it to the store
- `package.json` - starter file with `log4js` and `megapis-worker` dependencies
- `README.md` - describe your worker
- `workerConfig.json` - sample configuration file

To have the Megapis server run your module without publishing it, use `npm link` to make it
available to your server:

    npm-link
    cd ../*server-directory*
    npm link *worker-name*

In `index.js`:

Specify required configuration keys:

    module.exports.requiredConfigKeys = ["location", "storageKeys.self", "storageKeys.output"];

Create a `run` method that gets a configration object:

    module.exports.run = function(callback) {
        ... do something ...
        callback(err, results);

Connect to store and config values `redis.port`, `redis.host`, and `redis.options`:

    var client = workerUtil.store.createClient(config);

Save results with key `storageKeys.self` in config, and back up previously saved value:

    var tidesKey = config.storageKeys.self;
    client.save(tidesKey, tides);

Get values that weren't seen in the previous run, save to `storageKeys.output`, and close
connection:

    client.getDiffJson(tidesKey, function(err, unseen) {
        if (unseen && unseen.length > 0) {
            client.add(config.storageKeys.output, unseen, 'Low tide');
        }
        client.quit();
        callback();
    });

### Testing a worker

Use `megapis/server/run-worker.js` to run a single worker.

First, set up your worker:

Add the worker to the `workers` hash in `server/config/global.json`.  For example,

    "workers": {
        "workerId": {
            "name": "Half Moon Bay Low Tide",
            "module": "megapis-low-tide"
        }
    },

Copy the worker's `workerConfig.json` to `server/config/workerId.json`, and
edit as needed.

Run the worker with `run_worker.js *worker_id*`.  For example,

    ./run_worker.js lowTide

repository: kielni/megapis

repo_name: kielni/megapis


text:
---
layout: default
---

# 1995-12-26 - anonther anonymous poster afraid to even tell us who they are

## Header Data

From<EMAIL_ADDRESS>(Fred Cohen)

To<EMAIL_ADDRESS>(Anonymous)

Message Hash: 90c8ef2dbd1344dfc73daade035a7669ce4436b175b32c91dd93d243d8b65f78

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-12-26 01:37:22 UTC

Raw Date: Tue, 26 Dec 1995 09:37:22 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Fred Cohen)
Date: Tue, 26 Dec 1995 09:37:22 +0800
To<EMAIL_ADDRESS>(Anonymous)
Subject: anonther anonymous poster afraid to even tell us who they are
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

Another anonymous poster tells the cypherpunks to abandon liberty by
abusing it.  When will the cypherpunks learn stand up to these people.

-> See: Info-Sec Heaven at URL http://all.net/
Management Analytics -<PHONE_NUMBER> - PO Box 1480, Hudson, OH 44236

{% endraw %}
```

## Thread

+ Return to [December 1995](/archive/1995/12)

+ Return to<EMAIL_ADDRESS>(Fred Cohen)](/authors/fc_at_all_net_fred_cohen_)"
+ Return to "[Kevin L Prigge <Kevin.L.Prigge-2@cis.umn.edu>](/authors/kevin_l_prigge_kevin_l_prigge2_at_cis_umn_edu_)"
+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"

+ 1995-12-25 (Tue, 26 Dec 1995 07:48:00 +0800) - [Re: corporate bashing](/archive/1995/12/a1529a2cd1c0aa0768f4951966d9820e3a9132403b88e4135e7e4e91d3aaacc4) -<EMAIL_ADDRESS>(Anonymous)_
  + 1995-12-26 (Tue, 26 Dec 1995 09:37:22 +0800) - anonther anonymous poster afraid to even tell us who they are -<EMAIL_ADDRESS>(Fred Cohen)_
    + 1995-12-27 (Wed, 27 Dec 1995 14:10:40 +0800) - [[NOISE] Re: anonther anonymous poster](/archive/1995/12/9963578172f757a228e64c98f22af76bbde6dfd08423f8bbc7a2204b52282d76) - _Kevin L Prigge<EMAIL_ADDRESS>


text:
# One Minute Paper

One Minute Paper is an Android application based on the concept retrieval learning. Retrieval learning is a strategy used to improve learning and memory recall. This app focuses on a simple method for implementing retrieval learning into your daily life. After taking a class, reading a chapter, listening to a lecture, or learning in any other way you fill out the two questions in the app without looking at notes. This will allow you to recall the main points and think about any areas that were unclear. More information can be found at [RetrievalPractice.org](https://www.retrievalpractice.org/)

## Motivation

This project was created after hearing about the concept in an audiobook. This app became an opportunity for me to apply many of the different Android development skills I had learned over the past year to my own work.

## Features

* SQLite database for storage
* Tabbed Layout
* Ability to track or delete past papers
* Simple and minimal user interface

## Installation

One Minute Paper can be downloaded and installed through the [Google Play Store](https://play.google.com/store/apps/details?id=com.loftydevelopment.oneminutepaper). To build this app from the source code see this [tutorial](https://www.londonappdeveloper.com/how-to-clone-a-github-project-on-android-studio/) for details.

## Authors

[Connor Loftus](https://github.com/connorlof)

## License

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

	Copyright (c) 2017 Connor Loftus

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

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

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

repository: connorlof/OneMinutePaper

repo_name: connorlof/OneMinutePaper


text:
OpenCL bindings for Haskell
===========================

These are OpenCL 1.2 bindings for Haskell. OpenCL resources are garbage
collected and OpenCL errors are thrown as exceptions.

GPGPU computing is some nifty stuff. Work in progress.

GHC 8.0 Trouble
---------------

Starting from GHC 8.0 the programs compiled with this Haskell compiler allocate
1 terabyte of unreserved memory at start up. While normally this is okay, on
Linux with nVidia's OpenCL library you may not be able to enumerate nVidia's
OpenCL platform.

Workaround is to use GHC 7.10 (or earlier) or recompile GHC 8.0 with
`--disable-large-address-space` to `./configure`.

license: ISC

repository: Noeda/opencl-bindings

repo_name: Noeda/opencl-bindings


text:
---
layout: event
homepage: false
title: "Social mapping Sunday: Rokeby Road"
date: "Sunday 6th November"
time: 9:30AM – 2PM
location:
    name: Rokeby Road
    address: Subiaco
    latitude: -31.94483
    longitude: 115.82405
registration_url: https://osmcal.org/event/1668/
---
Join us for a coffee and an exploration of Rokeby Rd in Subiaco at our next mapping party.

Everyone is welcome, no experience necessary.
We'll start the day at [La Maison Des Eclairs Cafe][1]
then explore for a couple of hours (in groups or all together),
before ending up somewhere else for lunch (location TBD on the day).

Morning tea sponsored by [OSGeo Oceania](https://osgeo-oceania.org/)!

Join the Geogeeks Slack to keep in touch!

[1]: https://la-maison-des-eclairs.business.site/

gha_language: CSS


text:
---
layout: default
---

# 1997-11-26 - AAAS amicus brief in Bernstein case is on the Web; Citadel files too.

## Header Data

From: John Gilmore<EMAIL_ADDRESS>To: bernstein-announce

Message Hash: f6bb82e5e5f1d276184dee13934e33b1992c3729923e613f495e5d4e50f0d3e8

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-11-26 10:16:35 UTC

Raw Date: Wed, 26 Nov 1997 02:16:35 -0800 (PST)

## Raw message

```
{% raw  %}From: John Gilmore<EMAIL_ADDRESS>Date: Wed, 26 Nov 1997 02:16:35 -0800 (PST)
To: bernstein-announce
Subject: AAAS amicus brief in Bernstein case is on the Web; Citadel files too.
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

The American Association for the Advancement of Science filed a rather
good 62-page "brief" arguing that:

    I. The Regulations Violate the First Amendment

    II. The Regulations Violate Equal Protection Applied
    to the Federal Government Through the Fifth Amendment

    III. The Regulations Violate the Privileges and Immunities
    Clause as Applied to the Federal Government under the Fifth
    Amendment by Infringing the Right to Make Use of the Most
    Effective Commercially Available Means of Communication

    IV. The Regulations Violate the Constitutional Right of Privacy.

Their arguments are novel, interesting, and generally well presented.
See http://www.eff.org/pub/Legal/Cases/Bernstein_v_DoS/Legal/971110_aaas.amicus

In addition, the Citadel for Constitutional Government has filed a sixth
amicus brief with the 9th Circuit Court of Appeals.  We are still pursuing
an online copy of that brief.

	John Gilmore
	Electronic Frontier Foundation

{% endraw %}
```

## Thread

+ Return to [November 1997](/archive/1997/11)

+ Return to "[John Gilmore <gnu@toad.com>](/authors/john_gilmore_gnu_at_toad_com_)"

+ 1997-11-26 (Wed, 26 Nov 1997 02:16:35 -0800 (PST)) - AAAS amicus brief in Bernstein case is on the Web; Citadel files too. - _John Gilmore<EMAIL_ADDRESS>


text:
# "Guorms"
An amazing game of cars and bowling! Grupo Peko has developed it as a response to the Theory project of the Physics 2 course at CITM university. We wanted to innovate compared to what was presented to us as a prototype, and this is our proposal. Enjoy it!

## Features
- Fully working Physics Engine.
- Navigable Map.
- 3 Types of Physical Forces implemented: Gravity, Aerodynammics and Hydrodynamics!
- A weapon and some targets to shoot!

## Controls
- WASD: Move your Worm!
- LeftClick: Shoot a Holy Grenade.
- F1: Show Colliders.

## Rules
- You must walk around the map shooting to all the targets. The map is made to contemplate how the Physics work!
- When you arrive to the end of the map, you can touch a sign to end the level and win!
- Enjoy it!

## Developers
- Marc Ruiz
- Oriol Valverde
- Ignasi Pardo

# Latest version!
[Download here!]()

repository: KuronoaScarlet/Gusanitos

repo_name: KuronoaScarlet/Gusanitos


text:
---
title: Defining Your Includes
slug: looking-at-includes
chapter: 11
---
Now to take a longer look at working with Jekyll Theme features.

#### Theme and Style Concepts

| Layouts | .html | *_layouts* | content containers, structural view |
| *Includes* | .html | *_includes* | reusable fragments across layouts or pages |
| Styles | .sass  | *_sass* | source files for CSS |
| Assets | images, video, pdf ... | _any_ | Jekyll happily serves any file type |

Includes can process any fragment, html, markdown or liquid.
The following Liquid brings in the include:

```
{% include meta.html %}
```

And this Liquid passes variables into the _include_ scope.

```
{% include meta.html myvar="12345" myitem=assignedvar %}
```
*Note:* includes you specify file _with_ extension.

Open up the *_includes* directory and examine these files.

## meta.html

* what is this doing?
* what variable scopes does it reference?
* what layout references this?

## analytics.html

* A common use of includes: declaring javascript.

## Notes on using includes

* source must be placed in _includes directory.
* No Front Matter


text:
---
layout: post
title: The TLDR on tf-idf and Shipping
author: TGlavan
publish: true
---

Greetings Traveller.

Today in this blog I will attempt to tackle one of the more abstract skills I have been tasked with learing for this course, visual representation of texts.

As I write this blog I am watching the referenced episode of Archer from John Laudun's blog (I highly reccomend watching it its pretty good).  I bring this up bacause the episode, "El Contador" is heavily influenced by Richard Connell’s short story “The Most Dangerous Game.”  This and many other shows have taken to referencing classic texts or using them as sources of inspiration.  This phenomenon of taking well known works of literature and working them

"Apocalypse Now"(and its remake) was based on Joseph Conrad's novel Heart of Darkness

As for "Doctor Who," the previous doctor (David Tennant) actually visited William Shakespeare in one episode that revealed how Shakespeare got his inspiration for many of his famous works and lines.


text:
# Python Markdown Generator

Python library for generating HTML sanitised Markdown documents.

It aims to bring modular approach for dynamically building pure (with some exceptions) Markdown documents with pure Python, with such a way, that they could consist multiple reusable components and with including some automated tasks such as creation  of table of contents.

[![CircleCI](https://img.shields.io/circleci/build/github/Nicceboy/python-markdown-generator?label=CircleCI&logo=circleci)](https://circleci.com/gh/Nicceboy/python-markdown-generator)
[![codecov](https://codecov.io/gh/Nicceboy/python-markdown-generator/branch/master/graph/badge.svg)](https://codecov.io/gh/Nicceboy/python-markdown-generator)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## But why?

In most cases, Markdown is finally converted into HTML markup language, and there are already multiple existing libraries for generating HTML output dynamically.
Markdown was originally created as a lightweight, user-friendly, user-written text formatting markup language to produce rich text format by using plain text editor, and existence of this kind of library might be against the original purpose of the language.

*However*, there are couple of rare use cases, where you might want machine to generate Markdown *instead* of direct HTML.
  * Some documents can be ideally generated by machine, but they might be edited by some user later on.
  * There might be need to generate some Markdown templates, which are finally filled by end-user. Still, there might be easier ways to create this kind of templates.
  * Also, there are some external systems, whereof HTML rendering is not supported, but you can input Markdown into them: this allows integration of something automatically into these systems with Markdown
  * Markdown syntax is simple and not fully-featured language, which could result in cleaner and simpler (less buggy!) result. Resulted file itself is a lightweight.

The original need for this kind of library came from the need to generate different kind of reports automatically into Git repositories, with Python. This library was created during [CinCan](https://cincan.io/) project to dynamically make malware analysis reports which are deployed and rendered directly into the Git -repositories.

At the time of starting of making this library, no complete existing similar library was found. If there is some, let's take this as a programming exercise...

> This is **not** yet-another-Markdown-to-HTML conversion tool.

## Quick Install

Python 3.7+ is required.

You can install latest version from the GitHub by using pip:
```shell
pip3 install git+https://github.com/Nicceboy/python-markdown-generator
```

## Quick usage

After installing, library can be just imported and we are ready to rock.
Method names should be self descriptive.

Library is supporting currently all the syntax from the standard Markdown, and some partial functionality of GitHub and GitLab syntax.

:TODO Better example, included in wiki maybe, documentation on the way for methods.

```python
from markdowngenerator import MarkdownGenerator

def main():
    with MarkdownGenerator(
        # By setting enable_write as False, content of the file is written
        # into buffer at first, instead of writing directly into the file
        # This enables for example the generation of table of contents
        filename="example.md", enable_write=False
    ) as doc:
        doc.addHeader(1, "Hello there!")
        doc.writeTextLine(f'{doc.addBoldedText("This is just a test.")}')
        doc.addHeader(2, "Second level header.")
        table = [
            {"Column1": "col1row1 data", "Column2": "col2row1 data"},
            {"Column1": "col1row2 data", "Column2": "col2row2 data"},
        ]

        doc.addTable(dictionary_list=table)
        doc.writeTextLine("Ending the document....")

if __name__ == "__main__":
    main()
```

Which should generate following output:

```
# Hello there!
**This is just a test.**

### Table of Contents
  * [Hello there!](#hello-there)
    * [Second level header.](#second-level-header)

## Second level header.

| Column1 | Column2 |
|:---:|:---:|
| col1row1 data | col2row1 data |
| col1row2 data | col2row2 data |

Ending the document....

```

## Licence

Copyright © 2019 Niklas Saari

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.The project is under Apache License, Version 2.0.


text:
# react-mathlive
[![Build Status](https://semaphoreci.com/api/v1/concludio/react-mathlive/branches/master/shields_badge.svg)](https://semaphoreci.com/concludio/react-mathlive)
[![Coverage Status](https://coveralls.io/repos/github/concludio/react-mathlive/badge.svg?branch=master)](https://coveralls.io/github/concludio/react-mathlive?branch=master)

A react component using [mathlive.js](https://mathlive.io)'s mathfield (interactive math editor).

## How to install

You can install *react-mathlive* like any other Javascript or Typescript library via npm:

```
npm i react-mathlive
```

For Typescript users: As *react-mathlive* is written in Typescript, it comes with its own typings.

## How to use

This text assumes you know [how to build simple react components](https://reactjs.org/tutorial/tutorial.html).

You can use the `MathfieldComponent` in your web application as follows:

```JS
import { MathfieldComponent } from "react-mathlive";
```

You can then either use it as a controlled or uncontrolled component.

### Uncontrolled component

In this mode the mathfield is initialized with the `initialLatex`. Whenever the user performs changes the `onChange`-handler is called.

This example is part of an assumed react component class.

```JSX
render() {
  return <MathfieldComponent
    initialLatex="f(x)=\\log _10 x"
    onChange={this.onMathChange}
  />;
}

onMathChange(mathText) {
  console.log(mathText);
}
```

In an uncontrolled `MathfieldComponent` the only way to programmatically change the mathfields contents are by accessing the `mathfield` directly and calling the modifying methods in there (see [Interacting with the native library](#Interacting-with-the-native-library)).

### Controlled component

In this mode the mathfield gets its contents updated whenever the `latex`-property changes.

This example makes use of reacts functional components.

```JSX
export function MyComponent() {
  const [latex, setLatex] = React.useState("f(x)=\\log _10 x");
  return <MathfieldComponent
    latex={latex}
    onChange={setLatex}
  />;
}
```

There is also an [example Typescript react application](/examples/example1/) using this library.

### Interacting with the native library

The `MathfieldComponent` also allows retrieving the native [`Mathfield` object](https://cortexjs.io/docs/mathlive/#(%22mathfield%22%3Amodule).(Mathfield%3Ainterface)) from the Mathlive library via the `mathfieldRef` parameter:

```JavaScript
render() {
  return <MathfieldComponent
    mathfieldRef={mf => (this.internalMathfield = mf)}
  />;
}
```

The object stored in `internalMathfield` can be used to read and modify the underlying mathfield directly.

Via the optional `mathfieldConfig` parameter it is possible to provide the native `Mathfield` with a [`MathfieldConfig`](https://cortexjs.io/docs/mathlive/#(%22config%22%3Amodule).(MathfieldConfig%3Atype)) on its creation:

```JSX
render() {
  return <MathfieldComponent
    mathfieldConfig={{
      defaultMode: "text"
      virtualKeyboardMode: "onfocus"
    }}
  />;
}
```

## Contribute

This is an open source library and issues and pull requests are very welcome.

See [Contributing](CONTRIBUTING.md).

repository: EdiaLearning/react-mathlive

repo_name: EdiaLearning/react-mathlive


text:
# Getting Started | How to Make an OS: 1

[![Getting Started](https://img.youtube.com/vi/mpPbKEeWIHU/0.jpg)](https://www.youtube.com/watch?v=mpPbKEeWIHU)

## Prep environment in WSL Ubuntu

```bash
sudo apt install build-essential mtools -y
```

## install QEMU

[Download](https://www.qemu.org/download/#windows)

##


text:
---
layout: default
---

# 1997-01-16 - Re: Newt's phone calls

## Header Data

From: Brian Lane<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 54fd58a51ef582ff410d47446bac95772c31d34e07ebd5f61f2c7b368263b2b4

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-01-16 01:36:30 UTC

Raw Date: Wed, 15 Jan 1997 17:36:30 -0800 (PST)

## Raw message

```
{% raw  %}From: Brian Lane<EMAIL_ADDRESS>Date: Wed, 15 Jan 1997 17:36:30 -0800 (PST)
To<EMAIL_ADDRESS>Subject: Re: Newt's phone calls
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Tue, 14 Jan 1997, Steve Schear wrote:

> Yes, you need a device which can simultaneously listen to the
> paging/controll channels and determine, when a handoff to a monitored
> conversation occurs,to  which new channel pair they have been assigned.  I
> seem to recall such a device was for sale a few years back using a ISA/EISA
> card and some DOS compatible software.  It connected to the ubiquitous and
> well characterized Oki 900 cell phone.

  I've also heard that some have hacked cellphones so that they can
become a 'clone' of an existing phone, receiving all commands to swap
channels, etc. But not sending anything back to the cell sites. (This is
different from the usual cloning that goes on where they duplicate the
phone and use it to run up enormous bills). I haven't found any concrete
refrences to this in my recent browsing though, so it may just be a
vapor-hack.

  Brian

----
  www.eskimo.com/~nexus      Nexus Computing     ftp.eskimo.com/~nexus

{% endraw %}
```

## Thread

+ Return to [January 1997](/archive/1997/01)

+ Return to<EMAIL_ADDRESS>(Steve Schear)](/authors/azur_at_netcom_com_steve_schear_)"
+ Return to "[Brian Lane <nexus@eskimo.com>](/authors/brian_lane_nexus_at_eskimo_com_)"

+ 1997-01-15 (Tue, 14 Jan 1997 22:53:24 -0800 (PST)) - [Re: Newt's phone calls](/archive/1997/01/eb7230afc9e6f533c550d8ed25196c52c09a43b9c6dd6a842f35385e5757c5ec) -<EMAIL_ADDRESS>(Steve Schear)_
  + 1997-01-16 (Wed, 15 Jan 1997 17:36:30 -0800 (PST)) - Re: Newt's phone calls - _Brian Lane<EMAIL_ADDRESS>


text:
# Video capture & debugging in Firefox OS
----

Video capture has landed in the lastest nightly of Firefox OS 1.4. You can use the `getUserMedia` API (still under prefix) to get a video stream from the phone camera. This article is about how to make a basic demo that does that and how you can debug your app.

### [App permission](#permission)
### [Debugging](#debugging)
### [Troubleshooting](#troubleshooting)
### [Using the App Manager in Firefox](#appmanager)

#  App permission

The code for getting access to the phone camera is very straight forward ([GitHub gist](https://gist.github.com/piatra/9240045)) , we'll get to that in a minute. First you should know that you cannot get access without providing an [App Manifest file](https://developer.mozilla.org/en-US/Apps/Developing/App_permissions).

An **App Manifest** is a JSON file that tells the browser _how to interact with the web application_. An example can be found [here in the MDN](https://developer.mozilla.org/en-US/Apps/Developing/Manifest#Example_manifest) with more documentation, or grab the one provided in the [boilerplate Firefox OS app](https://github.com/robnyman/Firefox-OS-Boilerplate-App/blob/gh-pages/manifest.webapp). This should include the following:

````
....
"video-capture": {
    "description": "get video"
}
....
````
Now that we have that out of the way, the code that allows us to access the camera:

````
navigator.mozGetUserMedia({audio: true, video: true}, function(stream) {
    video.src = window.URL.createObjectURL(stream);
}, function(err) {
    console.log(err);
});
````

As you can see the code is very straight forward (notice the *moz* prefix) and this gets you very far.
You can grab the code in [this gist](https://gist.github.com/piatra/9240045).

![ScreenShot](http://imgur.com/GJ4WBQU.png)

We get a live stream into the browser from our camera! Awesome!
Current build of Firefox OS 1.4 has a bug that makes the video stream to be rotated 90deg.
We can easily fix that with CSS.

````
    video {
        -moz-transform:rotate(90deg);
        transform:rotate(90deg);
    }
````

The demo I've created uses a `<video>` element to display the stream from the camera and a `<canvas>` element to capture a frame

![ScreenShot](http://imgur.com/ugUIxmv.png)

Fixed! Great. As you can see I've also included a capture button that takes a snapshot of the current frame in the `<canvas>`. The code includes a fix to rotate the image captured (same bug). You can see the entire code [in this gist](https://gist.github.com/piatra/9240045) .

#  Debugging your application

The main tool for debugging applications is the App Manager. This contains most of the tools in the Developer Tools (DOM Inspector, Console, Debugger, Style Editor) hooked up to your physical device or simulator.
Debugging your Firefox OS application is really easy once you have everything set up.

### Prerequisites
1. [ADB Helper add-on](https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/) helps manage the connection between the browser and the device

#  Troubleshooting

2. (*) Optional. On Linux I had to set up udev correctly so that the system would detect the device. You need to create `/etc/udev/rules.d/51-android.rules` with the following content

````
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
````

Where idVendor is a device specific code, `05c6` is the code for the Keon device. Make sure to reboot the device if you have issues or [read more about troubleshooting](https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Troubleshooting)

#  Using the App manager
The [App manager](https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager) allows you to load applications in the browser and the send them to your device or to the [Firefox OS simulator](https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/).

To access the App manager type in `about:app-manager` or go to Tool > Web Developer > App Manager. Here you can load you application manifest which you could serve using a local server.

![ScreenShot](http://imgur.com/I98onp9.png)

Submitting the manifest should make your application available in the app manager. Here you have an update button that allows you to submit changes to your device every time you update.

You should be able to connect to your device

![ScreenShot](http://imgur.com/oFoLMFy.png)

There is also a debug button specific to each application that you can use to essentially have a Developer Tool instance connected to your phone which is an indispensable tool.
There are some features missing, like the Network tab, but other than that Console, Style Editor, Debugger, Inspector are all available, even hovering over DOM elements will be highlighting on the device :)

![ScreenShot](http://imgur.com/ZasBnvI.png)

![ScreenShot](http://imgur.com/U6LZMJR.png)

Happy hacking! :)

repository: piatra/blog

repo_name: piatra/blog


text:
# ultixox

Enhanced version of well known game tic-tac-toe

![Sample game](https://upload.wikimedia.org/wikipedia/commons/d/d1/Incomplete_Ultimate_Tic-Tac-Toe_Board.png)

Inspiration: [mathwithbaddrawings](https://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/)

For more information: [Ultimate tic-tac-toe](https://en.wikipedia.org/wiki/Ultimate_tic-tac-toe)

repository: egegunes/ultixox

repo_name: egegunes/ultixox


text:
https://motherfuckingwebsite.com/

# TL;DR

I'm a guy who thinks that the web has lost its way. I'm always excited to be a small part of trying to heal what's still great.

# It should be possible to view this site without JS

Javascript is a really important part of webapps, but it's overused in static webpages (and many web apps). I never use it for essential parts of the page.

# It should be possible to view this site without CSS

Yup! Even CSS has [the potential to exfiltrate user data](https://curesec.com/blog/article/blog/Reading-Data-via-CSS-Injection-180.html).

I don't use it this way, obviously, but the sufficiently paranoid may want to disable CSS as well.

I've tried to make my website work without any of this. This means making sure that the DOM makes sense and is laid out sensibly, and everything uses the right kinds of tags.

It's a refreshing exercise, and valuable from an a11y standpoint. Try my site without styles -- I dare you. :-)

# In fact you shouldn't even have to visit the site.

I generate an RSS feed at the same time as I render the core articles. I strive to make it possible to use an RSS reader without setting foot on the site, and I encourage you to consume and remix the things I write however works best for you.

# If you want to buy me hot chocolate (or hosting) consider donating.

You don't have to, but much appreciated if you do.

TODO(woursler): Include links.


text:
---
title: "How can a B2B Software Company help your business to become a Saas Company, and earn money?"
date: "2020-08-07T16:24:04.000Z"
template: blog
tags: Small Business
image: "./media/b2b-saas.jpg"
---

With the quarantine restrictions, some internal processes in your company could be compromised, such as customer management or workflow management. Commonly this happens at some point (even if we were not quarantined), and that is when technology and software tools enter your business.

You can acquire these tools as universal products, or better yet, you can develop them with a software company in the form of a Software Solution. In this way, you can create a customized tool based on the needs and qualities of your internal processes.

In Miami, there are several options that you can take for the second option. We’re one of them, and that's why we dedicate this article to explain what is a **B2B company and how we can help you to become a SaaS (Software as a service) company developing software solutions**.

<title-2>But first, what is a B2B SaaS company?</title-2>

B2B software is a tool used by companies for mutual transactions between them, involving for example manufacturers, wholesalers, and retailers, and sometimes the consumer.

These types of platforms are commonly related to accounting services, inventory management, sales, marketing, including CRM, order taking, merchandising software, B2B e-commerce platform, project management tools, special "members only" portals, and customer service applications among others.

<title-2>SaaS (software as a service)</title-2>

We must first understand what a Saas is and how this can be adopted in the B2B world. A Saas is not more than a software that allows the distribution of the software. A supplier will be able to host this software with all its applications and make them available to customers through the Internet.

A SaaS is a software that allows companies to sell their products/services to other companies. These products allow improving the efficiency of another company, taking it to competition standards. Saas allows you to optimize your sales, marketing, and customer services to improve store performance and generate more revenue.

<title-3>Benefits of Saas Products:</title-3>

<title-4>Organized Database:</title-4>

The SaaS team you hire to manage the development, updating and maintenance of all your small business software tools will help you with the proper handling and storage of essential information.

<title-4>Improved Sales Team Performance:</title-4>

Improving the performance of the sales team, and each area of your small business, because software tools allow you to maintain the workflow, improve the organization and measurement of internal activities.

Customize the software tools that are already incorporated:

It is probable that you already use some of the most common software packages like Trello, Slack. If you incorporate a SaaS to your stack of professionals, you will be able to personalize tools that accomplish the same goals but adapt it 100% to the needs and processes of your business.

<title-4>Customize the software tools that are already incorporated:</title-4>

It is probable that you already use some of the most common software packages like Trello, Slack. If you incorporate a SaaS to your stack of professionals, you will be able to personalize tools that accomplish the same goals but adapt it 100% to the needs and processes of your business.

<title-4>Lower labor responsibilities:</title-4>

By hiring a remote team or a B2B software company, you can get a team that solves an internal need you have in your business, but without generating a lot of labor liabilities or responsibilities as an employer, because most suppliers work with outsourcing modalities.

<title-4>Putting your business on the road to digital transformation</title-4>

Every time you add software tools and technology to your business operations, you are more on the way to the [digital transformation](https://cobuildlab.com/blog/what-is-digital-transformation-and-how-can-small-businesses-take-advantage-of-it-this-2020/) that is in vogue today. That allows us to automate many processes and to improve them in time and effectiveness.

<title-4>Automatic update function:</title-4>

Part of the activities you must complete is tracking updates to all the software tools than your employees use. When you hire a company that provides SaaS, this is a thing of the past.

 If you make a change that requires updating, the team coordinates it for executing it under your direction.

<title-4>Increased efficiency:</title-4>

As we know, hiring a team to provide your business with software-as-a-service improves the performance of all areas by developing custom software tools. Part of that benefit is the increase of efficiency, that is, the successful accomplishment of the activities in the shortest time possible and with the least amount of resources involved.

<title-4>Global Connectivity:</title-4>

The world speaks the language of technology, and software is the medium for speaking that language. Many of these tools work with the internet, connect us with others, and if you want, you can even get a commercial benefit.

<title-2>How does a B2B company work?</title-2>

A B2B software development company is in charge of selling products and services (B2B software) to another company to solve a problem within the company. To develop software of this type it’s necessary to know each one of the processes of the client’s company to solve the issue at hand. It is important to emphasize that for larger or more complex products, a more exhaustive process of the B2B products is needed, to assure a good service.

<youtube-video id="uX6GHoRQfns"></youtube-video>

<title-3>Where can we use B2B software?</title-3>

B2B software can be used in a wide variety of industries, which makes it very popular today: Financial services, Telecommunications, Construction, Healthcare, Education, Engineering, Marketing and sales, Food and beverage, among others.

Regardless of which business sector your small business is in, a Saas will help you to get your business on the road to digital transformation, and automated processes with the help of a remote team that doesn’t depend directly on you, and doesn’t create obligations or work liabilities, but still works in coordination with your goals and under your guidance.

<title-2>Why can a B2B software company turn you into a Saas company?</title-2>

If you develop an ERP system specialized in your industry, for example, and it works very well for you. Because it contains specifications for your customer management processes,  then you could patent this tool and mass-produce it for other companies that are in your industry. All that by hiring a company, B2B software company, and developing a software tool.
You can solve an internal challenge, and also get profit from this tool.

<title-2>Cobuild Lab: We can provide you with software-as-a-service development</title-2>

We’ve reached the end of this article, and now you know what’s a B2B software and how you can take advantage of it to make your company grow quickly. Here in Cobuild Lab, we offer you consultancy and development for your B2B software, according to the needs that your company, business, or public consumers demand. So don’t miss the opportunity to develop a B2B software and promote your business in the market, we’re waiting for you.

1. We do a research study on the processes you want to improve. How they are performed, how they are expected to be performed, who is involved, and all the information needed to shape the business software tool we will develop for you.

2. We define functionality, design, architecture. Evaluate and decide which is the best tech stack we can use to make your tool a reality. All this is important to develop the best version of your tool for doing it functional, easy to use for the employees, and develop it in the shortest time possible. We work with an agile methodology in each of our projects.

3. We make a work plan. We establish dates, goals, tests, and follow all the steps until we are software-oriented to improve your processes, to overcome the obstacles of quarantine, or just for innovating with the help of IT.

Get ready to contract with a **B2B company to transform your business in Saas and discover all the benefits you can obtain with software solutions** thought for your industry. If you have a doubt or want to make a free consultation on budget, viability, and so on, [contact us](https://cobuildlab.com/#contact-us-anchor), and we’ll gladly help you.

repository: cobuildlab/cobuildlab-web

gha_language: JavaScript

repo_name: cobuildlab/cobuildlab-web


text:
HalloweenBot
============

A script for an Adafruit Trinket to drive a couple of neopixel rings, a piezo buzzer, and listen to a button.

See pictures, video, schematic, and construction details here:

http://smithje.github.io/halloween/2013/10/22/halloweenbot.html

repository: smithje/HalloweenBot

repo_name: smithje/HalloweenBot


text:
# ulx3s-tools

Nix derivations for tools that I used for development on the
[ULX3S](https://ulx3s.github.io/) FPGA board.

There is also a module that enables users of the `dialout` group to
access the ULX3S USB devices without root:

```
% sudo nix-channel --add https://github.com/blitz/ulx3s-tools/archive/main.tar.gz ulx3s-tools

# Now add <ulx3s-tools/module> to your module list.
```


text:
notification-center-android
===========================

Android demo application that implements a notification center (similar to NSNotificationCenter in iOS). To demonstrate a complete asynchronous socket communication layer is implemented that sends/receives commands to/from a socket server via the notification center.

This NotificationCenter class is an extension of the observer pattern in the Android and it can be used to broadcast notifications with objects to multiple UI, Network or any other logical layer in the scope of the application and catch notifications with appropriated methods.

For each notification name a separate set of Observable objects is created. The Observers are registered to the Observable of the notification.

Reference to iOS NSNotificationCenter: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsnotificationcenter_Class/Reference/Reference.html

repository: omplanet/notification-center-android

repo_name: omplanet/notification-center-android